summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-03-13 20:29:56 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-03-13 20:29:56 +0800
commite1424931b48805fad917e008b0bf18cbc8c2c89b (patch)
tree70a348b936a15625b971ff94dda4665162731b41 /util
parent9f537c69f49981771442e49951a74dc3d6fa5269 (diff)
downloadpttbbs-e1424931b48805fad917e008b0bf18cbc8c2c89b.tar
pttbbs-e1424931b48805fad917e008b0bf18cbc8c2c89b.tar.gz
pttbbs-e1424931b48805fad917e008b0bf18cbc8c2c89b.tar.bz2
pttbbs-e1424931b48805fad917e008b0bf18cbc8c2c89b.tar.lz
pttbbs-e1424931b48805fad917e008b0bf18cbc8c2c89b.tar.xz
pttbbs-e1424931b48805fad917e008b0bf18cbc8c2c89b.tar.zst
pttbbs-e1424931b48805fad917e008b0bf18cbc8c2c89b.zip
remove dead file
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2614 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util')
-rw-r--r--util/Makefile2
-rw-r--r--util/indexuser.c50
2 files changed, 1 insertions, 51 deletions
diff --git a/util/Makefile b/util/Makefile
index 4fd284d0..b4ee84c7 100644
--- a/util/Makefile
+++ b/util/Makefile
@@ -22,7 +22,7 @@ CPROG_WITH_UTIL= \
jungo account birth deluserfile \
expire mandex rmuid horoscope \
openvice parse_news openticket topusr \
- indexuser yearsold toplazyBM toplazyBBM \
+ yearsold toplazyBM toplazyBBM \
reaper buildAnnounce inndBM shmctl \
outmail chkhbf checkmoney merge_dir \
transman angel gamblegive checkdir \
diff --git a/util/indexuser.c b/util/indexuser.c
deleted file mode 100644
index 9807197b..00000000
--- a/util/indexuser.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* $Id$ */
-#define _UTIL_C_
-#include "bbs.h"
-#define INDEXPATH BBSHOME"/index"
-
-unsigned string_hash(unsigned char *s)
-{
- unsigned int v = 0;
- while (*s)
- {
- v = (v << 8) | (v >> 24);
- v ^= toupper(*s++); /* note this is case insensitive */
- }
- return (v * 2654435769U) >> (32 - HASH_BITS);
-}
-
-
-int main(int argc, char **argv)
-{
- int j;
- userec_t u;
- char buf[256];
-
- attach_SHM();
- if(passwd_init())
- {
- printf("Sorry, the data is not ready.\n");
- exit(0);
- }
- system("rm -rf "INDEXPATH"/realname");
- system("rm -rf "INDEXPATH"/email");
- system("rm -rf "INDEXPATH"/ident");
- mkdir(INDEXPATH"/realname",0700);
- mkdir(INDEXPATH"/email",0700);
- for(j = 1; j <= MAX_USERS; j++) {
- passwd_query(j, &u);
- if(!u.userid[0]) continue;
- if(u.realname[0])
- {
- sprintf(buf,INDEXPATH"/realname/%X",string_hash(u.realname));
- append_record(buf, (fileheader_t*)&j, sizeof(j));
- }
- if(u.email[0])
- {
- sprintf(buf,INDEXPATH"/email/%X",string_hash(u.email));
- append_record(buf, (fileheader_t*)&j, sizeof(j));
- }
- }
- return 0;
-}