diff options
-rw-r--r-- | mbbsd/admin.c | 12 | ||||
-rw-r--r-- | mbbsd/announce.c | 6 | ||||
-rw-r--r-- | mbbsd/board.c | 8 | ||||
-rw-r--r-- | mbbsd/cal.c | 6 | ||||
-rw-r--r-- | mbbsd/calendar.c | 10 | ||||
-rw-r--r-- | mbbsd/edit.c | 6 | ||||
-rw-r--r-- | mbbsd/guess.c | 4 | ||||
-rw-r--r-- | mbbsd/menu.c | 4 | ||||
-rw-r--r-- | mbbsd/more.c | 4 | ||||
-rw-r--r-- | mbbsd/register.c | 4 | ||||
-rw-r--r-- | mbbsd/stuff.c | 4 | ||||
-rw-r--r-- | mbbsd/talk.c | 10 | ||||
-rw-r--r-- | mbbsd/vote.c | 4 | ||||
-rw-r--r-- | mbbsd/xyz.c | 6 |
14 files changed, 44 insertions, 44 deletions
diff --git a/mbbsd/admin.c b/mbbsd/admin.c index a060a123..3b41802f 100644 --- a/mbbsd/admin.c +++ b/mbbsd/admin.c @@ -1,4 +1,4 @@ -/* $Id: admin.c,v 1.29 2002/07/22 19:02:00 in2 Exp $ */ +/* $Id: admin.c,v 1.30 2003/01/16 11:58:04 kcwu Exp $ */ #include "bbs.h" /* 使用者管理 */ @@ -724,15 +724,15 @@ int scan_register_form(char *regfile, int automode, int neednum) { char genbuf[200]; - static char *logfile = "register.log"; - static char *field[] = { + char *logfile = "register.log"; + char *field[] = { "uid", "ident", "name", "career", "addr", "phone", "email", NULL }; - static char *finfo[] = { + char *finfo[] = { "帳號", "身分證號", "真實姓名", "服務單位", "目前住址", "連絡電話", "電子郵件信箱", NULL }; - static char *reason[] = { + char *reason[] = { "輸入真實姓名", "詳細填寫您的「學校以及『科系』『年級』」或「服務單位(詳細至職稱)」", "填寫完整的住址資料 (含縣市名稱, 台北市請含行政區域)", @@ -741,7 +741,7 @@ scan_register_form(char *regfile, int automode, int neednum) "用中文填寫申請單", NULL }; - static char *autoid = "AutoScan"; + char *autoid = "AutoScan"; userec_t muser; FILE *fn, *fout, *freg; char fdata[7][STRLEN]; diff --git a/mbbsd/announce.c b/mbbsd/announce.c index 723a55fb..a1a5797b 100644 --- a/mbbsd/announce.c +++ b/mbbsd/announce.c @@ -1,10 +1,10 @@ -/* $Id: announce.c,v 1.17 2002/07/27 10:04:34 kcwu Exp $ */ +/* $Id: announce.c,v 1.18 2003/01/16 11:58:04 kcwu Exp $ */ #include "bbs.h" static void g_showmenu(gmenu_t * pm) { - static char *mytype = "編 選 絲路之旅"; + char *mytype = "編 選 絲路之旅"; char *title, ch; int n, max; item_t *item; @@ -762,7 +762,7 @@ a_additem(menu_t * pm, fileheader_t * myheader) static void a_newitem(menu_t * pm, int mode) { - static char *mesg[4] = { + char *mesg[4] = { "[新增文章] 請輸入標題:", /* ADDITEM */ "[新增目錄] 請輸入標題:", /* ADDGROUP */ "[新增連線] 請輸入標題:", /* ADDGOPHER */ diff --git a/mbbsd/board.c b/mbbsd/board.c index fadba9d8..98b88b87 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -1,4 +1,4 @@ -/* $Id: board.c,v 1.67 2003/01/15 09:11:47 kcwu Exp $ */ +/* $Id: board.c,v 1.68 2003/01/16 11:58:04 kcwu Exp $ */ #include "bbs.h" #define BRC_STRLEN 15 /* Length of board name */ #define BRC_MAXSIZE 24576 @@ -517,7 +517,7 @@ load_boards(char *key) } brdnum = 0; if (class_bid <= 0) { - static boardstat_t *tmp = NULL; + boardstat_t *tmp = NULL; nbrd = (boardstat_t *) malloc(sizeof(boardstat_t) * numboards); for (i = 0; i < numboards; i++) { if ((bptr = SHM->bsorted[type][i]) == NULL) @@ -657,10 +657,10 @@ show_brdlist(int head, int clsflag, int newflag) } if (brdnum > 0) { boardstat_t *ptr; - static char *color[8] = {"", "\033[32m", + char *color[8] = {"", "\033[32m", "\033[33m", "\033[36m", "\033[34m", "\033[1m", "\033[1;32m", "\033[1;33m"}; - static char *unread[2] = {"\33[37m \033[m", "\033[1;31mˇ\033[m"}; + char *unread[2] = {"\33[37m \033[m", "\033[1;31mˇ\033[m"}; while (++myrow < b_lines) { move(myrow, 0); diff --git a/mbbsd/cal.c b/mbbsd/cal.c index e4ecc8cf..48151b7c 100644 --- a/mbbsd/cal.c +++ b/mbbsd/cal.c @@ -1,4 +1,4 @@ -/* $Id: cal.c,v 1.20 2002/08/23 11:33:01 in2 Exp $ */ +/* $Id: cal.c,v 1.21 2003/01/16 11:58:04 kcwu Exp $ */ #include "bbs.h" /* 防堵 Multi play */ @@ -368,8 +368,8 @@ int give_tax(int money) { int i, tax = 0; - static int tax_bound[] = {1000000, 100000, 10000, 1000, 0}; - static double tax_rate[] = {0.4, 0.3, 0.2, 0.1, 0.08}; + int tax_bound[] = {1000000, 100000, 10000, 1000, 0}; + double tax_rate[] = {0.4, 0.3, 0.2, 0.1, 0.08}; for (i = 0; i <= 4; i++) if (money > tax_bound[i]) { tax += (money - tax_bound[i]) * tax_rate[i]; diff --git a/mbbsd/calendar.c b/mbbsd/calendar.c index c4b86e89..67524a91 100644 --- a/mbbsd/calendar.c +++ b/mbbsd/calendar.c @@ -1,4 +1,4 @@ -/* $Id: calendar.c,v 1.7 2002/12/31 17:40:51 in2 Exp $ */ +/* $Id: calendar.c,v 1.8 2003/01/16 11:58:04 kcwu Exp $ */ #include "bbs.h" typedef struct event_t { @@ -11,7 +11,7 @@ typedef struct event_t { static int MonthDay(int m, int leap) { - static int day[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; + int day[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; return leap && m == 2 ? 29 : day[m - 1]; } @@ -188,13 +188,13 @@ FreeCalBuffer(char **buf) static int GenerateCalendar(char **buf, int y, int m, int today, event_t * e) { - static char *week_str[7] = {"日", "一", "二", "三", "四", "五", "六"}; - static char *month_color[12] = { + char *week_str[7] = {"日", "一", "二", "三", "四", "五", "六"}; + char *month_color[12] = { "\33[1;32m", "\33[1;33m", "\33[1;35m", "\33[1;36m", "\33[1;32m", "\33[1;33m", "\33[1;35m", "\33[1;36m", "\33[1;32m", "\33[1;33m", "\33[1;35m", "\33[1;36m" }; - static char *month_str[12] = { + char *month_str[12] = { "一月 ", "二月 ", "三月 ", "四月 ", "五月 ", "六月 ", "七月 ", "八月 ", "九月 ", "十月 ", "十一月", "十二月" }; diff --git a/mbbsd/edit.c b/mbbsd/edit.c index ec20e7c1..354a2abb 100644 --- a/mbbsd/edit.c +++ b/mbbsd/edit.c @@ -1,4 +1,4 @@ -/* $Id: edit.c,v 1.24 2002/12/31 17:40:51 in2 Exp $ */ +/* $Id: edit.c,v 1.25 2003/01/16 11:58:04 kcwu Exp $ */ #include "bbs.h" typedef struct textline_t { struct textline_t *prev; @@ -102,7 +102,7 @@ n2ansi(int nx, textline_t * line) static void edit_msg() { - static char *edit_mode[2] = {"取代", "插入"}; + char *edit_mode[2] = {"取代", "插入"}; register int n = currpnt; if (my_ansimode) /* Thor: 作 ansi 編輯 */ @@ -1226,7 +1226,7 @@ search_str(int mode) static void match_paren() { - static char parens[] = "()[]{}"; + char *parens = "()[]{}"; int type; int parenum = 0; char *ptype; diff --git a/mbbsd/guess.c b/mbbsd/guess.c index 4c365708..c2203942 100644 --- a/mbbsd/guess.c +++ b/mbbsd/guess.c @@ -1,4 +1,4 @@ -/* $Id: guess.c,v 1.9 2003/01/10 17:23:48 kcwu Exp $ */ +/* $Id: guess.c,v 1.10 2003/01/16 11:58:04 kcwu Exp $ */ #include "bbs.h" #define LOGPASS BBSHOME "/etc/winguess.log" @@ -223,7 +223,7 @@ guess_main() int *n = NULL; char yournum[5]; char *flag = NULL; - static char TABLE[] = {0, 10, 8, 4, 2, 1, 0, 0, 0, 0, 0}; + char TABLE[] = {0, 10, 8, 4, 2, 1, 0, 0, 0, 0, 0}; FILE *file; clear(); diff --git a/mbbsd/menu.c b/mbbsd/menu.c index 0fe3bd60..89c82fea 100644 --- a/mbbsd/menu.c +++ b/mbbsd/menu.c @@ -1,4 +1,4 @@ -/* $Id: menu.c,v 1.19 2002/09/04 12:54:50 kcwu Exp $ */ +/* $Id: menu.c,v 1.20 2003/01/16 11:58:04 kcwu Exp $ */ #include "bbs.h" /* help & menu processring */ @@ -106,7 +106,7 @@ void movie(int i) { static short history[MAX_HISTORY]; - static char myweek[] = "天一二三四五六"; + char *myweek = "天一二三四五六"; const char *msgs[] = {"關閉", "打開", "拔掉", "防水", "好友"}; struct tm *ptime = localtime(&now); int j; diff --git a/mbbsd/more.c b/mbbsd/more.c index a1d82e42..46f77c87 100644 --- a/mbbsd/more.c +++ b/mbbsd/more.c @@ -1,4 +1,4 @@ -/* $Id: more.c,v 1.22 2002/12/31 17:40:51 in2 Exp $ */ +/* $Id: more.c,v 1.23 2003/01/16 11:58:04 kcwu Exp $ */ #include "bbs.h" #define MORE_BUFSIZE 4096 #define MORE_WINSIZE 4096 @@ -134,7 +134,7 @@ more_readln(int fd, unsigned char *buf) int more(char *fpath, int promptend) { - static char *head[4] = {"作者", "標題", "時間", "轉信"}; + char *head[4] = {"作者", "標題", "時間", "轉信"}; char *ptr, *word = NULL, buf[ANSILINELEN + 1]; struct stat st; diff --git a/mbbsd/register.c b/mbbsd/register.c index a138a4c3..29d9ad7d 100644 --- a/mbbsd/register.c +++ b/mbbsd/register.c @@ -1,4 +1,4 @@ -/* $Id: register.c,v 1.10 2002/11/30 04:51:13 in2 Exp $ */ +/* $Id: register.c,v 1.11 2003/01/16 11:58:04 kcwu Exp $ */ #define _XOPEN_SOURCE #include "bbs.h" @@ -139,7 +139,7 @@ int getnewuserid() { char genbuf[50]; - static char *fn_fresh = ".fresh"; + char *fn_fresh = ".fresh"; userec_t utmp, zerorec; time_t clock; struct stat st; diff --git a/mbbsd/stuff.c b/mbbsd/stuff.c index 76a3a032..41d5d93e 100644 --- a/mbbsd/stuff.c +++ b/mbbsd/stuff.c @@ -1,4 +1,4 @@ -/* $Id: stuff.c,v 1.9 2002/07/22 19:02:00 in2 Exp $ */ +/* $Id: stuff.c,v 1.10 2003/01/16 11:58:04 kcwu Exp $ */ #include "bbs.h" /* ----------------------------------------------------- */ @@ -191,7 +191,7 @@ invalid_pname(char *str) int valid_ident(char *ident) { - static char *invalid[] = {"unknown@", "root@", "gopher@", "bbs@", + char *invalid[] = {"unknown@", "root@", "gopher@", "bbs@", "@bbs", "guest@", "@ppp", "@slip", NULL}; char buf[128]; int i; diff --git a/mbbsd/talk.c b/mbbsd/talk.c index 6909d726..2bc1ac53 100644 --- a/mbbsd/talk.c +++ b/mbbsd/talk.c @@ -1,4 +1,4 @@ -/* $Id: talk.c,v 1.98 2003/01/14 11:19:39 in2 Exp $ */ +/* $Id: talk.c,v 1.99 2003/01/16 11:58:04 kcwu Exp $ */ #include "bbs.h" #define QCAST int (*)(const void *, const void *) @@ -81,7 +81,7 @@ char * modestring(userinfo_t * uentp, int simple) { static char modestr[40]; - static char *notonline = "不在站上"; + char *notonline = "不在站上"; register int mode = uentp->mode; register char *word; int fri_stat; @@ -348,10 +348,10 @@ my_query(char *uident) int tuid, i, fri_stat = 0; unsigned long int j; userinfo_t *uentp; - static const char *money[10] = + const char *money[10] = {"債台高築", "赤貧", "清寒", "普通", "小康", "小富", "中富", "大富翁", "富可敵國", "比爾蓋\天"}; - static const char *sex[8] = + const char *sex[8] = {MSG_BIG_BOY, MSG_BIG_GIRL, MSG_LITTLE_BOY, MSG_LITTLE_GIRL, MSG_MAN, MSG_WOMAN, MSG_PLANT, MSG_MIME}; @@ -1398,7 +1398,7 @@ t_showhelp() static char * friend_descript(userinfo_t * uentp) { - static char *space_buf = ""; + char *space_buf = ""; static char desc_buf[80]; char fpath[80], name[IDLEN + 2], *desc, *ptr; int len, flag; diff --git a/mbbsd/vote.c b/mbbsd/vote.c index 8a8faa63..70313920 100644 --- a/mbbsd/vote.c +++ b/mbbsd/vote.c @@ -1,4 +1,4 @@ -/* $Id: vote.c,v 1.16 2002/12/31 17:40:52 in2 Exp $ */ +/* $Id: vote.c,v 1.17 2003/01/16 11:58:05 kcwu Exp $ */ #include "bbs.h" static int total; @@ -322,7 +322,7 @@ b_close(boardheader_t * fh) int b_closepolls() { - static char *fn_vote_polling = ".polling"; + char *fn_vote_polling = ".polling"; boardheader_t *fhp; FILE *cfp; int pos, dirty; diff --git a/mbbsd/xyz.c b/mbbsd/xyz.c index dba8ad13..f00087f2 100644 --- a/mbbsd/xyz.c +++ b/mbbsd/xyz.c @@ -1,4 +1,4 @@ -/* $Id: xyz.c,v 1.12 2002/07/22 19:02:01 in2 Exp $ */ +/* $Id: xyz.c,v 1.13 2003/01/16 11:58:05 kcwu Exp $ */ #include "bbs.h" /* 各種統計及相關資訊列表 */ @@ -164,8 +164,8 @@ x_gpl() int note() { - static char *fn_note_tmp = "note.tmp"; - static char *fn_note_dat = "note.dat"; + char *fn_note_tmp = "note.tmp"; + char *fn_note_dat = "note.dat"; int total = 0, i, collect, len; struct stat st; char buf[256], buf2[80]; |