Glibification again.
authorLaurent Monin <geeqie@norz.org>
Sat, 21 Feb 2009 20:43:35 +0000 (20:43 +0000)
committerLaurent Monin <geeqie@norz.org>
Sat, 21 Feb 2009 20:43:35 +0000 (20:43 +0000)
src/cache_maint.c
src/editors.c
src/filedata.c
src/filefilter.c
src/format_raw.c
src/pan-item.c
src/remote.c
src/search.c
src/ui_fileops.c
src/ui_pathsel.c

index f4274cd..1717cf7 100644 (file)
@@ -182,7 +182,7 @@ static gint cache_maintain_home_cb(gpointer data)
                        while (work)
                                {
                                FileData *fd_list = work->data;
-                               gchar *path_buf = strdup(fd_list->path);
+                               gchar *path_buf = g_strdup(fd_list->path);
                                gchar *dot;
 
                                dot = extension_find_dot(path_buf);
index b6301d7..2632dcd 100644 (file)
@@ -318,7 +318,7 @@ static void editor_read_desktop_dir(const gchar *path)
                gchar *namel = dir->d_name;
                size_t len = strlen(namel);
                
-               if (len > 8 && strncasecmp(namel + len - 8, ".desktop", 8) == 0)
+               if (len > 8 && g_ascii_strncasecmp(namel + len - 8, ".desktop", 8) == 0)
                        {
                        gchar *name = path_to_utf8(namel);
                        gchar *dpath = g_build_filename(path, name, NULL);
@@ -594,7 +594,7 @@ static gchar *editor_command_path_parse(const FileData *fd, PathType type, const
                                work = work->next;
 
                                if (strcmp(ext, "*") == 0 ||
-                                   strcasecmp(ext, fd->extension) == 0)
+                                   g_ascii_strcasecmp(ext, fd->extension) == 0)
                                        {
                                        p = fd->path;
                                        break;
@@ -606,7 +606,7 @@ static gchar *editor_command_path_parse(const FileData *fd, PathType type, const
                                        FileData *sfd = work2->data;
                                        work2 = work2->next;
 
-                                       if (strcasecmp(ext, sfd->extension) == 0)
+                                       if (g_ascii_strcasecmp(ext, sfd->extension) == 0)
                                                {
                                                p = sfd->path;
                                                break;
index cf089fb..d4a3570 100644 (file)
@@ -395,7 +395,7 @@ static void file_data_check_sidecars(FileData *fd)
 
                work = work->next;
 
-               if (strcasecmp(ext, fd->extension) == 0)
+               if (g_ascii_strcasecmp(ext, fd->extension) == 0)
                        {
                        new_fd = fd; /* processing the original file */
                        }
@@ -687,7 +687,7 @@ gchar *file_data_get_sidecar_path(FileData *fd, gboolean existing_only)
                {
                FileData *sfd = work->data;
                work = work->next;
-               if (strcasecmp(sfd->extension, ".xmp") == 0)
+               if (g_ascii_strcasecmp(sfd->extension, ".xmp") == 0)
                        {
                        sidecar_path = g_strdup(sfd->path);
                        break;
@@ -728,7 +728,7 @@ static gint sidecar_file_priority(const gchar *path)
                gchar *ext = work->data;
                
                work = work->next;
-               if (strcasecmp(extension, ext) == 0) return i;
+               if (g_ascii_strcasecmp(extension, ext) == 0) return i;
                i++;
        }
        return 0;
@@ -1880,7 +1880,7 @@ gint file_data_verify_ci(FileData *fd)
                        const gchar *dest_ext = extension_from_path(fd->change->dest);
                        if (!dest_ext) dest_ext = "";
 
-                       if (strcasecmp(fd->extension, dest_ext) != 0)
+                       if (g_ascii_strcasecmp(fd->extension, dest_ext) != 0)
                                {
                                ret |= CHANGE_WARN_CHANGED_EXT;
                                DEBUG_1("Change checked: source and destination have different extensions: %s -> %s", fd->path, fd->change->dest);
index fe14a3a..74dc29c 100644 (file)
@@ -285,9 +285,9 @@ GList *filter_to_list(const gchar *extensions)
                
                ext = g_strndup(b, l);
                
-               if (strcasecmp(ext, "%image") == 0) file_class = FORMAT_CLASS_IMAGE;
-               else if (strcasecmp(ext, "%raw") == 0) file_class = FORMAT_CLASS_RAWIMAGE;
-               else if (strcasecmp(ext, "%meta") == 0) file_class = FORMAT_CLASS_META;
+               if (g_ascii_strcasecmp(ext, "%image") == 0) file_class = FORMAT_CLASS_IMAGE;
+               else if (g_ascii_strcasecmp(ext, "%raw") == 0) file_class = FORMAT_CLASS_RAWIMAGE;
+               else if (g_ascii_strcasecmp(ext, "%meta") == 0) file_class = FORMAT_CLASS_META;
                
                if (file_class == -1) 
                        {
@@ -383,7 +383,7 @@ static gboolean filter_name_find(GList *filter, const gchar *name)
                if (ln >= lf)
                        {
                        /* FIXME: utf8 */
-                       if (strncasecmp(name + ln - lf, filter, lf) == 0) return TRUE;
+                       if (g_ascii_strncasecmp(name + ln - lf, filter, lf) == 0) return TRUE;
                        }
                work = work->next;
                }
index 33de8ff..d2488c7 100644 (file)
@@ -321,7 +321,7 @@ gint format_raw_img_exif_offsets_fd(gint fd, const gchar *path,
                while (!match && format_raw_list[i].magic_pattern)
                        {
                        if (format_raw_list[i].extension &&
-                           strcasecmp(format_raw_list[i].extension, ext) == 0)
+                           g_ascii_strcasecmp(format_raw_list[i].extension, ext) == 0)
                                {
                                match = TRUE;
                                }
index 09abc70..d782d24 100644 (file)
@@ -762,7 +762,7 @@ static GList *pan_item_find_by_path_l(GList *list, GList *search_list,
                                        }
                                else if (ignore_case)
                                        {
-                                       if (strcasecmp(path, pi->fd->name) == 0) match = TRUE;
+                                       if (g_ascii_strcasecmp(path, pi->fd->name) == 0) match = TRUE;
                                        }
                                else
                                        {
index 87d6223..8b0a504 100644 (file)
@@ -429,7 +429,7 @@ static void gr_slideshow_delay(const gchar *text, gpointer data)
 {
        gdouble n;
 
-       n = strtod(text, NULL);
+       n = g_ascii_strtod(text, NULL);
        if (n < SLIDESHOW_MIN_SECONDS || n > SLIDESHOW_MAX_SECONDS)
                {
                printf_term("Remote slideshow delay out of range (%.1f to %.1f)\n",
index 7291771..322f2e5 100644 (file)
@@ -1702,7 +1702,7 @@ static gint search_file_next(SearchData *sd)
                                }
                        else
                                {
-                               match = (strcasecmp(fd->name, sd->search_name) == 0);
+                               match = (g_ascii_strcasecmp(fd->name, sd->search_name) == 0);
                                }
                        }
                else if (sd->match_name == SEARCH_MATCH_CONTAINS)
@@ -1809,7 +1809,7 @@ static gint search_file_next(SearchData *sd)
                                        haystack = list;
                                        while (haystack && !found)
                                                {
-                                               found = (strcasecmp((gchar *)needle->data,
+                                               found = (g_ascii_strcasecmp((gchar *)needle->data,
                                                                    (gchar *)haystack->data) == 0);
                                                haystack = haystack->next;
                                                }
@@ -1828,7 +1828,7 @@ static gint search_file_next(SearchData *sd)
                                        haystack = list;
                                        while (haystack && !found)
                                                {
-                                               found = (strcasecmp((gchar *)needle->data,
+                                               found = (g_ascii_strcasecmp((gchar *)needle->data,
                                                                    (gchar *)haystack->data) == 0);
                                                haystack = haystack->next;
                                                }
@@ -1847,7 +1847,7 @@ static gint search_file_next(SearchData *sd)
                                        haystack = list;
                                        while (haystack && !found)
                                                {
-                                               found = (strcasecmp((gchar *)needle->data,
+                                               found = (g_ascii_strcasecmp((gchar *)needle->data,
                                                                    (gchar *)haystack->data) == 0);
                                                haystack = haystack->next;
                                                }
index cfe05f3..f4c1b40 100644 (file)
@@ -781,7 +781,7 @@ gint file_extension_match(const gchar *path, const gchar *ext)
        e = strlen(ext);
 
        /* FIXME: utf8 */
-       return (p > e && strncasecmp(path + p - e, ext, e) == 0);
+       return (p > e && g_ascii_strncasecmp(path + p - e, ext, e) == 0);
 }
 
 gchar *remove_extension_from_path(const gchar *path)
index 42c2194..22f1aeb 100644 (file)
@@ -136,7 +136,7 @@ static gint dest_check_filter(const gchar *filter, const gchar *file)
                if (*f_ptr != '\0' && f_ptr[1] == ' ') f_ptr++; /* skip space immediately after separator */
                f_ptr++;
                /* FIXME: utf8 */
-               if (l >= i && strncasecmp(file + l - i, strt_ptr, i) == 0) return TRUE;
+               if (l >= i && g_ascii_strncasecmp(file + l - i, strt_ptr, i) == 0) return TRUE;
                }
        return FALSE;
 }