mirror of git://git.suckless.org/st
simplify flushing
This commit is contained in:
parent
dadd3d0a6d
commit
f757e6f839
5
std.c
5
std.c
|
@ -279,7 +279,7 @@ main(int argc, char *argv[]) {
|
||||||
r = select(ptm + 1, &rfds, NULL, NULL, NULL);
|
r = select(ptm + 1, &rfds, NULL, NULL, NULL);
|
||||||
if(r == -1)
|
if(r == -1)
|
||||||
eprintn("error, cannot select");
|
eprintn("error, cannot select");
|
||||||
if(FD_ISSET(ptm, &rfds))
|
if(FD_ISSET(ptm, &rfds)) {
|
||||||
do {
|
do {
|
||||||
c = getch();
|
c = getch();
|
||||||
switch(c) {
|
switch(c) {
|
||||||
|
@ -289,8 +289,9 @@ main(int argc, char *argv[]) {
|
||||||
default:
|
default:
|
||||||
putchar(c);
|
putchar(c);
|
||||||
}
|
}
|
||||||
fflush(stdout);
|
|
||||||
} while(rbuf.i < rbuf.n);
|
} while(rbuf.i < rbuf.n);
|
||||||
|
fflush(stdout);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue