|
|
1.1 root 1: #include <ssap.h>
2:
3: ...
4:
5: int owned = 0;
6: int required; /* initialized from connection negotation */
7: int settings; /* .. */
8:
9: ...
10:
11: #define dotoken(requires,shift,bit,type) \
12: { \
13: if (requirements & requires) \
14: switch (settings & (ST_MASK << shift)) { \
15: case ST_CALL_VALUE << shift: \
16: settings &= ~(ST_MASK << shift); \
17: settings |= ST_INIT_VALUE << shift; \
18: break; \
19: \
20: case ST_INIT_VALUE: \
21: break; \
22: \
23: case ST_RESP_VALUE: \
24: owned |= bit; \
25: break; \
26: \
27: default: \
28: error ("initial %s token setting", type); \
29: } \
30: }
31:
32: dotokens ();
33:
34: #undef dotoken
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.