OSLib 6.11 Released

Jonathan Coxhead jonathan at doves.demon.co.uk
Wed Sep 27 01:02:17 BST 2000


 | >    As far as I can see, the best way to decrease the chance of 
collision 
 | > with other headers is to use the already-existing division of OSLib 
into 4
 | > functional units: Core, Computer, User, Toolbox. Norcroft C already 
maps
 | > "/" in include directives onto "." (as well as converted "X.h" into
 | > "h.X"), so the following should work a charm:
 | > 
 | >       #include "Core/os.h"
 | >       #include "Computer/osfind.h"
 | >       #include "User/wimp.h"
 | >       #include "Toolbox/keyboardshortcut.h"
 | > 
 | > etc, and compile with -I$.OSLib or its moral equivalent.
 | > 
 | >    I think that's completely portable to all platforms, and reduces 
the 
 | > chance of a collision to damn close to 0. Am I right?
 | 
 | I think so.  Just avoid creating new sections called Global, Interface or
 | Interface2 please ;-)

   ... or any of sys, net, netinet, X11 which are also in wide use.

   As I said, it's *close* to 0, but not there. There's no naming scheme 
for this kind of thing that I know of, even in C++, where namespace are 
supposed to help with this kind of problem

        /|
 o o o (_|/
        /|
       (_/



More information about the oslib-user mailing list