regfile_iter_next(riter)
) {
eiter->num_maps++;
- eiter->maps = realloc(eiter->maps,
+ eiter->maps = xrealloc(eiter->maps,
eiter->num_maps * sizeof(*eiter->maps));
eiter->maps[eiter->num_maps - 1] = iov;
}
for (i = 0; i < LSG_NUM_TFORTUNE_SUBCOMMANDS; i++) {
if (i > 0)
n += printf(", ");
- n += printf("%s", subcommand_names[i]);
if (n > 70) {
printf("\n\t");
n = 8;
}
+ n += printf("%s", subcommand_names[i]);
}
printf("\n");
}
}
EXPORT_CMD_HANDLER(help);
+const char *GET_VERSION(void);
static void handle_help_and_version(void)
{
int i;
const struct lls_command *cmd;
if (OPT_GIVEN(TFORTUNE, VERSION)) {
- printf("tfortune %s\n"
+ printf(PACKAGE " %s\n"
"Copyright (C) " COPYRIGHT_YEAR " " AUTHOR ".\n"
- "License " LICENSE ": <" LICENSE_URL ">.\n"
+ "License: " LICENSE ": <" LICENSE_URL ">.\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n"
- "Report bugs to " AUTHOR " <" PACKAGE_BUGREPORT ">.\n"
+ "\n"
+ "Web page: " PACKAGE_HOMEPAGE "\n"
+ "Clone URL: " CLONE_URL "\n"
+ "Gitweb: " GITWEB_URL "\n"
+ "Author's Home Page: " HOME_URL "\n"
+ "Send feedback to: " AUTHOR " <" EMAIL ">\n"
,
- tf_version()
+ GET_VERSION()
);
exit(EXIT_SUCCESS);
}
}
break;
case WT_LONG_OPT_WITH_ARG:
- if (strcmp(prev, "--basename") == 0) {
+ if (strcmp(prev, "--basedir") == 0) {
activate_dirname_completion();
return 1;
}