From 8f4e742adcf6c3572052585065663fd3511a4c86 Mon Sep 17 00:00:00 2001 From: piaip Date: Sat, 23 Jul 2005 17:17:07 +0000 Subject: remove complex #ifdef's git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2947 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/bbs.c | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) (limited to 'mbbsd') 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': -- cgit v1.2.3