summaryrefslogtreecommitdiffstats
path: root/generic/regc_locale.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/regc_locale.c')
-rw-r--r--generic/regc_locale.c50
1 files changed, 28 insertions, 22 deletions
diff --git a/generic/regc_locale.c b/generic/regc_locale.c
index b08c300..438e821 100644
--- a/generic/regc_locale.c
+++ b/generic/regc_locale.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: regc_locale.c,v 1.17 2007/04/19 09:00:55 dkf Exp $
+ * RCS: @(#) $Id: regc_locale.c,v 1.18 2007/11/14 00:07:58 dkf Exp $
*/
/* ASCII character-name table */
@@ -614,6 +614,7 @@ static const chr printCharTable[] = {
- nmcces - how many distinct MCCEs are there?
^ static int nmcces(struct vars *);
*/
+#ifdef REGEXP_MCCE_ENABLED
static int
nmcces(
struct vars *v) /* context */
@@ -622,23 +623,27 @@ nmcces(
* No multi-character collating elements defined at the moment.
*/
return 0;
- }
-
+}
+#endif
+
/*
- nleaders - how many chrs can be first chrs of MCCEs?
^ static int nleaders(struct vars *);
*/
+#ifdef REGEXP_MCCE_ENABLED
static int
nleaders(
struct vars *v) /* context */
{
return 0;
}
+#endif
/*
- allmcces - return a cvec with all the MCCEs of the locale
^ static struct cvec *allmcces(struct vars *, struct cvec *);
*/
+#ifdef REGEXP_MCCE_ENABLED
static struct cvec *
allmcces(
struct vars *v, /* context */
@@ -646,6 +651,7 @@ allmcces(
{
return clearcvec(cv);
}
+#endif
/*
- element - map collating-element name to celt
@@ -719,7 +725,7 @@ range(
}
if (!cases) { /* easy version */
- cv = getcvec(v, 0, 1, 0);
+ cv = getcvec(v, 0, 1/*, 0*/);
NOERRN();
addrange(cv, a, b);
return cv;
@@ -733,7 +739,7 @@ range(
nchrs = (b - a + 1)*2 + 4;
- cv = getcvec(v, nchrs, 0, 0);
+ cv = getcvec(v, nchrs, 0/*, 0*/);
NOERRN();
for (c=a; c<=b; c++) {
@@ -792,7 +798,7 @@ eclass(
*/
if ((v->cflags&REG_FAKE) && c == 'x') {
- cv = getcvec(v, 4, 0, 0);
+ cv = getcvec(v, 4, 0/*, 0*/);
addchr(cv, (chr)'x');
addchr(cv, (chr)'y');
if (cases) {
@@ -809,7 +815,7 @@ eclass(
if (cases) {
return allcases(v, c);
}
- cv = getcvec(v, 1, 0, 0);
+ cv = getcvec(v, 1, 0/*, 0*/);
assert(cv != NULL);
addchr(cv, (chr)c);
return cv;
@@ -889,7 +895,7 @@ cclass(
switch((enum classes) index) {
case CC_PRINT:
- cv = getcvec(v, NUM_PRINT_CHAR, NUM_PRINT_RANGE, 0);
+ cv = getcvec(v, NUM_PRINT_CHAR, NUM_PRINT_RANGE/*, 0*/);
if (cv) {
for (i=0 ; (size_t)i<NUM_PRINT_CHAR ; i++) {
addchr(cv, printCharTable[i]);
@@ -901,7 +907,7 @@ cclass(
}
break;
case CC_ALNUM:
- cv = getcvec(v, NUM_ALPHA_CHAR, NUM_DIGIT_RANGE + NUM_ALPHA_RANGE, 0);
+ cv = getcvec(v, NUM_ALPHA_CHAR, NUM_DIGIT_RANGE + NUM_ALPHA_RANGE/*, 0*/);
if (cv) {
for (i=0 ; (size_t)i<NUM_ALPHA_CHAR ; i++) {
addchr(cv, alphaCharTable[i]);
@@ -917,7 +923,7 @@ cclass(
}
break;
case CC_ALPHA:
- cv = getcvec(v, NUM_ALPHA_CHAR, NUM_ALPHA_RANGE, 0);
+ cv = getcvec(v, NUM_ALPHA_CHAR, NUM_ALPHA_RANGE/*, 0*/);
if (cv) {
for (i=0 ; (size_t)i<NUM_ALPHA_RANGE ; i++) {
addrange(cv, alphaRangeTable[i].start,
@@ -929,23 +935,23 @@ cclass(
}
break;
case CC_ASCII:
- cv = getcvec(v, 0, 1, 0);
+ cv = getcvec(v, 0, 1/*, 0*/);
if (cv) {
addrange(cv, 0, 0x7f);
}
break;
case CC_BLANK:
- cv = getcvec(v, 2, 0, 0);
+ cv = getcvec(v, 2, 0/*, 0*/);
addchr(cv, '\t');
addchr(cv, ' ');
break;
case CC_CNTRL:
- cv = getcvec(v, 0, 2, 0);
+ cv = getcvec(v, 0, 2/*, 0*/);
addrange(cv, 0x0, 0x1f);
addrange(cv, 0x7f, 0x9f);
break;
case CC_DIGIT:
- cv = getcvec(v, 0, NUM_DIGIT_RANGE, 0);
+ cv = getcvec(v, 0, NUM_DIGIT_RANGE/*, 0*/);
if (cv) {
for (i=0 ; (size_t)i<NUM_DIGIT_RANGE ; i++) {
addrange(cv, digitRangeTable[i].start,
@@ -954,7 +960,7 @@ cclass(
}
break;
case CC_PUNCT:
- cv = getcvec(v, NUM_PUNCT_CHAR, NUM_PUNCT_RANGE, 0);
+ cv = getcvec(v, NUM_PUNCT_CHAR, NUM_PUNCT_RANGE/*, 0*/);
if (cv) {
for (i=0 ; (size_t)i<NUM_PUNCT_RANGE ; i++) {
addrange(cv, punctRangeTable[i].start,
@@ -975,7 +981,7 @@ cclass(
* someone comes up with a better arrangement!)
*/
- cv = getcvec(v, 0, 3, 0);
+ cv = getcvec(v, 0, 3/*, 0*/);
if (cv) {
addrange(cv, '0', '9');
addrange(cv, 'a', 'f');
@@ -983,7 +989,7 @@ cclass(
}
break;
case CC_SPACE:
- cv = getcvec(v, NUM_SPACE_CHAR, NUM_SPACE_RANGE, 0);
+ cv = getcvec(v, NUM_SPACE_CHAR, NUM_SPACE_RANGE/*, 0*/);
if (cv) {
for (i=0 ; (size_t)i<NUM_SPACE_RANGE ; i++) {
addrange(cv, spaceRangeTable[i].start,
@@ -995,7 +1001,7 @@ cclass(
}
break;
case CC_LOWER:
- cv = getcvec(v, NUM_LOWER_CHAR, NUM_LOWER_RANGE, 0);
+ cv = getcvec(v, NUM_LOWER_CHAR, NUM_LOWER_RANGE/*, 0*/);
if (cv) {
for (i=0 ; (size_t)i<NUM_LOWER_RANGE ; i++) {
addrange(cv, lowerRangeTable[i].start,
@@ -1007,7 +1013,7 @@ cclass(
}
break;
case CC_UPPER:
- cv = getcvec(v, NUM_UPPER_CHAR, NUM_UPPER_RANGE, 0);
+ cv = getcvec(v, NUM_UPPER_CHAR, NUM_UPPER_RANGE/*, 0*/);
if (cv) {
for (i=0 ; (size_t)i<NUM_UPPER_RANGE ; i++) {
addrange(cv, upperRangeTable[i].start,
@@ -1019,7 +1025,7 @@ cclass(
}
break;
case CC_GRAPH:
- cv = getcvec(v, NUM_GRAPH_CHAR, NUM_GRAPH_RANGE, 0);
+ cv = getcvec(v, NUM_GRAPH_CHAR, NUM_GRAPH_RANGE/*, 0*/);
if (cv) {
for (i=0 ; (size_t)i<NUM_GRAPH_RANGE ; i++) {
addrange(cv, graphRangeTable[i].start,
@@ -1057,10 +1063,10 @@ allcases(
tc = Tcl_UniCharToTitle((chr)c);
if (tc != uc) {
- cv = getcvec(v, 3, 0, 0);
+ cv = getcvec(v, 3, 0/*, 0*/);
addchr(cv, tc);
} else {
- cv = getcvec(v, 2, 0, 0);
+ cv = getcvec(v, 2, 0/*, 0*/);
}
addchr(cv, lc);
if (lc != uc) {