diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2005-02-25 10:20:38 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2005-02-25 10:20:38 +0000 |
commit | ddd172ebe2c625d4e894c66f511e803b50b20f78 (patch) | |
tree | 30a3462e5c63f91fbb30f5d3eb47bbc250ff9568 /Src/utils.c | |
parent | 29b6b82ade1a38df6a3227ba45f4eafc0b5d6fe0 (diff) | |
download | zsh-ddd172ebe2c625d4e894c66f511e803b50b20f78.tar.gz zsh-ddd172ebe2c625d4e894c66f511e803b50b20f78.tar.xz zsh-ddd172ebe2c625d4e894c66f511e803b50b20f78.zip |
20863: fix history (i)searching for Unicode
Diffstat (limited to 'Src/utils.c')
-rw-r--r-- | Src/utils.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/Src/utils.c b/Src/utils.c index 236b898f5..469361c33 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -2925,36 +2925,6 @@ ztrcmp(unsigned char const *s1, unsigned char const *s2) return 1; } -/* Return zero if the metafied string s and the non-metafied, * - * len-long string r are the same. Return -1 if r is a prefix * - * of s. Return 1 if r is the lowercase version of s. Return * - * 2 is r is the lowercase prefix of s and return 3 otherwise. */ - -/**/ -mod_export int -metadiffer(char const *s, char const *r, int len) -{ - int l = len; - - while (l-- && *s && *r++ == (*s == Meta ? *++s ^ 32 : *s)) - s++; - if (*s && l < 0) - return -1; - if (l < 0) - return 0; - if (!*s) - return 3; - s -= len - l - 1; - r -= len - l; - while (len-- && *s && *r++ == tulower(*s == Meta ? *++s ^ 32 : *s)) - s++; - if (*s && len < 0) - return 2; - if (len < 0) - return 1; - return 3; -} - /* Return the unmetafied length of a metafied string. */ /**/ |