]> git.ipfire.org Git - thirdparty/coreutils.git/commit
maint: simplify printing of md5sum file names
authorPádraig Brady <P@draigBrady.com>
Fri, 1 Nov 2013 16:14:44 +0000 (16:14 +0000)
committerPádraig Brady <P@draigBrady.com>
Fri, 1 Nov 2013 22:34:24 +0000 (22:34 +0000)
commit4d94e65d06772c41b8ac11e8b55f749c57c18f5b
tree833345afed768a30fa9486a683253201c80167f5
parent979f59f77c69535ff1fb916f73a88658db04df0b
maint: simplify printing of md5sum file names

* src/md5sum.c (main): Add a comment as to why we continue
to escape names that do not have '\n' but do have '\\' chars.
(print_filename): Use the predetermined boolean to decide
whether to escape or not, so that in the common case we
can output the file name directly, rather than inspecting each char.
* tests/misc/md5sum.pl: Add case to show '\\' chars cause escaping.
* tests/misc/sha1sum.pl: Likewise.
src/md5sum.c
tests/misc/md5sum.pl
tests/misc/sha1sum.pl