| 103 | } |
| 104 | |
| 105 | static void print_command_list(const struct cmdname_help *cmds, |
| 106 | uint32_t mask, int longest) |
| 107 | { |
| 108 | int i; |
| 109 | |
| 110 | for (i = 0; cmds[i].name; i++) { |
| 111 | if (cmds[i].category & mask) { |
| 112 | size_t len = utf8_strwidth(cmds[i].name); |
| 113 | printf(" %s ", cmds[i].name); |
| 114 | if (longest > len) |
| 115 | mput_char(' ', longest - len); |
| 116 | puts(_(cmds[i].help)); |
| 117 | } |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | static int cmd_name_cmp(const void *elem1, const void *elem2) |
| 122 | { |
no test coverage detected