/* * A representation of character sets. * The array set.partitions defines set as follows: * If a character's unicode representation is * greater than an odd number of partitions, it is * in the set. If it is greater than an even number * of partitions, it is not in the set. * The array partitions is always terminated by UINT32_MAX = 4,294,967,295. */ typedef struct character_set { uint32_t *parts; } charset; /*the union of a and b*/ charset csunion(charset a, charset b); /*the intersection of a and b*/ charset csintersection(charset a, charset b); /*the complement of a*/ charset cscompl(charset a); /*1 if a contains c; 0 if a does not contain c*/ int contains(charset a, uint32_t c);