diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-07-22 20:06:17 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-07-22 20:06:17 +0800 |
commit | a0689bfa437cdec8d1872270b58c33647d57dfd8 (patch) | |
tree | 178180e94d82431a6ff3fec574acae2c59508851 /mbbsd/vote.c | |
parent | 952a4c62f07058da5e677ee3c3070f0e7a096f9e (diff) | |
download | pttbbs-a0689bfa437cdec8d1872270b58c33647d57dfd8.tar pttbbs-a0689bfa437cdec8d1872270b58c33647d57dfd8.tar.gz pttbbs-a0689bfa437cdec8d1872270b58c33647d57dfd8.tar.bz2 pttbbs-a0689bfa437cdec8d1872270b58c33647d57dfd8.tar.lz pttbbs-a0689bfa437cdec8d1872270b58c33647d57dfd8.tar.xz pttbbs-a0689bfa437cdec8d1872270b58c33647d57dfd8.tar.zst pttbbs-a0689bfa437cdec8d1872270b58c33647d57dfd8.zip |
ticket#31, both implemented.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2937 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/vote.c')
-rw-r--r-- | mbbsd/vote.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/mbbsd/vote.c b/mbbsd/vote.c index 0bc47449..f87ba9ac 100644 --- a/mbbsd/vote.c +++ b/mbbsd/vote.c @@ -129,6 +129,32 @@ b_suckinfile(FILE * fp, char *fname) } } +void +b_suckinfile_invis(FILE * fp, char *fname, const char *boardname) +{ + FILE *sfp; + + if ((sfp = fopen(fname, "r"))) { + char inbuf[256]; + if(fgets(inbuf, sizeof(inbuf), sfp)) + { + /* first time, try if boardname revealed. */ + char *post = strstr(inbuf, str_post1); + if(!post) post = strstr(inbuf, str_post2); + if(post) post = strstr(post, boardname); + if(post) { + /* found releaved stuff. */ + while(*boardname++) + *post++ = '?'; + } + fputs(inbuf, fp); + while (fgets(inbuf, sizeof(inbuf), sfp)) + fputs(inbuf, fp); + } + fclose(sfp); + } +} + static void b_count(const char *buf, int counts[], short item_num, int *total) { |