/[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.8 by sysadm, Fri Oct 22 17:45:36 2004 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 <string.h>
22    
23  void  void
24  app_help(void)  app_help(void)
25  {  {
26    printf (    prints (
27      "Usage: bbsd [-fhv] [...]\n\n"      "Usage: bbsd [-fhv] [...]\n\n"
28      "-f\t--foreground\t\tForce program run in foreground\n"      "-f\t--foreground\t\tForce program run in foreground\n"
29      "-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 37  app_help(void)
37  void  void
38  arg_error(void)  arg_error(void)
39  {  {
40    printf ("Invalid arguments\n");    prints ("Invalid arguments\n");
41    app_help();    app_help();
42  }  }
43    
# Line 109  main (int argc, char *argv[]) Line 111  main (int argc, char *argv[])
111    
112    //Initialize log    //Initialize log
113    strncpy(app_home_dir, argv[0], rindex(argv[0],'/')-argv[0]+1);    strncpy(app_home_dir, argv[0], rindex(argv[0],'/')-argv[0]+1);
114      strcat(app_home_dir, "../");
115    strcpy(log_dir, app_home_dir);    strcpy(log_dir, app_home_dir);
116    strcat(log_dir, "log/");    strcat(log_dir, "log/");
117    strcpy(file_log_std, log_dir);    strcpy(file_log_std, log_dir);


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

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