xref: /plan9-contrib/sys/src/cmd/fossil/Clog.c (revision a84536681645e23c630ce4ef2e5c3b284d4c590b)
1 #include "stdinc.h"
2 
3 #include "9.h"
4 
5 /*
6  * Dummy for now.
7  */
8 
9 int
10 consPrint(char* fmt, ...)
11 {
12 	int len;
13 	va_list args;
14 	char buf[ERRMAX];
15 
16 	/*
17 	 * To do:
18 	 * This will be integrated with logging and become 'print'.
19 	 */
20 	va_start(args, fmt);
21 	len = vsnprint(buf, sizeof(buf), fmt, args);
22 	va_end(args);
23 
24 	return consWrite(buf, len);
25 }
26 
27 int
28 consVPrint(char* fmt, va_list args)
29 {
30 	int len;
31 	char buf[ERRMAX];
32 
33 	/*
34 	 * To do:
35 	 * This will be integrated with logging and become
36 	 * something else ('vprint'?).
37 	 */
38 	len = vsnprint(buf, sizeof(buf), fmt, args);
39 
40 	return consWrite(buf, len);
41 }
42