12 static char stone2char(enum stone s
);
13 static enum stone
char2stone(char s
);
14 char *stone2str(enum stone s
); /* static string */
15 enum stone
str2stone(char *str
);
17 static enum stone
stone_other(enum stone s
);
21 stone2char(enum stone s
)
26 static inline enum stone
30 case '.': return S_NONE
;
31 case 'X': return S_BLACK
;
32 case 'O': return S_WHITE
;
33 case '#': return S_OFFBOARD
;
38 /* Curiously, gcc is reluctant to inline this; I have cofirmed
39 * there is performance benefit. */
40 static inline enum stone
__attribute__((always_inline
))
41 stone_other(enum stone s
)
43 static const enum stone o
[S_MAX
] = { S_NONE
, S_WHITE
, S_BLACK
, S_OFFBOARD
};