diff options
author | Daniel Dunbar <daniel@zuster.org> | 2005-04-02 19:36:57 +0400 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2005-04-02 19:36:57 +0400 |
commit | 24c9f650565e6a016cca9d45c7daee94dfcb7130 (patch) | |
tree | 89becedccd6ed77790f6c5c5e35280d9a4e560b4 /source/blender/blenlib/intern/winstuff.c | |
parent | bdb86d7c6765724d297e7aa97dec4c0cc7d2bae9 (diff) |
- got tired of str[n]casecmp not declared warnings
- added BLI_str[n]casecmp, use instead of regular versions
- rewrote BLI_str[n]casecmp to not be stupid
Diffstat (limited to 'source/blender/blenlib/intern/winstuff.c')
-rw-r--r-- | source/blender/blenlib/intern/winstuff.c | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c index 960bc69d797..34b9d9cf9b9 100644 --- a/source/blender/blenlib/intern/winstuff.c +++ b/source/blender/blenlib/intern/winstuff.c @@ -99,64 +99,6 @@ void RegisterBlendExtension(char * str) { } } -static void strlower (char *str) { - while (*str) { - *str= tolower(*str); - str++; - } -} - -static void strnlower (char *str, int n) { - while (n>0 && *str) { - *str= tolower(*str); - str++; - n--; - } -} - -#ifndef FREE_WINDOWS -int strcasecmp (char *s1, char *s2) { - char *st1, *st2; - int r; - - st1= MEM_mallocN(strlen(s1)+1, "temp string"); - strcpy(st1, s1); - - st2= MEM_mallocN(strlen(s2)+1, "temp string"); - strcpy(st2, s2); - - strlower(st1); - strlower(st2); - r= strcmp (st1, st2); - - MEM_freeN(st1); - MEM_freeN(st2); - - return r; -} - -int strncasecmp (char *s1, char *s2, int n) { - char *st1, *st2; - int r; - - st1= MEM_mallocN(n, "temp string"); - memcpy(st1, s1, n); - - st2= MEM_mallocN(n, "temp string"); - memcpy(st2, s2, n); - - strnlower(st1, n); - strnlower(st2, n); - - r= strncmp (st1, st2, n); - - MEM_freeN(st1); - MEM_freeN(st2); - - return r; -} -#endif - DIR *opendir (const char *path) { if (GetFileAttributes(path) & FILE_ATTRIBUTE_DIRECTORY) { DIR *newd= MEM_mallocN(sizeof(DIR), "opendir"); |