Blob
1 #include "stdinc.h"2 #include "9.h"4 /*5 * To do: This will become something else ('vprint'?).6 */7 int8 consVPrint(char* fmt, va_list args)9 {10 int len, ret;11 char buf[256];13 len = vsnprint(buf, sizeof(buf), fmt, args);14 ret = consWrite(buf, len);16 while (len-- > 0 && buf[len] == '\n')17 buf[len] = '\0';18 /*19 * if we do this, checking the root fossil (if /sys/log/fossil is there)20 * will spew all over the console.21 */22 if (0)23 syslog(0, "fossil", "%s", buf);24 return ret;25 }27 /*28 * To do: This will become 'print'.29 */30 int31 consPrint(char* fmt, ...)32 {33 int ret;34 va_list args;36 va_start(args, fmt);37 ret = consVPrint(fmt, args);38 va_end(args);39 return ret;40 }