summaryrefslogtreecommitdiffstats
path: root/src/options.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-08-14 18:49:27 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-08-14 18:49:27 +0200
commit0c6f6e92422b9c86784f45305f20cc652307546a (patch)
tree2090d96ac14a43cf23297868a14f29cfb64bdc3b /src/options.c
parent61cc8fdedcb41fd226c2d866e3a8c551591cd7e1 (diff)
downloadfastd-0c6f6e92422b9c86784f45305f20cc652307546a.tar
fastd-0c6f6e92422b9c86784f45305f20cc652307546a.zip
Reorder command line options in usage message and add separating empty lines
Diffstat (limited to 'src/options.c')
-rw-r--r--src/options.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/options.c b/src/options.c
index 92ac46e..d5c823b 100644
--- a/src/options.c
+++ b/src/options.c
@@ -68,10 +68,12 @@ static void usage(fastd_context_t *ctx, fastd_config_t *conf) {
puts("fastd (Fast and Secure Tunnelling Daemon) " FASTD_VERSION " usage:\n");
#define OR ", "
+#define SEPARATOR puts("")
#define OPTION(func, options, message) print_usage(" " options, message)
#define OPTION_ARG(func, options, arg, message) print_usage(" " options " " arg, message)
#include "options.def.h"
#undef OR
+#undef SEPARATOR
#undef OPTION
#undef OPTION_ARG
@@ -335,6 +337,7 @@ void fastd_config_handle_options(fastd_context_t *ctx, fastd_config_t *conf, int
while (i < argc) {
#define OR ,
+#define SEPARATOR do {} while (false)
#define OPTION(func, options, message) \
({ \
if(config_match(argv[i], options, NULL)) { \
@@ -355,6 +358,7 @@ void fastd_config_handle_options(fastd_context_t *ctx, fastd_config_t *conf, int
})
#include "options.def.h"
#undef OR
+#undef SEPARATOR
#undef OPTION
#undef OPTION_ARG