+union ww_char {
+ short c_w; /* as a word */
+ struct {
+ char C_c; /* the character part */
+ char C_m; /* the mode part */
+ } c_un;
+};
+#define c_c c_un.C_c
+#define c_m c_un.C_m
+
+ /* parts of ww_char */
+#define WWC_CMASK 0x00ff
+#define WWC_MMASK 0xff00
+#define WWC_MSHIFT 8
+
+ /* c_m bits */
+#define WWM_REV 0x01 /* reverse video */
+#define WWM_BLK 0x02 /* blinking */
+#define WWM_UL 0x04 /* underlined */
+#define WWM_GLS 0x10 /* window only, glass, i.e. transparent */
+#define WWM_COV 0x20 /* window only, covered */
+
+ /* ww_state values */
+#define WWS_INITIAL 0 /* just opened */
+#define WWS_HASPROC 1 /* forked, in parent */
+#define WWS_INCHILD 2 /* forked, in child */
+#define WWS_DEAD 3 /* child died */
+
+ /* flags for ww_fmap */
+#define WWF_U 0x01
+#define WWF_R 0x02
+#define WWF_D 0x04
+#define WWF_L 0x08
+#define WWF_MASK (WWF_U|WWF_R|WWF_D|WWF_L)
+#define WWF_LABEL 0x40
+#define WWF_TOP 0x80
+