glthread: declare marshal and unmarshal functions as non-static
[mesa.git] / src / mapi / table.c
index 9bb9f654a2a1d9fccb38a766db579b2d8608278c..748750197c629817424bc48188b289f30176bd5f 100644 (file)
@@ -1,6 +1,5 @@
 /*
  * Mesa 3-D graphics library
- * Version:  7.9
  *
  * Copyright (C) 2010 LunarG Inc.
  *
 
 #include "table.h"
 
+static nop_handler_proc nop_handler = NULL;
+
+void
+table_set_noop_handler(nop_handler_proc func)
+{
+   nop_handler = func;
+}
+
 static void
 noop_warn(const char *name)
 {
-   static int debug = -1;
+   if (nop_handler) {
+      nop_handler(name);
+   }
+   else {
+      static int debug = -1;
    
-   if (debug < 0)
-      debug = (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG"));
+      if (debug < 0)
+         debug = (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG"));
 
-   if (debug)
-      fprintf(stderr, "%s is no-op\n", name);
+      if (debug)
+         fprintf(stderr, "%s is no-op\n", name);
+   }
 }
 
 static int