2 * Copyright (C) 2008-2012 Andre Noll <maan@systemlinux.org>
4 * Licensed under the GPL v2. For licencing details see COPYING.
7 /** \file ggo.c Function for printing help. */
14 * Wrapper for printf() that exits on errors.
16 * \param fmt Usual format string.
18 __printf_1_2 void printf_or_die(const char *fmt, ...)
24 ret = vprintf(fmt, argp);
32 * Print one of the two given help texts.
34 * \param help contains the help texts.
35 * \param detailed_help Whether to print the detailed help text.
37 void ggo_print_help(struct ggo_help *help, int detailed_help)
44 p = help->detailed_help;
49 p += 3; /* skip -h and -V */
51 printf_or_die("\t%s\n", *p);