From 553e011320798af097e8de95a1e2a1d2ed6a1a3e Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sun, 21 Jan 2007 22:47:36 +0000 Subject: 23118: improve sorting to make it work with locales --- Src/Zle/compcore.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Src/Zle/compcore.c') diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c index 2259db01a..3e4f690f3 100644 --- a/Src/Zle/compcore.c +++ b/Src/Zle/compcore.c @@ -3028,7 +3028,7 @@ matchcmp(Cmatch *a, Cmatch *b) if ((*b)->disp && !((*b)->flags & CMF_MORDER)) return 1; - return strbpcmp(&((*a)->str), &((*b)->str)); + return zstrbcmp((*a)->str, (*b)->str); } /* This tests whether two matches are equal (would produce the same @@ -3077,8 +3077,9 @@ makearray(LinkList l, int type, int flags, int *np, int *nlp, int *llp) char **ap, **bp, **cp; /* Now sort the array (it contains strings). */ - qsort((void *) rp, n, sizeof(char *), - (int (*) _((const void *, const void *)))strbpcmp); + strmetasort((char **)rp, SORTIT_IGNORING_BACKSLASHES | + (isset(NUMERICGLOBSORT) ? SORTIT_NUMERICALLY : 0), + NULL); /* And delete the ones that occur more than once. */ for (ap = cp = (char **) rp; *ap; ap++) { -- cgit 1.4.1