Mail Archives: djgpp/1999/01/30/16:02:19
> Look at this code:
>
> while(pch_ptr = fgets(buf , sizeof(buf) , file_ptr))
> {
> fputs(pch_ptr, stdprn); //Prints pointer to screen
> }
>
> It prints to the printer like this:
>
> line one
> next line down and over
> next line down and
> over again.
>
> Any ideas?
At the moment you're writing these strings to stdprn: "line one\n", "next
line down and over\n", "next line down and\n", "over again\n". Just append
a CR character ( '\r') to each string before sending it to the printing
device. ie. "line one\n\r", "next line down and over\n\r", ...
- Raw text -