[comp.sys.mac.programmer] Using Printer from LSC

leue@galen.steinmetz (03/11/88)

I am writing a small application using Lightspeed C, Rev 2.11.  I am
trying to use an Imagewriter 1 connected to the printer port for debugging
printouts.  I am having trouble getting the paper to advance at the end
of a line of text.  Here is a code skeleton:

	FILE *pfile;
	.
	.
	pfile = fopen(".BOut", "a");
	.
	.
	fprintf(pfile, "Hello, World\n");
	fprintf(pfile, "This is the next line\n");
	.
	.
	fclose(pfile);

All the text is printed out just fine.  However, each succeeding line
overwrites the previous one, which makes it very hard to read :-)
I've tried substituting "\015\012" for "\n" as a line terminator, to
no avail.  I've also tried dorking around with all the control characters
documented in the Imagewriter manual which have anything to do with
paper advance.  Still no luck.  It's clear that control characters DO
get seen by the printer, however, since if I send a FORM FEED ("\014"),
I get a page eject.

Has anyone got a clue as to what I am doing wrong?
-Bill
leue@ge-crd.arpa
uunet!steinmetz!nmr!leue