|
|
1.1 ! root 1: .\" Copyright (c) 1980 Regents of the University of California. ! 2: .\" All rights reserved. The Berkeley software License Agreement ! 3: .\" specifies the terms and conditions for redistribution. ! 4: .\" ! 5: .\" @(#)vp.4 6.2 (Berkeley) 5/14/86 ! 6: .\" ! 7: .TH VP 4 "May 14, 1986" ! 8: .UC 4 ! 9: .SH NAME ! 10: vp \- Versatec interface ! 11: .SH SYNOPSIS ! 12: .B "device vp0 at uba0 csr 0177510 vector vpintr vpintr" ! 13: .SH DESCRIPTION ! 14: The Versatec printer/plotter is normally used with the ! 15: line printer system. ! 16: This description is designed for those who wish to drive the Versatec directly. ! 17: .PP ! 18: To use the Versatec yourself, you must realize that you cannot open the ! 19: device, ! 20: .I /dev/vp0 ! 21: if there is a daemon active. ! 22: You can see if there is a daemon active by doing a ! 23: .IR lpq (1), ! 24: and seeing if there are any files being sent. ! 25: Printing should be turned off using ! 26: .IR lpc (8). ! 27: .PP ! 28: To set the Versatec into plot mode you should include ! 29: .RI < sys/vcmd.h > ! 30: and use the ! 31: .IR ioctl (2) ! 32: call ! 33: .IP ! 34: ioctl(fileno(vp), VSETSTATE, plotmd); ! 35: .PP ! 36: where ! 37: .I plotmd ! 38: is defined to be ! 39: .IP ! 40: \fBint\fR plotmd[] = { VPLOT, 0, 0 }; ! 41: .PP ! 42: and ! 43: .I vp ! 44: is the result of a call to ! 45: .I fopen ! 46: on stdio. ! 47: When you finish using the Versatec in plot mode you should eject paper ! 48: by sending it a EOT after putting it back into print mode, i.e. by ! 49: .PP ! 50: 'nf ! 51: \fBint\fR prtmd[] = { VPRINT, 0, 0 }; ! 52: \&... ! 53: fflush(vp); ! 54: ioctl(fileno(vp), VSETSTATE, prtmd); ! 55: write(fileno(vp), "\e04", 1); ! 56: .fi ! 57: .SH FILES ! 58: /dev/vp0 ! 59: .SH SEE ALSO ! 60: vfont(5), ! 61: lpr(1), ! 62: lpd(8), ! 63: vtroff(1), ! 64: va(4) ! 65: .SH DIAGNOSTICS ! 66: The following error numbers are significant at the ! 67: time the device is opened. ! 68: .TP 10 ! 69: [ENXIO] ! 70: The device is already in use. ! 71: .TP ! 72: [EIO] ! 73: The device is offline. ! 74: .SH BUGS ! 75: The configuration part of the driver assumes that the device is set up to ! 76: vector print mode through 0174 and plot mode through 0200. ! 77: As the configuration program can't be sure ! 78: which vector interrupted at boot time, ! 79: we specify that it has two interrupt vectors, ! 80: and if an interrupt comes through 0200 it is reset to 0174. ! 81: This is safe for devices with one or two vectors at these two addresses. ! 82: Other configurations with 2 vectors may require changes in the driver.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.