projects
/
paraslash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stream cipher: Allow in-place encryption.
[paraslash.git]
/
ggo.c
diff --git
a/ggo.c
b/ggo.c
index 55f1043082e5c511231616ad6bc5bd6a43e1f6af..a9bc4c367c9af091939af1ed4e02072b71268c2a 100644
(file)
--- a/
ggo.c
+++ b/
ggo.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 2008 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2008
-2011
Andre Noll <maan@systemlinux.org>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
@@
-10,6
+10,11
@@
#include "para.h"
#include "ggo.h"
#include "para.h"
#include "ggo.h"
+/**
+ * Wrapper for printf() that exits on errors.
+ *
+ * \param fmt Usual format string.
+ */
__printf_1_2 void printf_or_die(const char *fmt, ...)
{
va_list argp;
__printf_1_2 void printf_or_die(const char *fmt, ...)
{
va_list argp;
@@
-20,9
+25,15
@@
__printf_1_2 void printf_or_die(const char *fmt, ...)
va_end(argp);
if (ret >= 0)
return;
va_end(argp);
if (ret >= 0)
return;
-
fprintf(stderr, "%s: %s\n", __FUNCTION__, strerror(errno)
);
+
exit(EXIT_FAILURE
);
}
}
+/**
+ * Print one of the two given help texts.
+ *
+ * \param help contains the help texts.
+ * \param detailed_help Whether to print the detailed help text.
+ */
void ggo_print_help(struct ggo_help *help, int detailed_help)
{
const char **p;
void ggo_print_help(struct ggo_help *help, int detailed_help)
{
const char **p;