+2003-08-04 David Carlton <carlton@kealia.com>
+
+ * charset.c (cached_iconv_convert): Add __FILE__ and __LINE__ args
+ to internal_error call.
+ * source.c (forward_search_command): Add "%s" format argument.
+ (reverse_search_command): Ditto.
+ * top.c (quit_confirm): Ditto.
+ * cli/cli-setshow.c (do_setshow_command): Ditto.
+ * cp-valprint.c (cp_print_class_method): Replace
+ {f,}printf_{un,}filtered by {f,}puts_{un,}filtered.
+ (cp_print_class_member): Ditto.
+ * event-top.c (command_line_handler): Ditto.
+ * linux-proc.c (linux_info_proc_cmd): Ditto.
+ * p-typeprint.c (pascal_type_print_base): Ditto.
+ * p-valprint.c (pascal_object_print_class_method): Ditto.
+ (pascal_object_print_class_member): Ditto.
+ * printcmd.c (print_scalar_formatted,printf_command): Ditto.
+ * remote.c (remote_cisco_section_offsets): Ditto.
+ * top.c (command_line_input): Ditto.
+ * utils.c (vwarning,error_stream,quit): Ditto.
+ * valprint.c (print_floating,print_binary_chars)
+ (print_octal_chars,print_decimal_chars,print_hex_chars): Ditto.
+
2003-08-04 Andrew Cagney <cagney@redhat.com>
* frame.c (frame_func_unwind): Use frame_unwind_address_in_block.
return 0;
/* Anything else is mysterious. */
- internal_error ("Error converting character `%d' from `%s' to `%s' "
+ internal_error (__FILE__, __LINE__,
+ "Error converting character `%d' from `%s' to `%s' "
"character set: %s",
from_char, ci->from->name, ci->to->name,
safe_strerror (errno));
strcat (msg, c->enums[i]);
}
strcat (msg, ".");
- error (msg);
+ error ("%s", msg);
}
p = strchr (arg, ' ');
char *demangled_name;
fprintf_filtered (stream, "&");
- fprintf_filtered (stream, kind);
+ fputs_filtered (kind, stream);
demangled_name = cplus_demangle (TYPE_FN_FIELD_PHYSNAME (f, j),
DMGL_ANSI | DMGL_PARAMS);
if (demangled_name == NULL)
if (i < len)
{
char *name;
- fprintf_filtered (stream, prefix);
+ fputs_filtered (prefix, stream);
name = type_name_no_tag (domain);
if (name)
fputs_filtered (name, stream);
if (annotation_level > 1 && instream == stdin)
{
printf_unfiltered ("\n\032\032post-");
- printf_unfiltered (async_annotation_suffix);
+ puts_unfiltered (async_annotation_suffix);
printf_unfiltered ("\n");
}
if ((procfile = fopen (fname1, "r")) > 0)
{
while (fgets (buffer, sizeof (buffer), procfile) != NULL)
- printf_filtered (buffer);
+ puts_filtered (buffer);
fclose (procfile);
}
else
+2003-08-04 David Carlton <carlton@kealia.com>
+
+ * mi-main.c (mi_error_last_message): Add "%s" second argument to
+ xasprintf call.
+
2003-06-28 Daniel Jacobowitz <drow@mvista.com>
* mi-out.c (mi_ui_out_impl): Add NULL for redirect member.
mi_error_last_message (void)
{
char *s = error_last_message ();
- xasprintf (&mi_error_message, s);
+ xasprintf (&mi_error_message, "%s", s);
xfree (s);
}
/* void pointer */
if ((TYPE_CODE (type) == TYPE_CODE_PTR) && (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_VOID))
{
- fprintf_filtered (stream,
- TYPE_NAME (type) ? TYPE_NAME (type) : "pointer");
+ fputs_filtered (TYPE_NAME (type) ? TYPE_NAME (type) : "pointer",
+ stream);
return;
}
/* When SHOW is zero or less, and there is a valid type name, then always
char *demangled_name;
fprintf_filtered (stream, "&");
- fprintf_filtered (stream, kind);
+ fputs_filtered (kind, stream);
demangled_name = cplus_demangle (TYPE_FN_FIELD_PHYSNAME (f, j),
DMGL_ANSI | DMGL_PARAMS);
if (demangled_name == NULL)
if (i < len)
{
char *name;
- fprintf_filtered (stream, prefix);
+ fputs_filtered (prefix, stream);
name = type_name_no_tag (domain);
if (name)
fputs_filtered (name, stream);
strcpy (buf, local_binary_format_prefix ());
strcat (buf, cp);
strcat (buf, local_binary_format_suffix ());
- fprintf_filtered (stream, buf);
+ fputs_filtered (buf, stream);
}
break;
current_substring += strlen (current_substring) + 1;
}
/* Print the portion of the format string after the last argument. */
- printf_filtered (last_arg);
+ puts_filtered (last_arg);
}
do_cleanups (old_cleanups);
}
sprintf_vma (tmp + strlen (tmp), data_addr);
sprintf (tmp + strlen (tmp), " bss = 0x");
sprintf_vma (tmp + strlen (tmp), bss_addr);
- fprintf_filtered (gdb_stdlog, tmp);
+ fputs_filtered (tmp, gdb_stdlog);
fprintf_filtered (gdb_stdlog,
"Reloc offset: text = 0x%s data = 0x%s bss = 0x%s\n",
paddr_nz (*text_offs),
msg = (char *) re_comp (regex);
if (msg)
- error (msg);
+ error ("%s", msg);
if (current_source_symtab == 0)
select_source_symtab (0);
msg = (char *) re_comp (regex);
if (msg)
- error (msg);
+ error ("%s", msg);
if (current_source_symtab == 0)
select_source_symtab (0);
if (annotation_level > 1 && instream == stdin)
{
- printf_unfiltered ("\n\032\032pre-");
- printf_unfiltered (annotation_suffix);
- printf_unfiltered ("\n");
+ puts_unfiltered ("\n\032\032pre-");
+ puts_unfiltered (annotation_suffix);
+ puts_unfiltered ("\n");
}
/* Don't use fancy stuff if not talking to stdin. */
if (annotation_level > 1 && instream == stdin)
{
- printf_unfiltered ("\n\032\032post-");
- printf_unfiltered (annotation_suffix);
- printf_unfiltered ("\n");
+ puts_unfiltered ("\n\032\032post-");
+ puts_unfiltered (annotation_suffix);
+ puts_unfiltered ("\n");
}
if (!rl || rl == (char *) EOF)
else
s = "The program is running. Exit anyway? ";
- if (!query (s))
+ if (!query ("%s", s))
return 0;
}
wrap_here (""); /* Force out any buffered output */
gdb_flush (gdb_stdout);
if (warning_pre_print)
- fprintf_unfiltered (gdb_stderr, warning_pre_print);
+ fputs_unfiltered (warning_pre_print, gdb_stderr);
vfprintf_unfiltered (gdb_stderr, string, args);
fprintf_unfiltered (gdb_stderr, "\n");
va_end (args);
gdb_flush (gdb_stdout);
annotate_error_begin ();
if (error_pre_print)
- fprintf_filtered (gdb_stderr, error_pre_print);
+ fputs_filtered (error_pre_print, gdb_stderr);
ui_file_put (stream, do_write, gdb_stderr);
fprintf_filtered (gdb_stderr, "\n");
/* Don't use *_filtered; we don't want to prompt the user to continue. */
if (quit_pre_print)
- fprintf_unfiltered (gdb_stderr, quit_pre_print);
+ fputs_unfiltered (quit_pre_print, gdb_stderr);
#ifdef __MSDOS__
/* No steenking SIGINT will ever be coming our way when the
if (floatformat_is_negative (fmt, valaddr))
fprintf_filtered (stream, "-");
fprintf_filtered (stream, "nan(");
- fprintf_filtered (stream, local_hex_format_prefix ());
- fprintf_filtered (stream, floatformat_mantissa (fmt, valaddr));
- fprintf_filtered (stream, local_hex_format_suffix ());
+ fputs_filtered (local_hex_format_prefix (), stream);
+ fputs_filtered (floatformat_mantissa (fmt, valaddr), stream);
+ fputs_filtered (local_hex_format_suffix (), stream);
fprintf_filtered (stream, ")");
return;
}
/* FIXME: We should be not printing leading zeroes in most cases. */
- fprintf_filtered (stream, local_binary_format_prefix ());
+ fputs_filtered (local_binary_format_prefix (), stream);
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
for (p = valaddr;
}
}
}
- fprintf_filtered (stream, local_binary_format_suffix ());
+ fputs_filtered (local_binary_format_suffix (), stream);
}
/* VALADDR points to an integer of LEN bytes.
cycle = (len * BITS_IN_BYTES) % BITS_IN_OCTAL;
carry = 0;
- fprintf_filtered (stream, local_octal_format_prefix ());
+ fputs_filtered (local_octal_format_prefix (), stream);
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
for (p = valaddr;
}
}
- fprintf_filtered (stream, local_octal_format_suffix ());
+ fputs_filtered (local_octal_format_suffix (), stream);
}
/* VALADDR points to an integer of LEN bytes.
digits[i] = 0;
}
- fprintf_filtered (stream, local_decimal_format_prefix ());
+ fputs_filtered (local_decimal_format_prefix (), stream);
/* Ok, we have an unknown number of bytes of data to be printed in
* decimal.
}
xfree (digits);
- fprintf_filtered (stream, local_decimal_format_suffix ());
+ fputs_filtered (local_decimal_format_suffix (), stream);
}
/* VALADDR points to an integer of LEN bytes. Print it in hex on stream. */
/* FIXME: We should be not printing leading zeroes in most cases. */
- fprintf_filtered (stream, local_hex_format_prefix ());
+ fputs_filtered (local_hex_format_prefix (), stream);
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
for (p = valaddr;
fprintf_filtered (stream, "%02x", *p);
}
}
- fprintf_filtered (stream, local_hex_format_suffix ());
+ fputs_filtered (local_hex_format_suffix (), stream);
}
/* Called by various <lang>_val_print routines to print elements of an