From b1fa65091437c2d55fc1ef4512e244340583510a Mon Sep 17 00:00:00 2001 From: Lephenixnoir Date: Tue, 18 May 2021 11:51:49 +0200 Subject: [PATCH] ctype: test and fix character conversion functions (DONE) Some shenanigans with the scope of variables in block expressions. --- STATUS | 2 +- include/ctype.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/STATUS b/STATUS index b9e6796..da431ea 100644 --- a/STATUS +++ b/STATUS @@ -32,7 +32,7 @@ DONE: Function/symbol/macro is defined, builds, links, and is tested 7.4 7.4.1 is*: DONE - 7.4.2 to*: TEST + 7.4.2 to*: DONE 7.5 7.5.2 EDOM EILSEQ ERANGE: DONE diff --git a/include/ctype.h b/include/ctype.h index e250f24..372de13 100644 --- a/include/ctype.h +++ b/include/ctype.h @@ -94,13 +94,13 @@ extern int toupper(int c); }) #define tolower(c) ({ \ - int __c = (c); \ - isupper(__c) ? (__c | 0x20) : __c; \ + int __c0 = (c); \ + isupper(__c0) ? (__c0 | 0x20) : __c0; \ }) #define toupper(c) ({ \ - int __c = (c); \ - islower(__c) ? (__c & 0xdf) : __c; \ + int __c0 = (c); \ + islower(__c0) ? (__c0 & 0xdf) : __c0; \ }) #endif /*__CTYPE_H__*/