/[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.30 by sysadm, Sat Jun 7 07:35:06 2025 UTC Revision 1.33 by sysadm, Mon Oct 13 02:23:27 2025 UTC
# Line 14  Line 14 
14   *                                                                         *   *                                                                         *
15   ***************************************************************************/   ***************************************************************************/
16    
 #include "section_list.h"  
 #include "trie_dict.h"  
17  #include "bbs.h"  #include "bbs.h"
18  #include "log.h"  #include "log.h"
19    #include "section_list.h"
20    #include "trie_dict.h"
21    #include <errno.h>
22  #include <stdio.h>  #include <stdio.h>
23  #include <unistd.h>  #include <unistd.h>
 #include <errno.h>  
24    
25  #define ARTICLE_BLOCK_SHM_FILE "~article_block_shm.dat"  #define ARTICLE_BLOCK_SHM_FILE "~article_block_shm.dat"
26  #define SECTION_LIST_SHM_FILE "~section_list_shm.dat"  #define SECTION_LIST_SHM_FILE "~section_list_shm.dat"
# Line 33  const char *sname[] = { Line 33  const char *sname[] = {
33    
34  const char *stitle[] = {  const char *stitle[] = {
35          " Test Section ",          " Test Section ",
36          "ĸABC",          "字母组合ABC",
37          "__123"};          "_数字_123"};
38    
39  const char *master_name[] = {  const char *master_name[] = {
40          "sysadm",          "sysadm",
# Line 146  int main(int argc, char *argv[]) Line 146  int main(int argc, char *argv[])
146    
147          for (i = 0; i < section_conf_count; i++)          for (i = 0; i < section_conf_count; i++)
148          {          {
149                  if (section_list_find_by_name(sname[i]) == NULL)                  if (section_list_find_by_name(sname[i], NULL) == NULL)
150                  {                  {
151                          printf("section_list_find_by_name(%s) error\n", sname[i]);                          printf("section_list_find_by_name(%s) error\n", sname[i]);
152                          return -3;                          return -3;
# Line 156  int main(int argc, char *argv[]) Line 156  int main(int argc, char *argv[])
156          for (i = 0; i < section_count; i++)          for (i = 0; i < section_count; i++)
157          {          {
158                  sid = i * 3 + 1;                  sid = i * 3 + 1;
159                  if (section_list_find_by_sid(sid) == NULL || section_list_find_by_sid(sid)->sid != sid)                  if (section_list_find_by_sid(sid, NULL) == NULL || section_list_find_by_sid(sid, NULL)->sid != sid)
160                  {                  {
161                          printf("section_list_find_by_sid(%d) error\n", sid);                          printf("section_list_find_by_sid(%d) error\n", sid);
162                          return -3;                          return -3;


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

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