summaryrefslogtreecommitdiffstats
path: root/mbbsd/bbs.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-05 15:21:53 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-05 15:21:53 +0800
commite739dbc353e9733a402dbef8d44985a608679ee4 (patch)
tree44fd6365667b6a68635e76e612f48ae37a44e0a1 /mbbsd/bbs.c
parenta767a371af08be8b48743fe53657645693c81519 (diff)
downloadpttbbs-e739dbc353e9733a402dbef8d44985a608679ee4.tar
pttbbs-e739dbc353e9733a402dbef8d44985a608679ee4.tar.gz
pttbbs-e739dbc353e9733a402dbef8d44985a608679ee4.tar.bz2
pttbbs-e739dbc353e9733a402dbef8d44985a608679ee4.tar.lz
pttbbs-e739dbc353e9733a402dbef8d44985a608679ee4.tar.xz
pttbbs-e739dbc353e9733a402dbef8d44985a608679ee4.tar.zst
pttbbs-e739dbc353e9733a402dbef8d44985a608679ee4.zip
getans: reduce buffer to reflect its nature
editpost: better hints for user to understand our recovery feature git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3635 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 6728cc3b..2bd82a21 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -1347,15 +1347,23 @@ edit_post(int ent, fileheader_t * fhdr, const char *direct)
if (oldmt != newmt)
{
- if (tolower(getans(
- "檔案已被別人修改過,要覆蓋\掉它嗎 [Y/n]?")) == 'n')
+ int c = 0;
+ move(b_lines-5, 0);
+ clrtoeol();
+ outs(ANSI_COLOR(1;31) "▲ 檔案已被別人修改過! ▲" ANSI_RESET"\n");
+ outs("可能是您在編輯的過程中有人進行推文或修文。\n"
+ "您可以選擇直接覆蓋\檔案(y)、放棄(n),\n"
+ " 或是" ANSI_COLOR(1)"重新編輯" ANSI_RESET
+ "(新文會被貼到剛編的檔案後面)(e)。\n");
+ c = tolower(getans("要直接覆蓋\檔案/取消/重編嗎 [Y/n/e]?"));
+
+ if (c == 'n')
+ break;
+
+ if (c == 'e')
{
FILE *fp, *src;
- if(tolower(getans(
- "要把被修改過的文章附加在結尾並重新編輯嗎 [Y/n]?")) == 'n')
- break;
-
/* merge new and old stuff */
fp = fopen(fpath, "at");
src = fopen(genbuf, "rt");
@@ -1374,7 +1382,7 @@ edit_post(int ent, fileheader_t * fhdr, const char *direct)
struct tm *ptime;
fprintf(fp, MSG_SEPERATOR "\n");
- fprintf(fp, "以下為被別人修改過的最新內容: ");
+ fprintf(fp, "以下為被修改過的最新內容: ");
ptime = localtime4(&newmt);
fprintf(fp,
" (%02d/%02d %02d:%02d)\n",