usage_command_usagestr(cmd->usagestr, cmd->token, full, err);
}
+__attribute__((noreturn))
void usage(const char * const *usagestr)
{
usage_command_usagestr(usagestr, NULL, 1, 1);
fprintf(outf, "%s\n", grp->infostr);
}
+__attribute__((noreturn))
void help_unknown_token(const char *arg, const struct cmd_group *grp)
{
fprintf(stderr, "%s: unknown token '%s'\n", get_argv0_buf(), arg);
exit(1);
}
+__attribute__((noreturn))
void help_ambiguous_token(const char *arg, const struct cmd_group *grp)
{
const struct cmd_struct *cmd = grp->commands;
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;
-}
-