TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Mario Guthrie
from: hugo landsman
date: 1996-01-23 14:29:48
subject: DOS printing

hi Mario,

 MG>    My DOS programs under OS/2 are not printing until the program
 MG> terminates. The statement:                        fprintf( stdprn,
 MG> "Print this one line \r\n"); Does not print under WARP (
from the DOS
 MG> prompt) until the program terminate OR the DOS setting print timeout 
 MG> has been exceeded.  I need a way to tell the print spooler that the
 MG> print job is complete. I am using a HP type laser printer and
 MG> typically issue a form feed like:          fprintf( stdprn, "\f"); 
 MG> to eject the page --- it works great under DOS, but WARP seems to
 MG> think the print job is not done.   Any suggestions would be helpful.

fflush(stdprn); close(dup(fileno(stdprn))); should do (without loosing
further access to the stdprn stream).  And compiles under other systems
(like OS/2) unchanged.

regards,
         hugo
* Origin: huug{at}telebyte.nl (2:283/608.5)
SEEN-BY: 50/99 270/101 620/243 711/401 409 410 413 430 808 809 934 955
SEEN-BY: 712/407 515 517 628 713/888 800/1 7877/2809
@PATH: 283/608 2801/201 28/777 2/777 396/1 270/101 712/515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.