SDB and C programs

moss at BRL-VLD.ARPA moss at BRL-VLD.ARPA
Wed Jul 18 22:56:22 AEST 1984


From:      "Gary S. Moss (DRXBR-VLD-V)" <moss at BRL-VLD.ARPA>

Sorry, can't help with SDB, but it seems to me that you should not
put procedures in include files.  If you are doing so because more
than one program requires them, they should be archived in a library
(see ar(1)).  If only one program uses the procedures, than including
them can only cause confusion, lint(1) for example has enough trouble
determining what module and line number to report.  Of course, the
library should be debugged via a simple test program which is kept
in the directory with the library sources to test the procedures
after each version of the archive is produced.

The best things to put in include files are macros, external declarations
and typedefs.  Global definitions and procedures should reside in
'.c' files.  Also, the use of '.z' as a suffix could be bad news, pack(1)
uses this for output files.

-- Moss.



More information about the Comp.unix mailing list