| 112 |
for (offset = 0; offset < buf_size - 1 && buffer[offset] != '\0'; offset++) |
for (offset = 0; offset < buf_size - 1 && buffer[offset] != '\0'; offset++) |
| 113 |
; |
; |
| 114 |
|
|
| 115 |
while ((c = igetch_t(MIN(MAX_DELAY_TIME, 60)))) |
while (!SYS_server_exit && (c = igetch_t(MIN(MAX_DELAY_TIME, 60)))) |
| 116 |
{ |
{ |
| 117 |
if (c == CR) |
if (c == CR) |
| 118 |
{ |
{ |
| 119 |
igetch(1); // Cleanup remaining '\n' in the buffer |
igetch(1); // Cleanup remaining '\n' in the buffer |
| 120 |
break; |
break; |
| 121 |
} |
} |
| 122 |
else if (c == KEY_TIMEOUT) |
else if (c == KEY_TIMEOUT || c == KEY_NULL) // timeout or broken pipe |
| 123 |
{ |
{ |
| 124 |
return -1; |
return -1; |
| 125 |
} |
} |
| 126 |
else if (c == KEY_NULL || c == LF) |
else if (c == LF || c == '\0') |
| 127 |
{ |
{ |
| 128 |
continue; |
continue; |
| 129 |
} |
} |
| 278 |
line = begin_line; |
line = begin_line; |
| 279 |
max_lines = screen_rows - 1; |
max_lines = screen_rows - 1; |
| 280 |
|
|
| 281 |
while (loop) |
while (!SYS_server_exit && loop) |
| 282 |
{ |
{ |
| 283 |
if (c_line_current >= c_line_total && c_line_total <= screen_rows - 2) |
if (c_line_current >= c_line_total && c_line_total <= screen_rows - 2) |
| 284 |
{ |
{ |
| 313 |
iflush(); |
iflush(); |
| 314 |
|
|
| 315 |
input_ok = 0; |
input_ok = 0; |
| 316 |
while (!input_ok) |
while (!SYS_server_exit && !input_ok) |
| 317 |
{ |
{ |
| 318 |
ch = igetch_t(MAX_DELAY_TIME); |
ch = igetch_t(MAX_DELAY_TIME); |
| 319 |
input_ok = 1; |
input_ok = 1; |