Fix COBCD to better handle cobc warning output:
@ssobisch describes the problem and suggests a solution:
2. the handling of cobc's warning output with mangling the line breaks.
I now see that I've forgot about the easiest and likely most reasonable way to handle this which will also make cobcd's and cobc's work easier:
cobc $(all_options_but_output) -E > some-tempfile.i
# and pass stdout/stderr as-is
COBC_GEN_DUMP_COMMENTS=1 \
cobc $(all_options_but_source_and_warnings_and_listing) \
-w -### some-tempfile.i
# as before consume and parse the output, but now without
# checking for warning/note/error
# cobc/gcc as before
This way there's only 1 run with cobc over all sources which won't include codegen, this one can output whatever it wants without breaking cobcd as this only inspects the retrun code; no matter if German umlauts are contained or similar and no matter if cobc changes its output formats.
If there's an error (it will be command line options or COBOL) then cobcd can early exit; otherwise it will call cobc to do codegen only once.