From a082293830f6cea5f347fa0ad55f92db4b4082a7 Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Thu, 31 Oct 1996 07:22:48 +0000 Subject: [PATCH] Replace collate_range_cmp call with its code --- bin/csh/glob.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/bin/csh/glob.c b/bin/csh/glob.c index 0d48231c3085..f02424741ee6 100644 --- a/bin/csh/glob.c +++ b/bin/csh/glob.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: glob.c,v 1.4 1996/08/12 02:08:43 ache Exp $ + * $Id: glob.c,v 1.5 1996/08/12 21:32:15 ache Exp $ */ #ifndef lint @@ -39,8 +39,8 @@ static char sccsid[] = "@(#)glob.c 8.1 (Berkeley) 5/31/93"; #include #include -#include #include +#include #include #include #include @@ -94,7 +94,24 @@ static int pmatch __P((Char *, Char *)); static void pword __P((void)); static void psave __P((int)); static void backeval __P((Char *, bool)); +static int collate_range_cmp __P((int, int)); +static int collate_range_cmp (c1, c2) + int c1, c2; +{ + static char s1[2], s2[2]; + int ret; + + c1 &= UCHAR_MAX; + c2 &= UCHAR_MAX; + if (c1 == c2) + return (0); + s1[0] = c1; + s2[0] = c2; + if ((ret = strcoll(s1, s2)) != 0) + return (ret); + return (c1 - c2); +} static Char * globtilde(nv, s)