gas read_a_source_file #APP processing
authorAlan Modra <amodra@gmail.com>
Thu, 2 Jun 2022 02:44:16 +0000 (12:14 +0930)
committerAlan Modra <amodra@gmail.com>
Thu, 2 Jun 2022 06:24:18 +0000 (15:54 +0930)
commit53f2b36a54b9597f734891176fe6ba0866b819a8
tree6e09a9b5c623bda23657cebb9b5bb225f64875ba
parentcd826186c8b271fa7a1f5ff93b55acd672baf646
gas read_a_source_file #APP processing

This fixes some horrible code using do_scrub_chars.  What we had ran
text through do_scrub_chars twice, directly in read_a_source_file and
again via the input_scrub_include_sb call.  That's silly, and since
do_scrub_chars is a state machine, possibly wrong.  More silliness is
evident in the temporary malloc'd buffer for do_scrub_chars output,
which should have been written directly to sbuf.

So, get rid of the do_scrub_chars call and support functions, leaving
scrubbing to input_scrub_include_sb.  I did wonder about #NO_APP
overlapping input_scrub_next_buffer buffers, but that should only
happen if the string starts in one file and finishes in another.

* read.c (scrub_string, scrub_string_end): Delete.
(scrub_from_string): Delete.
(read_a_source_file): Rewrite #APP processing.
gas/read.c