summaryrefslogtreecommitdiff
path: root/gui/fmt-pango.c
diff options
context:
space:
mode:
Diffstat (limited to 'gui/fmt-pango.c')
-rw-r--r--gui/fmt-pango.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gui/fmt-pango.c b/gui/fmt-pango.c
index 8e975dc..48b8516 100644
--- a/gui/fmt-pango.c
+++ b/gui/fmt-pango.c
@@ -11,7 +11,6 @@
*/
-#define _GNU_SOURCE /* for asprintf */
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
@@ -48,7 +47,7 @@ unsigned vsfmt_pango(char *buf, const char *fmt, va_list ap)
switch (*q) {
case 's':
s = va_arg(ap, const char *);
- len = asprintf(&tmp, tmp_fmt, s);
+ len = alloc_printf(&tmp, tmp_fmt, s);
extra = 0;
for (t = tmp; *t; t++)
@@ -97,13 +96,13 @@ unsigned vsfmt_pango(char *buf, const char *fmt, va_list ap)
/* @@@ we don't filter markup meta-characters */
case 'd':
case 'x':
- len = asprintf(&tmp, tmp_fmt, va_arg(ap, int));
+ len = alloc_printf(&tmp, tmp_fmt, va_arg(ap, int));
if (buf)
memcpy(res, tmp, len);
res += len;
break;
case 'u':
- len = asprintf(&tmp, tmp_fmt, va_arg(ap, unsigned));
+ len = alloc_printf(&tmp, tmp_fmt, va_arg(ap, unsigned));
if (buf)
memcpy(res, tmp, len);
res += len;