Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

C Macro question



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






BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org