| 255 |
{ |
{ |
| 256 |
ch = igetch(100); |
ch = igetch(100); |
| 257 |
|
|
| 258 |
switch (ch) |
if (ch != KEY_NULL && ch != KEY_TIMEOUT) |
| 259 |
{ |
{ |
|
case KEY_ESC: |
|
|
case KEY_LEFT: |
|
| 260 |
BBS_last_access_tm = time(NULL); |
BBS_last_access_tm = time(NULL); |
| 261 |
|
} |
| 262 |
|
|
| 263 |
|
switch (ch) |
| 264 |
|
{ |
| 265 |
case KEY_NULL: // broken pipe |
case KEY_NULL: // broken pipe |
| 266 |
return EXIT_SECTION; // exit section |
log_error("KEY_NULL\n"); |
| 267 |
|
return EXIT_SECTION; |
| 268 |
case KEY_TIMEOUT: |
case KEY_TIMEOUT: |
| 269 |
if (time(NULL) - BBS_last_access_tm >= MAX_DELAY_TIME) |
if (time(NULL) - BBS_last_access_tm >= MAX_DELAY_TIME) |
| 270 |
{ |
{ |
| 271 |
return EXIT_SECTION; // exit section |
log_error("User input timeout\n"); |
| 272 |
|
return EXIT_SECTION; |
| 273 |
} |
} |
| 274 |
continue; |
continue; |
| 275 |
|
case KEY_ESC: |
| 276 |
|
case KEY_LEFT: |
| 277 |
|
return EXIT_SECTION; |
| 278 |
case 'n': |
case 'n': |
|
BBS_last_access_tm = time(NULL); |
|
| 279 |
return CHANGE_NAME_DISPLAY; |
return CHANGE_NAME_DISPLAY; |
| 280 |
case CR: |
case CR: |
| 281 |
igetch_reset(); |
igetch_reset(); |
| 283 |
case KEY_RIGHT: |
case KEY_RIGHT: |
| 284 |
if (item_count > 0) |
if (item_count > 0) |
| 285 |
{ |
{ |
|
BBS_last_access_tm = time(NULL); |
|
| 286 |
return VIEW_ARTICLE; |
return VIEW_ARTICLE; |
| 287 |
} |
} |
| 288 |
break; |
break; |
| 430 |
old_selected_index = *p_selected_index; |
old_selected_index = *p_selected_index; |
| 431 |
} |
} |
| 432 |
|
|
|
BBS_last_access_tm = time(NULL); |
|
| 433 |
if (BBS_last_access_tm - last_refresh_tm >= BBS_section_list_load_interval) |
if (BBS_last_access_tm - last_refresh_tm >= BBS_section_list_load_interval) |
| 434 |
{ |
{ |
| 435 |
return CHANGE_PAGE; // force section list refresh |
return CHANGE_PAGE; // force section list refresh |
| 1094 |
{ |
{ |
| 1095 |
iflush(); |
iflush(); |
| 1096 |
ch = igetch(100); |
ch = igetch(100); |
| 1097 |
|
|
| 1098 |
|
if (ch != KEY_NULL && ch != KEY_TIMEOUT) |
| 1099 |
|
{ |
| 1100 |
|
BBS_last_access_tm = time(NULL); |
| 1101 |
|
} |
| 1102 |
|
|
| 1103 |
switch (ch) |
switch (ch) |
| 1104 |
{ |
{ |
| 1105 |
case KEY_NULL: // broken pipe |
case KEY_NULL: // broken pipe |
| 1106 |
|
log_error("KEY_NULL\n"); |
| 1107 |
return 0; |
return 0; |
| 1108 |
case KEY_TIMEOUT: |
case KEY_TIMEOUT: |
| 1109 |
if (time(NULL) - BBS_last_access_tm >= MAX_DELAY_TIME) |
if (time(NULL) - BBS_last_access_tm >= MAX_DELAY_TIME) |
| 1110 |
{ |
{ |
| 1111 |
|
log_error("User input timeout\n"); |
| 1112 |
return 0; |
return 0; |
| 1113 |
} |
} |
| 1114 |
continue; |
continue; |
| 1132 |
} |
} |
| 1133 |
} |
} |
| 1134 |
|
|
|
BBS_last_access_tm = time(NULL); |
|
|
|
|
| 1135 |
if (ch == EXITMENU) |
if (ch == EXITMENU) |
| 1136 |
{ |
{ |
| 1137 |
break; |
break; |