aboutsummaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-15 19:36:37 +0200
committerMax Kellermann <max@duempel.org>2008-10-15 19:36:37 +0200
commit047043d2a8ee4482a845ed9860dbf4cd01540eef (patch)
treeec8542ca3ea28e255bd857f01b7b8672fb029da5 /src/utils.c
parent7366191f0d0d5c50ee051a3b60fc31ad86bce721 (diff)
locate: use g_utf8_casefold() instead of string_toupper()
string_toupper() and strDupToUpper() were not able to deal with character sets other than US-ASCII. Use GLib's g_utf8_casefold() for strings.
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/utils.c b/src/utils.c
index 9cd2190e..57d1f30f 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -24,7 +24,6 @@
#include <assert.h>
#include <string.h>
-#include <ctype.h>
#include <sys/types.h>
#include <pwd.h>
#include <fcntl.h>
@@ -45,23 +44,6 @@ char *myFgets(char *buffer, int bufferSize, FILE * fp)
return ret;
}
-char *string_toupper(char *str)
-{
- int i = strlen(str);
- char *ret = str;
-
- for (; --i >= 0; ++str)
- *str = toupper((int)(*str));
-
- return ret;
-
-}
-
-char *strDupToUpper(char *str)
-{
- return string_toupper(xstrdup(str));
-}
-
void stripReturnChar(char *string)
{
while (string && (string = strchr(string, '\n'))) {