X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=uKBVf/+ejL3R9+pM6F99ckh06z9Hb5T4F/9+kmLlYhf4MdazTSEEAvIqBpXPZS/qTp0lnndhQikOBRAo2tLCBooysIR07govoen5GQiF3LQ+Du5FhgW1+5q1bfXz6dqkyICdXp3gsQ0uMUSVFhXdNFayvmdfRFNkkTIc41W5vgY=; X-YMail-OSG: uuWrxuEVM1nv_Fr5cQl0lQXA6K0a0mbPNeXJtoVWmL0FeyZU1M48hmpJ8q1WLH8gFTvMhOeFI2pe5t0id5VsGdBbg3Oh2_2jJOSWXwZrFp71sVbO7abmSOI4XPgKQMkfF2hiVfQQiVPJPJU- Date: Fri, 28 Mar 2008 10:39:41 -0700 (PDT) From: Lets Go Canes Subject: Re: lpr for djgpp? To: djgpp AT delorie DOT com In-Reply-To: <47EC0DA5.25D02455@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <726273.36095.qm@web50706.mail.re2.yahoo.com> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk Hi all. --- CBFalconer wrote: > "Markus R. Keßler" wrote: > > CBFalconer 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 > > 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")? -------------- Lets Go Canes! ____________________________________________________________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping