summaryrefslogtreecommitdiff
path: root/src/skey/skeyutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/skey/skeyutil.c')
-rw-r--r--src/skey/skeyutil.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/skey/skeyutil.c b/src/skey/skeyutil.c
new file mode 100644
index 0000000..b9e56dc
--- /dev/null
+++ b/src/skey/skeyutil.c
@@ -0,0 +1,24 @@
+#include <config.h>
+
+#include <ctype.h>
+
+#include <glib.h>
+
+#include "skeyutil.h"
+
+void skey_sevenbit(char *s)
+{
+ char *p;
+
+ for (p = s; *p; p++)
+ *p &= 0x7f;
+}
+
+void skey_lowcase(char *s)
+{
+ char *p;
+
+ for (p = s; *p; p++)
+ if (g_ascii_isupper(*p))
+ *p = g_ascii_tolower(*p);
+}