| 32 | #include <assert.h> |
| 33 | |
| 34 | int hasext(const char *exts, const char *ext) // from cube2, zlib licensed |
| 35 | { |
| 36 | int len = strlen(ext); |
| 37 | if(len) for(const char *cur = exts; (cur = strstr(cur, ext)); cur += len) |
| 38 | { |
| 39 | if((cur == exts || cur[-1] == ' ') && (cur[len] == ' ' || !cur[len])) return 1; |
| 40 | } |
| 41 | return 0; |
| 42 | } |
| 43 | |
| 44 | int main(int argc, char *argv[]) |
| 45 | { |