summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-08-29 20:57:04 +0800
committerscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-08-29 20:57:04 +0800
commit7b0304c98bf9fac17eaf017c10fa07567758b525 (patch)
tree4616ebf5c3b4f06ce9dc9eb85dc574e32800535c
parenta198a56d7b75a0c3525ab0feb8d0013ebeae898a (diff)
downloadpttbbs-7b0304c98bf9fac17eaf017c10fa07567758b525.tar
pttbbs-7b0304c98bf9fac17eaf017c10fa07567758b525.tar.gz
pttbbs-7b0304c98bf9fac17eaf017c10fa07567758b525.tar.bz2
pttbbs-7b0304c98bf9fac17eaf017c10fa07567758b525.tar.lz
pttbbs-7b0304c98bf9fac17eaf017c10fa07567758b525.tar.xz
pttbbs-7b0304c98bf9fac17eaf017c10fa07567758b525.tar.zst
pttbbs-7b0304c98bf9fac17eaf017c10fa07567758b525.zip
Add 'const' qualifiers on functions in stuff.c.
Also fix changing of prototypes in r2174. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2173 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--include/proto.h24
-rw-r--r--mbbsd/stuff.c24
2 files changed, 24 insertions, 24 deletions
diff --git a/include/proto.h b/include/proto.h
index 905b8502..b13b6fca 100644
--- a/include/proto.h
+++ b/include/proto.h
@@ -105,9 +105,9 @@ int getbnum(const char *bname);
void reset_board(int bid);
void touch_boards(void);
void addbrd_touchcache(void);
-void setapath(char *buf, char *boardname);
+void setapath(char *buf, const char *boardname);
void setutmpmode(unsigned int mode);
-void setadir(char *buf, char *path);
+void setadir(char *buf, const char *path);
int apply_boards(int (*func)(boardheader_t *));
int haspostperm(char *bname);
void setbtotal(int bid);
@@ -376,7 +376,7 @@ char *completeutmp_getname(int where);
/* osdep */
int cpuload(char *str);
-double swapused(int *total, long *used);
+double swapused(int *total, int *used);
#ifdef __linux__
char *strcasestr(const char *big, const char *little);
#endif
@@ -471,25 +471,25 @@ int vmsg(const char *fmt,...) GCC_CHECK_FORMAT(1,2);
void trim(char *buf);
int show_file(char *filename, int y, int lines, int mode);
void bell(void);
-void setbpath(char *buf, char *boardname);
+void setbpath(char *buf, const char *boardname);
int dashf(char *fname);
-void sethomepath(char *buf, char *userid);
-void sethomedir(char *buf, char *userid);
+void sethomepath(char *buf, const char *userid);
+void sethomedir(char *buf, const char *userid);
char *Cdate(time_t *clock);
-void sethomefile(char *buf, char *userid, const char *fname);
+void sethomefile(char *buf, const char *userid, const char *fname);
int log_file(char *fn, int flag, const char *fmt,...);
void str_lower(char *t, char *s);
void *strstr_lower(char *str, char *tag);
int cursor_key(int row, int column);
int search_num(int ch, int max);
-void setuserfile(char *buf, char *fname);
+void setuserfile(char *buf, const char *fname);
int is_BM(char *list);
time_t dasht(char *fname);
int dashd(char *fname);
int invalid_pname(char *str);
-void setbdir(char *buf, char *boardname);
-void setbfile(char *buf, char *boardname, char *fname);
-void setbnfile(char *buf, char *boardname, char *fname, int n);
+void setbdir(char *buf, const char *boardname);
+void setbfile(char *buf, const char *boardname, const char *fname);
+void setbnfile(char *buf, const char *boardname, const char *fname, int n);
int dashl(char *fname);
char *subject(char *title);
void setdirpath(char *buf, char *direct, char *fname);
@@ -497,7 +497,7 @@ int str_checksum(char *str);
void show_help(char * const helptext[]);
int belong(char *filelist, char *key);
char *Cdatedate(time_t *clock);
-void sethomeman(char *buf, char *userid);
+void sethomeman(char *buf, const char *userid);
off_t dashs(char *fname);
void cursor_clear(int row, int column);
void cursor_show(int row, int column);
diff --git a/mbbsd/stuff.c b/mbbsd/stuff.c
index 5e2048f5..8d70566d 100644
--- a/mbbsd/stuff.c
+++ b/mbbsd/stuff.c
@@ -12,69 +12,69 @@ static char *str_board_n_file = "boards/%c/%s/%s.%d";
static char *str_dotdir = STR_DOTDIR;
void
-sethomepath(char *buf, char *userid)
+sethomepath(char *buf, const char *userid)
{
sprintf(buf, "home/%c/%s", userid[0], userid);
}
void
-sethomedir(char *buf, char *userid)
+sethomedir(char *buf, const char *userid)
{
sprintf(buf, str_home_file, userid[0], userid, str_dotdir);
}
void
-sethomeman(char *buf, char *userid)
+sethomeman(char *buf, const char *userid)
{
sprintf(buf, str_home_file, userid[0], userid, "man");
}
void
-sethomefile(char *buf, char *userid, const char *fname)
+sethomefile(char *buf, const char *userid, const char *fname)
{
sprintf(buf, str_home_file, userid[0], userid, fname);
}
void
-setuserfile(char *buf, char *fname)
+setuserfile(char *buf, const char *fname)
{
sprintf(buf, str_home_file, cuser.userid[0], cuser.userid, fname);
}
void
-setapath(char *buf, char *boardname)
+setapath(char *buf, const char *boardname)
{
sprintf(buf, "man/boards/%c/%s", boardname[0], boardname);
}
void
-setadir(char *buf, char *path)
+setadir(char *buf, const char *path)
{
sprintf(buf, "%s/%s", path, str_dotdir);
}
void
-setbpath(char *buf, char *boardname)
+setbpath(char *buf, const char *boardname)
{
sprintf(buf, "boards/%c/%s", boardname[0], boardname);
}
void
-setbdir(char *buf, char *boardname)
+setbdir(char *buf, const char *boardname)
{
sprintf(buf, str_board_file, boardname[0], boardname,
(currmode & MODE_DIGEST ? fn_mandex : str_dotdir));
}
void
-setbfile(char *buf, char *boardname, char *fname)
+setbfile(char *buf, const char *boardname, const char *fname)
{
sprintf(buf, str_board_file, boardname[0], boardname, fname);
}
void
-setbnfile(char *buf, char *boardname, char *fname, int n)
+setbnfile(char *buf, const char *boardname, const char *fname, int n)
{
sprintf(buf, str_board_n_file, boardname[0], boardname, fname, n);
}
@@ -430,7 +430,7 @@ pressanykey_or_callangel(){
int ch;
outmsg(
-"\033[1;34;44m ▄▄▄▄ \033[32mH \036[34m呼叫小天使 ▄▄▄▄\033[1;37;44m 請按 "
+"\033[1;34;44m ▄▄▄▄ \033[32mH \033[36m呼叫小天使\033[34m ▄▄▄▄\033[1;37;44m 請按 "
"\033[36m任意鍵 \033[37m繼續 \033[1;34m▄▄▄▄▄\033[36m^T 收錄暫存檔\033[34m▄▄▄ \033[m");
do {
ch = igetch();