summaryrefslogtreecommitdiffstats
path: root/lib/libstand/printf.c
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>1998-11-01 09:31:08 +0000
committermsmith <msmith@FreeBSD.org>1998-11-01 09:31:08 +0000
commitf00eb1aa6445c9df1cc7392df8ea57731e3af4e4 (patch)
tree87b4256697ab30b183dea932bef45f48f2b2b4f4 /lib/libstand/printf.c
parent6889817a6e70076fbe448f63f4d41cc27da7731b (diff)
downloadFreeBSD-src-f00eb1aa6445c9df1cc7392df8ea57731e3af4e4.zip
FreeBSD-src-f00eb1aa6445c9df1cc7392df8ea57731e3af4e4.tar.gz
Add:
assert() setjmp()/longjmp() vsprintf()
Diffstat (limited to 'lib/libstand/printf.c')
-rw-r--r--lib/libstand/printf.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/libstand/printf.c b/lib/libstand/printf.c
index 8c7b384..5135e10 100644
--- a/lib/libstand/printf.c
+++ b/lib/libstand/printf.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)subr_prf.c 8.3 (Berkeley) 1/21/94
- * $Id: subr_prf.c,v 1.46 1998/05/28 09:30:20 phk Exp $
+ * $Id: printf.c,v 1.1.1.1 1998/08/20 08:19:55 msmith Exp $
*/
/*
@@ -74,9 +74,6 @@ vprintf(const char *fmt, va_list ap)
kvprintf(fmt, putchar, NULL, 10, ap);
}
-/*
- * Scaled down version of sprintf(3).
- */
int
sprintf(char *buf, const char *cfmt, ...)
{
@@ -90,6 +87,15 @@ sprintf(char *buf, const char *cfmt, ...)
return retval;
}
+void
+vsprintf(char *buf, const char *cfmt, va_list ap)
+{
+ int retval;
+
+ retval = kvprintf(cfmt, NULL, (void *)buf, 10, ap);
+ buf[retval] = '\0';
+}
+
/*
* Put a number (base <= 16) in a buffer in reverse order; return an
* optional length and a pointer to the NULL terminated (preceded?)
OpenPOWER on IntegriCloud