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

1.1     ! root        1: .TH VA 4
        !             2: .UC 4
        !             3: .SH NAME
        !             4: va \- Benson-Varian interface
        !             5: .SH SYNOPSIS
        !             6: .B #include <sys/vcmd.h>
        !             7: .SH DESCRIPTION
        !             8: The Benson-Varian 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 Benson-Varian
        !            14: directly.
        !            15: .PP
        !            16: The Benson-Varian at Berkeley uses 11\*(rq by 8\*(rq fan-fold paper.
        !            17: It will print 132 characters per line in print mode
        !            18: and 2112 dots per line in plot mode.
        !            19: .PP
        !            20: In print mode, the Benson-Varian uses a modified ASCII character set.
        !            21: Most control characters print various non-ASCII graphics such as daggers,
        !            22: sigmas, copyright symbols, etc.
        !            23: Only LF and FF are used as format effectors.  LF acts as a newline,
        !            24: advancing to the beginning of the next line, and FF advances to the top of
        !            25: the next page.
        !            26: .PP
        !            27: In plot mode, the Benson-Varian prints one raster line at a time.
        !            28: An entire raster line of bits (2112 bits = 264 bytes) is sent, and
        !            29: then the Benson-Varian advances to the next raster line.
        !            30: .PP
        !            31: .B Note:
        !            32: The Benson-Varian must be sent an even number of bytes.
        !            33: If an odd number is sent, the last byte will be lost.
        !            34: Nulls can be used in print mode to pad to an even number of bytes.
        !            35: .PP
        !            36: To use the Benson-Varian yourself, you must realize that you cannot open the
        !            37: device,
        !            38: .I /dev/va0
        !            39: if there is a daemon active.
        !            40: You can see if there is a daemon active by doing a
        !            41: .IR ps (1),
        !            42: or by looking in the directory
        !            43: .I /usr/spool/vad.
        !            44: If there is a file
        !            45: .I lock
        !            46: there, then there is probably a daemon
        !            47: .IR /usr/lib/vad
        !            48: running.
        !            49: If not, you should remove the
        !            50: .I lock.
        !            51: .PP
        !            52: In any case, when your program tries to open the device
        !            53: .I /dev/va0
        !            54: you may get one of two errors.
        !            55: The first of these
        !            56: ENXIO
        !            57: indicates that the Benson-Varian is already in use.
        !            58: Your program can then
        !            59: .IR sleep (2)
        !            60: and try again in a while, or give up.
        !            61: The second is
        !            62: EIO
        !            63: and indicates that the Benson-Varian is offline.
        !            64: .PP
        !            65: To set the Benson-Varian into plot mode you can use the following
        !            66: .IR ioctl (2)
        !            67: call
        !            68: .IP
        !            69: ioctl(fileno(va), VSETSTATE, plotmd);
        !            70: .PP
        !            71: where
        !            72: .B plotmd
        !            73: is defined to be
        !            74: .IP
        !            75: \fBint\fR plotmd[] = { VPLOT, 0, 0 };
        !            76: .PP
        !            77: and
        !            78: .I va
        !            79: is the result of a call to
        !            80: .I fopen
        !            81: on stdio.
        !            82: When you finish using the Benson-Varian in plot mode you should advance to
        !            83: a new page
        !            84: by sending it a FF after putting it back into print mode, i.e. by
        !            85: .sp .1i
        !            86: 'nf
        !            87: \fBint\fR prtmd[] = { VPRINT, 0, 0 };
        !            88: \&...
        !            89: fflush(va);
        !            90: ioctl(fileno(va), VSETSTATE, prtmd);
        !            91: write(fileno(va), "\ef\e0", 2);
        !            92: .fi
        !            93: .PP
        !            94: .IR N.B. :
        !            95: If you use the standard I/O library with the Benson-Varian you
        !            96: .B must
        !            97: do
        !            98: .IP
        !            99: setbuf(vp, vpbuf);
        !           100: .PP
        !           101: where
        !           102: .I vpbuf
        !           103: is declared
        !           104: .IP
        !           105: \fBchar\fR vpbuf[BUFSIZ];
        !           106: .PP
        !           107: otherwise the standard I/O library, thinking that the Benson-Varian
        !           108: is a terminal (since it is a character special file) will not adequately buffer
        !           109: the data you are sending to the Benson-Varian.
        !           110: This will cause it to run
        !           111: .B extremely
        !           112: slowly and tends to grind the system to a halt.
        !           113: .SH FILES
        !           114: /dev/va0
        !           115: .br
        !           116: /usr/include/sys/vcmd.h
        !           117: .SH SEE ALSO
        !           118: vfont(5), vpr(1), vtroff(1), vp(4)
        !           119: .SH BUGS
        !           120: The 1's (one's) and l's (lower-case el's) in the Benson-Varian's
        !           121: standard character set look very similar; caution is advised.

unix.superglobalmegacorp.com

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