summaryrefslogtreecommitdiffstats
path: root/mbbsd/bbs.c
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-05-07 15:36:31 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-05-07 15:36:31 +0800
commitb03bddca8a4dec4485184de9dfe87b803f4b190a (patch)
tree150ade0c76a6ee54b9ada960dfba3d9b73e43c84 /mbbsd/bbs.c
parent05f8a1d5f8d6625e30dffcc26b70e6226ff2c025 (diff)
downloadpttbbs-b03bddca8a4dec4485184de9dfe87b803f4b190a.tar
pttbbs-b03bddca8a4dec4485184de9dfe87b803f4b190a.tar.gz
pttbbs-b03bddca8a4dec4485184de9dfe87b803f4b190a.tar.bz2
pttbbs-b03bddca8a4dec4485184de9dfe87b803f4b190a.tar.lz
pttbbs-b03bddca8a4dec4485184de9dfe87b803f4b190a.tar.xz
pttbbs-b03bddca8a4dec4485184de9dfe87b803f4b190a.tar.zst
pttbbs-b03bddca8a4dec4485184de9dfe87b803f4b190a.zip
refactor show_brdlist()
I hope these local variable wont cost too much @@; git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1927 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/bbs.c')
-rw-r--r--mbbsd/bbs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index 6ac455de..d7289d88 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -1,6 +1,8 @@
/* $Id$ */
#include "bbs.h"
+#define WHEREAMI_LEVEL 16
+
static int recommend(int ent, fileheader_t * fhdr, char *direct);
#ifdef ASSESS
@@ -237,7 +239,7 @@ readdoent(int num, fileheader_t * ent)
int
whereami(int ent, fileheader_t * fhdr, char *direct)
{
- boardheader_t *bh, *p[32], *root;
+ boardheader_t *bh, *p[WHEREAMI_LEVEL], *root;
int i, j;
if (!currutmp->brc_id)
@@ -248,7 +250,7 @@ whereami(int ent, fileheader_t * fhdr, char *direct)
bh = getbcache(currutmp->brc_id);
root = getbcache(1);
p[0] = bh;
- for (i = 0; i < 31 && p[i]->parent != root && p[i]->parent; i++)
+ for (i = 0; i < WHEREAMI_LEVEL && p[i]->parent != root && p[i]->parent; i++)
p[i + 1] = p[i]->parent;
j = i;
prints("§Ú¦b­þ?\n%-40.40s %.13s\n", p[j]->title + 7, p[j]->BM);