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

Diff of /lbbs/src/test_section_list.c

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

Revision 1.38 by sysadm, Tue Nov 4 14:58:56 2025 UTC Revision 1.40 by sysadm, Wed Nov 5 06:14:01 2025 UTC
# Line 15  Line 15 
15  #include <stdio.h>  #include <stdio.h>
16  #include <unistd.h>  #include <unistd.h>
17    
18  #define ARTICLE_BLOCK_SHM_FILE "~article_block_shm.dat"  static const char ARTICLE_BLOCK_SHM_FILE[] = "~article_block_shm.dat";
19  #define SECTION_LIST_SHM_FILE "~section_list_shm.dat"  static const char SECTION_LIST_SHM_FILE[] = "~section_list_shm.dat";
20  #define TRIE_DICT_SHM_FILE "~trie_dict_shm.dat"  static const char TRIE_DICT_SHM_FILE[] = "~trie_dict_shm.dat";
21  #define USER_LIST_SHM_FILE "~user_list_shm.dat"  static const char USER_LIST_SHM_FILE[] = "~user_list_shm.dat";
22    
23  const char *sname[] = {  const char *sname[] = {
24          "Test",          "Test",
# Line 68  int main(int argc, char *argv[]) Line 68  int main(int argc, char *argv[])
68          log_error_redir(STDERR_FILENO);          log_error_redir(STDERR_FILENO);
69    
70          // - 1 to make blocks allocated is less than required, to trigger error handling          // - 1 to make blocks allocated is less than required, to trigger error handling
71          block_count = BBS_article_limit_per_section * BBS_max_section / ARTICLE_PER_BLOCK;          block_count = BBS_article_limit_per_section * BBS_max_section / BBS_article_count_per_block;
72    
73          if ((fp = fopen(ARTICLE_BLOCK_SHM_FILE, "w")) == NULL)          if ((fp = fopen(ARTICLE_BLOCK_SHM_FILE, "w")) == NULL)
74          {          {


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

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