[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Learning C
To print to the printer you can write your output as a temporary file (either
plain text or something that your printer understands) and then use the "system"
function to execute the shell command "cat temp.file > /dev/lp0"
It's sort of cheating but it should work.
--
Wesley Leonard
marshall@pacdemon.org
http://www.pacdemon.org
"...I want Linux to be on the cutting edge, and even a bit past the edge,
because what's past the edge today is what's on your desktop tomorrow."
--Linus Torvalds
"Bibbs, Christopher" wrote:
> I must admit, stdprn and stdaux are new to me. A quick check with my
> co-workers (all of us are C or C++ programmers) and no one knows about
> stdprn or stdaux. It may be that we're all terribly ignorant *OR* it could
> be one of those "standards" that really isn't. Off the top of my head I
> can't tell you how to print to a printer. I guess you'd want to interface
> with lpd, but that wouldn't be as non-trivial as a stdprn.
>
> Christopher Bibbs
>
> -----Original Message-----
> From: Scot Henderson [mailto:saintjust@geocities.com]
> Sent: Thursday, July 27, 2000 9:16 AM
> To: members@kalamazoolinux.org
> Subject: Learning C
>
> Hello
> This may be a little off, but I am attempting to learn C, and I have run
> into a
> slight problem. The book I am using refers to 5 standard streams, stdin,
> stdout, stderr, stdprn, and stdaux. The problem I am having is that, from
> what I
> have read in the man and info pages, is that only the first three exist in
> GNU/Linux.
> I would like to find out what to do to replicate these functions for
> the examples in the book. The one that most concerns me is the stdprn,
> because
> that is any program that creates a print out.
> Thanks in advance, and I apologize if this is beyond the scope of this list.
> Scot Henderson
> --
> Saint-Just
> saintjust@geocities.com