Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!mucs!m1!bevan From: bevan@cs.man.ac.uk (Stephen J Bevan) Newsgroups: comp.lang.c Subject: Why have xxx_t typedef names (was Re: Is typedef char BUFFER[20] legal?) Message-ID: Date: 30 Jan 91 08:42:05 GMT References: <1212@tredysvr.Tredydev.Unisys.COM> <1991Jan29.210100.8105@zoo.toronto.edu> Sender: news@cs.man.ac.uk Distribution: comp Organization: Department of Computer Science, University of Manchester Lines: 20 In-reply-to: henry@zoo.toronto.edu's message of 29 Jan 91 21:01:00 GMT In article <1991Jan29.210100.8105@zoo.toronto.edu> henry@zoo.toronto.edu (Henry Spencer) writes : > In article <1212@tredysvr.Tredydev.Unisys.COM> > paul@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. What is the purpose of the "_t" ... etc. postfixes ? It obviously makes any variables defined by a typedef'd type very clear, but is that important? I think not. ``Recommended C Coding Standards''(v5.3) mentions them in section 11, but only says ``Typedeffed names often have "_t" appended to their name''. I'm still left with the question, why have postfixes? Stephen J. Bevan bevan@cs.man.ac.uk