aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2017-03-16 16:53:28 +0100
committerMarcello Stanisci <marcello.stanisci@inria.fr>2017-03-16 16:53:28 +0100
commit23dd95c65463bffdc46dc8e74a0b15eab568b9fd (patch)
tree9e9f654660de21d103b53f5efe00ac6aed93493a /src
parentb92543a726e5f0df8c29788badae049923f3b35a (diff)
downloadgnunet-23dd95c65463bffdc46dc8e74a0b15eab568b9fd.tar.gz
gnunet-23dd95c65463bffdc46dc8e74a0b15eab568b9fd.zip
Last commit as of getopt porting. 'social' still gives warnings.
Diffstat (limited to 'src')
-rw-r--r--src/auction/gnunet-auction-create.c67
-rw-r--r--src/dht/gnunet-dht-put.c5
-rw-r--r--src/identity-provider/gnunet-identity-token.c19
-rw-r--r--src/secretsharing/gnunet-service-secretsharing.c2
4 files changed, 57 insertions, 36 deletions
diff --git a/src/auction/gnunet-auction-create.c b/src/auction/gnunet-auction-create.c
index a4c029572..e6fcab097 100644
--- a/src/auction/gnunet-auction-create.c
+++ b/src/auction/gnunet-auction-create.c
@@ -155,30 +155,49 @@ fail:
155int 155int
156main (int argc, char *const *argv) 156main (int argc, char *const *argv)
157{ 157{
158 static const struct GNUNET_GETOPT_CommandLineOption options[] = { 158 struct GNUNET_GETOPT_CommandLineOption options[] = {
159 {'d', "description", "FILE", 159
160 gettext_noop ("description of the item to be sold"), 160 GNUNET_GETOPT_OPTION_FILENAME ('d',
161 1, &GNUNET_GETOPT_set_filename, &fndesc}, 161 "description",
162 {'p', "pricemap", "FILE", 162 "FILE",
163 gettext_noop ("mapping of possible prices"), 163 gettext_noop ("description of the item to be sold"),
164 1, &GNUNET_GETOPT_set_filename, &fnprices}, 164 &fndesc),
165 {'r', "roundtime", "DURATION", 165
166 gettext_noop ("max duration per round"), 166 GNUNET_GETOPT_OPTION_FILENAME ('p',
167 1, &GNUNET_GETOPT_set_relative_time, &dround}, 167 "pricemap",
168 {'s', "regtime", "DURATION", 168 "FILE",
169 gettext_noop ("duration until auction starts"), 169 gettext_noop ("mapping of possible prices"),
170 1, &GNUNET_GETOPT_set_relative_time, &dstart}, 170 &fnprices),
171 {'m', "m", "NUMBER", 171
172 gettext_noop ("number of items to sell\n" 172 GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('r',
173 "0 for first price auction\n" 173 "roundtime",
174 ">0 for vickrey/M+1st price auction"), 174 "DURATION",
175 1, &GNUNET_GETOPT_set_uint, &m}, 175 gettext_noop ("max duration per round"),
176 {'u', "public", NULL, 176 &dround),
177 gettext_noop ("public auction outcome"), 177
178 0, &GNUNET_GETOPT_set_one, &outcome}, 178 GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('s',
179 {'i', "interactive", NULL, 179 "regtime",
180 gettext_noop ("keep running in foreground until auction completes"), 180 "DURATION",
181 0, &GNUNET_GETOPT_set_one, &interactive}, 181 gettext_noop ("duration until auction starts"),
182 &dstart),
183 GNUNET_GETOPT_OPTION_SET_UINT ('m',
184 "m",
185 "NUMBER",
186 gettext_noop ("number of items to sell\n"
187 "0 for first price auction\n"
188 ">0 for vickrey/M+1st price auction"),
189 &m),
190
191 GNUNET_GETOPT_OPTION_SET_ONE ('u',
192 "public",
193 gettext_noop ("public auction outcome"),
194 &outcome),
195
196 GNUNET_GETOPT_OPTION_SET_ONE ('i',
197 "interactive",
198 gettext_noop ("keep running in foreground until auction completes"),
199 &interactive),
200
182 GNUNET_GETOPT_OPTION_END 201 GNUNET_GETOPT_OPTION_END
183 }; 202 };
184 if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) 203 if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
diff --git a/src/dht/gnunet-dht-put.c b/src/dht/gnunet-dht-put.c
index 55644a94c..bf88e5ded 100644
--- a/src/dht/gnunet-dht-put.c
+++ b/src/dht/gnunet-dht-put.c
@@ -244,10 +244,7 @@ main (int argc, char *const *argv)
244 gettext_noop ("the type to insert data as"), 244 gettext_noop ("the type to insert data as"),
245 &query_type), 245 &query_type),
246 246
247 GNUNET_GETOPT_OPTION_SET_ONE ('V', 247 GNUNET_GETOPT_OPTION_VERBOSE (&verbose),
248 "verbose",
249 gettext_noop ("be verbose (print progress information)"),
250 &verbose),
251 248
252 GNUNET_GETOPT_OPTION_END 249 GNUNET_GETOPT_OPTION_END
253 }; 250 };
diff --git a/src/identity-provider/gnunet-identity-token.c b/src/identity-provider/gnunet-identity-token.c
index 4bb3292be..906899ea7 100644
--- a/src/identity-provider/gnunet-identity-token.c
+++ b/src/identity-provider/gnunet-identity-token.c
@@ -158,13 +158,18 @@ run (void *cls,
158int 158int
159main(int argc, char *const argv[]) 159main(int argc, char *const argv[])
160{ 160{
161 static const struct GNUNET_GETOPT_CommandLineOption options[] = { 161 struct GNUNET_GETOPT_CommandLineOption options[] = {
162 {'t', "token", NULL, 162
163 gettext_noop ("GNUid token"), 1, 163 GNUNET_GETOPT_OPTION_STRING ('t',
164 &GNUNET_GETOPT_set_string, &token}, 164 "token",
165 {'p', "print", NULL, 165 NULL,
166 gettext_noop ("Print token contents"), 0, 166 gettext_noop ("GNUid token"),
167 &GNUNET_GETOPT_set_one, &print_token}, 167 &token),
168
169 GNUNET_GETOPT_OPTION_SET_ONE ('p',
170 "print",
171 gettext_noop ("Print token contents"),
172 &print_token),
168 173
169 GNUNET_GETOPT_OPTION_END 174 GNUNET_GETOPT_OPTION_END
170 }; 175 };
diff --git a/src/secretsharing/gnunet-service-secretsharing.c b/src/secretsharing/gnunet-service-secretsharing.c
index fa35dc21b..6c281df86 100644
--- a/src/secretsharing/gnunet-service-secretsharing.c
+++ b/src/secretsharing/gnunet-service-secretsharing.c
@@ -720,7 +720,7 @@ keygen_round1_new_element (void *cls,
720 { 720 {
721 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 721 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
722 "keygen commit data with wrong size (%u) in consensus, " 722 "keygen commit data with wrong size (%u) in consensus, "
723 " %lu expected\n", 723 " %u expected\n",
724 element->size, sizeof (struct GNUNET_SECRETSHARING_KeygenCommitData)); 724 element->size, sizeof (struct GNUNET_SECRETSHARING_KeygenCommitData));
725 return; 725 return;
726 } 726 }