Audit nl(1)
1) Refactor the manpage to use the num-syntax and concise wording. 2) Build format instead of having a list of static strings. 3) BUGFIX: if (!buf[0] || buf[0] == '\n') Process last-read-line properly. 4) BUGFIX: In case we hit a formatting line, print a newline instead of just dropping it. 5) Use a switch instead of having spaghetti-cases. 6) Don't use printf-magic but explicitly do a putchar(' ')-loop. 7) Update usage(), indent properly. 8) BUGFIX: strchr is not NULL when type[0] is \0. Check for \0 separately beforehand. 9) Reorder arg.h-cases for better readability.
This commit is contained in:
Reference in New Issue
Block a user