summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-08-18 01:28:14 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-08-18 01:28:14 +0800
commit8319804fdf2aca16a1e206e26f13c7b386cce525 (patch)
tree4f08ae4c5af1fac42d9b0eb57287330abe9519a9
parent5902b48489d6c12f430b07ac8746c96d7dbeedb1 (diff)
downloadpttbbs-8319804fdf2aca16a1e206e26f13c7b386cce525.tar
pttbbs-8319804fdf2aca16a1e206e26f13c7b386cce525.tar.gz
pttbbs-8319804fdf2aca16a1e206e26f13c7b386cce525.tar.bz2
pttbbs-8319804fdf2aca16a1e206e26f13c7b386cce525.tar.lz
pttbbs-8319804fdf2aca16a1e206e26f13c7b386cce525.tar.xz
pttbbs-8319804fdf2aca16a1e206e26f13c7b386cce525.tar.zst
pttbbs-8319804fdf2aca16a1e206e26f13c7b386cce525.zip
code cleanup.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3059 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/edit.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/mbbsd/edit.c b/mbbsd/edit.c
index 4b79abd7..ea8b1f87 100644
--- a/mbbsd/edit.c
+++ b/mbbsd/edit.c
@@ -1606,11 +1606,12 @@ write_file(char *fpath, int saveheader, int *islocal, char *mytitle)
trim(msg);
line++;
+ /* check crosspost */
if (currstat == POSTING && po ) {
- saveheader = str_checksum(msg);
- if (saveheader) {
+ int msgsum = str_checksum(msg);
+ if (msgsum) {
if (postrecord.last_bid != currbid &&
- postrecord.checksum[po] == saveheader) {
+ postrecord.checksum[po] == msgsum) {
po++;
if (po > 3) {
postrecord.times++;
@@ -1619,9 +1620,8 @@ write_file(char *fpath, int saveheader, int *islocal, char *mytitle)
}
} else
po = 1;
- if (currstat == POSTING && line >= curr_buf->totaln / 2 &&
- sum < 3) {
- checksum[sum++] = saveheader;
+ if (line >= curr_buf->totaln / 2 && sum < 3) {
+ checksum[sum++] = msgsum;
}
}
}
@@ -1638,7 +1638,7 @@ write_file(char *fpath, int saveheader, int *islocal, char *mytitle)
if (po && sum == 3) {
memcpy(&postrecord.checksum[1], checksum, sizeof(int) * 3);
if(postrecord.last_bid != currbid)
- postrecord.times = 0;
+ postrecord.times = 0;
}
if (!aborted) {
if (islocal)
@@ -1657,10 +1657,6 @@ write_file(char *fpath, int saveheader, int *islocal, char *mytitle)
ptime->tm_mon + 1, ptime->tm_mday, ptime->tm_hour, ptime->tm_min);
}
fclose(fp);
-
- if (local_article && (currstat == POSTING))
- return 0;
- return 0;
}
return aborted;
}