summaryrefslogtreecommitdiff
path: root/05/stdarg.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-02-13 15:07:26 -0500
committerpommicket <pommicket@gmail.com>2022-02-13 15:07:26 -0500
commit2fef6981954df735f1f364e96c365c6f000a638b (patch)
tree4abd706106bc8e4df66cdbfdde8dea0de50f2e6f /05/stdarg.h
parent6acd24e315c4351294c7f2e9b88fdd5faf48b966 (diff)
first C hello world!
Diffstat (limited to '05/stdarg.h')
-rw-r--r--05/stdarg.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/05/stdarg.h b/05/stdarg.h
new file mode 100644
index 0000000..68fcd8e
--- /dev/null
+++ b/05/stdarg.h
@@ -0,0 +1,4 @@
+typedef unsigned long va_list;
+#define va_start(list, arg) ((list) = (unsigned long)&arg)
+#define va_arg(list, type) (*((type *)(list += ((sizeof(type) + 7) & 0xfffffffffffffff8))))
+#define va_end(list)