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

Diff of /lbbs/src/init.c

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

Revision 1.7 by sysadm, Thu Mar 17 10:48:46 2005 UTC Revision 1.9 by sysadm, Sun Mar 20 17:37:14 2005 UTC
# Line 42  init_daemon (void) Line 42  init_daemon (void)
42    else if (pid < 0)    else if (pid < 0)
43      exit (1);      exit (1);
44    
45    for (i = 0; i < NOFILE; ++i)  //  for (i = 0; i < NOFILE; ++i)
46      close (i);  //    close (i);
47    chdir (app_home_dir);    chdir (app_home_dir);
48    umask (0);    umask (0);
49    
# Line 70  load_conf (const char *conf_file) Line 70  load_conf (const char *conf_file)
70    while (fscanf (fin, "%s", c_name) != EOF)    while (fscanf (fin, "%s", c_name) != EOF)
71      {      {
72        if (c_name[0] == '#')        if (c_name[0] == '#')
73        {          {
74          fgets(temp, 256, fin);            fgets (temp, 256, fin);
75          continue;            continue;
76        }          }
77        fscanf (fin, "%*c");        fscanf (fin, "%*c");
78        if (strcmp (c_name, "bbs_id") == 0)        if (strcmp (c_name, "bbs_id") == 0)
79          {          {
# Line 107  load_conf (const char *conf_file) Line 107  load_conf (const char *conf_file)
107          {          {
108            int y = 0, m = 0, d = 0;            int y = 0, m = 0, d = 0;
109            fscanf (fin, "%d-%d-%d", &y, &m, &d);            fscanf (fin, "%d-%d-%d", &y, &m, &d);
110            sprintf (BBS_start_dt, "%4d年%2d月%2d日",y,m,d);            sprintf (BBS_start_dt, "%4d年%2d月%2d日", y, m, d);
111          }          }
112        if (strcmp (c_name, "db_host") == 0)        if (strcmp (c_name, "db_host") == 0)
113          {          {
# Line 128  load_conf (const char *conf_file) Line 128  load_conf (const char *conf_file)
128      }      }
129    
130    fclose (fin);    fclose (fin);
131      
132    return 0;    return 0;
133  }  }


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

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