--- lbbs/include/common.h 2025/04/30 09:18:19 1.16 +++ lbbs/include/common.h 2025/05/06 05:31:26 1.20 @@ -1,16 +1,15 @@ /*************************************************************************** common.h - description ------------------- - begin : Mon Oct 18 2004 - copyright : (C) 2004 by Leaflet - email : leaflet@leafok.com + 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. * * * ***************************************************************************/ @@ -20,12 +19,29 @@ #include +#define LINE_BUFFER_LEN 1024 +#define FILE_PATH_LEN 4096 +#define MAX_FILE_LINES 65536 + // Version extern char app_version[256]; // Enviroment -extern char app_home_dir[256]; -extern char app_temp_dir[256]; +#define CONF_BBSNET "conf/bbsnet.conf" + +#define LOG_FILE_INFO "log/bbsd.log" +#define LOG_FILE_ERROR "log/error.log" + +#define DATA_WELCOME "data/welcome.txt" +#define DATA_REGISTER "data/register.txt" +#define DATA_GOODBYE "data/goodbye.txt" +#define DATA_LICENSE "data/license.txt" +#define DATA_COPYRIGHT "data/copyright.txt" +#define DATA_LOGIN_ERROR "data/login_error.txt" +#define DATA_ACTIVE_BOARD "data/active_board.txt" +#define DATA_READ_HELP "data/read_help.txt" + +#define VAR_MAX_USER_ONLINE "var/max_user_online.dat" // Network extern int socket_server; @@ -35,13 +51,6 @@ extern char hostaddr_client[50]; extern int port_server; extern int port_client; -// Database -extern char DB_host[256]; -extern char DB_username[50]; -extern char DB_password[50]; -extern char DB_database[50]; -extern char DB_timezone[50]; - // Signal #define SIG_RELOAD_MENU 0x22