summaryrefslogtreecommitdiffstats
path: root/mbbsd/bbs.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-16 17:41:13 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-16 17:41:13 +0800
commitdf16c8a460ca1f045be0b0c8fc789b76a6338224 (patch)
tree43496be6b7fd75cf435160cdb592a94b3addf94e /mbbsd/bbs.c
parent1b162d305b32d23c79f7d483344167f86c2a7f59 (diff)
downloadpttbbs-df16c8a460ca1f045be0b0c8fc789b76a6338224.tar
pttbbs-df16c8a460ca1f045be0b0c8fc789b76a6338224.tar.gz
pttbbs-df16c8a460ca1f045be0b0c8fc789b76a6338224.tar.bz2
pttbbs-df16c8a460ca1f045be0b0c8fc789b76a6338224.tar.lz
pttbbs-df16c8a460ca1f045be0b0c8fc789b76a6338224.tar.xz
pttbbs-df16c8a460ca1f045be0b0c8fc789b76a6338224.tar.zst
pttbbs-df16c8a460ca1f045be0b0c8fc789b76a6338224.zip
- prepare for text-only editing
- message update for modified post git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3694 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/bbs.c')
-rw-r--r--mbbsd/bbs.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index 2d068841..5443770b 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -1483,18 +1483,17 @@ edit_post(int ent, fileheader_t * fhdr, const char *direct)
#endif // EDITPOST_SMARTMERGE
+#ifdef EXP_EDITPOST_TEXTONLY
+ // experimental: "text only" editing
+ if (vedit2(fpath, 0, NULL, 1) == -1)
+ break;
+#else
if (vedit(fpath, 0, NULL) == -1)
break;
+#endif
newmt = dasht(genbuf);
- if (newmt != oldmt)
- {
- move(b_lines-7, 0);
- clrtobot();
- outs(ANSI_COLOR(1;33) "▲ 檔案已被修改過! ▲" ANSI_RESET "\n\n");
- }
-
#ifdef EDITPOST_SMARTMERGE
// only merge if file is enlarged and modified
@@ -1514,6 +1513,10 @@ edit_post(int ent, fileheader_t * fhdr, const char *direct)
if (canDoSmartMerge)
{
canDoSmartMerge = 0; // only try merge once
+
+ move(b_lines-7, 0);
+ clrtobot();
+ outs(ANSI_COLOR(1;33) "▲ 檔案已被修改過! ▲" ANSI_RESET "\n\n");
outs("進行自動合併 [Smart Merge]...\n");
// smart merge
@@ -1545,6 +1548,11 @@ edit_post(int ent, fileheader_t * fhdr, const char *direct)
if (oldmt != newmt)
{
int c = 0;
+
+ move(b_lines-7, 0);
+ clrtobot();
+ outs(ANSI_COLOR(1;31) "▲ 檔案已被修改過! ▲" ANSI_RESET "\n\n");
+
outs("可能是您在編輯的過程中有人進行推文或修文。\n"
"您可以選擇直接覆蓋\檔案(y)、放棄(n),\n"
" 或是" ANSI_COLOR(1)"重新編輯" ANSI_RESET