sms@xxxxxxxxxxxx (Steven M. Schweda) writes:
> I don't want to seem like a chronic complainer (although that might
> be an accurate description), but "return 0" is exactly the wrong thing
> to do.
Wget is a Unix program. Unix programs do return 0 on success.
C does provide EXIT_SUCCESS and EXIT_FAILURE, but then you don't have
anything else to return. Besides, Wget already uses Unix-like
functionality such as BSD networking, so it's not exactly written
using only strictly conforming C.
> Even better, Zip has a macro, EXIT (frequently defined as "exit"),
> which is used in all places where an exit status is returned to the
> OS. (On VMS, it's defined as "vms_exit", a VMS-specific function in
> which special VMS stuff is done, like combining the raw status value
> with a severity code and a facility code, before calling the normal
> exit() function.)
>
> That's just good engineering, not over-engineering.
I agree -- as long as portability to non-Unix platforms like VMS is a
design goal. During my tenure it wasn't, but Mauro can certainly
change that.
Anyway, Tony and I were discussing something different and more
complex, and the over-engineering adjective referred to that, not to
what you're proposing.
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|