Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@zoo.toronto.edu (Henry Spencer)
Subject: Re: Is typedef char BUFFER[20] legal?
Message-ID: <1991Jan29.210100.8105@zoo.toronto.edu>
Organization: U of Toronto Zoology
References: <1212@tredysvr.Tredydev.Unisys.COM>
Date: Tue, 29 Jan 1991 21:01:00 GMT

In article <1212@tredysvr.Tredydev.Unisys.COM> paul@tredysvr.Tredydev.Unisys.COM (Paul Siu) writes:
>Is the following statements legal in K&R C, and ANSI C?
>     typedef char BUFFER[20];

Yes.

>... is this going to break when the program is ported?

There is probably some old compiler somewhere that will balk.  It's
impossible to avoid that.  (Geoff Collyer and I could tell you some
stories about compilers vs. C News...)

>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.
-- 
If the Space Shuttle was the answer,   | Henry Spencer at U of Toronto Zoology
what was the question?                 |  henry@zoo.toronto.edu   utzoo!henry
