| 658 | } |
| 659 | |
| 660 | static void |
| 661 | nhusage(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 */ |
no test coverage detected