January 02, 2005
I am writing C programs for execution from Windows 2000's command line.  stdprn (and stdaux) are defined in stdio.h only if __STDC__ and __NT__ are not.  I want to compile for ANSI (-A) and use large long ints and long doubles, which require -mn, So _STDC__ and __NT__ ARE defined, and I can not print with fprintf(stdprn,...).

Is there a way around the above?  Is there another short way to send output to the printer with -A and -mn active?


January 03, 2005
nnisbet@express56.com wrote:

> I am writing C programs for execution from Windows 2000's command line.  stdprn
> (and stdaux) are defined in stdio.h only if __STDC__ and __NT__ are not.  I want
> to compile for ANSI (-A) and use large long ints and long doubles, which require
> -mn, So _STDC__ and __NT__ ARE defined, and I can not print with
> fprintf(stdprn,...).
> 
> Is there a way around the above?  Is there another short way to send output to
> the printer with -A and -mn active?
> 
> 

The command line on win-NT/2000/XP is NOT dos.

To write to the printer port use the win32 api functions:
OpenPrinter (..)
StartPagePrinter (..)
etc

When you really want to use dos because of the 'stdprn' etc, use an extender like dos x 32 see http://www.dosextender.com/

Arjan