Commit bbfefb63 authored by idr's avatar idr
Browse files

Remove some dead code.

parent 271abde7
......@@ -822,8 +822,6 @@ extern char *__glXstrdup(const char *str);
extern const char __glXGLClientExtensions[];
extern char *__glXCombineExtensionStrings( const char *cext_string,
const char *sext_string );
/* Determine the internal API version */
extern int __glXGetInternalVersion(void);
......
......@@ -1501,69 +1501,6 @@ char *__glXInternalQueryServerString( Display *dpy, int opcode,
return buf;
}
#define SEPARATOR " "
/**
* Performs a intersection operation on two input extension strings.
*
* \param cext_string Pointer to a GL extension string.
* \param sext_string Pointer to a GL extension string.
* \returns A pointer to a new string that is the intersection of the two
* input strings.
*/
char *__glXCombineExtensionStrings( const char *cext_string, const char *sext_string )
{
int clen, slen;
char *combo_string, *token, *s1;
const char *s2, *end;
/*
** String can't be longer than min(cstring, sstring)
** pull tokens out of shortest string
** include space in combo_string for final separator and null terminator
*/
if ( (clen = strlen( cext_string)) > (slen = strlen( sext_string)) ) {
combo_string = (char *) Xmalloc( slen + 2 );
s1 = (char *) Xmalloc( slen + 2 ); strcpy( s1, sext_string );
s2 = cext_string;
} else {
combo_string = (char *) Xmalloc( clen + 2 );
s1 = (char *) Xmalloc( clen + 2 ); strcpy( s1, cext_string);
s2 = sext_string;
}
if (!combo_string || !s1) {
if (combo_string) Xfree(combo_string);
if (s1) Xfree(s1);
return NULL;
}
combo_string[0] = '\0';
/* Get first extension token */
token = strtok( s1, SEPARATOR);
while ( token != NULL ) {
/*
** if token in second string then save it
** beware of extension names which are prefixes of other extension names
*/
const char *p = s2;
end = p + strlen(p);
while (p < end) {
int n = strcspn(p, SEPARATOR);
if ((strlen(token) == n) && (strncmp(token, p, n) == 0)) {
combo_string = strcat( combo_string, token);
combo_string = strcat( combo_string, SEPARATOR);
}
p += (n + 1);
}
/* Get next extension token */
token = strtok( NULL, SEPARATOR);
}
Xfree(s1);
return combo_string;
}
const char *GLX_PREFIX(glXQueryExtensionsString)( Display *dpy, int screen )
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment