summaryrefslogtreecommitdiff
path: root/src/libstdbuf.c
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2010-10-01 11:44:05 -0600
committerEric Blake <eblake@redhat.com>2010-10-01 15:24:39 -0600
commit2c14ec962a46ae53d39149112ae6902ed771d497 (patch)
tree12e5f290f2d543e6155894bf6339a398768030ee /src/libstdbuf.c
parent9069af45e691d1252c727da66aa4f3f3c7f1ea29 (diff)
downloadcoreutils-2c14ec962a46ae53d39149112ae6902ed771d497.tar.xz
stat: optimize and translate default format strings
Yes, this patch intentionally leaks the results of default_format(), since it is called only twice, and since the results are in scope until main() exits. Not worth the extra code to pacify valgrind. * src/stat.c (main): Hoist default format computation out of loop. (do_statfs, do_stat): Move default format generation... (default_format): ...into new function. Allocate the result in pieces, rather than repeating mostly-similar chunks. Allow translation of verbose format. Pass a second format to do_stat, for the one aspect of the default format that is conditional on file type. * NEWS: Document the translation aspect.
Diffstat (limited to 'src/libstdbuf.c')
0 files changed, 0 insertions, 0 deletions