nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Changing the return type of done()

2007-04-19 03:25:03

Would it not make more sense to fix the problem at its root rather than
creating a new one, and claiming that's OK since it's how it was done in
the past?

Yes, but I wasn't sure how attached people are to done(). I've heard
no comments made in its favour, so perhaps I can propose a different,
more genuine fix I have in mind.

Indeed.


What I'd really like to do is get rid of sbr/done.c and the done()
declaration in h/prototypes.h altogether, replacing uses of *that*
done() definition with an equivalent return where it appears in main(),
and a use of exit() everywhere else.

For the uses of done() that refer to different definitions, I'd like to
make it a static function in that translation unit. I'm also toying with
the idea of pulling the exit() call out of those specialised done()s
and placing them after the done() calls wherever they occur (if not even
further up the call stack), but I don't like the danger of someone writing
a call to a done() (or whatever) which is not followed by an exit().


This sounds much more reasonable, and should fall in line with the fabled
plan to clean up the code.

Thanks.

-- 
    JB


_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
http://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>