/** \name String */
/*@{*/
-/** Wrapper around strncmp() */
-int
-_mesa_strncmp( const char *s1, const char *s2, size_t n )
-{
- return strncmp(s1, s2, n);
-}
-
/**
* Implemented using _mesa_malloc() and strcpy.
* Note that NULL is handled accordingly.
extern char *
_mesa_getenv( const char *var );
-extern int
-_mesa_strncmp( const char *s1, const char *s2, size_t n );
-
extern char *
_mesa_strdup( const char *s );
result.suffixes = 0;
for (inst = Instructions; inst->name; inst++) {
- if (_mesa_strncmp((const char *) token, inst->name, 3) == 0) {
+ if (strncmp((const char *) token, inst->name, 3) == 0) {
/* matched! */
int i = 3;
result = *inst;
_mesa_set_program_error(ctx, -1, NULL);
/* check the program header */
- if (_mesa_strncmp((const char *) programString, "!!FP1.0", 7) == 0) {
+ if (strncmp((const char *) programString, "!!FP1.0", 7) == 0) {
target = GL_FRAGMENT_PROGRAM_NV;
parseState.pos = programString + 7;
}
- else if (_mesa_strncmp((const char *) programString, "!!FCP1.0", 8) == 0) {
+ else if (strncmp((const char *) programString, "!!FCP1.0", 8) == 0) {
/* fragment / register combiner program - not supported */
_mesa_set_program_error(ctx, 0, "Invalid fragment program header");
_mesa_error(ctx, GL_INVALID_OPERATION, "glLoadProgramNV(bad header)");
_mesa_set_program_error(ctx, -1, NULL);
/* check the program header */
- if (_mesa_strncmp((const char *) programString, "!!VP1.0", 7) == 0) {
+ if (strncmp((const char *) programString, "!!VP1.0", 7) == 0) {
target = GL_VERTEX_PROGRAM_NV;
parseState.pos = programString + 7;
parseState.isStateProgram = GL_FALSE;
}
- else if (_mesa_strncmp((const char *) programString, "!!VP1.1", 7) == 0) {
+ else if (strncmp((const char *) programString, "!!VP1.1", 7) == 0) {
target = GL_VERTEX_PROGRAM_NV;
parseState.pos = programString + 7;
parseState.isStateProgram = GL_FALSE;
parseState.isVersion1_1 = GL_TRUE;
}
- else if (_mesa_strncmp((const char *) programString, "!!VSP1.0", 8) == 0) {
+ else if (strncmp((const char *) programString, "!!VSP1.0", 8) == 0) {
target = GL_VERTEX_STATE_PROGRAM_NV;
parseState.pos = programString + 8;
parseState.isStateProgram = GL_TRUE;
/* name is not null-terminated, use nameLen */
for (i = 0; i < (GLint) paramList->NumParameters; i++) {
if (paramList->Parameters[i].Name &&
- _mesa_strncmp(paramList->Parameters[i].Name, name, nameLen) == 0
+ strncmp(paramList->Parameters[i].Name, name, nameLen) == 0
&& strlen(paramList->Parameters[i].Name) == (size_t)nameLen)
return i;
}
legal_identifier(slang_atom name)
{
/* "gl_" is a reserved prefix */
- if (_mesa_strncmp((char *) name, "gl_", 3) == 0) {
+ if (strncmp((char *) name, "gl_", 3) == 0) {
return GL_FALSE;
}
return GL_TRUE;