🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1834

Re: DVItoPS on DECstation

#1834
From: Henry Spencer
Date: Mon, 15 Oct 1990 18:03
25 lines
1588 bytes
In article <1990Oct13.204721.8027@maths.tcd.ie> tim@maths.tcd.ie (Timothy Murphy) writes:
>I think it's quite a common practice to give the "rb" and "wb"
>arguments for Unix/DOS compatibility.
>Is this relying on the compiler's generosity?
>What does standard C say about it?

It's relying on the compiler being standard, which yours obviously isn't yet.
ANSI C says that those are legitimate forms, although on some systems they
may be equivalent to "r" and "w".

>And should the DECstation compiler have complained at compile-time,
>if it didn't understand the argument?

The compiler generally does not try to understand such strings and can't
complain.  They are interpreted at run time; to the compiler, it's just a
character string.  A compiler *could* try to check this, since the second
argument to fopen is almost invariably a string constant, but I'm not aware
of any that does.

It would have been nice if the combination of fopen() and the program in
question reported an error intelligently, so you could tell what was going
on, but intelligent error reporting is very rare.
-- 
"...the i860 is a wonderful source     | Henry Spencer at U of Toronto Zoology
of thesis topics."    --Preston Briggs |  henry@zoo.toronto.edu   utzoo!henry
Technical Details
Message-ID: <1990Oct15.180337.3106@zoo.toronto.edu>
Path: arc1-ca.pugleaf.net!utzoo!henry
References: <1990Oct13.204721.8027@maths.tcd.ie>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c,comp.text.tex
Path: arc1-ca.pugleaf.net!utzoo!henry
From: henry@zoo.toronto.edu (Henry Spencer)
Subject: Re: DVItoPS on DECstation
Message-ID: <1990Oct15.180337.3106@zoo.toronto.edu>
Organization: U of Toronto Zoology
References: <1990Oct13.204721.8027@maths.tcd.ie>
Date: Mon, 15 Oct 90 18:03:37 GMT