Annotation of researchv10dc/man/manb/vp.4, revision 1.1

1.1     ! root        1: .TH VP 4 2/21/80 4
        !             2: .UC 4
        !             3: .SH NAME
        !             4: vp \- Versatec interface
        !             5: .SH SYNOPSIS
        !             6: .B #include <sys/vcmd.h>
        !             7: .SH DESCRIPTION
        !             8: The Versatec printer/plotter in normally used with the programs
        !             9: .IR vpr (1),
        !            10: .IR vprint (1)
        !            11: or
        !            12: .IR vtroff (1).
        !            13: This description is designed for those who wish to drive the Versatec directly.
        !            14: .PP
        !            15: The Versatec at Berkeley is 36\*(rq wide, and has 440 characters per line
        !            16: and 7040 dots per line in plot mode (this is actually slightly less than
        !            17: 36\*(rq of dots.)
        !            18: The paper used is continuous roll paper, and comes in 500' rolls.
        !            19: .PP
        !            20: To use the Versatec yourself, you must realize that you cannot open the
        !            21: device,
        !            22: .I /dev/vp0
        !            23: if there is a daemon active.
        !            24: You can see if there is a daemon active by doing a
        !            25: .IR ps (1),
        !            26: or by looking in the directory
        !            27: .I /usr/spool/vpd.
        !            28: If there is a file
        !            29: .I lock
        !            30: there, then there is probably a daemon
        !            31: .IR /usr/lib/vpd
        !            32: running.
        !            33: If not, you should remove the
        !            34: .I lock.
        !            35: .PP
        !            36: In any case, when your program tries to open the device
        !            37: .I /dev/vp0
        !            38: you may get one of two errors.
        !            39: The first of these
        !            40: ENXIO
        !            41: indicates that the Versatec is already in use.
        !            42: Your program can then
        !            43: .IR sleep (2)
        !            44: and try again in a while, or give up.
        !            45: The second is
        !            46: EIO
        !            47: and indicates that the Versatec is offline.
        !            48: .PP
        !            49: To set the Versatec into plot mode you can use the following
        !            50: .IR ioctl (2)
        !            51: call
        !            52: .IP
        !            53: ioctl(fileno(vp), VSETSTATE, plotmd);
        !            54: .PP
        !            55: where
        !            56: .B plotmd
        !            57: is defined to be
        !            58: .IP
        !            59: \fBint\fR plotmd[] = { VPLOT, 0, 0 };
        !            60: .PP
        !            61: and
        !            62: .I vp
        !            63: is the result of a call to
        !            64: .I fopen
        !            65: on stdio.
        !            66: When you finish using the Versatec in plot mode you should eject paper
        !            67: by sending it a EOT after putting it back into print mode, i.e. by
        !            68: .sp .1i
        !            69: 'nf
        !            70: \fBint\fR prtmd[] = { VPRINT, 0, 0 };
        !            71: \&...
        !            72: fflush(vp);
        !            73: ioctl(fileno(vp), VSETSTATE, prtmd);
        !            74: write(fileno(vp), "\e04", 1);
        !            75: .fi
        !            76: .PP
        !            77: .IR N.B. :
        !            78: If you use the standard I/O library with the Versatec you
        !            79: .B must
        !            80: do
        !            81: .IP
        !            82: setbuf(vp, vpbuf);
        !            83: .PP
        !            84: where
        !            85: .I vpbuf
        !            86: is declared
        !            87: .IP
        !            88: \fBchar\fR vpbuf[BUFSIZ];
        !            89: .PP
        !            90: otherwise the standard I/O library, thinking that the Versatec
        !            91: is a terminal (since it is a character special file) will not adequately buffer
        !            92: the data you are sending to the Versatec.
        !            93: This will cause it to run
        !            94: .B extremely
        !            95: slowly and tends to grind the system to a halt.
        !            96: .SH FILES
        !            97: /dev/vp0
        !            98: .SH SEE ALSO
        !            99: vfont(5), vpr(1), vtroff(1), va(4)
        !           100: .SH BUGS

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.