summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2010-02-18 23:50:55 -0800
committerKristian Høgsberg <[email protected]>2010-02-19 07:51:02 -0500
commit21d0c70b4b1c18dc1c3ac7d0fbd8a903d60f8be7 (patch)
tree59e54ca5138fd305d6b2ac6682a77797c813e1ad /src/mesa/shader
parentf69d1d1438361f10fd8db78d2d38f26e33db9747 (diff)
Remove _mesa_strlen in favor of plain strlen.
Diffstat (limited to 'src/mesa/shader')
-rw-r--r--src/mesa/shader/arbprogram.c4
-rw-r--r--src/mesa/shader/atifragshader.c2
-rw-r--r--src/mesa/shader/nvfragparse.c2
-rw-r--r--src/mesa/shader/nvprogram.c4
-rw-r--r--src/mesa/shader/nvvertparse.c2
-rw-r--r--src/mesa/shader/prog_parameter.c4
-rw-r--r--src/mesa/shader/prog_uniform.c2
-rw-r--r--src/mesa/shader/slang/slang_compile.c10
-rw-r--r--src/mesa/shader/slang/slang_emit.c2
-rw-r--r--src/mesa/shader/slang/slang_label.c2
-rw-r--r--src/mesa/shader/slang/slang_link.c2
-rw-r--r--src/mesa/shader/slang/slang_mem.c2
-rw-r--r--src/mesa/shader/slang/slang_utility.c2
-rw-r--r--src/mesa/shader/slang/slang_utility.h2
14 files changed, 21 insertions, 21 deletions
diff --git a/src/mesa/shader/arbprogram.c b/src/mesa/shader/arbprogram.c
index 7e3040a6ef4..a77ff7c5b15 100644
--- a/src/mesa/shader/arbprogram.c
+++ b/src/mesa/shader/arbprogram.c
@@ -910,7 +910,7 @@ _mesa_GetProgramivARB(GLenum target, GLenum pname, GLint *params)
switch (pname) {
case GL_PROGRAM_LENGTH_ARB:
*params
- = prog->String ? (GLint) _mesa_strlen((char *) prog->String) : 0;
+ = prog->String ? (GLint) strlen((char *) prog->String) : 0;
return;
case GL_PROGRAM_FORMAT_ARB:
*params = prog->Format;
@@ -1091,7 +1091,7 @@ _mesa_GetProgramStringARB(GLenum target, GLenum pname, GLvoid *string)
}
if (prog->String)
- _mesa_memcpy(dst, prog->String, _mesa_strlen((char *) prog->String));
+ _mesa_memcpy(dst, prog->String, strlen((char *) prog->String));
else
*dst = '\0';
}
diff --git a/src/mesa/shader/atifragshader.c b/src/mesa/shader/atifragshader.c
index 28dbf77b666..3e26c43c480 100644
--- a/src/mesa/shader/atifragshader.c
+++ b/src/mesa/shader/atifragshader.c
@@ -115,7 +115,7 @@ create_dst_mod_str(GLuint mod)
if (mod & GL_SATURATE_BIT_ATI)
strncat(ret_str, "|SAT", 1024);
- if (_mesa_strlen(ret_str) == 0)
+ if (strlen(ret_str) == 0)
strncat(ret_str, "NONE", 1024);
return ret_str;
}
diff --git a/src/mesa/shader/nvfragparse.c b/src/mesa/shader/nvfragparse.c
index 8ee7c930626..b219dfa6e77 100644
--- a/src/mesa/shader/nvfragparse.c
+++ b/src/mesa/shader/nvfragparse.c
@@ -378,7 +378,7 @@ Peek_Token(struct parse_state *parseState, GLubyte *token)
parseState->pos += (-i);
return GL_FALSE;
}
- len = (GLint)_mesa_strlen((const char *) token);
+ len = (GLint) strlen((const char *) token);
parseState->pos += (i - len);
return GL_TRUE;
}
diff --git a/src/mesa/shader/nvprogram.c b/src/mesa/shader/nvprogram.c
index c3b10f5d9b8..394b6a42d71 100644
--- a/src/mesa/shader/nvprogram.c
+++ b/src/mesa/shader/nvprogram.c
@@ -260,7 +260,7 @@ _mesa_GetProgramivNV(GLuint id, GLenum pname, GLint *params)
*params = prog->Target;
return;
case GL_PROGRAM_LENGTH_NV:
- *params = prog->String ?(GLint)_mesa_strlen((char *) prog->String) : 0;
+ *params = prog->String ?(GLint) strlen((char *) prog->String) : 0;
return;
case GL_PROGRAM_RESIDENT_NV:
*params = prog->Resident;
@@ -297,7 +297,7 @@ _mesa_GetProgramStringNV(GLuint id, GLenum pname, GLubyte *program)
}
if (prog->String) {
- MEMCPY(program, prog->String, _mesa_strlen((char *) prog->String));
+ MEMCPY(program, prog->String, strlen((char *) prog->String));
}
else {
program[0] = 0;
diff --git a/src/mesa/shader/nvvertparse.c b/src/mesa/shader/nvvertparse.c
index baff7658d18..90f795ab16a 100644
--- a/src/mesa/shader/nvvertparse.c
+++ b/src/mesa/shader/nvvertparse.c
@@ -232,7 +232,7 @@ Peek_Token(struct parse_state *parseState, GLubyte *token)
parseState->pos += (-i);
return GL_FALSE;
}
- len = (GLint)_mesa_strlen((const char *) token);
+ len = (GLint) strlen((const char *) token);
parseState->pos += (i - len);
return GL_TRUE;
}
diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c
index d4970c4e44e..0c52c254b52 100644
--- a/src/mesa/shader/prog_parameter.c
+++ b/src/mesa/shader/prog_parameter.c
@@ -538,7 +538,7 @@ _mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList,
for (i = 0; i < (GLint) paramList->NumParameters; i++) {
if (paramList->Parameters[i].Name &&
_mesa_strncmp(paramList->Parameters[i].Name, name, nameLen) == 0
- && _mesa_strlen(paramList->Parameters[i].Name) == (size_t)nameLen)
+ && strlen(paramList->Parameters[i].Name) == (size_t)nameLen)
return i;
}
}
@@ -723,7 +723,7 @@ _mesa_longest_parameter_name(const struct gl_program_parameter_list *list,
return 0;
for (i = 0; i < list->NumParameters; i++) {
if (list->Parameters[i].Type == type) {
- GLuint len = _mesa_strlen(list->Parameters[i].Name);
+ GLuint len = strlen(list->Parameters[i].Name);
if (len > maxLen)
maxLen = len;
}
diff --git a/src/mesa/shader/prog_uniform.c b/src/mesa/shader/prog_uniform.c
index 0642713148c..cdfe158deb2 100644
--- a/src/mesa/shader/prog_uniform.c
+++ b/src/mesa/shader/prog_uniform.c
@@ -142,7 +142,7 @@ _mesa_longest_uniform_name(const struct gl_uniform_list *list)
GLint max = 0;
GLuint i;
for (i = 0; list && i < list->NumUniforms; i++) {
- GLint len = (GLint)_mesa_strlen(list->Uniforms[i].Name);
+ GLint len = (GLint) strlen(list->Uniforms[i].Name);
if (len > max)
max = len;
}
diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c
index 33964e0c3b6..65842ac0c8f 100644
--- a/src/mesa/shader/slang/slang_compile.c
+++ b/src/mesa/shader/slang/slang_compile.c
@@ -167,7 +167,7 @@ static void
parse_identifier_str(slang_parse_ctx * C, char **id)
{
*id = (char *) C->I;
- C->I += _mesa_strlen(*id) + 1;
+ C->I += strlen(*id) + 1;
}
static slang_atom
@@ -176,7 +176,7 @@ parse_identifier(slang_parse_ctx * C)
const char *id;
id = (const char *) C->I;
- C->I += _mesa_strlen(id) + 1;
+ C->I += strlen(id) + 1;
return slang_atom_pool_atom(C->atoms, id);
}
@@ -298,9 +298,9 @@ parse_float(slang_parse_ctx * C, float *number)
parse_identifier_str(C, &fractional);
parse_identifier_str(C, &exponent);
- whole = (char *) _slang_alloc((_mesa_strlen(integral) +
- _mesa_strlen(fractional) +
- _mesa_strlen(exponent) + 3) * sizeof(char));
+ whole = (char *) _slang_alloc((strlen(integral) +
+ strlen(fractional) +
+ strlen(exponent) + 3) * sizeof(char));
if (whole == NULL) {
slang_info_log_memory(C->L);
RETURN0;
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c
index 0f670360ee8..fa3a63ea4be 100644
--- a/src/mesa/shader/slang/slang_emit.c
+++ b/src/mesa/shader/slang/slang_emit.c
@@ -754,7 +754,7 @@ instruction_annotation(gl_inst_opcode opcode, char *dstAnnot,
s = (char *) malloc(len);
sprintf(s, "%s = %s %s %s %s", dstAnnot,
srcAnnot0, operator, srcAnnot1, srcAnnot2);
- assert(_mesa_strlen(s) < len);
+ assert(strlen(s) < len);
free(dstAnnot);
free(srcAnnot0);
diff --git a/src/mesa/shader/slang/slang_label.c b/src/mesa/shader/slang/slang_label.c
index 1ca1ef0c7c0..12406213656 100644
--- a/src/mesa/shader/slang/slang_label.c
+++ b/src/mesa/shader/slang/slang_label.c
@@ -32,7 +32,7 @@ _slang_label_new_unique(const char *name)
static int id = 1;
slang_label *l = (slang_label *) _slang_alloc(sizeof(slang_label));
if (l) {
- l->Name = (char *) _slang_alloc(_mesa_strlen(name) + 10);
+ l->Name = (char *) _slang_alloc(strlen(name) + 10);
if (!l->Name) {
_mesa_free(l);
return NULL;
diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c
index 9c90d5c5319..2906cb17c4b 100644
--- a/src/mesa/shader/slang/slang_link.c
+++ b/src/mesa/shader/slang/slang_link.c
@@ -603,7 +603,7 @@ concat_shaders(struct gl_shader_program *shProg, GLenum shaderType)
for (i = 0; i < shProg->NumShaders; i++) {
const struct gl_shader *shader = shProg->Shaders[i];
if (shader->Type == shaderType) {
- shaderLengths[i] = _mesa_strlen(shader->Source);
+ shaderLengths[i] = strlen(shader->Source);
totalLen += shaderLengths[i];
if (!firstShader)
firstShader = shader;
diff --git a/src/mesa/shader/slang/slang_mem.c b/src/mesa/shader/slang/slang_mem.c
index dc5707a39b9..c37e12fb7f9 100644
--- a/src/mesa/shader/slang/slang_mem.c
+++ b/src/mesa/shader/slang/slang_mem.c
@@ -212,7 +212,7 @@ char *
_slang_strdup(const char *s)
{
if (s) {
- size_t l = _mesa_strlen(s);
+ size_t l = strlen(s);
char *s2 = (char *) _slang_alloc(l + 1);
if (s2)
strcpy(s2, s);
diff --git a/src/mesa/shader/slang/slang_utility.c b/src/mesa/shader/slang/slang_utility.c
index 950fba5611c..e3b0491d97f 100644
--- a/src/mesa/shader/slang/slang_utility.c
+++ b/src/mesa/shader/slang/slang_utility.c
@@ -35,7 +35,7 @@
char *
slang_string_concat (char *dst, const char *src)
{
- return strcpy (dst + _mesa_strlen (dst), src);
+ return strcpy (dst + strlen (dst), src);
}
diff --git a/src/mesa/shader/slang/slang_utility.h b/src/mesa/shader/slang/slang_utility.h
index 3762cc96795..10071f2c174 100644
--- a/src/mesa/shader/slang/slang_utility.h
+++ b/src/mesa/shader/slang/slang_utility.h
@@ -34,7 +34,7 @@
#define slang_string_compare(str1, str2) _mesa_strcmp (str1, str2)
#define slang_string_copy(dst, src) strcpy (dst, src)
-#define slang_string_length(str) _mesa_strlen (str)
+#define slang_string_length(str) strlen (str)
char *slang_string_concat (char *, const char *);