summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/utf8.c b/utf8.c
index b3d300478..f83401996 100644
--- a/utf8.c
+++ b/utf8.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: utf8.c,v 1.9 2020/03/06 18:12:55 markus Exp $ */ 1/* $OpenBSD: utf8.c,v 1.10 2020/04/03 02:25:21 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> 3 * Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
4 * 4 *
@@ -255,6 +255,20 @@ snmprintf(char *str, size_t sz, int *wp, const char *fmt, ...)
255 return ret; 255 return ret;
256} 256}
257 257
258int
259asmprintf(char **outp, size_t sz, int *wp, const char *fmt, ...)
260{
261 va_list ap;
262 int ret;
263
264 *outp = NULL;
265 va_start(ap, fmt);
266 ret = vasnmprintf(outp, sz, wp, fmt, ap);
267 va_end(ap);
268
269 return ret;
270}
271
258/* 272/*
259 * To stay close to the standard interfaces, the following functions 273 * To stay close to the standard interfaces, the following functions
260 * return the number of non-NUL bytes written. 274 * return the number of non-NUL bytes written.