From: kagel AT quasar DOT bloomberg DOT com Date: Fri, 19 Apr 1996 08:41:52 -0400 Message-Id: <9604191241.AA04010@quasar.bloomberg.com > To: djgpp AT delorie DOT com In-Reply-To: <9604182224.AA03499@quasar.bloomberg.com > (kagel@quasar) Subject: Re: Help writing to the printer Reply-To: kagel AT dg1 DOT bloomberg DOT com From: kagel AT quasar Date: Thu, 18 Apr 1996 18:24:35 -0400 HELP! I'd hoped that V2 would solve this because V2 solved a similar problem I had with piped output, but, it did not. I am trying to write to the default DOS printer (PRN, LPT1) and cannot. The app's output goes to the DJGPP temp directory and never prints. Anyone have a solution? Anyone try this? I'll post a code sample tomorrow. In my Borland and other 16bit versions I just wrote to stdprn or opened a file named "PRN" and voila! Neither solution seems to work. So ... HELP! ********************* OK here is one version of the code (I've tried several): #ifdef __DOS__ output = stdprn; outstatus = TOPIPE; #elif defined(unix) output = (FILE*)NULL; outstatus = TOPIPE; #endif ............... fprintf( output, line ); etc...... Another: #ifdef __DOS__ output = NULL; outname = "LPT1"; outstatus = TOFILE; ALSO TRIED: outname = "PRN"; outname = "LPT1:"; outname = "PRN:"; #elif defined(unix) output = (FILE*)NULL; outstatus = TOPIPE; #endif .............. if (outstatus == TOFILE && output = (FILE *)NULL) output = fopen( outname, "w" ); .............. fprintf( output, line ); etc...... -- Art S. Kagel, kagel AT quasar DOT bloomberg DOT com A proverb is no proverb to you 'till life has illustrated it. -- John Keats