Date: Sun, 7 Mar 1999 13:44:40 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: David Nugent cc: djgpp AT delorie DOT com Subject: Re: Help, DJGPP or ALLEGRO are doing something to printer output? In-Reply-To: <36DFEABD.1074@cbhc.ns.ca> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Fri, 5 Mar 1999, David Nugent wrote: > When it goes to the printer, the printer's data > light flashes for a few seconds, and then the error light > comes on. I originally tried sending the file to stdprn, > and thought this is where the problem was. You need to switch stdprn to binary mode, if the data is binary, like this: setmode (fileno (stdprn), O_BINARY); > So then I > wrote the output to a file and then did a > "COPY /B FILENAME LPT1:" This worked. Now if I take the > same file, and from within my program issue... > > system ("copy /B filename LPT1:"); This should have worked (although you might lose the trailing colon, which is not part of the printer's device name); it worked for me. Please try to do this from a trivial one-line program, and see if that works. If it does, the problem is with the rest of code in the larger program. If the short program doesn't work either, maybe your setup sets the SHELL or COMSPEC environment variables to something unusual. `system' uses these variables to decide what shell to invoke.