Mail Archives: djgpp/1999/02/16/13:18:15
David Nugent <davidn AT cbhc DOT ns DOT ca> wrote:
> Anyone have any ideas why this doesn't work properly:
>
> I have a file called TEST.PRN I created it by printing to
> a file (through Windows), instead of to the LPT1:
> port.
>
> If I go to DOS and type
>
> COPY /B TEST.PRN LPT1: (/B is for Binary)
>
> It prints perfect. If I try however
>
> //////////////////////////////
> #include "stdio.h"
> main()
> {
> FILE *in;
> int c;
> in=fopen("TEST.PRN","rb");
> while((c=fgetc(in))!=EOF) fputc(c,stdprn);
> fclose(in);
> exit(0);
> }
> //////////////////////////////
>
> This sends the file to my printer, but it seems all
> garbled?? Any idea why this doesn't work right?
What printer are you using? Is a new model? Does it support DOS or is a
"WinPrinter"?
Hewlett Packard have some printers (very new models) that only work unde
Windows, a lot of job was moved to the PC software, that's the current trend,
this year the WinModems will become more CPU intensive with the new codecs
system specification by Intel.
SET
------------------------------------ 0 --------------------------------
Visit my home page: http://welcome.to/SetSoft
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(5411) 4759 0013
- Raw text -