forked from csgauthier/iscabbs
-
Notifications
You must be signed in to change notification settings - Fork 1
/
users.h
42 lines (34 loc) · 1011 Bytes
/
users.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#define MAXTOTALUSERS 5000
/*
* Location info for user data, indexed by ->name and ->num.
*/
struct userlink
{
int free; /* Index to next free page/link */
long usernum; /* User number */
char name[MAXALIAS+1];/* User name */
};
/*
* Main user data structure, user data pages follow immediately after.
*/
struct userdata
{
int gen; /* Generation number (see finduser()) */
int totalusers[2]; /* Total users, used as boundary in ->name and ->num */
int free[2]; /* Index to next free page/link */
int retries; /* Stats: times gen changed in finduser() */
int unused[1017];
int which; /* Which of the mirrored values is currently in use */
int name[2][MAXTOTALUSERS];
int num[2][MAXTOTALUSERS];
struct userlink link[MAXTOTALUSERS];
};
struct voteinfo
{
struct vote
{
char msg[1024]; /* Message to display */
char answer[MAXTOTALUSERS]; /* Vote results */
char inuse; /* in use */
} vote[MAXVOTES];
};