mojoshader_compiler.c
changeset 855 575a443074af
parent 854 65e06097e450
child 856 3eb34b50cc57
--- a/mojoshader_compiler.c	Tue Feb 23 11:34:36 2010 -0500
+++ b/mojoshader_compiler.c	Tue Feb 23 12:55:52 2010 -0500
@@ -14,6 +14,20 @@
 #define LEMON_SUPPORT_TRACING 1
 #endif
 
+#define REVERSE_LINKED_LIST(typ, head) { \
+    if ((head) && (head->next)) { \
+        typ *tmp = NULL; \
+        typ *tmp1 = NULL; \
+        while (head != NULL) { \
+            tmp = head; \
+            head = head->next; \
+            tmp->next = tmp1; \
+            tmp1 = tmp; \
+        } \
+        head = tmp; \
+    } \
+}
+
 typedef union TokenData
 {
     int64 i64;