summaryrefslogtreecommitdiffstats
path: root/util/buildir.c
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-03-10 01:44:39 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-03-10 01:44:39 +0800
commitdc1e907c2cf1038a9dc24a4f4969a8403097bd85 (patch)
treead37009f7662f3204509a196b8eaa74f0586e37f /util/buildir.c
parent90451291f8f509d0f0e3f1c442bb3325de30d9b0 (diff)
downloadpttbbs-dc1e907c2cf1038a9dc24a4f4969a8403097bd85.tar
pttbbs-dc1e907c2cf1038a9dc24a4f4969a8403097bd85.tar.gz
pttbbs-dc1e907c2cf1038a9dc24a4f4969a8403097bd85.tar.bz2
pttbbs-dc1e907c2cf1038a9dc24a4f4969a8403097bd85.tar.lz
pttbbs-dc1e907c2cf1038a9dc24a4f4969a8403097bd85.tar.xz
pttbbs-dc1e907c2cf1038a9dc24a4f4969a8403097bd85.tar.zst
pttbbs-dc1e907c2cf1038a9dc24a4f4969a8403097bd85.zip
no warning
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@16 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util/buildir.c')
-rw-r--r--util/buildir.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/util/buildir.c b/util/buildir.c
index 381a657d..38573e7f 100644
--- a/util/buildir.c
+++ b/util/buildir.c
@@ -1,4 +1,4 @@
-/* $Id: buildir.c,v 1.1 2002/03/07 15:13:45 in2 Exp $ */
+/* $Id: buildir.c,v 1.2 2002/03/09 17:44:30 in2 Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <dirent.h>
@@ -11,14 +11,15 @@
#include <sys/stat.h>
#include "config.h"
#include "pttstruct.h"
+#include "proto.h"
int dirselect(struct dirent *dir) {
return strchr("MDSGH", dir->d_name[0]) && dir->d_name[1] == '.';
}
-int mysort(const struct dirent **a,const struct dirent **b)
+int mysort(const void *a, const void *b)
{
- return atoi(((*a)->d_name+2))-atoi(((*b)->d_name+2));
+ return atoi(((*((struct dirent **)a))->d_name+2))-atoi(((*((struct dirent **)b))->d_name+2));
}
int main(int argc, char **argv) {