ref: e15119e7c8eac4375991c9819868ca32a6f17f3b
parent: f129504a64665944bb91a66d33f0ba0d3a3e2bd3
author: mkf <mkf@cloud9p.org>
date: Sat May 11 13:23:46 EDT 2024
unix.[ch]: Behold and lo! print()
--- a/unix.c
+++ b/unix.c
@@ -94,4 +94,16 @@
return n;
}
+int
+print(char *fmt, ...)
+{
+ int n;
+ va_list args;
+
+ va_start(args, fmt);
+ n = vfprint(1, fmt, args);
+ va_end(args);
+ return n;
+}
+
--- a/unix.h
+++ b/unix.h
@@ -30,3 +30,4 @@
int sprint(char *out, char *fmt, ...);
int vfprint(int fd, char *fmt, va_list arg);
int fprint(int fd, char *fmt, ...);
+int print(char *fmt, ...);
\ No newline at end of file