summaryrefslogtreecommitdiff
path: root/common/compat.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/compat.c')
-rw-r--r--common/compat.c29
1 files changed, 29 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 */