summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-10-14 21:33:33 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-10-14 21:33:33 +0800
commit994e44a546b9e0a7bfbbd3ee935a3882b780f2cc (patch)
tree680a6d8cdc213480bc7d6aae28d441bd8952d4e9 /include
parent50f20458362cbf06180c0cddd570db13d5c44c87 (diff)
downloadpttbbs-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 'include')
-rw-r--r--include/assess.h6
-rw-r--r--include/bbs.h1
-rw-r--r--include/proto.h7
-rw-r--r--include/pttstruct.h19
4 files changed, 31 insertions, 2 deletions
diff --git a/include/assess.h b/include/assess.h
new file mode 100644
index 00000000..f6963370
--- /dev/null
+++ b/include/assess.h
@@ -0,0 +1,6 @@
+#define SALE_MAXVALUE 255
+
+#define GOODPOST 1
+#define BADPOST 2
+#define GOODSALE 3
+#define BADSALE 4
diff --git a/include/bbs.h b/include/bbs.h
index 666d30c7..55291091 100644
--- a/include/bbs.h
+++ b/include/bbs.h
@@ -63,6 +63,7 @@
#include "chc.h"
#include "proto.h"
#include "gomo.h"
+#include "assess.h"
#ifdef _UTIL_C_
#include "util.h"
diff --git a/include/proto.h b/include/proto.h
index 41fa2a7f..1ca98489 100644
--- a/include/proto.h
+++ b/include/proto.h
@@ -34,6 +34,13 @@ void BlogMain(int);
void initsetproctitle(int argc, char **argv, char **envp);
void setproctitle(const char* format, ...) GCC_CHECK_FORMAT(1,2);
+/* assess */
+void inc_goodpost(int uid);
+void inc_badpost(int uid);
+void inc_goodsale(int uid);
+void inc_badsale(int uid);
+void set_assess(int uid, unsigned char num, int type);
+
/* bbcall */
int main_bbcall();
diff --git a/include/pttstruct.h b/include/pttstruct.h
index 5ec26a57..45cf1aab 100644
--- a/include/pttstruct.h
+++ b/include/pttstruct.h
@@ -3,6 +3,9 @@
#define INCLUDE_STRUCT_H
#define IDLEN 12 /* Length of bid/uid */
+
+/* 競標資訊 */
+#define SALE_COMMENTED 0x1
typedef struct bid_t {
int high;
int buyitnow;
@@ -10,7 +13,9 @@ typedef struct bid_t {
int increment;
char userid[IDLEN + 1];
time_t enddate;
- int payby; /* 1 cash 2 check or mail 4 wire 8 credit 16 postoffice */
+ char payby; /* 1 cash 2 check or mail 4 wire 8 credit 16 postoffice */
+ char flag;
+ char pad[2];
int shipping;
}bid_t;
@@ -87,7 +92,13 @@ typedef struct userec_t {
char ident[11];
unsigned int uflag2;
unsigned char signature;
- char pad[71];
+
+ unsigned char goodpost; /* 評價為好文章數 */
+ unsigned char badpost; /* 評價為壞文章數 */
+ unsigned char goodsale; /* 競標 好的評價 */
+ unsigned char badsale; /* 競標 壞的評價 */
+
+ char pad[67];
} userec_t;
/* these are flags in userec_t.uflag */
#define PAGER_FLAG 0x4 /* true if pager was OFF last session */
@@ -244,11 +255,15 @@ typedef struct userinfo_t {
int friend_online[MAX_FRIEND];/* point到線上好友 utmpshm的位置 */
/* 好友比較的cache 前兩個bit是狀態 */
int reject[MAX_REJECT];
+
int idoffset; /* shm id上的 offset */
+ /* idoffset 好像沒用到 */
+
int lock;
int friendtotal; /* 好友比較的cache 大小 */
unsigned char msgcount;
msgque_t msgs[MAX_MSGS];
+ // uptime 好像沒用到
time_t uptime;
time_t lastact; /* 上次使用者動的時間 */
unsigned int brc_id;