--- lbbs/src/main.c 2005/03/20 14:37:37 1.11 +++ lbbs/src/main.c 2025/05/27 00:54:01 1.43 @@ -1,149 +1,272 @@ /*************************************************************************** - main.c - description - ------------------- - begin : Mon Oct 11 2004 - copyright : (C) 2004 by Leaflet - email : leaflet@leafok.com + main.c - description + ------------------- + Copyright : (C) 2004-2025 by Leaflet + Email : leaflet@leafok.com ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * + * the Free Software Foundation; either version 3 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "bbs.h" +#include "init.h" #include "common.h" +#include "net_server.h" +#include "log.h" #include "io.h" #include "menu.h" +#include "file_loader.h" +#include "section_list_loader.h" +#include +#include #include +#include +#include +#include +#include -void -app_help(void) +void app_help(void) { - prints ( - "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" - ); + prints("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) +void arg_error(void) { - prints ("Invalid arguments\n"); - app_help(); + prints("Invalid arguments\n"); + app_help(); } -int -main (int argc, char *argv[]) +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