delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2008/03/28/22:45:54

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Message-ID: <47ED9E23.3BAB1FC2@yahoo.com>
Date: Fri, 28 Mar 2008 20:40:51 -0500
From: CBFalconer <cbfalconer AT yahoo DOT com>
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: <726273 DOT 36095 DOT qm AT web50706 DOT mail DOT re2 DOT yahoo DOT com>
Lines: 41
NNTP-Posting-Date: 29 Mar 2008 02:54:36 GMT
X-Complaints-To: abuse AT teranews DOT com
X-Original-Lines: 38
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Lets Go Canes wrote:
> CBFalconer <cbfalconer AT yahoo DOT com> wrote:
>>> CBFalconer <cbfalconer AT yahoo DOT com> wrote:
> 
> [...]
> 
>>>> 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.`
> 
> [...]
> 
>> #include <stdio.h>
>>
>> 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".
> 
> Maybe I am missing something here, but, doesn't the above program
> just add a null pipe element?  In other words, if the above program
> is called lpr, I don't understand how "cat file | lpr > LPT" is an
> improvement over "cat file > LPT".  Was the intent that more would
> be added to the program ("season to taste")?

Or just "lpr <file >LPT".  Flexibility, man.  Flexibility.

-- 
 [mail]: Chuck F (cbfalconer at maineline dot net) 
 [page]: <http://cbfalconer.home.att.net>
            Try the download section.



-- 
Posted via a free Usenet account from http://www.teranews.com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019