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

Diff of /lbbs/src/main.c

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

Revision 1.6 by sysadm, Thu Oct 21 17:28:46 2004 UTC Revision 1.9 by sysadm, Thu Mar 17 10:48:46 2005 UTC
# Line 17  Line 17 
17    
18  #include "bbs.h"  #include "bbs.h"
19  #include "common.h"  #include "common.h"
20    #include "io.h"
21    #include "menu.h"
22    #include <string.h>
23    
24  void  void
25  app_help(void)  app_help(void)
26  {  {
27    printf (    prints (
28      "Usage: bbsd [-fhv] [...]\n\n"      "Usage: bbsd [-fhv] [...]\n\n"
29      "-f\t--foreground\t\tForce program run in foreground\n"      "-f\t--foreground\t\tForce program run in foreground\n"
30      "-h\t--help\t\t\tDisplay this help message\n"      "-h\t--help\t\t\tDisplay this help message\n"
# Line 35  app_help(void) Line 38  app_help(void)
38  void  void
39  arg_error(void)  arg_error(void)
40  {  {
41    printf ("Invalid arguments\n");    prints ("Invalid arguments\n");
42    app_help();    app_help();
43  }  }
44    
# Line 109  main (int argc, char *argv[]) Line 112  main (int argc, char *argv[])
112    
113    //Initialize log    //Initialize log
114    strncpy(app_home_dir, argv[0], rindex(argv[0],'/')-argv[0]+1);    strncpy(app_home_dir, argv[0], rindex(argv[0],'/')-argv[0]+1);
115      strcat(app_home_dir, "../");
116    strcpy(log_dir, app_home_dir);    strcpy(log_dir, app_home_dir);
117    strcat(log_dir, "log/");    strcat(log_dir, "log/");
118    strcpy(file_log_std, log_dir);    strcpy(file_log_std, log_dir);
# Line 129  main (int argc, char *argv[]) Line 133  main (int argc, char *argv[])
133    if (load_conf(file_config)<0)    if (load_conf(file_config)<0)
134      exit(-2);      exit(-2);
135    
136      //Load menus
137      strcpy(file_config, app_home_dir);
138      strcat(file_config, "conf/main_menu.conf");
139      if (load_menu(&bbs_main_menu, file_config)<0)
140        exit(-3);
141    
142    //Initialize socket server    //Initialize socket server
143    net_server(BBS_address, BBS_port);    net_server(BBS_address, BBS_port);
144    


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

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