+2001-06-09 Andrew Cagney <ac131313@redhat.com>
+
+ * ui-out.h (table_begin_ftype): Make string parameters constant.
+ (table_header_ftype): Ditto.
+ (field_int_ftype): Ditto.
+ (field_skip_ftype): Ditto.
+ (field_string_ftype): Ditto.
+ (field_fmt_ftype): Ditto.
+ (text_ftype): Ditto.
+ (message_ftype): Ditto.
+ * cli-out.c (cli_table_begin): Ditto.
+ (cli_table_header): Ditto.
+ (cli_field_int): Ditto.
+ (cli_field_skip): Ditto.
+ (cli_field_string): Ditto.
+ (cli_field_fmt): Ditto.
+ (cli_text): Ditto.
+ (cli_message): Ditto.
+ (out_field_fmt): Ditto.
+ * ui-out.c (default_table_begin): Ditto.
+ (default_table_header): Ditto.
+ (default_field_int): Ditto.
+ (default_field_skip): Ditto.
+ (default_field_string): Ditto.
+ (default_field_fmt): Ditto.
+ (default_text): Ditto.
+ (default_message): Ditto.
+
2001-06-08 Michael Snyder <msnyder@redhat.com>
* breakpoint.c (delete_breakpoint): Pass mark_inserted to
/* 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);
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 */
/* 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)
{
}
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);
}
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? */
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, "");
}
int fldno,
int width,
enum ui_align align,
- char *fldname,
+ const char *fldname,
const char *string)
{
int before = 0;
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);
}
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)
/* 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;
+2001-06-09 Andrew Cagney <ac131313@redhat.com>
+
+ * mi-out.c (mi_table_begin):
+ (mi_table_header):
+ (mi_field_int):
+ (mi_field_skip):
+ (mi_field_string):
+ (mi_field_fmt):
+ (mi_text):
+ (mi_message):
+
2001-05-12 Andrew Cagney <ac131313@redhat.com>
* mi-out.c (mi_close, mi_open): Output ``[]'' when a list.
/* These are the MI output functions */
-static void mi_table_begin (struct ui_out *uiout, int nbrofcols, char *tblid);
+static void mi_table_begin (struct ui_out *uiout, int nbrofcols,
+ const char *tblid);
static void mi_table_body (struct ui_out *uiout);
static void mi_table_end (struct ui_out *uiout);
static void mi_table_header (struct ui_out *uiout, int width,
- enum ui_align alig, char *colhdr);
+ enum ui_align alig,
+ const char *colhdr);
static void mi_begin (struct ui_out *uiout, enum ui_out_type type,
int level, const char *id);
static void mi_end (struct ui_out *uiout, enum ui_out_type type, int level);
static void mi_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 mi_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 mi_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 mi_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 mi_spaces (struct ui_out *uiout, int numspaces);
-static void mi_text (struct ui_out *uiout, char *string);
-static void mi_message (struct ui_out *uiout, int verbosity, char *format,
- va_list args);
+static void mi_text (struct ui_out *uiout, const char *string);
+static void mi_message (struct ui_out *uiout, int verbosity,
+ const char *format, va_list args);
static void mi_wrap_hint (struct ui_out *uiout, char *identstring);
static void mi_flush (struct ui_out *uiout);
/* Mark beginning of a table */
void
-mi_table_begin (struct ui_out *uiout, int nbrofcols, char *tblid)
+mi_table_begin (struct ui_out *uiout, int nbrofcols,
+ const char *tblid)
{
struct ui_out_data *data = ui_out_data (uiout);
field_separator (uiout);
/* Specify table header */
void
-mi_table_header (struct ui_out *uiout, int width, int alignment, char *colhdr)
+mi_table_header (struct ui_out *uiout, int width, int alignment,
+ const char *colhdr)
{
struct ui_out_data *data = ui_out_data (uiout);
if (!data->first_header++)
void
mi_field_int (struct ui_out *uiout, int fldno, int width, int alignment,
- char *fldname, int value)
+ const char *fldname, int value)
{
char buffer[20]; /* FIXME: how many chars long a %d can become? */
void
mi_field_skip (struct ui_out *uiout, int fldno, int width, int alignment,
- char *fldname)
+ const char *fldname)
{
mi_field_string (uiout, fldno, width, alignment, fldname, "");
}
int fldno,
int width,
int align,
- char *fldname,
+ const char *fldname,
const char *string)
{
struct ui_out_data *data = ui_out_data (uiout);
void
mi_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);
field_separator (uiout);
}
void
-mi_text (struct ui_out *uiout, char *string)
+mi_text (struct ui_out *uiout, const char *string)
{
}
void
-mi_message (struct ui_out *uiout, int verbosity, char *format, va_list args)
+mi_message (struct ui_out *uiout, int verbosity,
+ const char *format,
+ va_list args)
{
}
/* These are the default implementation functions */
static void default_table_begin (struct ui_out *uiout, int nbrofcols,
- char *tblid);
+ const char *tblid);
static void default_table_body (struct ui_out *uiout);
static void default_table_end (struct ui_out *uiout);
static void default_table_header (struct ui_out *uiout, int width,
- enum ui_align alig, char *colhdr);
+ enum ui_align alig,
+ const char *colhdr);
static void default_begin (struct ui_out *uiout,
enum ui_out_type type,
int level, const char *id);
enum ui_out_type type,
int level);
static void default_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 default_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 default_field_string (struct ui_out *uiout, int fldno, int width,
- enum ui_align align, char *fldname,
+ enum ui_align align,
+ const char *fldname,
const char *string);
static void default_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 default_spaces (struct ui_out *uiout, int numspaces);
-static void default_text (struct ui_out *uiout, char *string);
-static void default_message (struct ui_out *uiout, int verbosity, char *format,
+static void default_text (struct ui_out *uiout, const char *string);
+static void default_message (struct ui_out *uiout, int verbosity,
+ const char *format,
va_list args);
static void default_wrap_hint (struct ui_out *uiout, char *identstring);
static void default_flush (struct ui_out *uiout);
/* default gdb-out hook functions */
static void
-default_table_begin (struct ui_out *uiout, int nbrofcols, char *tblid)
+default_table_begin (struct ui_out *uiout, int nbrofcols, const char *tblid)
{
}
static void
default_table_header (struct ui_out *uiout, int width, enum ui_align alignment,
- char *colhdr)
+ const char *colhdr)
{
}
static void
default_field_int (struct ui_out *uiout, int fldno, int width,
- enum ui_align align, char *fldname, int value)
+ enum ui_align align,
+ const char *fldname, int value)
{
}
static void
default_field_skip (struct ui_out *uiout, int fldno, int width,
- enum ui_align align, char *fldname)
+ enum ui_align align, const char *fldname)
{
}
int fldno,
int width,
enum ui_align align,
- char *fldname,
+ const char *fldname,
const char *string)
{
}
static void
default_field_fmt (struct ui_out *uiout, int fldno, int width,
- enum ui_align align, char *fldname, char *format,
+ enum ui_align align,
+ const char *fldname,
+ const char *format,
va_list args)
{
}
}
static void
-default_text (struct ui_out *uiout, char *string)
+default_text (struct ui_out *uiout, const char *string)
{
}
static void
-default_message (struct ui_out *uiout, int verbosity, char *format,
+default_message (struct ui_out *uiout, int verbosity,
+ const char *format,
va_list args)
{
}
/* Type definition of all implementation functions. */
typedef void (table_begin_ftype) (struct ui_out * uiout,
- int nbrofcols, char *tblid);
+ int nbrofcols, const char *tblid);
typedef void (table_body_ftype) (struct ui_out * uiout);
typedef void (table_end_ftype) (struct ui_out * uiout);
typedef void (table_header_ftype) (struct ui_out * uiout, int width,
- enum ui_align align, char *colhdr);
+ enum ui_align align,
+ const char *colhdr);
/* Note: level 0 is the top-level so LEVEL is always greater than
zero. */
typedef void (ui_out_begin_ftype) (struct ui_out *uiout,
enum ui_out_type type,
int level);
typedef void (field_int_ftype) (struct ui_out * uiout, int fldno, int width,
- enum ui_align align, char *fldname, int value);
+ enum ui_align align,
+ const char *fldname, int value);
typedef void (field_skip_ftype) (struct ui_out * uiout, int fldno, int width,
- enum ui_align align, char *fldname);
+ enum ui_align align,
+ const char *fldname);
typedef void (field_string_ftype) (struct ui_out * uiout, int fldno, int width,
- enum ui_align align, char *fldname,
+ enum ui_align align,
+ const char *fldname,
const char *string);
typedef void (field_fmt_ftype) (struct ui_out * uiout, int fldno, int width,
- enum ui_align align, char *fldname,
- char *format, va_list args);
+ enum ui_align align,
+ const char *fldname,
+ const char *format,
+ va_list args);
typedef void (spaces_ftype) (struct ui_out * uiout, int numspaces);
-typedef void (text_ftype) (struct ui_out * uiout, char *string);
+typedef void (text_ftype) (struct ui_out * uiout,
+ const char *string);
typedef void (message_ftype) (struct ui_out * uiout, int verbosity,
- char *format, va_list args);
+ const char *format, va_list args);
typedef void (wrap_hint_ftype) (struct ui_out * uiout, char *identstring);
typedef void (flush_ftype) (struct ui_out * uiout);