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.c118
1 files changed, 59 insertions, 59 deletions
diff --git a/generic/regc_locale.c b/generic/regc_locale.c
index 05f2c7b0..32cb28b 100644
--- a/generic/regc_locale.c
+++ b/generic/regc_locale.c
@@ -12,9 +12,9 @@
/* ASCII character-name table */
-static CONST struct cname {
- CONST char *name;
- CONST char code;
+static const struct cname {
+ const char *name;
+ const char code;
} cnames[] = {
{"NUL", '\0'},
{"SOH", '\001'},
@@ -133,7 +133,7 @@ typedef struct crange {
* Unicode: alphabetic characters.
*/
-static CONST crange alphaRangeTable[] = {
+static const crange alphaRangeTable[] = {
{0x41, 0x5a}, {0x61, 0x7a}, {0xc0, 0xd6}, {0xd8, 0xf6},
{0xf8, 0x2c1}, {0x2c6, 0x2d1}, {0x2e0, 0x2e4}, {0x370, 0x374},
{0x37a, 0x37d}, {0x388, 0x38a}, {0x38e, 0x3a1}, {0x3a3, 0x3f5},
@@ -218,7 +218,7 @@ static CONST crange alphaRangeTable[] = {
#define NUM_ALPHA_RANGE (sizeof(alphaRangeTable)/sizeof(crange))
-static CONST chr alphaCharTable[] = {
+static const chr alphaCharTable[] = {
0xaa, 0xb5, 0xba, 0x2ec, 0x2ee, 0x376, 0x377, 0x386, 0x38c,
0x559, 0x66e, 0x66f, 0x6d5, 0x6e5, 0x6e6, 0x6ee, 0x6ef, 0x6ff,
0x710, 0x7b1, 0x7f4, 0x7f5, 0x7fa, 0x81a, 0x824, 0x828, 0x93d,
@@ -249,7 +249,7 @@ static CONST chr alphaCharTable[] = {
* Unicode: control characters.
*/
-static CONST crange controlRangeTable[] = {
+static const crange controlRangeTable[] = {
{0x7f, 0x9f}, {0x600, 0x603}, {0x200b, 0x200f}, {0x202a, 0x202e},
{0x2060, 0x2064}, {0x206a, 0x206f}, {0xe000, 0xf8ff}, {0xfff9, 0xfffb}
#if MAX_UTF_CHAR > 4
@@ -259,7 +259,7 @@ static CONST crange controlRangeTable[] = {
#define NUM_CONTROL_RANGE (sizeof(controlRangeTable)/sizeof(crange))
-static CONST chr controlCharTable[] = {
+static const chr controlCharTable[] = {
0xad, 0x6dd, 0x70f, 0x17b4, 0x17b5, 0xfeff
#if MAX_UTF_CHAR > 4
,0x110bd, 0xe0001
@@ -272,7 +272,7 @@ static CONST chr controlCharTable[] = {
* Unicode: decimal digit characters.
*/
-static CONST crange digitRangeTable[] = {
+static const crange digitRangeTable[] = {
{0x30, 0x39}, {0x660, 0x669}, {0x6f0, 0x6f9}, {0x7c0, 0x7c9},
{0x966, 0x96f}, {0x9e6, 0x9ef}, {0xa66, 0xa6f}, {0xae6, 0xaef},
{0xb66, 0xb6f}, {0xbe6, 0xbef}, {0xc66, 0xc6f}, {0xce6, 0xcef},
@@ -297,7 +297,7 @@ static CONST crange digitRangeTable[] = {
* Unicode: punctuation characters.
*/
-static CONST crange punctRangeTable[] = {
+static const crange punctRangeTable[] = {
{0x21, 0x23}, {0x25, 0x2a}, {0x2c, 0x2f}, {0x5b, 0x5d},
{0x55a, 0x55f}, {0x66a, 0x66d}, {0x700, 0x70d}, {0x7f7, 0x7f9},
{0x830, 0x83e}, {0xf04, 0xf12}, {0xf3a, 0xf3d}, {0xfd0, 0xfd4},
@@ -319,7 +319,7 @@ static CONST crange punctRangeTable[] = {
#define NUM_PUNCT_RANGE (sizeof(punctRangeTable)/sizeof(crange))
-static CONST chr punctCharTable[] = {
+static const chr punctCharTable[] = {
0x3a, 0x3b, 0x3f, 0x40, 0x5f, 0x7b, 0x7d, 0xa1, 0xab,
0xb7, 0xbb, 0xbf, 0x37e, 0x387, 0x589, 0x58a, 0x5be, 0x5c0,
0x5c3, 0x5c6, 0x5f3, 0x5f4, 0x609, 0x60a, 0x60c, 0x60d, 0x61b,
@@ -344,13 +344,13 @@ static CONST chr punctCharTable[] = {
* Unicode: white space characters.
*/
-static CONST crange spaceRangeTable[] = {
+static const crange spaceRangeTable[] = {
{0x9, 0xd}, {0x2000, 0x200a}
};
#define NUM_SPACE_RANGE (sizeof(spaceRangeTable)/sizeof(crange))
-static CONST chr spaceCharTable[] = {
+static const chr spaceCharTable[] = {
0x20, 0xa0, 0x1680, 0x180e, 0x2028, 0x2029, 0x202f, 0x205f, 0x3000
};
@@ -360,7 +360,7 @@ static CONST chr spaceCharTable[] = {
* Unicode: lowercase characters.
*/
-static CONST crange lowerRangeTable[] = {
+static const crange lowerRangeTable[] = {
{0x61, 0x7a}, {0xdf, 0xf6}, {0xf8, 0xff}, {0x17e, 0x180},
{0x199, 0x19b}, {0x1bd, 0x1bf}, {0x233, 0x239}, {0x24f, 0x293},
{0x295, 0x2af}, {0x37b, 0x37d}, {0x3ac, 0x3ce}, {0x3d5, 0x3d7},
@@ -385,7 +385,7 @@ static CONST crange lowerRangeTable[] = {
#define NUM_LOWER_RANGE (sizeof(lowerRangeTable)/sizeof(crange))
-static CONST chr lowerCharTable[] = {
+static const chr lowerCharTable[] = {
0xaa, 0xb5, 0xba, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10b,
0x10d, 0x10f, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11b, 0x11d,
0x11f, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12b, 0x12d, 0x12f,
@@ -459,7 +459,7 @@ static CONST chr lowerCharTable[] = {
* Unicode: uppercase characters.
*/
-static CONST crange upperRangeTable[] = {
+static const crange upperRangeTable[] = {
{0x41, 0x5a}, {0xc0, 0xd6}, {0xd8, 0xde}, {0x189, 0x18b},
{0x18e, 0x191}, {0x196, 0x198}, {0x1b1, 0x1b3}, {0x1f6, 0x1f8},
{0x243, 0x246}, {0x388, 0x38a}, {0x391, 0x3a1}, {0x3a3, 0x3ab},
@@ -482,7 +482,7 @@ static CONST crange upperRangeTable[] = {
#define NUM_UPPER_RANGE (sizeof(upperRangeTable)/sizeof(crange))
-static CONST chr upperCharTable[] = {
+static const chr upperCharTable[] = {
0x100, 0x102, 0x104, 0x106, 0x108, 0x10a, 0x10c, 0x10e, 0x110,
0x112, 0x114, 0x116, 0x118, 0x11a, 0x11c, 0x11e, 0x120, 0x122,
0x124, 0x126, 0x128, 0x12a, 0x12c, 0x12e, 0x130, 0x132, 0x134,
@@ -557,7 +557,7 @@ static CONST chr upperCharTable[] = {
* Unicode: unicode print characters excluding space.
*/
-static CONST crange graphRangeTable[] = {
+static const crange graphRangeTable[] = {
{0x21, 0x7e}, {0xa1, 0xac}, {0xae, 0x377}, {0x37a, 0x37e},
{0x384, 0x38a}, {0x38e, 0x3a1}, {0x3a3, 0x527}, {0x531, 0x556},
{0x559, 0x55f}, {0x561, 0x587}, {0x591, 0x5c7}, {0x5d0, 0x5ea},
@@ -669,7 +669,7 @@ static CONST crange graphRangeTable[] = {
#define NUM_GRAPH_RANGE (sizeof(graphRangeTable)/sizeof(crange))
-static CONST chr graphCharTable[] = {
+static const chr graphCharTable[] = {
0x38c, 0x589, 0x58a, 0x85e, 0x98f, 0x990, 0x9b2, 0x9c7, 0x9c8,
0x9d7, 0x9dc, 0x9dd, 0xa0f, 0xa10, 0xa32, 0xa33, 0xa35, 0xa36,
0xa38, 0xa39, 0xa3c, 0xa47, 0xa48, 0xa51, 0xa5e, 0xab2, 0xab3,
@@ -699,18 +699,18 @@ static CONST chr graphCharTable[] = {
/*
- element - map collating-element name to celt
- ^ static celt element(struct vars *, CONST chr *, CONST chr *);
+ ^ static celt element(struct vars *, const chr *, const chr *);
*/
static celt
-element(v, startp, endp)
- struct vars *v; /* context */
- CONST chr *startp; /* points to start of name */
- CONST chr *endp; /* points just past end of name */
+element(
+ struct vars *v, /* context */
+ const chr *startp, /* points to start of name */
+ const chr *endp) /* points just past end of name */
{
- CONST struct cname *cn;
+ const struct cname *cn;
size_t len;
Tcl_DString ds;
- CONST char *np;
+ const char *np;
/*
* Generic: one-chr names stand for themselves.
@@ -753,11 +753,11 @@ element(v, startp, endp)
^ static struct cvec *range(struct vars *, celt, celt, int);
*/
static struct cvec *
-range(v, a, b, cases)
- struct vars *v; /* context */
- celt a; /* range start */
- celt b; /* range end, might equal a */
- int cases; /* case-independent? */
+range(
+ struct vars *v, /* context */
+ celt a, /* range start */
+ celt b, /* range end, might equal a */
+ int cases) /* case-independent? */
{
int nchrs;
struct cvec *cv;
@@ -810,8 +810,8 @@ range(v, a, b, cases)
^ static int before(celt, celt);
*/
static int /* predicate */
-before(x, y)
- celt x, y; /* collating elements */
+before(
+ celt x, celt y) /* collating elements */
{
if (x < y) {
return 1;
@@ -825,11 +825,11 @@ before(x, y)
^ static struct cvec *eclass(struct vars *, celt, int);
*/
static struct cvec *
-eclass(v, c, cases)
- struct vars *v; /* context */
- celt c; /* Collating element representing
- * the equivalence class. */
- int cases; /* all cases? */
+eclass(
+ struct vars *v, /* context */
+ celt c, /* Collating element representing the
+ * equivalence class. */
+ int cases) /* all cases? */
{
struct cvec *cv;
@@ -864,27 +864,27 @@ eclass(v, c, cases)
/*
- cclass - supply cvec for a character class
* Must include case counterparts on request.
- ^ static struct cvec *cclass(struct vars *, CONST chr *, CONST chr *, int);
+ ^ static struct cvec *cclass(struct vars *, const chr *, const chr *, int);
*/
static struct cvec *
-cclass(v, startp, endp, cases)
- struct vars *v; /* context */
- CONST chr *startp; /* where the name starts */
- CONST chr *endp; /* just past the end of the name */
- int cases; /* case-independent? */
+cclass(
+ struct vars *v, /* context */
+ const chr *startp, /* where the name starts */
+ const chr *endp, /* just past the end of the name */
+ int cases) /* case-independent? */
{
size_t len;
struct cvec *cv = NULL;
Tcl_DString ds;
- CONST char *np;
- CONST char *CONST *namePtr;
+ const char *np;
+ const char *const *namePtr;
int i, index;
/*
* The following arrays define the valid character class names.
*/
- static CONST char *CONST classNames[] = {
+ static const char *const classNames[] = {
"alnum", "alpha", "ascii", "blank", "cntrl", "digit", "graph",
"lower", "print", "punct", "space", "upper", "xdigit", NULL
};
@@ -1103,9 +1103,9 @@ cclass(v, startp, endp, cases)
^ static struct cvec *allcases(struct vars *, pchr);
*/
static struct cvec *
-allcases(v, pc)
- struct vars *v; /* context */
- pchr pc; /* character to get case equivs of */
+allcases(
+ struct vars *v, /* context */
+ pchr pc) /* character to get case equivs of */
{
struct cvec *cv;
chr c = (chr)pc;
@@ -1134,12 +1134,12 @@ allcases(v, pc)
* Note that it does not need to report anything except equal/unequal.
* Note also that the length is exact, and the comparison should not
* stop at embedded NULs!
- ^ static int cmp(CONST chr *, CONST chr *, size_t);
+ ^ static int cmp(const chr *, const chr *, size_t);
*/
-static int /* 0 for equal, nonzero for unequal */
-cmp(x, y, len)
- CONST chr *x, *y; /* strings to compare */
- size_t len; /* exact length of comparison */
+static int /* 0 for equal, nonzero for unequal */
+cmp(
+ const chr *x, const chr *y, /* strings to compare */
+ size_t len) /* exact length of comparison */
{
return memcmp(VS(x), VS(y), len*sizeof(chr));
}
@@ -1150,12 +1150,12 @@ cmp(x, y, len)
* Note that it does not need to report anything except equal/unequal.
* Note also that the length is exact, and the comparison should not
* stop at embedded NULs!
- ^ static int casecmp(CONST chr *, CONST chr *, size_t);
+ ^ static int casecmp(const chr *, const chr *, size_t);
*/
-static int /* 0 for equal, nonzero for unequal */
-casecmp(x, y, len)
- CONST chr *x, *y; /* strings to compare */
- size_t len; /* exact length of comparison */
+static int /* 0 for equal, nonzero for unequal */
+casecmp(
+ const chr *x, const chr *y, /* strings to compare */
+ size_t len) /* exact length of comparison */
{
for (; len > 0; len--, x++, y++) {
if ((*x!=*y) && (Tcl_UniCharToLower(*x) != Tcl_UniCharToLower(*y))) {