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

Diff of /lbbs/src/section_list.c

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

Revision 1.37 by sysadm, Wed Jun 25 02:49:20 2025 UTC Revision 1.41 by sysadm, Tue Oct 14 00:57:06 2025 UTC
# Line 75  typedef struct article_block_pool_t ARTI Line 75  typedef struct article_block_pool_t ARTI
75    
76  static ARTICLE_BLOCK_POOL *p_article_block_pool = NULL;  static ARTICLE_BLOCK_POOL *p_article_block_pool = NULL;
77    
78  struct section_list_pool_t  SECTION_LIST_POOL *p_section_list_pool = NULL;
 {  
         int shmid;  
         SECTION_LIST sections[BBS_max_section];  
         int section_count;  
         int semid;  
         TRIE_NODE *p_trie_dict_section_by_name;  
         TRIE_NODE *p_trie_dict_section_by_sid;  
 };  
 typedef struct section_list_pool_t SECTION_LIST_POOL;  
   
 static SECTION_LIST_POOL *p_section_list_pool = NULL;  
79    
80  int article_block_init(const char *filename, int block_count)  int article_block_init(const char *filename, int block_count)
81  {  {
# Line 555  void section_list_cleanup(void) Line 544  void section_list_cleanup(void)
544          p_section_list_pool = NULL;          p_section_list_pool = NULL;
545  }  }
546    
 void section_list_ex_menu_set_cleanup(void)  
 {  
         int i;  
   
         for (i = 0; i < p_section_list_pool->section_count; i++)  
         {  
                 if (p_section_list_pool->sections[i].ex_menu_tm > 0)  
                 {  
                         unload_menu(&(p_section_list_pool->sections[i].ex_menu_set));  
                 }  
         }  
 }  
   
547  int set_section_list_shm_readonly(void)  int set_section_list_shm_readonly(void)
548  {  {
549          int shmid;          int shmid;
# Line 1047  int section_list_page_count_with_ontop(S Line 1023  int section_list_page_count_with_ontop(S
1023                  return -1;                  return -1;
1024          }          }
1025    
1026          page_count = p_section->page_count - 1 +          page_count = p_section->page_count - (p_section->last_page_visible_article_count > 0 ? 1 : 0) +
1027                                   (p_section->last_page_visible_article_count + p_section->ontop_article_count) / BBS_article_limit_per_page +                                   (p_section->last_page_visible_article_count + p_section->ontop_article_count) / BBS_article_limit_per_page +
1028                                   ((p_section->last_page_visible_article_count + p_section->ontop_article_count) % BBS_article_limit_per_page == 0 ? 0 : 1);                                   ((p_section->last_page_visible_article_count + p_section->ontop_article_count) % BBS_article_limit_per_page == 0 ? 0 : 1);
1029    


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

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