[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[COMMITTED] poked: make --version and --help GNU compatible
From: |
Mohammad-Reza Nabipoor |
Subject: |
[COMMITTED] poked: make --version and --help GNU compatible |
Date: |
Wed, 11 Jan 2023 09:27:42 +0100 |
2023-01-11 Mohammad-Reza Nabipoor <mnabipoor@gnu.org>
* poked/poked.c (poked_version): Add new function to print version
in GNU style.
(poked_options_init): Use `poked_version'.
(poked_help): Make it GNU-compatible.
---
ChangeLog | 7 +++++++
poked/poked.c | 27 ++++++++++++++++++++++++++-
2 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index e1762b12..d775c681 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-01-11 Mohammad-Reza Nabipoor <mnabipoor@gnu.org>
+
+ * poked/poked.c (poked_version): Add new function to print version
+ in GNU style.
+ (poked_options_init): Use `poked_version'.
+ (poked_help): Make it GNU-compatible.
+
2023-01-11 Mohammad-Reza Nabipoor <mnabipoor@gnu.org>
* libpoke/pvm.jitter (formatf32): Add literal parameter to the
diff --git a/poked/poked.c b/poked/poked.c
index 2143590f..6e86a7b1 100644
--- a/poked/poked.c
+++ b/poked/poked.c
@@ -471,6 +471,9 @@ poked_compile (const char *src, uint8_t chan, int
*poked_restart_p,
static void
poked_help (void);
+static void
+poked_version (void);
+
static struct poked_options
{
int debug_p;
@@ -509,7 +512,7 @@ poked_options_init (int argc, char *argv[])
break;
case OPT_VERSION:
case 'v':
- puts (VERSION);
+ poked_version ();
exit (EXIT_SUCCESS);
break;
case OPT_DEBUG:
@@ -539,6 +542,28 @@ poked_help (void)
puts (" -v, --version show version and exit");
puts (" -d, --debug be more verbose during the execution");
puts (" -S, --socket-path=PATH path of unix domain socket to listen on");
+ printf ("\n\
+Report bugs in the bug tracker at\n\
+ <%s>\n\
+ or by email to <%s>.\n", PACKAGE_BUGZILLA, PACKAGE_BUGREPORT);
+#ifdef PACKAGE_PACKAGER_BUG_REPORTS
+ printf (_("Report %s bugs to: %s\n"), PACKAGE_PACKAGER,
+ PACKAGE_PACKAGER_BUG_REPORTS);
+#endif
+ printf ("%s home page: <%s>\n", PACKAGE_NAME, PACKAGE_URL);
+ printf ("General help using GNU software: %s\n",
"<http://www.gnu.org/gethelp/>");
+}
+
+static void
+poked_version (void)
+{
+ printf ("poked (GNU poke) %s\n\n", VERSION);
+ printf ("\
+Copyright (C) %s The poke authors.\n\
+License GPLv3+: GNU GPL version 3 or later", "2022-2023");
+ puts (".\n\
+This is free software: you are free to change and redistribute it.\n\
+There is NO WARRANTY, to the extent permitted by law.");
}
int
--
2.39.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [COMMITTED] poked: make --version and --help GNU compatible,
Mohammad-Reza Nabipoor <=