include files -- help needed

Mathias Koerber koerber.sin at sni.de
Tue Jun 11 14:31:27 AEST 1991


In article <1991Jun7.233854.11170 at arcturus.uucp> guthriew at arcturus.uucp (Guthrie;Wade) writes:
>
>In order to follow the guidelines of
>
>	1) no nested include files and
>	2) limiting the scope of globals and typedefs,

Why no nested include files? They are a *GOOD THING*, especially when one
include file automatically includes the definitions it references itself. On
pre-ansi compiler you must be a bit carefule about multiple inclusions though,
since not all headers have the

#ifndef THIS_IS_A_UNIQUE_DEFINE
#define THIS_IS_A_UNIQUE_DEFINE
...
#endif

code to skip the file when it was already included. Maybe you could add them
to your standard header files to make it even easier on the programmer. Just
be sure to pick unique_defines that are guaranteed to be really unique.

Mathias



More information about the Comp.lang.c mailing list