The shells are very restrictive about variable names, only [:alnum:]
chars are allowed (and alphabetic chars as the first char). The
library will replace "bad" chars with "_". The char '%' at the end is
replaced by _PCT.
Addresses: https://github.com/karelzak/util-linux/issues/1201
Signed-off-by: Karel Zak <kzak@redhat.com>
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.
This change is important for commands linked with libsmartcols (e.g. lsblk(1))
to make it more safe for crazy scenarios like
eval $(lsblk --fs --pairs /dev/sdb1)
where the command returns NAME="value" from filesystem LABELS (etc.)
Signed-off-by: Karel Zak <kzak@redhat.com>
New version of comparisions does the same thing as the old without being
quite as difficult to understand.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>