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:
parent
79deb12410
commit
acd9f20695
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=17553
@ -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=
|
||||
|
||||
|
@ -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++;
|
||||
|
Loading…
Reference in New Issue
Block a user