sh: const in ctypes
authorAlan Cox <alan@linux.intel.com>
Sun, 10 May 2015 22:33:15 +0000 (23:33 +0100)
committerAlan Cox <alan@linux.intel.com>
Sun, 10 May 2015 22:33:15 +0000 (23:33 +0100)
Applications/V7/cmd/sh/ctype.c
Applications/V7/cmd/sh/ctype.h

index 26f59e0..3f8a969 100644 (file)
@@ -12,7 +12,7 @@
 
 #include       "defs.h"
 
-char _ctype1[] = {
+const char _ctype1[] = {
 /*     000     001     002     003     004     005     006     007     */
        _EOF, 0, 0, 0, 0, 0, 0, 0,
 
@@ -61,7 +61,7 @@ char _ctype1[] = {
 };
 
 
-char _ctype2[] = {
+const char _ctype2[] = {
 /*     000     001     002     003     004     005     006     007     */
        0, 0, 0, 0, 0, 0, 0, 0,
 
index d375a31..0c8fa02 100644 (file)
@@ -68,7 +68,7 @@
 #define _IDCH  (T_IDC|T_DIG)
 #define _META  (T_SPC|T_DIP|T_MET|T_EOR)
 
-extern char _ctype1[];
+extern const char _ctype1[];
 
 /* nb these args are not call by value !!!! */
 #define        space(c)        (((c)&QUOTE)==0 && _ctype1[c]&(T_SPC))
@@ -79,7 +79,7 @@ extern char _ctype1[];
 #define subchar(c)     (((c)&QUOTE)==0 && _ctype1[c]&(T_SUB|T_QOT))
 #define escchar(c)     (((c)&QUOTE)==0 && _ctype1[c]&(T_ESC))
 
-extern char _ctype2[];
+extern const char _ctype2[];
 
 #define        digit(c)        (((c)&QUOTE)==0 && _ctype2[c]&(T_DIG))
 #define fngchar(c)     (((c)&QUOTE)==0 && _ctype2[c]&(T_FNG))