[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 12/28: Port 'statistics' to the new getopt API.
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 12/28: Port 'statistics' to the new getopt API. |
Date: |
Fri, 17 Mar 2017 12:09:44 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
commit 7fbbaf40abc0f17f6788f8e2c583c7ef5add5dbb
Author: Marcello Stanisci <address@hidden>
AuthorDate: Wed Mar 15 10:48:21 2017 +0100
Port 'statistics' to the new getopt API.
---
src/statistics/gnunet-statistics.c | 60 ++++++++++++++++++++++++--------------
1 file changed, 38 insertions(+), 22 deletions(-)
diff --git a/src/statistics/gnunet-statistics.c
b/src/statistics/gnunet-statistics.c
index ed0c3f27d..6cfc56171 100644
--- a/src/statistics/gnunet-statistics.c
+++ b/src/statistics/gnunet-statistics.c
@@ -378,28 +378,44 @@ run (void *cls,
int
main (int argc, char *const *argv)
{
- static const struct GNUNET_GETOPT_CommandLineOption options[] = {
- {'n', "name", "NAME",
- gettext_noop ("limit output to statistics for the given NAME"), 1,
- &GNUNET_GETOPT_set_string, &name},
- {'p', "persistent", NULL,
- gettext_noop ("make the value being set persistent"), 0,
- &GNUNET_GETOPT_set_one, &persistent},
- {'s', "subsystem", "SUBSYSTEM",
- gettext_noop ("limit output to the given SUBSYSTEM"), 1,
- &GNUNET_GETOPT_set_string, &subsystem},
- {'q', "quiet", NULL,
- gettext_noop ("just print the statistics value"), 0,
- &GNUNET_GETOPT_set_one, &quiet},
- {'w', "watch", NULL,
- gettext_noop ("watch value continuously"), 0,
- &GNUNET_GETOPT_set_one, &watch},
- {'r', "remote", NULL,
- gettext_noop ("connect to remote host"), 1,
- &GNUNET_GETOPT_set_string, &remote_host},
- {'o', "port", NULL,
- gettext_noop ("port for remote host"), 1,
- &GNUNET_GETOPT_set_uint, &remote_port},
+ struct GNUNET_GETOPT_CommandLineOption options[] = {
+ GNUNET_GETOPT_OPTION_STRING ('n',
+ "name",
+ "NAME",
+ gettext_noop ("limit output to statistics for
the given NAME"),
+ &name),
+
+ GNUNET_GETOPT_OPTION_SET_ONE ('p',
+ "persistent",
+ gettext_noop ("make the value being set
persistent"),
+ &persistent),
+
+ GNUNET_GETOPT_OPTION_STRING ('s',
+ "subsystem",
+ "SUBSYSTEM",
+ gettext_noop ("limit output to the given
SUBSYSTEM"),
+ &subsystem),
+
+ GNUNET_GETOPT_OPTION_SET_ONE ('q',
+ "quiet",
+ gettext_noop ("just print the statistics
value"),
+ &quiet),
+
+ GNUNET_GETOPT_OPTION_SET_ONE ('w',
+ "watch",
+ gettext_noop ("watch value continuously"),
+ &watch),
+
+ GNUNET_GETOPT_OPTION_STRING ('r',
+ "remote",
+ "REMOTE",
+ gettext_noop ("connect to remote host"),
+ &remote_host),
+ GNUNET_GETOPT_OPTION_SET_ULONG ('o',
+ "port",
+ "PORT",
+ gettext_noop ("port for remote host"),
+ &remote_port),
GNUNET_GETOPT_OPTION_END
};
remote_port = 0;
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] branch master updated (2951cdb72 -> 5b085881a), gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 02/28: Test commit, gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 04/28: Merge branch 'getopt' of git+ssh://gnunet.org/gnunet into getopt, gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 05/28: add GNUNET_GETOPT_OPTION_SET_ABSOLUTE_TIME, gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 06/28: Port 'statistics' to the new getopt API., gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 03/28: fix test case, implement base32 argument parser logic, gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 01/28: getopt major style fix, remove macro-mania with nicer typed functions, gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 12/28: Port 'statistics' to the new getopt API.,
gnunet <=
- [GNUnet-SVN] [gnunet] 11/28: add json command line option parser, gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 13/28: Porting 'arm'., gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 10/28: add GNUNET_GETOPT_OPTION_SET_ABSOLUTE_TIME, gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 15/28: merging, gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 16/28: Porting 'nat'., gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 07/28: Porting 'arm'., gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 17/28: Porting 'nat-auto'., gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 14/28: add way to mark options as mandatory, get tests to pass again, gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 09/28: fix test case, implement base32 argument parser logic, gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 26/28: Fix compiler warnings., gnunet, 2017/03/17