init secondary color to (0,0,0,1). remove some redundant initializations.
[mesa.git] / src / mesa / main / arbfragparse.c
index 1723e6c5d9a8a7784158736060737a5f66c31bb6..0443862020af92c28edc740e168c2c580476e3dc 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * Mesa 3-D graphics library
- * Version:  5.1
+ * Version:  6.1
  *
- * Copyright (C) 1999-2003  Brian Paul   All Rights Reserved.
+ * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -38,8 +38,8 @@
 #include "arbparse.h"
 #include "arbfragparse.h"
 
-static void
-debug_fp_inst(GLint num, struct fp_instruction *fp)
+void
+_mesa_debug_fp_inst(GLint num, struct fp_instruction *fp)
 {
    GLint a;
  
@@ -211,26 +211,24 @@ _mesa_parse_arb_fragment_program(GLcontext * ctx, GLenum target,
    if (retval)
    {
       program->Instructions = (struct fp_instruction *) _mesa_malloc (
-                                     sizeof(struct fp_instruction) );                    
+                                     sizeof(struct fp_instruction) );
       program->Instructions[0].Opcode = FP_OPCODE_END;
       return;
    }
 
    /* XXX: Eh.. we parsed something that wasn't a fragment program. doh! */
-   if (ap.type != GL_FRAGMENT_PROGRAM_ARB)
+   if (ap.Base.Target != GL_FRAGMENT_PROGRAM_ARB)
    {
       program->Instructions = (struct fp_instruction *) _mesa_malloc (
-                                     sizeof(struct fp_instruction) );                    
+                                     sizeof(struct fp_instruction) );
       program->Instructions[0].Opcode = FP_OPCODE_END;
 
       _mesa_error (ctx, GL_INVALID_OPERATION, "Parsed a non-fragment program as a fragment program");
-      return;      
+      return;
    }
 
 #if DEBUG_FP
-   debug_fp_inst(ap.Base.NumInstructions, ap.FPInstructions);
-#else
-   (void) debug_fp_inst;
+   _mesa_debug_fp_inst(ap.Base.NumInstructions, ap.FPInstructions);
 #endif
 
    program->Instructions   = ap.FPInstructions;