diff options
Diffstat (limited to 'miscutils/strings.c')
-rw-r--r-- | miscutils/strings.c | 5 |
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)) |