{
const char **p;
- if (flags & GPH_PRINT_NAME_VERSION)
- printf_or_die("%s\n", version_single_line(help->prefix));
- if (help->purpose && (flags & GPH_PRINT_PURPOSE))
- printf_or_die("\n%s\n", help->purpose);
+ if (help->purpose && (flags & GPH_PRINT_NAME_PURPOSE))
+ printf_or_die("para_%s - %s\n", help->prefix, help->purpose);
if (help->usage && (flags & GPH_PRINT_USAGE))
printf_or_die("\n%s\n", help->usage);
if (help->description && (flags & GPH_PRINT_DESCRIPTION))
enum ggo_print_help_flags {
/** Whether to print the short help or the detailed help. */
GPH_DETAILED = 1 << 0,
- /** Print the program or module name, git version and codename. */
- GPH_PRINT_NAME_VERSION = 1 << 1,
+ /** Print the program or module name and the purpose text. */
+ GPH_PRINT_NAME_PURPOSE = 1 << 1,
/** Print the synopsis. */
GPH_PRINT_USAGE = 1 << 2,
/** Print the description text. */
GPH_PRINT_DESCRIPTION = 1 << 3,
- /** Print the purpose text. */
- GPH_PRINT_PURPOSE = 1 << 4,
};
/** Used to print the normal help of programs (--help) */
#define GPH_STANDARD_FLAGS \
- (GPH_PRINT_NAME_VERSION | GPH_PRINT_PURPOSE | GPH_PRINT_USAGE)
+ (GPH_PRINT_NAME_PURPOSE | GPH_PRINT_USAGE)
/** Additional information for --detailed-help. */
#define GPH_STANDARD_FLAGS_DETAILED \
{
static char buf[100];
snprintf(buf, sizeof(buf) - 1,
- "para_%s " GIT_VERSION " (" CODENAME ")", pfx);
+ "para_%s " GIT_VERSION, pfx);
return buf;
}
static char buf[512];
snprintf(buf, sizeof(buf) - 1, "%s\n"
- "built: " BUILD_DATE ", " UNAME_RS ", " CC_VERSION "\n"
"Copyright (C) 2013 Andre Noll\n"
"This is free software with ABSOLUTELY NO WARRANTY."
" See COPYING for details.\n"
- "Report bugs to <maan@systemlinux.org>.\n",
+ "Report bugs to <maan@systemlinux.org>.\n"
+ "build date: " BUILD_DATE ",\n"
+ "build system: " UNAME_RS ",\n"
+ "compiler: " CC_VERSION ".\n",
version_single_line(pfx)
);
return buf;