diff options
author | Stef Walter <stef@memberwebs.com> | 2004-04-21 17:37:06 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2004-04-21 17:37:06 +0000 |
commit | ff76efc3e5e1b0e4ca3b10b7402406f619509bba (patch) | |
tree | c3b1e49235f67eabd22d31ebfc14934743b70858 /common/compat.c | |
parent | 01430fca169c1b8d7b1b4f1bdd529aa6bc4be80b (diff) |
Initial Import
Diffstat (limited to 'common/compat.c')
-rw-r--r-- | common/compat.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/common/compat.c b/common/compat.c new file mode 100644 index 0000000..6a4b914 --- /dev/null +++ b/common/compat.c @@ -0,0 +1,30 @@ + +#include "usuals.h" +#include "compat.h" + +#ifndef HAVE_REALLOCF + +void* reallocf(void* ptr, size_t size) +{ + void* ret = realloc(ptr, size); + + if(!ret && size) + free(ptr); + + return ret; +} + +#endif + +#ifndef HAVE_STRLWR +char* strlwr(char* s) +{ + char* t = s; + while(*t) + { + *t = tolower(*t); + t++; + } + return s; +} +#endif |