step: handle ctrl+D.
This commit is contained in:
parent
5aa7f1ad70
commit
7f8b1dfb2f
|
@ -11,7 +11,9 @@ int main(int argc, char** argv)
|
|||
fputs("mumble> ", stdout);
|
||||
void* catcher = fgets(input, 2048, stdin);
|
||||
if (catcher == NULL) {
|
||||
// ^ catches Ctrl+D
|
||||
loop = 0;
|
||||
puts("");
|
||||
} else {
|
||||
printf("You said: %s", input);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user