greyelf@wpi.WPI.EDU (Michael J Pender) (10/19/90)
Can anyone tell me why this won't print a file to my printer? It just takes the filename given and executes it like the autoexec file. #include <std.h> #define slot 1 main(ac, av) int ac; TEXT **av; { char c; int stat; FILE *fp = open(av[1]); _prtinit(1); _prtvid(); while ((c=getc(fp)) != -1) { stat = prtWrite(c,1); } _vidonly(); } -- --- Michael J Pender Jr Box 1942 c/o W.P.I. Part of this D- belongs to greyelf@wpi.bitnet 100 Institute Rd. God...
gwyn@smoke.BRL.MIL (Doug Gwyn) (10/19/90)
In article <1990Oct19.123757.25718@wpi.WPI.EDU> greyelf@wpi.WPI.EDU (Michael J Pender) writes: >Can anyone tell me why this won't print a file to my printer? >#include <std.h> > char c; > while ((c=getc(fp)) != -1) While I don't know about Hyper C, in standard C the three lines above would have been written #include <stdio.h> int c; while ((c = getc(fp)) != EOF)