global.h and globals.c

Matthias Andree matthias.andree at gmx.de
Sat Jan 4 02:48:13 CET 2003


On Fri, 03 Jan 2003, David Relson wrote:

> 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.

Going for it, and if that's about command line options, looks like the
common options can also go in that file.

-- 
Matthias Andree




More information about the bogofilter-dev mailing list