From 3278b38718070a7a70710c36b9246e20e64c08ec Mon Sep 17 00:00:00 2001 From: victor Date: Tue, 14 Oct 2003 13:47:51 +0000 Subject: wrong filename git-svn-id: http://opensvn.csie.org/pttbbs/trunk@1243 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- pttbbs/util/Makefile | 4 ++-- pttbbs/util/cleanpasswd.c | 26 ++++++++++++++++++++++++++ pttbbs/util/cleanshm.c | 26 -------------------------- 3 files changed, 28 insertions(+), 28 deletions(-) create mode 100644 pttbbs/util/cleanpasswd.c delete mode 100644 pttbbs/util/cleanshm.c diff --git a/pttbbs/util/Makefile b/pttbbs/util/Makefile index a3931ca6..80a7a1f3 100644 --- a/pttbbs/util/Makefile +++ b/pttbbs/util/Makefile @@ -85,5 +85,5 @@ installbbsctl: bbsctl chown root /home/bbs/bin/bbsctl chmod 4755 /home/bbs/bin/bbsctl -cleanshm: cleanshm.c ${UTIL_OBJS} - ${CC} ${CFLAGS} ${LDFLAGS} -o ${fn} ${UTIL_OBJS} cleanshm.c +cleanpasswd: cleanpasswd.c ${UTIL_OBJS} + ${CC} ${CFLAGS} ${LDFLAGS} -o ${fn} ${UTIL_OBJS} cleanpasswd.c diff --git a/pttbbs/util/cleanpasswd.c b/pttbbs/util/cleanpasswd.c new file mode 100644 index 00000000..3632ad5e --- /dev/null +++ b/pttbbs/util/cleanpasswd.c @@ -0,0 +1,26 @@ +/* $Id: toplazyBM.c 1096 2003-08-15 06:13:29Z victor $ */ +#define _UTIL_C_ +#include "bbs.h" + +extern userec_t xuser; + +/* 當資料欄位有異動 例如用了舊的欄位 可用這個程式清除舊值 */ +int clean_unused_var(userec_t *rec) +{ + rec->goodpost = 0; + rec->badpost = 0; + rec->goodsale = 0; + rec->badsale = 0; + memset(rec->pad, 0, sizeof(rec->pad)); + return 0; +} + +int main(int argc, char *argv[]) +{ + attach_SHM(); + if(passwd_init()) + exit(1); + if (passwd_apply(clean_unused_var) == 0) + printf("ERROR\n"); + return 0; +} diff --git a/pttbbs/util/cleanshm.c b/pttbbs/util/cleanshm.c deleted file mode 100644 index 3632ad5e..00000000 --- a/pttbbs/util/cleanshm.c +++ /dev/null @@ -1,26 +0,0 @@ -/* $Id: toplazyBM.c 1096 2003-08-15 06:13:29Z victor $ */ -#define _UTIL_C_ -#include "bbs.h" - -extern userec_t xuser; - -/* 當資料欄位有異動 例如用了舊的欄位 可用這個程式清除舊值 */ -int clean_unused_var(userec_t *rec) -{ - rec->goodpost = 0; - rec->badpost = 0; - rec->goodsale = 0; - rec->badsale = 0; - memset(rec->pad, 0, sizeof(rec->pad)); - return 0; -} - -int main(int argc, char *argv[]) -{ - attach_SHM(); - if(passwd_init()) - exit(1); - if (passwd_apply(clean_unused_var) == 0) - printf("ERROR\n"); - return 0; -} -- cgit v1.2.3