summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-03-19 20:59:50 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-03-19 20:59:50 +0800
commit15135e4525a4294ce016f87e85841e7d3ec2164b (patch)
treec88bdd5afd05c2b5c5d08984b87fe103ec96cd9c /util
parent7c0c9404b7353ca9c4bf08b0b9a3226554ea8031 (diff)
downloadpttbbs-15135e4525a4294ce016f87e85841e7d3ec2164b.tar
pttbbs-15135e4525a4294ce016f87e85841e7d3ec2164b.tar.gz
pttbbs-15135e4525a4294ce016f87e85841e7d3ec2164b.tar.bz2
pttbbs-15135e4525a4294ce016f87e85841e7d3ec2164b.tar.lz
pttbbs-15135e4525a4294ce016f87e85841e7d3ec2164b.tar.xz
pttbbs-15135e4525a4294ce016f87e85841e7d3ec2164b.tar.zst
pttbbs-15135e4525a4294ce016f87e85841e7d3ec2164b.zip
add 'const' qualifiers on function parameters.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2632 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util')
-rw-r--r--util/BM_money.c2
-rw-r--r--util/bbsmail.c2
-rw-r--r--util/birth.c4
-rw-r--r--util/deluserfile.c2
-rw-r--r--util/openticket.c2
-rw-r--r--util/poststat.c2
-rw-r--r--util/topusr.c3
7 files changed, 8 insertions, 9 deletions
diff --git a/util/BM_money.c b/util/BM_money.c
index 8421f8cf..1f5cc10f 100644
--- a/util/BM_money.c
+++ b/util/BM_money.c
@@ -15,7 +15,7 @@ int c, n;
-int Link(char *src, char *dst) {
+int Link(const char *src, const char *dst) {
char cmd[200];
if (link(src, dst) == 0)
diff --git a/util/bbsmail.c b/util/bbsmail.c
index f1a5ffb8..1941fa08 100644
--- a/util/bbsmail.c
+++ b/util/bbsmail.c
@@ -10,7 +10,7 @@ extern char *notitle[], *nofrom[], *nocont[];
int
-strip_ansi(char *buf, char *str, int mode)
+strip_ansi(char *buf, const char *str, int mode)
{
register int ansi, count = 0;
diff --git a/util/birth.c b/util/birth.c
index 4a4a6fd0..8f4530f0 100644
--- a/util/birth.c
+++ b/util/birth.c
@@ -7,7 +7,7 @@
struct userec_t user;
-int bad_user_id(char *userid) {
+int bad_user_id(const char *userid) {
register char ch;
int j;
if (strlen(user.userid) < 2 || !isalpha(user.userid[0]))
@@ -24,7 +24,7 @@ int bad_user_id(char *userid) {
return 0;
}
-int Link(char *src, char *dst) {
+int Link(const char *src, const char *dst) {
char cmd[200];
if (link(src, dst) == 0)
diff --git a/util/deluserfile.c b/util/deluserfile.c
index 0fa33192..fa21998d 100644
--- a/util/deluserfile.c
+++ b/util/deluserfile.c
@@ -7,7 +7,7 @@
#define DELZEROFILE
#define USERHOME BBSHOME "/home"
-int bad_user_id(char *userid)
+int bad_user_id(const char *userid)
{
register char ch;
diff --git a/util/openticket.c b/util/openticket.c
index 2257911b..f24aaea3 100644
--- a/util/openticket.c
+++ b/util/openticket.c
@@ -8,7 +8,7 @@ static char *betname[8] = {"Ptt", "Jaky", "Action", "Heat",
#define MAX_DES 7 /* ³Ì¤j«O¯d¼ú¼Æ */
-int Link(char *src, char *dst)
+int Link(const char *src, const char *dst)
{
char cmd[200];
diff --git a/util/poststat.c b/util/poststat.c
index b300e961..d18a3b70 100644
--- a/util/poststat.c
+++ b/util/poststat.c
@@ -46,7 +46,7 @@ top[TOPCOUNT], *tp;
Cross-fs rename()
*/
-int Rename(char *src, char *dst)
+int Rename(const char *src, const char *dst)
{
if (rename(src, dst) == 0)
diff --git a/util/topusr.c b/util/topusr.c
index 5aa2eb7a..cbd5098f 100644
--- a/util/topusr.c
+++ b/util/topusr.c
@@ -92,8 +92,7 @@ int
#endif /* HAVE_TIN */
int
- bad_user_id(userid)
-char *userid;
+bad_user_id(const char *userid)
{
register char ch;
if (strlen(userid) < 2)