* Wrapper for printf() that exits on errors.
*
* \param fmt Usual format string.
+ *
+ * \return The return value of the underlying (successful) call to vprintf(3),
+ * i.e. the number of characters printed, excluding the terminating null byte.
*/
__printf_1_2 int printf_or_die(const char *fmt, ...)
{
{
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))