1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-28 08:02:54 +00:00

Convert to newly aded collate compare function

This commit is contained in:
Andrey A. Chernov 1996-08-12 18:56:38 +00:00
parent 79deb12410
commit acd9f20695
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=17553
2 changed files with 6 additions and 5 deletions

View File

@ -1,7 +1,7 @@
# @(#)Makefile 8.1 (Berkeley) 6/4/93
LIB=compat
CFLAGS+=-DLIBC_SCCS -DSYSLIBC_SCCS -I${.CURDIR}/../libc/locale
CFLAGS+=-DLIBC_SCCS -DSYSLIBC_SCCS
AINC= -I${.CURDIR}/../libc/${MACHINE}
NOPIC=

View File

@ -32,13 +32,14 @@
* precedence is structured in regular expressions. Serious changes in
* regular-expression syntax might require a total rethink.
*/
#include <limits.h>
#include <locale.h>
#include <regexp.h>
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include "regmagic.h"
#include "collate.h"
/*
* The "internal use only" fields in regexp.h are present to pass info from
@ -507,12 +508,12 @@ int *flagp;
else {
class = UCHARAT(regparse-2);
classend = UCHARAT(regparse);
if (__collcmp(class, classend) > 0)
if (collate_range_cmp(class, classend) > 0)
FAIL("invalid [] range");
for (i = 0; i <= UCHAR_MAX; i++)
if ( i != class
&& __collcmp(class, i) <= 0
&& __collcmp(i, classend) <= 0
&& collate_range_cmp(class, i) <= 0
&& collate_range_cmp(i, classend) <= 0
)
regc(i);
regparse++;