More consistent output. [rsc] --rw-rw-r-- M 913078 glenda sys 5706 Feb 13 12:51 sys/src/cmd/ls.c /n/sourcesdump/2006/0213/plan9/sys/src/cmd/ls.c:36,41 - /n/sourcesdump/2006/0214/plan9/sys/src/cmd/ls.c:36,42 void dowidths(Dir*); void format(Dir*, char*); void output(void); + char* xcleanname(char*); ulong clk; int swidth; /* max width of -s size */ int qwidth; /* max width of -q version */ /n/sourcesdump/2006/0213/plan9/sys/src/cmd/ls.c:106,112 - /n/sourcesdump/2006/0214/plan9/sys/src/cmd/ls.c:107,113 n = dirreadall(fd, &db); if(n < 0) goto error; - cleanname(s); + xcleanname(s); growto(ndir+n); for(i=0; iname && *(r-1)=='/') + continue; + *w++ = *r; + } + while(w-1>name && *(w-1)=='/') + *--w = 0; + return name; + } [rsc] --rw-rw-r-- M 913078 glenda sys 5706 Feb 13 12:51 sys/src/cmd/ls.c