summaryrefslogtreecommitdiff
path: root/Src/Zle/zle_utils.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/zle_utils.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/Zle/zle_utils.c')
-rw-r--r--Src/Zle/zle_utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/Zle/zle_utils.c b/Src/Zle/zle_utils.c
index 3d9017dcf..2536e9faa 100644
--- a/Src/Zle/zle_utils.c
+++ b/Src/Zle/zle_utils.c
@@ -1265,7 +1265,7 @@ bindztrdup(char *str)
char *buf, *ptr, *ret;
for(ptr = str; *ptr; ptr++) {
- c = *ptr == Meta ? STOUC(*++ptr) ^ 32 : STOUC(*ptr);
+ c = *ptr == Meta ? (unsigned char) *++ptr ^ 32 : (unsigned char) *ptr;
if(c & 0x80) {
len += 3;
c &= 0x7f;
@@ -1279,7 +1279,7 @@ bindztrdup(char *str)
}
ptr = buf = zalloc(len);
for(; *str; str++) {
- c = *str == Meta ? STOUC(*++str) ^ 32 : STOUC(*str);
+ c = *str == Meta ? (unsigned char) *++str ^ 32 : (unsigned char) *str;
if(c & 0x80) {
*ptr++ = '\\';
*ptr++ = 'M';