HomeFreeBSD

Simplify LS_COLWIDTHS processing

Description

Simplify LS_COLWIDTHS processing

The previous version normalized the width list (replaced empty fields
with "0") just to be able to use sscanf() on the string.

It is much simpler to just parse the string as-is.

The clearing of f_notabs is preserved for the case that less than 9
width values have been defined, but I do not understand the rationale
for this particular condition. E.g., LS_COLWIDTHS="::::::::" will be
counted as 9 defined fields (may clear f_notabs) but is no different
fron LS_COLWIDTHS="" with regard to the field width (and that does not
clear f_notabs, since there are less than 9 fields).

Details

Provenance
seAuthored on Dec 26 2020, 9:10 PM
Parents
rGdbb25cbe55cf: Adjust to display more than 999 sleeping threads
Branches
Unknown
Tags
Unknown