/[LeafOK_CVS]/lbbs/src/section_list_display.c
ViewVC logotype

Diff of /lbbs/src/section_list_display.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.53 by sysadm, Wed Oct 15 01:05:18 2025 UTC Revision 1.56 by sysadm, Sat Oct 18 12:06:10 2025 UTC
# Line 255  static enum select_cmd_t section_list_se Line 255  static enum select_cmd_t section_list_se
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:
                         igetch_reset();  
281                  case 'r':                  case 'r':
282                  case KEY_RIGHT:                  case KEY_RIGHT:
283                          if (item_count > 0)                          if (item_count > 0)
284                          {                          {
                                 BBS_last_access_tm = time(NULL);  
285                                  return VIEW_ARTICLE;                                  return VIEW_ARTICLE;
286                          }                          }
287                          break;                          break;
# Line 401  static enum select_cmd_t section_list_se Line 405  static enum select_cmd_t section_list_se
405                  case 'H':                  case 'H':
406                          return SHOW_TOP10;                          return SHOW_TOP10;
407                  default:                  default:
408                            break;
409                  }                  }
410    
411                  if (old_page_id != *p_page_id)                  if (old_page_id != *p_page_id)
# Line 425  static enum select_cmd_t section_list_se Line 430  static enum select_cmd_t section_list_se
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
# Line 1090  int section_list_ex_dir_display(SECTION_ Line 1094  int section_list_ex_dir_display(SECTION_
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;
1115                          case CR:                          case CR:
                                 igetch_reset();  
1116                          default:                          default:
1117                                  switch (menu_control(&ex_menu_set, ch))                                  switch (menu_control(&ex_menu_set, ch))
1118                                  {                                  {
# Line 1120  int section_list_ex_dir_display(SECTION_ Line 1131  int section_list_ex_dir_display(SECTION_
1131                                  }                                  }
1132                          }                          }
1133    
                         BBS_last_access_tm = time(NULL);  
   
1134                          if (ch == EXITMENU)                          if (ch == EXITMENU)
1135                          {                          {
1136                                  break;                                  break;


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1