summaryrefslogtreecommitdiff
path: root/lib9/runevseprint.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib9/runevseprint.c')
-rw-r--r--lib9/runevseprint.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib9/runevseprint.c b/lib9/runevseprint.c
new file mode 100644
index 00000000..46fdee60
--- /dev/null
+++ b/lib9/runevseprint.c
@@ -0,0 +1,22 @@
+#include "lib9.h"
+
+Rune*
+runevseprint(Rune *buf, Rune *e, char *fmt, va_list args)
+{
+ Fmt f;
+
+ if(e <= buf)
+ return nil;
+ f.runes = 1;
+ f.start = buf;
+ f.to = buf;
+ f.stop = e - 1;
+ f.flush = nil;
+ f.farg = nil;
+ f.nfmt = 0;
+ f.args = args;
+ dofmt(&f, fmt);
+ *(Rune*)f.to = '\0';
+ return f.to;
+}
+