| 623 | } |
| 624 | |
| 625 | static void add_cmd_list(struct cmdnames *cmds, struct cmdnames *old) |
| 626 | { |
| 627 | int i; |
| 628 | ALLOC_GROW(cmds->names, cmds->cnt + old->cnt, cmds->alloc); |
| 629 | |
| 630 | for (i = 0; i < old->cnt; i++) |
| 631 | cmds->names[cmds->cnt++] = old->names[i]; |
| 632 | FREE_AND_NULL(old->names); |
| 633 | old->cnt = 0; |
| 634 | } |
| 635 | |
| 636 | /* An empirically derived magic number */ |
| 637 | #define SIMILARITY_FLOOR 7 |