summaryrefslogtreecommitdiff
path: root/graphics/glide3
diff options
context:
space:
mode:
authorEric Anholt <anholt@FreeBSD.org>2003-09-29 06:04:41 +0000
committerEric Anholt <anholt@FreeBSD.org>2003-09-29 06:04:41 +0000
commit072682a526c685b7622612d1ab4453a97b57feea (patch)
tree5b8a9f052e41d4c9a408f6c8897b4e10008e62b1 /graphics/glide3
parentUpdate to version 0.2.0 (diff)
Fix build with new gcc by reducing pasting abuse in macros.
Reported by: bento
Notes
Notes: svn path=/head/; revision=89747
Diffstat (limited to 'graphics/glide3')
-rw-r--r--graphics/glide3/files/patch-h3-distate.c32
-rw-r--r--graphics/glide3/files/patch-h3-fxglide_h23
-rw-r--r--graphics/glide3/files/patch-h5-distate.c43
-rw-r--r--graphics/glide3/files/patch-h5-fxglide_h30
4 files changed, 122 insertions, 6 deletions
diff --git a/graphics/glide3/files/patch-h3-distate.c b/graphics/glide3/files/patch-h3-distate.c
new file mode 100644
index 000000000000..447bb95e9208
--- /dev/null
+++ b/graphics/glide3/files/patch-h3-distate.c
@@ -0,0 +1,32 @@
+--- h3/glide3/src/distate.c.orig Sun Sep 28 22:48:55 2003
++++ h3/glide3/src/distate.c Sun Sep 28 22:49:07 2003
+@@ -206,23 +206,23 @@
+ */
+
+ #define STOREARG(function, arg) \
+-gc->state.stateArgs.##function##Args.arg = arg
++gc->state.stateArgs.function##Args.arg = arg
+
+ #define LOADARG(function, arg) \
+-gc->state.stateArgs.##function##Args.arg
++gc->state.stateArgs.function##Args.arg
+
+
+ #define NOTVALID(regset) \
+-(gc->state.invalid & ##regset##BIT)
++(gc->state.invalid & regset##BIT)
+
+ #define SETVALID(regset) \
+-(gc->state.invalid &= ~(##regset##BIT))
++(gc->state.invalid &= ~(regset##BIT))
+
+ #define ENABLEMODE(mode) \
+-gc->state.grEnableArgs.##mode## = GR_MODE_ENABLE;
++gc->state.grEnableArgs.mode = GR_MODE_ENABLE;
+
+ #define DISABLEMODE(mode) \
+-gc->state.grEnableArgs.##mode## = GR_MODE_DISABLE;
++gc->state.grEnableArgs.mode = GR_MODE_DISABLE;
+
+ /*-------------------------------------------------------------------
+ Function: grAlphaBlendFunction
diff --git a/graphics/glide3/files/patch-h3-fxglide_h b/graphics/glide3/files/patch-h3-fxglide_h
index 1a55276f044f..57c406fef8a5 100644
--- a/graphics/glide3/files/patch-h3-fxglide_h
+++ b/graphics/glide3/files/patch-h3-fxglide_h
@@ -1,6 +1,23 @@
-diff -ru ../Glide3.orig/h3/glide3/src/fxglide.h ./h3/glide3/src/fxglide.h
---- ../Glide3.orig/h3/glide3/src/fxglide.h Thu May 31 12:05:52 2001
-+++ ./h3/glide3/src/fxglide.h Sun Jan 13 15:35:42 2002
+--- h3/glide3/src/fxglide.h.orig Thu May 31 12:05:52 2001
++++ h3/glide3/src/fxglide.h Sun Sep 28 22:41:02 2003
+@@ -1526,7 +1526,7 @@
+
+ #ifdef GLIDE3
+ #define GR_STATE_ENTRY(name, type, args) \
+- type _##name## args
++ type _##name args
+ #else
+ #define GR_STATE_ENTRY(name, type, args) \
+ GR_ENTRY(name, type, args)
+@@ -1845,7 +1845,7 @@
+ #define CUR_TRI_PROC(__checkValidP, __cullP) \
+ (*gc->archDispatchProcs.coorModeTriVector)[__checkValidP][__cullP]
+ #define INVALIDATE(regset) {\
+- gc->state.invalid |= ##regset##BIT; \
++ gc->state.invalid |= regset##BIT; \
+ gc->triSetupProc = CUR_TRI_PROC(FXTRUE, (gc->state.cull_mode != GR_CULL_DISABLE)); \
+ }
+
@@ -2133,7 +2133,11 @@
#if defined(GLIDE_SANITY_ASSERT)
#define GR_ASSERT(exp) ((void)((!(exp)) ? (_grAssert(#exp, __FILE__, __LINE__),0) : 0xFFFFFFFF))
diff --git a/graphics/glide3/files/patch-h5-distate.c b/graphics/glide3/files/patch-h5-distate.c
new file mode 100644
index 000000000000..33306ffaa37e
--- /dev/null
+++ b/graphics/glide3/files/patch-h5-distate.c
@@ -0,0 +1,43 @@
+--- h5/glide3/src/distate.c.orig Sun Sep 28 22:36:52 2003
++++ h5/glide3/src/distate.c Sun Sep 28 22:37:05 2003
+@@ -350,31 +350,31 @@
+ */
+
+ #define STOREARG_TMU(function, tmu, arg) \
+-gc->state.stateArgs.##function##Args.arg[tmu] = arg
++gc->state.stateArgs.function##Args.arg[tmu] = arg
+
+ #define LOADARG_TMU(function, tmu, arg) \
+-gc->state.stateArgs.##function##Args.arg[tmu]
++gc->state.stateArgs.function##Args.arg[tmu]
+
+ #define STOREARG(function, arg) \
+-gc->state.stateArgs.##function##Args.arg = arg
++gc->state.stateArgs.function##Args.arg = arg
+
+ #define LOADARG(function, arg) \
+-gc->state.stateArgs.##function##Args.arg
++gc->state.stateArgs.function##Args.arg
+
+ #define NOTVALID(regset) \
+-(gc->state.invalid & ##regset##BIT)
++(gc->state.invalid & regset##BIT)
+
+ #define NOTVALID_TMU(tmu, regset) \
+-(gc->state.tmuInvalid[tmu] & ##regset##BIT)
++(gc->state.tmuInvalid[tmu] & regset##BIT)
+
+ #define SETVALID(regset) \
+-(gc->state.invalid &= ~(##regset##BIT))
++(gc->state.invalid &= ~(regset##BIT))
+
+ #define ENABLEMODE(mode) \
+-gc->state.grEnableArgs.##mode## = GR_MODE_ENABLE;
++gc->state.grEnableArgs.mode = GR_MODE_ENABLE;
+
+ #define DISABLEMODE(mode) \
+-gc->state.grEnableArgs.##mode## = GR_MODE_DISABLE;
++gc->state.grEnableArgs.mode = GR_MODE_DISABLE;
+
+ /*-------------------------------------------------------------------
+ Function: grAlphaBlendFunction
diff --git a/graphics/glide3/files/patch-h5-fxglide_h b/graphics/glide3/files/patch-h5-fxglide_h
index a56accb7f4e6..7b6bb58898a1 100644
--- a/graphics/glide3/files/patch-h5-fxglide_h
+++ b/graphics/glide3/files/patch-h5-fxglide_h
@@ -1,6 +1,30 @@
-diff -ru ../Glide3.orig/h5/glide3/src/fxglide.h ./h5/glide3/src/fxglide.h
---- ../Glide3.orig/h5/glide3/src/fxglide.h Thu May 31 12:05:52 2001
-+++ ./h5/glide3/src/fxglide.h Sun Jan 13 15:35:48 2002
+--- h5/glide3/src/fxglide.h.orig Thu May 31 12:05:52 2001
++++ h5/glide3/src/fxglide.h Sun Sep 28 22:35:50 2003
+@@ -2125,7 +2125,7 @@
+
+ #ifdef GLIDE3
+ #define GR_STATE_ENTRY(name, type, args) \
+- type _##name## args
++ type _##name args
+ #else
+ #define GR_STATE_ENTRY(name, type, args) \
+ GR_ENTRY(name, type, args)
+@@ -2636,13 +2636,13 @@
+ #define CUR_TRI_PROC(__checkValidP, __cullP) \
+ (*gc->archDispatchProcs.coorModeTriVector)[__checkValidP][__cullP]
+ #define INVALIDATE(regset) {\
+- gc->state.invalid |= ##regset##BIT; \
++ gc->state.invalid |= regset##BIT; \
+ gc->triSetupProc = CUR_TRI_PROC(FXTRUE, (gc->state.cull_mode != GR_CULL_DISABLE)); \
+ }
+
+ #define INVALIDATE_TMU(tmu, regset) {\
+ INVALIDATE(tmuConfig); \
+- gc->state.tmuInvalid[tmu] |= ##regset##BIT; \
++ gc->state.tmuInvalid[tmu] |= regset##BIT; \
+ }
+
+ void
@@ -2992,7 +2992,11 @@
#if defined(GLIDE_SANITY_ASSERT)
#define GR_ASSERT(exp) ((void)((!(exp)) ? (_grAssert(#exp, __FILE__, __LINE__),0) : 0xFFFFFFFF))