/[LeafOK_CVS]/lbbs/include/section_list.h
ViewVC logotype

Diff of /lbbs/include/section_list.h

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

Revision 1.22 by sysadm, Sat Jun 21 02:15:18 2025 UTC Revision 1.23 by sysadm, Mon Jun 23 08:38:01 2025 UTC
# Line 25  Line 25 
25  #define BBS_article_limit_per_section 50000  #define BBS_article_limit_per_section 50000
26  #define BBS_article_limit_per_page 20  #define BBS_article_limit_per_page 20
27    
28    #define BBS_ontop_article_limit_per_section 10
29    
30  #define ARTICLE_PER_BLOCK 1000  #define ARTICLE_PER_BLOCK 1000
31    
32  struct article_t  struct article_t
# Line 69  struct section_list_t Line 71  struct section_list_t
71          ARTICLE *p_page_first_article[BBS_article_limit_per_section / BBS_article_limit_per_page];          ARTICLE *p_page_first_article[BBS_article_limit_per_section / BBS_article_limit_per_page];
72          int32_t page_count;          int32_t page_count;
73          int32_t last_page_visible_article_count;          int32_t last_page_visible_article_count;
74            ARTICLE *p_ontop_articles[BBS_ontop_article_limit_per_section];
75            int32_t ontop_article_count;
76  };  };
77  typedef struct section_list_t SECTION_LIST;  typedef struct section_list_t SECTION_LIST;
78    
# Line 106  extern int get_section_index(SECTION_LIS Line 110  extern int get_section_index(SECTION_LIS
110  extern int section_list_append_article(SECTION_LIST *p_section, const ARTICLE *p_article_src);  extern int section_list_append_article(SECTION_LIST *p_section, const ARTICLE *p_article_src);
111  extern int section_list_set_article_visible(SECTION_LIST *p_section, int32_t aid, int8_t visible);  extern int section_list_set_article_visible(SECTION_LIST *p_section, int32_t aid, int8_t visible);
112    
113    extern int section_list_update_article_ontop(SECTION_LIST *p_section, ARTICLE *p_article);
114    extern int section_list_page_count_with_ontop(SECTION_LIST *p_section);
115    extern int section_list_page_article_count_with_ontop(SECTION_LIST *p_section, int32_t page_id);
116    
117  // *p_page, *p_offset will be set as page / offset of the article with aid in *p_section (including both visible and invisible articles)  // *p_page, *p_offset will be set as page / offset of the article with aid in *p_section (including both visible and invisible articles)
118  // *pp_next will be set as pointer to the next article of the article with aid  // *pp_next will be set as pointer to the next article of the article with aid
119  // *pp_next will be set as head article of the section if the article with aid locates at the tail of the section  // *pp_next will be set as head article of the section if the article with aid locates at the tail of the section


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

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