arg_foreach [was: [cvs] main.c, bogoconfig.c,...]
David Relson
relson at osagesoftware.com
Fri May 9 22:30:13 CEST 2003
- Previous message (by thread): [cvs] bogofilter/src main.c,1.41,1.42 bogoconfig.c,1.51,1.52 bogofilter.c,1.10,1.11 bogofilter.h,1.4,1.5 register.c,1.11,1.12 register.h,1.2,1.3
- Next message (by thread): arg_foreach
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
At 04:19 PM 5/9/03, Matthias Andree wrote:
>relson at users.sourceforge.net writes:
>
> > process_args_and_config_file(argc, argv, true);
> >
> > /* open all wordlists */
> > open_wordlists((run_type == RUN_NORMAL) ? DB_READ : DB_WRITE);
> >
> > - out = output_setup();
> > + fpo = output_setup();
> >
> > initialize(NULL);
> >
> > if (run_type & (RUN_NORMAL | RUN_UPDATE)) {
> > - exitcode = classify(argc, argv, out);
> > + exitcode = arg_foreach(classify, argc, argv);
>
>Is this the right thing to do? Does arg_foreach iterate over options as
>well?
Matthias,
I'm not sure I understand your questions.
At the point when argc and argv are passed to arg_foreach(), the options
have already been consumed. What's left are bulk mode filenames (if any).
arg_foreach() iterates over the bulk mode file list (or reads filenames
from stdin, if appropriate) and calls hook() for each file. This is done
to extend the bulk mode from classification to classification and registration.
David
- Previous message (by thread): [cvs] bogofilter/src main.c,1.41,1.42 bogoconfig.c,1.51,1.52 bogofilter.c,1.10,1.11 bogofilter.h,1.4,1.5 register.c,1.11,1.12 register.h,1.2,1.3
- Next message (by thread): arg_foreach
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the bogofilter-dev
mailing list