global.h and globals.c

David Relson relson at osagesoftware.com
Sat Jan 4 02:36:15 CET 2003


Matthias,

Currently, options set via command line flags are defined as global 
variables and either exist in the one file that uses them or else they 
exist in config.c or one of the files defining main().   As you know, this 
cause trouble when the linker starts pulling in the wrong file because we 
put the variable in the wrong file.

We currently have a globals.h, but no globals.c.  What if we created a 
globals.c and used it as the place holder for all these variables?  It 
would define the 10 (or is it 20?) globals currrently used by bogofilter, 
bogolexer, and bogoutil.  There wouldn't be a need for any code in the file 
- just global variables.

'Tis a thought that just struck me.  If you like it, use it.

David





More information about the bogofilter-dev mailing list