Remove _mesa_strstr in favor of plain strstr.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 19 Feb 2010 07:50:51 +0000 (23:50 -0800)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 19 Feb 2010 12:47:48 +0000 (07:47 -0500)
src/mesa/main/debug.c
src/mesa/main/imports.c
src/mesa/main/imports.h
src/mesa/shader/shader_api.c
src/mesa/shader/slang/slang_link.c

index 9bad834..f2182c0 100644 (file)
@@ -206,17 +206,17 @@ static void add_debug_flags( const char *debug )
 
    MESA_VERBOSE = 0x0;
    for (i = 0; i < Elements(debug_opt); i++) {
-      if (_mesa_strstr(debug, debug_opt[i].name))
+      if (strstr(debug, debug_opt[i].name))
          MESA_VERBOSE |= debug_opt[i].flag;
    }
 
    /* Debug flag:
     */
-   if (_mesa_strstr(debug, "flush")) 
+   if (strstr(debug, "flush"))
       MESA_DEBUG_FLAGS |= DEBUG_ALWAYS_FLUSH;
 
 #if defined(_FPU_GETCW) && defined(_FPU_SETCW)
-   if (_mesa_strstr(debug, "fpexceptions")) {
+   if (strstr(debug, "fpexceptions")) {
       /* raise FP exceptions */
       fpu_control_t mask;
       _FPU_GETCW(mask);
index def0452..cd19373 100644 (file)
@@ -841,13 +841,6 @@ _mesa_getenv( const char *var )
 /** \name String */
 /*@{*/
 
-/** Wrapper around strstr() */
-char *
-_mesa_strstr( const char *haystack, const char *needle )
-{
-   return strstr(haystack, needle);
-}
-
 /** Wrapper around strncat() */
 char *
 _mesa_strncat( char *dest, const char *src, size_t n )
@@ -1177,7 +1170,7 @@ _mesa_error( GLcontext *ctx, GLenum error, const char *fmtString, ... )
       const char *debugEnv = _mesa_getenv("MESA_DEBUG");
 
 #ifdef DEBUG
-      if (debugEnv && _mesa_strstr(debugEnv, "silent"))
+      if (debugEnv && strstr(debugEnv, "silent"))
          debug = GL_FALSE;
       else
          debug = GL_TRUE;
index e3d2ac9..c487f1d 100644 (file)
@@ -612,9 +612,6 @@ extern char *
 _mesa_getenv( const char *var );
 
 extern char *
-_mesa_strstr( const char *haystack, const char *needle );
-
-extern char *
 _mesa_strncat( char *dest, const char *src, size_t n );
 
 extern char *
index e8eaa9c..c3b49ed 100644 (file)
@@ -374,21 +374,21 @@ get_shader_flags(void)
    const char *env = _mesa_getenv("MESA_GLSL");
 
    if (env) {
-      if (_mesa_strstr(env, "dump"))
+      if (strstr(env, "dump"))
          flags |= GLSL_DUMP;
-      if (_mesa_strstr(env, "log"))
+      if (strstr(env, "log"))
          flags |= GLSL_LOG;
-      if (_mesa_strstr(env, "nopvert"))
+      if (strstr(env, "nopvert"))
          flags |= GLSL_NOP_VERT;
-      if (_mesa_strstr(env, "nopfrag"))
+      if (strstr(env, "nopfrag"))
          flags |= GLSL_NOP_FRAG;
-      if (_mesa_strstr(env, "nopt"))
+      if (strstr(env, "nopt"))
          flags |= GLSL_NO_OPT;
-      else if (_mesa_strstr(env, "opt"))
+      else if (strstr(env, "opt"))
          flags |= GLSL_OPT;
-      if (_mesa_strstr(env, "uniform"))
+      if (strstr(env, "uniform"))
          flags |= GLSL_UNIFORMS;
-      if (_mesa_strstr(env, "useprog"))
+      if (strstr(env, "useprog"))
          flags |= GLSL_USE_PROG;
    }
 
index 75b0022..9c90d5c 100644 (file)
@@ -563,7 +563,7 @@ remove_extra_version_directives(GLchar *source)
 {
    GLuint verCount = 0;
    while (1) {
-      char *ver = _mesa_strstr(source, "#version");
+      char *ver = strstr(source, "#version");
       if (ver) {
          verCount++;
          if (verCount > 1) {