summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2006-04-04 19:42:19 +0000
committerStef Walter <stef@memberwebs.com>2006-04-04 19:42:19 +0000
commit1fe43cb40fb54412528b7538718a457d2167c603 (patch)
tree7eef0a4db45b1dea94d6820273b859db0cab45dd /common
parent6972f27080656ad3d2601fcb921c9a2389ac08a5 (diff)
Add support for simpler create options.
Diffstat (limited to 'common')
-rw-r--r--common/compat.c29
-rw-r--r--common/compat.h8
2 files changed, 37 insertions, 0 deletions
diff --git a/common/compat.c b/common/compat.c
index 67d3997..c6138d0 100644
--- a/common/compat.c
+++ b/common/compat.c
@@ -232,6 +232,7 @@ atexitv(voidfunc func, void* data)
#endif /* HAVE_ATEXITV */
+
#ifndef HAVE_XCALLOC
void*
@@ -244,3 +245,31 @@ xcalloc(size_t size)
}
#endif /* HAVE_XCALLOC */
+
+
+#ifndef HAVE_STRLWR
+
+void strlwr(char* data)
+{
+ while(*data)
+ {
+ *data = tolower(*data);
+ data++;
+ }
+}
+
+#endif /* HAVE_STRLWR */
+
+
+#ifndef HAVE_STRUPR
+
+void strupr(char* data)
+{
+ while(*data)
+ {
+ *data = toupper(*data);
+ data++;
+ }
+}
+
+#endif /* HAVE_STRUPR */
diff --git a/common/compat.h b/common/compat.h
index 12ffad6..8aaef66 100644
--- a/common/compat.h
+++ b/common/compat.h
@@ -77,4 +77,12 @@ void atexitv(void (*func)(void*), void* data);
void* xcalloc(size_t size);
#endif
+#ifndef HAVE_STRLWR
+void strlwr(char* data);
+#endif
+
+#ifndef HAVE_STRUPR
+void strupr(char* data);
+#endif
+
#endif /* __COMPAT_H__ */