mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-18 01:04:05 +02:00
eeshow/fmt-pango.c: support %u format; use __attribute__((format...
This commit is contained in:
parent
a0be60f935
commit
3674d4eb75
@ -102,6 +102,12 @@ unsigned vsfmt_pango(char *buf, const char *fmt, va_list ap)
|
|||||||
memcpy(res, tmp, len);
|
memcpy(res, tmp, len);
|
||||||
res += len;
|
res += len;
|
||||||
break;
|
break;
|
||||||
|
case 'u':
|
||||||
|
len = asprintf(&tmp, tmp_fmt, va_arg(ap, unsigned));
|
||||||
|
if (buf)
|
||||||
|
memcpy(res, tmp, len);
|
||||||
|
res += len;
|
||||||
|
break;
|
||||||
case '%':
|
case '%':
|
||||||
if (buf)
|
if (buf)
|
||||||
*res = '%';
|
*res = '%';
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
unsigned vsfmt_pango(char *buf, const char *fmt, va_list ap);
|
unsigned vsfmt_pango(char *buf, const char *fmt, va_list ap);
|
||||||
char *vfmt_pango(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 */
|
#endif /* !FMT_PANGO_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user