Additional patch from Tito to fix some anomolies
This commit is contained in:
parent
9e59841375
commit
e931909d2d
@ -44,7 +44,7 @@ int strings_main(int argc, char **argv)
|
|||||||
char *file;
|
char *file;
|
||||||
size_t foff, minlen;
|
size_t foff, minlen;
|
||||||
unsigned char *bfr, *C;
|
unsigned char *bfr, *C;
|
||||||
|
int i;
|
||||||
|
|
||||||
exitcode = fflg = oflg = 0;
|
exitcode = fflg = oflg = 0;
|
||||||
minlen = -1;
|
minlen = -1;
|
||||||
@ -96,11 +96,19 @@ int strings_main(int argc, char **argv)
|
|||||||
if (fflg)
|
if (fflg)
|
||||||
printf("%s:", file);
|
printf("%s:", file);
|
||||||
if (oflg)
|
if (oflg)
|
||||||
printf("%7ld %s", (long)(foff - minlen), (char *)bfr);
|
printf("%7lo %s", (long)(foff - minlen), (char *)bfr);
|
||||||
else
|
else
|
||||||
printf("%s", bfr);
|
printf("%s", bfr);
|
||||||
|
i=0;
|
||||||
while ((ch = getchar()) != EOF && ISSTR(ch))
|
while ((ch = getchar()) != EOF && ISSTR(ch))
|
||||||
|
{
|
||||||
putchar((char)ch);
|
putchar((char)ch);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
if(i>0)
|
||||||
|
foff+=(i+1);
|
||||||
|
else
|
||||||
|
foff++;
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
}
|
}
|
||||||
cnt = 0;
|
cnt = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user