diff options
author | Andrew Cagney <cagney@redhat.com> | 2001-06-10 00:22:41 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2001-06-10 00:22:41 +0000 |
commit | e2e11a41954b154b64ea31a53aca4a7973019749 (patch) | |
tree | 51e2fd7d4e79fc95a163810fbe8568d939766100 /gdb/cli-out.c | |
parent | f38fc537cbcfb1f2220c6237ec22a5082ee621b5 (diff) | |
download | gdb-e2e11a41954b154b64ea31a53aca4a7973019749.zip gdb-e2e11a41954b154b64ea31a53aca4a7973019749.tar.gz gdb-e2e11a41954b154b64ea31a53aca4a7973019749.tar.bz2 |
Make char *, const char *.
Diffstat (limited to 'gdb/cli-out.c')
-rw-r--r-- | gdb/cli-out.c | 53 |
1 files changed, 32 insertions, 21 deletions
diff --git a/gdb/cli-out.c b/gdb/cli-out.c index 8d68e03..172356a 100644 --- a/gdb/cli-out.c +++ b/gdb/cli-out.c @@ -38,28 +38,31 @@ struct ui_out_data /* These are the CLI output functions */ -static void cli_table_begin (struct ui_out *uiout, int nbrofcols, char *tblid); +static void cli_table_begin (struct ui_out *uiout, int nbrofcols, + const char *tblid); static void cli_table_body (struct ui_out *uiout); static void cli_table_end (struct ui_out *uiout); static void cli_table_header (struct ui_out *uiout, int width, - enum ui_align alig, char *colhdr); + enum ui_align alig, + const char *colhdr); static void cli_begin (struct ui_out *uiout, enum ui_out_type type, int level, const char *lstid); static void cli_end (struct ui_out *uiout, enum ui_out_type type, int level); static void cli_field_int (struct ui_out *uiout, int fldno, int width, - enum ui_align alig, char *fldname, int value); + enum ui_align alig, const char *fldname, int value); static void cli_field_skip (struct ui_out *uiout, int fldno, int width, - enum ui_align alig, char *fldname); + enum ui_align alig, const char *fldname); static void cli_field_string (struct ui_out *uiout, int fldno, int width, - enum ui_align alig, char *fldname, + enum ui_align alig, const char *fldname, const char *string); static void cli_field_fmt (struct ui_out *uiout, int fldno, int width, enum ui_align align, - char *fldname, char *format, va_list args); + const char *fldname, const char *format, + va_list args); static void cli_spaces (struct ui_out *uiout, int numspaces); -static void cli_text (struct ui_out *uiout, char *string); -static void cli_message (struct ui_out *uiout, int verbosity, char *format, - va_list args); +static void cli_text (struct ui_out *uiout, const char *string); +static void cli_message (struct ui_out *uiout, int verbosity, + const char *format, va_list args); static void cli_wrap_hint (struct ui_out *uiout, char *identstring); static void cli_flush (struct ui_out *uiout); @@ -93,8 +96,9 @@ extern void _initialize_cli_out (void); static void field_separator (void); -static void out_field_fmt (struct ui_out *uiout, int fldno, char *fldname, - char *format,...); +static void out_field_fmt (struct ui_out *uiout, int fldno, + const char *fldname, + const char *format,...); /* local variables */ @@ -103,7 +107,8 @@ static void out_field_fmt (struct ui_out *uiout, int fldno, char *fldname, /* Mark beginning of a table */ void -cli_table_begin (struct ui_out *uiout, int nbrofcols, char *tblid) +cli_table_begin (struct ui_out *uiout, int nbrofcols, + const char *tblid) { } @@ -127,7 +132,7 @@ cli_table_end (struct ui_out *uiout) void cli_table_header (struct ui_out *uiout, int width, enum ui_align alignment, - char *colhdr) + const char *colhdr) { cli_field_string (uiout, 0, width, alignment, 0, colhdr); } @@ -155,7 +160,8 @@ cli_end (struct ui_out *uiout, void cli_field_int (struct ui_out *uiout, int fldno, int width, - enum ui_align alignment, char *fldname, int value) + enum ui_align alignment, + const char *fldname, int value) { char buffer[20]; /* FIXME: how many chars long a %d can become? */ @@ -167,7 +173,8 @@ cli_field_int (struct ui_out *uiout, int fldno, int width, void cli_field_skip (struct ui_out *uiout, int fldno, int width, - enum ui_align alignment, char *fldname) + enum ui_align alignment, + const char *fldname) { cli_field_string (uiout, fldno, width, alignment, fldname, ""); } @@ -180,7 +187,7 @@ cli_field_string (struct ui_out *uiout, int fldno, int width, enum ui_align align, - char *fldname, + const char *fldname, const char *string) { int before = 0; @@ -225,7 +232,9 @@ cli_field_string (struct ui_out *uiout, void cli_field_fmt (struct ui_out *uiout, int fldno, int width, enum ui_align align, - char *fldname, char *format, va_list args) + const char *fldname, + const char *format, + va_list args) { struct ui_out_data *data = ui_out_data (uiout); vfprintf_filtered (data->stream, format, args); @@ -242,14 +251,15 @@ cli_spaces (struct ui_out *uiout, int numspaces) } void -cli_text (struct ui_out *uiout, char *string) +cli_text (struct ui_out *uiout, const char *string) { struct ui_out_data *data = ui_out_data (uiout); fputs_filtered (string, data->stream); } void -cli_message (struct ui_out *uiout, int verbosity, char *format, va_list args) +cli_message (struct ui_out *uiout, int verbosity, + const char *format, va_list args) { struct ui_out_data *data = ui_out_data (uiout); if (ui_out_get_verblvl (uiout) >= verbosity) @@ -276,8 +286,9 @@ cli_flush (struct ui_out *uiout) /* VARARGS */ static void -out_field_fmt (struct ui_out *uiout, int fldno, char *fldname, - char *format,...) +out_field_fmt (struct ui_out *uiout, int fldno, + const char *fldname, + const char *format,...) { struct ui_out_data *data = ui_out_data (uiout); va_list args; |