From dda27c3337bfe813cff4f7fc8c3f953a9dce3c85 Mon Sep 17 00:00:00 2001 From: piaip Date: Sun, 25 Sep 2005 17:34:33 +0000 Subject: make 's' search_board in board-list work with this case: 2 boards with same prefix and user input for exactly the shorter one. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3209 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/board.c | 4 ++++ mbbsd/mbbsd.c | 2 +- mbbsd/name.c | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/board.c b/mbbsd/board.c index 2256c6f4..f84aa519 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -384,6 +384,10 @@ search_board(void) FreeNameList(); toplev = NULL; +#ifdef DEBUG + vmsg(genbuf); +#endif + for (num = 0; num < brdnum; num++) if (!strcasecmp(B_BH(&nbrd[num])->brdname, genbuf)) return num; diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index c556c908..593208d5 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -239,7 +239,7 @@ abort_bbs_debug(int sig) sigaddset(&sigset, SIGXCPU); sigprocmask(SIG_UNBLOCK, &sigset, NULL); -#define CRASH_MSG ANSI_COLOR(0) "\r\n程式異常, 立刻斷線. 請洽 PttBug 板詳述你發生的問題.\n" +#define CRASH_MSG ANSI_COLOR(0) "\r\n程式異常, 立刻斷線. 請洽 PttBug 板詳述你發生的問題.\r\n" write(1, CRASH_MSG, sizeof(CRASH_MSG)); /* close all file descriptors (including the network connection) */ diff --git a/mbbsd/name.c b/mbbsd/name.c index 85c849a7..83dcf373 100644 --- a/mbbsd/name.c +++ b/mbbsd/name.c @@ -111,7 +111,7 @@ InList(const word_t * list, const char *name) const word_t *p; for (p = list; p; p = p->next) - if (!strcmp(p->word, name)) + if (!strcasecmp(p->word, name)) return 1; return 0; } -- cgit v1.2.3