[OpenAFS-devel] bos listusers NPERLINE

Harald Barth haba@pdc.kth.se
Mon, 19 Mar 2007 15:22:13 +0100 (MET)


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".

Harald (who inserted the 11th dude).