[BusyBox-cvs] busybox.stable cmdedit.c,1.66,1.67

Erik Andersen andersen at codepoet.org
Thu Jan 2 07:25:50 UTC 2003


Update of /var/cvs/busybox.stable
In directory winder:/tmp/cvs-serv22265

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.stable/cmdedit.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- cmdedit.c	24 Apr 2002 23:07:03 -0000	1.66
+++ cmdedit.c	2 Jan 2003 07:25:47 -0000	1.67
@@ -1102,14 +1102,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