diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-03-03 07:38:18 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-03-03 07:38:18 +0800 |
commit | d3829ef075e6227a9a4b92ad707e7ad3b490aacd (patch) | |
tree | 836007e84dd95e68c9e337ae69659cf622120bf5 | |
parent | 11cf3f25d98f02e3e02984b5e372159d9b6c555b (diff) | |
download | pttbbs-d3829ef075e6227a9a4b92ad707e7ad3b490aacd.tar pttbbs-d3829ef075e6227a9a4b92ad707e7ad3b490aacd.tar.gz pttbbs-d3829ef075e6227a9a4b92ad707e7ad3b490aacd.tar.bz2 pttbbs-d3829ef075e6227a9a4b92ad707e7ad3b490aacd.tar.lz pttbbs-d3829ef075e6227a9a4b92ad707e7ad3b490aacd.tar.xz pttbbs-d3829ef075e6227a9a4b92ad707e7ad3b490aacd.tar.zst pttbbs-d3829ef075e6227a9a4b92ad707e7ad3b490aacd.zip |
warning free: "static" should be in front of "const"
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2569 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/chat.c | 2 | ||||
-rw-r--r-- | mbbsd/dark.c | 2 | ||||
-rw-r--r-- | mbbsd/friend.c | 2 | ||||
-rw-r--r-- | mbbsd/gomo.c | 2 | ||||
-rw-r--r-- | mbbsd/io.c | 2 | ||||
-rw-r--r-- | mbbsd/mail.c | 2 | ||||
-rw-r--r-- | mbbsd/menu.c | 22 | ||||
-rw-r--r-- | mbbsd/othello.c | 8 | ||||
-rw-r--r-- | mbbsd/stuff.c | 8 |
9 files changed, 25 insertions, 25 deletions
diff --git a/mbbsd/chat.c b/mbbsd/chat.c index 5e9be5e3..36763341 100644 --- a/mbbsd/chat.c +++ b/mbbsd/chat.c @@ -258,7 +258,7 @@ typedef struct chat_command_t { void (*cmdfunc) (); /* Pointer to function */ } chat_command_t; -const static chat_command_t chat_cmdtbl[] = { +static const chat_command_t chat_cmdtbl[] = { {"help", chat_help}, {"clear", chat_clear}, {"date", chat_date}, diff --git a/mbbsd/dark.c b/mbbsd/dark.c index e7d644cd..4aa36349 100644 --- a/mbbsd/dark.c +++ b/mbbsd/dark.c @@ -19,7 +19,7 @@ static cur curr; /* 6 個 bytes */ static char * const rname[] = {"兵", "炮", "傌", "車", "相", "仕", "帥"}; static char * const bname[] = {"卒", "包", "馬", "車", "象", "士", "將"}; -const static sint cury[] = {3, 5, 7, 9}, curx[] = {5, 9, 13, 17, 21, 25, 29, 33}; +static const sint cury[] = {3, 5, 7, 9}, curx[] = {5, 9, 13, 17, 21, 25, 29, 33}; static sint rcount, bcount, cont, fix; /* cont:是否可連吃 */ static sint my = 0, mx = 0, mly = -1, mlx = -1; /* 移動的座標 標 */ diff --git a/mbbsd/friend.c b/mbbsd/friend.c index a39b131f..bbb84983 100644 --- a/mbbsd/friend.c +++ b/mbbsd/friend.c @@ -10,7 +10,7 @@ char special_list[] = "list.0"; char special_des[] = "ldes.0"; /* 特別名單的上限 */ -const static unsigned int friend_max[8] = { +static const unsigned int friend_max[8] = { MAX_FRIEND, /* FRIEND_OVERRIDE */ MAX_REJECT, /* FRIEND_REJECT */ MAX_LOGIN_INFO, /* FRIEND_ALOHA */ diff --git a/mbbsd/gomo.c b/mbbsd/gomo.c index 6f15293b..c78c5e49 100644 --- a/mbbsd/gomo.c +++ b/mbbsd/gomo.c @@ -396,7 +396,7 @@ gomoku(int fd) if (draw_photo) { int line; FILE* fp; - const static char * const blank_photo[6] = { + static const char * const blank_photo[6] = { "┌──────┐", "│ 空 │", "│ 白 │", @@ -436,7 +436,7 @@ int strip_ansi(char *buf, char *str, int mode) { register int count = 0; - const static char EscapeFlag[] = { + static const char EscapeFlag[] = { /* 0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 10 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ,0, 0, 0, 0, 0, /* 20 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/mbbsd/mail.c b/mbbsd/mail.c index 0d7e3fda..dd571ee6 100644 --- a/mbbsd/mail.c +++ b/mbbsd/mail.c @@ -1272,7 +1272,7 @@ mail_waterball(int ent, fileheader_t * fhdr, char *direct) return FULLUPDATE; } #endif -const static onekey_t mail_comms[] = { +static const onekey_t mail_comms[] = { NULL, // Ctrl('A') 1 NULL, // Ctrl('B') NULL, // Ctrl('C') diff --git a/mbbsd/menu.c b/mbbsd/menu.c index b592d4da..f4a2b8d8 100644 --- a/mbbsd/menu.c +++ b/mbbsd/menu.c @@ -311,7 +311,7 @@ domenu(int cmdmode, char *cmdtitle, int cmd, const commands_t cmdtable[]) /* INDENT OFF */ /* administrator's maintain menu */ -const static commands_t adminlist[] = { +static const commands_t adminlist[] = { {m_user, PERM_ACCOUNTS, "UUser 使用者資料"}, {search_user_bypwd, PERM_SYSOP, "SSearch User 特殊搜尋使用者"}, {search_user_bybakpwd,PERM_SYSOP, "OOld User data 查閱\備份使用者資料"}, @@ -334,7 +334,7 @@ const static commands_t adminlist[] = { }; /* mail menu */ -const static commands_t maillist[] = { +static const commands_t maillist[] = { {m_new, PERM_READMAIL, "RNew 閱\讀新進郵件"}, {m_read, PERM_READMAIL, "RRead 多功\能讀信選單"}, {m_send, PERM_LOGINOK, "RSend 站內寄信"}, @@ -350,7 +350,7 @@ const static commands_t maillist[] = { }; /* Talk menu */ -const static commands_t talklist[] = { +static const commands_t talklist[] = { {t_users, 0, "UUsers 完全聊天手冊"}, {t_pager, PERM_BASIC, "PPager 切換呼叫器"}, {t_idle, 0, "IIdle 發呆"}, @@ -377,7 +377,7 @@ static int t_special() { return 0; } -const static commands_t namelist[] = { +static const commands_t namelist[] = { {t_override, PERM_LOGINOK,"OOverRide 好友名單"}, {t_reject, PERM_LOGINOK, "BBlack 壞人名單"}, {t_aloha,PERM_LOGINOK, "AALOHA 上站通知名單"}, @@ -389,7 +389,7 @@ const static commands_t namelist[] = { }; /* User menu */ -const static commands_t userlist[] = { +static const commands_t userlist[] = { {u_info, PERM_LOGINOK, "IInfo 設定個人資料與密碼"}, {calendar, PERM_LOGINOK, "CCalendar 個人行事曆"}, {u_editcalendar, PERM_LOGINOK, "CDEditCalendar 編輯個人行事曆"}, @@ -415,7 +415,7 @@ const static commands_t userlist[] = { }; /* XYZ tool menu */ -const static commands_t xyzlist[] = { +static const commands_t xyzlist[] = { #ifdef HAVE_LICENSE {x_gpl, 0, "LLicense GNU 使用執照"}, #endif @@ -438,7 +438,7 @@ const static commands_t xyzlist[] = { }; /* Ptt money menu */ -const static commands_t moneylist[] = { +static const commands_t moneylist[] = { {p_give, 0, "00Give 給其他人錢"}, {save_violatelaw, 0,"11ViolateLaw 繳罰單"}, #if !HAVE_FREECLOAK @@ -476,7 +476,7 @@ static int playground(); static int chessroom(); /* Ptt Play menu */ -const static commands_t playlist[] = { +static const commands_t playlist[] = { #if 0 #if HAVE_JCEE {m_jcee, PERM_LOGINOK, "JJCEE 【 大學聯考查榜系統 】"}, @@ -496,7 +496,7 @@ const static commands_t playlist[] = { {NULL, 0, NULL} }; -const static commands_t chesslist[] = { +static const commands_t chesslist[] = { {chc_main, PERM_LOGINOK, "11ChessFight 【\033[1;33m 象棋邀局 \033[m】"}, {chc_personal, PERM_LOGINOK, "22SelfPlay 【\033[1;34m 象棋打譜 \033[m】"}, {chc_watch, PERM_LOGINOK, "33ChessWatch 【\033[1;35m 象棋觀棋 \033[m】"}, @@ -509,7 +509,7 @@ static int chessroom() { return 0; } -const static commands_t plist[] = { +static const commands_t plist[] = { /* {p_ticket_main, PERM_LOGINOK,"00Pre 【 總統機 】"}, {alive, PERM_LOGINOK, "00Alive 【 訂票雞 】"}, @@ -530,7 +530,7 @@ static int playground() { return 0; } -const static commands_t slist[] = { +static const commands_t slist[] = { {x_dict,0, "11Dictionary " "【\033[1;33m 趣味大字典 \033[m】"}, {x_mrtmap, 0, "22MRTmap " diff --git a/mbbsd/othello.c b/mbbsd/othello.c index 3392ca02..38f9175d 100644 --- a/mbbsd/othello.c +++ b/mbbsd/othello.c @@ -21,9 +21,9 @@ #define INVERT(COLOR) (((COLOR))==WHITE?BLACK:WHITE) static char nowx = 3, nowy = 3; -const static char *CHESS_TYPE[] = {NONE_CHESS, HINT_CHESS, BLACK_CHESS, WHITE_CHESS}; -const static char DIRX[] = {-1, -1, -1, 0, 1, 1, 1, 0}; -const static char DIRY[] = {-1, 0, 1, 1, 1, 0, -1, -1}; +static const char *CHESS_TYPE[] = {NONE_CHESS, HINT_CHESS, BLACK_CHESS, WHITE_CHESS}; +static const char DIRX[] = {-1, -1, -1, 0, 1, 1, 1, 0}; +static const char DIRY[] = {-1, 0, 1, 1, 1, 0, -1, -1}; static char number[2]; static char pass = 0; @@ -41,7 +41,7 @@ static char nowboard[10][10] = {-1, NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, -1}, {-1, NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, -1}, {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1}}; -const static char init_table[NR_TABLE + 1][5][5] = { +static const char init_table[NR_TABLE + 1][5][5] = { {{0, 0, 0, 0, 0}, {0, 30, -3, 2, 2}, {0, -3, -3, -1, -1}, diff --git a/mbbsd/stuff.c b/mbbsd/stuff.c index ba3253bf..c1667261 100644 --- a/mbbsd/stuff.c +++ b/mbbsd/stuff.c @@ -5,14 +5,14 @@ /* ----------------------------------------------------- */ /* set file path for boards/user home */ /* ----------------------------------------------------- */ -const static char *str_home_file = "home/%c/%s/%s"; -const static char *str_board_file = "boards/%c/%s/%s"; -const static char *str_board_n_file = "boards/%c/%s/%s.%d"; +static const char *str_home_file = "home/%c/%s/%s"; +static const char *str_board_file = "boards/%c/%s/%s"; +static const char *str_board_n_file = "boards/%c/%s/%s.%d"; static char cdate_buffer[32]; #define STR_DOTDIR ".DIR" -const static char *str_dotdir = STR_DOTDIR; +static const char *str_dotdir = STR_DOTDIR; void sethomepath(char *buf, const char *userid) |