--- lbbs/src/main.c 2004/10/20 07:46:32 1.5 +++ lbbs/src/main.c 2004/10/21 17:28:46 1.6 @@ -18,13 +18,94 @@ #include "bbs.h" #include "common.h" +void +app_help(void) +{ + printf ( + "Usage: bbsd [-fhv] [...]\n\n" + "-f\t--foreground\t\tForce program run in foreground\n" + "-h\t--help\t\t\tDisplay this help message\n" + "-v\t--version\t\tDisplay version information\n" + "\t--display-log\t\tDisplay standard log information\n" + "\t--display-error-log\tDisplay error log information\n" + "\n If meet any bug, please report to \n\n" + ); +} + +void +arg_error(void) +{ + printf ("Invalid arguments\n"); + app_help(); +} + int main (int argc, char *argv[]) { char log_dir[256], file_log_std[256], file_log_error[256], file_config[256]; - + int i,j; + int daemon = 1, std_log_redir = 0, error_log_redir = 0; + + //Parse args + for (i=1; i