1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-09-30 00:35:05 +03:00

eeshow/fmt-pango.c: support %u format; use __attribute__((format...

This commit is contained in:
Werner Almesberger 2016-08-17 04:36:54 -03:00
parent a0be60f935
commit 3674d4eb75
2 changed files with 8 additions and 1 deletions

View File

@ -102,6 +102,12 @@ unsigned vsfmt_pango(char *buf, const char *fmt, va_list ap)
memcpy(res, tmp, len);
res += len;
break;
case 'u':
len = asprintf(&tmp, tmp_fmt, va_arg(ap, unsigned));
if (buf)
memcpy(res, tmp, len);
res += len;
break;
case '%':
if (buf)
*res = '%';

View File

@ -19,6 +19,7 @@
unsigned vsfmt_pango(char *buf, const char *fmt, va_list ap);
char *vfmt_pango(const char *fmt, va_list ap);
char *fmt_pango(const char *fmt, ...);
char *fmt_pango(const char *fmt, ...)
__attribute__((format(printf, 1, 2)));
#endif /* !FMT_PANGO_H */