reject: Create EF_REJECT table of struct rejectstr
New struct rejectstr is basically empty so far. The next commit will move reject state from struct natstr to struct rejectstr. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
f9f3900595
commit
f35f16c0a2
24 changed files with 302 additions and 190 deletions
|
@ -161,6 +161,16 @@ enum rej_comm {
|
|||
REJ_LOAN /* don't allow loans to be offered */
|
||||
};
|
||||
|
||||
struct rejectstr {
|
||||
/* initial part must match struct empobj */
|
||||
signed ef_type: 8;
|
||||
unsigned rej_seqno: 12;
|
||||
unsigned rej_generation: 12;
|
||||
int rej_uid;
|
||||
time_t rej_timestamp;
|
||||
/* end of part matching struct empobj */
|
||||
};
|
||||
|
||||
extern char *relates[];
|
||||
|
||||
/* procedures relating to nation stuff */
|
||||
|
@ -172,6 +182,10 @@ extern char *relates[];
|
|||
#define putcontact(p) ef_write(EF_CONTACT, (p)->con_uid, (p))
|
||||
#define getcontactp(n) ((struct contactstr *)ef_ptr(EF_CONTACT, (n)))
|
||||
|
||||
#define getreject(n, p) ef_read(EF_REJECT, (n), (p))
|
||||
#define putreject(p) ef_write(EF_REJECT, (p)->rej_uid, (p))
|
||||
#define getrejectp(n) ((struct rejectstr *)ef_ptr(EF_REJECT, (n)))
|
||||
|
||||
#define getrealm(r, n, p) ef_read(EF_REALM, ((r) + ((n) * MAXNOR)), (p))
|
||||
#define putrealm(p) ef_write(EF_REALM, (p)->r_uid, (p))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue