From b27eca618acf30cf59bedc41d0d099cf6f3e28b2 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 11 Oct 2003 10:13:20 +0000 Subject: [PATCH] Added const to chartype tables. Also removed _c_collate and _c_order which didn't exist since the last glacial era. --- lib/chartype.h | 2 +- lib/str_ctype.c | 2 +- lib/str_upper.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/chartype.h b/lib/chartype.h index 6ef0ccd0..ef08205e 100644 --- a/lib/chartype.h +++ b/lib/chartype.h @@ -24,7 +24,7 @@ #define _C_WORD (_C_ALNUM | _C_INNER) #define _C_WSTART (_C_ALPHA | _C_INNER) -extern unsigned char _c_cat[256], _c_upper[256], _c_collate[256], _c_order[256]; +extern const unsigned char _c_cat[256], _c_upper[256]; #define Category(x) (_c_cat[(unsigned char)(x)]) #define Ccat(x,y) (Category(x) & y) diff --git a/lib/str_ctype.c b/lib/str_ctype.c index f92fd3df..73c00c0e 100644 --- a/lib/str_ctype.c +++ b/lib/str_ctype.c @@ -9,7 +9,7 @@ #include "lib/chartype.h" -unsigned char _c_cat[256] = { +const unsigned char _c_cat[256] = { #define CHAR(code,upper,unacc,acc,cat) cat, #include "lib/charmap.h" #undef CHAR diff --git a/lib/str_upper.c b/lib/str_upper.c index e058850c..4253b881 100644 --- a/lib/str_upper.c +++ b/lib/str_upper.c @@ -9,7 +9,7 @@ #include "lib/chartype.h" -unsigned char _c_upper[256] = { +const unsigned char _c_upper[256] = { #define CHAR(code,upper,unacc,acc,cat) upper, #include "lib/charmap.h" #undef CHAR -- 2.39.2