projects
/
chise
/
xemacs-chise.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
import -ko -b 1.1.3 XEmacs XEmacs-21_2 r21-2-35
[chise/xemacs-chise.git]
/
src
/
doprnt.c
diff --git
a/src/doprnt.c
b/src/doprnt.c
index
fabbf99
..
b224d50
100644
(file)
--- a/
src/doprnt.c
+++ b/
src/doprnt.c
@@
-657,16
+657,21
@@
emacs_doprnt_1 (Lisp_Object stream, const Bufbyte *format_nonreloc,
long_to_string (constructed_spec + strlen (constructed_spec),
spec->precision);
}
long_to_string (constructed_spec + strlen (constructed_spec),
spec->precision);
}
- sprintf (constructed_spec + strlen (constructed_spec), "%c", ch);
/* 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 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))
{
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
if (spec->l_flag)
sprintf (text_to_print, constructed_spec, arg.ul);
else
@@
-674,6
+679,12
@@
emacs_doprnt_1 (Lisp_Object stream, const Bufbyte *format_nonreloc,
}
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
if (spec->l_flag)
sprintf (text_to_print, constructed_spec, arg.l);
else