aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-01-09 10:00:49 +0000
committerbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-01-09 10:00:49 +0000
commit720a6d3c2b2a3c3bb9a57c9fe54e1de388be3190 (patch)
treee23b435d5120938dd866e26fff49aabadb9d548a
parent8dc11ea946967e2a33df53528a78d0fe6a2c4663 (diff)
downloadbusybox-w32-720a6d3c2b2a3c3bb9a57c9fe54e1de388be3190.tar.gz
busybox-w32-720a6d3c2b2a3c3bb9a57c9fe54e1de388be3190.tar.bz2
busybox-w32-720a6d3c2b2a3c3bb9a57c9fe54e1de388be3190.zip
Make output the same as upstream, patch by Tito
git-svn-id: svn://busybox.net/trunk/busybox@6295 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--miscutils/strings.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/miscutils/strings.c b/miscutils/strings.c
index 043d6b8c1..3d3aaf589 100644
--- a/miscutils/strings.c
+++ b/miscutils/strings.c
@@ -50,7 +50,7 @@ int strings_main(int argc, char **argv)
50 minlen = -1; 50 minlen = -1;
51 while ((ch = getopt(argc, argv, "an:of")) > 0) 51 while ((ch = getopt(argc, argv, "an:of")) > 0)
52 switch(ch) { 52 switch(ch) {
53 case '-': 53 case 'a':
54 break; 54 break;
55 case 'f': 55 case 'f':
56 fflg = 1; 56 fflg = 1;
@@ -86,6 +86,7 @@ int strings_main(int argc, char **argv)
86 foff = 0; 86 foff = 0;
87 87
88 for (cnt = 0; (ch = getchar()) != EOF;) { 88 for (cnt = 0; (ch = getchar()) != EOF;) {
89 foff++;
89 if (ISSTR(ch)) { 90 if (ISSTR(ch)) {
90 if (!cnt) 91 if (!cnt)
91 C = bfr; 92 C = bfr;
@@ -95,7 +96,7 @@ int strings_main(int argc, char **argv)
95 if (fflg) 96 if (fflg)
96 printf("%s:", file); 97 printf("%s:", file);
97 if (oflg) 98 if (oflg)
98 printf("%07ld %s", (long)(foff - minlen), (char *)bfr); 99 printf("%7ld %s", (long)(foff - minlen), (char *)bfr);
99 else 100 else
100 printf("%s", bfr); 101 printf("%s", bfr);
101 while ((ch = getchar()) != EOF && ISSTR(ch)) 102 while ((ch = getchar()) != EOF && ISSTR(ch))