summaryrefslogtreecommitdiff
path: root/gl/version-etc.h
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2009-08-06 16:30:15 +0200
committerSimon Josefsson <simon@josefsson.org>2009-08-06 16:30:15 +0200
commit92a5cd11f9b33f427c495dca22d9aac1cf7b1f3d (patch)
treeb3bb68a392114cd82b5f174061b0d6ab77cfa1f2 /gl/version-etc.h
parenta532faf3bd6d95bf41ba75733a72b504090667af (diff)
downloadgnutls-92a5cd11f9b33f427c495dca22d9aac1cf7b1f3d.tar.gz
Update gnulib files.
Diffstat (limited to 'gl/version-etc.h')
-rw-r--r--gl/version-etc.h42
1 files changed, 41 insertions, 1 deletions
diff --git a/gl/version-etc.h b/gl/version-etc.h
index 33a8e7f143..8ce02fecb8 100644
--- a/gl/version-etc.h
+++ b/gl/version-etc.h
@@ -22,17 +22,57 @@
# include <stdarg.h>
# include <stdio.h>
+/* The `sentinel' attribute was added in gcc 4.0. */
+#ifndef ATTRIBUTE_SENTINEL
+# if 4 <= __GNUC__
+# define ATTRIBUTE_SENTINEL __attribute__ ((__sentinel__))
+# else
+# define ATTRIBUTE_SENTINEL /* empty */
+# endif
+#endif
+
extern const char version_etc_copyright[];
+/* The three functions below display the --version information in the
+ standard way: command and package names, package version, followed
+ by a short GPLv3+ notice and a list of up to 10 author names.
+
+ If COMMAND_NAME is NULL, the PACKAGE is asumed to be the name of
+ the program. The formats are therefore:
+
+ PACKAGE VERSION
+
+ or
+
+ COMMAND_NAME (PACKAGE) VERSION.
+
+ The functions differ in the way they are passed author names: */
+
+/* N_AUTHORS names are supplied in array AUTHORS. */
+extern void version_etc_arn (FILE *stream,
+ const char *command_name, const char *package,
+ const char *version,
+ const char * const * authors, size_t n_authors);
+
+/* Names are passed in the NULL-terminated array AUTHORS. */
+extern void version_etc_ar (FILE *stream,
+ const char *command_name, const char *package,
+ const char *version, const char * const * authors);
+
+/* Names are passed in the NULL-terminated va_list. */
extern void version_etc_va (FILE *stream,
const char *command_name, const char *package,
const char *version, va_list authors);
+/* Names are passed as separate arguments, with an additional
+ NULL argument at the end. */
extern void version_etc (FILE *stream,
const char *command_name, const char *package,
const char *version,
- /* const char *author1, ...*/ ...);
+ /* const char *author1, ..., NULL */ ...)
+ ATTRIBUTE_SENTINEL;
+/* Display the usual `Report bugs to' stanza */
extern void emit_bug_reporting_address (void);
#endif /* VERSION_ETC_H */