cvs commit: ALFS/nALFS/src bufsize.h init.c nalfs.c options.c

Kevin P. Fleming kpfleming at linuxfromscratch.org
Thu Nov 6 10:22:08 PST 2003


Kevin P. Fleming wrote:

> Instead, I can create "nprint_init". This will do only the stdout/stderr 
> stuff that nprint_text does, no messing with prefix characters, log 
> files, etc. In addition, nalfs.c would contain two variables, "static 
> int init_errors = 0;" and "static int init_warnings = 0;". Each time 
> nprint_init gets called with T_ERR, it increments init_errors; each time 
> it gets called with T_WAR, it increments init_warnings. nalfs.c/main() 
> sets nprint to nprint_init until after all initialization tasks are 
> done, then to nprint_text (and on to nprint_curses if interactive mode 
> is in use).
> 

(replying to myself :-)

I started making these changes; it seems to be a very good solution, 
simple to use. At least now when a luser does:

   nALFS --rcfile profile.xml

They get all the parsing error messages as nALFS tries to read the 
profile as if it was an rcfile, then "No profiles specified" and the 
program exits.

There is still a problem in that if /etc/nALFSrc or ~/.nALFSrc contain 
errors and nALFS --help or nALFS --version are run the parsing errors 
will still be reported, but that's because we parse those files before 
even looking at the command line, so this is not new behavior.




More information about the alfs-log mailing list