about summary refs log tree commit diff
path: root/Src/input.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/input.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/input.c')
-rw-r--r--Src/input.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Src/input.c b/Src/input.c
index 9898a7177..d55b05696 100644
--- a/Src/input.c
+++ b/Src/input.c
@@ -220,7 +220,7 @@ shingetchar(void)
     int nread, rsize = isset(SHINSTDIN) ? 1 : SHINBUFSIZE;
 
     if (shinbufptr < shinbufendptr)
-	return STOUC(*shinbufptr++);
+	return (unsigned char) *shinbufptr++;
 
     shinbufreset();
 #ifdef USE_LSEEK
@@ -242,7 +242,7 @@ shingetchar(void)
 		zerr("lseek(%d, %d): %e", SHIN, -(nread - rsize), errno);
 	} else
 	    shinbufendptr = shinbuffer + nread;
-	return STOUC(*shinbufptr++);
+	return (unsigned char) *shinbufptr++;
     }
 #endif
     for (;;) {
@@ -259,7 +259,7 @@ shingetchar(void)
     }
     if (shinbufendptr == shinbuffer)
         return -1;
-    return STOUC(*shinbufptr++);
+    return (unsigned char) *shinbufptr++;
 }
 
 /* Read a line from SHIN.  Convert tokens and   *
@@ -328,7 +328,7 @@ ingetc(void)
 	if (inbufleft) {
 	    inbufleft--;
 	    inbufct--;
-	    if (itok(lastc = STOUC(*inbufptr++)))
+	    if (itok(lastc = (unsigned char) *inbufptr++))
 		continue;
 	    if (((inbufflags & INP_LINENO) || !strin) && lastc == '\n')
 		lineno++;