X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/halibut/blobdiff_plain/bb9e7835935e7a2098f2ce27964342d4c4557e3f..3e030063e831da0af7bdb8d12f2f25a5224ba0be:/misc.c diff --git a/misc.c b/misc.c index 12333e7..aa05878 100644 --- a/misc.c +++ b/misc.c @@ -194,10 +194,25 @@ int compare_wordlists(word *a, word *b) { } } +#ifdef HAS_WCSCOLL + { + wchar_t a[2], b[2]; + int ret; + + a[0] = pos[0].c; + b[0] = pos[1].c; + a[1] = b[1] = L'\0'; + + ret = wcscoll(a, b); + if (ret) + return ret; + } +#else if (pos[0].c < pos[1].c) return -1; else if (pos[0].c > pos[1].c) return +1; +#endif if (!pos[0].c) break; /* they're equal */