+2019-06-22 Akim Demaille <akim@lrde.epita.fr>
+
+ argmatch: put all the docs member last.
+ Reported by Bruno Haible.
+ * lib/argmatch.h (argmatch_##Name##_group_type): Put the args
+ member before the docs done.
+ * doc/argmatch.texi, tests/test-argmatch.c: Adjust.
+
2019-06-21 Akim Demaille <akim@lrde.epita.fr>
argmatch: add support to generate the usage message.
argmatch_##Name##_size = sizeof (argmatch_##Name##_type) \
}; \
\
- /* Documentation of this group. */ \
+ /* Argument mapping of this group. */ \
typedef struct \
{ \
/* Argument (e.g., "simple"). */ \
const char const *arg; \
- /* Documentation (e.g., N_("always make simple backups")). */ \
- const char const *doc; \
- } argmatch_##Name##_doc; \
+ /* Value (e.g., simple_backups). */ \
+ const argmatch_##Name##_type val; \
+ } argmatch_##Name##_arg; \
\
- /* Argument mapping of this group. */ \
+ /* Documentation of this group. */ \
typedef struct \
{ \
/* Argument (e.g., "simple"). */ \
const char const *arg; \
- /* Value (e.g., simple_backups). */ \
- const argmatch_##Name##_type val; \
- } argmatch_##Name##_arg; \
+ /* Documentation (e.g., N_("always make simple backups")). */ \
+ const char const *doc; \
+ } argmatch_##Name##_doc; \
\
/* All the features of an argmatch group. */ \
typedef struct \
{ \
- const argmatch_##Name##_doc* docs; \
const argmatch_##Name##_arg* args; \
+ const argmatch_##Name##_doc* docs; \
\
/* Printed before the usage message. */ \
const char *doc_pre; \