From 8a587a147ae3d6ad9794e3677cb539e565085091 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 10 May 2015 23:33:15 +0100 Subject: [PATCH] sh: const in ctypes --- Applications/V7/cmd/sh/ctype.c | 4 ++-- Applications/V7/cmd/sh/ctype.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Applications/V7/cmd/sh/ctype.c b/Applications/V7/cmd/sh/ctype.c index 26f59e00..3f8a969c 100644 --- a/Applications/V7/cmd/sh/ctype.c +++ b/Applications/V7/cmd/sh/ctype.c @@ -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, diff --git a/Applications/V7/cmd/sh/ctype.h b/Applications/V7/cmd/sh/ctype.h index d375a31b..0c8fa023 100644 --- a/Applications/V7/cmd/sh/ctype.h +++ b/Applications/V7/cmd/sh/ctype.h @@ -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)"E)==0 && _ctype1[c]&(T_SPC)) @@ -79,7 +79,7 @@ extern char _ctype1[]; #define subchar(c) (((c)"E)==0 && _ctype1[c]&(T_SUB|T_QOT)) #define escchar(c) (((c)"E)==0 && _ctype1[c]&(T_ESC)) -extern char _ctype2[]; +extern const char _ctype2[]; #define digit(c) (((c)"E)==0 && _ctype2[c]&(T_DIG)) #define fngchar(c) (((c)"E)==0 && _ctype2[c]&(T_FNG)) -- 2.34.1