vtprint-2.0.2/ANNOUNCE 644 164 12 5034 5653371656 7421 ANNOUNCING THE OFFICIAL RELEASE OF VTPRINT 2.0! =============================================== June 19, 1994 Finally, I have finished putting the last touches on the vtprint-2.0 package. It is now ready for general consumption. If you are using an earlier version of vtprint, I strongly recommend you to upgrade now! vtprint 2.0 is a complete rewrite from the 1.x versions. vtprint is a program that allows users to print from a remote UNIX host to a printer attached to their local terminal or emulator, which makes it great for printing files at home, etc. (It only does text files, though.) vtprint is available via anonymous ftp from ftp.sdsu.edu in the /pub/vtprint directory. It is also available by uuencoded e-mail by sending a request to the author at . NOTE THAT FTP.NETCOM.COM IS NO LONGER THE OFFICIAL SITE FOR VTPRINT -- the files stored there are likely to old -- use ftp.sdsu.edu instead! vtprint should be fully portable to any modern UNIX. The only "difficult" things are likely to be a need for an ANSI C compiler and GNU gzip. (gzip is used to decompress the package, and is available from prep.ai.mit.edu via anonymous ftp in the /pub/gnu directory.) Attached below is the WHATSNEW file for those of you already using vtprint: =======> cut here <======== What's new in vtprint 2.0 from 1.x? vtprint-2.0 represents a *complete* rewrite of vtprint. I decided to change somewhat the design philosophy, deeming portability to non-UNIX systems to be really worthless. Hence, this is probably only compilable on UNIX or UNIX-clone systems. Also, I moved to the "getopt()" facility which simplified some of the option parsing code. Here's a list of some of the "user-visible" additions to vtprint: 1) support for any *terminal* with printer control codes via an external library file (see vtprintcap(5).) 2) support for CR/LF handling directly 3) support for output to *any* device file via the command line. 4) support for "session defaults" via an environmental variable which can hold command-line options. 5) optional "binary" mode, overriding CR/LF translations (can only be used on terminal devices). 6) probably other things I can't think of now. ================================================================= Garrett D'Amore | garrett@sciences.sdsu.edu Student Programmer/Analyst | SDSU College of Sciences SDSU Computer Science Major | Physics Bldg., Room 238 ================================================================= vtprint-2.0.2/CHANGELOG 644 164 12 5046 5653371656 7505 CHANGELOG ========= The following changes to vtprint have been made: 2.0.1 -> 2.0.2 Removed: Lots of nonsense in the Makefile. There is no mail target anymore, and install does not attempt to change ownerships anymore. Also, the .SILENT has been removed, so you won't wonder what it did. 2.0 -> 2.0.1 Fixed: Problem compiling on BSD systems due to use of RAWOUT. (thanks to dolittle@math.toronto.edu for spotting the bug) Fixed: Mispelling of "fg" for "fd" in termstate.c (dolittle@math.toronto.edu) Fixed: Problem compiling on OSF/1 due to basename symbol conflict (thanks to ephelps@carbon.denver.colorado.edu) Added: New entries in the COMPAT file thanks to (minh@lis.rch.unimelb.edu.au) Added: Option to send mail to the author when installing vtprint. Changed: Slight changes to the Makefile, hopefully which will improve cross- platform compatibility. 2.0gamma2 -> 2.0 Fixed: -h option now provides complete list of available options Fixed: Bogus [filename...] in vtprtoff.1 SYNOPSIS removed Added: Section about binary files to vtprint.1 in CAVEATS chapter Changed: man pages are now formatted with groff to fix bug in Sun man package Changed: FAQ is now nicely formatted, more complete, and is available in either ASCII or PostScript. (MS macro source is provided.) 2.0gamma -> 2.0gamma2: Fixed: Major Makefile fixes (thanks to dolittle@math.toronto.edu) Fixed: Extra "newline" bug in vtprintcap codes (thanks goes to dolittle@math.toronto.edu for spotting the bug) Fixed: Backwards -E and -e options (thanks again to dolittle@math.toronto.edu for leading me to the bug) Fixed: Unused variable warnings in escape.c Fixed: Mixed up -n and -c options Fixed: Various typos in man pages (thanks to tli@ucssun1.sdsu.edu and dolittle@math.toronto.edu) Added: WHATSNEW Added: CHANGELOG Added: install (modified from X11R5/GNU Autoconf) for systems without a working install program (SYSV). Added: tabstrip shell script (strips tabs from file using expand -4) Changed: Format of COMPAT and COMPAT.tmpl entries Changed: vtprint man page (CAVEATS section) to reflect hardware handshaking caveat Changed: Updated FAQ with new information. (This is really a "proto-FAQ".) 2.0beta -> 2.0gamma: Fixed: Makefile fleshed out/some fixes Added: Documentation fleshed out (vtprintcap & vtprtoff man pages) Changed: FAQ includes new comments/fixes 1.x -> 2.0beta: Changed: Everything, compelete rewrite. See WHATSNEW and README for details. vtprint-2.0.2/COMPAT 644 164 12 10303 5653371656 7211 Compatibility File for vtprint v2.0 =================================== Please see the file "COMPAT.tmpl" for information regarding testing and submitting compatibility information. If your system isn't represented here, I want to know about it! ---------------------------------------------------------------------------- success [y/n] : yes formfeed [y/n] : yes reported_by : Garrett D'Amore reported_by_email : garrett@sciences.sdsu.edu terminal_type : vt100 terminal_platform : MS-DOS terminal_media : modem terminal_sw : COMit! terminal_sw_version : ?? terminal_notes : Poor use of "/" key for command functions make : it an extremely bad choice for UNIX users. ---------------------------------------------------------------------------- success [y/n] : yes formfeed [y/n] : no reported_by : Garrett D'Amore reported_by_email : garrett@sciences.sdsu.edu terminal_type : vt102 terminal_platform : MS-DOS terminal_media : modem terminal_sw : Telemate terminal_sw_version : 4.12 terminal_notes : This is what the author of "vtprint" uses! ---------------------------------------------------------------------------- success [y/n] : yes formfeed [y/n] : yes reported_by : Garrett D'Amore reported_by_email : garrett@sciences.sdsu.edu terminal_type : vt100 terminal_platform : MS-Windows terminal_media : modem terminal_sw : Terminal terminal_sw_version : 3.1 terminal_notes : ---------------------------------------------------------------------------- success [y/n] : yes formfeed [y/n] : yes reported_by : Garrett D'Amore reported_by_email : garrett@sciences.sdsu.edu terminal_type : vt100 terminal_platform : UNIX & X11R5 terminal_media : ethernet/modem terminal_sw : rxvt terminal_sw_version : 1.63+ terminal_notes : By default sends data to "lpr", but this can be : changed by an undocumented X resource. ---------------------------------------------------------------------------- success [y/n] : yes formfeed [y/n] : yes reported_by : Garrett D'Amore reported_by_email : garrett@sciences.sdsu.edu terminal_type : vt102 terminal_platform : MS-DOS terminal_media : modem terminal_sw : Quick Link II Fax terminal_sw_version : 2.2.2 terminal_notes : Prints correctly, but outputs newlines and formfeeds : on the screen as well as the printer. ---------------------------------------------------------------------------- success [y/n] : no formfeed [y/n] : no reported_by : Garrett D'Amore reported_by_email : garrett@sciences.sdsu.edu terminal_type : vt100/vt102 terminal_platform : MS-Windows terminal_media : modem terminal_sw : Quick Link II Fax terminal_sw_version : 1.3 terminal_notes : Doesn't work, and has some of the worst VT10x emulation : the author has seen to date! Not recommended for use : except FAX transmissions! ---------------------------------------------------------------------------- success [y/n] : yes formfeed [y/n] : yes reported_by : Minh Tran reported_by_email : minh@cryptic.rch.unimelb.edu.au terminal_type : vt220 terminal_platform : MS-DOS terminal_media : ethernet terminal_sw : Refection 1+ terminal_sw_version : 4.3 terminal_notes : ---------------------------------------------------------------------------- success [y/n] : yes formfeed [y/n] : yes reported_by : Minh Tran reported_by_email : minh@cryptic.rch.unimelb.edu.au terminal_type : vt220 terminal_platform : MS-DOS terminal_media : serial terminal_sw : Refection 3+ terminal_sw_version : 2.2 terminal_notes : ---------------------------------------------------------------------------- success [y/n] : yes formfeed [y/n] : yes reported_by : Minh Tran reported_by_email : minh@cryptic.rch.unimelb.edu.au terminal_type : vt220 terminal_platform : WINDOWS terminal_media : ethernet terminal_sw : Refection 1+ terminal_sw_version : 4.10 terminal_notes : vtprint-2.0.2/COMPAT.tmpl 644 164 12 4237 5653371657 10156 COMPAT.tmpl =========== This is a template for compatibility submissions for vtprint. If you have hardware or software that isn't represented in the "COMPAT" file, then I'd *really love* to hear about what your set up is, and what level of success you have had with it! If you have compiled vtprint, you can test it by doing "vtprint testfile" in the source directory, or doing "make test". The following is a description of fields used in a COMPAT entry. You will find a blank COMPAT entry to fill out at the end of this file. If you would like to see an example entry, take a look at the "COMPAT" file included. ---------------------------------------------------------------------------- success [y/n] : whether or not vtprint works for you formfeed [y/n] : do formfeeds work for you? reported_by : the name of the person reporting this reported_by_email : e-mail address of same person, if available credit [y/n] : whether or not I can include that name along with the entry so people with similiar set-ups can ask for advice if they have difficulty. (This field isn't included in the distributed COMPAT file.) terminal_type : the type of terminal or emulation used (e.g. "vt100") terminal_platform : the emulator platform being used, or "true" if the terminal is the genuine article. terminal_media : type of communications, eg "serial", "modem", "ethernet" terminal_sw : name of emulation software being used, e.g. "Telemate" terminal_sw_version : version information of emulator, e.g. "4.12" terminal_notes : any notes you'd think others would benefit by ---------------------------------------------------------------------------- ===> cut here <=== ---------------------------------------------------------------------------- success [y/n] : formfeed [y/n] : reported_by : reported_by_email : credit [y/n] : terminal_type : terminal_platform : terminal_media : terminal_sw : terminal_sw_version : terminal_notes : ---------------------------------------------------------------------------- ported_by_email : garrett@sciences.sdsu.edu terminal_type : vt100/vt102 terminal_platform : MS-Windows terminal_media : modem terminal_sw : Quick Link II Fax terminal_sw_version : 1.3 terminal_notes : Doesn't work, and has some of the worst VT10x emulation : the author has seen to date! Not recommendedvtprint-2.0.2/FAQ 644 164 12 37540 5653371657 6652 TThhee vvttpprriinntt FFAAQQ _G_a_r_r_e_t_t _D_'_A_m_o_r_e _<_g_a_r_r_e_t_t_@_s_c_i_e_n_c_e_s_._s_d_s_u_._e_d_u_> San Diego State University Version 0.9 June 19, 1994 _A_B_S_T_R_A_C_T This document attempts to address some of the most common questions relating to the vtprint pro- gram. However, this document is still very much under development, so there may be significant omissions or errors. The author apologizes for any such errors or omissions, and kindly requests that the reader pass on any corrections or requests for clarification or more data to him. 19 June 1994 -2- 11.. AAbboouutt vvttpprriinntt 1.1. What is vvttpprriinntt? vvttpprriinntt is a program that makes it possible to obtain seamless printing from a remote host to a printer at home without requiring a TCP/IP connection to the remote machine or root access on the remote machine. It will communicate over a serial line or a regular network connection. Other methods of connection may also be possible. vvttpprriinntt runs on the remote system (currently only UNIX- like systems are supported). Software on your local machine may vary considerably. 1.2. Who writes/supports vvttpprriinntt? The author of vvttpprriinntt is Garrett D'Amore. He can be reached at . He is actively supporting vvttpprriinntt users, and is working on new devel- opment with vvttpprriinntt. 1.3. Where do I get vvttpprriinntt? The original source archive for vvttpprriinntt is available via ftp. The current version (as of June 19, 1994) is 2.0 and can be found at ftp.sdsu.edu in //ppuubb//vvttpprriinntt// as a GNU ggzziipp compressed tar archive (vvttpprriinntt--22..00..ttaarr..ggzz). Currently, only a source distri- bution is being made available. Also, users without ftp capabability should contact the author to make author arrangements. 1.4. What do I need to use vvttpprriinntt? Well, to compile and install it, you need an ANSI C compiler. (If your site has it installed already, you don't need to worry about this.) 19 June 1994 -3- To use it, you need a terminal (or terminal emulator) that supports printer control escape sequences. If you have a terminal or emulator that supports escape sequences other than those already in listed in the vvttpprriinnttccaapp file, then you will also need to know what those sequences are. (Check your terminal's documenta- tion.) You also need (obviously) a printer and some sort of connection to the remote host. 22.. IInnssttaalllliinngg vvttpprriinntt 2.1. How do I install vvttpprriinntt?? If you are have administrative powers on your remote host, then please read the file IINNSSTTAALLLL included in the original source archive and follow the directions out- lined there. 2.2. What if I don't have root access on the remote host? If you don't have root access on the remote host, you can still install vvttpprriinntt. Instead of using the "make install" and "make install.man" options, use the options "make userinstall" and "make userinstall.man". This will place the necessary files in a suitable loca- tion for a user to use a private copy of vvttpprriinntt. 2.3. How do I set up my account to use vvttpprriinntt? If your system administrator installed a master copy of vvttpprriinntt, then it should be immediately available for use. However, if you installed a private copy, or your system administrator did not install it in a general location, you will need to change a few environmental variables. You should verify that vvttpprriinntt is on your PATH and that the man pages are locatable somewhere on your MANPATH. 19 June 1994 -4- If you installed a personal copy, you will also need to set the environmental variable VTPRINT to contain the string "-L _<_f_u_l_l _p_a_t_h _t_o _v_t_p_r_i_n_t_c_a_p_>". You may wish to add other options to the VTPRINT variable to set up a default operating mode for vvttpprriinntt. Please read the man page for details on what options are available. 33.. UUssiinngg vvttpprriinntt 3.1. What help is available for using vvttpprriinntt? Besides the FFAAQQ that you are reading now, there are a number of resources that can help you use vvttpprriinntt. First, there are the provided man pages (e.g. vvttpprriinntt..11). Also there is a brief synopsis available by typing "vtprint -h". Finally, you can subscribe to the vvttpprriinntt mailing list (where vvttpprriinntt topics are dis- cussed, and official announcements from the author are posted) by sending mail to "vtprint-request@sdsu.edu" with a line "subscribe" in the body of the message. Of course, you can still contact the author directly if you run into difficulties that these resources can't help you solve. 3.2. How do I print text files using vvttpprriinntt? Type "vtprint _<_f_i_l_e_l_i_s_t_>". There are also several options available. See the man page for details on the options. Alternatively, you can use vvttpprriinntt as the receiving end of a pipe. 3.3. How do I print binary files using vvttpprriinntt? vvttpprriinntt does not support printing of binary files. This is because vvttpprriinntt uses certain escape codes, and binary files may contain escape codes which will con- fuse vvttpprriinntt (and possibly your terminal emulator). 19 June 1994 -5- 3.4. What about PostScript? Because PostScript is just ASCII text, vvttpprriinntt can print PostScript to your printer. But it DOES NOT know how to perform conversion from regular text to PostScript, which means that if your printer is a PostScript only printer, you should set up some sort of filter to perform ASCII to PostScript conversion before piping it to vvttpprriinntt. For example, the following shell script might be used to send PostScript to a printer from a text file: #!/bin/sh while [ -n $1 ]; do { enscript $1 | vtprint; shift; } Some time in the _f_a_r future, vvttpprriinntt may have PostScript translation added to it if it is requested by sufficiently many people. 44.. UUssiinngg vvttpprriinntt wwiitthh ootthheerr UUNNIIXX--bbaasseedd pprrooggrraammss.. 4.1. How do I use vvttpprriinntt with eellmm? In eellmm, press "O" (for _O_p_t_i_o_n_s). Then press "P" (for _P_r_i_n_t _m_a_i_l _u_s_i_n_g). Now enter "vtprint _[_o_p_t_i_o_n_s_]". I've found that the option string "-cdq" works well for me. Finally, save your change by pressing ">". Now you can press "I" to return to the main mail index. Pressing "P" on the mail index screen will print the currently selected message using vvttpprriinntt. This may not work with very old versions of eellmm. It has worked find for me since about version 2.3 or so -- I haven't tried it with any older versions. 4.2. How do I use vvttpprriinntt with mmaaiill? I am not sure if this works for all mailers, but with the SunOS mmaaiill, if you use the command "| _[_m_e_s_s_a_g_e_- _l_i_s_t_] vtprint _[_o_p_t_i_o_n_s_]", the message will be piped to 19 June 1994 -6- vvttpprriinntt. This strategy (using pipe) works for a great many programs besides plain old mmaaiill. 4.3. How do I use vvttpprriinntt with ppiinnee? You do not need to use vvttpprriinntt with ppiinnee. The code for vvttpprriinntt is derived from code the author originally saw in ppiinnee! To use ppiinnee, select the "attached-to-ansi" printer option, and print away! 4.4. How do I use vvttpprriinntt with ttiinn? You need to edit the "~/.tin/.tinrc" file. There is a line that looks like: default_printer=_[_s_o_m_e_t_h_i_n_g_] You need merely change the value of _s_o_m_e_t_h_i_n_g to be "vtprint" along with any options you want to use. I've found that ttiinn is much more finnicky about the options used by vvttpprriinntt, so I use the "-cdq" options. Incidentally, vvttpprriinntt may not work with versions of ttiinn prior to 1.2pl2. The problem was a bug in ttiinn, and is fixed in more recent versions. 4.5. How do I set up program X to use vvttpprriinntt? I have listed above some of the more commonly used pro- grams. If your program isn't listed, and you think it should be, tell me! The general solution is to check out your program's documentation to see if the printer program it uses is configurable. If so, set it to "vtprint". You may need to use special options -- the options "-cd" will solve most problems for many people. If the printer program can't be changed, then see if you can use a pipe from your program. If so, just pipe the output you wish to print to vvttpprriinntt. 19 June 1994 -7- 55.. PPrroobblleemmss 5.1. It just doesn't work! Nothing is output by the printer, or the text appears on my screen but not on the printer. This is probably a problem with your communications package. In all likelihood, your communications pro- gram may not support required printer escape codes. Most MS-DOS and Windows packages do support these codes, but the author only knows of TWO Macintosh pro- grams and ONE Unix program that support vvttpprriinntt. A simple thing to do is try "vtprint " by itself. If you get output, then your terminal emulator will probably work with vvttpprriinntt. Read the file CCOOMMPPAATT for details about compatibility with various communications programs and terminals. Also, make sure that your printer is set up correctly. Try printing from a local program, and make sure that the default is printing device is set to your printer. (E.g. PRN: must be the same as the port your printer is on, under MS-DOS. 5.2. vvttpprriinntt prints a single line, but additional lines are starting at the wrong horizontal location, or aren't showing up at all! or Why can't I get anything past the first line or two to print correctly? You may not have CR/LF mapping set up correctly on your printer, comm package, host, or vvttpprriinntt. You can change the settings in any of these locations to fix it. Check out the "-c" and "-n" switches in the man pages. 5.3. Why aren't page breaks included between documents? Some terminal emulators don't handle formfeeds prop- erly. TTeelleemmaattee 44..1122 is known to eat them, and MMiiccrroo-- pphhoonnee IIII requires a setting change to fix this problem. 19 June 1994 -8- 5.4. Why does vvttpprriinntt fail on big documents? vvttpprriinntt may choke on some large documents if you are not using proper flow control settings. Normally, you should use "hardware" flow control, which is also some- times known as CTS/RTS flow control. The reason for this is that the printer may fall behind the serial line, and the local communications program needs to able to tell the host "wait for me to catch up with you before you give me any more data -- I've not got any room for it at the moment!") You could use "XON/XOFF" flow control, but this is discouraged as it may inter- fere with some other software packages which use CTRL-S and CTRL-Q for other functions (such as binary transfer protocols). 5.5. Why does vvttpprriinntt echo text (or some text) to the screen? Some communications programs or terminals may send a copy of the printed file to the screen as well as the program. This is legal in many cases, since many ter- minal standards don't define whether screen echoing when printing should be done or not. 19 June 1994 -i- TTaabbllee ooff CCoonntteennttss 1. AAbboouutt vvttpprriinntt 1.1. What is vvttpprriinntt? 1.2. Who writes/supports vvttpprriinntt? 1.3. Where do I get vvttpprriinntt? 1.4. What do I need to use vvttpprriinntt? 2. IInnssttaalllliinngg vvttpprriinntt 2.1. How do I install vvttpprriinntt?? 2.2. What if I don't have root access on the remote host? 2.3. How do I set up my account to use vvttpprriinntt? 3. UUssiinngg vvttpprriinntt 3.1. What help is available for using vvttpprriinntt? 3.2. How do I print text files using vvttpprriinntt? 3.3. How do I print binary files using vvttpprriinntt? 3.4. What about PostScript? 4. UUssiinngg vvttpprriinntt wwiitthh ootthheerr UUNNIIXX--bbaasseedd pprrooggrraammss.. 19 June 1994 -ii- 4.1. How do I use vvttpprriinntt with eellmm? 4.2. How do I use vvttpprriinntt with mmaaiill? 4.3. How do I use vvttpprriinntt with ppiinnee? 4.4. How do I use vvttpprriinntt with ttiinn? 4.5. How do I set up program X to use vvttpprriinntt? 5. PPrroobblleemmss 5.1. It just doesn't work! Nothing is output by the printer, or the text appears on my screen but not on the printer. 5.2. vvttpprriinntt prints a single line, but additional lines are starting at the wrong horizontal location, or aren't showing up at all! or Why can't I get any- thing past the first line or two to print cor- rectly? 5.3. Why aren't page breaks included between documents? 5.4. Why does vvttpprriinntt fail on big documents? 5.5. Why does vvttpprriinntt echo text (or some text) to the screen? 19 June 1994 ll for me. Finally, save your change by pressing ">". Now you can press "I" to return to the main mail index. Pressing "P" on the mail ivtprint-2.0.2/FAQ.macros 644 164 12 2634 5653371657 10111 .de FQT .pn 1 .P1 .pg@begin 1 i .bp .CD .ft B Table of Contents .DE .. .de FQ .nr FS \\$1 .if !\\n(.$ .nr FS 1 .if !\\n[FS] .nr FS 1 .nr F\\n(FS +1 .if !\\n(FS-4 .nr F5 0 .if !\\n(FS-3 .nr F4 0 .if !\\n(FS-2 .nr F3 0 .if !\\n(FS-1 .nr F2 0 .if !\\$1 .if \\n(.$ .nr F1 1 .if '\\$1'S' \{\ . nr FS \\n(.$-1 . nr F1 \\$2 . nr F2 \\$3 . nr F3 \\$4 . nr F4 \\$5 . nr F5 \\$6 .\} .ds SN \\n(F1. .if \\n(FS-1 .as SN \\n(F2. .if \\n(FS-2 .as SN \\n(F3. .if \\n(FS-3 .as SN \\n(F4. .if \\n(FS-4 .as SN \\n(F5. .nr SI 5 .if \\n(FS-1 .nr SI 10 .if \\n(FS-2 .nr SI 15 .if \\n(FS-3 .nr SI 20 .if \\n(FS-4 .nr SI 25 .ie '\\n(FS'1' \{\ . am FQT .sp .IP \\*(SN \\n(SI .B \\.. .\} .el \{\ .am FQT .IP \\*(SN \\n(SI \\.. .\} .. .de QH .FQ \\$1 .am FQT \\$2 .PP \\.. .br .ds SN .nr QS \\$1 .if !\\n(.$ .nr QS 1 .if !\\n[QS] .nr QS 1 .nr Q\\n(QS +1 .if !\\n(QS-4 .nr Q5 0 .if !\\n(QS-3 .nr Q4 0 .if !\\n(QS-2 .nr Q3 0 .if !\\n(QS-1 .nr Q2 0 .if !\\$1 .if \\n(.$ .nr Q1 1 .if '\\$1'S' \{\ . nr QS \\n(.$-1 . nr Q1 \\$2 . nr Q2 \\$3 . nr Q3 \\$4 . nr Q4 \\$5 . nr Q5 \\$6 .\} .ds SN \\n(Q1. .if \\n(QS-1 .as SN \\n(Q2. .if \\n(QS-2 .as SN \\n(Q3. .if \\n(QS-3 .as SN \\n(Q4. .if \\n(QS-4 .as SN \\n(Q5. .nr SI 5 .if \\n(QS-1 .nr SI 10 .if \\n(QS-2 .nr SI 15 .if \\n(QS-3 .nr SI 20 .if \\n(QS-4 .nr SI 25 .ie '\\n(QS'1' \{\ .sp .sp .LG .LG .IP \fB\\*(SN \fB\\$2\fR .SM .SM .PP .sp .\} .el \{\ .sp .IP \\*(SN \\$2 .sp .PP .\} .IP .. d, and you think it should be, tell me! The general solution is to check out your provtprint-2.0.2/FAQ.ms 644 164 12 25243 5653371657 7265 .TL The vtprint FAQ .AU Garrett D'Amore .AI San Diego State University .DA Version 0.9 June 19, 1994 .AB This document attempts to address some of the most common questions relating to the vtprint program. However, this document is still very much under development, so there may be significant omissions or errors. The author apologizes for any such errors or omissions, and kindly requests that the reader pass on any corrections or requests for clarification or more data to him. .AE .PP .so FAQ.macros .bp .QH 1 "About \fBvtprint\fP" .QH 2 "What is \fBvtprint\fP?" .B vtprint is a program that makes it possible to obtain seamless printing from a remote host to a printer at home without requiring a TCP/IP connection to the remote machine or root access on the remote machine. It will communicate over a serial line or a regular network connection. Other methods of connection may also be possible. .IP .B vtprint runs on the remote system (currently only UNIX-like systems are supported). Software on your local machine may vary considerably. .QH 2 "Who writes/supports \fBvtprint\fP?" The author of \fBvtprint\fP is Garrett D'Amore. He can be reached at . He is actively supporting \fBvtprint\fP users, and is working on new development with \fBvtprint\fP. .QH 2 "Where do I get \fBvtprint\fP?" The original source archive for \fBvtprint\fP is available via ftp. The current version (as of June 19, 1994) is 2.0 and can be found at ftp.sdsu.edu in \fB/pub/vtprint/\fP as a GNU \fBgzip\fP compressed tar archive (\fBvtprint-2.0.tar.gz\fP). Currently, only a source distribution is being made available. Also, users without ftp capabability should contact the author to make author arrangements. .QH 2 "What do I need to use \fBvtprint\fP?" Well, to compile and install it, you need an ANSI C compiler. (If your site has it installed already, you don't need to worry about this.) .IP To use it, you need a terminal (or terminal emulator) that supports printer control escape sequences. If you have a terminal or emulator that supports escape sequences other than those already in listed in the \fBvtprintcap\fP file, then you will also need to know what those sequences are. (Check your terminal's documentation.) .IP You also need (obviously) a printer and some sort of connection to the remote host. .QH 1 "Installing \fBvtprint\fP" .QH 2 "How do I install \fBvtprint?\fP" If you are have administrative powers on your remote host, then please read the file \fBINSTALL\fP included in the original source archive and follow the directions outlined there. .QH 2 "What if I don't have root access on the remote host?" If you don't have root access on the remote host, you can still install \fBvtprint\fP. Instead of using the "make install" and "make install.man" options, use the options "make userinstall" and "make userinstall.man". This will place the necessary files in a suitable location for a user to use a private copy of \fBvtprint\fP. .QH 2 "How do I set up my account to use \fBvtprint\fP?" If your system administrator installed a master copy of \fBvtprint\fP, then it should be immediately available for use. However, if you installed a private copy, or your system administrator did not install it in a general location, you will need to change a few environmental variables. .IP You should verify that \fBvtprint\fP is on your PATH and that the man pages are locatable somewhere on your MANPATH. If you installed a personal copy, you will also need to set the environmental variable VTPRINT to contain the string "-L \fI\fP". You may wish to add other options to the VTPRINT variable to set up a default operating mode for \fBvtprint\fP. Please read the man page for details on what options are available. .QH 1 "Using \fBvtprint\fP" .QH 2 "What help is available for using \fBvtprint\fP?" Besides the \fBFAQ\fP that you are reading now, there are a number of resources that can help you use \fBvtprint\fP. First, there are the provided man pages (e.g. \fBvtprint.1\fP). Also there is a brief synopsis available by typing "vtprint -h". Finally, you can subscribe to the \fBvtprint\fP mailing list (where \fBvtprint\fP topics are discussed, and official announcements from the author are posted) by sending mail to "vtprint-request@sdsu.edu" with a line "subscribe" in the body of the message. .IP Of course, you can still contact the author directly if you run into difficulties that these resources can't help you solve. .QH 2 "How do I print text files using \fBvtprint\fP?" Type "vtprint \fI\fP". There are also several options available. See the man page for details on the options. Alternatively, you can use \fBvtprint\fP as the receiving end of a pipe. .QH 2 "How do I print binary files using \fBvtprint\fP?" \fBvtprint\fP does not support printing of binary files. This is because \fBvtprint\fP uses certain escape codes, and binary files may contain escape codes which will confuse \fBvtprint\fP (and possibly your terminal emulator). .QH 2 "What about PostScript?" Because PostScript is just ASCII text, \fBvtprint\fP can print PostScript to your printer. But it DOES NOT know how to perform conversion from regular text to PostScript, which means that if your printer is a PostScript only printer, you should set up some sort of filter to perform ASCII to PostScript conversion before piping it to \fBvtprint\fP. For example, the following shell script might be used to send PostScript to a printer from a text file: .ID #!/bin/sh .br while [ -n $1 ]; do { enscript $1 | vtprint; shift; } .DE .IP Some time in the \fIfar\fP future, \fBvtprint\fP may have PostScript translation added to it if it is requested by sufficiently many people. .QH 1 "Using \fBvtprint\fP with other UNIX-based programs." .QH 2 "How do I use \fBvtprint\fP with \fBelm\fP?" In \fBelm\fP, press "O" (for \fIOptions\fP). Then press "P" (for \fIPrint mail using\fP). Now enter "vtprint \fI[options]\fP". I've found that the option string "-cdq" works well for me. Finally, save your change by pressing ">". Now you can press "I" to return to the main mail index. Pressing "P" on the mail index screen will print the currently selected message using \fBvtprint\fP. .IP This may not work with very old versions of \fBelm\fP. It has worked find for me since about version 2.3 or so -- I haven't tried it with any older versions. .QH 2 "How do I use \fBvtprint\fP with \fBmail\fP?" I am not sure if this works for all mailers, but with the SunOS \fBmail\fP, if you use the command "| \fI[message-list]\fP vtprint \fI[options]\fP", the message will be piped to \fBvtprint\fP. This strategy (using pipe) works for a great many programs besides plain old \fBmail\fP. .QH 2 "How do I use \fBvtprint\fP with \fBpine\fP?" You do not need to use \fBvtprint\fP with \fBpine\fP. The code for \fBvtprint\fP is derived from code the author originally saw in \fBpine\fP! To use \fBpine\fP, select the "attached-to-ansi" printer option, and print away! .QH 2 "How do I use \fBvtprint\fP with \fBtin\fP?" You need to edit the "~/.tin/.tinrc" file. There is a line that looks like: .ID default_printer=\fI[something]\fP .DE You need merely change the value of \fIsomething\fP to be "vtprint" along with any options you want to use. I've found that \fBtin\fP is much more finnicky about the options used by \fBvtprint\fP, so I use the "-cdq" options. .IP Incidentally, \fBvtprint\fP may not work with versions of \fBtin\fP prior to 1.2pl2. The problem was a bug in \fBtin\fP, and is fixed in more recent versions. .QH 2 "How do I set up program X to use \fBvtprint\fP?" I have listed above some of the more commonly used programs. If your program isn't listed, and you think it should be, tell me! .IP The general solution is to check out your program's documentation to see if the printer program it uses is configurable. If so, set it to "vtprint". You may need to use special options \-\- the options "-cd" will solve most problems for many people. .IP If the printer program can't be changed, then see if you can use a pipe from your program. If so, just pipe the output you wish to print to \fBvtprint\fP. .QH 1 Problems .QH 2 "It just doesn't work! Nothing is output by the printer, or the \ text appears on my screen but not on the printer." This is probably a problem with your communications package. In all likelihood, your communications program may not support required printer escape codes. Most MS-DOS and Windows packages do support these codes, but the author only knows of TWO Macintosh programs and ONE Unix program that support \fBvtprint\fP. A simple thing to do is try "vtprint " by itself. If you get output, then your terminal emulator will probably work with \fBvtprint\fP. .IP Read the file \fBCOMPAT\fP for details about compatibility with various communications programs and terminals. .IP Also, make sure that your printer is set up correctly. Try printing from a local program, and make sure that the default is printing device is set to your printer. (E.g. PRN: must be the same as the port your printer is on, under MS-DOS. .QH 2 "\fBvtprint\fP prints a single line, but additional lines are starting \ at the wrong horizontal location, or aren't showing up at all! or Why \ can't I get anything past the first line or two to print correctly?" You may not have CR/LF mapping set up correctly on your printer, comm package, host, or \fBvtprint\fP. You can change the settings in any of these locations to fix it. .IP Check out the "-c" and "-n" switches in the man pages. .QH 2 "Why aren't page breaks included between documents?" Some terminal emulators don't handle formfeeds properly. \fBTelemate 4.12\fP is known to eat them, and \fBMicrophone II\fP requires a setting change to fix this problem. .QH 2 "Why does \fBvtprint\fP fail on big documents?" \fBvtprint\fP may choke on some large documents if you are not using proper flow control settings. Normally, you should use "hardware" flow control, which is also sometimes known as CTS/RTS flow control. The reason for this is that the printer may fall behind the serial line, and the local communications program needs to able to tell the host "wait for me to catch up with you before you give me any more data -- I've not got any room for it at the moment!") You could use "XON/XOFF" flow control, but this is discouraged as it may interfere with some other software packages which use CTRL-S and CTRL-Q for other functions (such as binary transfer protocols). .QH 2 "Why does \fBvtprint\fP echo text (or some text) to the screen?" Some communications programs or terminals may send a copy of the printed file to the screen as well as the program. This is legal in many cases, since many terminal standards don't define whether screen echoing when printing should be done or not. .FQT eiving end of a pipe. .QH 2 "How do I print binary files using \fBvtprint\fP?" \fBvtprint\fP does not support printing of binary files. This is because \fBvtprint\fP uses certain escape codes, and binary files may contain escape codes which will confuse \fBvtprint\fP (and possibly your terminal emulator). .QH 2 "What about PostScript?" Because Posvtprint-2.0.2/FAQ.ps 644 164 12 67537 5653371657 7304 %!PS-Adobe-3.0 %%Creator: groff version 1.09 %%CreationDate: Sun Jun 19 21:52:15 1994 %%DocumentNeededResources: font Times-Bold %%+ font Times-Italic %%+ font Times-Roman %%DocumentSuppliedResources: procset grops 1.09 0 %%Pages: 6 %%PageOrder: Ascend %%Orientation: Portrait %%EndComments %%BeginProlog %%BeginResource: procset grops 1.09 0 /setpacking where{ pop currentpacking true setpacking }if /grops 120 dict dup begin /SC 32 def /A/show load def /B{0 SC 3 -1 roll widthshow}bind def /C{0 exch ashow}bind def /D{0 exch 0 SC 5 2 roll awidthshow}bind def /E{0 rmoveto show}bind def /F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def /G{0 rmoveto 0 exch ashow}bind def /H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /I{0 exch rmoveto show}bind def /J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def /K{0 exch rmoveto 0 exch ashow}bind def /L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /M{rmoveto show}bind def /N{rmoveto 0 SC 3 -1 roll widthshow}bind def /O{rmoveto 0 exch ashow}bind def /P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /Q{moveto show}bind def /R{moveto 0 SC 3 -1 roll widthshow}bind def /S{moveto 0 exch ashow}bind def /T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def /SF{ findfont exch [exch dup 0 exch 0 exch neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /MF{ findfont [5 2 roll 0 3 1 roll neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /level0 0 def /RES 0 def /PL 0 def /LS 0 def /PLG{ gsave newpath clippath pathbbox grestore exch pop add exch pop }bind def /BP{ /level0 save def 1 setlinecap 1 setlinejoin 72 RES div dup scale LS{ 90 rotate }{ 0 PL translate }ifelse 1 -1 scale }bind def /EP{ level0 restore showpage }bind def /DA{ newpath arcn stroke }bind def /SN{ transform .25 sub exch .25 sub exch round .25 add exch round .25 add exch itransform }bind def /DL{ SN moveto SN lineto stroke }bind def /DC{ newpath 0 360 arc closepath }bind def /TM matrix def /DE{ TM currentmatrix pop translate scale newpath 0 0 .5 0 360 arc closepath TM setmatrix }bind def /RC/rcurveto load def /RL/rlineto load def /ST/stroke load def /MT/moveto load def /CL/closepath load def /FL{ currentgray exch setgray fill setgray }bind def /BL/fill load def /LW/setlinewidth load def /RE{ findfont dup maxlength 1 index/FontName known not{1 add}if dict begin { 1 index/FID ne{def}{pop pop}ifelse }forall /Encoding exch def dup/FontName exch def currentdict end definefont pop }bind def /DEFS 0 def /EBEGIN{ moveto DEFS begin }bind def /EEND/end load def /CNT 0 def /level1 0 def /PBEGIN{ /level1 save def translate div 3 1 roll div exch scale neg exch neg exch translate 0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit []0 setdash /setstrokeadjust where{ pop false setstrokeadjust }if /setoverprint where{ pop false setoverprint }if newpath /CNT countdictstack def userdict begin /showpage{}def }bind def /PEND{ clear countdictstack CNT sub{end}repeat level1 restore }bind def end def /setpacking where{ pop setpacking }if %%EndResource %%IncludeResource: font Times-Bold %%IncludeResource: font Times-Italic %%IncludeResource: font Times-Roman grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron /scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent /ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen /period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon /semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O /P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex /underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y /z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft /guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl /endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut /dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash /quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen /brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft /logicalnot/minus/registered/macron/degree/plusminus/twosuperior /threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior /ordmasculine/guilsinglright/onequarter/onehalf/threequarters /questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE /Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn /germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla /egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis /eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash /ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def /Times-Roman@0 ENC0/Times-Roman RE/Times-Italic@0 ENC0/Times-Italic RE /Times-Bold@0 ENC0/Times-Bold RE %%EndProlog %%Page: 1 1 %%BeginPageSetup BP %%EndPageSetup /F0 12/Times-Bold@0 SF(The vtprint F)245.142 123 Q -.54(AQ)-1.08 G/F1 10 /Times-Italic@0 SF(Garr)253.515 147 Q(ett D'Amor)-.37 E(e)-.37 E()-.37 E/F2 10/Times-Roman@0 SF (San Die)233.695 177 Q(go State Uni)-.15 E -.15(ve)-.25 G(rsity).15 E -1.11(Ve)265.225 189 S(rsion 0.9)1.11 E(June 19, 1994)260.085 201 Q F1 (ABSTRA)264.535 237 Q(CT)-.3 E F2 .325(This document attempts to addres\ s some of the most common questions relating to)133 264.6 R 1.108 (the vtprint program.)108 276.6 R(Ho)6.108 E(we)-.25 E -.15(ve)-.25 G 1.908 -.4(r, t).15 H 1.108(his document is still v).4 F 1.109 (ery much under de)-.15 F -.15(ve)-.25 G 1.109(lopment, so).15 F .016 (there may be signi\214cant omissions or errors.)108 288.6 R .016 (The author apologizes for an)5.016 F 2.515(ys)-.15 G .015 (uch errors or)-2.515 F .05 (omissions, and kindly requests that the reader pass on an)108 300.6 R 2.55(yc)-.15 G .05(orrections or requests for clar)-2.55 F(-)-.2 E (i\214cation or more data to him.)108 312.6 Q(19 June 1994)261.335 768 Q EP %%Page: 2 2 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(-2-)282.17 48 Q/F1 10/Times-Bold@0 SF 15 (1. About)72 84 R(vtprint)2.5 E F0 7.5(1.1. What)72 130.8 R(is)2.5 E F1 (vtprint)2.5 E F0(?)A F1(vtprint)97 162 Q F0 .057(is a program that mak) 2.557 F .057(es it possible to obtain seamless printing from a remote h\ ost to a printer)-.1 F .649(at home without requiring a TCP/IP connecti\ on to the remote machine or root access on the remote)97 174 R 3.102 (machine. It)97 186 R .602(will communicate o)3.102 F -.15(ve)-.15 G 3.102(ra).15 G .601(serial line or a re)-.001 F .601(gular netw)-.15 F .601(ork connection.)-.1 F .601(Other methods of)5.601 F (connection may also be possible.)97 198 Q F1(vtprint)97 213.6 Q F0 .879 (runs on the remote system \(currently only UNIX-lik)3.379 F 3.379(es) -.1 G .879(ystems are supported\).)-3.379 F(Softw)5.88 E .88(are on)-.1 F(your local machine may v)97 225.6 Q(ary considerably)-.25 E(.)-.65 E 7.5(1.2. Who)72 253.2 R(writes/supports)2.5 E F1(vtprint)2.5 E F0(?)A .04(The author of)97 284.4 R F1(vtprint)2.54 E F0 .04 (is Garrett D'Amore.)2.54 F .04(He can be reached at . He)-.05 F(is)2.54 E(acti)97 296.4 Q -.15(ve) -.25 G(ly supporting).15 E F1(vtprint)2.5 E F0(users, and is w)2.5 E (orking on ne)-.1 E 2.5(wd)-.25 G -2.15 -.25(ev e)-2.5 H(lopment with) .25 E F1(vtprint)2.5 E F0(.)A 7.5(1.3. Where)72 324 R(do I get)2.5 E F1 (vtprint)2.5 E F0(?)A .181(The original source archi)97 355.2 R .481 -.15(ve f)-.25 H(or).15 E F1(vtprint)2.682 E F0 .182(is a)2.682 F -.25 (va)-.2 G .182(ilable via ftp.).25 F .182(The current v)5.182 F .182 (ersion \(as of June 19, 1994\))-.15 F 1.837 (is 2.0 and can be found at ftp.sdsu.edu in)97 367.2 R F1(/pub/vtprint/) 4.337 E F0 1.837(as a GNU)4.337 F F1(gzip)4.337 E F0 1.836 (compressed tar archi)4.337 F -.15(ve)-.25 G(\()97 379.2 Q F1 (vtprint-2.0.tar)A(.gz)-1 E F0 2.885(\). Currently)B 2.885(,o)-.65 G .386(nly a source distrib)-2.885 F .386(ution is being made a)-.2 F -.25 (va)-.2 G 2.886(ilable. Also,).25 F .386(users with-)2.886 F (out ftp capabability should contact the author to mak)97 391.2 Q 2.5 (ea)-.1 G(uthor arrangements.)-2.5 E 7.5(1.4. What)72 418.8 R (do I need to use)2.5 E F1(vtprint)2.5 E F0(?)A -.8(We)97 450 S .796 (ll, to compile and install it, you need an ANSI C compiler).8 F 5.795 (.\()-.55 G .795(If your site has it installed already)-5.795 F(,)-.65 E (you don')97 462 Q 2.5(tn)-.18 G(eed to w)-2.5 E(orry about this.\))-.1 E 2.18 -.8(To u)97 477.6 T .581(se it, you need a terminal \(or termina\ l emulator\) that supports printer control escape sequences.).8 F .062 (If you ha)97 489.6 R .362 -.15(ve a t)-.2 H .061(erminal or emulator t\ hat supports escape sequences other than those already in listed in).15 F(the)97 501.6 Q F1(vtprintcap)3.251 E F0 .752 (\214le, then you will also need to kno)3.251 F 3.252(ww)-.25 G .752 (hat those sequences are.)-3.252 F .752(\(Check your termi-)5.752 F (nal')97 513.6 Q 2.5(sd)-.55 G(ocumentation.\))-2.5 E -1.1(Yo)97 529.2 S 2.5(ua)1.1 G(lso need \(ob)-2.5 E (viously\) a printer and some sort of connection to the remote host.) -.15 E F1 15(2. Installing)72 568.8 R(vtprint)2.5 E F0 7.5(2.1. Ho)72 615.6 R 2.5(wd)-.25 G 2.5(oIi)-2.5 G(nstall)-2.5 E F1(vtprint?)2.5 E F0 1.931(If you are ha)97 646.8 R 2.231 -.15(ve a)-.2 H(dministrati).15 E 2.231 -.15(ve p)-.25 H -.25(ow).15 G 1.931 (ers on your remote host, then please read the \214le).25 F F1(INST)4.43 E(ALL)-.9 E F0(included in the original source archi)97 658.8 Q .3 -.15 (ve a)-.25 H(nd follo).15 E 2.5(wt)-.25 G(he directions outlined there.) -2.5 E 7.5(2.2. What)72 686.4 R(if I don')2.5 E 2.5(th)-.18 G -2.25 -.2 (av e)-2.5 H(root access on the remote host?)2.7 E .729(If you don')97 717.6 R 3.229(th)-.18 G -2.25 -.2(av e)-3.229 H .729 (root access on the remote host, you can still install)3.429 F F1 (vtprint)3.23 E F0 8.23(.I)C .73(nstead of using the)-8.23 F("mak)97 729.6 Q 5.554(ei)-.1 G 3.054(nstall" and "mak)-5.554 F 5.554(ei)-.1 G 3.053(nstall.man" options, use the options "mak)-5.554 F 5.553(eu)-.1 G 3.053(serinstall" and "mak)-5.553 F(e)-.1 E(19 June 1994)261.335 768 Q EP %%Page: 3 3 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(-3-)282.17 48 Q 3.162(userinstall.man". This)97 84 R .662(will place the necessary \214les in a suitable location for a\ user to use a pri)3.162 F -.25(va)-.25 G(te).25 E(cop)97 96 Q 2.5(yo) -.1 G(f)-2.5 E/F1 10/Times-Bold@0 SF(vtprint)2.5 E F0(.)A 7.5(2.3. Ho)72 123.6 R 2.5(wd)-.25 G 2.5(oIs)-2.5 G(et up my account to use)-2.5 E F1 (vtprint)2.5 E F0(?)A .469 (If your system administrator installed a master cop)97 154.8 R 2.969 (yo)-.1 G(f)-2.969 E F1(vtprint)2.969 E F0 2.969(,t)C .468 (hen it should be immediately a)-2.969 F -.25(va)-.2 G(il-).25 E .5 (able for use.)97 166.8 R(Ho)5.5 E(we)-.25 E -.15(ve)-.25 G 1.3 -.4 (r, i).15 H 3(fy).4 G .5(ou installed a pri)-3 F -.25(va)-.25 G .501 (te cop).25 F 1.801 -.65(y, o)-.1 H 3.001(ry).65 G .501 (our system administrator did not install it)-3.001 F (in a general location, you will need to change a fe)97 178.8 Q 2.5(we) -.25 G -.4(nv)-2.5 G(ironmental v).4 E(ariables.)-.25 E -1.1(Yo)97 194.4 S 3.009(us)1.1 G .509(hould v)-3.009 F .509(erify that)-.15 F F1 (vtprint)3.009 E F0 .509(is on your P)3.009 F -1.11(AT)-.92 G 3.009(Ha) 1.11 G .509(nd that the man pages are locatable some)-3.009 F .508 (where on)-.25 F .533(your MANP)97 206.4 R -1.11(AT)-.92 G 3.033(H. If) 1.11 F .534(you installed a personal cop)3.033 F 1.834 -.65(y, y)-.1 H .534(ou will also need to set the en).65 F .534(vironmental v)-.4 F (ari-)-.25 E 1.55(able VTPRINT to contain the string "-L)97 218.4 R/F2 10/Times-Italic@0 SF 1.549()4.049 F F0 4.049 (". Y)B 1.549(ou may wish to add other)-1.1 F .06 (options to the VTPRINT v)97 230.4 R .06(ariable to set up a def)-.25 F .06(ault operating mode for)-.1 F F1(vtprint)2.56 E F0 5.06(.P)C .06 (lease read the man)-5.06 F(page for details on what options are a)97 242.4 Q -.25(va)-.2 G(ilable.).25 E F1 15(3. Using)72 282 R(vtprint)2.5 E F0 7.5(3.1. What)72 328.8 R(help is a)2.5 E -.25(va)-.2 G (ilable for using).25 E F1(vtprint)2.5 E F0(?)A 1.122(Besides the)97 360 R F1 -1.15 -.9(FA Q)3.622 H F0 1.121(that you are reading no)4.521 F 2.421 -.65(w, t)-.25 H 1.121 (here are a number of resources that can help you use).65 F F1(vtprint) 97 372 Q F0 5.131(.F)C .132(irst, there are the pro)-5.131 F .132 (vided man pages \(e.g.)-.15 F F1(vtprint.1)2.632 E F0 2.632(\). Also)B .132(there is a brief synopsis a)2.632 F -.25(va)-.2 G(il-).25 E .195 (able by typing "vtprint -h".)97 384 R(Finally)5.195 E 2.695(,y)-.65 G .195(ou can subscribe to the)-2.695 F F1(vtprint)2.695 E F0 .195 (mailing list \(where)2.695 F F1(vtprint)2.695 E F0(top-)2.695 E .067 (ics are discussed, and of)97 396 R .067(\214cial announcements from th\ e author are posted\) by sending mail to "vtprint-)-.25 F (request@sdsu.edu" with a line "subscribe" in the body of the message.) 97 408 Q 1.308(Of course, you can still contact the author directly if \ you run into dif)97 423.6 R 1.307(\214culties that these resources)-.25 F(can')97 435.6 Q 2.5(th)-.18 G(elp you solv)-2.5 E(e.)-.15 E 7.5 (3.2. Ho)72 463.2 R 2.5(wd)-.25 G 2.5(oIp)-2.5 G(rint te)-2.5 E (xt \214les using)-.15 E F1(vtprint)2.5 E F0(?)A -.8(Ty)97 494.4 S .785 (pe "vtprint).8 F F2(<\214lelist>)3.285 E F0 3.285(". There)B .785 (are also se)3.285 F -.15(ve)-.25 G .785(ral options a).15 F -.25(va)-.2 G 3.285(ilable. See).25 F .786(the man page for details on)3.285 F (the options.)97 506.4 Q(Alternati)5 E -.15(ve)-.25 G(ly).15 E 2.5(,y) -.65 G(ou can use)-2.5 E F1(vtprint)2.5 E F0(as the recei)2.5 E (ving end of a pipe.)-.25 E 7.5(3.3. Ho)72 534 R 2.5(wd)-.25 G 2.5(oIp) -2.5 G(rint binary \214les using)-2.5 E F1(vtprint)2.5 E F0(?)A F1 (vtprint)97 565.2 Q F0 .582 (does not support printing of binary \214les.)3.082 F .581 (This is because)5.581 F F1(vtprint)3.081 E F0 .581 (uses certain escape codes,)3.081 F 1.099 (and binary \214les may contain escape codes which will confuse)97 577.2 R F1(vtprint)3.599 E F0 1.1(\(and possibly your terminal)3.6 F (emulator\).)97 589.2 Q 7.5(3.4. What)72 616.8 R(about PostScript?)2.5 E .194(Because PostScript is just ASCII te)97 648 R(xt,)-.15 E F1(vtprint) 2.694 E F0 .194(can print PostScript to your printer)2.694 F 2.693(.B) -.55 G .193(ut it DOES NO)-2.693 F(T)-.4 E(kno)97 660 Q 2.569(wh)-.25 G .569 -.25(ow t)-2.569 H 2.569(op).25 G .069(erform con)-2.569 F -.15(ve) -.4 G .069(rsion from re).15 F .069(gular te)-.15 F .07 (xt to PostScript, which means that if your printer is a)-.15 F .528 (PostScript only printer)97 672 R 3.028(,y)-.4 G .527(ou should set up \ some sort of \214lter to perform ASCII to PostScript con)-3.028 F -.15 (ve)-.4 G -.2(r-).15 G 2.139(sion before piping it to)97 684 R F1 (vtprint)4.639 E F0 4.639(.F)C 2.139(or e)-4.789 F 2.139 (xample, the follo)-.15 F 2.14(wing shell script might be used to send) -.25 F(PostScript to a printer from a te)97 696 Q(xt \214le:)-.15 E (#!/bin/sh)133 714 Q (while [ -n $1 ]; do { enscript $1 | vtprint; shift; })133 726 Q (19 June 1994)261.335 768 Q EP %%Page: 4 4 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(-4-)282.17 48 Q .579(Some time in the)97 84 R/F1 10/Times-Italic@0 SF(far)3.079 E F0(future,)3.079 E/F2 10/Times-Bold@0 SF(vtprint)3.079 E F0 .579(may ha)3.079 F .879 -.15(ve P)-.2 H .579 (ostScript translation added to it if it is requested by).15 F(suf)97 96 Q(\214ciently man)-.25 E 2.5(yp)-.15 G(eople.)-2.5 E F2 15(4. Using)72 135.6 R(vtprint with other UNIX-based pr)2.5 E(ograms.)-.18 E F0 7.5 (4.1. Ho)72 182.4 R 2.5(wd)-.25 G 2.5(oIu)-2.5 G(se)-2.5 E F2(vtprint) 2.5 E F0(with)2.5 E F2(elm)2.5 E F0(?)A(In)97 213.6 Q F2(elm)5.441 E F0 5.441(,p)C 2.941(ress "O" \(for)-5.441 F F1(Options)5.441 E F0 5.441 (\). Then)B 2.941(press "P" \(for)5.441 F F1 2.942(Print mail using) 5.441 F F0 5.442(\). No)B 5.442(we)-.25 G 2.942(nter "vtprint)-5.442 F F1([options])97 225.6 Q F0 2.858(". I')B .658 -.15(ve f)-.5 H .358 (ound that the option string "-cdq" w).15 F .357(orks well for me.)-.1 F (Finally)5.357 E 2.857(,s)-.65 G -2.25 -.2(av e)-2.857 H .357 (your change by)3.057 F .056(pressing ">".)97 237.6 R(No)5.056 E 2.556 (wy)-.25 G .056(ou can press "I" to return to the main mail inde)-2.556 F 2.557(x. Pressing)-.15 F .057("P" on the mail inde)2.557 F(x)-.15 E (screen will print the currently selected message using)97 249.6 Q F2 (vtprint)2.5 E F0(.)A .411(This may not w)97 265.2 R .411(ork with v)-.1 F .411(ery old v)-.15 F .411(ersions of)-.15 F F2(elm)2.911 E F0 5.411 (.I)C 2.91(th)-5.411 G .41(as w)-2.91 F(ork)-.1 E .41 (ed \214nd for me since about v)-.1 F .41(ersion 2.3)-.15 F (or so -- I ha)97 277.2 Q -.15(ve)-.2 G(n').15 E 2.5(tt)-.18 G (ried it with an)-2.5 E 2.5(yo)-.15 G(lder v)-2.5 E(ersions.)-.15 E 7.5 (4.2. Ho)72 304.8 R 2.5(wd)-.25 G 2.5(oIu)-2.5 G(se)-2.5 E F2(vtprint) 2.5 E F0(with)2.5 E F2(mail)2.5 E F0(?)A 2.678(Ia)97 336 S 2.678(mn) -2.678 G .178(ot sure if this w)-2.678 F .178(orks for all mailers, b) -.1 F .179(ut with the SunOS)-.2 F F2(mail)2.679 E F0 2.679(,i)C 2.679 (fy)-2.679 G .179(ou use the command "|)-2.679 F F1([mes-)2.679 E(sa)97 348 Q -.1(ge)-.1 G(-list]).1 E F0(vtprint)3.119 E F1([options])3.119 E F0 .619(", the message will be piped to)B F2(vtprint)3.118 E F0 5.618 (.T)C .618(his strate)-5.618 F .618(gy \(using pipe\) w)-.15 F(orks)-.1 E(for a great man)97 360 Q 2.5(yp)-.15 G(rograms besides plain old)-2.5 E F2(mail)2.5 E F0(.)A 7.5(4.3. Ho)72 387.6 R 2.5(wd)-.25 G 2.5(oIu)-2.5 G(se)-2.5 E F2(vtprint)2.5 E F0(with)2.5 E F2(pine)2.5 E F0(?)A -1.1(Yo) 97 418.8 S 2.584(ud)1.1 G 2.584(on)-2.584 G .084(ot need to use)-2.584 F F2(vtprint)2.585 E F0(with)2.585 E F2(pine)2.585 E F0 5.085(.T)C .085 (he code for)-5.085 F F2(vtprint)2.585 E F0 .085(is deri)2.585 F -.15 (ve)-.25 G 2.585(df).15 G .085(rom code the author orig-)-2.585 F (inally sa)97 430.8 Q 2.5(wi)-.15 G(n)-2.5 E F2(pine)2.5 E F0 5(!T)C 2.5 (ou)-5.8 G(se)-2.5 E F2(pine)2.5 E F0 2.5(,s)C (elect the "attached-to-ansi" printer option, and print a)-2.5 E -.1(wa) -.15 G(y!).1 E 7.5(4.4. Ho)72 458.4 R 2.5(wd)-.25 G 2.5(oIu)-2.5 G(se) -2.5 E F2(vtprint)2.5 E F0(with)2.5 E F2(tin)2.5 E F0(?)A -1.1(Yo)97 489.6 S 2.5(un)1.1 G(eed to edit the "~/.tin/.tinrc" \214le.)-2.5 E (There is a line that looks lik)5 E(e:)-.1 E(def)133 507.6 Q (ault_printer=)-.1 E F1([something])A F0 -1.1(Yo)97 525.6 S 3.232(un)1.1 G .732(eed merely change the v)-3.232 F .731(alue of)-.25 F F1 (something)3.231 E F0 .731(to be "vtprint" along with an)3.231 F 3.231 (yo)-.15 G .731(ptions you w)-3.231 F .731(ant to)-.1 F 2.775(use. I')97 537.6 R .575 -.15(ve f)-.5 H .275(ound that).15 F F2(tin)2.775 E F0 .275 (is much more \214nnick)2.775 F 2.775(ya)-.15 G .275 (bout the options used by)-2.775 F F2(vtprint)2.775 E F0 2.776(,s)C 2.776(oIu)-2.776 G .276(se the "-cdq")-2.776 F(options.)97 549.6 Q (Incidentally)97 565.2 Q(,)-.65 E F2(vtprint)3.36 E F0 .86(may not w) 3.36 F .86(ork with v)-.1 F .86(ersions of)-.15 F F2(tin)3.36 E F0 .86 (prior to 1.2pl2.)3.36 F .86(The problem w)5.86 F .86(as a b)-.1 F .86 (ug in)-.2 F F2(tin)97 577.2 Q F0 2.5(,a)C(nd is \214x)-2.5 E (ed in more recent v)-.15 E(ersions.)-.15 E 7.5(4.5. Ho)72 604.8 R 2.5 (wd)-.25 G 2.5(oIs)-2.5 G(et up program X to use)-2.5 E F2(vtprint)2.5 E F0(?)A 2.571(Ih)97 636 S -2.25 -.2(av e)-2.571 H .071(listed abo)2.771 F .371 -.15(ve s)-.15 H .072(ome of the more commonly used programs.).15 F .072(If your program isn')5.072 F 2.572(tl)-.18 G .072(isted, and you) -2.572 F(think it should be, tell me!)97 648 Q .997 (The general solution is to check out your program')97 663.6 R 3.496(sd) -.55 G .996(ocumentation to see if the printer program it)-3.496 F .96 (uses is con\214gurable.)97 675.6 R .96(If so, set it to "vtprint".)5.96 F -1.1(Yo)5.961 G 3.461(um)1.1 G .961 (ay need to use special options \255\255 the options)-3.461 F ("-cd" will solv)97 687.6 Q 2.5(em)-.15 G(ost problems for man)-2.5 E 2.5(yp)-.15 G(eople.)-2.5 E .17(If the printer program can')97 703.2 R 2.67(tb)-.18 G 2.67(ec)-2.67 G .169 (hanged, then see if you can use a pipe from your program.)-2.67 F .169 (If so, just)5.169 F(pipe the output you wish to print to)97 715.2 Q F2 (vtprint)2.5 E F0(.)A(19 June 1994)261.335 768 Q EP %%Page: 5 5 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(-5-)282.17 48 Q/F1 10/Times-Bold@0 SF 15(5. Pr) 72 84 R(oblems)-.18 E F0 7.5(5.1. It)72 130.8 R .153(just doesn')2.653 F 2.653(tw)-.18 G 2.653(ork! Nothing)-2.753 F .153 (is output by the printer)2.653 F 2.653(,o)-.4 G 2.654(rt)-2.653 G .154 (he te)-2.654 F .154(xt appears on my screen b)-.15 F .154 (ut not on the)-.2 F(printer)97 142.8 Q(.)-.55 E .549 (This is probably a problem with your communications package.)97 174 R .549(In all lik)5.549 F .549(elihood, your communica-)-.1 F 1.084 (tions program may not support required printer escape codes.)97 186 R 1.085(Most MS-DOS and W)6.085 F(indo)-.4 E 1.085(ws pack-)-.25 F .215 (ages do support these codes, b)97 198 R .215(ut the author only kno)-.2 F .215(ws of TW)-.25 F 2.715(OM)-.1 G .215 (acintosh programs and ONE Unix)-2.715 F .69(program that support)97 210 R F1(vtprint)3.19 E F0 5.69(.A)C .69 (simple thing to do is try "vtprint " by itself.)-2.5 F .69 (If you get)5.69 F(output, then your terminal emulator will probably w) 97 222 Q(ork with)-.1 E F1(vtprint)2.5 E F0(.)A .84(Read the \214le)97 237.6 R F1(COMP)3.34 E -.95(AT)-.74 G F0 .84 (for details about compatibility with v)4.29 F .84 (arious communications programs and)-.25 F(terminals.)97 249.6 Q .927 (Also, mak)97 265.2 R 3.427(es)-.1 G .927 (ure that your printer is set up correctly)-3.427 F 5.928(.T)-.65 G .928 (ry printing from a local program, and mak)-6.278 F(e)-.1 E .314 (sure that the def)97 277.2 R .314(ault is printing de)-.1 F .314 (vice is set to your printer)-.25 F 5.313(.\()-.55 G .313 (E.g. PRN: must be the same as the port)-5.313 F (your printer is on, under MS-DOS.)97 289.2 Q(5.2.)72 316.8 Q F1 (vtprint)10 E F0 .186(prints a single line, b)2.686 F .186(ut additiona\ l lines are starting at the wrong horizontal location, or aren')-.2 F(t) -.18 E(sho)97 328.8 Q(wing up at all! or Wh)-.25 E 2.5(yc)-.05 G(an') -2.5 E 2.5(tIg)-.18 G(et an)-2.5 E(ything past the \214rst line or tw) -.15 E 2.5(ot)-.1 G 2.5(op)-2.5 G(rint correctly?)-2.5 E -1.1(Yo)97 360 S 2.848(um)1.1 G .348(ay not ha)-2.848 F .648 -.15(ve C)-.2 H .348 (R/LF mapping set up correctly on your printer).15 F 2.847(,c)-.4 G .347 (omm package, host, or)-2.847 F F1(vtprint)2.847 E F0(.)A -1.1(Yo)97 372 S 2.5(uc)1.1 G(an change the settings in an)-2.5 E 2.5(yo)-.15 G 2.5(ft) -2.5 G(hese locations to \214x it.)-2.5 E (Check out the "-c" and "-n" switches in the man pages.)97 387.6 Q 7.5 (5.3. Wh)72 415.2 R 2.5(ya)-.05 G(ren')-2.5 E 2.5(tp)-.18 G (age breaks included between documents?)-2.5 E .29 (Some terminal emulators don')97 446.4 R 2.79(th)-.18 G .29 (andle formfeeds properly)-2.79 F(.)-.65 E F1 -.92(Te)5.29 G .29 (lemate 4.12).92 F F0 .29(is kno)2.79 F .29(wn to eat them, and)-.25 F F1(Micr)97 458.4 Q(ophone II)-.18 E F0 (requires a setting change to \214x this problem.)2.5 E 7.5(5.4. Wh)72 486 R 2.5(yd)-.05 G(oes)-2.5 E F1(vtprint)2.5 E F0 -.1(fa)2.5 G (il on big documents?).1 E F1(vtprint)97 517.2 Q F0 .487(may chok)2.987 F 2.987(eo)-.1 G 2.987(ns)-2.987 G .486(ome lar)-2.987 F .486 (ge documents if you are not using proper \215o)-.18 F 2.986(wc)-.25 G .486(ontrol settings.)-2.986 F(Nor)5.486 E(-)-.2 E(mally)97 529.2 Q 3.718(,y)-.65 G 1.218(ou should use "hardw)-3.718 F 1.218(are" \215o)-.1 F 3.718(wc)-.25 G 1.219(ontrol, which is also sometimes kno)-3.718 F 1.219(wn as CTS/R)-.25 F 1.219(TS \215o)-.6 F(w)-.25 E 2.728 (control. The)97 541.2 R .228(reason for this is that the printer may f) 2.728 F .228(all behind the serial line, and the local communi-)-.1 F .59(cations program needs to able to tell the host "w)97 553.2 R .591 (ait for me to catch up with you before you gi)-.1 F .891 -.15(ve m)-.25 H(e).15 E(an)97 565.2 Q 3.467(ym)-.15 G .966(ore data -- I')-3.467 F 1.266 -.15(ve n)-.5 H .966(ot got an).15 F 3.466(yr)-.15 G .966 (oom for it at the moment!"\))-3.466 F -1.1(Yo)5.966 G 3.466(uc)1.1 G .966(ould use "XON/XOFF" \215o)-3.466 F(w)-.25 E 1.565(control, b)97 577.2 R 1.565 (ut this is discouraged as it may interfere with some other softw)-.2 F 1.566(are packages which use)-.1 F(CTRL-S and CTRL-Q for other function\ s \(such as binary transfer protocols\).)97 589.2 Q 7.5(5.5. Wh)72 616.8 R 2.5(yd)-.05 G(oes)-2.5 E F1(vtprint)2.5 E F0(echo te)2.5 E (xt \(or some te)-.15 E(xt\) to the screen?)-.15 E .013 (Some communications programs or terminals may send a cop)97 648 R 2.512 (yo)-.1 G 2.512(ft)-2.512 G .012 (he printed \214le to the screen as well)-2.512 F 1.442(as the program.) 97 660 R 1.442(This is le)6.442 F -.05(ga)-.15 G 3.942(li).05 G 3.942 (nm)-3.942 G(an)-3.942 E 3.942(yc)-.15 G 1.442(ases, since man)-3.942 F 3.942(yt)-.15 G 1.442(erminal standards don')-3.942 F 3.942(td)-.18 G 1.442(e\214ne whether)-3.942 F (screen echoing when printing should be done or not.)97 672 Q (19 June 1994)261.335 768 Q EP %%Page: 1 6 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(-i-)283.28 48 Q/F1 10/Times-Bold@0 SF -.92(Ta) 262.905 84 S(ble of Contents).92 E F0(1.)72 117.6 Q F1(About vtprint) 17.5 E F0 32.5(1.1. What)72 136.8 R(is)2.5 E F1(vtprint)2.5 E F0(?)A 32.5(1.2. Who)72 156 R(writes/supports)2.5 E F1(vtprint)2.5 E F0(?)A 32.5(1.3. Where)72 175.2 R(do I get)2.5 E F1(vtprint)2.5 E F0(?)A 32.5 (1.4. What)72 194.4 R(do I need to use)2.5 E F1(vtprint)2.5 E F0(?)A(2.) 72 225.6 Q F1(Installing vtprint)17.5 E F0 32.5(2.1. Ho)72 244.8 R 2.5 (wd)-.25 G 2.5(oIi)-2.5 G(nstall)-2.5 E F1(vtprint?)2.5 E F0 32.5 (2.2. What)72 264 R(if I don')2.5 E 2.5(th)-.18 G -2.25 -.2(av e)-2.5 H (root access on the remote host?)2.7 E 32.5(2.3. Ho)72 283.2 R 2.5(wd) -.25 G 2.5(oIs)-2.5 G(et up my account to use)-2.5 E F1(vtprint)2.5 E F0 (?)A(3.)72 314.4 Q F1(Using vtprint)17.5 E F0 32.5(3.1. What)72 333.6 R (help is a)2.5 E -.25(va)-.2 G(ilable for using).25 E F1(vtprint)2.5 E F0(?)A 32.5(3.2. Ho)72 352.8 R 2.5(wd)-.25 G 2.5(oIp)-2.5 G(rint te)-2.5 E(xt \214les using)-.15 E F1(vtprint)2.5 E F0(?)A 32.5(3.3. Ho)72 372 R 2.5(wd)-.25 G 2.5(oIp)-2.5 G(rint binary \214les using)-2.5 E F1 (vtprint)2.5 E F0(?)A 32.5(3.4. What)72 391.2 R(about PostScript?)2.5 E (4.)72 422.4 Q F1(Using vtprint with other UNIX-based pr)17.5 E(ograms.) -.18 E F0 32.5(4.1. Ho)72 441.6 R 2.5(wd)-.25 G 2.5(oIu)-2.5 G(se)-2.5 E F1(vtprint)2.5 E F0(with)2.5 E F1(elm)2.5 E F0(?)A 32.5(4.2. Ho)72 460.8 R 2.5(wd)-.25 G 2.5(oIu)-2.5 G(se)-2.5 E F1(vtprint)2.5 E F0(with)2.5 E F1(mail)2.5 E F0(?)A 32.5(4.3. Ho)72 480 R 2.5(wd)-.25 G 2.5(oIu)-2.5 G (se)-2.5 E F1(vtprint)2.5 E F0(with)2.5 E F1(pine)2.5 E F0(?)A 32.5 (4.4. Ho)72 499.2 R 2.5(wd)-.25 G 2.5(oIu)-2.5 G(se)-2.5 E F1(vtprint) 2.5 E F0(with)2.5 E F1(tin)2.5 E F0(?)A 32.5(4.5. Ho)72 518.4 R 2.5(wd) -.25 G 2.5(oIs)-2.5 G(et up program X to use)-2.5 E F1(vtprint)2.5 E F0 (?)A(5.)72 549.6 Q F1(Pr)17.5 E(oblems)-.18 E F0 32.5(5.1. It)72 568.8 R .294(just doesn')2.794 F 2.794(tw)-.18 G 2.794(ork! Nothing)-2.894 F .294(is output by the printer)2.794 F 2.794(,o)-.4 G 2.794(rt)-2.794 G .294(he te)-2.794 F .294(xt appears on my screen b)-.15 F .293(ut not) -.2 F(on the printer)122 580.8 Q(.)-.55 E(5.2.)72 600 Q F1(vtprint)35 E F0 .241(prints a single line, b)2.741 F .241 (ut additional lines are starting at the wrong horizontal location, or) -.2 F(aren')122 612 Q 2.525(ts)-.18 G(ho)-2.525 E .025 (wing up at all! or Wh)-.25 F 2.525(yc)-.05 G(an')-2.525 E 2.525(tIg) -.18 G .025(et an)-2.525 F .025(ything past the \214rst line or tw)-.15 F 2.524(ot)-.1 G 2.524(op)-2.524 G .024(rint correctly?)-2.524 F 32.5 (5.3. Wh)72 631.2 R 2.5(ya)-.05 G(ren')-2.5 E 2.5(tp)-.18 G (age breaks included between documents?)-2.5 E 32.5(5.4. Wh)72 650.4 R 2.5(yd)-.05 G(oes)-2.5 E F1(vtprint)2.5 E F0 -.1(fa)2.5 G (il on big documents?).1 E 32.5(5.5. Wh)72 669.6 R 2.5(yd)-.05 G(oes) -2.5 E F1(vtprint)2.5 E F0(echo te)2.5 E(xt \(or some te)-.15 E (xt\) to the screen?)-.15 E(19 June 1994)261.335 768 Q EP %%Trailer end %%EOF G(eople.)-2.5 E .17(If the printer program can')97 703.2 R 2.67(tb)-.18 G 2.67(ec)-2.67 G .169 (hanged, then see if you can use a pipe from your program.)-2.67 Fvtprint-2.0.2/INSTALL 644 164 12 5672 5653371660 7324 INSTALL -- Installation directions for vtprint 2.0 ======= I. What you need * an ANSI C compiler (vtprint won't compile without an ANSI C compiler, but "unprotoize" might solve this) * UNIX or similiar system with one of termios, termio, or sgtty * about 10 minutes of your time to install vtprint II. Before you compile * First, you'll need to edit the Makefile. There are a number options, but you'll probably only want/need to change a few of them. * If your system uses something other than /dev/tty as the tty device, change DEVTTY and SEDDEVTTY. (SED* defines are used only in building the man pages.) * If you want to place the vtprintcap file somewhere other than /usr/local/lib/vtprint/vtprintcap, please change the LIBFILE and SEDLIBFILE defines. * If you are installing vtprint for a whole system (you are the sysadmin), please check/edit the *_DIR destination directories and OWNER and GROUP defines (for file ownership). * If you are an ordinary user and want to install a *private* copy of vtprint, please check/edit the USR_* destination directories. * Check the CFLAGS and compiler section. If your system is old and doesn't support POSIX termios, please either define SYSV_TERMIO or SGTTY in the CFLAGS. (Depending on which your system has!) * If you wish to rebuild the man pages, please verify that the commands given in MAN_* will produce correct output. III. Compiling vtprint * If you run "make", a vtprint binary should be created. (Some systems make get warning messages, those are probably normal.) * If you run "make test" from a station you think should/will work with vtprint, a test file should be printed. Please read "testfile" about this. IV. Installing vtprint * If the above step worked, either do "make install" as "root", or do "make userinstall" to install a private copy of vtprint. * If you wish to rebuild man pages, you may attempt to do so by doing "make man". (You need 'roff and sed to do this!) * Install the man pages by doing "make install.man" or "make userinstall.man" * Add any definitions you need to the "vtprintcap" file (forward your changes to garrett@sciences.sdsu.edu). * Read the man pages for vtprint, vtprintcap, and vtprtoff. * Use vtprint! * Write to "garrett@sciences.sdsu.edu" letting him now how it works! You should fill out an entry for the COMPAT file using the template COMPAT.templ if your configuration doesn't already appear in the COMPAT file. * Enjoy! ================================================================= Garrett D'Amore | garrett@sciences.sdsu.edu Student Programmer/Analyst | SDSU College of Sciences SDSU Computer Science Major | Physics Bldg., Room 238 ================================================================= 27(es)-.1 G .927 (ure that your printer is set up correctly)-3.427 F 5vtprint-2.0.2/Makefile 644 164 12 16770 5653371654 7757 ## ## Makefile for vtprint v2.x ## ------------------------- ## ## Copyright 1994, Garrett D'Amore ## ## List of user adjustable defines: ## ## CC -- name of ANSI compliant C compiler ## COMPILE_OPTS -- C compiler options (same as CFLAGS) ## LINK_OPTS -- linker/loader options (same as LDFLAGS) ## DEVTTY -- tty device filename (normally /dev/tty) ## LIBFILE -- full path name of vtprintcap file (compiled in) ## TERMCAP -- location of termcap (normally /etc/termcap) ## LPR_BIN -- name of print spooler binary (normally lpr) ## LPR_SECT -- section of manual LPR_BIN is referenced ## MAN5_SECT -- section of manual for file formats (normally 5) ## MAN1_SECT -- section of manual for vtprint man page (normally 1) ## MAN1_DIR -- system directory to install section 1 man pages in ## MAN5_DIR -- system directory to install section 5 man pages in ## BIN_DIR -- system directory to install binaries in ## LIB_DIR -- system directory to install vtprintcap in ## USR_HOME -- user's home directory ($HOME by default) ## USR_MAN -- master directory for man pages in private user install ## USR_MAN1 -- directory for section 1 man pages in private user install ## USR_MAN5 -- directory for section 5 man pages in private user install ## USR_BIN -- binary directory for private user installation ## USR_LIB -- lib directory for vtprintcap in private user install ## MAN_PS -- How to build postscript man pages from 'roff source ## MAN_ASCII -- How to build ASCII man (cat) pages from 'roff source ## ### ### User defined parameters ### # Compiler & compile flags CC = gcc COMPILE_OPTS = -O -g LINK_OPTS = # Default device name DEVTTY = /dev/tty # Library file (vtprintcap) LIBFILE = /usr/local/lib/vtprint/vtprintcap # Termcap location (man page reference) TERMCAP = /etc/termcap # Print spooler (man page reference) LPR_BIN = lpr LPR_SECT = 1 # Manual page sections (1 = user commands, 5 = file formats) MAN5_SECT = 5 MAN1_SECT = 1 # System installation directories MAN1_DIR = /usr/local/man/man$(MAN1_SECT) MAN5_DIR = /usr/local/man/man$(MAN5_SECT) BIN_DIR = /usr/local/bin LIB_DIR = /usr/local/lib/vtprint # User directories (for "make userinstall") USR_HOME = $(HOME) USR_MAN = $(USR_HOME)/man USR_MAN1 = $(USR_MAN)/man$(MAN1_SECT) USR_MAN5 = $(USR_MAN)/man$(MAN5_SECT) USR_BIN = $(USR_HOME)/bin USR_LIB = $(USR_HOME)/lib/vtprint # Manual building commands MAN_PS = groff -man -Tps MAN_ASCII = groff -man -Tascii ################################################# ################################################# ## ## ## Don't change anything below this line!! ## ## ## ################################################# ################################################# # Version information VERSION_NO = 2.0.2 VER_MO = October VER_DY = 25 VER_YR = 1994 VERSION_DT = $(VER_MO)\ $(VER_DY)\,\ $(VER_YR) # Consolidated defines DEFINES = -DDEVTTY=\"$(DEVTTY)\" -DVERSION_NO=\"$(VERSION_NO)\"\ -DVERSION_DT=\"$(VERSION_DT)\" -DLIBFILE=\"$(LIBFILE)\" # Compiler options & flags CFLAGS = $(DEFINES) $(COMPILE_OPTS) LDFLAGS = $(LINK_OPTS) TARGET = vtprint OBJS = \ arglist.o \ escape.o \ termstate.o # # Provide some "rational" targets, and ensure that the default target # is the master target. # all: $(TARGET) test: all cat ./testfile | ./$(TARGET) -L./vtprintcap install: installmain installmain: all ./install -d -m 755 $(LIB_DIR) ./install -d -m 755 $(BIN_DIR) ./install -c -s -m 555 vtprint $(BIN_DIR) ./install -c -m 644 vtprintcap $(LIB_DIR) ./install -l $(BIN_DIR)/vtprint $(BIN_DIR)/vtprtoff ./install -l $(BIN_DIR)/vtprint $(BIN_DIR)/vtprton userinstall: userinstallmain userinstallmain: all ./install -d -m 755 $(USR_LIB) ./install -d -m 755 $(USR_BIN) ./install -c -s -m 555 vtprint $(USR_BIN) ./install -c -m 644 vtprintcap $(USR_LIB) ./install -l $(USR_BIN)/vtprint $(USR_BIN)/vtprtoff ./install -l $(USR_BIN)/vtprint $(USR_BIN)/vtprton echo Don't forget to include $(USR_BIN) in your PATH echo Also, please set the following environment variable: echo VTPRINT="-L $(USR_LIB)/vtprintcap" echo Use "make userinstall.man" if you wish to install man pages. man: vtprint.man vtprint.ps vtprintcap.man vtprintcap.ps\ vtprtoff.man vtprtoff.ps echo Are You a god? Don't forget to make woman also! woman: echo ... just to be politically correct, I suppose?? FAQ: FAQ.ms FAQ.macros groff -Tascii -mgs FAQ.ms > FAQ FAQ.ps: FAQ.ms FAQ.macros groff -Tps -mgs FAQ.ms > FAQ.ps install.man: ./install -d -m 755 $(MAN1_DIR) ./install -d -m 755 $(MAN5_DIR) ./install -c -m 444 vtprint.1 $(MAN1_DIR)/vtprint.$(MAN1_SECT) ./install -c -m 444 vtprtoff.1 $(MAN1_DIR)/vtprtoff.$(MAN1_SECT) ./install -c -m 444 vtprintcap.5 $(MAN5_DIR)/vtprintcap.$(MAN5_SECT) ./install -l $(MAN1_DIR)/vtprtoff.$(MAN1_SECT) $(MAN1_DIR)/vtprton.$(MAN1_SECT) chmod 444 $(MAN1_DIR)/vtprton.$(MAN1_SECT) userinstall.man: ./install -d -m 755 $(USR_MAN1) ./install -d -m 755 $(USR_MAN5) ./install -c -m 444 vtprint.1 $(USR_MAN1)/vtprint.$(MAN1_SECT) ./install -c -m 444 vtprtoff.1 $(USR_MAN1)/vtprtoff.$(MAN1_SECT) ./install -c -m 444 vtprintcap.5 $(USR_MAN5)/vtprintcap.$(MAN5_SECT) ./install -l -m 444 $(USR_MAN1)/vtprtoff.$(MAN1_SECT) $(USR_MAN1)/vtprton.$(MAN1_SECT) echo Don't forget to make sure that $(USR_MAN) is in your MANPATH. clean:: rm -f *.o core print:: for f in *.[hc] *.cc; do expand -4 $$f | enscript -2rG -b$$f; done for f in *.ps; do mpage -2 $$f; done # # Sed defines (sed scripts) # SEDDEVTTY = `echo $(DEVTTY) | sed -e s/\\\\//\\\\\\\\\\\\//g` SEDTERMCAP = `echo $(TERMCAP) | sed -e s/\\\\//\\\\\\\\\\\\//g` SEDLIBFILE = `echo $(LIBFILE) | sed -e s/\\\\//\\\\\\\\\\\\//g` SED = sed SED1 = $(SED) -e s/VERSION_NO/$(VERSION_NO)/g SED2 = $(SED) -e s/VER_MO/$(VER_MO)/g SED3 = $(SED) -e s/VER_DY/$(VER_DY)/g SED4 = $(SED) -e s/VER_YR/$(VER_YR)/g SED5 = $(SED) -e s/DEVTTY/$(SEDDEVTTY)/g SED6 = $(SED) -e s/MAN1_SECT/$(MAN1_SECT)/g SED7 = $(SED) -e s/MAN5_SECT/$(MAN5_SECT)/g SED8 = $(SED) -e s/LPR_BIN/$(LPR_BIN)/g SED9 = $(SED) -e s/LPR_SECT/$(LPR_SECT)/g SED10 = $(SED) -e s/LIBFILE/$(SEDLIBFILE)/g SED11 = $(SED) -e s/TERMCAP/$(SEDTERMCAP)/g SED_SCR = $(SED1)|$(SED2)|$(SED3)|$(SED4)|$(SED5)|$(SED6)|$(SED6)|$(SED7)|$(SED8)|$(SED9)|$(SED10)|$(SED11) # # Build man pages # vtprint.1: vtprint.sed Makefile cat vtprint.sed | $(SED_SCR) > vtprint.1 vtprintcap.5: vtprintcap.sed Makefile cat vtprintcap.sed | $(SED_SCR) > vtprintcap.5 vtprtoff.1: vtprtoff.sed Makefile cat vtprtoff.sed | $(SED_SCR) > vtprtoff.1 vtprint.man: vtprint.1 Makefile $(MAN_ASCII) vtprint.1 > vtprint.man vtprintcap.man: vtprintcap.5 Makefile $(MAN_ASCII) vtprintcap.5 > vtprintcap.man vtprtoff.man: vtprtoff.1 Makefile $(MAN_ASCII) vtprtoff.1 > vtprtoff.man vtprint.ps: vtprint.1 Makefile $(MAN_PS) vtprint.1 > vtprint.ps vtprintcap.ps: vtprintcap.5 Makefile $(MAN_PS) vtprintcap.5 > vtprintcap.ps vtprtoff.ps: vtprtoff.1 Makefile $(MAN_PS) vtprtoff.1 > vtprtoff.ps # # Target for building distributions # DIST = vtprint-$(VERSION_NO) DISTTAR = $(DIST).tar DISTSRC = /home/garrett/src/$(DIST) DISTTEMP = /tmp/$(DIST) DISTDEST = /home/garrett dist:: rm -rf $(DISTDEST)/$(DISTTAR).gz rm -rf $(DISTTEMP) rm -rf /tmp/$(DISTTAR)* mkdir $(DISTTEMP) cp $(DISTSRC)/* $(DISTTEMP) cd $(DISTTEMP); tabstrip *.c *.h [A-z][A-Z]* template testfile rm -f $(DISTTEMP)/vtprint chdir /tmp ; tar -cf $(DISTTAR) $(DIST)/* gzip /tmp/$(DISTTAR) cp /tmp/$(DISTTAR).gz $(DISTDEST) rm -rf /tmp/$(DIST)* $(TARGET): Makefile $(OBJS) $(TARGET).o $(CC) $(LDFLAGS) -o $(TARGET) $(TARGET).o $(OBJS) $(LIBS) ontrol. vtprint-2.0.2/README 644 164 12 1770 5653371660 7146 VTPRINT 2.0 ----------- Welcome to vtprint 2.0! If you have already installed a previous version of vtprint, installing this version is almost the same. There is a file "INSTALL" which should be read, as it describe step-by- step how to install vtprint, either as an ordinary user or as a sysadmin. There is also a FAQ in case you get stuck. Read it before asking me, since most questions should be answered there. You should read the Makefile over, and make sure you are happy with the destination directories, file ownerships, etc. After you have compiled vtprint, you can test it by doing "make test". Read "testfile" if you don't get an obvious result! -- Garrett D'Amore ================================================================= Garrett D'Amore | garrett@sciences.sdsu.edu Student Programmer/Analyst | SDSU College of Sciences SDSU Computer Science Major | Physics Bldg., Room 238 ================================================================= tcap $(Lvtprint-2.0.2/WHATSNEW 644 164 12 2367 5653371660 7454 What's new in vtprint 2.0 from 1.x? vtprint-2.0 represents a *complete* rewrite of vtprint. I decided to change somewhat the design philosophy, deeming portability to non-UNIX systems to be really worthless. Hence, this is probably only compilable on UNIX or UNIX-clone systems. Also, I moved to the "getopt()" facility which simplified some of the option parsing code. Here's a list of some of the "user-visible" additions to vtprint: 1) support for any *terminal* with printer control codes via an external library file (see vtprintcap(5).) 2) support for CR/LF handling directly 3) support for output to *any* device file via the command line. 4) support for "session defaults" via an environmental variable which can hold command-line options. 5) optional "binary" mode, overriding CR/LF translations (can only be used on terminal devices). 6) probably other things I can't think of now. ================================================================= Garrett D'Amore | garrett@sciences.sdsu.edu Student Programmer/Analyst | SDSU College of Sciences SDSU Computer Science Major | Physics Bldg., Room 238 ================================================================= ble on UNIX or UNIX-clone systems. Also, I moved to the "getopt()" facility which simplified some of the option parsing code. Here's a list of some of the "user-visible" additions to vtprint: 1) support for any *terminal* with printer control codes via vtprint-2.0.2/arglist.c 644 164 12 12215 5653371654 10116 /************************************************************************** ************************************************************************** ** ** ** arglist.c Argument list functions ** ** ========= ** ** ** ** Purpose: Simplifies handling of argument lists that may ** ** appear in argv, and environment variable, or else- ** ** where. ** ** ** ** Author: Garrett D'Amore ** ** ** ** Copyright: 1994, Garrett E. D'Amore ** ** ** ** NO WARRANTY: This program is provided entirely without warranty. ** ** The user assumes full responsibility for the use of ** ** this program, and agrees to indemnify the author and ** ** the copyright holder from any damage or loss that ** ** may result from the use of or inability to use this ** ** program. In simple language: YOU USE THIS PROGRAM ** ** AT YOUR OWN RISK! ** ** ** ** Warning: None. ** ** ** ** Restrictions: None. ** ** ** ** Algorithm: None. ** ** ** ** References: None. ** ** ** ** File formats: None. ** ** ** ** Rev. History: June 2, 1994 Garrett D'Amore ** ** -- Initial coding. ** ** ** ** Notes: None. ** ** ** ************************************************************************** **************************************************************************/ /* >>>>>>>>>> Headers <<<<<<<<<< */ #include #include #include #include #include "arglist.h" /* >>>>>>>>>> Functions <<<<<<<<<< */ /*************************************** * * string2arglist Convert a string to an arglist. * * Purpose Used to split a string up into an * argv-like arglist. * * Parameters string: the string to convert from * args: pointer to struct to hold result * * Returns zero on success, * non-zero on error (ENOMEM). * */ int string2arglist (char *string, arglist *args) { char *st; /* clear the arglist to a clean state */ if (args->argv) free (args->argv); args->argc = 1; args->alloc = 0; st = string; while (1) { /* resize array if necessary */ if (args->argc >= args->alloc) { if (!(args->argv)) args->argv = (char **) malloc (ARGLISTINC * sizeof (char *)); else args->argv = (char **) realloc (args->argv, (args->alloc + ARGLISTINC) * sizeof (char *)); if (args->argv == NULL) return (ENOMEM); args->alloc += ARGLISTINC; } /* get string and set it up, exit loop if not found */ if (!(args->argv [args->argc] = strtok (st, "\t "))) break; /* needed for additional calls to strtok */ st = NULL; args->argc++; } return 0; } /*************************************** * * argv2arglist Fill an arglist from argv array. * * Purpose Converts argv[] array to arglist structure. * * Parameters argc: number of entries in argv[] * argv: argv argument to main() * * Returns zero on success, * nonzero on error (ENOMEM). * */ int argv2arglist (int argc, char *argv[], arglist *args) { int i; /* clear any old memory */ if (args->argv) free (args->argv); args->argv = (char **) malloc ((argc + 1) * sizeof (char *)); if (!args->argv) return (ENOMEM); args->alloc = argc; for (i = 0; i < argc; i++) { args->argv[i+1] = argv[i+1]; } args->argc = argc; return 0; } ons program needs to able to tell the host "w)97 553.2 R .591 (ait for me to catch up with you before you gi)-.1 F .891 -.15(ve m)-.25 H(e).15 E(an)97 565.2 Q 3.467(ym)-.15 G .966(ore data -- I')-3.467 F 1.266 -.15(ve n)-.5 H .966(ot got an).15 F 3.466(yr)-.15 G .966 (oom for it at the moment!"\))-3.466 F -1.1(Yo)5.966 G 3.466(uc)1.1 G .966(ould use "XON/XOFF" \215o)-3vtprint-2.0.2/arglist.h 644 164 12 10532 5653371655 10124 /************************************************************************** ************************************************************************** ** ** ** arglist.h Argument list functions ** ** ========= ** ** ** ** Purpose: Simplifies handling of argument lists that may ** ** appear in argv, and environment variable, or else- ** ** where. ** ** ** ** Author: Garrett D'Amore ** ** ** ** Copyright: 1994, Garrett E. D'Amore ** ** ** ** NO WARRANTY: This program is provided entirely without warranty. ** ** The user assumes full responsibility for the use of ** ** this program, and agrees to indemnify the author and ** ** the copyright holder from any damage or loss that ** ** may result from the use of or inability to use this ** ** program. In simple language: YOU USE THIS PROGRAM ** ** AT YOUR OWN RISK! ** ** ** ** Warning: None. ** ** ** ** Restrictions: None. ** ** ** ** Algorithm: None. ** ** ** ** References: None. ** ** ** ** File formats: None. ** ** ** ** Rev. History: June 2, 1994 Garrett D'Amore ** ** -- Initial coding. ** ** ** ** Notes: None. ** ** ** ************************************************************************** **************************************************************************/ #ifndef ARGLIST_H #define ARGLIST_H /* >>>>>>>>>> Headers <<<<<<<<<< */ /* >>>>>>>>>> Defines <<<<<<<<<< */ #define ARGLISTINC (40) /* >>>>>>>>>> Types <<<<<<<<<< */ typedef struct alist /* The actual argument list */ { int alloc; /* amount of memory allocated to an arglist */ int argc; /* analogous to the global argc */ char **argv; /* analogous to the global argv[] */ } arglist; /* >>>>>>>>>> Variables <<<<<<<<<< */ /* >>>>>>>>>> Prototypes <<<<<<<<<< */ /*************************************** * * string2arglist Convert a string to an arglist. * * Purpose Used to split a string up into an * argv-like arglist. * * Parameters string: the string to convert from * args: pointer to struct to hold result * * Returns zero on success, * non-zero on error (ENOMEM). * */ int string2arglist (char *string, arglist *args); /*************************************** * * argv2arglist Fill an arglist from argv array. * * Purpose Converts argv[] array to arglist structure. * * Parameters argc: number of entries in argv[] * argv: argv argument to main() * * Returns zero on success, * nonzero on error (ENOMEM). * */ int argv2arglist (int argc, char *argv[], arglist *args); /* >>>>>>>>>> Functions <<<<<<<<<< */ #endif /* ARGLIST_H */ rgs: pointer to struct to hold result * * Returns zero on success, * non-zero on error (ENOMEM). * */ int string2arglist (char *vtprint-2.0.2/escape.c 644 164 12 13320 5653371655 7710 /************************************************************************** ************************************************************************** ** ** ** escape.c Routine for performing escape code string expansion. ** ** ======== ** ** ** ** Purpose: Expand strings with C style escapes in them. ** ** ** ** Author: Garrett D'Amore ** ** ** ** Copyright: 1994, Garrett E. D'Amore ** ** ** ** NO WARRANTY: This program is provided entirely without warranty. ** ** The user assumes full responsibility for the use of ** ** this program, and agrees to indemnify the author and ** ** the copyright holder from any damage or loss that ** ** may result from the use of or inability to use this ** ** program. In simple language: YOU USE THIS PROGRAM ** ** AT YOUR OWN RISK! ** ** ** ** Warning: None. ** ** ** ** Restrictions: None. ** ** ** ** Algorithm: None. ** ** ** ** References: Kernighan & Ritchie, "The C Programming Language" ** ** ** ** File formats: None. ** ** ** ** Rev. History: June 4, 1994 Garrett D'Amore ** ** -- Initial coding. ** ** ** ** Notes: None. ** ** ** ************************************************************************** **************************************************************************/ /* >>>>>>>>>> Headers <<<<<<<<<< */ #include #include #include #include "escape.h" /* >>>>>>>>>> Functions <<<<<<<<<< */ /*************************************** * * escape Convert a C style format string to actual value. * * Purpose Provides a mechanism for expanding C-style escape * codes in a string. * * Parameters source: String to expand. * * Returns pointer to converted string on success, * NULL on (parse) error. * */ char *escape (char *source) { char *dest; char *probe; long l; if (!source) return NULL; dest = source; for (probe = source; *probe; probe++) { /* skip bare double quotes, used as delimiters */ if (*probe == '\"') continue; if (*probe != '\\') { *dest = *probe; dest++; continue; } probe++; /* assume we are escaped now! */ switch (*probe) { case 'a' : { *dest = '\x07'; dest++; break; } case 'b' : { *dest = '\x08'; dest++; break; } case 'f' : { *dest = '\x0C'; dest++; break; } case 'n' : { *dest = '\x0A'; dest++; break; } case 'r' : { *dest = '\x0D'; dest++; break; } case 't' : { *dest = '\x09'; dest++; break; } case 'v' : { *dest = '\x0B'; dest++; break; } case '\\' : case '\'' : case '\"' : case '\?' : { *dest = *probe; dest++; break; } case '0' : { l = strtol (probe, &probe, 8); *dest = (char) l; dest++; probe--; break; } case '1' : case '2' : case '3' : case '4' : case '5' : case '6' : case '7' : case '8' : case '9' : { l = strtol (probe, &probe, 10); *dest = (char) l; dest++; probe--; break; } case 'X' : case 'x' : { /* check for valid character */ if ((!isdigit(probe[1])) && ((toupper (probe[1]) > 'F') || (toupper (probe [1]) < 'A'))) return NULL; l = strtol (probe, &probe, 16); *dest = (char) l; dest++; probe--; break; } default : return NULL; } } *dest = '\0'; return (source); } ** ** ** ** Algorithm: None. ** ** ** ** References: Kernighan & Ritchie, "The C Programming Language" vtprint-2.0.2/escape.h 644 164 12 6405 5653371655 7703 /************************************************************************** ************************************************************************** ** ** ** escape.h Routine for performing escape code string expansion. ** ** ======== ** ** ** ** Purpose: Expand strings with C style escapes in them. ** ** ** ** Author: Garrett D'Amore ** ** ** ** Copyright: 1994, Garrett E. D'Amore ** ** ** ** NO WARRANTY: This program is provided entirely without warranty. ** ** The user assumes full responsibility for the use of ** ** this program, and agrees to indemnify the author and ** ** the copyright holder from any damage or loss that ** ** may result from the use of or inability to use this ** ** program. In simple language: YOU USE THIS PROGRAM ** ** AT YOUR OWN RISK! ** ** ** ** Warning: None. ** ** ** ** Restrictions: None. ** ** ** ** Algorithm: None. ** ** ** ** References: Kernighan & Ritchie, "The C Programming Language" ** ** ** ** File formats: None. ** ** ** ** Rev. History: June 4, 1994 Garrett D'Amore ** ** -- Initial coding. ** ** ** ** Notes: None. ** ** ** ************************************************************************** **************************************************************************/ #ifndef ESCAPE_H #define ESCAPE_H /* >>>>>>>>>> Prototypes <<<<<<<<<< */ /*************************************** * * escape Convert a C style format string to actual value. * * Purpose Provides a mechanism for expanding C-style escape * codes in a string. * * Parameters source: String to expand. * * Returns pointer to converted string on success, * NULL on (parse) error. * */ char *escape (char *source); #endif /* ESCAPE_H */ LL on (parse) error. * */ char *escape (char *source) { char *dest; char *probe; long l; if (!source) return NULL; dest = source; for (probe = source; *probe; probe++) { /* skip bare double quotes, usevtprint-2.0.2/install 755 164 12 5245 5653371654 7666 #!/bin/sh # # install - install a program, script, link, or datafile # This comes from X11R5; it is not part of GNU. # # Modified 6/13/94 by Garrett D'Amore to handle -l and -d options # for directories and links, respectively. # # $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $ # # This script is compatible with the BSD install script, but was written # from scratch. # # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mdprog="${MDPROG-mkdir}" lnprog="${LNPROG-ln}" mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" instcmd="$mvprog" mdcmd="" lncmd="" chmodcmd="" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" while [ x"$1" != x ]; do case $1 in -l) instcmd="" mdcmd="" lncmd="$lnprog" shift continue;; -d) instcmd="" lncmd="" mdcmd="$mdprog -p" shift continue;; -c) instcmd="$cpprog" shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; *) if [ x"$src" = x ] then src=$1 else dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 fi if [ x"$dst" = x ] then if [ x"$mdcmd" = x ] then echo "install: no destination specified" exit 1 fi fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d "$dst" ] then dst="$dst"/`basename $src` fi # Make a temp file name in the proper directory. dstdir=`dirname $dst` dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name if [ x"$instcmd" != x ]; then $doit $instcmd $src $dsttmp; elif [ x"$mdcmd" != x ]; then $doit $mdcmd $src; dsttmp=$src; elif [ x"$lncmd" != x ]; then $doit $lncmd $src $dsttmp; fi # and set any options; do chmod last to preserve setuid bits if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi # Now rename the file to the real destination. if [ x"$mdcmd" = x ]; then $doit $rmcmd $dst $doit $mvcmd $dsttmp $dst fi exit 0 ue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; *) if [ x"$src" = x ] then src=$1 else dst=$1 fi shifvtprint-2.0.2/tabstrip 755 164 12 144 5653371654 10021 #!/bin/sh while [ -n "$1" ]; do { expand -4 $1 > /tmp/$$; cp /tmp/$$ $1; rm /tmp/$$; shift; } done exit 1 fi if [ x"$dst" = x ] then if [ x"$mdcmd" = x ] then echo "install: no destination specified" exit 1 fi fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d "$dst" ] then dst="$dst"/`basename $src` fi # Make a temp file name in the proper directory. dstdir=`dirname $dst` dsttmp=$dstdirvtprint-2.0.2/template 644 164 12 374 5653371660 10003 /*************************************** * * function description * * Purpose A longer description of this functions * purpose. * * Parameters a: example parameter * * Returns None. * */ append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d "$dst" ] then dst="$dst"/`basename $src` fi # Make a temp file name in the proper directory. dstdir=`dirname $dst` dsttmp=$dstdirvtprint-2.0.2/template.c 644 164 12 6262 5653371655 10252 /************************************************************************** ************************************************************************** ** ** ** template.c Template C source file ** ** ========== ** ** ** ** Purpose: Serves as a template C header file. ** ** ** ** Author: Garrett D'Amore ** ** ** ** Copyright: 1994, Garrett E. D'Amore ** ** ** ** NO WARRANTY: This program is provided entirely without warranty. ** ** The user assumes full responsibility for the use of ** ** this program, and agrees to indemnify the author and ** ** the copyright holder from any damage or loss that ** ** may result from the use of or inability to use this ** ** program. In simple language: YOU USE THIS PROGRAM ** ** AT YOUR OWN RISK! ** ** ** ** Warning: None. ** ** ** ** Usage: This line only belongs in files containing main(). ** ** ** ** Restrictions: Tabs are set every 4 spaces. ** ** ** ** Algorithm: None. ** ** ** ** References: Steve Oualline, "C Elements of Style", 1992 ** ** ** ** File formats: None. ** ** ** ** Rev. History: June 2, 1994 Garrett D'Amore ** ** -- Initial coding. ** ** ** ** Notes: None. ** ** ** ************************************************************************** **************************************************************************/ /* >>>>>>>>>> Headers <<<<<<<<<< */ #include "template.h" /* >>>>>>>>>> Defines <<<<<<<<<< */ /* >>>>>>>>>> Types <<<<<<<<<< */ /* >>>>>>>>>> Variables <<<<<<<<<< */ /* >>>>>>>>>> Prototypes <<<<<<<<<< */ /* >>>>>>>>>> Functions <<<<<<<<<< */ /* >>>>>>>>>> Main <<<<<<<<<< */ NULL on (parse) error. * */ char *escape (char *source); #endif /* ESCAPE_H */ LL on (parse) error. * */ char *escape (char *source) { char *dest; char *probe; long l; if (!source) return NULL; dest = source; for (probe = source; *probe; probe++) { /* skip bare double quotes, usevtprint-2.0.2/template.h 644 164 12 6332 5653371656 10256 /************************************************************************** ************************************************************************** ** ** ** template.c Template C header file ** ** ========== ** ** ** ** Purpose: Serves as a template C header file. ** ** ** ** Author: Garrett D'Amore ** ** ** ** Copyright: 1994, Garrett E. D'Amore ** ** ** ** NO WARRANTY: This program is provided entirely without warranty. ** ** The user assumes full responsibility for the use of ** ** this program, and agrees to indemnify the author and ** ** the copyright holder from any damage or loss that ** ** may result from the use of or inability to use this ** ** program. In simple language: YOU USE THIS PROGRAM ** ** AT YOUR OWN RISK! ** ** ** ** Warning: None. ** ** ** ** Usage: This line only belongs in files containing main(). ** ** ** ** Restrictions: Tabs are set every 4 spaces. ** ** ** ** Algorithm: None. ** ** ** ** References: Steve Oualline, "C Elements of Style", 1992 ** ** ** ** File formats: None. ** ** ** ** Rev. History: June 2, 1994 Garrett D'Amore ** ** -- Initial coding. ** ** ** ** Notes: None. ** ** ** ************************************************************************** **************************************************************************/ #ifndef TEMPLATE_H #define TEMPLATE_H /* >>>>>>>>>> Headers <<<<<<<<<< */ /* >>>>>>>>>> Defines <<<<<<<<<< */ /* >>>>>>>>>> Types <<<<<<<<<< */ /* >>>>>>>>>> Variables <<<<<<<<<< */ /* >>>>>>>>>> Prototypes <<<<<<<<<< */ /* >>>>>>>>>> Functions <<<<<<<<<< */ /* >>>>>>>>>> Main <<<<<<<<<< */ #endif /* TEMPLATE_H */ ape (char *source); #endif /* ESCAPE_H */ LL on (parse) error. * */ char *escape (char *source) { char *dest; char *probe; long l; if (!source) return NULL; dest = source; for (probe = source; *probe; probe++) { /* skip bare double quotes, usevtprint-2.0.2/termstate.c 644 164 12 11647 5653371655 10472 /************************************************************************** ************************************************************************** ** ** ** termstate.c terminal state functions ** ** =========== ** ** ** ** Purpose: Provides functions to simplifify management of some ** ** terminal states. ** ** ** ** Author: Garrett D'Amore ** ** ** ** Copyright: 1994, Garrett E. D'Amore ** ** ** ** NO WARRANTY: This program is provided entirely without warranty. ** ** The user assumes full responsibility for the use of ** ** this program, and agrees to indemnify the author and ** ** the copyright holder from any damage or loss that ** ** may result from the use of or inability to use this ** ** program. In simple language: YOU USE THIS PROGRAM ** ** AT YOUR OWN RISK! ** ** ** ** Warning: None. ** ** ** ** Restrictions: None. ** ** ** ** Algorithm: None. ** ** ** ** References: None. ** ** ** ** File formats: None. ** ** ** ** Rev. History: June 4, 1994 Garrett D'Amore ** ** -- Initial coding. ** ** ** ** Notes: None. ** ** ** ************************************************************************** **************************************************************************/ /* >>>>>>>>>> Headers <<<<<<<<<< */ #include #if defined (SGTTY) #include #elif defined (SYSV_TERMIO) #include #else /* POSIX_TERMIOS */ #include #endif #include #include "termstate.h" /* >>>>>>>>>> Functions <<<<<<<<<< */ /*************************************** * * save_termstate Save terminal state. * * Purpose Saves the terminal state so that we can restore * it later. * * Parameters fd: filedescriptor to save * state: pointer to area to save state at * * Returns zero on success, * non-zero on failure. * */ int save_termstate (int fd, termstate *state) { if (!isatty (fd)) return (ENOTTY); #if defined (SGTTY) return (gtty (fd, state)); #elif defined (SYSV_TERMIO) return (ioctl (fd, TCGETA, state)); #else /* POSIX_TERMIOS */ return (tcgetattr (fd, state)); #endif } /*************************************** * * restore_termstate Restore terminal state. * * Purpose Restores a terminal state saved with * save_termstate. * * Parameters fd: file descriptor associated with terminal * state: previously saved termstate * * Returns zero on success, * non-zero on error. * */ int restore_termstate (int fd, termstate *state) { if (!isatty (fd)) return (ENOTTY); #if defined (SGTTY) return (stty (fd, state)); #elif defined (SYSV_TERMIO) return (ioctl (fd, TCSETAW, state)); #else /* POSIX_TERMIOS */ return (tcsetattr (fd, TCSADRAIN, state)); #endif } /*************************************** * * raw_termstate Sets a termstate to raw mode. * * Purpose Modifies a termstate structure so that * it has no ouput postprocessing. * * Parameters state: terminal state structure to modify * * Returns None. * */ void raw_termstate (termstate *state) { #ifdef SGTTY state->sg_flags |= RAW; #else /* SYSV_TERMIO || POSIX_TERMIOS */ state->c_oflag |= OPOST; #endif return; } ** ** NO WARRANTY: This program is vtprint-2.0.2/termstate.h 644 164 12 10732 5653371656 10472 /************************************************************************** ************************************************************************** ** ** ** termstate.h terminal state functions ** ** =========== ** ** ** ** Purpose: Provides functions to simplifify management of some ** ** terminal states. ** ** ** ** Author: Garrett D'Amore ** ** ** ** Copyright: 1994, Garrett E. D'Amore ** ** ** ** NO WARRANTY: This program is provided entirely without warranty. ** ** The user assumes full responsibility for the use of ** ** this program, and agrees to indemnify the author and ** ** the copyright holder from any damage or loss that ** ** may result from the use of or inability to use this ** ** program. In simple language: YOU USE THIS PROGRAM ** ** AT YOUR OWN RISK! ** ** ** ** Warning: None. ** ** ** ** Restrictions: None. ** ** ** ** Algorithm: None. ** ** ** ** References: None. ** ** ** ** File formats: None. ** ** ** ** Rev. History: June 4, 1994 Garrett D'Amore ** ** -- Initial coding. ** ** ** ** Notes: None. ** ** ** ************************************************************************** **************************************************************************/ /* >>>>>>>>>> Headers <<<<<<<<<< */ #if defined (SGTTY) #include #elif defined (SYSV_TERMIO) #include #else /* POSIX_TERMIOS */ #include #endif /* >>>>>>>>>> Types <<<<<<<<<< */ #if defined (SGTTY) typedef struct sgttyb termstate; #elif defined (SYSV_TERMIO) typedef struct termio termstate; #else /* POSIX_TERMIOS */ typedef struct termios termstate; #endif /* >>>>>>>>>> Prototypes <<<<<<<<<< */ /*************************************** * * save_termstate Save terminal state. * * Purpose Saves the terminal state so that we can restore * it later. * * Parameters fd: filedescriptor to save * state: pointer to area to save state at * * Returns zero on success, * non-zero on failure. * */ int save_termstate (int fd, termstate *state); /*************************************** * * restore_termstate Restore terminal state. * * Purpose Restores a terminal state saved with * save_termstate. * * Parameters fd: file descriptor associated with terminal * state: previously saved termstate * * Returns zero on success, * non-zero on error. * */ int restore_termstate (int fd, termstate *state); /*************************************** * * raw_termstate Sets a termstate to raw mode. * * Purpose Modifies a termstate structure so that * it has no ouput postprocessing. * * Parameters state: terminal state structure to modify * * Returns None. * */ void raw_termstate (termstate *state); v array. * * Purpose Convervtprint-2.0.2/testfile 644 164 12 1157 5653371661 10030 This is a file for testing vtprint. Hopefully it will provide some insight as to whether your program works correctly or not. To use, type "vtprint [options] testfile" Okay, are characters lining up? *************************** * This box should line up * *************************** Now we have to skip to a new page. This should appear on a second page of the output. Now answer the following questions: 1) Did the first page print out completely and correctly? 2) Were there two pages of output? If both questions are answered yes, congratulations! vtprint will work properly for you! ** ** Author: Garrett D'Amore ** ** ** ** Copyright: 1994, Garrett E. D'Amore ** ** ** ** NO WARRANTY: This program is vtprint-2.0.2/vtprint.1 644 164 12 20066 5653371654 10100 .\" -*- nroff -*- .\" Like TP, but if specified indent is more than half .\" the current line-length - indent, use the default indent. .de Tp .ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP .el .TP "\\$1" .. .TH VTPRINT 1 "25 October 1994" "vtprint v2.0.2" .SH NAME vtprint \- print files from UNIX host to printer attached to local terminal .SH SYNOPSIS .B vtprint [ .B \-bBcCdDeEfFhlnNqQtvw ] [ .B \-L .I vtprintcap ] [ .B \-T .I termtype ] [ .B \-V .I device ] [ .IR filename\.\.\. ] .SH DESCRIPTION .B vtprint is a simple filter that prints ASCII text to a printer connected to a terminal or terminal emulator. It uses terminal escape sequences to print, and can substitute for .B "lpr\fR(1)" in circumstances where the printer is not connected directly to the host or available via TCP/IP. .SH OPTIONS .TP .B \-b Causes \fBvtprint\fP to open the output stream in binary modes, overriding any automatic postprocessing done by the host (e.g. CR/LF translations). This has no effect if the output stream is not a tty device. .TP .B \-B Undoes the effect of the \fB\-b\fP option. Note that this does \fInot\fP open the output stream in text mode if it would not normally be opened in that mode. .TP .B \-c Causes \fBvtprint\fP to append any linefeeds (ASCII 0xA) with carriage returns (ASCII 0xD). This is useful for printing data from a UNIX or similiar host to an MS-DOS system's printer that expects CR/LF line termination. .TP .B \-C Causes \fBvtprint\fP to pass all carriage returns and linefeeds unmodified. .TP .B \-d Use the tty device file instead of stdout for output. This is defined as .B /dev/tty on this system. (This is operating system specific and may vary from system to system.) This is useful for using \fBvtprint\fP as a pipe called by programs that suppress or redirect the stdout stream of the pipe or printing process. .TP .B \-D Use the stdout stream for output, rather than a tty device file. .TP .B \-e Forces \fBvtprint\fP to ignore the TERM environment variable and use the builtin control codes instead. .TP .B \-E Undoes the effect of the \fB\-e\fP option, which allows \fBvtprint\fP to attempt to find an entry in \fB/usr/local/lib/vtprint/vtprintcap\fP for the TERM value and use the corresponding control codes. .TP .B \-f Requests \fBvtprint\fP to suppress inclusion of formfeeds (ASCII 0xC) between multiple files. Note that this has no affect on any formfeeds that may be present in the input files already. .TP .B \-F Requests \fBvtprint\fP to include formfeeds between multiple files specified on the command-line and at the end of the last file printed. .TP .B \-h Print out a simple usage message. .TP .B \-l Print out the \fBvtprint\fP license agreement. .TP .BI \-L " vtprintcap" Specifies an alternate file to use instead of \fB/usr/local/lib/vtprint/vtprintcap\fP. .TP .B \-n Causes \fBvtprint\fP to strip the CR from any CR/LF sequences. This will not affect handling of any CRs present elsewhere in the file. .TP .B \-N Causes \fBvtprint\fP to pass all carriage returns and linefeeds unmodified. .TP .B \-q Quiet mode. Suppress various status messages from being displayed, useful in situations where \fBvtprint\fP is used as part of a shell script, for example. .TP .B \-Q Cancels the effect of the \fB\-q\fP option, allowing normal progress reporting to occur. .TP .B \-t Force the use of the TERM variable to perform a look up of the control sequences to be used in \fB/usr/local/lib/vtprint/vtprintcap\fP. If an entry in that file can't be found, \fBvtprint\fP will abort with an error. .TP .BI \-T " termtype" Use the value of \fItermtype\fP instead of the value of the TERM environment variable when performing lookups in \fB/usr/local/lib/vtprint/vtprintcap\fP. .TP .B \-v Display version information. .TP .BI \-V " device" Specifies an alternate device file instead of \fB/dev/tty\fP to use. .TP .B \-w Display important warranty waiver information. NO WARRANTY! .TP .B \-\- This option changes no special operational parameters of .B vtprint. But it does indicate to the program that all of the command-line arguments which follow are to be parsed as filenames, even if they begin with a dash. Hence to process a single file with the name "file" you would call .B vtprint as " \fBvtprint\fP \-\- \-file". .SH ENVIRONMENT .IP TERM the type of the terminal .B vtprint will assume is being used. .IP VTPRINT string of options to be used by .B vtprint. .SH AUTHOR .B vtprint was written by Garrett D'Amore, on December 27, 1993 and last modified on October 25, 1994. It is heavily derived from a similar program, called .B lprint, by the same author. He can be reached via Internet e-mail at garrett@sciences.sdsu.edu. .SH DISTRIBUTION The latest version of .B vtprint can be obtained by anonymous ftp at ftp.sdsu.edu in the .B /pub/vtprint directory. Please read the .B INDEX and .B README files before downloading. .LP If you do not have ftp availability, then you can request a uuencoded copy of .B vtprint be sent to you via e-mail from the author. The author is also willing to make other arrangements as needed, within certain limitations. .SH MAILING LIST A mailing list for the discussion of topics related to and about \fBvtprint\fP exists. To subscribe to this mailing list, send a message to "vtprint-request@sdsu.edu" with the word "subscribe" as the body. An automated list server will reply with information about the mailing list. .SH COPYRIGHT .B vtprint is copyrighted 1994, by Garrett D'Amore. It may be freely redistributed or modified, so long as this and any other copyright notices are included in their original form with the program. The user is granted the right to use this program without limitation. .SH DISCLAIMER .B vtprint is provided WITHOUT WARRANTY. The user agrees to indemnify the author from any claims of damage or loss arising from the use of or inability to use this program. In other words, USE AT YOUR OWN RISK! .SH CAVEATS .B vtprint cannot be used to print files containing non-printable characters, as these may cause conflicts with the terminal or emulator used. .PP When used over a serial (modem) connection, \fBvtprint\fP may not work properly unless hardware (CTS/RTS) flow control is used. This is due to the fact that most printers are slower than serial connections in common use. .PP .B vtprint uses terminal escape sequences to print, and not all terminal emulators support these sequences, and of those that do, some support it differently. You can find a listing of some of the programs known to work and not to work with .B vtprint in the file .B COMPAT. The best thing to do is try your particular emulator, and find out if it works. The author would appreciate any reports of success or failure, or strange behavior. You can send those to him via Internet e-mail. (See the .B AUTHOR chapter for how to reach him.) .LP The \fB/usr/local/lib/vtprint/vtprintcap\fP file is still largely incomplete. The author would very much appreciate it if individuals with more information different terminals would get in contact with him so that support can be added for these terminals in the master archive. .LP Do \fInot\fP background this program, as it has no way of knowing when it is in the background and when it is in the foreground. This will result in your foreground process' output being printed as well as the output from .B vtprint. .SH FILES .B /usr/local/lib/vtprint/vtprintcap .SH TODOS Fix any bugs present, clean-up the documentation, continue to build upon entries in the \fBCOMPAT\fP and \fB/usr/local/lib/vtprint/vtprintcap\fP files, and finally, finish getting a college education! .SH BUGS .B vtprint doesn't handle some signals properly, especially the SIGKILL and SIGSTOP signals, which can't be caught anyway. Also it doesn't check to see if you have backgrounded the process. The resulting condition may leave all output directed to the printer instead of the screen. The fix for this condition is to run the provided .B vtprtoff program with no arguments, which will restore normal screen output. (You probably won't be able to see what you're typing while you start .B vtprtoff from the shell.) .SH SEE ALSO .B "lpr\fR(1), " .B "vtprintcap\fR(5), " .B "vtprtoff\fR(1)" is more than half .\" the current line-length - indent, use the default indent. .de Tp .ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP .el .TP "\\$1" .. .TH VTPRINT 1 "25 October 1994" "vtprint v2.0.2" .SH NAME vtprint \- print files from UNIX host to printer attached to local terminal .SH SYNOPSIS .B vtprint [ .B \-bBcCdDeEfFhlnNqQtvw ] [ .B \-L .I vtprintcap ] [ .B \-T .I termtype ] [ .B \-V .I device ] [ .IR filename\.\.\. ] .SH DESCRIPTION .B vtprinvtprint-2.0.2/vtprint.c 644 164 12 50334 5653371655 10164 /************************************************************************** ************************************************************************** ** ** ** vtprint.c vtprint C source file ** ** ========= ** ** ** ** Purpose: Provides printing services to a terminal printer ** ** using terminal escape sequences. ** ** ** ** Author: Garrett D'Amore ** ** ** ** Copyright: 1994, Garrett E. D'Amore ** ** ** ** NO WARRANTY: This program is provided entirely without warranty. ** ** The user assumes full responsibility for the use of ** ** this program, and agrees to indemnify the author and ** ** the copyright holder from any damage or loss that ** ** may result from the use of or inability to use this ** ** program. In simple language: YOU USE THIS PROGRAM ** ** AT YOUR OWN RISK! ** ** ** ** Warning: None. ** ** ** ** Usage: vtprint [options] [files] ** ** ** ** Restrictions: None. ** ** ** ** Algorithm: None. ** ** ** ** References: None. ** ** ** ** File formats: vtprintcap(5) ** ** ** ** Rev. History: June 4, 1994 Garrett D'Amore ** ** -- Initial coding. ** ** ** ** Notes: None. ** ** ** ************************************************************************** **************************************************************************/ /* >>>>>>>>>> Headers <<<<<<<<<< */ #include #include #include #include #include #include #include "arglist.h" #include "termstate.h" /* >>>>>>>>>> Defines <<<<<<<<<< */ #define CR '\xD' #define LF '\xA' #define FF '\xC' #ifndef MAN_SECT #define MAN_SECT "1" #endif #ifndef VERSION_NO #define VERSION_NO "2.0dev" #endif #ifndef VERSION_DT #define VERSION_DT "January 1, 1970" #endif #ifndef DEVTTY #define DEVTTY "/dev/tty" #endif #ifndef LIBFILE #define LIBFILE "/etc/vtprintcap" #endif /* >>>>>>>>>> Variables <<<<<<<<<< */ /* stuff used by getopt() */ extern char *optarg; extern int optind; /* default printer control codes (ANSI/vt100/vt220) */ char *ptr_on = "\033[5i"; char *ptr_off = "\033[4i"; /* string operating parameters */ char *termname = ""; char *libtermname = LIBFILE; char *devname = DEVTTY; char *vtbasename = ""; /* modes of operation */ int quiet = 0; /* minimal message reporting? */ int binary = 0; /* binary newline translation? */ int ffeed = 1; /* formfeed between files? */ int device = 0; /* use tty device instead of stdout? */ int stripcr = 0; /* strip CRs from CR/LFs? */ int addcr = 0; /* add LFs to bare CRs? */ int builtin = 0; /* use builtin escape codes by default? */ int forcenv = 0; /* force using the getenv(TERM) value */ int dowork = 1; /* whether or not to actually do processing */ /* terminal states */ int state_saved = 0; termstate oldstate; termstate newstate; /* output file descriptor */ FILE *outfile; /* >>>>>>>>>> Prototypes <<<<<<<<<< */ void sighandler (int); int process_opts (arglist *); void help (void); void license (void); void warranty (void); void intro (void); /* >>>>>>>>>> Functions <<<<<<<<<< */ /*************************************** * * sighandler Signal handler for terminal clean-up. * * Purpose Ensures that the terminal is restored to a "sane" * state when a signal is received, and then exits * from program. * * Parameters signum: signal number that was caught * * Returns None. * */ void sighandler (int signum) { char *signame; fprintf (outfile, "%s", ptr_off); fflush (outfile); if (state_saved) restore_termstate(fileno(outfile), &oldstate); if (!quiet) { switch (signum) { case SIGHUP : { signame = "hangup"; break; } case SIGINT : { signame = "interrupt"; break; } case SIGQUIT : { signame = "quit"; break; } case SIGTERM : { signame = "terminate"; break; } case SIGTSTP : { signame = "keyboard stop"; break; } default : { signame = "unknown"; break; } } fprintf (outfile,"\nCaught %s signal! Exiting vtprint.\n", signame); } exit (1); } /*************************************** * * process_opts Process command-line and environment options. * * Purpose Process specific program options from an arglist. * Called once for environment, then again for argv[]. * * Parameters arglist: arglist of parameters to process * * Returns Pointer to "next" index in arglist to process (stuff * that getopt () can't process itself). * */ int process_opts (arglist *args) { int c; optind = 1; /* reset getopt index */ args -> argv [0] = vtbasename; do { c = getopt (args->argc, args->argv, "hwlvdDbBcCeEfFnNqQT:tL:V:"); switch (c) { case 'h' : { help (); dowork = 0; break; } case 'w' : { warranty (); dowork = 0; break; } case 'l' : { license (); dowork = 0; break; } case 'v' : { intro(); dowork = 0; break; } case 'd' : { device = 1; break; } case 'D' : { device = 0; break; } case 'b' : { binary = 1; break; } case 'B' : { binary = 0; break; } case 'c' : { stripcr = 0; addcr = 1; break; } case 'C' : { stripcr = 0; addcr = 0; break; } case 'e' : { builtin = 1; forcenv = 0; break; } case 'E' : { builtin = 0; forcenv = 0; break; } case 'f' : { ffeed = 0; break; } case 'F' : { ffeed = 1; break; } case 'n' : { addcr = 0; stripcr = 1; break; } case 'N' : { addcr = 0; stripcr = 0; break; } case 'q' : { quiet = 1; break; } case 'Q' : { quiet = 0; break; } case 't' : { forcenv = 1; termname = getenv ("TERM"); break; } case 'T' : { termname = optarg; break; } case 'L' : { libtermname = optarg; break; } case 'V' : { devname = optarg; device = 1; break; } case '?' : { help(); exit (1); } } } while (c != EOF) ; return (optind); } /*************************************** * * help Provide "basic" on-line user help. * * Purpose To assist users who might get lost. (RTFM). * * Parameters None. * * Returns None. * */ void help (void) { if ((!strcmp (vtbasename, "vtprton")) || (!strcmp (vtbasename, "vtprtoff"))) fprintf (stderr, "Usage: %s [ -dDeEhlqQNtvw ] \ [ -L vtprintcap ] [ -T termtype ] [ -V device ]\n", vtbasename); else fprintf (stderr, "Usage: %s [ -bBcCdDeEfFhlnNqQtvW ] \ [ -L vtprintcap ] [ -T termtype ] [ -V device ] [ filename... ]\n", vtbasename); fprintf (stderr, "\nPlease see the %s(%s) manual page for more\n", vtbasename,MAN_SECT); fprintf (stderr, "information about the meaning of these options.\n"); } /*************************************** * * intro Provides a brief intro to vtprint. * * Purpose Displayed whenever user starts vtprint. * * Parameters None. * * Returns None. * */ void intro (void) { fprintf (stderr, "\n*** %s (v%s) ***\n\n", vtbasename, VERSION_NO); fprintf (stderr, "Copyright 1993-1994, Garrett D'Amore\n"); fprintf (stderr, "Last revised %s.\n\n", VERSION_DT); fprintf (stderr, "NO WARRANTY! Use \"%s -w\" for info.\n", vtbasename); fprintf (stderr, "Freely redistributable. Use \"%s -l\" for info.\n\n", vtbasename); return; } void warranty (void) { fprintf (stderr, "%s: This program is provided entirely without\n", vtbasename); fprintf (stderr, "%s: warranty! The user agrees to indemnify the\n", vtbasename); fprintf (stderr, "%s: author from any claim of damage or loss that\n", vtbasename); fprintf (stderr, "%s: may result from the use of or inability to\n", vtbasename); fprintf (stderr, "%s: use this program.\n\n", vtbasename); } void license (void) { fprintf (stderr, "%s: This program is copyrighted material. The user\n", vtbasename); fprintf (stderr, "%s: is given the non-exclusive right to use, modify\n", vtbasename); fprintf (stderr, "%s: and redistribute this program or any derived\n", vtbasename); fprintf (stderr, "%s: work, subject to the following limitation:\n\n", vtbasename); fprintf (stderr, "%s: All copyright notices and warranty disclaimers\n", vtbasename); fprintf (stderr, "%s: must be left intact! The user may not claim \n", vtbasename); fprintf (stderr, "%s: credit for code written by the author.\n\n", vtbasename); } /*************************************** * * vtprintcap Loads a vtprintcap description for use. * * Purpose Allows use of user-defined printer control codes. * * Parameters None. * * Returns zero on successful lookup, * one on lookup failure, * negative one on file open failure, * negative two on file parse error. * */ int vtprintcap () { FILE *libfile; char buffer [1025]; static char on [1025]; static char off [1025]; char *temp = NULL; if ((!termname)||(!*termname)) termname = getenv ("TERM"); libfile = fopen (libtermname, "r"); if (!libfile) return (-1); while (fgets (buffer, 1024, libfile)) { if (buffer[0] == '#') buffer [0] = '\0'; temp = strchr (buffer,'\n'); if (temp) *temp = '\0'; temp = strtok (buffer, ", \t"); while (temp) { if (!strcmp (temp, termname)) break; temp = strtok (NULL, ", \t"); } if (temp) break; } if (temp) { if (!fgets (on, 1025, libfile)) { fclose (libfile); return (-2); } if (!fgets (off, 1025, libfile)) { fclose (libfile); return (-2); } fclose (libfile); /* verify no illegal substitution formats are present */ if (on [strlen (on)-1] == '\n') on [strlen (on) - 1] = '\0'; if (off [strlen (off)-1] == '\n') off [strlen (off) -1 ] = '\0'; temp = on; while (temp) { temp = strchr (temp, '%'); if (temp) { if (temp[1] != '%') return (-2); temp += 2; } } temp = off; while (temp) { temp = strchr (temp, '%'); if (temp) { if (temp[1] != '%') return (-2); temp += 2; } } if (!escape (on)) return (-2); if (!escape (off)) return (-2); ptr_on = on; ptr_off = off; return 0; }; fclose (libfile); return 1; } /* >>>>>>>>>> Main <<<<<<<<<< */ int main (int argc, char *argv[]) { char *tmp; char *env; int result; int cnt = 0; int total; arglist args; args.argv = NULL; /* what are we called? */ vtbasename = strrchr (argv[0],'/'); vtbasename = (vtbasename ? vtbasename+1 : argv[0]); /* set up the environment variable properly */ tmp = getenv (vtbasename); if (!tmp) tmp = getenv ("VTPRINT"); if (!tmp) tmp = ""; env = (char *) malloc (strlen (tmp) + 1); if (!env) { fprintf (stderr,"%s: Out of memory!\n", vtbasename); exit (1); } strcpy (env, tmp); /* now we go through getopt (twice actually) */ /* first for the environment variable (if present) */ if (env) { string2arglist (env, &args); process_opts (&args); } /* then command line parameters */ argv2arglist (argc, argv, &args); process_opts (&args); if (!dowork) exit(0); /* display intro on screen */ if (!quiet) intro(); /* get library file settings if needed */ if (!builtin) { result = vtprintcap (); switch (result) { case -2 : { if ((!quiet) && (!forcenv)) { fprintf (stderr, "%s: Parse error in %s, using builtin codes.\n", vtbasename, libtermname); } else if (forcenv) { fprintf (stderr, "%s: Parse error in %s!\n", vtbasename, libtermname); exit(1); } break; } case -1 : { if ((!quiet) && (!forcenv)) { fprintf (stderr, "%s: Can't open %s, using builtin codes.\n", vtbasename, libtermname); } else if (forcenv) { fprintf (stderr, "%s: Can't open %s!\n", vtbasename, libtermname); exit (1); } break; } case 0 : { if (!quiet) { fprintf (stderr, "%s: Using %s control codes.\n", vtbasename, termname); } break; } case 1 : { if ((!quiet) && (!forcenv)) { fprintf (stderr, "%s: Terminal %s unknown, using builtin codes.\n", vtbasename, termname); } else if (forcenv) { fprintf (stderr, "%s: Terminal %s unknown!\n", vtbasename, termname); exit(1); } break; } default : { fprintf (stderr, "%s: INTERNAL ERROR!!\n", vtbasename); abort(); } } } /* set up the output file descriptor */ if (device) { outfile = fopen (devname, "w"); if (!outfile) { fprintf (stderr, "%s: Failed to open %s for writing!\n", vtbasename, devname); exit (1); } if (!quiet) fprintf (stderr,"%s: Using %s for output.\n", vtbasename, devname); } else { outfile = stdout; if (!quiet) fprintf (stderr, "%s: Using for output.\n", vtbasename); } /* special handling for vtprton and vtprtoff */ if (!strcmp (vtbasename, "vtprton")) { fflush (outfile); fprintf (outfile, ptr_on); fflush (outfile); exit (0); } if (!strcmp (vtbasename, "vtprtoff")) { fflush (outfile); fprintf (outfile, ptr_off); fflush (outfile); exit (0); } /* deal with terminal states */ if (isatty (fileno(outfile))) { save_termstate(fileno (outfile), &oldstate); state_saved = 1; memcpy ((char *) &newstate, (char *) &oldstate, sizeof (termstate)); if (binary) { raw_termstate(&newstate); restore_termstate (fileno (outfile), &newstate); } } else { binary = 0; /* force this! */ } if (!quiet) { fprintf (stderr, "%s: Output flags: ", vtbasename); if (builtin) fprintf (stderr, "builtin "); if (binary) fprintf (stderr, "binary "); if (ffeed) fprintf (stderr, "formfeed "); if (stripcr) fprintf (stderr, "noCR "); if (addcr) fprintf (stderr, "addCR "); fprintf (stderr, "\n"); fflush (stderr); } /* establish signal handlers */ signal (SIGHUP, sighandler); signal (SIGQUIT, sighandler); signal (SIGTSTP, sighandler); signal (SIGINT, sighandler); signal (SIGTERM, sighandler); total = argc - optind; /* the main processing loop */ do { int ch; int lastch = 0; FILE *infile; if (optind == argc) infile = stdin; else infile = fopen (argv[optind], "r"); if (!infile) { fprintf (stderr, "%s: Couldn't open %s for reading.\n", vtbasename, argv[optind]); optind++; continue; } fflush (outfile); fprintf (outfile, ptr_on); fflush (outfile); while ((ch = fgetc (infile)) != EOF) { switch (ch) { case CR : { if (!stripcr) fputc (ch, outfile); break; } case LF : { if ((lastch != CR) && (addcr)) fputc (CR, outfile); fputc (ch, outfile); break; } default : { if ((lastch == CR) && (stripcr)) fputc (CR, outfile); fputc (ch, outfile); break; } } lastch = ch; } fclose (infile); if (ffeed) fputc (FF, outfile); fprintf (outfile, ptr_off); fflush (outfile); cnt++; if (!quiet) { if (argc == optind) fprintf (stderr, "%s: Printed .\n", vtbasename); else fprintf (stderr, "%s: Printed %s.\n", vtbasename, argv[optind]); } optind++; } while (optind < argc); if (state_saved) restore_termstate (fileno (outfile), &oldstate); if (!quiet) fprintf (stderr, "%s: Successfully printed %d file%s (%d specified).\n", vtbasename, cnt, cnt == 1 ? "" : "s", total); return 0; } (off)-1] == '\n') off [strlen (off) -1 ] = '\0'; temp = on; while (temp) { temp = strchr (temp, '%'); if (temp) { if (temp[1] != '%') return (-2); temp += 2; } } temp = ovtprint-2.0.2/vtprint.man 644 164 12 26241 5653371654 10514 VTPRINT(1) USER COMMANDS VTPRINT(1) NNAAMMEE vtprint - print files from UNIX host to printer attached to local terminal SSYYNNOOPPSSIISS vvttpprriinntt [ --bbBBccCCddDDeeEEffFFhhllnnNNqqQQttvvww ] [ --LL _v_t_p_r_i_n_t_c_a_p ] [ --TT _t_e_r_m_t_y_p_e ] [ --VV _d_e_v_i_c_e ] [ _f_i_l_e_n_a_m_e_._._. ] DDEESSCCRRIIPPTTIIOONN vvttpprriinntt is a simple filter that prints ASCII text to a printer connected to a terminal or terminal emulator. It uses terminal escape sequences to print, and can substi- tute for llpprr(1) in circumstances where the printer is not connected directly to the host or available via TCP/IP. OOPPTTIIOONNSS --bb Causes vvttpprriinntt to open the output stream in binary modes, overriding any automatic postprocessing done by the host (e.g. CR/LF translations). This has no effect if the output stream is not a tty device. --BB Undoes the effect of the --bb option. Note that this does _n_o_t open the output stream in text mode if it would not normally be opened in that mode. --cc Causes vvttpprriinntt to append any linefeeds (ASCII 0xA) with carriage returns (ASCII 0xD). This is useful for printing data from a UNIX or similiar host to an MS-DOS system's printer that expects CR/LF line termination. --CC Causes vvttpprriinntt to pass all carriage returns and linefeeds unmodified. --dd Use the tty device file instead of stdout for out- put. This is defined as //ddeevv//ttttyy on this system. (This is operating system specific and may vary from system to system.) This is useful for using vvttpprriinntt as a pipe called by programs that suppress or redirect the stdout stream of the pipe or print- ing process. --DD Use the stdout stream for output, rather than a tty device file. --ee Forces vvttpprriinntt to ignore the TERM environment vari- able and use the builtin control codes instead. --EE Undoes the effect of the --ee option, which allows vvttpprriinntt to attempt to find an entry in //uussrr//llooccaall//lliibb//vvttpprriinntt//vvttpprriinnttccaapp for the TERM value and use the corresponding control codes. --ff Requests vvttpprriinntt to suppress inclusion of formfeeds vtprint v2.0.2 25 October 1994 1 VTPRINT(1) USER COMMANDS VTPRINT(1) (ASCII 0xC) between multiple files. Note that this has no affect on any formfeeds that may be present in the input files already. --FF Requests vvttpprriinntt to include formfeeds between mul- tiple files specified on the command-line and at the end of the last file printed. --hh Print out a simple usage message. --ll Print out the vvttpprriinntt license agreement. --LL _v_t_p_r_i_n_t_c_a_p Specifies an alternate file to use instead of //uussrr//llooccaall//lliibb//vvttpprriinntt//vvttpprriinnttccaapp. --nn Causes vvttpprriinntt to strip the CR from any CR/LF sequences. This will not affect handling of any CRs present elsewhere in the file. --NN Causes vvttpprriinntt to pass all carriage returns and linefeeds unmodified. --qq Quiet mode. Suppress various status messages from being displayed, useful in situations where vvttpprriinntt is used as part of a shell script, for example. --QQ Cancels the effect of the --qq option, allowing nor- mal progress reporting to occur. --tt Force the use of the TERM variable to perform a look up of the control sequences to be used in //uussrr//llooccaall//lliibb//vvttpprriinntt//vvttpprriinnttccaapp. If an entry in that file can't be found, vvttpprriinntt will abort with an error. --TT _t_e_r_m_t_y_p_e Use the value of _t_e_r_m_t_y_p_e instead of the value of the TERM environment variable when performing lookups in //uussrr//llooccaall//lliibb//vvttpprriinntt//vvttpprriinnttccaapp. --vv Display version information. --VV _d_e_v_i_c_e Specifies an alternate device file instead of //ddeevv//ttttyy to use. --ww Display important warranty waiver information. NO WARRANTY! ---- This option changes no special operational parame- ters of vvttpprriinntt.. But it does indicate to the pro- gram that all of the command-line arguments which follow are to be parsed as filenames, even if they vtprint v2.0.2 25 October 1994 2 VTPRINT(1) USER COMMANDS VTPRINT(1) begin with a dash. Hence to process a single file with the name "file" you would call vvttpprriinntt as " vvttpprriinntt -- -file". EENNVVIIRROONNMMEENNTT TERM the type of the terminal vvttpprriinntt will assume is being used. VTPRINT string of options to be used by vvttpprriinntt.. AAUUTTHHOORR vvttpprriinntt was written by Garrett D'Amore, on December 27, 1993 and last modified on October 25, 1994. It is heavily derived from a similar program, called llpprriinntt,, by the same author. He can be reached via Internet e-mail at gar- rett@sciences.sdsu.edu. DDIISSTTRRIIBBUUTTIIOONN The latest version of vvttpprriinntt can be obtained by anonymous ftp at ftp.sdsu.edu in the //ppuubb//vvttpprriinntt directory. Please read the IINNDDEEXX and RREEAADDMMEE files before downloading. If you do not have ftp availability, then you can request a uuencoded copy of vvttpprriinntt be sent to you via e-mail from the author. The author is also willing to make other arrangements as needed, within certain limitations. MMAAIILLIINNGG LLIISSTT A mailing list for the discussion of topics related to and about vvttpprriinntt exists. To subscribe to this mailing list, send a message to "vtprint-request@sdsu.edu" with the word "subscribe" as the body. An automated list server will reply with information about the mailing list. CCOOPPYYRRIIGGHHTT vvttpprriinntt is copyrighted 1994, by Garrett D'Amore. It may be freely redistributed or modified, so long as this and any other copyright notices are included in their original form with the program. The user is granted the right to use this program without limitation. DDIISSCCLLAAIIMMEERR vvttpprriinntt is provided WITHOUT WARRANTY. The user agrees to indemnify the author from any claims of damage or loss arising from the use of or inability to use this program. In other words, USE AT YOUR OWN RISK! CCAAVVEEAATTSS vvttpprriinntt cannot be used to print files containing non- printable characters, as these may cause conflicts with the terminal or emulator used. When used over a serial (modem) connection, vvttpprriinntt may vtprint v2.0.2 25 October 1994 3 VTPRINT(1) USER COMMANDS VTPRINT(1) not work properly unless hardware (CTS/RTS) flow control is used. This is due to the fact that most printers are slower than serial connections in common use. vvttpprriinntt uses terminal escape sequences to print, and not all terminal emulators support these sequences, and of those that do, some support it differently. You can find a listing of some of the programs known to work and not to work with vvttpprriinntt in the file CCOOMMPPAATT.. The best thing to do is try your particular emulator, and find out if it works. The author would appreciate any reports of success or failure, or strange behavior. You can send those to him via Internet e-mail. (See the AAUUTTHHOORR chapter for how to reach him.) The //uussrr//llooccaall//lliibb//vvttpprriinntt//vvttpprriinnttccaapp file is still largely incomplete. The author would very much appreciate it if individuals with more information different termi- nals would get in contact with him so that support can be added for these terminals in the master archive. Do _n_o_t background this program, as it has no way of know- ing when it is in the background and when it is in the foreground. This will result in your foreground process' output being printed as well as the output from vvttpprriinntt.. FFIILLEESS //uussrr//llooccaall//lliibb//vvttpprriinntt//vvttpprriinnttccaapp TTOODDOOSS Fix any bugs present, clean-up the documentation, continue to build upon entries in the CCOOMMPPAATT and //uussrr//llooccaall//lliibb//vvttpprriinntt//vvttpprriinnttccaapp files, and finally, finish getting a college education! BBUUGGSS vvttpprriinntt doesn't handle some signals properly, especially the SIGKILL and SIGSTOP signals, which can't be caught anyway. Also it doesn't check to see if you have back- grounded the process. The resulting condition may leave all output directed to the printer instead of the screen. The fix for this condition is to run the provided vvttpprrttooffff program with no arguments, which will restore normal screen output. (You probably won't be able to see what you're typing while you start vvttpprrttooffff from the shell.) SSEEEE AALLSSOO llpprr(1), vvttpprriinnttccaapp(5), vvttpprrttooffff(1) vtprint v2.0.2 25 October 1994 4 -FF Requests vvttpprriinntt to include formfeeds between mul- tiple files specified on the command-line and at the end of the last file printed. --hh Print out a simple usage message. --ll Print out the vvttpprriinntt license agreement. --LL _v_t_p_r_i_n_vtprint-2.0.2/vtprint.ps 644 164 12 46236 5653371654 10371 %!PS-Adobe-3.0 %%Creator: groff version 1.09 %%CreationDate: Tue Oct 25 23:03:46 1994 %%DocumentNeededResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%DocumentSuppliedResources: procset grops 1.09 0 %%Pages: 3 %%PageOrder: Ascend %%Orientation: Portrait %%EndComments %%BeginProlog %%BeginResource: procset grops 1.09 0 /setpacking where{ pop currentpacking true setpacking }if /grops 120 dict dup begin /SC 32 def /A/show load def /B{0 SC 3 -1 roll widthshow}bind def /C{0 exch ashow}bind def /D{0 exch 0 SC 5 2 roll awidthshow}bind def /E{0 rmoveto show}bind def /F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def /G{0 rmoveto 0 exch ashow}bind def /H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /I{0 exch rmoveto show}bind def /J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def /K{0 exch rmoveto 0 exch ashow}bind def /L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /M{rmoveto show}bind def /N{rmoveto 0 SC 3 -1 roll widthshow}bind def /O{rmoveto 0 exch ashow}bind def /P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /Q{moveto show}bind def /R{moveto 0 SC 3 -1 roll widthshow}bind def /S{moveto 0 exch ashow}bind def /T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def /SF{ findfont exch [exch dup 0 exch 0 exch neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /MF{ findfont [5 2 roll 0 3 1 roll neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /level0 0 def /RES 0 def /PL 0 def /LS 0 def /PLG{ gsave newpath clippath pathbbox grestore exch pop add exch pop }bind def /BP{ /level0 save def 1 setlinecap 1 setlinejoin 72 RES div dup scale LS{ 90 rotate }{ 0 PL translate }ifelse 1 -1 scale }bind def /EP{ level0 restore showpage }bind def /DA{ newpath arcn stroke }bind def /SN{ transform .25 sub exch .25 sub exch round .25 add exch round .25 add exch itransform }bind def /DL{ SN moveto SN lineto stroke }bind def /DC{ newpath 0 360 arc closepath }bind def /TM matrix def /DE{ TM currentmatrix pop translate scale newpath 0 0 .5 0 360 arc closepath TM setmatrix }bind def /RC/rcurveto load def /RL/rlineto load def /ST/stroke load def /MT/moveto load def /CL/closepath load def /FL{ currentgray exch setgray fill setgray }bind def /BL/fill load def /LW/setlinewidth load def /RE{ findfont dup maxlength 1 index/FontName known not{1 add}if dict begin { 1 index/FID ne{def}{pop pop}ifelse }forall /Encoding exch def dup/FontName exch def currentdict end definefont pop }bind def /DEFS 0 def /EBEGIN{ moveto DEFS begin }bind def /EEND/end load def /CNT 0 def /level1 0 def /PBEGIN{ /level1 save def translate div 3 1 roll div exch scale neg exch neg exch translate 0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit []0 setdash /setstrokeadjust where{ pop false setstrokeadjust }if /setoverprint where{ pop false setoverprint }if newpath /CNT countdictstack def userdict begin /showpage{}def }bind def /PEND{ clear countdictstack CNT sub{end}repeat level1 restore }bind def end def /setpacking where{ pop setpacking }if %%EndResource %%IncludeResource: font Times-Roman %%IncludeResource: font Times-Bold %%IncludeResource: font Times-Italic grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron /scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent /ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen /period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon /semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O /P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex /underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y /z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft /guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl /endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut /dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash /quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen /brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft /logicalnot/minus/registered/macron/degree/plusminus/twosuperior /threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior /ordmasculine/guilsinglright/onequarter/onehalf/threequarters /questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE /Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn /germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla /egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis /eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash /ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def /Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE /Times-Roman@0 ENC0/Times-Roman RE %%EndProlog %%Page: 1 1 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 134.145(VTPRINT\(1\) USER)72 48 R 134.145 (COMMANDS VTPRINT\(1\))2.5 F/F1 9/Times-Bold@0 SF -.18(NA)72 84 S(ME).18 E F0(vtprint \255 print \214les from UNIX host to printer attached to l\ ocal terminal)108 96 Q F1(SYNOPSIS)72 112.8 Q/F2 10/Times-Bold@0 SF (vtprint)108 124.8 Q F0([)2.5 E F2(\255bBcCdDeEfFhlnNqQtvw)2.5 E F0 2.5 (][)2.5 G F2A/F3 10/Times-Italic@0 SF(vtprintcap)2.5 E F0 2.5(][) 2.5 G F2A F3(termtype)2.5 E F0 2.5(][)2.5 G F2A F3(de)2.5 E (vice)-.15 E F0 2.5(][)2.5 G F3(\214lename)A(...)-.15 E F0(])5 E F1 (DESCRIPTION)72 141.6 Q F2(vtprint)108 153.6 Q F0 .334 (is a simple \214lter that prints ASCII te)2.835 F .334 (xt to a printer connected to a terminal or terminal emulator)-.15 F 5.334(.I)-.55 G(t)-5.334 E .495 (uses terminal escape sequences to print, and can substitute for)108 165.6 R F2(lpr)2.995 E F0 .495 (\(1\) in circumstances where the printer is)B (not connected directly to the host or a)108 177.6 Q -.25(va)-.2 G (ilable via TCP/IP).25 E(.)-1.11 E F1(OPTIONS)72 194.4 Q F2108 206.4 Q F0(Causes)24.74 E F2(vtprint)3 E F0 .499 (to open the output stream in binary modes, o)3 F -.15(ve)-.15 G .499 (rriding an).15 F 2.999(ya)-.15 G .499(utomatic postprocess-)-2.999 F .461(ing done by the host \(e.g. CR/LF translations\).)144 218.4 R .462 (This has no ef)5.461 F .462(fect if the output stream is not a tty)-.25 F(de)144 230.4 Q(vice.)-.25 E F2108 247.2 Q F0 .317(Undoes the ef) 23.63 F .317(fect of the)-.25 F F22.817 E F0 2.816(option. Note) 2.817 F .316(that this does)2.816 F F3(not)2.816 E F0 .316 (open the output stream in te)2.816 F .316(xt mode if)-.15 F(it w)144 259.2 Q(ould not normally be opened in that mode.)-.1 E F2108 276 Q F0(Causes)25.86 E F2(vtprint)3.102 E F0 .603(to append an)3.102 F 3.103(yl)-.15 G .603 (inefeeds \(ASCII 0xA\) with carriage returns \(ASCII 0xD\).)-3.103 F .603(This is)5.603 F .387(useful for printing data from a UNIX or simil\ iar host to an MS-DOS system')144 288 R 2.887(sp)-.55 G .386 (rinter that e)-2.887 F(xpects)-.15 E(CR/LF line termination.)144 300 Q F2108 316.8 Q F0(Causes)23.08 E F2(vtprint)2.5 E F0 (to pass all carriage returns and linefeeds unmodi\214ed.)2.5 E F2 108 333.6 Q F0 .032(Use the tty de)24.74 F .032 (vice \214le instead of stdout for output.)-.25 F .032 (This is de\214ned as)5.032 F F2(/de)2.532 E(v/tty)-.15 E F0 .033 (on this system. \(This)2.533 F .202 (is operating system speci\214c and may v)144 345.6 R .201 (ary from system to system.\) This is useful for using)-.25 F F2 (vtprint)2.701 E F0 .183(as a pipe called by programs that suppress or \ redirect the stdout stream of the pipe or printing pro-)144 357.6 R (cess.)144 369.6 Q F2108 386.4 Q F0 (Use the stdout stream for output, rather than a tty de)23.08 E (vice \214le.)-.25 E F2108 403.2 Q F0 -.15(Fo)25.86 G(rces).15 E F2(vtprint)2.587 E F0 .087(to ignore the TERM en)2.587 F .086 (vironment v)-.4 F .086(ariable and use the b)-.25 F .086 (uiltin control codes instead.)-.2 F F2108 420 Q F0 3.298 (Undoes the ef)23.63 F 3.298(fect of the)-.25 F F25.799 E F0 3.299 (option, which allo)5.799 F(ws)-.25 E F2(vtprint)5.799 E F0 3.299 (to attempt to \214nd an entry in)5.799 F F2 (/usr/local/lib/vtprint/vtprintcap)144 432 Q F0(for the TERM v)2.5 E (alue and use the corresponding control codes.)-.25 E F2108 448.8 Q F0(Requests)26.97 E F2(vtprint)3.744 E F0 1.243(to suppress inclusion\ of formfeeds \(ASCII 0xC\) between multiple \214les.)3.744 F(Note)6.243 E(that this has no af)144 460.8 Q(fect on an)-.25 E 2.5(yf)-.15 G (ormfeeds that may be present in the input \214les already)-2.5 E(.)-.65 E F2108 477.6 Q F0(Requests)24.19 E F2(vtprint)3.235 E F0 .735(to\ include formfeeds between multiple \214les speci\214ed on the command-\ line and)3.235 F(at the end of the last \214le printed.)144 489.6 Q F2 108 506.4 Q F0(Print out a simple usage message.)24.74 E F2 108 523.2 Q F0(Print out the)27.52 E F2(vtprint)2.5 E F0 (license agreement.)2.5 E F2108 540 Q F3(vtprintcap)2.5 E F0 (Speci\214es an alternate \214le to use instead of)144 552 Q F2 (/usr/local/lib/vtprint/vtprintcap)2.5 E F0(.)A F2108 568.8 Q F0 (Causes)24.74 E F2(vtprint)3.328 E F0 .828(to strip the CR from an)3.328 F 3.328(yC)-.15 G .827(R/LF sequences.)-3.328 F .827(This will not af) 5.827 F .827(fect handling of an)-.25 F(y)-.15 E(CRs present else)144 580.8 Q(where in the \214le.)-.25 E F2108 597.6 Q F0(Causes)23.08 E F2(vtprint)2.5 E F0 (to pass all carriage returns and linefeeds unmodi\214ed.)2.5 E F2 108 614.4 Q F0 1.102(Quiet mode.)24.74 F 1.102(Suppress v)6.102 F 1.103 (arious status messages from being displayed, useful in situations wher\ e)-.25 F F2(vtprint)144 626.4 Q F0 (is used as part of a shell script, for e)2.5 E(xample.)-.15 E F2 108 643.2 Q F0(Cancels the ef)22.52 E(fect of the)-.25 E F22.5 E F0(option, allo)2.5 E(wing normal progress reporting to occur)-.25 E(.) -.55 E F2108 660 Q F0 -.15(Fo)26.97 G .794 (rce the use of the TERM v).15 F .794 (ariable to perform a look up of the control sequences to be used in) -.25 F F2(/usr/local/lib/vtprint/vtprintcap)144 672 Q F0 5.105(.I)C 2.605(fa)-5.105 G 2.605(ne)-2.605 G .105(ntry in that \214le can')-2.605 F 2.605(tb)-.18 G 2.605(ef)-2.605 G(ound,)-2.605 E F2(vtprint)2.605 E F0 .105(will abort with an)2.605 F(error)144 684 Q(.)-.55 E F2108 700.8 Q F3(termtype)2.5 E F0 .538(Use the v)144 712.8 R .538(alue of) -.25 F F3(termtype)3.038 E F0 .538(instead of the v)3.038 F .538 (alue of the TERM en)-.25 F .538(vironment v)-.4 F .538 (ariable when perform-)-.25 F(ing lookups in)144 724.8 Q F2 (/usr/local/lib/vtprint/vtprintcap)2.5 E F0(.)A(vtprint v2.0.2)72 768 Q (25 October 1994)146.225 E(1)195.395 E EP %%Page: 2 2 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 134.145(VTPRINT\(1\) USER)72 48 R 134.145 (COMMANDS VTPRINT\(1\))2.5 F/F1 10/Times-Bold@0 SF108 84 Q F0 (Display v)25.3 E(ersion information.)-.15 E F1108 100.8 Q/F2 10 /Times-Italic@0 SF(de)2.5 E(vice)-.15 E F0(Speci\214es an alternate de) 144 112.8 Q(vice \214le instead of)-.25 E F1(/de)2.5 E(v/tty)-.15 E F0 (to use.)2.5 E F1108 129.6 Q F0(Display important w)23.08 E (arranty w)-.1 E(ai)-.1 E -.15(ve)-.25 G 2.5(ri).15 G 2.5 (nformation. NO)-2.5 F -1.2(WA)2.5 G(RRANTY!)1.2 E F1108 146.4 Q F0 .422(This option changes no special operational parameters of)24.6 F F1(vtprint.)2.922 E F0 .422(But it does indicate to the pro-)5.422 F .692(gram that all of the command-line ar)144 158.4 R .692 (guments which follo)-.18 F 3.192(wa)-.25 G .692 (re to be parsed as \214lenames, e)-3.192 F -.15(ve)-.25 G 3.191(ni).15 G(f)-3.191 E(the)144 170.4 Q 2.775(yb)-.15 G -.15(eg)-2.775 G .275 (in with a dash.).15 F .275 (Hence to process a single \214le with the name "\214le" you w)5.275 F .275(ould call)-.1 F F1(vtprint)2.775 E F0(as ")144 182.4 Q F1(vtprint) 2.5 E F0 2.55 F/F3 9/Times-Bold@0 SF(ENVIR)72 199.2 Q(ONMENT)-.27 E F0 5.72(TERM the)108 211.2 R(type of the terminal)2.5 E F1(vtprint)2.5 E F0(will assume is being used.)2.5 E(VTPRINT)108 228 Q (string of options to be used by)144 240 Q F1(vtprint.)2.5 E F3 -.45(AU) 72 256.8 S(THOR).45 E F1(vtprint)108 268.8 Q F0 -.1(wa)2.693 G 2.693(sw) .1 G .193(ritten by Garrett D'Amore, on December 27, 1993 and last modi\ \214ed on October 25, 1994.)-2.693 F(It)5.192 E .026(is hea)108 280.8 R .026(vily deri)-.2 F -.15(ve)-.25 G 2.526(df).15 G .026 (rom a similar program, called)-2.526 F F1(lprint,)2.526 E F0 .026 (by the same author)2.526 F 5.026(.H)-.55 G 2.526(ec)-5.026 G .026 (an be reached via Internet)-2.526 F(e-mail at g)108 292.8 Q (arrett@sciences.sdsu.edu.)-.05 E F3(DISTRIB)72 309.6 Q(UTION)-.09 E F0 .737(The latest v)108 321.6 R .737(ersion of)-.15 F F1(vtprint)3.237 E F0 .736(can be obtained by anon)3.236 F .736 (ymous ftp at ftp.sdsu.edu in the)-.15 F F1(/pub/vtprint)3.236 E F0 (direc-)3.236 E(tory)108 333.6 Q 5(.P)-.65 G(lease read the)-5 E F1 (INDEX)2.5 E F0(and)2.5 E F1(README)2.5 E F0(\214les before do)2.5 E (wnloading.)-.25 E .49(If you do not ha)108 350.4 R .79 -.15(ve f)-.2 H .49(tp a).15 F -.25(va)-.2 G(ilability).25 E 2.99(,t)-.65 G .49 (hen you can request a uuencoded cop)-2.99 F 2.99(yo)-.1 G(f)-2.99 E F1 (vtprint)2.99 E F0 .49(be sent to you via e-)2.99 F .16 (mail from the author)108 362.4 R 5.16(.T)-.55 G .16 (he author is also willing to mak)-5.16 F 2.659(eo)-.1 G .159 (ther arrangements as needed, within certain limi-)-2.659 F(tations.)108 374.4 Q F3(MAILING LIST)72 391.2 Q F0 3.003(Am)108 403.2 S .504 (ailing list for the discussion of topics related to and about)-3.003 F F1(vtprint)3.004 E F0 -.15(ex)3.004 G 3.004(ists. T).15 F 3.004(os)-.8 G .504(ubscribe to this mailing)-3.004 F .837 (list, send a message to "vtprint-request@sdsu.edu" with the w)108 415.2 R .836(ord "subscribe" as the body)-.1 F 5.836(.A)-.65 G 3.336(na)-5.836 G(utomated)-3.336 E(list serv)108 427.2 Q (er will reply with information about the mailing list.)-.15 E F3 (COPYRIGHT)72 444 Q F1(vtprint)108 456 Q F0 .98(is cop)3.48 F .98 (yrighted 1994, by Garrett D'Amore.)-.1 F .981 (It may be freely redistrib)5.981 F .981(uted or modi\214ed, so long as) -.2 F 1.656(this and an)108 468 R 4.156(yo)-.15 G 1.656(ther cop)-4.156 F 1.655 (yright notices are included in their original form with the program.) -.1 F 1.655(The user is)6.655 F (granted the right to use this program without limitation.)108 480 Q F3 (DISCLAIMER)72 496.8 Q F1(vtprint)108 508.8 Q F0 .194(is pro)2.694 F .194(vided WITHOUT W)-.15 F(ARRANTY)-1.2 E 5.194(.T)-1.29 G .195 (he user agrees to indemnify the author from an)-5.194 F 2.695(yc)-.15 G .195(laims of)-2.695 F .948(damage or loss arising from the use of or i\ nability to use this program.)108 520.8 R .947(In other w)5.947 F .947 (ords, USE A)-.1 F 3.447(TY)-1.11 G(OUR)-3.747 E -.35(OW)108 532.8 S 2.5 (NR).35 G(ISK!)-2.5 E F3(CA)72 549.6 Q(VEA)-1.305 E(TS)-.855 E F1 (vtprint)108 561.6 Q F0 .508(cannot be used to print \214les containing\ non-printable characters, as these may cause con\215icts with)3.008 F (the terminal or emulator used.)108 573.6 Q .445(When used o)108 590.4 R -.15(ve)-.15 G 2.945(ras).15 G .445(erial \(modem\) connection,)-2.945 F F1(vtprint)2.945 E F0 .445(may not w)2.945 F .445 (ork properly unless hardw)-.1 F .445(are \(CTS/R)-.1 F(TS\))-.6 E<8d6f> 108 602.4 Q 2.595(wc)-.25 G .095(ontrol is used.)-2.595 F .095 (This is due to the f)5.095 F .095(act that most printers are slo)-.1 F .096(wer than serial connections in common)-.25 F(use.)108 614.4 Q F1 (vtprint)108 631.2 Q F0 1.179(uses terminal escape sequences to print, \ and not all terminal emulators support these sequences,)3.68 F .506 (and of those that do, some support it dif)108 643.2 R(ferently)-.25 E 5.506(.Y)-.65 G .506 (ou can \214nd a listing of some of the programs kno)-6.606 F .506 (wn to)-.25 F -.1(wo)108 655.2 S .325(rk and not to w).1 F .325 (ork with)-.1 F F1(vtprint)2.825 E F0 .325(in the \214le)2.825 F F1 (COMP)2.825 E -1.5 -.95(AT .)-.74 H F0 .324 (The best thing to do is try your particular emula-)6.274 F(tor)108 667.2 Q 4.082(,a)-.4 G 1.582(nd \214nd out if it w)-4.082 F 4.083 (orks. The)-.1 F 1.583(author w)4.083 F 1.583(ould appreciate an)-.1 F 4.083(yr)-.15 G 1.583(eports of success or f)-4.083 F 1.583 (ailure, or strange)-.1 F(beha)108 679.2 Q(vior)-.2 E 6.338(.Y)-.55 G 1.338(ou can send those to him via Internet e-mail.)-7.438 F 1.338 (\(See the)6.338 F F1 -.5(AU)3.837 G(THOR).5 E F0 1.337(chapter for ho) 3.837 F 3.837(wt)-.25 G 3.837(or)-3.837 G(each)-3.837 E(him.\))108 691.2 Q(The)108 708 Q F1(/usr/local/lib/vtprint/vtprintcap)2.704 E F0 .204 (\214le is still lar)2.704 F .204(gely incomplete.)-.18 F .204 (The author w)5.204 F .204(ould v)-.1 F .205(ery much appreci-)-.15 F .236(ate it if indi)108 720 R .236(viduals with more information dif) -.25 F .236(ferent terminals w)-.25 F .236 (ould get in contact with him so that support)-.1 F(vtprint v2.0.2)72 768 Q(25 October 1994)146.225 E(2)195.395 E EP %%Page: 3 3 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 134.145(VTPRINT\(1\) USER)72 48 R 134.145 (COMMANDS VTPRINT\(1\))2.5 F (can be added for these terminals in the master archi)108 84 Q -.15(ve) -.25 G(.).15 E(Do)108 100.8 Q/F1 10/Times-Italic@0 SF(not)2.984 E F0 .484(background this program, as it has no w)2.984 F .484(ay of kno)-.1 F .485(wing when it is in the background and when it is)-.25 F .776 (in the fore)108 112.8 R 3.276(ground. This)-.15 F .775 (will result in your fore)3.276 F .775 (ground process' output being printed as well as the output)-.15 F(from) 108 124.8 Q/F2 10/Times-Bold@0 SF(vtprint.)2.5 E/F3 9/Times-Bold@0 SF (FILES)72 141.6 Q F2(/usr/local/lib/vtprint/vtprintcap)108 153.6 Q F3 -.162(TO)72 170.4 S(DOS).162 E F0 1.452(Fix an)108 182.4 R 3.952(yb)-.15 G 1.452(ugs present, clean-up the documentation, continue to b)-4.152 F 1.452(uild upon entries in the)-.2 F F2(COMP)3.952 E -.95(AT)-.74 G F0 (and)4.902 E F2(/usr/local/lib/vtprint/vtprintcap)108 194.4 Q F0 (\214les, and)2.5 E(\214nally)5 E 2.5<2c8c>-.65 G(nish getting a colle) -2.5 E(ge education!)-.15 E F3 -.09(BU)72 211.2 S(GS).09 E F2(vtprint) 108 223.2 Q F0(doesn')3.156 E 3.156(th)-.18 G .656 (andle some signals properly)-3.156 F 3.155(,e)-.65 G .655 (specially the SIGKILL and SIGST)-3.155 F .655(OP signals, which can') -.18 F(t)-.18 E .06(be caught an)108 235.2 R(yw)-.15 E(ay)-.1 E 5.06(.A) -.65 G .06(lso it doesn')-5.06 F 2.56(tc)-.18 G .06 (heck to see if you ha)-2.56 F .36 -.15(ve b)-.2 H .06 (ackgrounded the process.).15 F .06(The resulting condi-)5.06 F .101 (tion may lea)108 247.2 R .401 -.15(ve a)-.2 H .101 (ll output directed to the printer instead of the screen.).15 F .101 (The \214x for this condition is to run the)5.101 F(pro)108 259.2 Q (vided)-.15 E F2(vtprtoff)3.923 E F0 1.423(program with no ar)3.923 F 1.423(guments, which will restore normal screen output.)-.18 F(\(Y)6.423 E 1.424(ou probably)-1.1 F -.1(wo)108 271.2 S(n').1 E 2.5(tb)-.18 G 2.5 (ea)-2.5 G(ble to see what you')-2.5 E(re typing while you start)-.5 E F2(vtprtoff)2.5 E F0(from the shell.\))2.5 E F3(SEE ALSO)72 288 Q F2 (lpr)108 300 Q F0(\(1\),)A F2(vtprintcap)2.5 E F0(\(5\),)A F2(vtprtoff) 2.5 E F0(\(1\))A(vtprint v2.0.2)72 768 Q(25 October 1994)146.225 E(3) 195.395 E EP %%Trailer end %%EOF .5 E(v/tty)-.15 E F0 (to use.)2.5 E F1108 129.6 Q F0(Display important w)23.08 E (arranty w)-.1 E(ai)-.1 E -.15(ve)-.25 G 2.5(ri).15 G 2.5 (nformation. NO)-2.5 F -1.2(WA)2.5 G(RRANTY!)1.2 E F1108 146.4 Q F0 .422(This option changes no special operational parameters of)24.6 F F1(vtprint.)2.922 E F0 .422(But it does indicate to the pro-)5.422vtprint-2.0.2/vtprint.sed 644 164 12 17671 5653371654 10523 .\" -*- nroff -*- .\" Like TP, but if specified indent is more than half .\" the current line-length - indent, use the default indent. .de Tp .ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP .el .TP "\\$1" .. .TH VTPRINT MAN1_SECT "VER_DY VER_MO VER_YR" "vtprint vVERSION_NO" .SH NAME vtprint \- print files from UNIX host to printer attached to local terminal .SH SYNOPSIS .B vtprint [ .B \-bBcCdDeEfFhlnNqQtvw ] [ .B \-L .I vtprintcap ] [ .B \-T .I termtype ] [ .B \-V .I device ] [ .IR filename\.\.\. ] .SH DESCRIPTION .B vtprint is a simple filter that prints ASCII text to a printer connected to a terminal or terminal emulator. It uses terminal escape sequences to print, and can substitute for .B "LPR_BIN\fR(LPR_SECT)" in circumstances where the printer is not connected directly to the host or available via TCP/IP. .SH OPTIONS .TP .B \-b Causes \fBvtprint\fP to open the output stream in binary modes, overriding any automatic postprocessing done by the host (e.g. CR/LF translations). This has no effect if the output stream is not a tty device. .TP .B \-B Undoes the effect of the \fB\-b\fP option. Note that this does \fInot\fP open the output stream in text mode if it would not normally be opened in that mode. .TP .B \-c Causes \fBvtprint\fP to append any linefeeds (ASCII 0xA) with carriage returns (ASCII 0xD). This is useful for printing data from a UNIX or similiar host to an MS-DOS system's printer that expects CR/LF line termination. .TP .B \-C Causes \fBvtprint\fP to pass all carriage returns and linefeeds unmodified. .TP .B \-d Use the tty device file instead of stdout for output. This is defined as .B DEVTTY on this system. (This is operating system specific and may vary from system to system.) This is useful for using \fBvtprint\fP as a pipe called by programs that suppress or redirect the stdout stream of the pipe or printing process. .TP .B \-D Use the stdout stream for output, rather than a tty device file. .TP .B \-e Forces \fBvtprint\fP to ignore the TERM environment variable and use the builtin control codes instead. .TP .B \-E Undoes the effect of the \fB\-e\fP option, which allows \fBvtprint\fP to attempt to find an entry in \fBLIBFILE\fP for the TERM value and use the corresponding control codes. .TP .B \-f Requests \fBvtprint\fP to suppress inclusion of formfeeds (ASCII 0xC) between multiple files. Note that this has no affect on any formfeeds that may be present in the input files already. .TP .B \-F Requests \fBvtprint\fP to include formfeeds between multiple files specified on the command-line and at the end of the last file printed. .TP .B \-h Print out a simple usage message. .TP .B \-l Print out the \fBvtprint\fP license agreement. .TP .BI \-L " vtprintcap" Specifies an alternate file to use instead of \fBLIBFILE\fP. .TP .B \-n Causes \fBvtprint\fP to strip the CR from any CR/LF sequences. This will not affect handling of any CRs present elsewhere in the file. .TP .B \-N Causes \fBvtprint\fP to pass all carriage returns and linefeeds unmodified. .TP .B \-q Quiet mode. Suppress various status messages from being displayed, useful in situations where \fBvtprint\fP is used as part of a shell script, for example. .TP .B \-Q Cancels the effect of the \fB\-q\fP option, allowing normal progress reporting to occur. .TP .B \-t Force the use of the TERM variable to perform a look up of the control sequences to be used in \fBLIBFILE\fP. If an entry in that file can't be found, \fBvtprint\fP will abort with an error. .TP .BI \-T " termtype" Use the value of \fItermtype\fP instead of the value of the TERM environment variable when performing lookups in \fBLIBFILE\fP. .TP .B \-v Display version information. .TP .BI \-V " device" Specifies an alternate device file instead of \fBDEVTTY\fP to use. .TP .B \-w Display important warranty waiver information. NO WARRANTY! .TP .B \-\- This option changes no special operational parameters of .B vtprint. But it does indicate to the program that all of the command-line arguments which follow are to be parsed as filenames, even if they begin with a dash. Hence to process a single file with the name "file" you would call .B vtprint as " \fBvtprint\fP \-\- \-file". .SH ENVIRONMENT .IP TERM the type of the terminal .B vtprint will assume is being used. .IP VTPRINT string of options to be used by .B vtprint. .SH AUTHOR .B vtprint was written by Garrett D'Amore, on December 27, 1993 and last modified on VER_MO VER_DY, VER_YR. It is heavily derived from a similar program, called .B lprint, by the same author. He can be reached via Internet e-mail at garrett@sciences.sdsu.edu. .SH DISTRIBUTION The latest version of .B vtprint can be obtained by anonymous ftp at ftp.sdsu.edu in the .B /pub/vtprint directory. Please read the .B INDEX and .B README files before downloading. .LP If you do not have ftp availability, then you can request a uuencoded copy of .B vtprint be sent to you via e-mail from the author. The author is also willing to make other arrangements as needed, within certain limitations. .SH MAILING LIST A mailing list for the discussion of topics related to and about \fBvtprint\fP exists. To subscribe to this mailing list, send a message to "vtprint-request@sdsu.edu" with the word "subscribe" as the body. An automated list server will reply with information about the mailing list. .SH COPYRIGHT .B vtprint is copyrighted 1994, by Garrett D'Amore. It may be freely redistributed or modified, so long as this and any other copyright notices are included in their original form with the program. The user is granted the right to use this program without limitation. .SH DISCLAIMER .B vtprint is provided WITHOUT WARRANTY. The user agrees to indemnify the author from any claims of damage or loss arising from the use of or inability to use this program. In other words, USE AT YOUR OWN RISK! .SH CAVEATS .B vtprint cannot be used to print files containing non-printable characters, as these may cause conflicts with the terminal or emulator used. .PP When used over a serial (modem) connection, \fBvtprint\fP may not work properly unless hardware (CTS/RTS) flow control is used. This is due to the fact that most printers are slower than serial connections in common use. .PP .B vtprint uses terminal escape sequences to print, and not all terminal emulators support these sequences, and of those that do, some support it differently. You can find a listing of some of the programs known to work and not to work with .B vtprint in the file .B COMPAT. The best thing to do is try your particular emulator, and find out if it works. The author would appreciate any reports of success or failure, or strange behavior. You can send those to him via Internet e-mail. (See the .B AUTHOR chapter for how to reach him.) .LP The \fBLIBFILE\fP file is still largely incomplete. The author would very much appreciate it if individuals with more information different terminals would get in contact with him so that support can be added for these terminals in the master archive. .LP Do \fInot\fP background this program, as it has no way of knowing when it is in the background and when it is in the foreground. This will result in your foreground process' output being printed as well as the output from .B vtprint. .SH FILES .B LIBFILE .SH TODOS Fix any bugs present, clean-up the documentation, continue to build upon entries in the \fBCOMPAT\fP and \fBLIBFILE\fP files, and finally, finish getting a college education! .SH BUGS .B vtprint doesn't handle some signals properly, especially the SIGKILL and SIGSTOP signals, which can't be caught anyway. Also it doesn't check to see if you have backgrounded the process. The resulting condition may leave all output directed to the printer instead of the screen. The fix for this condition is to run the provided .B vtprtoff program with no arguments, which will restore normal screen output. (You probably won't be able to see what you're typing while you start .B vtprtoff from the shell.) .SH SEE ALSO .B "LPR_BIN\fR(LPR_SECT), " .B "vtprintcap\fR(MAN5_SECT), " .B "vtprtoff\fR(MAN1_SECT)" d8c6c65222e>5 F/F3 9/Times-Bold@0 SF(ENVIR)72 199.2 Q(ONMENT)-.27 E F0 vtprint-2.0.2/vtprintcap 644 164 12 1643 5653371654 10405 # # vtprintcap # # Copyright 1994, Garrett D'Amore # This file contains various escape codes used by terminals # to control their printers. The general format for an entry # looks like this: # # term [,term..] # prt-on code in printf format # prt-off code in printf format # # Please send your updates and corrections to this file to the # vtprint mailing list (vtprint@sdsu.edu). Thank-you! # # Standard DEC/ANSI escape sequences (most common) # vt100, vt102, vt220, ansi \033[5i \033[4i # # A few televideo models, I'm not sure these are correct # or complete, so please test! # tvi950, tvi955, tvi910, tvi914, tvi924, tvi925, tvi920, tvi910+ \033@ \033A # # Here are some other terms people may have laying around. # Please test and get back to me! # wyse50, wyse60, adm31, addsviewpoint, addsviewpoint60 \022 \024 # # Special codes used for debugging vtprint, not for general use. # debug \nprinter-on\007 \007printer-off\n s all carriage returns and linefeeds unmodified. .TP .B \-q Quiet mode. Suppress various stavtprint-2.0.2/vtprintcap.5 644 164 12 6643 5653371654 10555 .\" -*- nroff -*- .\" Like TP, but if specified indent is more than half .\" the current line-length - indent, use the default indent. .de Tp .ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP .el .TP "\\$1" .. .TH VTPRINTCAP 5 "25 October 1994" "vtprint v2.0.2" .SH NAME vtprintcap \- database of terminal printer control codes .SH SYNOPSIS .B /usr/local/lib/vtprint/vtprintcap .SH DESCRIPTION .B vtprintcap is a simple flat file database containing a list of the names of various terminals and the codes those terminals use to start and stop an attached printer (media hard copy). This database is used by \fBvtprint\fP(1) and related programs. .PP Each entry is composed of three lines. The first line is a comma-delimited list of names which may be used to reference this entry. The second line the sequence of characters used by the terminal to turn on an attached hard copy device and redirect output to that device. The third line contains the sequence of characters used to turn the device off and restore normal output to the screen. .PP An entry must have all three lines to be considered valid. Currently no comment lines are permitted to exist between these lines: such lines would be interpreted as the printer control codes themselves! .PP The rules for selecting a terminal name are simple: you must follow the same rules as for \fB/etc/termcap\fP(5) names. Terminal names should be entered in \fB/usr/local/lib/vtprint/vtprintcap\fP with exactly the same names as are in \fB/etc/termcap\fP. .PP The control code strings in the second and third lines of an entry are governed as follows: ANSI C style escapes for character constants (e.g. \\n for newline) are permitted, constant strings are permitted, and quotes may be used to as delimiters in the string. (This is useful if you wish you use a digit immediately following a numeric escape. For example, ESC-5 should be represented as \\033"5" to avoid confusion in with \\335. In general, the rules outlined for ANSI constant escaping are enforced. .PP Additionally, \fB/usr/local/lib/vtprint/vtprintcap\fP may contain comment lines, which are indicated by placing a hash mark (#) in the first column of the line. Remember however that entries must \fInot\fP be broken up by comment lines! .SH EXAMPLE Here is a sample entry common to DEC vt100 and vt102 terminals: .PP .IP # Sample vtprintcap entry for vt100 & vt102 terminals .br vt100, vt102 .br \\033[5i .br \\033[4i .PP This entry would be used whenever the user's TERM environment variable was set to "vt102" or "vt100", using ESC [5i and ESC [4i as the printer control codes to turn a printer on and off, respectively. .SH DISTRIBUTION .B vtprintcap is part of the .B vtprint package, which can be obtained by anonymous ftp at ftp.sdsu.edu in the .B /pub/vtprint directory. Please read the .B INDEX and .B README files before downloading. .LP If you do not have ftp availability, then you can request a uuencoded copy of .B vtprint be sent to you via e-mail from the author. The author is also willing to make other arrangements as needed, within certain limitations. .SH FILES .B /etc/termcap .br .B /usr/local/lib/vtprint/vtprintcap .SH BUGS .B vtprintcap handling code currently could get confused if a printer control code is exactly the same as the name of a terminal, or contained the name of a terminal delimited by commas. As this is very unlikely to every occur, it shouldn't be a problem. .SH SEE ALSO .B "termcap\fR(5)" .B "vtprint\fR(1)" orm with the program. The user is granted the right to use this program without limitation.vtprint-2.0.2/vtprintcap.man 644 164 12 11017 5653371654 11173 VTPRINTCAP(5) FILE FORMATS VTPRINTCAP(5) NNAAMMEE vtprintcap - database of terminal printer control codes SSYYNNOOPPSSIISS //uussrr//llooccaall//lliibb//vvttpprriinntt//vvttpprriinnttccaapp DDEESSCCRRIIPPTTIIOONN vvttpprriinnttccaapp is a simple flat file database containing a list of the names of various terminals and the codes those terminals use to start and stop an attached printer (media hard copy). This database is used by vvttpprriinntt(1) and related programs. Each entry is composed of three lines. The first line is a comma-delimited list of names which may be used to ref- erence this entry. The second line the sequence of char- acters used by the terminal to turn on an attached hard copy device and redirect output to that device. The third line contains the sequence of characters used to turn the device off and restore normal output to the screen. An entry must have all three lines to be considered valid. Currently no comment lines are permitted to exist between these lines: such lines would be interpreted as the printer control codes themselves! The rules for selecting a terminal name are simple: you must follow the same rules as for //eettcc//tteerrmmccaapp(5) names. Terminal names should be entered in //uussrr//llooccaall//lliibb//vvttpprriinntt//vvttpprriinnttccaapp with exactly the same names as are in //eettcc//tteerrmmccaapp. The control code strings in the second and third lines of an entry are governed as follows: ANSI C style escapes for character constants (e.g. \n for newline) are permitted, constant strings are permitted, and quotes may be used to as delimiters in the string. (This is useful if you wish you use a digit immediately following a numeric escape. For example, ESC-5 should be represented as \033"5" to avoid confusion in with \335. In general, the rules out- lined for ANSI constant escaping are enforced. Additionally, //uussrr//llooccaall//lliibb//vvttpprriinntt//vvttpprriinnttccaapp may con- tain comment lines, which are indicated by placing a hash mark (#) in the first column of the line. Remember how- ever that entries must _n_o_t be broken up by comment lines! EEXXAAMMPPLLEE Here is a sample entry common to DEC vt100 and vt102 ter- minals: # Sample vtprintcap entry for vt100 & vt102 vtprint v2.0.2 25 October 1994 1 VTPRINTCAP(5) FILE FORMATS VTPRINTCAP(5) terminals vt100, vt102 \033[5i \033[4i This entry would be used whenever the user's TERM environ- ment variable was set to "vt102" or "vt100", using ESC [5i and ESC [4i as the printer control codes to turn a printer on and off, respectively. DDIISSTTRRIIBBUUTTIIOONN vvttpprriinnttccaapp is part of the vvttpprriinntt package, which can be obtained by anonymous ftp at ftp.sdsu.edu in the //ppuubb//vvttpprriinntt directory. Please read the IINNDDEEXX and RREEAADDMMEE files before downloading. If you do not have ftp availability, then you can request a uuencoded copy of vvttpprriinntt be sent to you via e-mail from the author. The author is also willing to make other arrangements as needed, within certain limitations. FFIILLEESS //eettcc//tteerrmmccaapp //uussrr//llooccaall//lliibb//vvttpprriinntt//vvttpprriinnttccaapp BBUUGGSS vvttpprriinnttccaapp handling code currently could get confused if a printer control code is exactly the same as the name of a terminal, or contained the name of a terminal delimited by commas. As this is very unlikely to every occur, it shouldn't be a problem. SSEEEE AALLSSOO tteerrmmccaapp(5) vvttpprriinntt(1) vtprint v2.0.2 25 October 1994 2 media hard copy). This database is used by vvttpprriinntt(1) and related programs. Each entry is composed of three lines. The first line is a comma-delimited list of names which may be used to ref- erence this entry. The second line the sequence of char- acters used by the terminal to turn on an attached hard copy device and redirect output to that device. The third line contains the sequence of charactersvtprint-2.0.2/vtprintcap.ps 644 164 12 25174 5653371654 11053 %!PS-Adobe-3.0 %%Creator: groff version 1.09 %%CreationDate: Tue Oct 25 23:03:51 1994 %%DocumentNeededResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%DocumentSuppliedResources: procset grops 1.09 0 %%Pages: 2 %%PageOrder: Ascend %%Orientation: Portrait %%EndComments %%BeginProlog %%BeginResource: procset grops 1.09 0 /setpacking where{ pop currentpacking true setpacking }if /grops 120 dict dup begin /SC 32 def /A/show load def /B{0 SC 3 -1 roll widthshow}bind def /C{0 exch ashow}bind def /D{0 exch 0 SC 5 2 roll awidthshow}bind def /E{0 rmoveto show}bind def /F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def /G{0 rmoveto 0 exch ashow}bind def /H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /I{0 exch rmoveto show}bind def /J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def /K{0 exch rmoveto 0 exch ashow}bind def /L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /M{rmoveto show}bind def /N{rmoveto 0 SC 3 -1 roll widthshow}bind def /O{rmoveto 0 exch ashow}bind def /P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /Q{moveto show}bind def /R{moveto 0 SC 3 -1 roll widthshow}bind def /S{moveto 0 exch ashow}bind def /T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def /SF{ findfont exch [exch dup 0 exch 0 exch neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /MF{ findfont [5 2 roll 0 3 1 roll neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /level0 0 def /RES 0 def /PL 0 def /LS 0 def /PLG{ gsave newpath clippath pathbbox grestore exch pop add exch pop }bind def /BP{ /level0 save def 1 setlinecap 1 setlinejoin 72 RES div dup scale LS{ 90 rotate }{ 0 PL translate }ifelse 1 -1 scale }bind def /EP{ level0 restore showpage }bind def /DA{ newpath arcn stroke }bind def /SN{ transform .25 sub exch .25 sub exch round .25 add exch round .25 add exch itransform }bind def /DL{ SN moveto SN lineto stroke }bind def /DC{ newpath 0 360 arc closepath }bind def /TM matrix def /DE{ TM currentmatrix pop translate scale newpath 0 0 .5 0 360 arc closepath TM setmatrix }bind def /RC/rcurveto load def /RL/rlineto load def /ST/stroke load def /MT/moveto load def /CL/closepath load def /FL{ currentgray exch setgray fill setgray }bind def /BL/fill load def /LW/setlinewidth load def /RE{ findfont dup maxlength 1 index/FontName known not{1 add}if dict begin { 1 index/FID ne{def}{pop pop}ifelse }forall /Encoding exch def dup/FontName exch def currentdict end definefont pop }bind def /DEFS 0 def /EBEGIN{ moveto DEFS begin }bind def /EEND/end load def /CNT 0 def /level1 0 def /PBEGIN{ /level1 save def translate div 3 1 roll div exch scale neg exch neg exch translate 0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit []0 setdash /setstrokeadjust where{ pop false setstrokeadjust }if /setoverprint where{ pop false setoverprint }if newpath /CNT countdictstack def userdict begin /showpage{}def }bind def /PEND{ clear countdictstack CNT sub{end}repeat level1 restore }bind def end def /setpacking where{ pop setpacking }if %%EndResource %%IncludeResource: font Times-Roman %%IncludeResource: font Times-Bold %%IncludeResource: font Times-Italic grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron /scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent /ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen /period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon /semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O /P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex /underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y /z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft /guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl /endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut /dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash /quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen /brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft /logicalnot/minus/registered/macron/degree/plusminus/twosuperior /threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior /ordmasculine/guilsinglright/onequarter/onehalf/threequarters /questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE /Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn /germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla /egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis /eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash /ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def /Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE /Times-Roman@0 ENC0/Times-Roman RE %%EndProlog %%Page: 1 1 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 123.305(VTPRINTCAP\(5\) FILE)72 48 R(FORMA)2.5 E 123.305(TS VTPRINTCAP\(5\))-1.11 F/F1 9/Times-Bold@0 SF -.18(NA)72 84 S (ME).18 E F0(vtprintcap \255 database of terminal printer control codes) 108 96 Q F1(SYNOPSIS)72 112.8 Q/F2 10/Times-Bold@0 SF (/usr/local/lib/vtprint/vtprintcap)108 124.8 Q F1(DESCRIPTION)72 141.6 Q F2(vtprintcap)108 153.6 Q F0 .837 (is a simple \215at \214le database containing a list of the names of v) 3.338 F .837(arious terminals and the codes)-.25 F 2.023(those terminal\ s use to start and stop an attached printer \(media hard cop)108 165.6 R 2.023(y\). This database is used by)-.1 F F2(vtprint)108 177.6 Q F0 (\(1\) and related programs.)A .065 (Each entry is composed of three lines.)108 194.4 R .064 (The \214rst line is a comma-delimited list of names which may be used) 5.064 F 1.634(to reference this entry)108 206.4 R 6.634(.T)-.65 G 1.635 (he second line the sequence of characters used by the terminal to turn\ on an)-6.634 F .368(attached hard cop)108 218.4 R 2.867(yd)-.1 G -.25 (ev)-2.867 G .367(ice and redirect output to that de).25 F 5.367 (vice. The)-.25 F .367(third line contains the sequence of char)2.867 F (-)-.2 E(acters used to turn the de)108 230.4 Q(vice of)-.25 E 2.5(fa) -.25 G(nd restore normal output to the screen.)-2.5 E .032 (An entry must ha)108 247.2 R .332 -.15(ve a)-.2 H .032 (ll three lines to be considered v).15 F 2.532(alid. Currently)-.25 F .033(no comment lines are permitted to e)2.532 F(xist)-.15 E (between these lines: such lines w)108 259.2 Q (ould be interpreted as the printer control codes themselv)-.1 E(es!) -.15 E .514 (The rules for selecting a terminal name are simple: you must follo)108 276 R 3.013(wt)-.25 G .513(he same rules as for)-3.013 F F2 (/etc/termcap)3.013 E F0(\(5\))A 4.857(names. T)108 288 R 2.357 (erminal names should be entered in)-.7 F F2 (/usr/local/lib/vtprint/vtprintcap)4.857 E F0 2.358(with e)4.857 F 2.358 (xactly the same)-.15 F(names as are in)108 300 Q F2(/etc/termcap)2.5 E F0(.)A .942(The control code strings in the second and third lines of a\ n entry are go)108 316.8 R -.15(ve)-.15 G .941(rned as follo).15 F .941 (ws: ANSI C style)-.25 F 2.033 (escapes for character constants \(e.g. \\n for ne)108 328.8 R 2.034 (wline\) are permitted, constant strings are permitted, and)-.25 F .684 (quotes may be used to as delimiters in the string.)108 340.8 R .684 (\(This is useful if you wish you use a digit immediately)5.684 F(follo) 108 352.8 Q .971(wing a numeric escape. F)-.25 F .971(or e)-.15 F .971 (xample, ESC-5 should be represented as \\033"5" to a)-.15 F -.2(vo)-.2 G .972(id confusion in).2 F(with \\335.)108 364.8 Q(In general, the rul\ es outlined for ANSI constant escaping are enforced.)5 E(Additionally) 108 381.6 Q(,)-.65 E F2(/usr/local/lib/vtprint/vtprintcap)2.766 E F0 .266(may contain comment lines, which are indicated by placing)2.766 F 3.112(ah)108 393.6 S .612 (ash mark \(#\) in the \214rst column of the line.)-3.112 F .613 (Remember ho)5.613 F(we)-.25 E -.15(ve)-.25 G 3.113(rt).15 G .613 (hat entries must)-3.113 F/F3 10/Times-Italic@0 SF(not)3.113 E F0 .613 (be brok)3.113 F .613(en up by)-.1 F(comment lines!)108 405.6 Q F1 (EXAMPLE)72 422.4 Q F0 (Here is a sample entry common to DEC vt100 and vt102 terminals:)108 434.4 Q 2.5(#S)144 456 S (ample vtprintcap entry for vt100 & vt102 terminals)-2.5 E(vt100, vt102) 144 468 Q(\\033[5i)144 480 Q(\\033[4i)144 492 Q .628(This entry w)108 508.8 R .628(ould be used whene)-.1 F -.15(ve)-.25 G 3.128(rt).15 G .628 (he user')-3.128 F 3.128(sT)-.55 G .627(ERM en)-3.128 F .627 (vironment v)-.4 F .627(ariable w)-.25 F .627 (as set to "vt102" or "vt100",)-.1 F(using ESC [5i and ESC [4i as the p\ rinter control codes to turn a printer on and of)108 520.8 Q (f, respecti)-.25 E -.15(ve)-.25 G(ly).15 E(.)-.65 E F1(DISTRIB)72 537.6 Q(UTION)-.09 E F2(vtprintcap)108 549.6 Q F0 .685(is part of the)3.185 F F2(vtprint)3.185 E F0 .685(package, which can be obtained by anon)3.185 F .686(ymous ftp at ftp.sdsu.edu in the)-.15 F F2(/pub/vtprint)108 561.6 Q F0(directory)2.5 E 5(.P)-.65 G(lease read the)-5 E F2(INDEX)2.5 E F0 (and)2.5 E F2(README)2.5 E F0(\214les before do)2.5 E(wnloading.)-.25 E .49(If you do not ha)108 578.4 R .79 -.15(ve f)-.2 H .49(tp a).15 F -.25 (va)-.2 G(ilability).25 E 2.99(,t)-.65 G .49 (hen you can request a uuencoded cop)-2.99 F 2.99(yo)-.1 G(f)-2.99 E F2 (vtprint)2.99 E F0 .49(be sent to you via e-)2.99 F .159 (mail from the author)108 590.4 R 5.159(.T)-.55 G .159 (he author is also willing to mak)-5.159 F 2.66(eo)-.1 G .16 (ther arrangements as needed, within certain limi-)-2.66 F(tations.)108 602.4 Q F1(FILES)72 619.2 Q F2(/etc/termcap)108 631.2 Q (/usr/local/lib/vtprint/vtprintcap)108 643.2 Q F1 -.09(BU)72 660 S(GS) .09 E F2(vtprintcap)108 672 Q F0 .638(handling code currently could get\ confused if a printer control code is e)3.138 F .637 (xactly the same as the)-.15 F .559(name of a terminal, or contained th\ e name of a terminal delimited by commas.)108 684 R .56(As this is v) 5.56 F .56(ery unlik)-.15 F .56(ely to)-.1 F -2.15 -.25(ev e)108 696 T (ry occur).25 E 2.5(,i)-.4 G 2.5(ts)-2.5 G(houldn')-2.5 E 2.5(tb)-.18 G 2.5(eap)-2.5 G(roblem.)-2.5 E(vtprint v2.0.2)72 768 Q(25 October 1994) 146.225 E(1)195.395 E EP %%Page: 2 2 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 123.305(VTPRINTCAP\(5\) FILE)72 48 R(FORMA)2.5 E 123.305(TS VTPRINTCAP\(5\))-1.11 F/F1 9/Times-Bold@0 SF(SEE ALSO)72 84 Q /F2 10/Times-Bold@0 SF(termcap)108 96 Q F0(\(5\))A F2(vtprint)2.5 E F0 (\(1\))A(vtprint v2.0.2)72 768 Q(25 October 1994)146.225 E(2)195.395 E EP %%Trailer end %%EOF slash/.notdef/exclamdown/cent/sterling/currency/yen /brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft /logicalnot/minus/registered/macron/degree/plusminus/twosuperior /threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior /ordmasculine/guilsinglright/onequarter/onehalf/threequarters /questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE /Ccedilla/vtprint-2.0.2/vtprintcap.sed 644 164 12 6526 5653371654 11164 .\" -*- nroff -*- .\" Like TP, but if specified indent is more than half .\" the current line-length - indent, use the default indent. .de Tp .ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP .el .TP "\\$1" .. .TH VTPRINTCAP MAN5_SECT "VER_DY VER_MO VER_YR" "vtprint vVERSION_NO" .SH NAME vtprintcap \- database of terminal printer control codes .SH SYNOPSIS .B LIBFILE .SH DESCRIPTION .B vtprintcap is a simple flat file database containing a list of the names of various terminals and the codes those terminals use to start and stop an attached printer (media hard copy). This database is used by \fBvtprint\fP(1) and related programs. .PP Each entry is composed of three lines. The first line is a comma-delimited list of names which may be used to reference this entry. The second line the sequence of characters used by the terminal to turn on an attached hard copy device and redirect output to that device. The third line contains the sequence of characters used to turn the device off and restore normal output to the screen. .PP An entry must have all three lines to be considered valid. Currently no comment lines are permitted to exist between these lines: such lines would be interpreted as the printer control codes themselves! .PP The rules for selecting a terminal name are simple: you must follow the same rules as for \fBTERMCAP\fP(MAN5_SECT) names. Terminal names should be entered in \fBLIBFILE\fP with exactly the same names as are in \fBTERMCAP\fP. .PP The control code strings in the second and third lines of an entry are governed as follows: ANSI C style escapes for character constants (e.g. \\n for newline) are permitted, constant strings are permitted, and quotes may be used to as delimiters in the string. (This is useful if you wish you use a digit immediately following a numeric escape. For example, ESC-5 should be represented as \\033"5" to avoid confusion in with \\335. In general, the rules outlined for ANSI constant escaping are enforced. .PP Additionally, \fBLIBFILE\fP may contain comment lines, which are indicated by placing a hash mark (#) in the first column of the line. Remember however that entries must \fInot\fP be broken up by comment lines! .SH EXAMPLE Here is a sample entry common to DEC vt100 and vt102 terminals: .PP .IP # Sample vtprintcap entry for vt100 & vt102 terminals .br vt100, vt102 .br \\033[5i .br \\033[4i .PP This entry would be used whenever the user's TERM environment variable was set to "vt102" or "vt100", using ESC [5i and ESC [4i as the printer control codes to turn a printer on and off, respectively. .SH DISTRIBUTION .B vtprintcap is part of the .B vtprint package, which can be obtained by anonymous ftp at ftp.sdsu.edu in the .B /pub/vtprint directory. Please read the .B INDEX and .B README files before downloading. .LP If you do not have ftp availability, then you can request a uuencoded copy of .B vtprint be sent to you via e-mail from the author. The author is also willing to make other arrangements as needed, within certain limitations. .SH FILES .B TERMCAP .br .B LIBFILE .SH BUGS .B vtprintcap handling code currently could get confused if a printer control code is exactly the same as the name of a terminal, or contained the name of a terminal delimited by commas. As this is very unlikely to every occur, it shouldn't be a problem. .SH SEE ALSO .B "termcap\fR(MAN5_SECT)" .B "vtprint\fR(MAN1_SECT)" s .SH SYNOPSIS .B LIBFILE .SH DESCRIPTION .B vtprintcap is a simple flat file database containing a list of the names of various terminals and the codes those terminals uvtprint-2.0.2/vtprtoff.1 644 164 12 7471 5653371654 10231 .\" -*- nroff -*- .\" Like TP, but if specified indent is more than half .\" the current line-length - indent, use the default indent. .de Tp .ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP .el .TP "\\$1" .. .TH VTPRTOFF 1 "25 October 1994" "vtprint v2.0.2" .SH NAME vtprtoff,vtprton \- turn off or on printer attached to local terminal .SH SYNOPSIS .B vtprtoff [ .B \-dDeEhlqQNtvw ] [ .B \-L .I vtprintcap ] [ .B \-T .I termtype ] [ .B \-V .I device ] .PP .B vtprton [ .B \-dDeEhlqQNtvw ] [ .B \-L .I vtprintcap ] [ .B \-T .I termtype ] [ .B \-V .I device ] .SH DESCRIPTION .B vtprtoff is a simple program that turns off (or on) redirection of ASCII text to a printer connected to a terminal or terminal emulator. It uses terminal escape sequences to achieve this end. .SH OPTIONS .TP .B \-d Use the tty device file instead of stdout for output. This is defined as .B /dev/tty on this system. (This is operating system specific and may vary from system to system.) .TP .B \-D Use the stdout stream for output, rather than a tty device file. .TP .B \-e Forces \fBvtprtoff\fP to ignore the TERM environment variable and use the builtin control codes instead. .TP .B \-E Undoes the effect of the \fB\-e\fP option, which allows \fBvtprtoff\fP to attempt to find an entry in \fB/usr/local/lib/vtprint/vtprintcap\fP for the TERM value and use the corresponding control codes. .TP .B \-h Print out a simple usage message. .TP .B \-l Print out the license agreement. .TP .BI \-L " vtprintcap" Specifies an alternate file to use instead of \fB/usr/local/lib/vtprint/vtprintcap\fP. .TP .B \-q Quiet mode. Suppress various status messages from being displayed. .TP .B \-Q Cancels the effect of the \fB\-q\fP option, allowing normal progress reporting to occur. .TP .B \-t Force the use of the TERM variable to perform a look up of the control sequences to be used in \fB/usr/local/lib/vtprint/vtprintcap\fP. If an entry in that file can't be found, \fBvtprtoff\fP will abort with an error. .TP .BI \-T " termtype" Use the value of \fItermtype\fP instead of the value of the TERM environment variable when performing lookups in \fB/usr/local/lib/vtprint/vtprintcap\fP. .TP .B \-v Display version information. .TP .BI \-V " device" Specifies an alternate device file instead of \fB/dev/tty\fP to use. .TP .B \-w Display important warranty waiver information. NO WARRANTY! .SH ENVIRONMENT .IP TERM the type of the terminal .B vtprtoff will assume is being used. .IP VTPRINT string of options to be used by .B vtprtoff. .SH AUTHOR .B vtprtoff was written by Garrett D'Amore, on June 5, 1994 and last modified on October 25, 1994. It is heavily derived from a similar program, called .B lprint, by the same author. He can be reached via Internet e-mail at garrett@sciences.sdsu.edu. .SH DISTRIBUTION The latest version of .B vtprtoff is available as part of the .B vtprint package, and can be obtained by anonymous ftp at ftp.sdsu.edu in the .B /pub/vtprint directory. Please read the .B INDEX and .B README files before downloading. .LP If you do not have ftp availability, then you can request a uuencoded copy of .B vtprint be sent to you via e-mail from the author. The author is also willing to make other arrangements as needed, within certain limitations. .SH COPYRIGHT .B vtprtoff is copyrighted 1994, by Garrett D'Amore. It may be freely redistributed or modified, so long as this and any other copyright notices are included in their original form with the program. The user is granted the right to use this program without limitation. .SH DISCLAIMER .B vtprtoff is provided WITHOUT WARRANTY. The user agrees to indemnify the author from any claims of damage or loss arising from the use of or inability to use this program. In other words, USE AT YOUR OWN RISK! .SH FILES .B /usr/local/lib/vtprint/vtprintcap .SH SEE ALSO .B "lpr\fR(1), " .B "vtprint\fR(1), " .B "vtprintcap\fR(5)" ndPageSetup /F0 10/Times-Roman@0 SF 123.305(VTPRINTCAP\(5\) FILE)72 48 R(FORMA)2.5 E 123.305(TS VTPRINTCAP\(5\))-1.11 F/F1 9/Times-Bold@0 SF(SEE ALSO)72 84 Q /F2 10/Times-Bold@0 SF(termcap)108 96 Q Fvtprint-2.0.2/vtprtoff.man 644 164 12 13206 5653371654 10655 VTPRTOFF(1) USER COMMANDS VTPRTOFF(1) NNAAMMEE vtprtoff,vtprton - turn off or on printer attached to local terminal SSYYNNOOPPSSIISS vvttpprrttooffff [ --ddDDeeEEhhllqqQQNNttvvww ] [ --LL _v_t_p_r_i_n_t_c_a_p ] [ --TT _t_e_r_m_t_y_p_e ] [ --VV _d_e_v_i_c_e ] vvttpprrttoonn [ --ddDDeeEEhhllqqQQNNttvvww ] [ --LL _v_t_p_r_i_n_t_c_a_p ] [ --TT _t_e_r_m_t_y_p_e ] [ --VV _d_e_v_i_c_e ] DDEESSCCRRIIPPTTIIOONN vvttpprrttooffff is a simple program that turns off (or on) redi- rection of ASCII text to a printer connected to a terminal or terminal emulator. It uses terminal escape sequences to achieve this end. OOPPTTIIOONNSS --dd Use the tty device file instead of stdout for out- put. This is defined as //ddeevv//ttttyy on this system. (This is operating system specific and may vary from system to system.) --DD Use the stdout stream for output, rather than a tty device file. --ee Forces vvttpprrttooffff to ignore the TERM environment variable and use the builtin control codes instead. --EE Undoes the effect of the --ee option, which allows vvttpprrttooffff to attempt to find an entry in //uussrr//llooccaall//lliibb//vvttpprriinntt//vvttpprriinnttccaapp for the TERM value and use the corresponding control codes. --hh Print out a simple usage message. --ll Print out the license agreement. --LL _v_t_p_r_i_n_t_c_a_p Specifies an alternate file to use instead of //uussrr//llooccaall//lliibb//vvttpprriinntt//vvttpprriinnttccaapp. --qq Quiet mode. Suppress various status messages from being displayed. --QQ Cancels the effect of the --qq option, allowing nor- mal progress reporting to occur. --tt Force the use of the TERM variable to perform a look up of the control sequences to be used in //uussrr//llooccaall//lliibb//vvttpprriinntt//vvttpprriinnttccaapp. If an entry in that file can't be found, vvttpprrttooffff will abort with an error. vtprint v2.0.2 25 October 1994 1 VTPRTOFF(1) USER COMMANDS VTPRTOFF(1) --TT _t_e_r_m_t_y_p_e Use the value of _t_e_r_m_t_y_p_e instead of the value of the TERM environment variable when performing lookups in //uussrr//llooccaall//lliibb//vvttpprriinntt//vvttpprriinnttccaapp. --vv Display version information. --VV _d_e_v_i_c_e Specifies an alternate device file instead of //ddeevv//ttttyy to use. --ww Display important warranty waiver information. NO WARRANTY! EENNVVIIRROONNMMEENNTT TERM the type of the terminal vvttpprrttooffff will assume is being used. VTPRINT string of options to be used by vvttpprrttooffff.. AAUUTTHHOORR vvttpprrttooffff was written by Garrett D'Amore, on June 5, 1994 and last modified on October 25, 1994. It is heavily derived from a similar program, called llpprriinntt,, by the same author. He can be reached via Internet e-mail at gar- rett@sciences.sdsu.edu. DDIISSTTRRIIBBUUTTIIOONN The latest version of vvttpprrttooffff is available as part of the vvttpprriinntt package, and can be obtained by anonymous ftp at ftp.sdsu.edu in the //ppuubb//vvttpprriinntt directory. Please read the IINNDDEEXX and RREEAADDMMEE files before downloading. If you do not have ftp availability, then you can request a uuencoded copy of vvttpprriinntt be sent to you via e-mail from the author. The author is also willing to make other arrangements as needed, within certain limitations. CCOOPPYYRRIIGGHHTT vvttpprrttooffff is copyrighted 1994, by Garrett D'Amore. It may be freely redistributed or modified, so long as this and any other copyright notices are included in their original form with the program. The user is granted the right to use this program without limitation. DDIISSCCLLAAIIMMEERR vvttpprrttooffff is provided WITHOUT WARRANTY. The user agrees to indemnify the author from any claims of damage or loss arising from the use of or inability to use this program. In other words, USE AT YOUR OWN RISK! FFIILLEESS //uussrr//llooccaall//lliibb//vvttpprriinntt//vvttpprriinnttccaapp vtprint v2.0.2 25 October 1994 2 VTPRTOFF(1) USER COMMANDS VTPRTOFF(1) SSEEEE AALLSSOO llpprr(1), vvttpprriinntt(1), vvttpprriinnttccaapp(5) vtprint v2.0.2 25 October 1994 3 er arrangements as needed, within certain limitations. .SH COPYRIGHT .B vtprtoff is copyrighted 1994, by Garrett D'Amore. It may be freely redistributed or modified, so long as this and any other copyright notices are included in their original form with the program. The user is granted the right to use this program without limitation. .SH DISCLAIMER .B vtprtoff is providevtprint-2.0.2/vtprtoff.ps 644 164 12 27720 5653371654 10532 %!PS-Adobe-3.0 %%Creator: groff version 1.09 %%CreationDate: Tue Oct 25 23:03:56 1994 %%DocumentNeededResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%DocumentSuppliedResources: procset grops 1.09 0 %%Pages: 2 %%PageOrder: Ascend %%Orientation: Portrait %%EndComments %%BeginProlog %%BeginResource: procset grops 1.09 0 /setpacking where{ pop currentpacking true setpacking }if /grops 120 dict dup begin /SC 32 def /A/show load def /B{0 SC 3 -1 roll widthshow}bind def /C{0 exch ashow}bind def /D{0 exch 0 SC 5 2 roll awidthshow}bind def /E{0 rmoveto show}bind def /F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def /G{0 rmoveto 0 exch ashow}bind def /H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /I{0 exch rmoveto show}bind def /J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def /K{0 exch rmoveto 0 exch ashow}bind def /L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /M{rmoveto show}bind def /N{rmoveto 0 SC 3 -1 roll widthshow}bind def /O{rmoveto 0 exch ashow}bind def /P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /Q{moveto show}bind def /R{moveto 0 SC 3 -1 roll widthshow}bind def /S{moveto 0 exch ashow}bind def /T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def /SF{ findfont exch [exch dup 0 exch 0 exch neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /MF{ findfont [5 2 roll 0 3 1 roll neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /level0 0 def /RES 0 def /PL 0 def /LS 0 def /PLG{ gsave newpath clippath pathbbox grestore exch pop add exch pop }bind def /BP{ /level0 save def 1 setlinecap 1 setlinejoin 72 RES div dup scale LS{ 90 rotate }{ 0 PL translate }ifelse 1 -1 scale }bind def /EP{ level0 restore showpage }bind def /DA{ newpath arcn stroke }bind def /SN{ transform .25 sub exch .25 sub exch round .25 add exch round .25 add exch itransform }bind def /DL{ SN moveto SN lineto stroke }bind def /DC{ newpath 0 360 arc closepath }bind def /TM matrix def /DE{ TM currentmatrix pop translate scale newpath 0 0 .5 0 360 arc closepath TM setmatrix }bind def /RC/rcurveto load def /RL/rlineto load def /ST/stroke load def /MT/moveto load def /CL/closepath load def /FL{ currentgray exch setgray fill setgray }bind def /BL/fill load def /LW/setlinewidth load def /RE{ findfont dup maxlength 1 index/FontName known not{1 add}if dict begin { 1 index/FID ne{def}{pop pop}ifelse }forall /Encoding exch def dup/FontName exch def currentdict end definefont pop }bind def /DEFS 0 def /EBEGIN{ moveto DEFS begin }bind def /EEND/end load def /CNT 0 def /level1 0 def /PBEGIN{ /level1 save def translate div 3 1 roll div exch scale neg exch neg exch translate 0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit []0 setdash /setstrokeadjust where{ pop false setstrokeadjust }if /setoverprint where{ pop false setoverprint }if newpath /CNT countdictstack def userdict begin /showpage{}def }bind def /PEND{ clear countdictstack CNT sub{end}repeat level1 restore }bind def end def /setpacking where{ pop setpacking }if %%EndResource %%IncludeResource: font Times-Roman %%IncludeResource: font Times-Bold %%IncludeResource: font Times-Italic grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron /scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent /ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen /period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon /semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O /P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex /underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y /z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft /guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl /endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut /dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash /quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen /brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft /logicalnot/minus/registered/macron/degree/plusminus/twosuperior /threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior /ordmasculine/guilsinglright/onequarter/onehalf/threequarters /questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE /Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn /germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla /egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis /eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash /ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def /Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE /Times-Roman@0 ENC0/Times-Roman RE %%EndProlog %%Page: 1 1 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(VTPR)72 48 Q -.18(TO)-.6 G 127.135(FF\(1\) USER) .18 F 127.135(COMMANDS VTPR)2.5 F -.18(TO)-.6 G(FF\(1\)).18 E/F1 9 /Times-Bold@0 SF -.18(NA)72 84 S(ME).18 E F0(vtprtof)108 96 Q (f,vtprton \255 turn of)-.25 E 2.5(fo)-.25 G 2.5(ro)-2.5 G 2.5(np)-2.5 G (rinter attached to local terminal)-2.5 E F1(SYNOPSIS)72 112.8 Q/F2 10 /Times-Bold@0 SF(vtprtoff)108 124.8 Q F0([)2.5 E F2(\255dDeEhlqQNtvw)2.5 E F0 2.5(][)2.5 G F2A/F3 10/Times-Italic@0 SF(vtprintcap)2.5 E F0 2.5(][)2.5 G F2A F3(termtype)2.5 E F0 2.5(][)2.5 G F2A F3 (de)2.5 E(vice)-.15 E F0(])2.5 E F2(vtprton)108 141.6 Q F0([)2.5 E F2 (\255dDeEhlqQNtvw)2.5 E F0 2.5(][)2.5 G F2A F3(vtprintcap)2.5 E F0 2.5(][)2.5 G F2A F3(termtype)2.5 E F0 2.5(][)2.5 G F2A F3 (de)2.5 E(vice)-.15 E F0(])2.5 E F1(DESCRIPTION)72 158.4 Q F2(vtprtoff) 108 170.4 Q F0 .385(is a simple program that turns of)2.885 F 2.885(f\() -.25 G .384(or on\) redirection of ASCII te)-2.885 F .384 (xt to a printer connected to a ter)-.15 F(-)-.2 E (minal or terminal emulator)108 182.4 Q 5(.I)-.55 G 2.5(tu)-5 G (ses terminal escape sequences to achie)-2.5 E .3 -.15(ve t)-.25 H (his end.).15 E F1(OPTIONS)72 199.2 Q F2108 211.2 Q F0 .032 (Use the tty de)24.74 F .032(vice \214le instead of stdout for output.) -.25 F .032(This is de\214ned as)5.032 F F2(/de)2.532 E(v/tty)-.15 E F0 .033(on this system. \(This)2.533 F (is operating system speci\214c and may v)144 223.2 Q (ary from system to system.\))-.25 E F2108 240 Q F0 (Use the stdout stream for output, rather than a tty de)23.08 E (vice \214le.)-.25 E F2108 256.8 Q F0 -.15(Fo)25.86 G(rces).15 E F2(vtprtoff)4.902 E F0 2.402(to ignore the TERM en)4.902 F 2.402 (vironment v)-.4 F 2.401(ariable and use the b)-.25 F 2.401 (uiltin control codes)-.2 F(instead.)144 268.8 Q F2108 285.6 Q F0 3.091(Undoes the ef)23.63 F 3.091(fect of the)-.25 F F25.591 E F0 3.091(option, which allo)5.591 F(ws)-.25 E F2(vtprtoff)5.591 E F0 3.092 (to attempt to \214nd an entry in)5.591 F F2 (/usr/local/lib/vtprint/vtprintcap)144 297.6 Q F0(for the TERM v)2.5 E (alue and use the corresponding control codes.)-.25 E F2108 314.4 Q F0(Print out a simple usage message.)24.74 E F2108 331.2 Q F0 (Print out the license agreement.)27.52 E F2108 348 Q F3 (vtprintcap)2.5 E F0(Speci\214es an alternate \214le to use instead of) 144 360 Q F2(/usr/local/lib/vtprint/vtprintcap)2.5 E F0(.)A F2108 376.8 Q F0(Quiet mode.)24.74 E(Suppress v)5 E (arious status messages from being displayed.)-.25 E F2108 393.6 Q F0(Cancels the ef)22.52 E(fect of the)-.25 E F22.5 E F0 (option, allo)2.5 E(wing normal progress reporting to occur)-.25 E(.) -.55 E F2108 410.4 Q F0 -.15(Fo)26.97 G .794 (rce the use of the TERM v).15 F .794 (ariable to perform a look up of the control sequences to be used in) -.25 F F2(/usr/local/lib/vtprint/vtprintcap)144 422.4 Q F0 5.776(.I)C 3.276(fa)-5.776 G 3.276(ne)-3.276 G .776(ntry in that \214le can')-3.276 F 3.276(tb)-.18 G 3.276(ef)-3.276 G(ound,)-3.276 E F2(vtprtoff)3.276 E F0 .777(will abort with)3.276 F(an error)144 434.4 Q(.)-.55 E F2 108 451.2 Q F3(termtype)2.5 E F0 .538(Use the v)144 463.2 R .538 (alue of)-.25 F F3(termtype)3.038 E F0 .538(instead of the v)3.038 F .538(alue of the TERM en)-.25 F .538(vironment v)-.4 F .538 (ariable when perform-)-.25 F(ing lookups in)144 475.2 Q F2 (/usr/local/lib/vtprint/vtprintcap)2.5 E F0(.)A F2108 492 Q F0 (Display v)25.3 E(ersion information.)-.15 E F2108 508.8 Q F3(de) 2.5 E(vice)-.15 E F0(Speci\214es an alternate de)144 520.8 Q (vice \214le instead of)-.25 E F2(/de)2.5 E(v/tty)-.15 E F0(to use.)2.5 E F2108 537.6 Q F0(Display important w)23.08 E(arranty w)-.1 E(ai) -.1 E -.15(ve)-.25 G 2.5(ri).15 G 2.5(nformation. NO)-2.5 F -1.2(WA)2.5 G(RRANTY!)1.2 E F1(ENVIR)72 554.4 Q(ONMENT)-.27 E F0 5.72(TERM the)108 566.4 R(type of the terminal)2.5 E F2(vtprtoff)2.5 E F0 (will assume is being used.)2.5 E(VTPRINT)108 583.2 Q (string of options to be used by)144 595.2 Q F2(vtprtoff)2.5 E(.)-.15 E F1 -.45(AU)72 612 S(THOR).45 E F2(vtprtoff)108 624 Q F0 -.1(wa)3.53 G 3.53(sw).1 G 1.031(ritten by Garrett D'Amore, on June 5, 1994 and last \ modi\214ed on October 25, 1994.)-3.53 F 1.031(It is)6.031 F(hea)108 636 Q .568(vily deri)-.2 F -.15(ve)-.25 G 3.067(df).15 G .567 (rom a similar program, called)-3.067 F F2(lprint,)3.067 E F0 .567 (by the same author)3.067 F 5.567(.H)-.55 G 3.067(ec)-5.567 G .567 (an be reached via Internet)-3.067 F(e-mail at g)108 648 Q (arrett@sciences.sdsu.edu.)-.05 E F1(DISTRIB)72 664.8 Q(UTION)-.09 E F0 .976(The latest v)108 676.8 R .976(ersion of)-.15 F F2(vtprtoff)3.476 E F0 .976(is a)3.476 F -.25(va)-.2 G .976(ilable as part of the).25 F F2 (vtprint)3.476 E F0 .976(package, and can be obtained by anon)3.476 F (y-)-.15 E .346(mous ftp at ftp.sdsu.edu in the)108 688.8 R F2 (/pub/vtprint)2.846 E F0(directory)2.846 E 5.346(.P)-.65 G .346 (lease read the)-5.346 F F2(INDEX)2.846 E F0(and)2.846 E F2(README)2.846 E F0 .346(\214les before)2.846 F(do)108 700.8 Q(wnloading.)-.25 E .49 (If you do not ha)108 717.6 R .79 -.15(ve f)-.2 H .49(tp a).15 F -.25 (va)-.2 G(ilability).25 E 2.99(,t)-.65 G .49 (hen you can request a uuencoded cop)-2.99 F 2.99(yo)-.1 G(f)-2.99 E F2 (vtprint)2.99 E F0 .49(be sent to you via e-)2.99 F 1.542 (mail from the author)108 729.6 R 6.542(.T)-.55 G 1.541 (he author is also willing to mak)-6.542 F 4.041(eo)-.1 G 1.541 (ther arrangements as needed, within certain)-4.041 F(vtprint v2.0.2)72 768 Q(25 October 1994)146.225 E(1)195.395 E EP %%Page: 2 2 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(VTPR)72 48 Q -.18(TO)-.6 G 127.135(FF\(1\) USER) .18 F 127.135(COMMANDS VTPR)2.5 F -.18(TO)-.6 G(FF\(1\)).18 E (limitations.)108 84 Q/F1 9/Times-Bold@0 SF(COPYRIGHT)72 100.8 Q/F2 10 /Times-Bold@0 SF(vtprtoff)108 112.8 Q F0 .773(is cop)3.273 F .773 (yrighted 1994, by Garrett D'Amore.)-.1 F .773 (It may be freely redistrib)5.773 F .773(uted or modi\214ed, so long as) -.2 F 1.656(this and an)108 124.8 R 4.156(yo)-.15 G 1.656(ther cop) -4.156 F 1.655 (yright notices are included in their original form with the program.) -.1 F 1.655(The user is)6.655 F (granted the right to use this program without limitation.)108 136.8 Q F1(DISCLAIMER)72 153.6 Q F2(vtprtoff)108 165.6 Q F0 .745(is pro)3.245 F .745(vided WITHOUT W)-.15 F(ARRANTY)-1.2 E 5.745(.T)-1.29 G .745 (he user agrees to indemnify the author from an)-5.745 F 3.245(yc)-.15 G (laims)-3.245 E .359(of damage or loss arising from the use of or inabi\ lity to use this program.)108 177.6 R .358(In other w)5.358 F .358 (ords, USE A)-.1 F 2.858(TY)-1.11 G(OUR)-3.158 E -.35(OW)108 189.6 S 2.5 (NR).35 G(ISK!)-2.5 E F1(FILES)72 206.4 Q F2 (/usr/local/lib/vtprint/vtprintcap)108 218.4 Q F1(SEE ALSO)72 235.2 Q F2 (lpr)108 247.2 Q F0(\(1\),)A F2(vtprint)2.5 E F0(\(1\),)A F2(vtprintcap) 2.5 E F0(\(5\))A(vtprint v2.0.2)72 768 Q(25 October 1994)146.225 E(2) 195.395 E EP %%Trailer end %%EOF g list.)-.15 E F3 (COPYRIGHT)72 444 Q F1(vtprintvtprint-2.0.2/vtprtoff.sed 644 164 12 7345 5653371654 10644 .\" -*- nroff -*- .\" Like TP, but if specified indent is more than half .\" the current line-length - indent, use the default indent. .de Tp .ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP .el .TP "\\$1" .. .TH VTPRTOFF MAN1_SECT "VER_DY VER_MO VER_YR" "vtprint vVERSION_NO" .SH NAME vtprtoff,vtprton \- turn off or on printer attached to local terminal .SH SYNOPSIS .B vtprtoff [ .B \-dDeEhlqQNtvw ] [ .B \-L .I vtprintcap ] [ .B \-T .I termtype ] [ .B \-V .I device ] .PP .B vtprton [ .B \-dDeEhlqQNtvw ] [ .B \-L .I vtprintcap ] [ .B \-T .I termtype ] [ .B \-V .I device ] .SH DESCRIPTION .B vtprtoff is a simple program that turns off (or on) redirection of ASCII text to a printer connected to a terminal or terminal emulator. It uses terminal escape sequences to achieve this end. .SH OPTIONS .TP .B \-d Use the tty device file instead of stdout for output. This is defined as .B DEVTTY on this system. (This is operating system specific and may vary from system to system.) .TP .B \-D Use the stdout stream for output, rather than a tty device file. .TP .B \-e Forces \fBvtprtoff\fP to ignore the TERM environment variable and use the builtin control codes instead. .TP .B \-E Undoes the effect of the \fB\-e\fP option, which allows \fBvtprtoff\fP to attempt to find an entry in \fBLIBFILE\fP for the TERM value and use the corresponding control codes. .TP .B \-h Print out a simple usage message. .TP .B \-l Print out the license agreement. .TP .BI \-L " vtprintcap" Specifies an alternate file to use instead of \fBLIBFILE\fP. .TP .B \-q Quiet mode. Suppress various status messages from being displayed. .TP .B \-Q Cancels the effect of the \fB\-q\fP option, allowing normal progress reporting to occur. .TP .B \-t Force the use of the TERM variable to perform a look up of the control sequences to be used in \fBLIBFILE\fP. If an entry in that file can't be found, \fBvtprtoff\fP will abort with an error. .TP .BI \-T " termtype" Use the value of \fItermtype\fP instead of the value of the TERM environment variable when performing lookups in \fBLIBFILE\fP. .TP .B \-v Display version information. .TP .BI \-V " device" Specifies an alternate device file instead of \fBDEVTTY\fP to use. .TP .B \-w Display important warranty waiver information. NO WARRANTY! .SH ENVIRONMENT .IP TERM the type of the terminal .B vtprtoff will assume is being used. .IP VTPRINT string of options to be used by .B vtprtoff. .SH AUTHOR .B vtprtoff was written by Garrett D'Amore, on June 5, 1994 and last modified on VER_MO VER_DY, VER_YR. It is heavily derived from a similar program, called .B lprint, by the same author. He can be reached via Internet e-mail at garrett@sciences.sdsu.edu. .SH DISTRIBUTION The latest version of .B vtprtoff is available as part of the .B vtprint package, and can be obtained by anonymous ftp at ftp.sdsu.edu in the .B /pub/vtprint directory. Please read the .B INDEX and .B README files before downloading. .LP If you do not have ftp availability, then you can request a uuencoded copy of .B vtprint be sent to you via e-mail from the author. The author is also willing to make other arrangements as needed, within certain limitations. .SH COPYRIGHT .B vtprtoff is copyrighted 1994, by Garrett D'Amore. It may be freely redistributed or modified, so long as this and any other copyright notices are included in their original form with the program. The user is granted the right to use this program without limitation. .SH DISCLAIMER .B vtprtoff is provided WITHOUT WARRANTY. The user agrees to indemnify the author from any claims of damage or loss arising from the use of or inability to use this program. In other words, USE AT YOUR OWN RISK! .SH FILES .B LIBFILE .SH SEE ALSO .B "LPR_BIN\fR(LPR_SECT), " .B "vtprint\fR(MAN1_SECT), " .B "vtprintcap\fR(MAN5_SECT)" rmal progress reporting to occur)-.25 E(.) -.55 E F2108 410.4 Q F0 -.15(Fo)26.97 G .794 (rce the use of the TERM v).15 F .794 (ariable to perform a look up of the control sequences to be used in) -.25 F F2(/usr/local/lib/vtprint/vtprintcap)144 422.4 Q F0 5.776(.I)C 3.276(fa)-5 exch pop }bind def /BP{ /level0 save def 1 setlinecap 1 setlinejoin 72 RES div dup scale LS{ 90 rotate }{ 0 PL translate }ifelse 1 -1 scale }bind def /EP{ level0 restore showpage }bind def /DA{ newpath arcn stroke }bind def /SN{ transform .25 sub exch .25 sub exch round .25 add exch round .25 add exch itransform }bind def /DL{ SN moveto SN lineto stroke }bind def /DC{ newpath 0 360 arc closepath }bind def /TM matrix def /DE{ TM currentmatrix pop translate scale newpath 0 0 .5 0 360 arc closepath TM setmatrix }bind def /RC/rcurveto load def /RL/rlineto load def /ST/stroke load def /MT/moveto load def /CL/closepath load def /FL{ currentgray exch setgray fill setgray }bind def /BL/fill load def /LW/setlinewidth load def /RE{ findfont dup maxlength 1 index/FontName known not{1 add}if dict begin { 1 index/FID ne{def}{pop pop}ifelse }forall /Encoding exch def dup/FontName exch def currentdict end definefont pop }bind def /DEFS 0 def /EBEGIN{ moveto DEFS begin }bind def /EEND/end load def /CNT 0 def /level1 0 def /PBEGIN{ /level1 save def translate div 3 1 roll div exch scale neg exch neg exch translate 0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit []0 setdash /setstrokeadjust where{ pop false setstrokeadjust }if /setoverprint where{ pop false setoverprint }if newpath /CNT countdictstack def userdict begin /showpage{}def }bind def /PEND{ clear countdictstack CNT sub{end}repeat level1 restore }bind def end def /setpacking where{ pop setpacking }if %%EndResource %%IncludeResource: font Times-Roman %%IncludeResource: font Times-Bold %%IncludeResource: font Times-Italic grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron /scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent /ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen /period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon /semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O /P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex /underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y /z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft /guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl /endash/emdash/ff/fi/fl/ffi/ffl/dot