* Map the given character to its corresponding menu command. If it * doesn't match anything, just return the original. */
| 8108 | * doesn't match anything, just return the original. |
| 8109 | */ |
| 8110 | char |
| 8111 | map_menu_cmd(char ch) |
| 8112 | { |
| 8113 | char *found = strchr(gm.mapped_menu_cmds, ch); |
| 8114 | |
| 8115 | if (found) { |
| 8116 | int idx = (int) (found - gm.mapped_menu_cmds); |
| 8117 | |
| 8118 | ch = gm.mapped_menu_op[idx]; |
| 8119 | } |
| 8120 | return ch; |
| 8121 | } |
| 8122 | |
| 8123 | /* get keystrokes that are used for menu scrolling operations which apply; |
| 8124 | printable: for use in a prompt, non-printable: for yn_function() choices */ |
no outgoing calls
no test coverage detected