Stdprn in GCC

John Carter john.carter@tait.co.nz
Wed Oct 23 13:35:00 GMT 2002


On Tue, 22 Oct 2002, David wrote:

Hint 1: Clip out a small piece of code you having a problem with and send 
it and the error message you are having difficulty with to the group. 
Makes it a lot easy to give a good answer.

You could do things like...
FILE * stdprn;
main() {
 stdprn = fopen( "/dev/lp0", "w");

And it will head for the line printeer port on your machine.

If you want it spooled or sent to a remote printer you have to be more 
sophisticated.

You may have to chmod o+rwx /dev/lp0 for the above simplistic trick to 
work.

-- 


John Carter                             Phone : (64)(3) 358 6639
Tait Electronics                        Fax   : (64)(3) 359 4632
PO Box 1645 Christchurch                Email : john.carter@tait.co.nz
New Zealand

Good Ideas:
Ruby                 - http://www.ruby-lang-org - The best of perl,python,scheme without the pain.
Valgrind             - http://developer.kde.org/~sewardj/ - memory debugger for x86-GNU/Linux
Free your books      - http://www.bookcrossing.com



More information about the Gcc-help mailing list