--- lbbs/src/user_info_display.c 2025/10/31 04:37:10 1.17 +++ lbbs/src/user_info_display.c 2025/11/05 04:19:21 1.21 @@ -1,18 +1,10 @@ -/*************************************************************************** - user_list_display.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 3 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +/* + * user_list_display + * - display user information + * + * Copyright (C) 2004-2025 Leaflet + */ #include "bbs.h" #include "ip_mask.h" @@ -28,8 +20,11 @@ #include #include -#define BBS_max_sessions_per_user 10 -#define LAST_LOGIN_DT_MAX_LEN 50 +enum _user_info_display_constant_t +{ + BBS_max_sessions_per_user = 10, + LAST_LOGIN_DT_MAX_LEN = 50, +}; static int display_user_info_key_handler(int *p_key, DISPLAY_CTX *p_ctx) { @@ -54,7 +49,7 @@ int user_info_display(USER_INFO *p_user_ int life; int user_level; const char *user_level_name; - char intro_f[BBS_user_intro_max_len]; + char intro_f[BBS_user_intro_max_len + 1]; int intro_len; char user_info_f[BUFSIZ]; long line_offsets[BBS_user_intro_max_line + 1];