MCPcopy Create free account
hub / github.com/NetHack/NetHack / condattr

Function condattr

win/X11/winstat.c:215–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213}
214
215static int
216condattr(long bm, unsigned long *bmarray)
217{
218 int attr = 0;
219 int i;
220
221 if (bm && bmarray) {
222 for (i = HL_ATTCLR_BOLD; i < BL_ATTCLR_MAX; ++i) {
223 if (bmarray[i] && (bm & bmarray[i])) {
224 switch(i) {
225 case HL_ATTCLR_BOLD:
226 attr |= HL_BOLD;
227 break;
228 case HL_ATTCLR_DIM:
229 attr |= HL_DIM;
230 break;
231 case HL_ATTCLR_ITALIC:
232 attr |= HL_ITALIC;
233 break;
234 case HL_ATTCLR_ULINE:
235 attr |= HL_ULINE;
236 break;
237 case HL_ATTCLR_BLINK:
238 attr |= HL_BLINK;
239 break;
240 case HL_ATTCLR_INVERSE:
241 attr |= HL_INVERSE;
242 break;
243 }
244 }
245 }
246 }
247 return attr;
248}
249
250void
251X11_status_init(void)

Callers 3

DisplayCondFunction · 0.70
tt_reset_colorFunction · 0.70
X11_status_update_fancyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected