diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-03-25 21:25:44 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-03-25 21:25:44 +0100 |
commit | 5a7cef0202631204485cbcb1e36671e4321a936f (patch) | |
tree | ff3d10ac71f9284f18be7c33939f3438071e15c4 /src/dht | |
parent | 2ad934742422ecb63fe3fafdc8c73d067a9e2fb7 (diff) | |
download | gnunet-5a7cef0202631204485cbcb1e36671e4321a936f.tar.gz gnunet-5a7cef0202631204485cbcb1e36671e4321a936f.zip |
rename GNUNET_GETOPT functions to achieve better consistency
Diffstat (limited to 'src/dht')
-rw-r--r-- | src/dht/gnunet-dht-get.c | 12 | ||||
-rw-r--r-- | src/dht/gnunet-dht-monitor.c | 8 | ||||
-rw-r--r-- | src/dht/gnunet-dht-put.c | 16 | ||||
-rw-r--r-- | src/dht/gnunet_dht_profiler.c | 16 |
4 files changed, 26 insertions, 26 deletions
diff --git a/src/dht/gnunet-dht-get.c b/src/dht/gnunet-dht-get.c index 67f0ce76d..e361df336 100644 --- a/src/dht/gnunet-dht-get.c +++ b/src/dht/gnunet-dht-get.c | |||
@@ -239,37 +239,37 @@ main (int argc, char *const *argv) | |||
239 | 239 | ||
240 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 240 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
241 | 241 | ||
242 | GNUNET_GETOPT_OPTION_STRING ('k', | 242 | GNUNET_GETOPT_option_string ('k', |
243 | "key", | 243 | "key", |
244 | "KEY", | 244 | "KEY", |
245 | gettext_noop ("the query key"), | 245 | gettext_noop ("the query key"), |
246 | &query_key), | 246 | &query_key), |
247 | 247 | ||
248 | GNUNET_GETOPT_OPTION_SET_UINT ('r', | 248 | GNUNET_GETOPT_option_uint ('r', |
249 | "replication", | 249 | "replication", |
250 | "LEVEL", | 250 | "LEVEL", |
251 | gettext_noop ("how many parallel requests (replicas) to create"), | 251 | gettext_noop ("how many parallel requests (replicas) to create"), |
252 | &replication), | 252 | &replication), |
253 | 253 | ||
254 | 254 | ||
255 | GNUNET_GETOPT_OPTION_SET_UINT ('t', | 255 | GNUNET_GETOPT_option_uint ('t', |
256 | "type", | 256 | "type", |
257 | "TYPE", | 257 | "TYPE", |
258 | gettext_noop ("the type of data to look for"), | 258 | gettext_noop ("the type of data to look for"), |
259 | &query_type), | 259 | &query_type), |
260 | 260 | ||
261 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('T', | 261 | GNUNET_GETOPT_option_relative_time ('T', |
262 | "timeout", | 262 | "timeout", |
263 | "TIMEOUT", | 263 | "TIMEOUT", |
264 | gettext_noop ("how long to execute this query before giving up?"), | 264 | gettext_noop ("how long to execute this query before giving up?"), |
265 | &timeout_request), | 265 | &timeout_request), |
266 | 266 | ||
267 | GNUNET_GETOPT_OPTION_SET_ONE ('x', | 267 | GNUNET_GETOPT_option_flag ('x', |
268 | "demultiplex", | 268 | "demultiplex", |
269 | gettext_noop ("use DHT's demultiplex everywhere option"), | 269 | gettext_noop ("use DHT's demultiplex everywhere option"), |
270 | &demultixplex_everywhere), | 270 | &demultixplex_everywhere), |
271 | 271 | ||
272 | GNUNET_GETOPT_OPTION_VERBOSE (&verbose), | 272 | GNUNET_GETOPT_option_verbose (&verbose), |
273 | GNUNET_GETOPT_OPTION_END | 273 | GNUNET_GETOPT_OPTION_END |
274 | }; | 274 | }; |
275 | 275 | ||
diff --git a/src/dht/gnunet-dht-monitor.c b/src/dht/gnunet-dht-monitor.c index e4e8c46a1..b7360bbab 100644 --- a/src/dht/gnunet-dht-monitor.c +++ b/src/dht/gnunet-dht-monitor.c | |||
@@ -292,25 +292,25 @@ main (int argc, char *const *argv) | |||
292 | { | 292 | { |
293 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 293 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
294 | 294 | ||
295 | GNUNET_GETOPT_OPTION_STRING ('k', | 295 | GNUNET_GETOPT_option_string ('k', |
296 | "key", | 296 | "key", |
297 | "KEY", | 297 | "KEY", |
298 | gettext_noop ("the query key"), | 298 | gettext_noop ("the query key"), |
299 | &query_key), | 299 | &query_key), |
300 | 300 | ||
301 | GNUNET_GETOPT_OPTION_SET_UINT ('t', | 301 | GNUNET_GETOPT_option_uint ('t', |
302 | "type", | 302 | "type", |
303 | "TYPE", | 303 | "TYPE", |
304 | gettext_noop ("the type of data to look for"), | 304 | gettext_noop ("the type of data to look for"), |
305 | &block_type), | 305 | &block_type), |
306 | 306 | ||
307 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('T', | 307 | GNUNET_GETOPT_option_relative_time ('T', |
308 | "timeout", | 308 | "timeout", |
309 | "TIMEOUT", | 309 | "TIMEOUT", |
310 | gettext_noop ("how long should the monitor command run"), | 310 | gettext_noop ("how long should the monitor command run"), |
311 | &timeout_request), | 311 | &timeout_request), |
312 | 312 | ||
313 | GNUNET_GETOPT_OPTION_SET_ONE ('V', | 313 | GNUNET_GETOPT_option_flag ('V', |
314 | "verbose", | 314 | "verbose", |
315 | gettext_noop ("be verbose (print progress information)"), | 315 | gettext_noop ("be verbose (print progress information)"), |
316 | &verbose), | 316 | &verbose), |
diff --git a/src/dht/gnunet-dht-put.c b/src/dht/gnunet-dht-put.c index bf88e5ded..f183fe588 100644 --- a/src/dht/gnunet-dht-put.c +++ b/src/dht/gnunet-dht-put.c | |||
@@ -204,47 +204,47 @@ main (int argc, char *const *argv) | |||
204 | 204 | ||
205 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 205 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
206 | 206 | ||
207 | GNUNET_GETOPT_OPTION_STRING ('d', | 207 | GNUNET_GETOPT_option_string ('d', |
208 | "data", | 208 | "data", |
209 | "DATA", | 209 | "DATA", |
210 | gettext_noop ("the data to insert under the key"), | 210 | gettext_noop ("the data to insert under the key"), |
211 | &data), | 211 | &data), |
212 | 212 | ||
213 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('e', | 213 | GNUNET_GETOPT_option_relative_time ('e', |
214 | "expiration", | 214 | "expiration", |
215 | "EXPIRATION", | 215 | "EXPIRATION", |
216 | gettext_noop ("how long to store this entry in the dht (in seconds)"), | 216 | gettext_noop ("how long to store this entry in the dht (in seconds)"), |
217 | &expiration), | 217 | &expiration), |
218 | 218 | ||
219 | GNUNET_GETOPT_OPTION_STRING ('k', | 219 | GNUNET_GETOPT_option_string ('k', |
220 | "key", | 220 | "key", |
221 | "KEY", | 221 | "KEY", |
222 | gettext_noop ("the query key"), | 222 | gettext_noop ("the query key"), |
223 | &query_key), | 223 | &query_key), |
224 | 224 | ||
225 | GNUNET_GETOPT_OPTION_SET_ONE ('x', | 225 | GNUNET_GETOPT_option_flag ('x', |
226 | "demultiplex", | 226 | "demultiplex", |
227 | gettext_noop ("use DHT's demultiplex everywhere option"), | 227 | gettext_noop ("use DHT's demultiplex everywhere option"), |
228 | &demultixplex_everywhere), | 228 | &demultixplex_everywhere), |
229 | 229 | ||
230 | GNUNET_GETOPT_OPTION_SET_UINT ('r', | 230 | GNUNET_GETOPT_option_uint ('r', |
231 | "replication", | 231 | "replication", |
232 | "LEVEL", | 232 | "LEVEL", |
233 | gettext_noop ("how many replicas to create"), | 233 | gettext_noop ("how many replicas to create"), |
234 | &replication), | 234 | &replication), |
235 | 235 | ||
236 | GNUNET_GETOPT_OPTION_SET_ONE ('R', | 236 | GNUNET_GETOPT_option_flag ('R', |
237 | "record", | 237 | "record", |
238 | gettext_noop ("use DHT's record route option"), | 238 | gettext_noop ("use DHT's record route option"), |
239 | &record_route), | 239 | &record_route), |
240 | 240 | ||
241 | GNUNET_GETOPT_OPTION_SET_UINT ('t', | 241 | GNUNET_GETOPT_option_uint ('t', |
242 | "type", | 242 | "type", |
243 | "TYPE", | 243 | "TYPE", |
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_VERBOSE (&verbose), | 247 | GNUNET_GETOPT_option_verbose (&verbose), |
248 | 248 | ||
249 | GNUNET_GETOPT_OPTION_END | 249 | GNUNET_GETOPT_OPTION_END |
250 | }; | 250 | }; |
diff --git a/src/dht/gnunet_dht_profiler.c b/src/dht/gnunet_dht_profiler.c index f65141640..a8807bea8 100644 --- a/src/dht/gnunet_dht_profiler.c +++ b/src/dht/gnunet_dht_profiler.c | |||
@@ -1182,49 +1182,49 @@ main (int argc, char *const *argv) | |||
1182 | int rc; | 1182 | int rc; |
1183 | 1183 | ||
1184 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 1184 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
1185 | GNUNET_GETOPT_OPTION_SET_UINT ('n', | 1185 | GNUNET_GETOPT_option_uint ('n', |
1186 | "peers", | 1186 | "peers", |
1187 | "COUNT", | 1187 | "COUNT", |
1188 | gettext_noop ("number of peers to start"), | 1188 | gettext_noop ("number of peers to start"), |
1189 | &num_peers), | 1189 | &num_peers), |
1190 | 1190 | ||
1191 | GNUNET_GETOPT_OPTION_SET_UINT ('s', | 1191 | GNUNET_GETOPT_option_uint ('s', |
1192 | "searches", | 1192 | "searches", |
1193 | "COUNT", | 1193 | "COUNT", |
1194 | gettext_noop ("maximum number of times we try to search for successor circle formation (0 for R5N)"), | 1194 | gettext_noop ("maximum number of times we try to search for successor circle formation (0 for R5N)"), |
1195 | &max_searches), | 1195 | &max_searches), |
1196 | 1196 | ||
1197 | GNUNET_GETOPT_OPTION_STRING ('H', | 1197 | GNUNET_GETOPT_option_string ('H', |
1198 | "hosts", | 1198 | "hosts", |
1199 | "FILENAME", | 1199 | "FILENAME", |
1200 | gettext_noop ("name of the file with the login information for the testbed"), | 1200 | gettext_noop ("name of the file with the login information for the testbed"), |
1201 | &hosts_file), | 1201 | &hosts_file), |
1202 | 1202 | ||
1203 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('D', | 1203 | GNUNET_GETOPT_option_relative_time ('D', |
1204 | "delay", | 1204 | "delay", |
1205 | "DELAY", | 1205 | "DELAY", |
1206 | gettext_noop ("delay between rounds for collecting statistics (default: 30 sec)"), | 1206 | gettext_noop ("delay between rounds for collecting statistics (default: 30 sec)"), |
1207 | &delay_stats), | 1207 | &delay_stats), |
1208 | 1208 | ||
1209 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('P', | 1209 | GNUNET_GETOPT_option_relative_time ('P', |
1210 | "PUT-delay", | 1210 | "PUT-delay", |
1211 | "DELAY", | 1211 | "DELAY", |
1212 | gettext_noop ("delay to start doing PUTs (default: 1 sec)"), | 1212 | gettext_noop ("delay to start doing PUTs (default: 1 sec)"), |
1213 | &delay_put), | 1213 | &delay_put), |
1214 | 1214 | ||
1215 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('G', | 1215 | GNUNET_GETOPT_option_relative_time ('G', |
1216 | "GET-delay", | 1216 | "GET-delay", |
1217 | "DELAY", | 1217 | "DELAY", |
1218 | gettext_noop ("delay to start doing GETs (default: 5 min)"), | 1218 | gettext_noop ("delay to start doing GETs (default: 5 min)"), |
1219 | &delay_get), | 1219 | &delay_get), |
1220 | GNUNET_GETOPT_OPTION_SET_UINT ('r', | 1220 | GNUNET_GETOPT_option_uint ('r', |
1221 | "replication", | 1221 | "replication", |
1222 | "DEGREE", | 1222 | "DEGREE", |
1223 | gettext_noop ("replication degree for DHT PUTs"), | 1223 | gettext_noop ("replication degree for DHT PUTs"), |
1224 | &replication), | 1224 | &replication), |
1225 | 1225 | ||
1226 | 1226 | ||
1227 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t', | 1227 | GNUNET_GETOPT_option_relative_time ('t', |
1228 | "timeout", | 1228 | "timeout", |
1229 | "TIMEOUT", | 1229 | "TIMEOUT", |
1230 | gettext_noop ("timeout for DHT PUT and GET requests (default: 1 min)"), | 1230 | gettext_noop ("timeout for DHT PUT and GET requests (default: 1 min)"), |