summaryrefslogtreecommitdiff
path: root/Src/lex.c
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2022-12-16 23:22:33 +0100
committerOliver Kiddle <opk@zsh.org>2022-12-16 23:28:10 +0100
commita73c705b0c864a9ce042fca6e72e0c92d4ad8237 (patch)
tree6ea60926217bfc66140a8f60bbc8c37f36396ea2 /Src/lex.c
parent7fb6c133bfdf445b4478897adc142ed7d07b5fd6 (diff)
downloadzsh-a73c705b0c864a9ce042fca6e72e0c92d4ad8237.tar.gz
zsh-a73c705b0c864a9ce042fca6e72e0c92d4ad8237.zip
51212: remove STOUC() macro
This served as a workaround for ancient compilers where casts to unsigned char were broken.
Diffstat (limited to 'Src/lex.c')
-rw-r--r--Src/lex.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Src/lex.c b/Src/lex.c
index e2f8bcfb1..15da85a93 100644
--- a/Src/lex.c
+++ b/Src/lex.c
@@ -423,7 +423,7 @@ initlextabs(void)
for (t0 = 0; lx2[t0]; t0++)
lexact2[(int)lx2[t0]] = t0;
lexact2['&'] = LX2_BREAK;
- lexact2[STOUC(Meta)] = LX2_META;
+ lexact2[(unsigned char) Meta] = LX2_META;
lextok2['*'] = Star;
lextok2['?'] = Quest;
lextok2['{'] = Inbrace;
@@ -722,7 +722,7 @@ gettok(void)
}
return peek;
}
- switch (lexact1[STOUC(c)]) {
+ switch (lexact1[(unsigned char) c]) {
case LX1_BKSLASH:
d = hgetc();
if (d == '\n')
@@ -960,8 +960,8 @@ gettokstr(int c, int sub)
if (inbl && !in_brace_param && !pct)
act = LX2_BREAK;
else {
- act = lexact2[STOUC(c)];
- c = lextok2[STOUC(c)];
+ act = lexact2[(unsigned char) c];
+ c = lextok2[(unsigned char) c];
}
switch (act) {
case LX2_BREAK:
@@ -1263,7 +1263,7 @@ gettokstr(int c, int sub)
continue;
} else {
add(Bnull);
- if (c == STOUC(Meta)) {
+ if (c == (unsigned char) Meta) {
c = hgetc();
#ifdef DEBUG
if (lexstop) {