| 44 | } |
| 45 | |
| 46 | DISABLE_WARNING_FORMAT_NONLITERAL |
| 47 | |
| 48 | /* #wizidentify command - reveal and optionally identify hero's inventory */ |
| 49 | int |
| 50 | wiz_identify(void) |
| 51 | { |
| 52 | if (wizard) { |
| 53 | iflags.override_ID = (int) cmd_from_func(wiz_identify); |
| 54 | /* command remapping might leave #wizidentify as the only way |
| 55 | to invoke us, in which case cmd_from_func() will yield NUL; |
| 56 | it won't matter to display_inventory()/display_pickinv() |
| 57 | if ^I invokes some other command--what matters is that |
| 58 | display_pickinv() and xname() see override_ID as nonzero */ |
| 59 | if (!iflags.override_ID) |
| 60 | iflags.override_ID = C('I'); |
| 61 | (void) display_inventory((char *) 0, FALSE); |
| 62 | iflags.override_ID = 0; |
| 63 | } else |
| 64 | pline(unavailcmd, ecname_from_fn(wiz_identify)); |
| 65 | return ECMD_OK; |
| 66 | } |
| 67 | |
| 68 | RESTORE_WARNING_FORMAT_NONLITERAL |
| 69 |
nothing calls this directly
no test coverage detected