Commit f4549e0c authored by Thomas Roessler's avatar Thomas Roessler

Use strcoll for the file browser. From David Champion.

parent 0f408e23
...@@ -75,7 +75,7 @@ static int browser_compare_subject (const void *a, const void *b) ...@@ -75,7 +75,7 @@ static int browser_compare_subject (const void *a, const void *b)
struct folder_file *pa = (struct folder_file *) a; struct folder_file *pa = (struct folder_file *) a;
struct folder_file *pb = (struct folder_file *) b; struct folder_file *pb = (struct folder_file *) b;
int r = mutt_strcmp (pa->name, pb->name); int r = mutt_strcoll (pa->name, pb->name);
return ((BrowserSort & SORT_REVERSE) ? -r : r); return ((BrowserSort & SORT_REVERSE) ? -r : r);
} }
......
...@@ -584,6 +584,11 @@ size_t mutt_strlen(const char *a) ...@@ -584,6 +584,11 @@ size_t mutt_strlen(const char *a)
return a ? strlen (a) : 0; return a ? strlen (a) : 0;
} }
int mutt_strcoll(const char *a, const char *b)
{
return strcoll(NONULL(a), NONULL(b));
}
const char *mutt_stristr (const char *haystack, const char *needle) const char *mutt_stristr (const char *haystack, const char *needle)
{ {
const char *p, *q; const char *p, *q;
......
...@@ -107,6 +107,7 @@ int mutt_strcasecmp (const char *, const char *); ...@@ -107,6 +107,7 @@ int mutt_strcasecmp (const char *, const char *);
int mutt_strcmp (const char *, const char *); int mutt_strcmp (const char *, const char *);
int mutt_strncasecmp (const char *, const char *, size_t); int mutt_strncasecmp (const char *, const char *, size_t);
int mutt_strncmp (const char *, const char *, size_t); int mutt_strncmp (const char *, const char *, size_t);
int mutt_strcoll (const char *, const char *);
int safe_open (const char *, int); int safe_open (const char *, int);
int safe_symlink (const char *, const char *); int safe_symlink (const char *, const char *);
int safe_rename (const char *, const char *); int safe_rename (const char *, const char *);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment