summaryrefslogtreecommitdiffstats
path: root/generic/regc_locale.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2007-02-20 23:24:02 (GMT)
committernijtmans <nijtmans>2007-02-20 23:24:02 (GMT)
commit6ad116f411885307607d5bebcd6a987ebfafff40 (patch)
tree2fc3ee74f9099dbc66a0d0d154665561411fd654 /generic/regc_locale.c
parent7ae3600bbf1577f02278766a0cca9d439a933bf9 (diff)
downloadtcl-6ad116f411885307607d5bebcd6a987ebfafff40.zip
tcl-6ad116f411885307607d5bebcd6a987ebfafff40.tar.gz
tcl-6ad116f411885307607d5bebcd6a987ebfafff40.tar.bz2
various "const" additions, in line with TIP #27
Diffstat (limited to 'generic/regc_locale.c')
-rw-r--r--generic/regc_locale.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/generic/regc_locale.c b/generic/regc_locale.c
index e6eb12a..a3b82d4 100644
--- a/generic/regc_locale.c
+++ b/generic/regc_locale.c
@@ -9,14 +9,14 @@
* 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.14 2006/07/20 06:17:38 das Exp $
+ * RCS: @(#) $Id: regc_locale.c,v 1.15 2007/02/20 23:24:04 nijtmans Exp $
*/
/* ASCII character-name table */
static struct cname {
- char *name;
- char code;
+ const char *name;
+ const char code;
} cnames[] = {
{"NUL", '\0'},
{"SOH", '\001'},
@@ -660,7 +660,7 @@ element(
struct cname *cn;
size_t len;
Tcl_DString ds;
- CONST char *np;
+ const char *np;
/*
* Generic: one-chr names stand for themselves.
@@ -830,15 +830,15 @@ cclass(
size_t len;
struct cvec *cv = NULL;
Tcl_DString ds;
- CONST char *np;
- char **namePtr;
+ const char *np;
+ const char **namePtr;
int i, index;
/*
* The following arrays define the valid character class names.
*/
- static char *classNames[] = {
+ static const char *classNames[] = {
"alnum", "alpha", "ascii", "blank", "cntrl", "digit", "graph",
"lower", "print", "punct", "space", "upper", "xdigit", NULL
};
@@ -1075,11 +1075,11 @@ allcases(
* 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(
- CONST chr *x, CONST chr *y, /* strings to compare */
+ 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));
@@ -1091,11 +1091,11 @@ cmp(
* 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(
- CONST chr *x, CONST chr *y, /* strings to compare */
+ const chr *x, const chr *y, /* strings to compare */
size_t len) /* exact length of comparison */
{
for (; len > 0; len--, x++, y++) {