delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2008/03/28/10:30:42

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Message-ID: <47EC2EB5.C0C1AD19@yahoo.com>
Date: Thu, 27 Mar 2008 18:33:09 -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: <c55lu3donejjg21ofiemck81cp1nj3fhh4 AT 4ax DOT com> <47EAE3C2 DOT 1B9F1323 AT yahoo DOT com> <jndnu3hhj3tq8sg3qdp7rt5fjkoojffjd9 AT 4ax DOT com> <47EC0DA5 DOT 25D02455 AT yahoo DOT com> <47ec32ab DOT 773895945 AT localhost>
Lines: 27
NNTP-Posting-Date: 28 Mar 2008 14:28:08 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

Scott wrote:
> <cbfalconer AT yahoo DOT com> wrote:
> 
>> #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".
> 
> In that case, why not write
> 
>    while (EOF != (ch = getc(stdin))) putc(ch, stdprn);

Because then you can't control it at runtime.  And stdprn is not
known in the C standard.

-- 
 [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