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

Function build_options

src/mdlib.c:668–830  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

666}
667
668staticfn void
669build_options(void)
670{
671 char buf[COLBUFSZ];
672 int i, length, winsyscnt, cnt = 0;
673 const char *defwinsys = DEFAULT_WINDOW_SYS;
674#if !defined(MAKEDEFS_C) && defined(FOR_RUNTIME)
675 int soundlibcnt;
676
677#ifdef WIN32
678 defwinsys = GUILaunched ? "mswin" : "tty";
679#endif
680#endif
681 build_savebones_compat_string();
682 STOREOPTTEXT(optbuf);
683#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
684#if (NH_DEVEL_STATUS == NH_STATUS_BETA)
685#define STATUS_ARG " [beta]"
686#else
687#define STATUS_ARG " [work-in-progress]"
688#endif
689#else
690#define STATUS_ARG ""
691#endif /* NH_DEVEL_STATUS == NH_STATUS_RELEASED */
692 Sprintf(optbuf, "%sNetHack version %d.%d.%d%s\n",
693 opt_indent, VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL, STATUS_ARG);
694 STOREOPTTEXT(optbuf);
695 Sprintf(optbuf, "Options compiled into this edition:");
696 STOREOPTTEXT(optbuf);
697 optbuf[0] = '\0';
698 length = COLNO + 1; /* force 1st item onto new line */
699 Strcat(strcpy(buf, datamodel(0)), " data model,");
700 opt_out_words(buf, &length);
701 for (i = 0; i < SIZE(build_opts); i++) {
702#if !defined(MAKEDEFS_C) && defined(FOR_RUNTIME)
703#ifdef WIN32
704 /* ignore the console entry if GUI version */
705 if (GUILaunched
706 && !strcmp("screen control via WIN32 console I/O", build_opts[i]))
707 continue;
708#endif
709#endif /* !MAKEDEFS_C && FOR_RUNTIME */
710 Strcat(strcpy(buf, build_opts[i]),
711 (i < SIZE(build_opts) - 1) ? "," : ".");
712 opt_out_words(buf, &length);
713 }
714 STOREOPTTEXT(optbuf);
715 optbuf[0] = '\0';
716 winsyscnt = count_and_validate_winopts();
717 STOREOPTTEXT(optbuf);
718 Sprintf(optbuf, "Supported windowing system%s:",
719 (winsyscnt > 1) ? "s" : "");
720 STOREOPTTEXT(optbuf);
721 optbuf[0] = '\0';
722 length = COLNO + 1; /* force 1st item onto new line */
723
724 for (i = 0; i < SIZE(window_opts) - 1; i++) {
725 if (!window_opts[i].valid)

Callers 1

runtime_info_initFunction · 0.85

Calls 6

datamodelFunction · 0.85
opt_out_wordsFunction · 0.85
eosFunction · 0.85

Tested by

no test coverage detected