summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-07-24 01:17:07 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-07-24 01:17:07 +0800
commit8f4e742adcf6c3572052585065663fd3511a4c86 (patch)
tree88e5699418eb9755b1ab22c78aa887e524309e71
parent92c9c372de6244105aeb620bcfd0c8af47bf732b (diff)
downloadpttbbs-8f4e742adcf6c3572052585065663fd3511a4c86.tar
pttbbs-8f4e742adcf6c3572052585065663fd3511a4c86.tar.gz
pttbbs-8f4e742adcf6c3572052585065663fd3511a4c86.tar.bz2
pttbbs-8f4e742adcf6c3572052585065663fd3511a4c86.tar.lz
pttbbs-8f4e742adcf6c3572052585065663fd3511a4c86.tar.xz
pttbbs-8f4e742adcf6c3572052585065663fd3511a4c86.tar.zst
pttbbs-8f4e742adcf6c3572052585065663fd3511a4c86.zip
remove complex #ifdef's
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2947 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/bbs.c34
1 files changed, 13 insertions, 21 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index 442823d5..121216d9 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -2555,6 +2555,13 @@ b_help(void)
static int
b_changerecommend(int ent, const fileheader_t * fhdr, const char *direct)
{
+ char *optCmds[2] = {
+ "/b", "/x"
+ };
+ char *optDesc[2] = {
+ "/噓文",
+ "/轉錄自動記錄"
+ };
boardheader_t *bp=NULL;
int touched = 0;
if (!((currmode & MODE_BOARD) || HasUserPerm(PERM_SYSOP)))
@@ -2569,34 +2576,19 @@ b_changerecommend(int ent, const fileheader_t * fhdr, const char *direct)
prints(" - %s 噓文\n",
((bp->brdattr & BRD_NORECOMMEND) || (bp->brdattr & BRD_NOBOO))
? "不可":"可以");
+#else
+ optCmds[0] = ""; optDesc[0] = "";
#endif
#ifdef AUTO_CP_LOG
prints(" - 轉錄文章時 %s 自動記錄\n",
(bp->brdattr & BRD_NOCPLOG) ? "不會":"會");
+#else
+ optCmds[1] = ""; optDesc[1] = "";
#endif
switch(tolower(getans("請按 r%s%s 設定可否 推文%s%s: ",
-#ifndef OLDRECOMMEND
- "/b",
-#else
- "",
-#endif
-#ifdef AUTO_CP_LOG
- "/x",
-#else
- "",
-#endif
-#ifndef OLDRECOMMEND
- "/噓文",
-#else
- "",
-#endif
-#ifdef AUTO_CP_LOG
- "/轉錄自動記錄"
-#else
- ""
-#endif
- )))
+ optCmds[0], optCmds[1],
+ optDesc[0], optDesc[1])))
{
#ifdef AUTO_CP_LOG
case 'x':