vga text output and libc expansion
[3sys] / sys1 / kern / src / libc / stdarg.h
diff --git a/sys1/kern/src/libc/stdarg.h b/sys1/kern/src/libc/stdarg.h
new file mode 100644 (file)
index 0000000..f870438
--- /dev/null
@@ -0,0 +1,12 @@
+#ifndef STDARG_H_
+#define STDARG_H_
+
+/* Assumes that arguments are passed on the stack 4-byte aligned */
+
+typedef int* va_list;
+
+#define va_start(ap, last)     ((ap) = (int*)&(last) + 1)
+#define va_arg(ap, type)       (*(type*)(ap)++)
+#define va_end(ap)
+
+#endif /* STDARG_H_ */