--- lbbs/src/article_cache.c 2025/10/31 04:37:10 1.32 +++ lbbs/src/article_cache.c 2025/11/11 00:28:05 1.36 @@ -1,18 +1,14 @@ -/*************************************************************************** - article_cache.c - description - ------------------- - Copyright : (C) 2004-2025 by Leaflet - Email : leaflet@leafok.com - ***************************************************************************/ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +/* + * article_cache + * - convert article content from DB to local cache with LML conversion and line offset index + * + * Copyright (C) 2004-2025 Leaflet + */ -/*************************************************************************** - * * - * 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. * - * * - ***************************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "article_cache.h" #include "lml.h" @@ -27,10 +23,12 @@ #include #include -#define ARTICLE_HEADER_MAX_LEN 4096 -#define ARTICLE_CONTENT_MAX_LEN 1024 * 1024 * 4 // 4MB -#define ARTICLE_FOOTER_MAX_LEN 4096 -#define SUB_DT_MAX_LEN 50 +enum _article_cache_constant_t +{ + ARTICLE_HEADER_MAX_LEN = 4096, + ARTICLE_FOOTER_MAX_LEN = 4096, + SUB_DT_MAX_LEN = 50, +}; static const char *BBS_article_footer_color[] = { "\033[31m",