tsimplify flushing - st - [fork] customized build of st, the simple terminal | |
git clone git://src.adamsgaard.dk/st | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit d83cbc27b99427d00846832a73810f285d8f0d05 | |
parent 3cb67937811b34fcc600b4eb96bd8fdd392ecab4 | |
Author: Matthias-Christian Ott <[email protected]> | |
Date: Sun, 15 Jun 2008 17:31:24 +0200 | |
simplify flushing | |
Diffstat: | |
M std.c | 5 +++-- | |
1 file changed, 3 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/std.c b/std.c | |
t@@ -279,7 +279,7 @@ main(int argc, char *argv[]) { | |
r = select(ptm + 1, &rfds, NULL, NULL, NULL); | |
if(r == -1) | |
eprintn("error, cannot select"); | |
- if(FD_ISSET(ptm, &rfds)) | |
+ if(FD_ISSET(ptm, &rfds)) { | |
do { | |
c = getch(); | |
switch(c) { | |
t@@ -289,8 +289,9 @@ main(int argc, char *argv[]) { | |
default: | |
putchar(c); | |
} | |
- fflush(stdout); | |
} while(rbuf.i < rbuf.n); | |
+ fflush(stdout); | |
+ } | |
} | |
return 0; | |
} |