summaryrefslogtreecommitdiff
path: root/src/main/version.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/version.c')
-rw-r--r--src/main/version.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/main/version.c b/src/main/version.c
new file mode 100644
index 0000000..77d0943
--- /dev/null
+++ b/src/main/version.c
@@ -0,0 +1,37 @@
+/*
+ * Output version information to stdout.
+ *
+ * Copyright 2012 Andrew Wood, distributed under the Artistic License 2.0.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+
+/*
+ * Display current package version.
+ */
+void display_version(void)
+{
+ printf(_("%s %s - Copyright(C) %s %s"), /* RATS: ignore */
+ PROGRAM_NAME, VERSION, COPYRIGHT_YEAR, COPYRIGHT_HOLDER);
+ printf("\n\n");
+ printf(_("Web site: %s"), /* RATS: ignore */
+ PROJECT_HOMEPAGE);
+ printf("\n\n");
+ printf("%s",
+ _("This program is free software, and is being distributed "
+ "under the\nterms of the Artistic License 2.0."));
+ printf("\n\n");
+ printf("%s",
+ _
+ ("This program is distributed in the hope that it will be useful,\n"
+ "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+ "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."));
+ printf("\n\n");
+}
+
+/* EOF */