| 31 |
#define ARTICLE_FOOTER_MAX_LEN 4096 |
#define ARTICLE_FOOTER_MAX_LEN 4096 |
| 32 |
#define SUB_DT_MAX_LEN 50 |
#define SUB_DT_MAX_LEN 50 |
| 33 |
|
|
| 34 |
|
static const char *BBS_article_footer_color[] = { |
| 35 |
|
"\033[31m", |
| 36 |
|
"\033[32m", |
| 37 |
|
"\033[33m", |
| 38 |
|
"\033[34m", |
| 39 |
|
"\033[35m", |
| 40 |
|
"\033[36m", |
| 41 |
|
"\033[37m", |
| 42 |
|
}; |
| 43 |
|
static const int BBS_article_footer_color_count = 7; |
| 44 |
|
|
| 45 |
inline static int article_cache_path(char *file_path, size_t buf_len, const char *cache_dir, const ARTICLE *p_article) |
inline static int article_cache_path(char *file_path, size_t buf_len, const char *cache_dir, const ARTICLE *p_article) |
| 46 |
{ |
{ |
| 47 |
if (file_path == NULL || cache_dir == NULL || p_article == NULL) |
if (file_path == NULL || cache_dir == NULL || p_article == NULL) |
| 108 |
p_article->username, p_article->nickname, p_section->sname, p_section->stitle, p_article->title, BBS_name, str_sub_dt); |
p_article->username, p_article->nickname, p_section->sname, p_section->stitle, p_article->title, BBS_name, str_sub_dt); |
| 109 |
|
|
| 110 |
snprintf(footer, sizeof(footer), |
snprintf(footer, sizeof(footer), |
| 111 |
"--\n¡ù À´Ô´: %s https://%s [FROM: %s]\n", |
"--\n%s¡ù À´Ô´: %s http://%s [FROM: %s]\033[m\n", |
| 112 |
|
BBS_article_footer_color[p_article->aid % BBS_article_footer_color_count], |
| 113 |
BBS_name, BBS_server, sub_ip); |
BBS_name, BBS_server, sub_ip); |
| 114 |
|
|
| 115 |
header_len = strnlen(header, sizeof(header)); |
header_len = strnlen(header, sizeof(header)); |