Mail Archives: djgpp/1997/03/09/23:43:11
Marco Salvalaggio (md2828 AT mclink DOT it) wrote:
> On Wed, 5 Mar 1997 13:33:20 +0200 (IST), you wrote:
> >On 5 Mar 1997, Paul Derbyshire wrote:
> >
> >> Eli Zaretskii (eliz AT is DOT elta DOT co DOT il) writes:
> >> > On 3 Mar 1997, Paul Derbyshire wrote:
> >> >=20
> >> >> printer=3Dfopen("PRN:","w");
> >> >=20
> >> > Did you actually try this? AFAIK, it should be "PRN", not "PRN:".
> >>=20
> >> All my DOS manuals call the device PRN:. Same for all the COM, LPT, =
> and CON.
> >
> >You didn't tell if you tried it. However, I just did, and it seems that
> >your manuals are wrong. The little proggy below consistently fails to
> >open "PRN:", but if I change that to "PRN", it succeeds. This is
> >consistent with what I know: the DOS device name is "PRN", not "PRN:".=20
<Eli's sample code snipped>
> I know we're all off topic here, but I'm just curious. I've always
> thought that PRN and PRN: were just like synonymous for DOS (and so
> were AUX and AUX:, etc..) , so I tried the little Eli's example and
> worked as I expected that is it printed the string (well actually it
> don't 'cos I don't have a printer, but Win95 tried to and give me an
> error when realized that there wasn't one). I've also tried something
> like TYPE AUTOEXEC.BAT > PRN: and the result was the same.=20
> Maybe are you using OpenDos or something similar that react in a
> different way, Eli ?
DEVICE and DEVICE: are not exactly equivilant. Some DOS commands
recognize DEVICE: but it is actually incorrect. This is simple to prove.
Type these commands at the DOS prompt:
truename PRN
truename PRN:
"truename PRN" displays "C:/PRN" when I try it from the root of C drive.
"truename PRN:" however, displays "File not found - PRN:"
BTW: DJGPP supports the /dev virtual device tree that DOS kind of
supports. I think that were you to fopen /dev/prn it would work fine.
--
Beautiful Savior Evangelical Lutheran Church - av568 AT rgfn DOT epcc DOT edu
We have what you need-- A Savior!
- Raw text -