Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!mcsun!ukc!edcastle!aiai!richard From: richard@aiai.ed.ac.uk (Richard Tobin) Newsgroups: comp.lang.c Subject: Re: C common practice. (was: low level optimization) Message-ID: <4565@skye.ed.ac.uk> Date: 29 Apr 91 14:56:15 GMT References: <21964@lanl.gov> <15904@smoke.brl.mil> <22354@lanl.gov> <16815@chaph.usc.edu> <22636@lanl.gov> Reply-To: richard@aiai.UUCP (Richard Tobin) Organization: AIAI, University of Edinburgh, Scotland Lines: 25 In article <22636@lanl.gov> jlg@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@uk.ac.ed AI Applications Institute, ARPA: R.Tobin%uk.ac.ed@nsfnet-relay.ac.uk Edinburgh University. UUCP: ...!ukc!ed.ac.uk!R.Tobin