projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e59841
)
Additional patch from Tito to fix some anomolies
author
Eric Andersen
<andersen@codepoet.org>
Thu, 9 Jan 2003 14:36:26 +0000
(14:36 -0000)
committer
Eric Andersen
<andersen@codepoet.org>
Thu, 9 Jan 2003 14:36:26 +0000
(14:36 -0000)
miscutils/strings.c
patch
|
blob
|
history
diff --git
a/miscutils/strings.c
b/miscutils/strings.c
index 3d3aaf589072c484e3f40595120bc945e0c3911a..6494850337b9ae8288018e2d6abc4a47f65ab3c8 100644
(file)
--- a/
miscutils/strings.c
+++ b/
miscutils/strings.c
@@
-44,7
+44,7
@@
int strings_main(int argc, char **argv)
char *file;
size_t foff, minlen;
unsigned char *bfr, *C;
-
+ int i;
exitcode = fflg = oflg = 0;
minlen = -1;
@@
-96,11
+96,19
@@
int strings_main(int argc, char **argv)
if (fflg)
printf("%s:", file);
if (oflg)
- printf("%7l
d
%s", (long)(foff - minlen), (char *)bfr);
+ printf("%7l
o
%s", (long)(foff - minlen), (char *)bfr);
else
printf("%s", bfr);
+ i=0;
while ((ch = getchar()) != EOF && ISSTR(ch))
+ {
putchar((char)ch);
+ i++;
+ }
+ if(i>0)
+ foff+=(i+1);
+ else
+ foff++;
putchar('\n');
}
cnt = 0;