aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2003-01-09 10:00:49 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2003-01-09 10:00:49 +0000
commitdd3461af2f227efae7a69a67e5b8dc1f665b57b9 (patch)
treee23b435d5120938dd866e26fff49aabadb9d548a
parenta69fd2ecf6211ed1ce0de659fd7474e89f05d834 (diff)
downloadbusybox-dd3461af2f227efae7a69a67e5b8dc1f665b57b9.tar.gz
Make output the same as upstream, patch by Tito
-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)
minlen = -1;
while ((ch = getopt(argc, argv, "an:of")) > 0)
switch(ch) {
- case '-':
+ case 'a':
break;
case 'f':
fflg = 1;
@@ -86,6 +86,7 @@ int strings_main(int argc, char **argv)
foff = 0;
for (cnt = 0; (ch = getchar()) != EOF;) {
+ foff++;
if (ISSTR(ch)) {
if (!cnt)
C = bfr;
@@ -95,7 +96,7 @@ int strings_main(int argc, char **argv)
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))