| 62 | #endif |
| 63 | |
| 64 | int |
| 65 | tgetch(void) |
| 66 | { |
| 67 | char ch; |
| 68 | |
| 69 | #ifdef SCREEN_VESA |
| 70 | if (iflags.usevesa) { |
| 71 | vesa_flush_text(); |
| 72 | } |
| 73 | #endif /*SCREEN_VESA*/ |
| 74 | /* BIOSgetch can use the numeric key pad on IBM compatibles. */ |
| 75 | #ifdef SIMULATE_CURSOR |
| 76 | if (iflags.grmode && cursor_flag) |
| 77 | DrawCursor(); |
| 78 | #endif |
| 79 | if (iflags.BIOS) |
| 80 | ch = BIOSgetch(); |
| 81 | else |
| 82 | ch = DOSgetch(); |
| 83 | #ifdef SIMULATE_CURSOR |
| 84 | if (iflags.grmode && cursor_flag) |
| 85 | HideCursor(); |
| 86 | #endif |
| 87 | return ((ch == '\r') ? '\n' : ch); |
| 88 | } |
| 89 | |
| 90 | /* |
| 91 | * Keyboard translation tables. |
no test coverage detected