| 32 |
#define TITLE_INPUT_MAX_LEN 72 |
#define TITLE_INPUT_MAX_LEN 72 |
| 33 |
#define ARTICLE_CONTENT_MAX_LEN 1024 * 1024 * 4 // 4MB |
#define ARTICLE_CONTENT_MAX_LEN 1024 * 1024 * 4 // 4MB |
| 34 |
#define ARTICLE_QUOTE_MAX_LINES 20 |
#define ARTICLE_QUOTE_MAX_LINES 20 |
|
#define ARTICLE_QUOTE_LINE_MAX_LEN 76 |
|
| 35 |
|
|
| 36 |
#define MODIFY_DT_MAX_LEN 50 |
#define MODIFY_DT_MAX_LEN 50 |
| 37 |
|
|
| 118 |
case KEY_TIMEOUT: |
case KEY_TIMEOUT: |
| 119 |
goto cleanup; |
goto cleanup; |
| 120 |
case CR: |
case CR: |
|
igetch_reset(); |
|
| 121 |
break; |
break; |
| 122 |
case 'T': |
case 'T': |
| 123 |
len = get_data(24, 1, "标题: ", title_input, sizeof(title_input), TITLE_INPUT_MAX_LEN); |
len = get_data(24, 1, "标题: ", title_input, sizeof(title_input), TITLE_INPUT_MAX_LEN); |
| 181 |
case KEY_TIMEOUT: |
case KEY_TIMEOUT: |
| 182 |
goto cleanup; |
goto cleanup; |
| 183 |
case CR: |
case CR: |
|
igetch_reset(); |
|
| 184 |
case 'S': |
case 'S': |
| 185 |
break; |
break; |
| 186 |
case 'C': |
case 'C': |
| 531 |
case KEY_TIMEOUT: |
case KEY_TIMEOUT: |
| 532 |
goto cleanup; |
goto cleanup; |
| 533 |
case CR: |
case CR: |
|
igetch_reset(); |
|
| 534 |
case 'S': |
case 'S': |
| 535 |
break; |
break; |
| 536 |
case 'C': |
case 'C': |
| 850 |
} |
} |
| 851 |
|
|
| 852 |
// Apply LML render to content body |
// Apply LML render to content body |
| 853 |
len = lml_render(row[1], content_f, ARTICLE_CONTENT_MAX_LEN, 0); |
len = lml_render(row[1], content_f, ARTICLE_CONTENT_MAX_LEN, SCREEN_COLS - 3, 1); |
| 854 |
content_f[len] = '\0'; |
content_f[len] = '\0'; |
| 855 |
|
|
| 856 |
// Remove control sequence |
// Remove control sequence |
| 860 |
"\n\n【 在 %s (%s) 的大作中提到: 】\n", |
"\n\n【 在 %s (%s) 的大作中提到: 】\n", |
| 861 |
p_article->username, p_article->nickname); |
p_article->username, p_article->nickname); |
| 862 |
|
|
| 863 |
quote_content_lines = split_data_lines(content_f, ARTICLE_QUOTE_LINE_MAX_LEN, line_offsets, ARTICLE_QUOTE_MAX_LINES + 1, 0, NULL); |
quote_content_lines = split_data_lines(content_f, SCREEN_COLS, line_offsets, ARTICLE_QUOTE_MAX_LINES + 1, 0, NULL); |
| 864 |
for (i = 0; i < quote_content_lines; i++) |
for (i = 0; i < quote_content_lines; i++) |
| 865 |
{ |
{ |
| 866 |
memcpy(content + len, ": ", 2); // quote line prefix |
memcpy(content + len, ": ", 2); // quote line prefix |
| 930 |
case KEY_TIMEOUT: |
case KEY_TIMEOUT: |
| 931 |
goto cleanup; |
goto cleanup; |
| 932 |
case CR: |
case CR: |
|
igetch_reset(); |
|
| 933 |
break; |
break; |
| 934 |
case 'T': |
case 'T': |
| 935 |
len = get_data(24, 1, "标题: ", title_input, sizeof(title_input), TITLE_INPUT_MAX_LEN); |
len = get_data(24, 1, "标题: ", title_input, sizeof(title_input), TITLE_INPUT_MAX_LEN); |
| 990 |
case KEY_TIMEOUT: |
case KEY_TIMEOUT: |
| 991 |
goto cleanup; |
goto cleanup; |
| 992 |
case CR: |
case CR: |
|
igetch_reset(); |
|
| 993 |
case 'S': |
case 'S': |
| 994 |
break; |
break; |
| 995 |
case 'C': |
case 'C': |