C common practice. (was: low level optimization)

Richard Tobin richard at aiai.ed.ac.uk
Tue Apr 30 00:56:15 AEST 1991


In article <22636 at lanl.gov> jlg at cochiti.lanl.gov (Jim Giles) writes:
>as huge numbers of separate source files.  The X11R4 version of
>xterm is distributed as 16 separate source files (even though it's
>a fairly small program that does most of its work by calling widgets).

13 of these contain code.  They contain an average of 17.3 procedures
each.

>Speaking of which, the widgets are distributed as over a hundred
>little .c files - mostly one per procedure.

One (or a very small number) of procedures per file is common for files
which are to be combined into a library, for obvious reasons.

>One file per procedure appears to be standard C practice to me.

10,000 line procedures, spaghetti gotos, and complete lack of
structure appear to be standard Fortran practice to me, but then
perhaps I know as much about that as you do about C practice.

-- Richard
-- 
Richard Tobin,                       JANET: R.Tobin at uk.ac.ed             
AI Applications Institute,           ARPA:  R.Tobin%uk.ac.ed at nsfnet-relay.ac.uk
Edinburgh University.                UUCP:  ...!ukc!ed.ac.uk!R.Tobin



More information about the Comp.lang.c mailing list