C-Kermit 7.0 Case Study #09

Русский/Russian ] via Data Recovery SDR

[ Previous ] [ Next ] [ Index ] [ C-Kermit Home ] [ Kermit Home ]

Article: 10943 of comp.protocols.kermit.misc
From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
Newsgroups: comp.protocols.kermit.misc
Subject: Case Study #9: Printing
Date: 16 Jan 2000 23:40:08 GMT
Organization: Columbia University

C-Kermit 7.0 offers many ways to print, some of which are new. This discussion focuses on the Unix version of C-Kermit but to some extent also applies to Kermit 95 and MS-DOS Kermit.

Each kind of printing uses the SET PRINTER value as the destination for material to be printed. You can see the current SET PRINTER value with SHOW PRINTER. The default PRINTER value is "(default)", which means to use the default system printer. The Unix version of C-Kermit lets you select different SET PRINTER values, which can be:

  1. A filename, to redirect all printer output to the specified file. Each print operation appends to the given file (or creates it if it doesn't exist).

  2. A pipeline; that is, a pipe symbol followed by one or more commands, which are to receive the material to be printed as standard input; for example "set printer {| lpr -PLaserJet5L}". Of course the command need not be "lpr"; it can be anything at all.

Printing methods include:

  1. The PRINT command, which lets you print a local file. You can include printer options after the filename; for example in Unix (when using "lpr"): "print oofa.txt -#3" to print 3 copies of the oofa.txt file.

  2. SET DESTINATION PRINTER. This tells C-Kermit that any files received using Kermit protocol are to be sent to the SET PRINTER device, rather than stored on disk. (Other destinations include DISK, SCREEN, and NOWHERE.)

  3. The SEND /PRINT command tells C-Kermit to send a file to the Kermit program on the other computer and have it printed there (RPRINT and REMOTE PRINT are synonyms for SEND /PRINT).

  4. The -G command-line option, new to C-Kermit 7.0, is like -g (GET) but sends the incoming file to standard output so it can be piped into a command such as "lpr".

  5. Transparent printing, new to C-Kermit 7.0, operates when C-Kermit is in CONNECT mode.

Transparent printing is initiated by the host when it sends the escape sequence <ESC>[5i to the terminal (when C-Kermit is in CONNECT mode, C-Kermit is the "terminal"). All subsequent material goes to the printer (rather than the screen) until the escape sequence <ESC>[4i arrives, which means to stop printing.

C-Kermit 7.0 does transparent printing only if you tell it to SET TERMINAL PRINT ON. By default, TERMINAL PRINT is OFF for compatibility with previous releases and also because you might be accessing Unix from a real terminal or a terminal emulator that you want to handle the transparent printing. The SHOW TERMINAL command tells you whether PRINT is ON or OFF.

Unlike the Kermit-protocol based methods, transparent printing is NOT error-checked; this can