| 111 |
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); |
| 112 |
|
|
| 113 |
snprintf(footer, sizeof(footer), |
snprintf(footer, sizeof(footer), |
| 114 |
"--\n%s¡ù À´Ô´: %s http://%s [FROM: %s]\033[m\n", |
"--\n%s¡ù À´Ô´: %s http://%s [FROM: %s]\033[m\n\n", |
| 115 |
BBS_article_footer_color[p_article->aid % BBS_article_footer_color_count], |
BBS_article_footer_color[p_article->aid % BBS_article_footer_color_count], |
| 116 |
BBS_name, BBS_server, sub_ip); |
BBS_name, BBS_server, sub_ip); |
| 117 |
|
|
| 122 |
|
|
| 123 |
if (header_len != cache.line_offsets[header_line_cnt]) |
if (header_len != cache.line_offsets[header_line_cnt]) |
| 124 |
{ |
{ |
| 125 |
log_std("Header of article(aid=%d) is truncated from %ld to %ld\n", p_article->aid, header_len, cache.line_offsets[header_line_cnt]); |
log_common("Header of article(aid=%d) is truncated from %ld to %ld\n", p_article->aid, header_len, cache.line_offsets[header_line_cnt]); |
| 126 |
header_len = (size_t)cache.line_offsets[header_line_cnt]; |
header_len = (size_t)cache.line_offsets[header_line_cnt]; |
| 127 |
} |
} |
| 128 |
|
|
| 134 |
|
|
| 135 |
if (cache.data_len - header_len != (size_t)cache.line_offsets[cache.line_total]) |
if (cache.data_len - header_len != (size_t)cache.line_offsets[cache.line_total]) |
| 136 |
{ |
{ |
| 137 |
log_std("Body of article(aid=%d) is truncated from %ld to %ld\n", |
log_common("Body of article(aid=%d) is truncated from %ld to %ld\n", |
| 138 |
p_article->aid, cache.data_len - header_len, cache.line_offsets[cache.line_total]); |
p_article->aid, cache.data_len - header_len, cache.line_offsets[cache.line_total]); |
| 139 |
cache.data_len = header_len + (size_t)(cache.line_offsets[cache.line_total]); |
cache.data_len = header_len + (size_t)(cache.line_offsets[cache.line_total]); |
| 140 |
} |
} |
| 148 |
|
|
| 149 |
if (footer_len != cache.line_offsets[cache.line_total + footer_line_cnt]) |
if (footer_len != cache.line_offsets[cache.line_total + footer_line_cnt]) |
| 150 |
{ |
{ |
| 151 |
log_std("Footer of article(aid=%d) is truncated from %ld to %ld\n", |
log_common("Footer of article(aid=%d) is truncated from %ld to %ld\n", |
| 152 |
p_article->aid, footer_len, cache.line_offsets[cache.line_total + footer_line_cnt]); |
p_article->aid, footer_len, cache.line_offsets[cache.line_total + footer_line_cnt]); |
| 153 |
footer_len = (size_t)(cache.line_offsets[cache.line_total + footer_line_cnt]); |
footer_len = (size_t)(cache.line_offsets[cache.line_total + footer_line_cnt]); |
| 154 |
} |
} |