Mail Archives: djgpp/1999/02/16/12:48:12

Date: Tue, 16 Feb 1999 12:46:23 -0500
Message-Id: <>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp AT delorie DOT com
In-reply-to: <> (message from David Nugent on Tue,
16 Feb 1999 11:10:47 +0000)
Subject: Re: Help with sending a file to a printer.
References: <36C95237 DOT C81A112D AT cbhc DOT ns DOT ca>
Reply-To: djgpp AT delorie DOT com

> in=fopen("TEST.PRN","rb");
> while((c=fgetc(in))!=EOF)  fputc(c,stdprn);

Try adding this before that while loop:

	setmode(fileno(stdprn), O_BINARY);

You'll need #include <fcntl.h> also.

- Raw text -

  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019