diff options
author | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-10-14 21:33:33 +0800 |
---|---|---|
committer | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-10-14 21:33:33 +0800 |
commit | 994e44a546b9e0a7bfbbd3ee935a3882b780f2cc (patch) | |
tree | 680a6d8cdc213480bc7d6aae28d441bd8952d4e9 /util | |
parent | 50f20458362cbf06180c0cddd570db13d5c44c87 (diff) | |
download | pttbbs-994e44a546b9e0a7bfbbd3ee935a3882b780f2cc.tar pttbbs-994e44a546b9e0a7bfbbd3ee935a3882b780f2cc.tar.gz pttbbs-994e44a546b9e0a7bfbbd3ee935a3882b780f2cc.tar.bz2 pttbbs-994e44a546b9e0a7bfbbd3ee935a3882b780f2cc.tar.lz pttbbs-994e44a546b9e0a7bfbbd3ee935a3882b780f2cc.tar.xz pttbbs-994e44a546b9e0a7bfbbd3ee935a3882b780f2cc.tar.zst pttbbs-994e44a546b9e0a7bfbbd3ee935a3882b780f2cc.zip |
1. add feature assessment of article and sale
2. add file pttbbs/util/cleanshm.c to help clean unused var in PASSWD
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1241 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util')
-rw-r--r-- | util/cleanshm.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/util/cleanshm.c b/util/cleanshm.c new file mode 100644 index 00000000..37eb4018 --- /dev/null +++ b/util/cleanshm.c @@ -0,0 +1,25 @@ +/* $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(pad, 0, sizeof(pad)); +} + +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; +} |