Commit cfa9f252 by Kaveh R. Ghazi Committed by Kaveh Ghazi

diagnostic.c (v_message_with_decl): Use .* format specifier instead of building…

diagnostic.c (v_message_with_decl): Use .* format specifier instead of building the format specifier width manually.

       * diagnostic.c (v_message_with_decl): Use .* format specifier
       instead of building the format specifier width manually.

From-SVN: r31101
parent 759af044
1999-12-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* diagnostic.c (v_message_with_decl): Use .* format specifier
instead of building the format specifier width manually.
* system.h (strsignal): Don't check HAVE_STRSIGNAL when
determining whether to provide a prototype. Remove the
sys_siglist clause in the conditional.
......
......@@ -198,14 +198,7 @@ v_message_with_decl (decl, warn, msgid, ap)
}
if (p > _(msgid)) /* Print the left-hand substring. */
{
char fmt[sizeof "%.255s"];
long width = p - _(msgid);
if (width > 255L) width = 255L; /* arbitrary */
sprintf (fmt, "%%.%lds", width);
fprintf (stderr, fmt, _(msgid));
}
fprintf (stderr, "%.*s", (int)(p - _(msgid)), _(msgid));
if (*p == '%') /* Print the name. */
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment