1 |
pippijn |
1.5 |
/** |
2 |
|
|
* flags.h: Data structures for flags to bitmask processing routines. |
3 |
|
|
* |
4 |
|
|
* Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team |
5 |
|
|
* Rights to this code are as documented in COPYING. |
6 |
|
|
* |
7 |
|
|
* |
8 |
|
|
* Portions of this file were derived from sources bearing the following license: |
9 |
pippijn |
1.3 |
* Copyright © 2005-2007 William Pitcock, et al. |
10 |
pippijn |
1.2 |
* Rights to this code are as documented in doc/pod/license.pod. |
11 |
pippijn |
1.1 |
* |
12 |
pippijn |
1.5 |
* $Id: flags.h,v 1.4 2007-08-30 19:56:19 pippijn Exp $ |
13 |
pippijn |
1.1 |
*/ |
14 |
|
|
|
15 |
|
|
#ifndef FLAGS_H |
16 |
|
|
#define FLAGS_H |
17 |
|
|
|
18 |
|
|
/* flags stuff */ |
19 |
|
|
struct flags_table |
20 |
|
|
{ |
21 |
|
|
char flag; |
22 |
pippijn |
1.4 |
unsigned value; |
23 |
pippijn |
1.1 |
}; |
24 |
|
|
|
25 |
|
|
E unsigned int ca_all; |
26 |
|
|
E struct flags_table chanacs_flags[]; |
27 |
|
|
|
28 |
pippijn |
1.3 |
E void flags_make_bitmasks (char const * const string, struct flags_table table[], unsigned int *addflags, unsigned int *removeflags); |
29 |
|
|
E unsigned int flags_to_bitmask (char const * const string, struct flags_table table[], unsigned int flags); |
30 |
pippijn |
1.1 |
E char *bitmask_to_flags (unsigned int, struct flags_table[]); |
31 |
|
|
E char *bitmask_to_flags2 (unsigned int, unsigned int, struct flags_table[]); |
32 |
|
|
E unsigned int allow_flags (unsigned int flags); |
33 |
|
|
E void update_chanacs_flags (void); |
34 |
|
|
|
35 |
|
|
#endif |