[BusyBox-cvs] busybox/miscutils strings.c,1.1,1.2

Glenn McGrath bug1 at busybox.net
Thu Jan 9 10:00:53 UTC 2003


Update of /var/cvs/busybox/miscutils
In directory winder:/tmp/cvs-serv21214/miscutils

Modified Files:
	strings.c 
Log Message:
Make output the same as upstream, patch by Tito


Index: strings.c
===================================================================
RCS file: /var/cvs/busybox/miscutils/strings.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- strings.c	7 Nov 2002 02:09:37 -0000	1.1
+++ strings.c	9 Jan 2003 10:00:49 -0000	1.2
@@ -50,7 +50,7 @@
 	minlen = -1;
 	while ((ch = getopt(argc, argv, "an:of")) > 0)
 		switch(ch) {
-			case '-':
+			case 'a':
 				break;
 			case 'f':
 				fflg = 1;
@@ -86,6 +86,7 @@
 		foff = 0;
 
 		for (cnt = 0; (ch = getchar()) != EOF;) {
+			foff++;
 			if (ISSTR(ch)) {
 				if (!cnt)
 					C = bfr;
@@ -95,7 +96,7 @@
 				if (fflg)
 					printf("%s:", file);
 				if (oflg)
-					printf("%07ld %s", (long)(foff - minlen), (char *)bfr);
+					printf("%7ld %s", (long)(foff - minlen), (char *)bfr);
 				else
 					printf("%s", bfr);
 				while ((ch = getchar()) != EOF && ISSTR(ch))




More information about the busybox-cvs mailing list