Unify gdb putc functions

Now that filtered and unfiltered output can be treated identically, we
can unify the putc family of functions.  This is done under the name
"gdb_putc".  Most of this patch was written by script.
This commit is contained in:
Tom Tromey 2022-01-02 11:42:07 -07:00
parent 0426ad513f
commit a11ac3b3e8
26 changed files with 62 additions and 78 deletions

View file

@ -167,19 +167,19 @@ language_defn::printchar (int c, struct type *type,
case C_CHAR:
break;
case C_WIDE_CHAR:
fputc_filtered ('L', stream);
gdb_putc ('L', stream);
break;
case C_CHAR_16:
fputc_filtered ('u', stream);
gdb_putc ('u', stream);
break;
case C_CHAR_32:
fputc_filtered ('U', stream);
gdb_putc ('U', stream);
break;
}
fputc_filtered ('\'', stream);
gdb_putc ('\'', stream);
emitchar (c, type, stream, '\'');
fputc_filtered ('\'', stream);
gdb_putc ('\'', stream);
}
/* Print the character string STRING, printing at most LENGTH