coding style - Struct Name Standards in C -
what naming standards data structures in c language?
for example, following code snippet picked http://www.sparknotes.com/cs/searching/hashtables/section3.rhtml:
typedef struct _hash_table_t_ { int size; /* size of table */ list_t **table; /* table elements */ } hash_table_t;
why _*_
used naming struct, not typedef? _t
stand for? , on...
a link pointing correct guide perfect.
i've been searching google , looking coding style guides, couldn't find relate that.
you should never copy naming conventions of c implementation or third party libraries. use naming convention not interfere (have name clashes) your code.
the use of tag names starting underscore expressly forbidden in iso c99, 7.1.3:
— identifiers begin underscore reserved use identifiers file scope in both ordinary , tag name spaces.
personally, believe using typedefs structs silly, since saving writing struct
keyword in few places--information should rather not hidden behind typedef. cringe when see typedef names structs end in *_s
signify typename alias struct.
Comments
Post a Comment