"I'm a beginner with RedHat Linux and am converting an old Unix C program.
All went well until I got to 'stdprn' there seems no equivalent!
How to I direct fprintf(stdprn, "%s\n", "HELP!");
to my printer ???
Try here: http://forums.devshed.com/archive/42/2003/7/3/58719
"For what OS and with what printer are you wanting to do this? Basically, you are talking about dealing with a device, so device drivers will be involved. How you work with a device driver can also be OS-dependent. Actually, one of the great ideas of Windows (regardless of where MS stole^H^H^H^H^Hresearched it from) is to present the printer to the application as a generic printer with a set of capabilities, then translate that to the actual codes that the printer needed. In the good old days of DOS, your application had to handle all that itself, so you had to learn what the control codes and syntax were for all the printers out there -- plus, when a new printer came out, then your program was instantly obsolete and had to be updated. Windows removed that burden from programmers. Now, a cheap and dirty approach under DOS would be to fprintf to lpt1 or prn (it's been so long, I forget the printer port's name within a program, but you get the idea). Under Linux, you could pipe the stdout output to lpr or call lpr from within the program (eg, with system or output the data to a temporary file, then fork and exec lpr with that filename).
In Windows, there are API calls to handle printing. I just forget what they are." - dwise1_aol
Hope that helps,