Replace collate_range_cmp with its code (GNU variant)

This commit is contained in:
Andrey A. Chernov 1996-10-31 05:14:27 +00:00
parent 7a15396329
commit 1b142f3fd2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=19279

View File

@ -125,10 +125,6 @@ init_syntax_once ()
#endif /* not emacs */
#ifdef __FreeBSD__
#include <locale.h>
#endif
/* Get the interface, including the syntax bits. */
#include "regex.h"
@ -1117,6 +1113,23 @@ static boolean group_in_compile_stack _RE_ARGS((compile_stack_type
compile_stack,
regnum_t regnum));
#ifdef __FreeBSD__
static int collate_range_cmp (a, b)
int a, b;
{
int r;
static char s[2][2];
if ((unsigned char)a == (unsigned char)b)
return 0;
s[0][0] = a;
s[1][0] = b;
if ((r = strcoll(s[0], s[1])) == 0)
r = (unsigned char)a - (unsigned char)b;
return r;
}
#endif
/* `regex_compile' compiles PATTERN (of length SIZE) according to SYNTAX.
Returns one of error codes defined in `regex.h', or zero for success.