/[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.46 by sysadm, Mon Oct 13 02:23:27 2025 UTC Revision 1.50 by sysadm, Tue Oct 14 00:57:06 2025 UTC
# Line 24  Line 24 
24  #include "log.h"  #include "log.h"
25  #include "login.h"  #include "login.h"
26  #include "menu.h"  #include "menu.h"
27    #include "menu_proc.h"
28  #include "section_list_display.h"  #include "section_list_display.h"
29  #include "section_list_loader.h"  #include "section_list_loader.h"
30  #include "screen.h"  #include "screen.h"
# Line 52  enum select_cmd_t Line 53  enum select_cmd_t
53          LAST_TOPIC_ARTICLE,          LAST_TOPIC_ARTICLE,
54          SCAN_NEW_ARTICLE,          SCAN_NEW_ARTICLE,
55          VIEW_EX_DIR,          VIEW_EX_DIR,
56            SHOW_TOP10,
57  };  };
58    
59  static int section_list_draw_items(int page_id, ARTICLE *p_articles[], int article_count, int display_nickname, int ontop_start_offset)  static int section_list_draw_items(int page_id, ARTICLE *p_articles[], int article_count, int display_nickname, int ontop_start_offset)
# Line 364  static enum select_cmd_t section_list_se Line 366  static enum select_cmd_t section_list_se
366                          return SHOW_HELP;                          return SHOW_HELP;
367                  case 'x':                  case 'x':
368                          return VIEW_EX_DIR;                          return VIEW_EX_DIR;
369                    case 'H':
370                            return SHOW_TOP10;
371                  default:                  default:
372                  }                  }
373    
# Line 510  int section_list_display(const char *sna Line 514  int section_list_display(const char *sna
514          int page_id_cur;          int page_id_cur;
515          const ARTICLE *p_article_locate;          const ARTICLE *p_article_locate;
516    
517          p_section = section_list_find_by_name(sname, &section_index);          p_section = section_list_find_by_name(sname);
518          if (p_section == NULL)          if (p_section == NULL)
519          {          {
520                  log_error("Section %s not found\n", sname);                  log_error("Section %s not found\n", sname);
521                  return -1;                  return -1;
522          }          }
523    
524            section_index = get_section_index(p_section);
525    
526          if ((ret = section_list_rd_lock(p_section)) < 0)          if ((ret = section_list_rd_lock(p_section)) < 0)
527          {          {
528                  log_error("section_list_rd_lock(sid = 0) error\n");                  log_error("section_list_rd_lock(sid = 0) error\n");
# Line 793  int section_list_display(const char *sna Line 799  int section_list_display(const char *sna
799    
800                          // Update current topic                          // Update current topic
801                          section_topic_view_tid = (p_articles[selected_index]->tid == 0 ? p_articles[selected_index]->aid : p_articles[selected_index]->tid);                          section_topic_view_tid = (p_articles[selected_index]->tid == 0 ? p_articles[selected_index]->aid : p_articles[selected_index]->tid);
                         log_error("topic_view_tid=%d\n", section_topic_view_tid);  
802    
803                          // Update current aid location                          // Update current aid location
804                          section_aid_locations[section_index] = p_articles[selected_index]->aid;                          section_aid_locations[section_index] = p_articles[selected_index]->aid;
# Line 965  int section_list_display(const char *sna Line 970  int section_list_display(const char *sna
970                          if (section_list_draw_screen(sname, stitle, master_list, display_nickname) < 0)                          if (section_list_draw_screen(sname, stitle, master_list, display_nickname) < 0)
971                          {                          {
972                                  log_error("section_list_draw_screen() error\n");                                  log_error("section_list_draw_screen() error\n");
973                                    return -2;
974                            }
975                            break;
976                    case SHOW_TOP10:
977                            show_top10_menu(NULL);
978                            if (section_list_draw_screen(sname, stitle, master_list, display_nickname) < 0)
979                            {
980                                    log_error("section_list_draw_screen() error\n");
981                                  return -2;                                  return -2;
982                          }                          }
983                          break;                          break;


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

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