mirror of
https://github.com/nigels-com/glew.git
synced 2024-11-29 09:11:56 +00:00
bug fixes
git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@347 783a27ee-832a-0410-bc00-9f386506c6dd
This commit is contained in:
parent
e83774892e
commit
b9b78fe983
@ -100,38 +100,38 @@ void* dlGetProcAddress (const GLubyte* name)
|
|||||||
* These functions implement the functionality required in this file.
|
* These functions implement the functionality required in this file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GLuint _glewStrLen (const GLubyte* s)
|
static GLuint _glewStrLen (const GLubyte* s)
|
||||||
{
|
{
|
||||||
GLuint i=0;
|
GLuint i=0;
|
||||||
while (s+i != NULL && s[i] != '\0') i++;
|
while (s+i != NULL && s[i] != '\0') i++;
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
GLuint _glewStrCLen (const GLubyte* s, GLubyte c)
|
static GLuint _glewStrCLen (const GLubyte* s, GLubyte c)
|
||||||
{
|
{
|
||||||
GLuint i=0;
|
GLuint i=0;
|
||||||
while (s+i != NULL && s[i] != '\0' && s[i] != c) i++;
|
while (s+i != NULL && s[i] != '\0' && s[i] != c) i++;
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
GLboolean _glewStrSame (const GLubyte* a, const GLubyte* b, GLuint n)
|
static GLboolean _glewStrSame (const GLubyte* a, const GLubyte* b, GLuint n)
|
||||||
{
|
{
|
||||||
GLuint i=0;
|
GLuint i=0;
|
||||||
while (i < n && a+i != NULL && b+i != NULL && a[i] == b[i]) i++;
|
while (i < n && a+i != NULL && b+i != NULL && a[i] == b[i]) i++;
|
||||||
return i == n ? GL_TRUE : GL_FALSE;
|
return i == n ? GL_TRUE : GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
GLboolean _glewStrSame1 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb)
|
static GLboolean _glewStrSame1 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb)
|
||||||
{
|
{
|
||||||
while (*na > 0 && (**a == ' ' || **a == '\n' || **a == '\r' || **a == '\t'))
|
while (*na > 0 && (**a == ' ' || **a == '\n' || **a == '\r' || **a == '\t'))
|
||||||
{
|
{
|
||||||
*a++;
|
(*a)++;
|
||||||
*na--;
|
(*na)--;
|
||||||
}
|
}
|
||||||
if(*na >= nb)
|
if(*na >= nb)
|
||||||
{
|
{
|
||||||
GLuint i=0;
|
GLuint i=0;
|
||||||
while (i < nb && *a+i != NULL && b+i != NULL && *a[i] == b[i]) i++;
|
while (i < nb && (*a)+i != NULL && b+i != NULL && (*a)[i] == b[i]) i++;
|
||||||
if(i == nb)
|
if(i == nb)
|
||||||
{
|
{
|
||||||
*a = *a + nb;
|
*a = *a + nb;
|
||||||
@ -142,12 +142,12 @@ GLboolean _glewStrSame1 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb)
|
|||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
GLboolean _glewStrSame2 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb)
|
static GLboolean _glewStrSame2 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb)
|
||||||
{
|
{
|
||||||
if(*na >= nb)
|
if(*na >= nb)
|
||||||
{
|
{
|
||||||
GLuint i=0;
|
GLuint i=0;
|
||||||
while (i < nb && *a+i != NULL && b+i != NULL && *a[i] == b[i]) i++;
|
while (i < nb && (*a)+i != NULL && b+i != NULL && (*a)[i] == b[i]) i++;
|
||||||
if(i == nb)
|
if(i == nb)
|
||||||
{
|
{
|
||||||
*a = *a + nb;
|
*a = *a + nb;
|
||||||
@ -158,13 +158,13 @@ GLboolean _glewStrSame2 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb)
|
|||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
GLboolean _glewStrSame3 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb)
|
static GLboolean _glewStrSame3 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb)
|
||||||
{
|
{
|
||||||
if(*na >= nb)
|
if(*na >= nb)
|
||||||
{
|
{
|
||||||
GLuint i=0;
|
GLuint i=0;
|
||||||
while (i < nb && *a+i != NULL && b+i != NULL && *a[i] == b[i]) i++;
|
while (i < nb && (*a)+i != NULL && b+i != NULL && (*a)[i] == b[i]) i++;
|
||||||
if (i == nb && (*na == nb || *a[i] == ' ' || *a[i] == '\n' || *a[i] == '\r' || *a[i] == '\t'))
|
if (i == nb && (*na == nb || (*a)[i] == ' ' || (*a)[i] == '\n' || (*a)[i] == '\r' || (*a)[i] == '\t'))
|
||||||
{
|
{
|
||||||
*a = *a + nb;
|
*a = *a + nb;
|
||||||
*na = *na - nb;
|
*na = *na - nb;
|
||||||
|
Loading…
Reference in New Issue
Block a user