From: "Damian Yerrick" Newsgroups: comp.os.msdos.djgpp References: <81uq89$n0l$1 AT news2 DOT tor DOT accglobal DOT net> Subject: Re: fprintf to HP Deskjet Lines: 32 Organization: Pin Eight Software X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Message-ID: X-Trace: /bQNuahjXBH31TVbyZVbqjFAKOev2J0HnvKcVrTgb4uUrLqhvqoU7OqNoers6RFP0itQQibzvhv4!jXdI5BatEgPfUra1Oyx4GVvjnSVaDtCpjTKtPXi0G7hrac+GoH8aF9/7kiD2gH/dRm+1DFYc X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Tue, 30 Nov 1999 00:32:22 GMT Distribution: world Date: Tue, 30 Nov 1999 00:32:22 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Michel Chassey" wrote: > Hello everyone, > I invoke gcc : gcc -o f.exe f.c (for testing) > Here is the f.c listing : > #include > int main( void ) > { > fprintf ( stdprn, "Hello World" ); > return( 1 ); > } > The printer goes though the motion of printing then hangs. Lights blink but > no printing: > result blank page. Change the fprintf() statement to fprintf(stdprn, "Hello World\n\x0c"); This inserts a newline (\n) and a formfeed (\x0c), telling the printer to kick out the paper. And return 1; in main() generally means that the program ran into error type 1, however you define that. If you want to say "no error," say return 0; Damian Yerrick