typedef names (was: Is typedef char BUFFER[20] legal?)

Amateurgrammer gceych at romeo.caltech.edu
Fri Feb 1 08:02:54 AEST 1991


fred at mindcraft.com (Fred Zlotnick) writes...
:henry at zoo.toronto.edu (Henry Spencer) writes:
:>paul at tredysvr.Tredydev.Unisys.COM (Paul Siu) writes:
:> . . .
:>>Can anyone also tell me what is the most common style convention for type
:>>names, I usually put them all in capitals.
:>
:>Insofar as there is a consensus, it's to put them in lower case with a
:>suffix "_t", e.g. "uid_t" as the type for userids.
: 
:While this has been the consensus, the POSIX.1 standard (ISO/IEC 9945-1:1990,
:or IEEE 1003.1-1990 if you prefer) has reserved the "_t" namespace for
:the system implementor.  (That is, application programs should not use
:symbols ending in "_t"). [deletion] My current convention is to use "_T"
:(and to use lower case letters for the rest of the type name), but I'm
:not thrilled with it.  Any suggestions?

Since my first typedefs were structures, I adopted _st as my typedef
convention, as in typedef structure { /*stuff*/ } param_st;  It's not
the best solution, but it works :-)
:----
%VNEWS-I-ENDOFPOST, signature file appended to end of posted message 
Glenn C. Eychaner             \_  "Do you qualify to be alive, or is the limit
Big Bear Solar Observatory      \_   of your senses so as only to survive?"
eychaner at suncub.bbso.caltech.edu  \           -Ray Stevens, _Mr._Businessman_



More information about the Comp.lang.c mailing list