🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #148

Re: TP or C ?

#148
From: Mike Hamrick
Date: Thu, 23 Jul 1992 05:14
26 lines
1579 bytes
Chris Gray writes:

>Folks! Use full prototypes. Turn on all possible warning flags. Make your
>code compile clean. Use some fairly standard programming style. Make your
>file global variables instantly distinguishable from your local ones. Avoid
>inter-file globals (externs) like the plague. Don't overuse macros. Make
>ALL macro names in all upper case (except perhaps true/false).

Wow.  I can't agree with you more.  I learned ANSI C programming while
I worked at Microsoft.  I can't tell you how many times function prototypes
have saved my skin.  It seems all the source code I look at in the UNIX
world is non-ANSI, this sorta bugs me.  I also agree with you regarding
always using all possible warning flags, however it becomes difficult
to do this when the OSCALLS.H header file on your system looks like this:

extern int access();
...

I suppose I could make my own stinking header file which has stuff that
looks like: 

extern int access (char *, int);

Would it really be worth it?

mikeh
Technical Details
Message-ID: <1992Jul23.051406.15832@u.washington.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!gumby!destroyer!ubc-cs!uw-beaver!news.u.washington.edu!milton.u.washington.edu!hamrick
References: <1992Jul20.203317.10143@esds.mdc.com> <1992Jul22.000454.24871@ccu1.aukuni.ac.nz> <cg.0afn@ami-cg.UUCP>

Show Full Headers
Complete Article Headers
Newsgroups: rec.games.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!gumby!destroyer!ubc-cs!uw-beaver!news.u.washington.edu!milton.u.washington.edu!hamrick
From: hamrick@milton.u.washington.edu (Mike Hamrick)
Subject: Re:  TP or C ?
Message-ID: <1992Jul23.051406.15832@u.washington.edu>
Sender: news@u.washington.edu (USENET News System)
Organization: University of Washington, Seattle
References: <1992Jul20.203317.10143@esds.mdc.com> <1992Jul22.000454.24871@ccu1.aukuni.ac.nz> <cg.0afn@ami-cg.UUCP>
Date: Thu, 23 Jul 1992 05:14:06 GMT
Lines: 26