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

Diff of /lbbs/src/article_post.c

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

Revision 1.19 by sysadm, Sun Jun 15 13:42:38 2025 UTC Revision 1.21 by sysadm, Tue Jun 17 13:17:04 2025 UTC
# Line 14  Line 14 
14   *                                                                         *   *                                                                         *
15   ***************************************************************************/   ***************************************************************************/
16    
 #define _POSIX_C_SOURCE 200809L  
   
17  #include "article_post.h"  #include "article_post.h"
18  #include "article_cache.h"  #include "article_cache.h"
19  #include "editor.h"  #include "editor.h"
# Line 485  int article_modify(const SECTION_LIST *p Line 483  int article_modify(const SECTION_LIST *p
483                  content[ARTICLE_CONTENT_MAX_LEN - 1] = '\0';                  content[ARTICLE_CONTENT_MAX_LEN - 1] = '\0';
484    
485                  // Remove control sequence                  // Remove control sequence
486                  len_content = ctrl_seq_filter(content);                  len_content = str_filter(content, 0);
487    
488                  p_editor_data = editor_data_load(content);                  p_editor_data = editor_data_load(content);
489                  if (p_editor_data == NULL)                  if (p_editor_data == NULL)
# Line 741  int article_reply(const SECTION_LIST *p_ Line 739  int article_reply(const SECTION_LIST *p_
739    
740          p_article_new->title[0] = '\0';          p_article_new->title[0] = '\0';
741          snprintf(title_input, sizeof(title_input), "Re: %s", p_article->title);          snprintf(title_input, sizeof(title_input), "Re: %s", p_article->title);
742          len = split_line(title_input, TITLE_INPUT_MAX_LEN, &eol, &display_len);          len = split_line(title_input, TITLE_INPUT_MAX_LEN, &eol, &display_len, 0);
743          title_input[len] = '\0';          title_input[len] = '\0';
744    
745          db = db_open();          db = db_open();
# Line 834  int article_reply(const SECTION_LIST *p_ Line 832  int article_reply(const SECTION_LIST *p_
832                  content_f[len] = '\0';                  content_f[len] = '\0';
833    
834                  // Remove control sequence                  // Remove control sequence
835                  len = ctrl_seq_filter(content_f);                  len = str_filter(content_f, 0);
836    
837                  len = snprintf(content, ARTICLE_CONTENT_MAX_LEN,                  len = snprintf(content, ARTICLE_CONTENT_MAX_LEN,
838                                             "\n\n【 在 %s (%s) 的大作中提到: 】\n",                                             "\n\n【 在 %s (%s) 的大作中提到: 】\n",
839                                             p_article->username, p_article->nickname);                                             p_article->username, p_article->nickname);
840    
841                  quote_content_lines = split_data_lines(content_f, ARTICLE_QUOTE_LINE_MAX_LEN, line_offsets, ARTICLE_QUOTE_MAX_LINES + 1);                  quote_content_lines = split_data_lines(content_f, ARTICLE_QUOTE_LINE_MAX_LEN, line_offsets, ARTICLE_QUOTE_MAX_LINES + 1, 0);
842                  for (i = 0; i < quote_content_lines; i++)                  for (i = 0; i < quote_content_lines; i++)
843                  {                  {
844                          memcpy(content + len, ": ", 2); // quote line prefix                          memcpy(content + len, ": ", 2); // quote line prefix


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

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