Audit cols(1)
1) Refactor manpage. 2) De-globalize local values. 3) update usage(). 4) sort local variable declarations. 5) fix wrong argument in strtonum (3 -> 1). 6) argc-argv style, boolean style. 7) check bytes > 0 before accessing b.lines[i][bytes - 1] relying on len only makes sense but let's not push it. 7) don't break on maxlen > (chars - 1) / 2. This didn't even make sense. 8) _correctly_ calculate cols and rows in a readable way. 9) Rewrite loop over rows and cols in a readable way and using putchar in a loop instead of printf-magic or fputs where not necessary.
This commit is contained in:
Reference in New Issue
Block a user