summaryrefslogtreecommitdiffstats
path: root/mbbsd/bbs.c
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-08-05 23:40:19 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-08-05 23:40:19 +0800
commitdbd9a354806f0e6695ec8c428cf91e2ed2c77dad (patch)
treedfc3ea951f3adc0cc48d57995685deb94075c199 /mbbsd/bbs.c
parent7d4fc6115ef95c78534e5a1459e79d337f9adfa8 (diff)
downloadpttbbs-dbd9a354806f0e6695ec8c428cf91e2ed2c77dad.tar
pttbbs-dbd9a354806f0e6695ec8c428cf91e2ed2c77dad.tar.gz
pttbbs-dbd9a354806f0e6695ec8c428cf91e2ed2c77dad.tar.bz2
pttbbs-dbd9a354806f0e6695ec8c428cf91e2ed2c77dad.tar.lz
pttbbs-dbd9a354806f0e6695ec8c428cf91e2ed2c77dad.tar.xz
pttbbs-dbd9a354806f0e6695ec8c428cf91e2ed2c77dad.tar.zst
pttbbs-dbd9a354806f0e6695ec8c428cf91e2ed2c77dad.zip
incremental select_read
fix 'Q' in view post money. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2991 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/bbs.c')
-rw-r--r--mbbsd/bbs.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index 2c00c811..2a653505 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -2286,19 +2286,31 @@ show_filename(int ent, const fileheader_t * fhdr, const char *direct)
static int
view_postmoney(int ent, const fileheader_t * fhdr, const char *direct)
{
- if(currmode & MODE_SELECT){
- vmsg("請離開目前選擇/搜尋模式後再查詢");
- return FULLUPDATE;
- }
+ fileheader_t hdr;
+ char genbuf[256];
+ int num = 0, money=0;
+
if(fhdr->filemode & FILE_BOTTOM)
- /* donothing because substitute_ref_record forgot to update multi.money */
+ /* donothing because substitute_ref_record forgot to update multi.money */
vmsg("置底的文章很重要,記得看就好了,別理它的價格");
else if(fhdr->filemode & FILE_ANONYMOUS)
/* When the file is anonymous posted, fhdr->multi.anon_uid is author.
* see do_general() */
vmsg("匿名管理編號: %d (同一人號碼會一樣)",
fhdr->multi.anon_uid + (int)currutmp->pid);
+ else if(currmode & MODE_SELECT && (fhdr->multi.refer.flag) &&
+ (num = fhdr->multi.refer.ref))
+ {
+ setdirpath(genbuf, direct, ".DIR");
+ get_record(genbuf, &hdr, sizeof(hdr), num);
+ money = hdr.multi.money;
+ }
else
+ money = fhdr->multi.money;
+
+ vmsg("這一篇文章值 %d 銀", money);
+
+#ifdef WHATISIT
if (vmsg("這一篇文章值 %d 銀", fhdr->multi.money) == 'Q')
{
/* enable money listing mode */
@@ -2307,6 +2319,7 @@ view_postmoney(int ent, const fileheader_t * fhdr, const char *direct)
vmsg((currlistmode == LISTMODE_MONEY) ?
"[測試中功\能] 開啟文章價格列表模式" : "停止列出文章價格");
}
+#endif
return FULLUPDATE;
}