diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-09-07 22:06:03 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-09-07 22:06:03 +0800 |
commit | 69fca0ce26e8317c8e4dc300086aa0def644e358 (patch) | |
tree | 01b3530567fdd3741c5320e2363cae9c23ad6853 | |
parent | 2b3c33fbb42fa07b52f30524813d28e2bcb4f800 (diff) | |
download | pttbbs-69fca0ce26e8317c8e4dc300086aa0def644e358.tar pttbbs-69fca0ce26e8317c8e4dc300086aa0def644e358.tar.gz pttbbs-69fca0ce26e8317c8e4dc300086aa0def644e358.tar.bz2 pttbbs-69fca0ce26e8317c8e4dc300086aa0def644e358.tar.lz pttbbs-69fca0ce26e8317c8e4dc300086aa0def644e358.tar.xz pttbbs-69fca0ce26e8317c8e4dc300086aa0def644e358.tar.zst pttbbs-69fca0ce26e8317c8e4dc300086aa0def644e358.zip |
help compatible with traditional C.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3134 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/bbs.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index d5c3cd9b..13aa042e 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -1163,18 +1163,23 @@ edit_post(int ent, fileheader_t * fhdr, const char *direct) if (tolower(getans( "檔案已被別人修改過,要覆蓋\掉它嗎 [Y/n]?")) == 'n') { + FILE *fp, *src; + if(tolower(getans( "要把被修改過的文章附加在結尾並重新編輯嗎 [Y/n]?")) == 'n') break; /* merge new and old stuff */ - FILE *fp = fopen(fpath, "at"), *src = fopen(genbuf, "rt"); + fp = fopen(fpath, "at"); + *src = fopen(genbuf, "rt"); + if(!fp) { vmsg("抱歉,檔案已損毀。"); if(src) fclose(src); return FULLUPDATE; } + if(src) { int c = 0; |