Unified · Split
| @@ -11,16 +11,6 @@ · 10 unmodified lines | ||
| 11 | 11 | #undef write |
| 12 | 12 | #undef read |
| 13 | 13 | |
| 14 | −#ifndef WINDOWS | |
| 15 | −/* get raw character from console without echo */ | |
| 16 | −static int | |
| 17 | −_getch(void) | |
| 18 | −{ | |
| 19 | − /* TODO */ | |
| 20 | − return -1; | |
| 21 | −} | |
| 22 | −#endif | |
| 23 | − | |
| 24 | 14 | void (*consdebug)(void) = 0; |
| 25 | 15 | void (*screenputs)(char*, int) = 0; |
| 26 | 16 | |
| @@ -582,15 +572,8 @@ consclose(Chan *c) · 555 unmodified lines | ||
| 582 | 572 | static int |
| 583 | 573 | readcons(Queue *q, char *buf, int n) |
| 584 | 574 | { |
| 585 | − while(screenputs==0 && !qcanread(q)){ | |
| 586 | − int c; | |
| 587 | − | |
| 588 | − if((c = _getch()) == -1) | |
| 589 | − return read(0, buf, n); | |
| 590 | − if(c == '\r') | |
| 591 | − c = '\n'; | |
| 592 | − kbdputc(q, c); | |
| 593 | − } | |
| 575 | + if(screenputs==0 && !qcanread(q)) | |
| 576 | + return read(0, buf, n); | |
| 594 | 577 | return qread(q, buf, n); |
| 595 | 578 | } |
| 596 | 579 | |