/[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.34 by sysadm, Wed Nov 5 03:01:14 2025 UTC Revision 1.41 by sysadm, Sat Jan 3 10:27:14 2026 UTC
# Line 3  Line 3 
3   * section_list   * section_list
4   *   - data models and basic operations of section and article   *   - data models and basic operations of section and article
5   *   *
6   * Copyright (C) 2004-2025  Leaflet <leaflet@leafok.com>   * Copyright (C) 2004-2026  Leaflet <leaflet@leafok.com>
7   */   */
8    
9  #ifndef _SECTION_LIST_H_  #ifndef _SECTION_LIST_H_
# Line 14  Line 14 
14  #include "menu.h"  #include "menu.h"
15  #include <time.h>  #include <time.h>
16    
17    #ifdef HAVE_SYSTEM_V
18    #include <sys/sem.h>
19    #else
20    #include <semaphore.h>
21    #endif
22    
23  enum section_list_constant_t  enum section_list_constant_t
24  {  {
25          BBS_article_title_max_len = 160,          BBS_article_title_max_len = 160,
# Line 76  typedef struct section_list_t SECTION_LI Line 82  typedef struct section_list_t SECTION_LI
82    
83  struct section_list_pool_t  struct section_list_pool_t
84  {  {
85          int shmid;          size_t shm_size;
86          SECTION_LIST sections[BBS_max_section];          SECTION_LIST sections[BBS_max_section];
87          int section_count;          int section_count;
88    #ifndef HAVE_SYSTEM_V
89            sem_t sem[BBS_max_section + 1];
90            uint16_t read_lock_count[BBS_max_section + 1];
91            uint16_t write_lock_count[BBS_max_section + 1];
92    #else
93          int semid;          int semid;
94    #endif
95          TRIE_NODE *p_trie_dict_section_by_name;          TRIE_NODE *p_trie_dict_section_by_name;
96          TRIE_NODE *p_trie_dict_section_by_sid;          TRIE_NODE *p_trie_dict_section_by_sid;
97  };  };
# Line 126  extern int get_section_info(SECTION_LIST Line 138  extern int get_section_info(SECTION_LIST
138    
139  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);
140  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);
141    extern int section_list_set_article_excerption(SECTION_LIST *p_section, int32_t aid, int8_t excerption);
142    
143  extern int section_list_update_article_ontop(SECTION_LIST *p_section, ARTICLE *p_article);  extern int section_list_update_article_ontop(SECTION_LIST *p_section, ARTICLE *p_article);
144  extern int section_list_page_count_with_ontop(SECTION_LIST *p_section);  extern int section_list_page_count_with_ontop(SECTION_LIST *p_section);


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

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