diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-09-04 11:57:37 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-09-04 11:57:37 +0800 |
commit | 1519bd7f94f6096595d833b55d66b98c381dec9a (patch) | |
tree | 602df753f4c597c4fd3d652effd30d8f27c4ca1f /mbbsd/mbbsd.c | |
parent | 1d79f93affaf93c29cdc89bcc123441d04c1496d (diff) | |
download | pttbbs-1519bd7f94f6096595d833b55d66b98c381dec9a.tar pttbbs-1519bd7f94f6096595d833b55d66b98c381dec9a.tar.gz pttbbs-1519bd7f94f6096595d833b55d66b98c381dec9a.tar.bz2 pttbbs-1519bd7f94f6096595d833b55d66b98c381dec9a.tar.lz pttbbs-1519bd7f94f6096595d833b55d66b98c381dec9a.tar.xz pttbbs-1519bd7f94f6096595d833b55d66b98c381dec9a.tar.zst pttbbs-1519bd7f94f6096595d833b55d66b98c381dec9a.zip |
partially fix #35
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3128 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/mbbsd.c')
-rw-r--r-- | mbbsd/mbbsd.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index 30ba77ac..cb783a6c 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -718,7 +718,7 @@ add_distinct(const char *fname, const char *line) } void -del_distinct(const char *fname, const char *line) +del_distinct(const char *fname, const char *line, int casesensitive) { FILE *fp; int n = 0; @@ -740,8 +740,14 @@ del_distinct(const char *fname, const char *line) if (p[-1] == '\n' || p[-1] == '\r') p[-1] = 0; - if (!strcmp(buffer, line)) - break; + if(casesensitive) + { + if (!strcmp(buffer, line)) + break; + } else { + if (!strcasecmp(buffer, line)) + break; + } sscanf(buffer + strlen(buffer) + 2, "%d", &n); fprintf(fptmp, "%s%c#%d\n", buffer, 0, n); } |