diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2020-10-02 06:31:11 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2020-10-02 06:31:46 +0200 |
commit | 7f919025ee56cfbdc5b3e6cab88d43cbdcae58e1 (patch) | |
tree | 73cebe4a6879a33e14299a5287032cf36dcfb009 | |
parent | 1a76b2032e6d18d9f95d9d0bb98edc26023c8618 (diff) | |
download | liberty-7f919025ee56cfbdc5b3e6cab88d43cbdcae58e1.tar.gz liberty-7f919025ee56cfbdc5b3e6cab88d43cbdcae58e1.tar.xz liberty-7f919025ee56cfbdc5b3e6cab88d43cbdcae58e1.zip |
Add iscntrl_ascii()
It's too easy to miss the DEL character.
-rw-r--r-- | liberty.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -2673,6 +2673,12 @@ strncasecmp_ascii (const char *a, const char *b, size_t n) } static bool +iscntrl_ascii (int c) +{ + return (c >= 0 && c < 32) || c == 0x7f; +} + +static bool isalpha_ascii (int c) { c &= ~32; |