summaryrefslogtreecommitdiffstats
path: root/mbbsd/indict.c
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-01-16 22:38:35 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-01-16 22:38:35 +0800
commit798578d4ab39420b79318eb2a274f8aecb558bf5 (patch)
treed0312b159682ca086960fbe91d02e84762d4dd02 /mbbsd/indict.c
parent169cf5d08f377d095f133495e0577dcd8698cb25 (diff)
downloadpttbbs-798578d4ab39420b79318eb2a274f8aecb558bf5.tar
pttbbs-798578d4ab39420b79318eb2a274f8aecb558bf5.tar.gz
pttbbs-798578d4ab39420b79318eb2a274f8aecb558bf5.tar.bz2
pttbbs-798578d4ab39420b79318eb2a274f8aecb558bf5.tar.lz
pttbbs-798578d4ab39420b79318eb2a274f8aecb558bf5.tar.xz
pttbbs-798578d4ab39420b79318eb2a274f8aecb558bf5.tar.zst
pttbbs-798578d4ab39420b79318eb2a274f8aecb558bf5.zip
eliminate `static' array
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@612 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/indict.c')
-rw-r--r--mbbsd/indict.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/mbbsd/indict.c b/mbbsd/indict.c
index 14650fea..93d955a1 100644
--- a/mbbsd/indict.c
+++ b/mbbsd/indict.c
@@ -1,4 +1,4 @@
-/* $Id: indict.c,v 1.10 2002/07/27 13:50:57 kcwu Exp $ */
+/* $Id: indict.c,v 1.11 2003/01/16 14:37:31 kcwu Exp $ */
#include "bbs.h"
#define REFER "etc/dicts"
@@ -67,19 +67,6 @@ choose_dict(void)
return 0;
}
-static char *
-lower(char str[])
-{
- int c;
- static char temp[200];
-
- strcpy(temp, str);
- for (c = 0; temp[c] != 0; c++)
- if (temp[c] >= 'A' && temp[c] <= 'Z')
- temp[c] += 'a' - 'A';
- return temp;
-}
-
int
use_dict()
{
@@ -109,7 +96,7 @@ use_dict()
outs(lang);
getdata(2, 0, ":", word, 18, DOECHO);
outs("資料搜尋中請稍候....");
- strlcpy(word, lower(word), sizeof(word));
+ str_lower(word, word);
if (word[0] == 0)
return 0;
clear();
@@ -145,7 +132,7 @@ use_dict()
f = 1;
} else
f = 0;
- if (strstr(lower(lang), word)) {
+ if (strstr_lower(lang, word)) {
if (f == 1)
lang[65] = '[';
outs(lang);