]> Savannah Git Hosting - gnulib.git/commitdiff
argmatch: put all the docs member last.
authorAkim Demaille <akim.demaille@gmail.com>
Sat, 22 Jun 2019 06:37:31 +0000 (08:37 +0200)
committerAkim Demaille <akim.demaille@gmail.com>
Sat, 22 Jun 2019 06:38:04 +0000 (08:38 +0200)
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.

ChangeLog
doc/argmatch.texi
lib/argmatch.h
tests/test-argmatch.c

index d0a6a22a13b3f1be2bb207574b9fc17eb4d0a9d3..cdc2b3d7ab2c36e20257b9abdd56278aae92b205 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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.
index 9222520702d673695ea2063bed4c4282e6987b71..94787fabf78caf9f5d6d88ea100e62dad44085ad 100644 (file)
@@ -92,8 +92,8 @@ Finally, define the argmatch group:
 @example
 const argmatch_backup_group_type argmatch_backup_group =
 @{
-  argmatch_backup_docs,
   argmatch_backup_args,
+  argmatch_backup_docs,
   N_("\
 The backup suffix is '~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX.\n\
 The version control method may be selected via the --backup option or through\n\
index 6f641aff4bcf12b78b0856fdb88e0af815d85402..427d7179f63c18c467b15d8f077ffdb1b9d00b1a 100644 (file)
@@ -122,29 +122,29 @@ char const *argmatch_to_argument (void const *value,
     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;                                                \
index 4c724f4cfe9370bba3f904cb2196b4b273bf9533..0d19e979563781338738d538a767fc2856efc039 100644 (file)
@@ -89,8 +89,8 @@ static const argmatch_backup_arg argmatch_backup_args[] =
 
 const argmatch_backup_group_type argmatch_backup_group =
 {
-  argmatch_backup_docs,
   argmatch_backup_args,
+  argmatch_backup_docs,
   N_("\
 The backup suffix is '~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX.\n\
 The version control method may be selected via the --backup option or through\n\