/[LeafOK_CVS]/lbbs/src/article_cache.c
ViewVC logotype

Diff of /lbbs/src/article_cache.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.5 by sysadm, Sat May 31 12:00:00 2025 UTC Revision 1.7 by sysadm, Sat May 31 13:01:29 2025 UTC
# Line 31  Line 31 
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)
# Line 97  int article_cache_generate(const char *c Line 108  int article_cache_generate(const char *c
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));


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1