--- lbbs/src/article_post.c 2025/11/04 13:49:51 1.37 +++ lbbs/src/article_post.c 2025/11/05 03:17:12 1.40 @@ -3,7 +3,7 @@ * article_post * - user interactive feature to post / modify / reply article * - * Copyright (C) 2004-2025 by Leaflet + * Copyright (C) 2004-2025 Leaflet */ #include "article_cache.h" @@ -21,11 +21,12 @@ #include #include -#define TITLE_INPUT_MAX_LEN 72 -#define ARTICLE_CONTENT_MAX_LEN 1024 * 1024 * 4 // 4MB -#define ARTICLE_QUOTE_MAX_LINES 20 - -#define MODIFY_DT_MAX_LEN 50 +enum _article_post_constant_t +{ + TITLE_INPUT_MAX_LEN = 72, + ARTICLE_QUOTE_MAX_LINES = 20, + MODIFY_DT_MAX_LEN = 50, +}; int article_post(const SECTION_LIST *p_section, ARTICLE *p_article_new) { @@ -102,7 +103,7 @@ int article_post(const SECTION_LIST *p_s ch = 0; } - for (; !SYS_server_exit; ch = igetch_t(MAX_DELAY_TIME)) + for (; !SYS_server_exit; ch = igetch_t(BBS_max_user_idle_time)) { switch (toupper(ch)) { @@ -165,7 +166,7 @@ int article_post(const SECTION_LIST *p_s prints("(S)发送, (C)取消, (T)更改标题 or (E)再编辑? [S]: "); iflush(); - for (ch = 0; !SYS_server_exit; ch = igetch_t(MAX_DELAY_TIME)) + for (ch = 0; !SYS_server_exit; ch = igetch_t(BBS_max_user_idle_time)) { switch (toupper(ch)) { @@ -516,7 +517,7 @@ int article_modify(const SECTION_LIST *p (reply_note ? "关闭" : "开启")); iflush(); - ch = igetch_t(MAX_DELAY_TIME); + ch = igetch_t(BBS_max_user_idle_time); switch (toupper(ch)) { case KEY_NULL: @@ -914,7 +915,7 @@ int article_reply(const SECTION_LIST *p_ ch = 0; } - for (; !SYS_server_exit; ch = igetch_t(MAX_DELAY_TIME)) + for (; !SYS_server_exit; ch = igetch_t(BBS_max_user_idle_time)) { switch (toupper(ch)) { @@ -974,7 +975,7 @@ int article_reply(const SECTION_LIST *p_ prints("(S)发送, (C)取消, (T)更改标题 or (E)再编辑? [S]: "); iflush(); - for (ch = 0; !SYS_server_exit; ch = igetch_t(MAX_DELAY_TIME)) + for (ch = 0; !SYS_server_exit; ch = igetch_t(BBS_max_user_idle_time)) { switch (toupper(ch)) {