about summary refs log tree commit diff
path: root/Src/Zle/compcore.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/Zle/compcore.c
parent7fb6c133bfdf445b4478897adc142ed7d07b5fd6 (diff)
downloadzsh-a73c705b0c864a9ce042fca6e72e0c92d4ad8237.tar.gz
zsh-a73c705b0c864a9ce042fca6e72e0c92d4ad8237.tar.xz
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/Zle/compcore.c')
-rw-r--r--Src/Zle/compcore.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c
index 4ac5d089f..64a860fa3 100644
--- a/Src/Zle/compcore.c
+++ b/Src/Zle/compcore.c
@@ -2898,9 +2898,9 @@ add_match_data(int alt, char *str, char *orig, Cline line,
 		*t++ = '$';
 		*t++ = '\'';
 		*t++ = '\\';
-		*t++ = '0' + ((STOUC(curchar) >> 6) & 7);
-		*t++ = '0' + ((STOUC(curchar) >> 3) & 7);
-		*t++ = '0' + (STOUC(curchar) & 7);
+		*t++ = '0' + (((unsigned char) curchar >> 6) & 7);
+		*t++ = '0' + (((unsigned char) curchar >> 3) & 7);
+		*t++ = '0' + ((unsigned char) curchar & 7);
 		*t++ = '\'';
 	    } while (cnt == MB_INCOMPLETE && fs < fe);
 	    /* Scanning restarts from the spot after the char we skipped. */