support '%c' specifier in xfprintf
This commit is contained in:
parent
569b14d684
commit
6b42145e00
|
@ -349,7 +349,7 @@ int xvfprintf(pic_state *pic, xFILE *stream, const char *fmt, va_list ap) {
|
||||||
case 'f': {
|
case 'f': {
|
||||||
char buf[100];
|
char buf[100];
|
||||||
sprintf(buf, "%g", va_arg(ap, double));
|
sprintf(buf, "%g", va_arg(ap, double));
|
||||||
xfputs(pic, buf, stream);
|
cnt += xfputs(pic, buf, stream);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
@ -378,6 +378,10 @@ int xvfprintf(pic_state *pic, xFILE *stream, const char *fmt, va_list ap) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
case 'c':
|
||||||
|
ival = va_arg(ap, int);
|
||||||
|
cnt += xfputc(pic, ival, stream);
|
||||||
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
sval = va_arg(ap, char*);
|
sval = va_arg(ap, char*);
|
||||||
cnt += xfputs(pic, sval, stream);
|
cnt += xfputs(pic, sval, stream);
|
||||||
|
|
Loading…
Reference in New Issue