fix: setdefaults & input of EOF
This commit is contained in:
parent
fceb33dbc1
commit
8d471113ce
|
@ -235,7 +235,7 @@ static void setdefaults(
|
||||||
start = *inlines;
|
start = *inlines;
|
||||||
for (end = start; *end; ++end);
|
for (end = start; *end; ++end);
|
||||||
for (line = inlines + 1; *line; ++line) {
|
for (line = inlines + 1; *line; ++line) {
|
||||||
for (p2 = *line; *p2; ++p2)
|
for (p2 = *line; *p2; ++p2);
|
||||||
for (p1 = end;
|
for (p1 = end;
|
||||||
p1 > start && p2 > *line && p1[-1] == p2[-1];
|
p1 > start && p2 > *line && p1[-1] == p2[-1];
|
||||||
--p1, --p2);
|
--p1, --p2);
|
||||||
|
@ -297,6 +297,7 @@ int original_main(int argc, const char * const *argv)
|
||||||
for (;;) {
|
for (;;) {
|
||||||
for (;;) {
|
for (;;) {
|
||||||
c = getchar();
|
c = getchar();
|
||||||
|
if (c == EOF) goto parcleanup;
|
||||||
if (c != '\n') break;
|
if (c != '\n') break;
|
||||||
putchar(c);
|
putchar(c);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user