call - which makes the code completely impossibly to follow, call fflush()
and ferror() just prior to calling fclose().
This has the advantage of actually detecting the any write errors, since
the output is block bufferred and will typically not happen during fprintf()
but only during the fclose() - where it is difficult to report.
I also singlilarly refuse to add (void) casts to every printf call in the
system - since it almost never makes any sense to look at the return value
(unless you want to know how many bytes were actually writtem).
Instead, just add it to the list of files.
Make "prefix foo" lines actually work right when foo is an absolute path,
and make sure the length calculations correspond to the output.
Provide a way to specify a file that will always be included, and a way
to omit the prologue ("$S/") on that file.