Pierre Pronchery 5228fe88d0 Avoid compilation warnings from ctype(3) helpers
Characters should be casted as unsigned before use in functions from
<ctype.h>. Otherwise the compiler treats 8-bit characters (eg UTF-8) as
negative values (since it expects signed integers) and they no longer
match the comparison tables. Worse, the character 0xff gets interpreted
as -1 (like EOF). In turn, it helps to explicitly cast the result as a
signed integer, since this is what is expected. Characters in the range
0x80-0xff do keep their original values.

See the manual page for ctype(3) for more details (eg from NetBSD)
2018-06-12 14:01:22 -04:00
..
2016-01-10 22:48:07 -06:00
2016-05-07 21:59:48 -05:00
2016-01-17 13:09:15 -05:00
2018-04-25 03:47:56 +02:00
2016-01-01 03:02:17 +00:00
2016-01-01 03:02:17 +00:00