if (strchr (int_converters, ch))
{
if (spec->h_flag)
- arg.i = va_arg (vargs, short);
+ arg.i = va_arg (vargs, int /* short */);
else if (spec->l_flag)
arg.l = va_arg (vargs, long);
else
else if (strchr (unsigned_int_converters, ch))
{
if (spec->h_flag)
- arg.ui = va_arg (vargs, unsigned short);
+ arg.ui = va_arg (vargs, unsigned int /* unsigned short */);
else if (spec->l_flag)
arg.ul = va_arg (vargs, unsigned long);
else
{
Lisp_Object obj = largs[spec->argnum - 1];
if (CHARP (obj))
- CHECK_INT_COERCE_CHAR (obj);
+ obj = make_int (XCHAR (obj));
if (!INT_OR_FLOATP (obj))
{
error ("format specifier %%%c doesn't match argument type",
long_to_string (constructed_spec + strlen (constructed_spec),
spec->precision);
}
+#if 0
sprintf (constructed_spec + strlen (constructed_spec), "%c", ch);
+#endif
/* sprintf the mofo */
/* we have to use separate calls to sprintf(), rather than
a single big conditional, because of the different types
of the arguments */
if (strchr (double_converters, ch))
- sprintf (text_to_print, constructed_spec, arg.d);
+ {
+ sprintf (constructed_spec + strlen (constructed_spec),
+ "%c", ch);
+ sprintf (text_to_print, constructed_spec, arg.d);
+ }
else if (strchr (unsigned_int_converters, ch))
{
+ sprintf (constructed_spec + strlen (constructed_spec),
+ "%c", ch);
if (spec->l_flag)
sprintf (text_to_print, constructed_spec, arg.ul);
else
}
else
{
+ if (spec->zero_flag && spec->minwidth)
+ sprintf (constructed_spec + strlen (constructed_spec),
+ "0%d%c", spec->minwidth, ch);
+ else
+ sprintf (constructed_spec + strlen (constructed_spec),
+ "%c", ch);
if (spec->l_flag)
sprintf (text_to_print, constructed_spec, arg.l);
else