X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=ggo.c;h=deea00bbb1ac46074af5f87ec1fc7787922b0138;hp=3a441db1fa42f16d701dfa7492cf4bbaf22744f9;hb=093dda1824631372587d107d64601389027c6187;hpb=48f1fc440eb53b0efb7c1beaba396e81b8bcb1ab diff --git a/ggo.c b/ggo.c index 3a441db1..deea00bb 100644 --- a/ggo.c +++ b/ggo.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 Andre Noll + * Copyright (C) 2008-2014 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -15,6 +15,9 @@ * 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, ...) { @@ -39,10 +42,8 @@ void ggo_print_help(struct ggo_help *help, unsigned flags) { 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))