fix the build
authorBrian Paul <brian.paul@tungstengraphics.com>
Mon, 29 Mar 2004 14:53:49 +0000 (14:53 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Mon, 29 Mar 2004 14:53:49 +0000 (14:53 +0000)
src/mesa/shader/grammar.c
src/mesa/sources

index 0ed347bad51ef9c35103784a1fc5d9c88ee0c379..09e09204a0ed2c6beb5af084d49b261a237d2714 100644 (file)
@@ -297,7 +297,7 @@ static void set_last_error (const byte *msg, byte *param, int pos)
     /* error message can only be set only once */
     if (error_message != NULL)
     {
-        mem_free (&param);
+        mem_free ((void **) &param);
         return;
     }
 
@@ -413,7 +413,7 @@ static void map_byte_append (map_byte **ma, map_byte **nm)
     returns pointer to the element with the specified key if it exists
     returns NULL otherwise
 */
-map_byte *map_byte_locate (map_byte **ma, const byte *key)
+static map_byte *map_byte_locate (map_byte **ma, const byte *key)
 {
     while (*ma)
     {
@@ -928,12 +928,12 @@ static int barray_push (barray **ba, emit *em, byte c, unsigned int pos, regbyte
 
     while (temp)
     {
-        if (temp->m_emit_dest == ed_output)
+               if (temp->m_emit_dest == ed_output) {
             if (temp->m_emit_type == et_position)
                 count += 4;     /* position is a 32-bit unsigned integer */
             else
                 count++;
-
+               }
         temp = temp->m_next;
     }
 
@@ -948,7 +948,7 @@ static int barray_push (barray **ba, emit *em, byte c, unsigned int pos, regbyte
                 (**ba).data[(**ba).len - count--] = em->m_byte;
             else if (em->m_emit_type == et_stream)
                 (**ba).data[(**ba).len - count--] = c;
-            else // em->type == et_position
+            else /* em->type == et_position */
                 (**ba).data[(**ba).len - count--] = (byte) pos,
                 (**ba).data[(**ba).len - count--] = (byte) (pos >> 8),
                 (**ba).data[(**ba).len - count--] = (byte) (pos >> 16),
@@ -1131,7 +1131,7 @@ static int eat_space (const byte **text)
 }
 
 /*
-    returns 1 if text points to C-style comment start string "/*",
+    returns 1 if text points to C-style comment start string,
     returns 0 otherwise
 */
 static int is_comment_start (const byte *text)
index 21727aa5740c403e0df9db0ec55f2aca26434a6f..249734f7837d125f249f327739c9fca1af988e51 100644 (file)
@@ -6,10 +6,6 @@ MAIN_SOURCES = \
        main/api_noop.c \
        main/api_validate.c \
        main/accum.c \
-       main/arbparse.c \
-       main/arbprogram.c \
-       main/arbfragparse.c \
-       main/arbvertparse.c \
        main/attrib.c \
        main/blend.c \
        main/bufferobj.c \
@@ -38,15 +34,10 @@ MAIN_SOURCES = \
        main/light.c \
        main/lines.c \
        main/matrix.c \
-       main/nvprogram.c \
-       main/nvfragparse.c \
-       main/nvvertexec.c \
-       main/nvvertparse.c \
        main/occlude.c \
        main/pixel.c \
        main/points.c \
        main/polygon.c \
-       main/program.c \
        main/rastpos.c \
        main/state.c \
        main/stencil.c \
@@ -137,6 +128,18 @@ TNL_SOURCES = \
        tnl/t_vtx_eval.c \
        tnl/t_vtx_exec.c 
 
+SHADER_SOURCES = \
+       shader/arbfragparse.c \
+       shader/arbprogparse.c \
+       shader/arbprogram.c \
+       shader/arbvertparse.c \
+       shader/grammar_mesa.c \
+       shader/nvfragparse.c \
+       shader/nvprogram.c \
+       shader/nvvertexec.c \
+       shader/nvvertparse.c \
+       shader/program.c
+
 ASM_C_SOURCES =        \
        x86/common_x86.c \
        x86/x86.c \
@@ -218,6 +221,7 @@ CORE_SOURCES = \
        $(MATH_SOURCES)         \
        $(ARRAY_CACHE_SOURCES)  \
        $(TNL_SOURCES)          \
+       $(SHADER_SOURCES)       \
        $(SWRAST_SOURCES)       \
        $(SWRAST_SETUP_SOURCES) \
        $(ASM_C_SOURCES)
@@ -243,5 +247,6 @@ INCLUDE_DIRS = \
        -I$(TOP)/src/mesa/glapi \
        -I$(TOP)/src/mesa/math \
        -I$(TOP)/src/mesa/tnl \
+       -I$(TOP)/src/mesa/shader \
        -I$(TOP)/src/mesa/swrast \
        -I$(TOP)/src/mesa/swrast_setup