aboutsummaryrefslogtreecommitdiffstats
path: root/lcc/include/alpha/osf/stdarg.h
diff options
context:
space:
mode:
authorzakk <zakk@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-08-26 04:48:05 +0000
committerzakk <zakk@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-08-26 04:48:05 +0000
commit952c5c128f9efaea89d41d882c4ea3ade7df4591 (patch)
tree91b84d9be7afad7e99ac64a640a65b6cb5081900 /lcc/include/alpha/osf/stdarg.h
parentc2c2e0d25d6cdb7d42d7dc981a863f65f94f281d (diff)
downloadioquake3-aero-952c5c128f9efaea89d41d882c4ea3ade7df4591.tar.gz
ioquake3-aero-952c5c128f9efaea89d41d882c4ea3ade7df4591.zip
Itsa me, quake3io!
git-svn-id: svn://svn.icculus.org/quake3/trunk@2 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'lcc/include/alpha/osf/stdarg.h')
-rwxr-xr-xlcc/include/alpha/osf/stdarg.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/lcc/include/alpha/osf/stdarg.h b/lcc/include/alpha/osf/stdarg.h
new file mode 100755
index 0000000..1b4947e
--- /dev/null
+++ b/lcc/include/alpha/osf/stdarg.h
@@ -0,0 +1,28 @@
+#ifndef __STDARG
+#define __STDARG
+
+#if !defined(_VA_LIST)
+#define _VA_LIST
+typedef struct {
+ char *_a0; /* pointer to first homed integer arg */
+ int _offset; /* byte offset of next param */
+ float _tmp;
+} __va_list;
+#endif
+typedef __va_list va_list;
+
+#define va_start(list, start) ((void)( \
+ (list)._a0 = (__typecode(__firstarg)==1 ? \
+ (char*)&__firstarg+48 : (char *)&__firstarg), \
+ (list)._offset = (__typecode(start)==1 ? \
+ (char*)&start+56 : (char *)&start+8)-(list)._a0))
+#define va_arg(list, mode) (*(mode *)( \
+ (list)._offset += (int)((sizeof(mode)+7)&~7), \
+ (__typecode(mode)==1 && sizeof(mode)==4) ? \
+ ((list)._tmp = (float)*(double *)((list)._a0 + (list)._offset - \
+ ((list)._offset <= 48 ? 56 : 8))), (char *)&(list)._tmp : \
+ (__typecode(mode)==1 && (list)._offset <= 48) ? \
+ (list)._a0 + (list)._offset - 56 : \
+ (list)._a0 + (list)._offset - (int)((sizeof(mode)+7)&~7)))
+#define va_end(list) ((void)0)
+#endif