Article View: news.software.readers
Article #2328Re: Printing From trn?
From: Robert Hood
Date: Mon, 05 Oct 1992 01:41
Date: Mon, 05 Oct 1992 01:41
41 lines
1849 bytes
1849 bytes
In article <_4x1Hg08&9@atlantis.psu.edu> barr@pop.psu.edu (David Barr) writes:
>In article <1992Oct4.213425.3041@netcom.com> westes@netcom.com (Will Estes) writes:
>>How does one print an article from trn? Where do you set the print
>>string?
>
>| lpr
This won't work on Netcom, since our users dial in from home/work, and
don't have access to our printers.
Attached is a little C program I use to print to my local printer.
Basically, it isues a VT100 printer-on escape sequence, sends the data, then
isues a VT100 printer-off escape squence. Make sure your terminal
emulator supports this.
I call it "lprint", so from trn, I can type "| lprint", and the article will
be printed to my printer.
#include <stdio.h>
main ()
{
int in;
/* turn on printer */
putchar (27);
putchar ('[');
putchar ('5');
putchar ('i');
while ((in = getc (stdin)) >= 0)
{
putchar (in);
}
putchar (27);
putchar ('[');
putchar ('4');
putchar ('i');
}
--
Robert Hood hoodr@netcom.com (408) 554-UNIX
System/Network Administrator for Netcom On-line Communications Services
Technical Details
Message-ID:
<1992Oct5.014136.2169@netcom.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-netcom.general.mbox.zip!sparky!uunet!haven.umd.edu!darwin.sura.net!spool.mu.edu!umn.edu!csus.edu!netcom.com!hoodrReferences:
<1992Oct4.213425.3041@netcom.com> <_4x1Hg08&9@atlantis.psu.edu>Show Full Headers
Complete Article Headers
Message-ID: <1992Oct5.014136.2169@netcom.com> Subject: Re: Printing From trn? Date: Mon, 5 Oct 1992 01:41:36 GMT From: hoodr@netcom.com (Robert Hood) References: <1992Oct4.213425.3041@netcom.com> <_4x1Hg08&9@atlantis.psu.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-netcom.general.mbox.zip!sparky!uunet!haven.umd.edu!darwin.sura.net!spool.mu.edu!umn.edu!csus.edu!netcom.com!hoodr Newsgroups: netcom.general,netcom.software,news.software.readers Organization: Netcom - Online Communication Services (408 241-9760 guest) Lines: 41