[comp.lang.c] Wanted: C Coding Standards Info

trb@stag.UUCP ( Todd Burkey ) (03/17/88)

Hi,
  We are currently looking into a long term migration from a Pascal Programming
environment (>1 million lines of code on Apollos) to C. Our main areas of
concern center around obtaining portable and maintainable code. Since many
of our programmers have never used C before, we really need to start out on
the right foot and have a well defined set of coding standards. I would
appreciate any input from the net at large on this topic. I have a copy of
the Indian Hill C Style and Coding Standards (as ammended for U of T Zoololgy
Unix...as ammended for HCR Project E). I have no idea how old it is, though.

  Please send any responses to me at trb@stag.UUCP and I will summarize to the
net if anyone else is interested. Thanks in advance.

  -Todd Burkey
   trb@stag.UUCP
   ...ihnp4!bungia!stag!trb
   or ...crash!stag!trb  for you West Coast people...

djones@megatest.UUCP (Dave Jones) (03/19/88)

in article <355@stag.UUCP>, trb@stag.UUCP ( Todd Burkey ) says:
> 
> Hi,
>   We are currently looking into a long term migration from a Pascal Programming
> environment (>1 million lines of code on Apollos) to C. Our main areas of
> concern center around obtaining portable and maintainable code. Since many
> of our programmers have never used C before, we really need to start out on
> the right foot and have a well defined set of coding standards.

...


Look into the "Indian Hill" standards.  Pretty good so far as it goes.
But I don't really think that how you indent things, and how you format
comments is really very important.

I would also recommend that you get a copy of C++, and use that instead of
straight C.  For new code it's absolutely wonderful.  I'm hooked.  But
even for this translation effort it would be useful.  Just the type-checking
of procedure parameters will save you some debug sessions.

		Dave Jones
		Megatest Corp.
		880 Fox Lane
		San Jose, CA.
		95131

		(408) 437-9700 Ext 3227
		UUCP: ucbvax!sun!megatest!djones
		ARPA: megatest!djones@riacs.EDU

robert@rabbit1.UUCP (Robert Oliver) (03/31/88)

In addition to the info Dave suggested in his followup article, you might try:

"Portable C and Unix System Programming" by J.E.Lapin
Prentice-Hall 

I'll say no more, since it was written here.
-- 

Robert Oliver			
Rabbit Software Corp.		(215) 647-0440
7 Great Valley Parkway East     ...!ihnp4!{cbmvax,cuuxb}!hutch!robert
Malvern, PA  19355		...!psuvax!burdvax!hutch!robert

lm@arizona.edu (Larry McVoy) (04/03/88)

In article <448@rabbit1.UUCP> robert@rabbit1.UUCP (Robert Oliver) writes:
>In addition to the info Dave suggested in his followup article, you might try:
>
>"Portable C and Unix System Programming" by J.E.Lapin
>Prentice-Hall 
>
>I'll say no more, since it was written here.

I bought and read this about a year ago.  It's ok, not great.  

The best way I know to gain coding style (term used loosely) is to work on
kernel code for a while.  it's got a style that a lot of people hate but one
that many come to know and love after a few years of experience.  (I hate
comments for the most part, when there are a lot of them they're almost 
always wrong.  Not true in the kernel, but then there aren't a lot of 
comments either....)
-- 
"These aren't my thoughts, they're my cat walking on the keyboard."

Larry McVoy	lm@arizona.edu or ...!{uwvax,sun}!arizona.edu!lm

henry@utzoo.uucp (Henry Spencer) (04/06/88)

> "Portable C and Unix System Programming" by J.E.Lapin
> Prentice-Hall 

It's not bad.  I wouldn't call it great -- I disagree with some of its
judgement calls -- but it's competently done and lots better than nothing.
-- 
"Noalias must go.  This is           |  Henry Spencer @ U of Toronto Zoology
non-negotiable."  --DMR              | {allegra,ihnp4,decvax,utai}!utzoo!henry

wes@obie.UUCP (Barnacle Wes) (04/08/88)

In article <448@rabbit1.UUCP>, robert@rabbit1.UUCP (Robert Oliver) writes:
| In addition to the info Dave suggested in his followup article, you might try:
| 
| "Portable C and Unix System Programming" by J.E.Lapin
| Prentice-Hall 
| 
| I'll say no more, since it was written here.
| -- 
| 
| Robert Oliver			
| Rabbit Software Corp.		(215) 647-0440
| 7 Great Valley Parkway East     ...!ihnp4!{cbmvax,cuuxb}!hutch!robert
| Malvern, PA  19355		...!psuvax!burdvax!hutch!robert

J. E. Lapin works at Rabbit software?  Oh God, that's GOOD!

(Sorry, I just couldn't resist!)
-- 
    /\              -  "Against Stupidity,  -    {backbones}!
   /\/\  .    /\    -  The Gods Themselves  -  utah-cs!utah-gr!
  /    \/ \/\/  \   -   Contend in Vain."   -  uplherc!sp7040!
 / U i n T e c h \  -       Schiller        -     obie!wes