Path: utzoo!mnetor!uunet!nuchat!sugar!peter From: peter@sugar.UUCP (Peter da Silva) Newsgroups: comp.lang.c Subject: Re: Experience with making multiple includes harmless Message-ID: <1292@sugar.UUCP> Date: 20 Dec 87 15:40:46 GMT References: <3251@tut.cis.ohio-state.edu> Organization: Sugar Land UNIX - Houston, TX Lines: 35 Keywords: cpp Summary: It works fine for system libraries. lvc@tut.cis.ohio-state.edu (Lawrence V. Cipriani) writes: > #ifndef SPLAT_H > #define SPLAT_H > ... > #endif /* SPLAT_H */ > > After using this for > about 5 years I now believe this was one of the worse ideas I > ever had. The advantage is that it is great in development > (a relatively short time) (except for the slower compilation > times - yes you can notice it), but after that you have the > maintenance and enhancement stage (a relatively long time). > It is there where the idea fails miserably. It's great for system include files (which you (hopefully) won't be hacking on). You can get rid of the speed problem like so: #ifndef INTUITION_INTUITION_H #define INTUITION_INTUITION_H TRUE #ifndef EXEC_TYPES_H #include "exec/types.h" #endif #ifndef GRAPHICS_GFX_H #include "graphics/gfx.h" #endif #ifndef GRAPHICS_CLIP_H #include "graphics/clip.h" #endif ... and so on... #endif /* INTUITION_INTUITION_H */ -- -- Peter da Silva `-_-' ...!hoptoad!academ!uhnix1!sugar!peter -- Disclaimer: These U aren't mere opinions... these are *values*.