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);
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);
work = work->next;
if (strcmp(ext, "*") == 0 ||
- strcasecmp(ext, fd->extension) == 0)
+ g_ascii_strcasecmp(ext, fd->extension) == 0)
{
p = fd->path;
break;
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;
work = work->next;
- if (strcasecmp(ext, fd->extension) == 0)
+ if (g_ascii_strcasecmp(ext, fd->extension) == 0)
{
new_fd = fd; /* processing the original file */
}
{
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;
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;
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);
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)
{
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;
}
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;
}
}
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
{
{
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",
}
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)
haystack = list;
while (haystack && !found)
{
- found = (strcasecmp((gchar *)needle->data,
+ found = (g_ascii_strcasecmp((gchar *)needle->data,
(gchar *)haystack->data) == 0);
haystack = haystack->next;
}
haystack = list;
while (haystack && !found)
{
- found = (strcasecmp((gchar *)needle->data,
+ found = (g_ascii_strcasecmp((gchar *)needle->data,
(gchar *)haystack->data) == 0);
haystack = haystack->next;
}
haystack = list;
while (haystack && !found)
{
- found = (strcasecmp((gchar *)needle->data,
+ found = (g_ascii_strcasecmp((gchar *)needle->data,
(gchar *)haystack->data) == 0);
haystack = haystack->next;
}
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)
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;
}