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

Function nhusage

sys/windows/windmain.c:660–695  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

658}
659
660static void
661nhusage(void)
662{
663 char buf1[BUFSZ], buf2[BUFSZ], *bufptr;
664
665 buf1[0] = '\0';
666 bufptr = buf1;
667
668#define ADD_USAGE(s) \
669 if ((strlen(buf1) + strlen(s)) < (BUFSZ - 1)) \
670 Strcat(bufptr, s);
671
672 /* -role still works for those cases which aren't already taken, but
673 * is deprecated and will not be listed here.
674 */
675 (void) Sprintf(buf2, "\nUsage:\n%s [-d dir] -s [-r race] [-p profession] "
676 "[maxrank] [name]...\n or",
677 gh.hname);
678 ADD_USAGE(buf2);
679
680 (void) Sprintf(
681 buf2, "\n%s [-d dir] [-u name] [-r race] [-p profession] [-[DX]]",
682 gh.hname);
683 ADD_USAGE(buf2);
684#ifdef NEWS
685 ADD_USAGE(" [-n]");
686#endif
687 (void) Sprintf(buf2, "\n or\n%s [--showpaths]",
688 gh.hname);
689 ADD_USAGE(buf2);
690 if (!iflags.window_inited)
691 raw_printf("%s\n", buf1);
692 else
693 (void) printf("%s\n", buf1);
694#undef ADD_USAGE
695}
696#endif /* 0 */
697
698/* copy file if destination does not exist */

Callers 1

early_optionsFunction · 0.70

Calls 2

printfFunction · 0.85
raw_printfFunction · 0.50

Tested by

no test coverage detected