C Macro question
Jerry Feldman
gaf at blu.org
Sun Jun 16 22:30:57 EDT 2002
We should probably defer this to Finnbarr, but, there are only 2 C language
standards, ISO 89 and ISO 99. XPG3 is a Unix specification which has been
subsumed by Unix 98.
This and other specs defer to the outstanding C standards. Since I
generally work in porting code, I try to keep my code portable. vsnprintf
is a reasonably good function, and safer than vsprintf.
However, the issue in the code is to add something like a date and a
standard message header for a log file. The first sprintf, effectively
concatenates the date and the format specification, and vfprintf uses that
result as the new format spec.
"Derek D. Martin" wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> At some point hitherto, Jerry Feldman hath spake thusly:
> > I write C code according to the C standard.
>
> Well, which one? There are many C "standards" these days... We have:
>
> XPG3
> ANSI C/ISO C89
> ISO C99
> IEEE 1003.1 (formerly POSIX.1)
> IEEE 1003.1b-1993
> IEEE 1003.1c-1995
> About a dozen other C-specific POSIX standard extensions
> SVID C specifications...
> BSD C specifications...
--
Jerry Feldman <gaf at blu.org>
Boston Linux and Unix user group
http://www.blu.org PGP key id:C5061EA9
PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
More information about the Discuss
mailing list