Subject: Re: C vs. prototypes (was: Problems with gdb under NetBSD 1.0 )
To: woods@kuma.web.net (Greg A. Woods), Bakul Shah <bakul@netcom.com>
From: John Nemeth <jnemeth@cue.bc.ca>
List: current-users
Date: 12/14/1994 22:11:36
On Dec 14,  2:57pm, Greg A. Woods wrote:
} Subject: C vs. prototypes (was: Problems with gdb under NetBSD 1.0 )
} 
} IMNSHO (having ported hundreds of thousands of lines of C to everything
} from MeSsy-DOgS to every flavour of UNIX still running), it was easier
} to both write portable software, and to port software, before ANSI-C got
} their fingers in this mess.  Thanks a bunch Bjarne!

     I would have to agree.  K&R C is still the most portable form of
C except for cases where people change standard functions (i.e. does
signal return void or int {int is supposed to be the previous signal
handler for the signal in question so that you can restore it if you
wish}, does lseek take a long or a quad {note that the 'l' stands for
long}).  One of my pet peeves is people that write what is mostly K&R
C (i.e. no prototypes, etc.), but then stick things like 'void *' in
the code (just watch my Ultrix compiler blow up on that).

} Lint did all of the work prototypes attempt to do, but did a far more
} complete and accurate job of it, and doesn't make/allow mistakes.

     Yep, ANSI C compilers don't do cross-file checks and therefore
can miss a lot of problems.  If you feed multiple files to lint, it
will make two passes, the first for internal consistency problems and
the second for external consistency problems.  Does anybody know of a
decent free version of lint?

} Actually, I'd live with prototypes *iff* the automatic type coercion was
} not available....

     I'd rather ditch ANSI C, and Hungarian notation (but that's a
different beef {MS Windows programming is so much fun, NOT!}), even
though my last name is hungarian.

}-- End of excerpt from Greg A. Woods