From d194a664d5cadd9e69d15bc6d397108a4ae4528a Mon Sep 17 00:00:00 2001 From: kcwu Date: Fri, 17 Jan 2003 08:49:34 +0000 Subject: free namelist after using immediately git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk@624 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- pttbbs/include/proto.h | 3 ++- pttbbs/mbbsd/board.c | 4 +++- pttbbs/mbbsd/name.c | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pttbbs/include/proto.h b/pttbbs/include/proto.h index a844e483..708353c8 100644 --- a/pttbbs/include/proto.h +++ b/pttbbs/include/proto.h @@ -1,4 +1,4 @@ -/* $Id: proto.h,v 1.34 2003/01/16 14:38:35 kcwu Exp $ */ +/* $Id: proto.h,v 1.35 2003/01/17 08:49:34 kcwu Exp $ */ #ifndef INCLUDE_PROTO_H #define INCLUDE_PROTO_H @@ -314,6 +314,7 @@ int more(char *fpath, int promptend); void usercomplete(char *prompt, char *data); void namecomplete(char *prompt, char *data); void AddNameList(char *name); +void FreeNameList(); void CreateNameList(); int chkstr(char *otag, char *tag, char *name); int InNameList(char *name); diff --git a/pttbbs/mbbsd/board.c b/pttbbs/mbbsd/board.c index 138b93a9..3ac9396c 100644 --- a/pttbbs/mbbsd/board.c +++ b/pttbbs/mbbsd/board.c @@ -1,4 +1,4 @@ -/* $Id: board.c,v 1.74 2003/01/17 08:42:46 kcwu Exp $ */ +/* $Id: board.c,v 1.75 2003/01/17 08:49:34 kcwu Exp $ */ #include "bbs.h" #define BRC_STRLEN 15 /* Length of board name */ #define BRC_MAXSIZE 24576 @@ -566,6 +566,8 @@ search_board() for (num = 0; num < brdnum; num++) AddNameList(nbrd[num].bh->brdname); namecomplete(MSG_SELECT_BOARD, genbuf); + FreeNameList(); + toplev = NULL; for (num = 0; num < brdnum; num++) if (!strcasecmp(nbrd[num].bh->brdname, genbuf)) diff --git a/pttbbs/mbbsd/name.c b/pttbbs/mbbsd/name.c index cbd872d9..ef1a4c5f 100644 --- a/pttbbs/mbbsd/name.c +++ b/pttbbs/mbbsd/name.c @@ -1,4 +1,4 @@ -/* $Id: name.c,v 1.14 2002/07/22 19:02:00 in2 Exp $ */ +/* $Id: name.c,v 1.15 2003/01/17 08:49:34 kcwu Exp $ */ #include "bbs.h" static word_t *current = NULL; @@ -42,7 +42,7 @@ UserSubArray(char cwbuf[][IDLEN + 1], char cwlist[][IDLEN + 1], return num; } -static void +void FreeNameList() { word_t *p, *temp; -- cgit v1.2.3