diff options
| author | Matthias-Christian Ott <ott@enolink.de> | 2008-06-15 17:31:24 +0200 |
|---|---|---|
| committer | Matthias-Christian Ott <ott@enolink.de> | 2008-06-15 17:31:24 +0200 |
| commit | d83cbc27b99427d00846832a73810f285d8f0d05 (patch) | |
| tree | 4e8137c2e39001d35b09a050a62b62297a2f1cd3 | |
| parent | 3cb67937811b34fcc600b4eb96bd8fdd392ecab4 (diff) | |
| download | st-d83cbc27b99427d00846832a73810f285d8f0d05.tar.gz st-d83cbc27b99427d00846832a73810f285d8f0d05.zip | |
simplify flushing
| -rw-r--r-- | std.c | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -279,7 +279,7 @@ main(int argc, char *argv[]) { | |||
| 279 | r = select(ptm + 1, &rfds, NULL, NULL, NULL); | 279 | r = select(ptm + 1, &rfds, NULL, NULL, NULL); |
| 280 | if(r == -1) | 280 | if(r == -1) |
| 281 | eprintn("error, cannot select"); | 281 | eprintn("error, cannot select"); |
| 282 | if(FD_ISSET(ptm, &rfds)) | 282 | if(FD_ISSET(ptm, &rfds)) { |
| 283 | do { | 283 | do { |
| 284 | c = getch(); | 284 | c = getch(); |
| 285 | switch(c) { | 285 | switch(c) { |
| @@ -289,8 +289,9 @@ main(int argc, char *argv[]) { | |||
| 289 | default: | 289 | default: |
| 290 | putchar(c); | 290 | putchar(c); |
| 291 | } | 291 | } |
| 292 | fflush(stdout); | ||
| 293 | } while(rbuf.i < rbuf.n); | 292 | } while(rbuf.i < rbuf.n); |
| 293 | fflush(stdout); | ||
| 294 | } | ||
| 294 | } | 295 | } |
| 295 | return 0; | 296 | return 0; |
| 296 | } | 297 | } |
