]> git.ipfire.org Git - thirdparty/coreutils.git/commit
tail: prettyname cleanup
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 29 Jul 2025 20:22:41 +0000 (13:22 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 4 Aug 2025 02:48:05 +0000 (19:48 -0700)
commitd584545299fb5d7581d77e5627c6735e743d6e77
tree2e08e87b26a8660dd6cac476cf11ffde54db4435
parent10aa908ebd8d487f0dbbc77abb317a94d33f460d
tail: prettyname cleanup

* src/tail.c: Use ‘prettyname’ consistently as the identifier
for a prettified file name, as opposed to ‘pretty_filename’,
‘pretty_name’, and ‘name’.  This makes the code easier to follow.
(struct File_spec): New member prettyname.
(pretty_name): Remove.
All uses of pretty_name (f) replaced by f->prettyname.
(close_fd, fremote): Accept struct File_spec, not name.
All callers changed.
(main): Initialize the new prettyname member.
This is simpler/smaller than calling pretty_name everywhere.
src/tail.c