--- lbbs/src/bbs_net.c 2025/11/05 01:04:06 1.78 +++ lbbs/src/bbs_net.c 2025/11/05 04:19:21 1.80 @@ -33,11 +33,14 @@ #include #include -#define MENU_CONF_DELIM " \t\r\n" +static const char MENU_CONF_DELIM[] = " \t\r\n"; -#define MAX_PROCESS_BAR_LEN 30 -#define MAXSTATION 26 * 2 -#define STATION_PER_LINE 4 +enum _bbs_net_constant_t +{ + MAX_PROCESS_BAR_LEN = 30, + MAXSTATION = 26 * 2, + STATION_PER_LINE = 4, +}; struct _bbsnet_conf { @@ -45,7 +48,7 @@ struct _bbsnet_conf char host2[40]; char ip[40]; in_port_t port; - char charset[20]; + char charset[CHARSET_MAX_LEN + 1]; } bbsnet_conf[MAXSTATION]; static MENU_SET bbsnet_menu;