diff options
author | Oliver Kiddle <opk@zsh.org> | 2022-12-16 23:22:33 +0100 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2022-12-16 23:28:10 +0100 |
commit | a73c705b0c864a9ce042fca6e72e0c92d4ad8237 (patch) | |
tree | 6ea60926217bfc66140a8f60bbc8c37f36396ea2 /Src/lex.c | |
parent | 7fb6c133bfdf445b4478897adc142ed7d07b5fd6 (diff) | |
download | zsh-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.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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) { |