| 24 | |
| 25 | #if defined(__linux__) |
| 26 | GLboolean gluCheckExtension(const GLubyte *extension, const GLubyte *extensions) |
| 27 | { |
| 28 | const GLubyte *start; |
| 29 | GLubyte *where, *terminator; |
| 30 | |
| 31 | /* Extension names should not have spaces. */ |
| 32 | where = (GLubyte *)strchr((const char *)extension, ' '); |
| 33 | if (where || *extension == '\0') return 0; |
| 34 | /* It takes a bit of care to be fool-proof about parsing the |
| 35 | OpenGL extensions string. Don't be fooled by sub-strings, |
| 36 | etc. */ |
| 37 | start = extensions; |
| 38 | for (;;) |
| 39 | { |
| 40 | where = (GLubyte *)strstr((const char *)start, (const char *)extension); |
| 41 | if (!where) break; |
| 42 | terminator = where + strlen((const char *)extension); |
| 43 | if (where == start || *(where - 1) == ' ') |
| 44 | if (*terminator == ' ' || *terminator == '\0') return 1; |
| 45 | start = terminator; |
| 46 | } |
| 47 | return 0; |
| 48 | } |
| 49 | #endif |
| 50 | |
| 51 |
no outgoing calls
no test coverage detected