On Sun, 2003/01/05 at 01:33:14 -0800, David O'Brien wrote: > On Sun, Jan 05, 2003 at 06:00:26PM +1100, Bruce Evans wrote: > > > >> ===> usr.bin/vi > > > >> *** Error code 1 (ignored) > > > >> *** Error code 1 (ignored) > > > >> ===> usr.bin/vis > .. > > No; it would be more profitable to teach programmers to not ignore errors. > > whereintheworld is perfectly non-broken in not ignoring them. These > > "*** Error" messages (not to mention other error ouput from makeworld) > > also make it harder for human readers to see the actual errors. > > Agreed. I'd love to hear from fanf what the changes are to unifdef that > causes this change in exit code.
According to the man page, this is the correct behaviour: The unifdef utility exits 0 if the output is an exact copy of the input, 1 if not, and 2 if in trouble. The exit status code in unifdef seems to have been broken before for a while. The vi Makefile just was sloppy in checking for the exit code; it should probably check for 1 and exclude 0 also, like: --- Makefile 29 Jul 2002 09:40:16 -0000 1.38 +++ Makefile 5 Jan 2003 13:20:49 -0000 @@ -75,10 +75,12 @@ # unifdef has some *weird* exit codes, sigh! RTFM unifdef(1)... ex_notcl.c: ex_tcl.c - -unifdef -UHAVE_TCL_INTERP ${SRCDIR}/ex/ex_tcl.c > ${.TARGET} + ! { unifdef -UHAVE_TCL_INTERP ${SRCDIR}/ex/ex_tcl.c > ${.TARGET} || \ + [ $$? -ne 1 ] ; } ex_noperl.c: ex_perl.c - -unifdef -UHAVE_PERL_INTERP ${SRCDIR}/ex/ex_perl.c > ${.TARGET} + ! { unifdef -UHAVE_PERL_INTERP ${SRCDIR}/ex/ex_perl.c > ${.TARGET} || \ + [ $$? -ne 1 ] ; } CLEANFILES+= ex_notcl.c ex_noperl.c --- (there's probably a more elegant way to do this, my sh is a bit rusty). - Thomas -- Thomas Moestl <[EMAIL PROTECTED]> http://www.tu-bs.de/~y0015675/ <[EMAIL PROTECTED]> http://people.FreeBSD.org/~tmm/ PGP fingerprint: 1C97 A604 2BD0 E492 51D0 9C0F 1FE6 4F1D 419C 776C To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message