diff options
author | Tom Tromey <tom@tromey.com> | 2022-01-02 11:36:44 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-03-29 12:46:24 -0600 |
commit | 0426ad513f93bb1c5805988e60d6f87fbe738860 (patch) | |
tree | 6ad0f94f9b2a907623df38db9dd7727fe80f5d51 /gdb/p-lang.c | |
parent | 19a7b8ab871b92dee32a0ebffe274388d3426564 (diff) | |
download | gdb-0426ad513f93bb1c5805988e60d6f87fbe738860.zip gdb-0426ad513f93bb1c5805988e60d6f87fbe738860.tar.gz gdb-0426ad513f93bb1c5805988e60d6f87fbe738860.tar.bz2 |
Unify gdb puts functions
Now that filtered and unfiltered output can be treated identically, we
can unify the puts family of functions. This is done under the name
"gdb_puts". Most of this patch was written by script.
Diffstat (limited to 'gdb/p-lang.c')
-rw-r--r-- | gdb/p-lang.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gdb/p-lang.c b/gdb/p-lang.c index 70ff404..3f6ee25 100644 --- a/gdb/p-lang.c +++ b/gdb/p-lang.c @@ -152,11 +152,11 @@ pascal_language::print_one_char (int c, struct ui_file *stream, if (c == '\'' || ((unsigned int) c <= 0xff && (PRINT_LITERAL_FORM (c)))) { if (!(*in_quotes)) - fputs_filtered ("'", stream); + gdb_puts ("'", stream); *in_quotes = 1; if (c == '\'') { - fputs_filtered ("''", stream); + gdb_puts ("''", stream); } else fprintf_filtered (stream, "%c", c); @@ -164,7 +164,7 @@ pascal_language::print_one_char (int c, struct ui_file *stream, else { if (*in_quotes) - fputs_filtered ("'", stream); + gdb_puts ("'", stream); *in_quotes = 0; fprintf_filtered (stream, "#%d", (unsigned int) c); } @@ -180,7 +180,7 @@ pascal_language::printchar (int c, struct type *type, print_one_char (c, stream, &in_quotes); if (in_quotes) - fputs_filtered ("'", stream); + gdb_puts ("'", stream); } @@ -249,7 +249,7 @@ pascal_language::printstr (struct ui_file *stream, struct type *elttype, if (length == 0) { - fputs_filtered ("''", stream); + gdb_puts ("''", stream); return; } @@ -266,7 +266,7 @@ pascal_language::printstr (struct ui_file *stream, struct type *elttype, if (need_comma) { - fputs_filtered (", ", stream); + gdb_puts (", ", stream); need_comma = 0; } @@ -287,7 +287,7 @@ pascal_language::printstr (struct ui_file *stream, struct type *elttype, { if (in_quotes) { - fputs_filtered ("', ", stream); + gdb_puts ("', ", stream); in_quotes = 0; } printchar (current_char, elttype, stream); @@ -302,7 +302,7 @@ pascal_language::printstr (struct ui_file *stream, struct type *elttype, { if ((!in_quotes) && (PRINT_LITERAL_FORM (current_char))) { - fputs_filtered ("'", stream); + gdb_puts ("'", stream); in_quotes = 1; } print_one_char (current_char, stream, &in_quotes); @@ -312,10 +312,10 @@ pascal_language::printstr (struct ui_file *stream, struct type *elttype, /* Terminate the quotes if necessary. */ if (in_quotes) - fputs_filtered ("'", stream); + gdb_puts ("'", stream); if (force_ellipses || i < length) - fputs_filtered ("...", stream); + gdb_puts ("...", stream); } /* Single instance of the Pascal language class. */ |