diff options
author | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-04-18 20:20:43 +0800 |
---|---|---|
committer | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-04-18 20:20:43 +0800 |
commit | fee7749052ac9aab275c17be9e6bf923394b63f0 (patch) | |
tree | 1957c5edbe3d4062041781c3a52efea221fae5b6 /mbbsd/admin.c | |
parent | 87755ead67ec0872404d236e3d4df5c38f5be2f7 (diff) | |
download | pttbbs-fee7749052ac9aab275c17be9e6bf923394b63f0.tar pttbbs-fee7749052ac9aab275c17be9e6bf923394b63f0.tar.gz pttbbs-fee7749052ac9aab275c17be9e6bf923394b63f0.tar.bz2 pttbbs-fee7749052ac9aab275c17be9e6bf923394b63f0.tar.lz pttbbs-fee7749052ac9aab275c17be9e6bf923394b63f0.tar.xz pttbbs-fee7749052ac9aab275c17be9e6bf923394b63f0.tar.zst pttbbs-fee7749052ac9aab275c17be9e6bf923394b63f0.zip |
use macro instead for class_bid recognition
put class_bid in file scope (board.c)
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2696 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/admin.c')
-rw-r--r-- | mbbsd/admin.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/mbbsd/admin.c b/mbbsd/admin.c index ed3b9cec..e2486ff8 100644 --- a/mbbsd/admin.c +++ b/mbbsd/admin.c @@ -796,8 +796,14 @@ static int add_board_record(const boardheader_t *board) return 0; } +/** + * open a new board + * @param whatclass In which sub class + * @param recover Forcely open a new board, often used for recovery. + * @return -1 if failed + */ int -m_newbrd(int recover) +m_newbrd(int whatclass, int recover) { boardheader_t newboard; char ans[4]; @@ -806,7 +812,7 @@ m_newbrd(int recover) stand_title("建立新板"); memset(&newboard, 0, sizeof(newboard)); - newboard.gid = class_bid; + newboard.gid = whatclass; if (newboard.gid == 0) { vmsg("請先選擇一個類別再開板!"); return -1; @@ -887,7 +893,7 @@ m_newbrd(int recover) } add_board_record(&newboard); - getbcache(class_bid)->childcount = 0; + getbcache(whatclass)->childcount = 0; pressanykey(); setup_man(&newboard, NULL); outs("\n新板成立"); |