| 134 | }; |
| 135 | |
| 136 | staticfn void |
| 137 | getpos_help_keyxhelp( |
| 138 | winid tmpwin, |
| 139 | const char *k1, const char *k2, |
| 140 | int gloc) |
| 141 | { |
| 142 | char sbuf[BUFSZ], fbuf[QBUFSZ]; |
| 143 | const char *move_cursor_to = "move the cursor to ", |
| 144 | *filtertxt = gloc_filtertxt[iflags.getloc_filter]; |
| 145 | |
| 146 | if (gloc == GLOC_EXPLORE) { |
| 147 | /* default of "move to unexplored location" is inaccurate |
| 148 | because the position will be one spot short of that */ |
| 149 | move_cursor_to = "move the cursor next to an "; |
| 150 | if (iflags.getloc_usemenu) |
| 151 | /* default is too wide for basic 80-column tty so shorten it |
| 152 | to avoid wrapping */ |
| 153 | filtertxt = strsubst(strcpy(fbuf, filtertxt), |
| 154 | "this area", "area"); |
| 155 | } |
| 156 | Sprintf(sbuf, "Use '%s'/'%s' to %s%s%s.", |
| 157 | k1, k2, |
| 158 | iflags.getloc_usemenu ? "get a menu of " : move_cursor_to, |
| 159 | gloc_descr[gloc][2 + iflags.getloc_usemenu], filtertxt); |
| 160 | putstr(tmpwin, 0, sbuf); |
| 161 | } |
| 162 | |
| 163 | DISABLE_WARNING_FORMAT_NONLITERAL |
| 164 |
no test coverage detected