+2016-11-26 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * mi/mi-out.c (mi_wrap_hint): Constify argument.
+ * cli-out.c (cli_wrap_hint): Likewise.
+ * ui-out.c (ui_out_wrap_hint, uo_wrap_hint): Likewise.
+ * ui-out.h (ui_out_wrap_hint, wrap_hint_ftype): Likewise.
+ * utils.c (wrap_here): Likewise.
+ (wrap_indent): Constify.
+ * utils.h (wrap_here): Constify argument.
+
2016-11-26 Simon Marchi <simon.marchi@polymtl.ca>
* ui-out.c (uo_redirect): Return the return value from the
}
static void
-cli_wrap_hint (struct ui_out *uiout, char *identstring)
+cli_wrap_hint (struct ui_out *uiout, const char *identstring)
{
cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
static void mi_message (struct ui_out *uiout, int verbosity,
const char *format, va_list args)
ATTRIBUTE_PRINTF (3, 0);
-static void mi_wrap_hint (struct ui_out *uiout, char *identstring);
+static void mi_wrap_hint (struct ui_out *uiout, const char *identstring);
static void mi_flush (struct ui_out *uiout);
static int mi_redirect (struct ui_out *uiout, struct ui_file *outstream);
}
void
-mi_wrap_hint (struct ui_out *uiout, char *identstring)
+mi_wrap_hint (struct ui_out *uiout, const char *identstring)
{
wrap_here (identstring);
}
static void uo_message (struct ui_out *uiout, int verbosity,
const char *format, va_list args)
ATTRIBUTE_PRINTF (3, 0);
-static void uo_wrap_hint (struct ui_out *uiout, char *identstring);
+static void uo_wrap_hint (struct ui_out *uiout, const char *identstring);
static void uo_flush (struct ui_out *uiout);
static int uo_redirect (struct ui_out *uiout, struct ui_file *outstream);
}
void
-ui_out_wrap_hint (struct ui_out *uiout, char *identstring)
+ui_out_wrap_hint (struct ui_out *uiout, const char *identstring)
{
uo_wrap_hint (uiout, identstring);
}
}
void
-uo_wrap_hint (struct ui_out *uiout, char *identstring)
+uo_wrap_hint (struct ui_out *uiout, const char *identstring)
{
if (!uiout->impl->wrap_hint)
return;
const char *format, ...)
ATTRIBUTE_PRINTF (3, 4);
-extern void ui_out_wrap_hint (struct ui_out *uiout, char *identstring);
+extern void ui_out_wrap_hint (struct ui_out *uiout, const char *identstring);
extern void ui_out_flush (struct ui_out *uiout);
typedef void (message_ftype) (struct ui_out * uiout, int verbosity,
const char *format, va_list args)
ATTRIBUTE_FPTR_PRINTF(3,0);
-typedef void (wrap_hint_ftype) (struct ui_out * uiout, char *identstring);
+typedef void (wrap_hint_ftype) (struct ui_out * uiout, const char *identstring);
typedef void (flush_ftype) (struct ui_out * uiout);
typedef int (redirect_ftype) (struct ui_out * uiout,
struct ui_file * outstream);
/* String to indent by if the wrap occurs. Must not be NULL if wrap_column
is non-zero. */
-static char *wrap_indent;
+static const char *wrap_indent;
/* Column number on the screen where wrap_buffer begins, or 0 if wrapping
is not in effect. */
used to force out output from the wrap_buffer. */
void
-wrap_here (char *indent)
+wrap_here (const char *indent)
{
/* This should have been allocated, but be paranoid anyway. */
if (!wrap_buffer)
extern void begin_line (void);
-extern void wrap_here (char *);
+extern void wrap_here (const char *);
extern void reinitialize_more_filter (void);