This code looks as if it and the similar code in bcomps.c were copy-pasted from
the same common source. Except the bcomps.c version remembered to exit when
failing to open the output file, whereas the ccomps.c code would go on to crash
when using the null `outf`.
- Compatibility with `/bin/sh` has been restored in the Autotools build system.
This was a regression in Graphviz 7.0.6. This restores the ability to compile
on NetBSD which was fixed in 7.0.4 but regressed in 7.0.6. #2340
+- `ccomps` no longer crashes when failing to open files.
## [7.0.6] – 2023-01-06
if (!outf) {
fprintf(stderr, "Could not open %s for writing\n", name);
perror("ccomps");
+ graphviz_exit(EXIT_FAILURE);
}
agwrite(g, outf);
fclose(outf);