map_print_key(): * Print the function description for 1 key */
| 1119 | * Print the function description for 1 key |
| 1120 | */ |
| 1121 | private void |
| 1122 | map_print_key(EditLine *el, el_action_t *map, const Char *in) |
| 1123 | { |
| 1124 | char outbuf[EL_BUFSIZ]; |
| 1125 | el_bindings_t *bp, *ep; |
| 1126 | |
| 1127 | if (in[0] == '\0' || in[1] == '\0') { |
| 1128 | (void) keymacro__decode_str(in, outbuf, sizeof(outbuf), ""); |
| 1129 | ep = &el->el_map.help[el->el_map.nfunc]; |
| 1130 | for (bp = el->el_map.help; bp < ep; bp++) |
| 1131 | if (bp->func == map[(unsigned char) *in]) { |
| 1132 | (void) fprintf(el->el_outfile, |
| 1133 | "%s\t->\t" FSTR "\n", outbuf, bp->name); |
| 1134 | return; |
| 1135 | } |
| 1136 | } else |
| 1137 | keymacro_print(el, in); |
| 1138 | } |
| 1139 | |
| 1140 | |
| 1141 | /* map_print_some_keys(): |
no test coverage detected