| delorie.com/archives/browse.cgi | search |
| Message-ID: | <36C9857E.55EC@cbhc.ns.ca> |
| From: | David Nugent <davidn AT cbhc DOT ns DOT ca> |
| X-Mailer: | Mozilla 3.01 (WinNT; I) |
| MIME-Version: | 1.0 |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: Help with sending a file to a printer. |
| References: | <36C95237 DOT C81A112D AT cbhc DOT ns DOT ca> <199902161746 DOT MAA04793 AT envy DOT delorie DOT com> |
| Lines: | 17 |
| Date: | Tue, 16 Feb 1999 14:49:34 +0000 |
| NNTP-Posting-Host: | 142.176.79.34 |
| X-Trace: | sapphire.mtt.net 919198192 142.176.79.34 (Tue, 16 Feb 1999 16:49:52 ADT) |
| NNTP-Posting-Date: | Tue, 16 Feb 1999 16:49:52 ADT |
| Organization: | Business Internet |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
DJ Delorie wrote:
>
> > 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.
Thank you very much! I tried this suggestion and it
fixed my problem.
Greatly appreciated!
Dave Nugent
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |