|
|
@ -128,11 +128,16 @@ int main(int argc, char *argv[]) { |
|
|
|
|
|
|
|
|
|
|
|
while (1) { |
|
|
|
while (1) { |
|
|
|
fputs("f2b >> ", stdout); |
|
|
|
fputs("f2b >> ", stdout); |
|
|
|
fgets(line, sizeof(line) - 1, stdin); |
|
|
|
if (!fgets(line, sizeof(line) - 1, stdin)) { |
|
|
|
if (feof(stdin)) { |
|
|
|
if (feof(stdin)) { |
|
|
|
fputc('\n', stdout); |
|
|
|
fputc('\n', stdout); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
fputs("read error\n", stdout); |
|
|
|
|
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (line[0] == '\n') |
|
|
|
|
|
|
|
continue; |
|
|
|
handle_cmd(line); |
|
|
|
handle_cmd(line); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|