The exit status of nop was a bitwise-OR of two error counts. I do not see how
the actual value of this could ever be useful, except for being non-zero.
However, a non-zero exit status is not always an error. E.g. on VMS there are
some non-zero exit statuses that still indicate success.
This change causes nop to more reliably and portably exit with EXIT_FAILURE when
encountering errors.
- marginally more accurate computations in Smyrna sphere projection
- Perl is no longer required to build Graphviz #2067
+- nop more reliably returns success and failure exit statuses
### Fixed
Print usage information.
.SH "EXIT STATUS"
If any errors occurred while processing any input, such as a file
-not found or a file containing illegal DOT, a non-zero exit value
-is returned. Otherwise, zero is returned.
+not found or a file containing illegal DOT, \fBEXIT_FAILURE\fR is returned.
+Otherwise \fBEXIT_SUCCESS\fR is returned.
.SH "SEE ALSO"
wc(1), acyclic(1), gvpr(1), gvcolor(1), ccomps(1), sccmap(1), tred(1), libgraph(3)
break;
case '?':
if (optopt == '\0' || optopt == '?')
- usage(0);
+ usage(EXIT_SUCCESS);
else {
fprintf(stderr, "nop: option -%c unrecognized\n",
optopt);
- usage(1);
+ usage(EXIT_FAILURE);
}
break;
default:
agclose(g);
}
- return(ig.errors | agerrors());
+ return (ig.errors != 0 || agerrors() != 0) ? EXIT_FAILURE : EXIT_SUCCESS;
}