return visual interpretation of the key bound to extended command, or the ext cmd name if not bound to any key. */
| 3068 | /* return visual interpretation of the key bound to extended command, |
| 3069 | or the ext cmd name if not bound to any key. */ |
| 3070 | char * |
| 3071 | cmd_from_ecname(const char *ecname) |
| 3072 | { |
| 3073 | static char cmdnamebuf[QBUFSZ]; |
| 3074 | const struct ext_func_tab *extcmd; |
| 3075 | |
| 3076 | for (extcmd = extcmdlist; extcmd->ef_txt; ++extcmd) |
| 3077 | if (!strcmp(extcmd->ef_txt, ecname)) { |
| 3078 | char key = cmd_from_func(extcmd->ef_funct); |
| 3079 | |
| 3080 | if (key) |
| 3081 | Sprintf(cmdnamebuf, "%s", visctrl(key)); |
| 3082 | else |
| 3083 | Sprintf(cmdnamebuf, "#%s", ecname); |
| 3084 | return cmdnamebuf; |
| 3085 | } |
| 3086 | |
| 3087 | cmdnamebuf[0] = '\0'; |
| 3088 | return cmdnamebuf; |
| 3089 | } |
| 3090 | |
| 3091 | const char * |
| 3092 | ecname_from_fn(int (*fn)(void)) |
no test coverage detected