X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Message-ID: <47EC0DA5.25D02455@yahoo.com> Date: Thu, 27 Mar 2008 16:12:05 -0500 From: CBFalconer Organization: Ched Research http://cbfalconer.home.att.net X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: lpr for djgpp? References: <47EAE3C2 DOT 1B9F1323 AT yahoo DOT com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Lines: 31 NNTP-Posting-Date: 27 Mar 2008 20:30:45 GMT X-Complaints-To: abuse AT teranews DOT com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Markus R. Keßler" wrote: > CBFalconer wrote: > ... snip ... > >> Of course there is. Just type "cat file | sort | lpr", where you >> have written lpr to take input from stdin and deliver it to the >> printer.` > > That's it! It should be a liitle program that behaves like lpr to > just print pages in text mode. No matter if the printer is > connected via network or directly. #include int main(void) { int ch; while (EOF != (ch = getc(stdin))) putc(ch, stdout); return 0; } should do it. Exercise it by setting stdout to point to the printer. Something like "lpr > LPT". -- [mail]: Chuck F (cbfalconer at maineline dot net) [page]: Try the download section. -- Posted via a free Usenet account from http://www.teranews.com