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

Diff of /lbbs/src/test_file_loader.c

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

Revision 1.14 by sysadm, Wed Nov 19 03:12:58 2025 UTC Revision 1.15 by sysadm, Thu Nov 20 01:09:27 2025 UTC
# Line 31  int files_cnt = 6; Line 31  int files_cnt = 6;
31    
32  int main(int argc, char *argv[])  int main(int argc, char *argv[])
33  {  {
         char file_path_temp[FILE_PATH_LEN];  
34          int i;          int i;
35          void *p_shm;          void *p_shm;
36          size_t data_len;          size_t data_len;
# Line 39  int main(int argc, char *argv[]) Line 38  int main(int argc, char *argv[])
38          const void *p_data;          const void *p_data;
39          const long *p_line_offsets;          const long *p_line_offsets;
40    
         // Change current dir  
         strncpy(file_path_temp, argv[0], sizeof(file_path_temp) - 1);  
         file_path_temp[sizeof(file_path_temp) - 1] = '\0';  
   
         if (chdir(dirname(file_path_temp)) < 0)  
         {  
                 fprintf(stderr, "chdir(%s) error: %d\n", dirname(file_path_temp), errno);  
                 return -1;  
         }  
   
41          if (log_begin("../log/bbsd.log", "../log/error.log") < 0)          if (log_begin("../log/bbsd.log", "../log/error.log") < 0)
42          {          {
43                  printf("Open log error\n");                  printf("Open log error\n");


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

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