/* * Copyright © 2005-2007 William Pitcock, et al. * Rights to this code are as documented in doc/pod/license.pod. * * Data structures for flags to bitmask processing routines. * * $Id: flags.h,v 1.4 2007/08/30 19:56:19 pippijn Exp $ */ #ifndef FLAGS_H #define FLAGS_H /* flags stuff */ struct flags_table { char flag; unsigned value; }; E unsigned int ca_all; E struct flags_table chanacs_flags[]; E void flags_make_bitmasks (char const * const string, struct flags_table table[], unsigned int *addflags, unsigned int *removeflags); E unsigned int flags_to_bitmask (char const * const string, struct flags_table table[], unsigned int flags); E char *bitmask_to_flags (unsigned int, struct flags_table[]); E char *bitmask_to_flags2 (unsigned int, unsigned int, struct flags_table[]); E unsigned int allow_flags (unsigned int flags); E void update_chanacs_flags (void); #endif