[BusyBox-cvs] busybox/shell cmdedit.c,1.75,1.76
Erik Andersen
andersen at codepoet.org
Thu Jan 2 07:24:06 UTC 2003
Update of /var/cvs/busybox/shell
In directory winder:/tmp/cvs-serv22238/shell
Modified Files:
cmdedit.c
Log Message:
Fix tab-tab listing of files so it properly reflects current
terminal width.
-Erik
Index: cmdedit.c
===================================================================
RCS file: /var/cvs/busybox/shell/cmdedit.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- cmdedit.c 9 Dec 2002 11:10:40 -0000 1.75
+++ cmdedit.c 2 Jan 2003 07:24:02 -0000 1.76
@@ -1088,14 +1088,13 @@
if (l < 14)
l = 14;
printf("%-14s ", matches[i]);
+ col+=l;
if ((l += 2) > 16)
while (l % 16) {
putchar(' ');
l++;
}
- col += l;
- col -= (col / cmdedit_termw) * cmdedit_termw;
- if (col > 60 && matches[i + 1] != NULL) {
+ if (col > (cmdedit_termw-l-l) && matches[i + 1] != NULL) {
putchar('\n');
col = 0;
}
More information about the busybox-cvs
mailing list