4 enum __attribute__ ((__packed__
)) direction
{
17 static inline const char* dir_name(enum direction dir
) {
18 #define DIRNAME(a) [ a ] = #a
19 static const char* dir_names
[] = {
30 return dir_names
[dir
];
33 enum __attribute__ ((__packed__
)) direction_bits
{
39 DIRB_NW
= DIRB_N
| DIRB_W
,
40 DIRB_SW
= DIRB_S
| DIRB_W
,
41 DIRB_SO
= DIRB_S
| DIRB_O
,
42 DIRB_NO
= DIRB_N
| DIRB_O
,
45 extern const enum direction_bits direction_directionbit_lut
[];
46 extern const enum direction directionbit_direction_lut
[];
47 #define direction_to_directionbit(dir) direction_directionbit_lut[dir]
48 #define directionbit_to_direction(db) direction_directionbit_lut[db]
50 enum __attribute__ ((__packed__
)) direction16
{
68 DIR16_INVALID
= DIR16_MAX
71 //RcB: DEP "direction.c"