Header file names

C

CBFalconer

Richard said:
(e-mail address removed) said:



It depends who you talk to. IMHO, yes, okay, C99 is the de jure
standard, but C90 remains the de facto standard for the time
being, because hardly any conforming C99 implementations exist.
C99 effectively standardises vapourware.

In addition copies of the C99 standard are readily available, which
does not apply to the C90 standard.
 
R

Richard Heathfield

CBFalconer said:
In addition copies of the C99 standard are readily available, which
does not apply to the C90 standard.

True (although you can get a C89 draft easily enough). But there's no great
advantage to having easy accessibility to a standard that hardly anyone has
implemented.
 
M

Mark McIntyre

But there's no great
advantage to having easy accessibility to a standard that hardly anyone has
implemented.

Other, of course, than making sure your code is as future-proof as can
be reasonably expected.

--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
 
C

CBFalconer

Mark said:
Other, of course, than making sure your code is as future-proof as
can be reasonably expected.

This is one of the few times I have to agree with Mark over
Richard. :)
 
R

Richard Heathfield

Mark McIntyre said:
Other, of course, than making sure your code is as future-proof as can
be reasonably expected.

Good spot. Yes, okay, that's true. But *apart* from that, what have the
Romans ever done for us, eh?
 
C

CBFalconer

Richard said:
Mark McIntyre said:

Good spot. Yes, okay, that's true. But *apart* from that, what
have the Romans ever done for us, eh?

Aren't you guys still using their baths, roads, and walls?
 
E

Eric Sosman

I see now - "the Standard" seems to mean "the C99 standard" in these
parts, rather than C90. Slightly depressing that such a monstrosity has
gained such currency - C90 was a thing of beauty, essentially perfect,
and the idea of polluting something so pure with // comments,
variable-length arrays and all the other junk is not a pleasing one :)

There are some things in C99 whose usefulness eludes me,
but face it: ISO/IEC 9899:1999 (as amended) is the International
Standard. "Be not the first by whom the new is tried, nor yet
the last to lay the old aside."

As for the characters permitted in header names: The rule
is not new, not some kind of C99 invention. You will find the
same rule in Section 3.1.7 of the ANSI C Standard, vintage 1989.
 
P

pete

Eric said:
There are some things in C99 whose usefulness eludes me,
but face it: ISO/IEC 9899:1999 (as amended) is the International
Standard. "Be not the first by whom the new is tried, nor yet
the last to lay the old aside."

As for the characters permitted in header names: The rule
is not new, not some kind of C99 invention. You will find the
same rule in Section 3.1.7 of the ANSI C Standard, vintage 1989.

Header names are in 6.1.7 in my copy of ISO/IEC 9899: 1990.
 
K

Keith Thompson

pete said:
Eric Sosman wrote: [...]
As for the characters permitted in header names: The rule
is not new, not some kind of C99 invention. You will find the
same rule in Section 3.1.7 of the ANSI C Standard, vintage 1989.

Header names are in 6.1.7 in my copy of ISO/IEC 9899: 1990.

Yes, one of the few differences between the 1989 ANSi standard and the
1990 ISO standard is that the latter adds some sections (or splits up
some existing sections?) in accordance with ISO rules. I think that
ANSI C89 3.X.Y always corresonds to ISO C90 6.X.Y, and it's probably
the same for 4 vs. 7.

(I don't think I've ever seen a copy of the actual 1989 ANSI C
standard. ANSI adopted the ISO standard shortly after it was issued;
presumably they stopped printing the older version at that time.)
 
M

Mark McIntyre

Aren't you guys still using their baths, roads, and walls?

er...

romani eunt domi.?
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
 
E

Eric Sosman

pete said:
Header names are in 6.1.7 in my copy of ISO/IEC 9899: 1990.

I see now - "the Standard" seems to mean "the C90 standard"
in these parts, rather than ANSI. Slightly depressing that such
a monstrosity has gained such currency - ANSI was a thing of beauty,
essentially perfect, and the idea of wantonly renumbering all its
exquisite paragraphs and throwing out its non-normative elucidations
is not a pleasing one.
 
R

Richard Bos

That would seem to suggest it's impossible to directly give an absolute
path to a header file, which would start with / rather than a letter,
without using a command-line flag to the compiler or an environment
variable - odd!

Not at all. The implementation _shall_ provide mappings for any
ABCDEFGH.I style header name, but it _may_ accept any other name it
likes. And implementations commonly do. What it does mean is that
#include </this/is/a/path/header.h> is not portable; but that should be
no surprise, because path names themselves are not portable. Would you
expect #include <C:\Program Files\Woggo-C\Projects\Program\header.h> to
work on a unixoid? Of course not. And similarly, a path starting with /
is not valid on a system which uses another directory separator. Your
unixy cc may accept it, but there's no reason for a mainframe compiler
to do so.
I have some legacy scripts for processing ls output that rely on
filenames being in the form
"projectname
filename"
I think that's quite a clear layout in any case.

As a sysadmin as well as a programmer, my sincere reaction is: bleurgh.
Please stop messing with my directory listings. Fix your script, don't
spay your directories.

Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top