| 162 |
{ |
{ |
| 163 |
ch = igetch(100); |
ch = igetch(100); |
| 164 |
|
|
| 165 |
|
if (ch != KEY_NULL && ch != KEY_TIMEOUT) |
| 166 |
|
{ |
| 167 |
|
BBS_last_access_tm = time(NULL); |
| 168 |
|
} |
| 169 |
|
|
| 170 |
switch (ch) |
switch (ch) |
| 171 |
{ |
{ |
| 172 |
case KEY_ESC: |
case KEY_ESC: |
| 173 |
case KEY_LEFT: |
case KEY_LEFT: |
|
BBS_last_access_tm = time(NULL); |
|
| 174 |
case KEY_NULL: // broken pipe |
case KEY_NULL: // broken pipe |
| 175 |
|
log_error("KEY_NULL\n"); |
| 176 |
return EXIT_LIST; // exit list |
return EXIT_LIST; // exit list |
| 177 |
case KEY_TIMEOUT: |
case KEY_TIMEOUT: |
| 178 |
if (time(NULL) - BBS_last_access_tm >= MAX_DELAY_TIME) |
if (time(NULL) - BBS_last_access_tm >= MAX_DELAY_TIME) |
| 179 |
{ |
{ |
| 180 |
|
log_error("User input timeout\n"); |
| 181 |
return EXIT_LIST; // exit list |
return EXIT_LIST; // exit list |
| 182 |
} |
} |
| 183 |
continue; |
continue; |
| 184 |
case 'n': |
case 'n': |
|
BBS_last_access_tm = time(NULL); |
|
| 185 |
return SWITCH_NAME; |
return SWITCH_NAME; |
| 186 |
case '-': |
case '-': |
| 187 |
if (item_count > 0) |
if (item_count > 0) |
| 188 |
{ |
{ |
|
BBS_last_access_tm = time(NULL); |
|
| 189 |
return UNSET_FAVOR; |
return UNSET_FAVOR; |
| 190 |
} |
} |
| 191 |
break; |
break; |
| 192 |
case CR: |
case CR: |
|
igetch_reset(); |
|
| 193 |
case KEY_RIGHT: |
case KEY_RIGHT: |
| 194 |
if (item_count > 0) |
if (item_count > 0) |
| 195 |
{ |
{ |
|
BBS_last_access_tm = time(NULL); |
|
| 196 |
return LOCATE_ARTICLE; |
return LOCATE_ARTICLE; |
| 197 |
} |
} |
| 198 |
break; |
break; |
| 285 |
|
|
| 286 |
old_selected_index = *p_selected_index; |
old_selected_index = *p_selected_index; |
| 287 |
} |
} |
|
|
|
|
BBS_last_access_tm = time(NULL); |
|
| 288 |
} |
} |
| 289 |
|
|
| 290 |
return EXIT_LIST; |
return EXIT_LIST; |