diff options
-rw-r--r-- | mbbsd/edit.c | 4 | ||||
-rw-r--r-- | mbbsd/go.c | 2 | ||||
-rw-r--r-- | mbbsd/mbbsd.c | 2 | ||||
-rw-r--r-- | mbbsd/menu.c | 4 | ||||
-rw-r--r-- | mbbsd/stuff.c | 8 | ||||
-rw-r--r-- | mbbsd/var.c | 46 | ||||
-rw-r--r-- | mbbsd/vote.c | 18 | ||||
-rw-r--r-- | util/newvers.sh | 2 |
8 files changed, 43 insertions, 43 deletions
diff --git a/mbbsd/edit.c b/mbbsd/edit.c index 29d5a91d..3de5946c 100644 --- a/mbbsd/edit.c +++ b/mbbsd/edit.c @@ -153,7 +153,7 @@ static editor_internal_t *curr_buf = NULL; static const char fp_bak[] = "bak"; -static const char *BIG5[13] = { +static const char * const BIG5[13] = { "¡A¡F¡G¡B¡N¡C¡H¡I¡E¡T¡]¡^¡©¡ª¡«¡¬", "¢b¢c¢d¢e¢f¢g¢h¢i¢j¢k¢l¢m¢n¢o¢pùþ ", "¡³¡ó¡·¡´¡¸¡¹¡¼¡½¡¿¡¶¡¾¡µ¡º¡»¡ð¡ñ", @@ -169,7 +169,7 @@ static const char *BIG5[13] = { "¢¹¢º¢»¢¼¢½¢¾¢¿¢À¢Á¢Â" }; -static const char *BIG_mode[13] = { +static const char * const BIG_mode[13] = { "¼ÐÂI", "¹Ï¶ô", "¼Ð°O", @@ -34,7 +34,7 @@ static float win; //extern char *bw_chess[]; /* ©M¤¤l´Ñ¦@¥Î */ -static char *locE = "ABCDEFGHJKLMNOPQRST"; +static char * const locE = "ABCDEFGHJKLMNOPQRST"; static char AB[41]; diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index 136d5c08..db98041d 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -497,7 +497,7 @@ multi_user_check(void) } /* bad login */ -static char str_badlogin[] = "logins.bad"; +static char * const str_badlogin = "logins.bad"; static void logattempt(char *uid, char type) diff --git a/mbbsd/menu.c b/mbbsd/menu.c index 933e37b7..92255227 100644 --- a/mbbsd/menu.c +++ b/mbbsd/menu.c @@ -72,8 +72,8 @@ showtitle(char *title, char *mid) /* °Êµe³B²z */ #define FILMROW 11 -static unsigned char menu_row = 12; -static unsigned char menu_column = 20; +static const unsigned char menu_row = 12; +static const unsigned char menu_column = 20; static void show_status(void) diff --git a/mbbsd/stuff.c b/mbbsd/stuff.c index 48c29c26..ecc85458 100644 --- a/mbbsd/stuff.c +++ b/mbbsd/stuff.c @@ -5,14 +5,14 @@ /* ----------------------------------------------------- */ /* set file path for boards/user home */ /* ----------------------------------------------------- */ -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 const char * const str_home_file = "home/%c/%s/%s"; +static const char * const str_board_file = "boards/%c/%s/%s"; +static const char * const str_board_n_file = "boards/%c/%s/%s.%d"; static char cdate_buffer[32]; #define STR_DOTDIR ".DIR" -static const char *str_dotdir = STR_DOTDIR; +static const char * const str_dotdir = STR_DOTDIR; void sethomepath(char *buf, const char *userid) diff --git a/mbbsd/var.c b/mbbsd/var.c index 04d7e407..ccca630a 100644 --- a/mbbsd/var.c +++ b/mbbsd/var.c @@ -105,22 +105,22 @@ unsigned char currfmode; /* current file mode */ /* global string variables */ /* filename */ -char *fn_passwd = FN_PASSWD; -char *fn_board = FN_BOARD; -char *fn_register = "register.new"; -char *fn_note_ans = FN_NOTE_ANS; -const char *fn_plans = "plans"; -const char *fn_writelog = "writelog"; -const char *fn_talklog = "talklog"; -const char *fn_overrides = FN_OVERRIDES; -const char *fn_reject = FN_REJECT; -const char *fn_canvote = FN_CANVOTE; -const char *fn_notes = "notes"; -const char *fn_water = FN_WATER; -const char *fn_visable = FN_VISABLE; -const char *fn_mandex = "/.Names"; -const char *fn_boardlisthelp = FN_BRDLISTHELP; -const char *fn_boardhelp = FN_BOARDHELP; +char * const fn_passwd = FN_PASSWD; +char * const fn_board = FN_BOARD; +char * const fn_register = "register.new"; +char * const fn_note_ans = FN_NOTE_ANS; +const char * const fn_plans = "plans"; +const char * const fn_writelog = "writelog"; +const char * const fn_talklog = "talklog"; +const char * const fn_overrides = FN_OVERRIDES; +const char * const fn_reject = FN_REJECT; +const char * const fn_canvote = FN_CANVOTE; +const char * const fn_notes = "notes"; +const char * const fn_water = FN_WATER; +const char * const fn_visable = FN_VISABLE; +const char * const fn_mandex = "/.Names"; +const char * const fn_boardlisthelp = FN_BRDLISTHELP; +const char * const fn_boardhelp = FN_BOARDHELP; /* are descript in userec.loginview */ @@ -318,15 +318,15 @@ int t_lines = 24; // term lines int p_lines = 20; int t_columns = 80; char * const strtstandout = "\33[7m"; -int strtstandoutlen = 4; +const int strtstandoutlen = 4; char * const endstandout = "\33[m"; -int endstandoutlen = 3; +const int endstandoutlen = 3; char * const clearbuf = "\33[H\33[J"; -int clearbuflen = 6; -char *cleolbuf = "\33[K"; -int cleolbuflen = 3; -char *scrollrev = "\33M"; -int scrollrevlen = 2; +const int clearbuflen = 6; +char * const cleolbuf = "\33[K"; +const int cleolbuflen = 3; +char * const scrollrev = "\33M"; +const int scrollrevlen = 2; int automargins = 1; /* io.c */ diff --git a/mbbsd/vote.c b/mbbsd/vote.c index 8906b4e8..191acf88 100644 --- a/mbbsd/vote.c +++ b/mbbsd/vote.c @@ -4,15 +4,15 @@ #define MAX_VOTE_NR 20 #define MAX_VOTE_PAGE 5 -const char *STR_bv_control = "control"; /* §ë²¼¤é´Á ¿ï¶µ */ -const char *STR_bv_desc = "desc"; /* §ë²¼¥Øªº */ -const char *STR_bv_ballots = "ballots"; /* §ëªº²¼ (per byte) */ -const char *STR_bv_flags = "flags"; -const char *STR_bv_comments = "comments"; /* §ë²¼ªÌªº«Øij */ -const char *STR_bv_limited = "limited"; /* ¨p¤H§ë²¼ */ -const char *STR_bv_title = "vtitle"; - -const char STR_bv_results[] = "results"; +const char * const STR_bv_control = "control"; /* §ë²¼¤é´Á ¿ï¶µ */ +const char * const STR_bv_desc = "desc"; /* §ë²¼¥Øªº */ +const char * const STR_bv_ballots = "ballots"; /* §ëªº²¼ (per byte) */ +const char * const STR_bv_flags = "flags"; +const char * const STR_bv_comments = "comments"; /* §ë²¼ªÌªº«Øij */ +const char * const STR_bv_limited = "limited"; /* ¨p¤H§ë²¼ */ +const char * const STR_bv_title = "vtitle"; + +const char * const STR_bv_results = "results"; typedef struct { char control[sizeof("controlXX\0")]; diff --git a/util/newvers.sh b/util/newvers.sh index 992fd7fe..7f0a994f 100644 --- a/util/newvers.sh +++ b/util/newvers.sh @@ -4,5 +4,5 @@ t=`date` cat << EOF > vers.c -char *compile_time = "${t}"; +char * const compile_time = "${t}"; EOF |