/[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.3 by sysadm, Fri Jun 13 12:01:27 2025 UTC Revision 1.4 by sysadm, Fri Jun 13 12:17:21 2025 UTC
# Line 54  int article_post(SECTION_LIST *p_section Line 54  int article_post(SECTION_LIST *p_section
54                  moveto(21, 1);                  moveto(21, 1);
55                  prints("发表文章于 %s[%s] 讨论区", p_section->stitle, p_section->sname);                  prints("发表文章于 %s[%s] 讨论区", p_section->stitle, p_section->sname);
56                  moveto(22, 1);                  moveto(22, 1);
57                  prints("使用标题: %s", (title[0] == '\0' ? "[正在设定主题]" : title));                  prints("文章标题: %s", (title[0] == '\0' ? "[无]" : title));
58                  moveto(23, 1);                  moveto(23, 1);
59                  prints("使用第 %d 个签名", sign_id);                  prints("使用第 %d 个签名", sign_id);
60    
61                  if (toupper(ch) != 'T')                  if (toupper(ch) != 'T')
62                  {                  {
63                          prints("    按0~3选签名档");                          prints("    按0~3选签名档(0表示不使用)");
64    
65                          moveto(24, 1);                          moveto(24, 1);
66                          prints("T改标题, C取消, Enter继续: ");                          prints("T改标题, C取消, Enter继续: ");
67                          iflush();                          iflush();
68                          ch = 0;                          ch = 0;
69                  }                  }
# Line 85  int article_post(SECTION_LIST *p_section Line 85  int article_post(SECTION_LIST *p_section
85                                          ;                                          ;
86                                  *q = '\0';                                  *q = '\0';
87                                  len = q - p;                                  len = q - p;
   
88                                  if (*p != '\0')                                  if (*p != '\0')
89                                  {                                  {
90                                          memcpy(title, p, (size_t)len + 1);                                          memcpy(title, p, (size_t)len + 1);
91                                          memcpy(title_input, title, (size_t)len + 1);                                          memcpy(title_input, title, (size_t)len + 1);
92                                  }                                  }
93                                  if (title[0] != '\0') // title is valid                                  ch = 0;
                                 {  
                                         ch = 0;  
                                 }  
94                                  break;                                  break;
95                          case 'C':                          case 'C':
96                                  clearscr();                                  clearscr();
# Line 115  int article_post(SECTION_LIST *p_section Line 111  int article_post(SECTION_LIST *p_section
111                          break;                          break;
112                  }                  }
113    
114                  if (ch != CR)                  if (ch != CR || title[0] == '\0')
115                  {                  {
116                          continue;                          continue;
117                  }                  }


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

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