cvs commit: ALFS/nALFS/src bufsize.h init.c nalfs.c options.c
haski at sezampro.yu
Wed Nov 5 18:23:02 PST 2003
On Wed, Nov 05, 2003 at 02:00:55PM -0700, Kevin P. Fleming wrote:
> >> modify init.c to use Nprint_err for some messages instead of direct
> >> fprintf
> >> modify option_invalid to use Nprint_err instead of direct fprintf
> >Any special reason for these? I intentionally used printf functions
> >to be clear that all this initialization is done before curses are
> >even started.
> Well, I figured that you had created nprint_text for some reason, so I
> decided to use it (especially since I saw the TODO about making it handle
> T_ERR by outputting to stderr).
Yes, it was done for non-interactive mode.
> >I suggest you remove these, then there won't be any reason for
> >including win.c in init.c and options.c as well.
> This was driven by wanting to be able to use Nprint_err in
> option_invalid(), so at some point in the future (when some more
> coding has been done) if someone tries to change an option to an
> invalid value _after_ curses has been started up, the messages can
> go the normal places (status window and log file). When I saw that
> nprint_text already existed and was very close to what I needed, I
> extended it a little bit and used it.
You're right, it's better that everything goes through Nprints then.
And we can always create another function instead of nprint_text
(those "E:"s and "I:"s are things that I dislike in initialization
phase, but no need to worry about that now).
More information about the alfs-log