From 15135e4525a4294ce016f87e85841e7d3ec2164b Mon Sep 17 00:00:00 2001 From: kcwu Date: Sat, 19 Mar 2005 12:59:50 +0000 Subject: add 'const' qualifiers on function parameters. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2632 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/vote.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'mbbsd/vote.c') diff --git a/mbbsd/vote.c b/mbbsd/vote.c index 191acf88..e354f1d4 100644 --- a/mbbsd/vote.c +++ b/mbbsd/vote.c @@ -128,7 +128,7 @@ b_suckinfile(FILE * fp, char *fname) } static void -b_count(char *buf, int counts[], short item_num, int *total) +b_count(const char *buf, int counts[], short item_num, int *total) { short choice; int fd; @@ -150,7 +150,7 @@ b_count(char *buf, int counts[], short item_num, int *total) static int -b_nonzeroNum(char *buf) +b_nonzeroNum(const char *buf) { int i = 0; char inchar; @@ -166,7 +166,7 @@ b_nonzeroNum(char *buf) } static void -vote_report(char *bname, char *fname, char *fpath) +vote_report(const char *bname, const char *fname, char *fpath) { register char *ip; time4_t dtime; @@ -434,7 +434,7 @@ auto_close_polls(void) } static int -vote_view(vote_buffer_t *vbuf, char *bname, int vote_index) +vote_view(vote_buffer_t *vbuf, const char *bname, int vote_index) { boardheader_t *fhp; FILE *fp; @@ -544,7 +544,7 @@ vote_view(vote_buffer_t *vbuf, char *bname, int vote_index) } static int -vote_view_all(vote_buffer_t *vbuf, char *bname) +vote_view_all(vote_buffer_t *vbuf, const char *bname) { int i; int x = -1; @@ -592,7 +592,7 @@ vote_view_all(vote_buffer_t *vbuf, char *bname) } static int -vote_maintain(char *bname) +vote_maintain(const char *bname) { FILE *fp = NULL; char inbuf[STRLEN], buf[STRLEN]; @@ -767,7 +767,7 @@ vote_maintain(char *bname) } static int -vote_flag(vote_buffer_t *vbuf, char *bname, int index, char val) +vote_flag(vote_buffer_t *vbuf, const char *bname, int index, char val) { char buf[256], flag; int fd, num, size; @@ -795,7 +795,7 @@ vote_flag(vote_buffer_t *vbuf, char *bname, int index, char val) } static int -user_vote_one(vote_buffer_t *vbuf, char *bname, int ind) +user_vote_one(vote_buffer_t *vbuf, const char *bname, int ind) { FILE *cfp, *fcm; char buf[STRLEN], redo; @@ -1004,7 +1004,7 @@ user_vote_one(vote_buffer_t *vbuf, char *bname, int ind) } static int -user_vote(char *bname) +user_vote(const char *bname) { int pos; boardheader_t *fhp; @@ -1076,7 +1076,7 @@ user_vote(char *bname) } static int -vote_results(char *bname) +vote_results(const char *bname) { char buf[STRLEN]; -- cgit v1.2.3