--- lbbs/src/editor.c 2025/11/04 13:49:51 1.51 +++ lbbs/src/editor.c 2025/11/05 04:19:21 1.54 @@ -3,7 +3,7 @@ * editor * - user interactive full-screen text editor * - * Copyright (C) 2004-2025 by Leaflet + * Copyright (C) 2004-2025 Leaflet */ #include "bbs.h" @@ -18,9 +18,13 @@ #include #include -#define EDITOR_ESC_DISPLAY_STR "\033[32m*\033[m" -#define EDITOR_MEM_POOL_LINE_PER_CHUNK 1000 -#define EDITOR_MEM_POOL_CHUNK_LIMIT (MAX_EDITOR_DATA_LINES / EDITOR_MEM_POOL_LINE_PER_CHUNK + 1) +enum _editor_constant_t +{ + EDITOR_MEM_POOL_LINE_PER_CHUNK = 1000, + EDITOR_MEM_POOL_CHUNK_LIMIT = (MAX_EDITOR_DATA_LINES / EDITOR_MEM_POOL_LINE_PER_CHUNK + 1), +}; + +static const char EDITOR_ESC_DISPLAY_STR[] = "\033[32m*\033[m"; static MEMORY_POOL *p_mp_data_line; static MEMORY_POOL *p_mp_editor_data; @@ -700,7 +704,7 @@ int editor_display(EDITOR_DATA *p_editor iflush(); str_len = 0; - ch = igetch_t(MAX_DELAY_TIME); + ch = igetch_t(BBS_max_user_idle_time); while (!SYS_server_exit) { if (ch != KEY_NULL && ch != KEY_TIMEOUT) @@ -1156,7 +1160,7 @@ int editor_display(EDITOR_DATA *p_editor break; } - ch = igetch_t(MAX_DELAY_TIME); + ch = igetch_t(BBS_max_user_idle_time); } continue;