[OpenAFS-devel] bos listusers NPERLINE

Derrick J Brashear shadow@dementia.org
Mon, 19 Mar 2007 10:34:28 -0400 (EDT)


On Mon, 19 Mar 2007, Harald Barth wrote:

>
> bos has this stupid code where it makes multiple line output from the
> result of "bos listusers" if there are more that 10 of them. Can we
> just nuke this stupidity and let other Unix utilities care about
> terminal width, line breaks and such stuff?
>
> from bos.c:
>
> #define NPERLINE    10          /* dudes to print per line */
> static
> ListSUsers(as)
>     register struct cmd_syndesc *as;
> {
> /*...*/
>        printf("%s ", tbuffer);
>        if ((i % NPERLINE) == NPERLINE - 1) {
>            printf("\n");
>            lastNL = 1;
>        } else
>            lastNL = 0;
>    }
> /*...*/
>
> So anyone against deleting this "feature" better come with a good
> argument which I can't smash with "you should use awk for that".

Actually the better reason is "why 10 and not what ls does"

But I think just killing it is better