diff options
author | Rosen Penev | 2019-08-08 21:12:55 +0200 |
---|---|---|
committer | Rosen Penev | 2019-08-08 21:12:55 +0200 |
commit | 76b680b1a9deeb83c310115fd96fd6f51d37cd53 (patch) | |
tree | 919d26df133940b7863e1072e2539da12bf4a9f3 /include | |
parent | tests: update fdisk output (diff) | |
download | kernel-qcow2-util-linux-76b680b1a9deeb83c310115fd96fd6f51d37cd53.tar.gz kernel-qcow2-util-linux-76b680b1a9deeb83c310115fd96fd6f51d37cd53.tar.xz kernel-qcow2-util-linux-76b680b1a9deeb83c310115fd96fd6f51d37cd53.zip |
Remove isascii usage
There is a c_isascii function that can be used.
isascii is deprecated and not available with some libcs like uClibc-ng
where it can be compile time disabled.
Diffstat (limited to 'include')
-rw-r--r-- | include/carefulputc.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/carefulputc.h b/include/carefulputc.h index 54a02bfef..f1c03566d 100644 --- a/include/carefulputc.h +++ b/include/carefulputc.h @@ -10,13 +10,15 @@ #include <string.h> #include <ctype.h> +#include "cctype.h" + static inline int fputc_careful(int c, FILE *fp, const char fail) { int ret; if (isprint(c) || c == '\a' || c == '\t' || c == '\r' || c == '\n') ret = putc(c, fp); - else if (!isascii(c)) + else if (!c_isascii(c)) ret = fprintf(fp, "\\%3o", (unsigned char)c); else { ret = putc(fail, fp); |