www.delorie.com/archives/browse.cgi | search |
Newsgroups: | comp.os.msdos.djgpp |
From: | Dan McGregor <dragon AT dragonet DOT dhs DOT org> |
X-Sender: | dragon AT amnesiac DOT home |
Subject: | Re: output to printer |
In-Reply-To: | <26a0479c.3f2ad772@usw-ex0107-050.remarq.com> |
Message-ID: | <Pine.BSF.4.21.0007221045001.268-100000@amnesiac.home> |
References: | <26a0479c DOT 3f2ad772 AT usw-ex0107-050 DOT remarq DOT com> |
MIME-Version: | 1.0 |
Lines: | 19 |
Date: | Sat, 22 Jul 2000 16:49:46 GMT |
NNTP-Posting-Host: | 24.66.253.181 |
X-Complaints-To: | abuse AT home DOT net |
X-Trace: | news1.sshe1.sk.home.com 964284586 24.66.253.181 (Sat, 22 Jul 2000 09:49:46 PDT) |
NNTP-Posting-Date: | Sat, 22 Jul 2000 09:49:46 PDT |
Organization: | @Home Network Canada |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | djgpp AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
Since you are a beginner, I'll give you an assignment. I know how to do what you ask, and I'll tell you... I just won't use any real code. Open a file named "prn" OR "lpt[123]" those are your printer device files in DOS (lpt1 is the first printer, lpt2 the second, etc, while prn is just the first printer it finds). Treat them just like normas ASCII files, text not binary, provided you only want text. Then write to the file using normal file IO routines. When you are done, close the printer file. On Sat, 22 Jul 2000, tshep wrote: > Dear group, > Can anyone please give me a snippet of code demonstrating how to > direct output to the printer in C using DJGPP. > I'm a beginner and the method used by my book does not work > correctly. > Any help would be appreciated.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |