X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=ggo.c;h=e3aa5794cee33815e7c04e1fd033a9a7c34bf244;hp=a9bc4c367c9af091939af1ed4e02072b71268c2a;hb=533b0303c27fb9ba098bb72e30f41f0939b2dbd2;hpb=a365b8263a0d7a1673699bdf454677c95b38eb95 diff --git a/ggo.c b/ggo.c index a9bc4c36..e3aa5794 100644 --- a/ggo.c +++ b/ggo.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 Andre Noll + * Copyright (C) 2008-2013 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -15,7 +15,7 @@ * * \param fmt Usual format string. */ -__printf_1_2 void printf_or_die(const char *fmt, ...) +__printf_1_2 int printf_or_die(const char *fmt, ...) { va_list argp; int ret; @@ -24,7 +24,7 @@ __printf_1_2 void printf_or_die(const char *fmt, ...) ret = vprintf(fmt, argp); va_end(argp); if (ret >= 0) - return; + return ret; exit(EXIT_FAILURE); } @@ -46,7 +46,6 @@ void ggo_print_help(struct ggo_help *help, int detailed_help) p = help->short_help; if (!p) return; - p += 3; /* skip -h and -V */ for (; *p; p++) printf_or_die("\t%s\n", *p); }