summaryrefslogtreecommitdiffstats
path: root/include/carefulputc.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove isascii usageRosen Penev2019-08-081-1/+3
| | | | | | | 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.
* Fix typo in carefulputc.hNik Nyby2017-10-251-3/+3
| | | | Signed-off-by: Nik Nyby <nikolas@gnu.org>
* libsmartcols: Corrected JSON escapingKarel Zak2016-08-021-0/+80
| | | | | | | | | Based on patch set https://github.com/karelzak/util-linux/pull/331 from Fordi. Addresses: https://github.com/karelzak/util-linux/issues/330 Co-Author: Bryan Elliott <fordiman@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: keep JSON field names lower-caseKarel Zak2015-06-051-2/+8
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* include/carefulputc: encode also ' and $ in fputs_quoted() outputKarel Zak2014-11-271-0/+2
| | | | | | | | | | | 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>
* include: simplify fputc_careful() in carefulputc.hSami Kerola2014-09-191-10/+6Star
| | | | | | | 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>
* include/carefulputc: remove a duplicate includeBenno Schulenberg2014-05-061-4/+5
| | | | | | Also tweak a comment. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* include/carefulputc: cleanup and add fputs_{quoted,nonblank}()Karel Zak2014-04-031-3/+42
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* include: carefulput: print determined char when unprintable char is foundSami Kerola2013-08-231-2/+2
| | | | | | This is done to allow reuse of the functin in last(1). Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* Imported from util-linux-2.13-pre1 tarball.Karel Zak2006-12-071-0/+29