Using printer with turbo C?

D'Arcy J.M. Cain darcy at druid.uucp
Thu Jul 19 12:25:23 AEST 1990


In article <28289 at cc.usu.edu> SLTGK at cc.usu.edu writes:
>
>	My brother is trying to print in turbo C to his printer-so far with
>very limited success. If anyone knows a more elegant way to do this other
>than using a screen dump please e-mail me an answer.  We have tried various
>things using the printf() but without apparent success.

Just use the stdio library functions (fprintf, fwrite, fputc, etc.) and
give 'stdprn' as the FILE pointer.  This stream is automagically opened
for you just like stdin, stdout and stderr.  There is also stdaux which
is supposed to handle the serial port but then you have to depend on the
MSDOS serial routines.  Yechh.  This of course is entirely non-portable
but so what else is new in MDSDOS programming.

I have redirected followups as this is a system specific question.

-- 
D'Arcy J.M. Cain (darcy at druid)     |   Government:
D'Arcy Cain Consulting             |   Organized crime with an attitude
West Hill, Ontario, Canada         |
(416) 281-6094                     |



More information about the Comp.lang.c mailing list