diff options
Diffstat (limited to 'help.c')
-rw-r--r-- | help.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -259,3 +259,13 @@ void help_command_group(const struct cmd_group *grp, int argc, char **argv) usage_command_group(grp, full, 0); } + +int prefixcmp(const char *str, const char *prefix) +{ + for (; ; str++, prefix++) + if (!*prefix) + return 0; + else if (*str != *prefix) + return (unsigned char)*prefix - (unsigned char)*str; +} + |