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

Function count_and_validate_winopts

src/mdlib.c:601–623  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

599};
600
601staticfn int
602count_and_validate_winopts(void)
603{
604 int i, cnt = 0;
605
606 /* window_opts has a fencepost entry at the end */
607 for (i = 0; i < SIZE(window_opts) - 1; i++) {
608#if !defined(MAKEDEFS_C) && defined(FOR_RUNTIME)
609#ifdef WIN32
610 window_opts[i].valid = FALSE;
611 if ((GUILaunched
612 && case_insensitive_comp(window_opts[i].id, "curses") != 0
613 && case_insensitive_comp(window_opts[i].id, "mswin") != 0)
614 || (!GUILaunched
615 && case_insensitive_comp(window_opts[i].id, "mswin") == 0))
616 continue;
617#endif
618#endif /* !MAKEDEFS_C && FOR_RUNTIME */
619 ++cnt;
620 window_opts[i].valid = TRUE;
621 }
622 return cnt;
623}
624
625#if !defined(MAKEDEFS_C)
626staticfn int

Callers 1

build_optionsFunction · 0.85

Calls 1

case_insensitive_compFunction · 0.85

Tested by

no test coverage detected