diff options
author | Jakob Kaivo <jkk@ung.org> | 2019-02-28 21:10:57 -0500 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2019-02-28 21:10:57 -0500 |
commit | 08d8fd2767733d893380ebf5c8a4743dd371528d (patch) | |
tree | b3aff9fe38cd3cd94d99ca51b76e3de0f34037f2 /src/ctype/tolower.c | |
parent | b4409255ad7f446ad0a3386dc3669bbf270bb327 (diff) |
fix ctype functions in the C/POSIX locale
Diffstat (limited to 'src/ctype/tolower.c')
-rw-r--r-- | src/ctype/tolower.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ctype/tolower.c b/src/ctype/tolower.c index 793de6bb..7ef5057a 100644 --- a/src/ctype/tolower.c +++ b/src/ctype/tolower.c @@ -1,4 +1,5 @@ #include <ctype.h> +#include "stdio.h" #include "limits.h" #include "nonstd/assert.h" #include "nonstd/ctype.h" @@ -14,6 +15,10 @@ int tolower(int c) RETURN_FAILURE(ARGUMENT(c), ARGUMENT(c) was not an uppercase letter or it has no equivalent lowercase letter); */ + if (c == EOF) { + return EOF; + } + return map[c]; } |