summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-22 15:42:16 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-22 15:42:16 +0800
commitab8799082aeca5e3e1e4a7d601156980bf6c041f (patch)
treea8026d4d095b65f008ee3ca7d53b272c37331355 /util
parent51a562cbe6edbf815704dba32d25924fd99d683f (diff)
downloadpttbbs-ab8799082aeca5e3e1e4a7d601156980bf6c041f.tar
pttbbs-ab8799082aeca5e3e1e4a7d601156980bf6c041f.tar.gz
pttbbs-ab8799082aeca5e3e1e4a7d601156980bf6c041f.tar.bz2
pttbbs-ab8799082aeca5e3e1e4a7d601156980bf6c041f.tar.lz
pttbbs-ab8799082aeca5e3e1e4a7d601156980bf6c041f.tar.xz
pttbbs-ab8799082aeca5e3e1e4a7d601156980bf6c041f.tar.zst
pttbbs-ab8799082aeca5e3e1e4a7d601156980bf6c041f.zip
use atoi instead strcmp
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1805 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util')
-rw-r--r--util/merge_dir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/merge_dir.c b/util/merge_dir.c
index 2b2fd85b..304f0927 100644
--- a/util/merge_dir.c
+++ b/util/merge_dir.c
@@ -11,8 +11,8 @@ void usage() {
fileheader_t *fh;
int dir_cmp(const void *a, const void *b)
{
- return strncasecmp(((fileheader_t *)a)->filename,
- ((fileheader_t *)b)->filename, 12);
+ return (atoi( &((fileheader_t *)a)->filename[2] ) -
+ atoi( &((fileheader_t *)a)->filename[2] ));
}
int main(int argc, char **argv) {