m4-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU M4 source repository branch, branch-1.6, updated. v1.5.89a-13-


From: Eric Blake
Subject: [SCM] GNU M4 source repository branch, branch-1.6, updated. v1.5.89a-13-g2b570fc
Date: Thu, 17 Apr 2008 13:09:33 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU M4 source repository".

http://git.sv.gnu.org/gitweb/?p=m4.git;a=commitdiff;h=2b570fc0192b1a07ba77bed07d582a3dd788ab7f

The branch, branch-1.6 has been updated
       via  2b570fc0192b1a07ba77bed07d582a3dd788ab7f (commit)
       via  2f26b686720395695edf10b6c81eee5bd79700e9 (commit)
      from  14840bcf0e8fd964aaec8459441d8b5d5b791624 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2b570fc0192b1a07ba77bed07d582a3dd788ab7f
Author: Eric Blake <address@hidden>
Date:   Thu Apr 17 06:50:34 2008 -0600

    Fix buildbot failure.
    
    * doc/m4.texinfo (Diversions): Consume all of m4's output, in case
    SIGPIPE is ignored.
    * THANKS: Update.
    Detected by Bob Proulx's buildbot.
    
    Signed-off-by: Eric Blake <address@hidden>

commit 2f26b686720395695edf10b6c81eee5bd79700e9
Author: Eric Blake <address@hidden>
Date:   Thu Apr 17 06:46:35 2008 -0600

    Avoid gcc shadowing warnings.
    
    * src/builtin.c (m4_ifelse): Avoid the name index.
    (m4_format): s/format/expand_format, so local variables can be
    named format.
    * src/format.c (format): Rename...
    (expand_format): ...to this, and avoid the name index.
    * src/input.c (push_file): Avoid the name close.
    * src/m4.h (expand_format): Adjust prototype.
    * src/macro.c (arg_token, arg_type, arg_text, arg_empty, arg_len)
    (arg_func, arg_print, make_argv_ref_token, make_argv_ref)
    (push_arg, push_arg_quote): Avoid the name index.
    * src/output.c (threshold_diversion_CB): Avoid the name div.
    
    Signed-off-by: Eric Blake <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog      |   21 ++++++++
 THANKS         |    1 +
 doc/m4.texinfo |    2 +-
 src/builtin.c  |   14 +++---
 src/format.c   |   22 ++++----
 src/input.c    |   12 ++--
 src/m4.h       |    2 +-
 src/macro.c    |  141 ++++++++++++++++++++++++++++----------------------------
 src/output.c   |    4 +-
 9 files changed, 120 insertions(+), 99 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a98deb3..58abd2d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2008-04-17  Eric Blake  <address@hidden>
+
+       Fix buildbot failure.
+       * doc/m4.texinfo (Diversions): Consume all of m4's output, in case
+       SIGPIPE is ignored.
+       * THANKS: Update.
+       Detected by Bob Proulx's buildbot.
+
+       Avoid gcc shadowing warnings.
+       * src/builtin.c (m4_ifelse): Avoid the name index.
+       (m4_format): s/format/expand_format, so local variables can be
+       named format.
+       * src/format.c (format): Rename...
+       (expand_format): ...to this, and avoid the name index.
+       * src/input.c (push_file): Avoid the name close.
+       * src/m4.h (expand_format): Adjust prototype.
+       * src/macro.c (arg_token, arg_type, arg_text, arg_empty, arg_len)
+       (arg_func, arg_print, make_argv_ref_token, make_argv_ref)
+       (push_arg, push_arg_quote): Avoid the name index.
+       * src/output.c (threshold_diversion_CB): Avoid the name div.
+
 2008-04-15  Eric Blake  <address@hidden>
 
        Another 'make installcheck' fix.
diff --git a/THANKS b/THANKS
index ab08e6d..8d0aae1 100644
--- a/THANKS
+++ b/THANKS
@@ -21,6 +21,7 @@ Bengt Mertensson      address@hidden
 Bernhard Daeubler      address@hidden
 Bjorn R. Bjornsson     address@hidden
 Bob Badour             address@hidden
+Bob Proulx             address@hidden
 Brendan Kehoe          address@hidden
 Bruno Haible           address@hidden
 Cesar Strauss          address@hidden
diff --git a/doc/m4.texinfo b/doc/m4.texinfo
index 4572e79..cefadfe 100644
--- a/doc/m4.texinfo
+++ b/doc/m4.texinfo
@@ -4960,7 +4960,7 @@ ifdef(`__unix__', ,
 ')m4exit(`77')')dnl
 changequote(`[', `]')dnl
 syscmd([echo 'divert(1)hi
-format(%1000000d, 1)' | ]__program__[ | sed 1q])dnl
+format(%1000000d, 1)' | ]__program__[ | sed -n 1p])dnl
 @result{}hi
 sysval
 @result{}0
diff --git a/src/builtin.c b/src/builtin.c
index 07d2ce0..2e963e3 100644
--- a/src/builtin.c
+++ b/src/builtin.c
@@ -767,7 +767,7 @@ static void
 m4_ifelse (struct obstack *obs, int argc, macro_arguments *argv)
 {
   const char *me = ARG (0);
-  int index;
+  int i;
 
   if (argc == 2 || bad_argc (me, argc, 3, -1))
     return;
@@ -775,14 +775,14 @@ m4_ifelse (struct obstack *obs, int argc, macro_arguments 
*argv)
     /* Diagnose excess arguments if 5, 8, 11, etc., actual arguments.  */
     bad_argc (me, argc, 0, argc - 2);
 
-  index = 1;
+  i = 1;
   argc--;
 
   while (true)
     {
-      if (arg_equal (argv, index, index + 1))
+      if (arg_equal (argv, i, i + 1))
        {
-         push_arg (obs, argv, index + 2);
+         push_arg (obs, argv, i + 2);
          return;
        }
       switch (argc)
@@ -792,12 +792,12 @@ m4_ifelse (struct obstack *obs, int argc, macro_arguments 
*argv)
 
        case 4:
        case 5:
-         push_arg (obs, argv, index + 3);
+         push_arg (obs, argv, i + 3);
          return;
 
        default:
          argc -= 3;
-         index += 3;
+         i += 3;
        }
     }
 }
@@ -1980,7 +1980,7 @@ m4_format (struct obstack *obs, int argc, macro_arguments 
*argv)
 {
   if (bad_argc (ARG (0), argc, 1, -1))
     return;
-  format (obs, argc, argv);
+  expand_format (obs, argc, argv);
 }
 
 /*-------------------------------------------------------------------------.
diff --git a/src/format.c b/src/format.c
index 6808ad5..717a070 100644
--- a/src/format.c
+++ b/src/format.c
@@ -122,7 +122,7 @@ arg_double (const char *me, const char *str)
 `------------------------------------------------------------------*/
 
 void
-format (struct obstack *obs, int argc, macro_arguments *argv)
+expand_format (struct obstack *obs, int argc, macro_arguments *argv)
 {
   const char *me = ARG (0);            /* Macro name.  */
   const char *f;                       /* Format control string.  */
@@ -130,7 +130,7 @@ format (struct obstack *obs, int argc, macro_arguments 
*argv)
   char fstart[] = "%'+- 0#*.*hhd";     /* Current format spec.  */
   char *p;                             /* Position within fstart.  */
   unsigned char c;                     /* A simple character.  */
-  int index = 0;                       /* Index within argc used so far.  */
+  int i = 0;                           /* Index within argc used so far.  */
   bool valid_format = true;            /* True if entire format string ok.  */
 
   /* Flags.  */
@@ -161,7 +161,7 @@ format (struct obstack *obs, int argc, macro_arguments 
*argv)
   char *str;                   /* Malloc'd buffer of formatted text.  */
   enum {CHAR, INT, LONG, DOUBLE, STR} datatype;
 
-  f = fmt = ARG_STR (index, argc, argv);
+  f = fmt = ARG_STR (i, argc, argv);
   memset (ok, 0, sizeof ok);
   while (true)
     {
@@ -170,7 +170,7 @@ format (struct obstack *obs, int argc, macro_arguments 
*argv)
          if (c == '\0')
            {
              if (valid_format)
-               bad_argc (me, argc, index, index);
+               bad_argc (me, argc, i, i);
              return;
            }
          obstack_1grow (obs, c);
@@ -250,7 +250,7 @@ format (struct obstack *obs, int argc, macro_arguments 
*argv)
       *p++ = '*';
       if (*fmt == '*')
        {
-         width = ARG_INT (index, argc, argv);
+         width = ARG_INT (i, argc, argv);
          fmt++;
        }
       else
@@ -270,7 +270,7 @@ format (struct obstack *obs, int argc, macro_arguments 
*argv)
          ok['c'] = 0;
          if (*(++fmt) == '*')
            {
-             prec = ARG_INT (index, argc, argv);
+             prec = ARG_INT (i, argc, argv);
              ++fmt;
            }
          else
@@ -359,27 +359,27 @@ format (struct obstack *obs, int argc, macro_arguments 
*argv)
        {
        case CHAR:
          str = asnprintf (base, &len, fstart, width,
-                          ARG_INT (index, argc, argv));
+                          ARG_INT (i, argc, argv));
          break;
 
        case INT:
          str = asnprintf (base, &len, fstart, width, prec,
-                          ARG_INT (index, argc, argv));
+                          ARG_INT (i, argc, argv));
          break;
 
        case LONG:
          str = asnprintf (base, &len, fstart, width, prec,
-                          ARG_LONG (index, argc, argv));
+                          ARG_LONG (i, argc, argv));
          break;
 
        case DOUBLE:
          str = asnprintf (base, &len, fstart, width, prec,
-                          ARG_DOUBLE (index, argc, argv));
+                          ARG_DOUBLE (i, argc, argv));
          break;
 
        case STR:
          str = asnprintf (base, &len, fstart, width, prec,
-                          ARG_STR (index, argc, argv));
+                          ARG_STR (i, argc, argv));
          break;
 
        default:
diff --git a/src/input.c b/src/input.c
index 3a913b7..e7c819c 100644
--- a/src/input.c
+++ b/src/input.c
@@ -232,14 +232,14 @@ make_text_link (struct obstack *obs, token_chain **start, 
token_chain **end)
 /*-------------------------------------------------------------------.
 | push_file () pushes an input file on the input stack, saving the   |
 | current file name and line number.  If next is non-NULL, this push |
-| invalidates a call to push_string_init (), whose storage is        |
-| consequently released.  If CLOSE, then close FP after EOF is       |
-| detected.  TITLE is used as the location for text parsed from the  |
-| file (not necessarily the file name).                              |
+| invalidates a call to push_string_init (), whose storage is       |
+| consequently released.  If CLOSE_WHEN_DONE, then close FP after    |
+| EOF is detected.  TITLE is used as the location for text parsed    |
+| from the file (not necessarily the file name).                    |
 `-------------------------------------------------------------------*/
 
 void
-push_file (FILE *fp, const char *title, bool close)
+push_file (FILE *fp, const char *title, bool close_when_done)
 {
   input_block *i;
 
@@ -260,7 +260,7 @@ push_file (FILE *fp, const char *title, bool close)
 
   i->u.u_f.fp = fp;
   i->u.u_f.end = false;
-  i->u.u_f.close = close;
+  i->u.u_f.close = close_when_done;
   i->u.u_f.advance = start_of_input_line;
   output_current_line = -1;
 
diff --git a/src/m4.h b/src/m4.h
index 3e1fdbb..db531a3 100644
--- a/src/m4.h
+++ b/src/m4.h
@@ -588,7 +588,7 @@ bool evaluate (const char *, const char *, int32_t *);
 
 /* File: format.c  --- printf like formatting.  */
 
-void format (struct obstack *, int, macro_arguments *);
+void expand_format (struct obstack *, int, macro_arguments *);
 
 /* File: freeze.c --- frozen state files.  */
 
diff --git a/src/macro.c b/src/macro.c
index c435644..d871fc2 100644
--- a/src/macro.c
+++ b/src/macro.c
@@ -814,30 +814,30 @@ arg_adjust_refcount (macro_arguments *argv, bool increase)
 }
 
 
-/* Given ARGV, return the token_data that contains argument INDEX;
-   INDEX must be > 0, < argv->argc.  If LEVEL is non-NULL, *LEVEL is
-   set to the obstack level that contains the token (which is not
-   necessarily the level of ARGV).  If FLATTEN, avoid returning a
-   builtin function.  */
+/* Given ARGV, return the token_data that contains argument ARG; ARG
+   must be > 0, < argv->argc.  If LEVEL is non-NULL, *LEVEL is set to
+   the obstack level that contains the token (which is not necessarily
+   the level of ARGV).  If FLATTEN, avoid returning a builtin
+   function.  */
 static token_data *
-arg_token (macro_arguments *argv, unsigned int index, int *level, bool flatten)
+arg_token (macro_arguments *argv, unsigned int arg, int *level, bool flatten)
 {
   unsigned int i;
-  token_data *token;
+  token_data *token = NULL;
 
-  assert (index && index < argv->argc);
+  assert (arg && arg < argv->argc);
   if (level)
     *level = argv->level;
   flatten |= argv->flatten;
   if (!argv->wrapper)
     {
-      token = argv->array[index - 1];
+      token = argv->array[arg - 1];
       if (flatten && TOKEN_DATA_TYPE (token) == TOKEN_FUNC)
        token = &empty_token;
       return token;
     }
 
-  /* Must cycle through all tokens, until we find index, since a ref
+  /* Must cycle through all tokens, until we find arg, since a ref
      may occupy multiple indices.  */
   for (i = 0; i < argv->arraylen; i++)
     {
@@ -846,18 +846,18 @@ arg_token (macro_arguments *argv, unsigned int index, int 
*level, bool flatten)
        {
          token_chain *chain = token->u.u_c.chain;
          assert (!chain->next && chain->type == CHAIN_ARGV);
-         if (index <= (chain->u.u_a.argv->argc - chain->u.u_a.index
-                       - chain->u.u_a.skip_last))
+         if (arg <= (chain->u.u_a.argv->argc - chain->u.u_a.index
+                     - chain->u.u_a.skip_last))
            {
              token = arg_token (chain->u.u_a.argv,
-                                chain->u.u_a.index - 1 + index, level,
+                                chain->u.u_a.index - 1 + arg, level,
                                 flatten || chain->u.u_a.flatten);
              break;
            }
-         index -= (chain->u.u_a.argv->argc - chain->u.u_a.index
-                   - chain->u.u_a.skip_last);
+         arg -= (chain->u.u_a.argv->argc - chain->u.u_a.index
+                 - chain->u.u_a.skip_last);
        }
-      else if (--index == 0)
+      else if (--arg == 0)
        break;
     }
   return token;
@@ -893,17 +893,17 @@ arg_argc (macro_arguments *argv)
   return argv->argc;
 }
 
-/* Given ARGV, return the type of argument INDEX.  Index 0 is always
-   text, and indices beyond argc are likewise treated as text.  */
+/* Given ARGV, return the type of argument ARG.  Arg 0 is always text,
+   and indices beyond argc are likewise treated as text.  */
 token_data_type
-arg_type (macro_arguments *argv, unsigned int index)
+arg_type (macro_arguments *argv, unsigned int arg)
 {
   token_data_type type;
   token_data *token;
 
-  if (argv->flatten || !argv->has_func || index == 0 || index >= argv->argc)
+  if (argv->flatten || !argv->has_func || arg == 0 || arg >= argv->argc)
     return TOKEN_TEXT;
-  token = arg_token (argv, index, NULL, false);
+  token = arg_token (argv, arg, NULL, false);
   type = TOKEN_DATA_TYPE (token);
   if (type == TOKEN_COMP && !token->u.u_c.has_func)
     type = TOKEN_TEXT;
@@ -912,22 +912,22 @@ arg_type (macro_arguments *argv, unsigned int index)
   return type;
 }
 
-/* Given ARGV, return the text at argument INDEX.  Abort if the
-   argument is not text.  Index 0 is always text, and indices beyond
-   argc return the empty string.  The result is always NUL-terminated,
-   even if it includes embedded NUL characters.  */
+/* Given ARGV, return the text at argument ARG.  Abort if the argument
+   is not text.  Arg 0 is always text, and indices beyond argc return
+   the empty string.  The result is always NUL-terminated, even if it
+   includes embedded NUL characters.  */
 const char *
-arg_text (macro_arguments *argv, unsigned int index)
+arg_text (macro_arguments *argv, unsigned int arg)
 {
   token_data *token;
   token_chain *chain;
   struct obstack *obs; /* Scratch space; cleaned at end of macro_expand.  */
 
-  if (index == 0)
+  if (arg == 0)
     return argv->argv0;
-  if (index >= argv->argc)
+  if (arg >= argv->argc)
     return "";
-  token = arg_token (argv, index, NULL, false);
+  token = arg_token (argv, arg, NULL, false);
   switch (TOKEN_DATA_TYPE (token))
     {
     case TOKEN_TEXT:
@@ -1115,33 +1115,33 @@ arg_equal (macro_arguments *argv, unsigned int indexa, 
unsigned int indexb)
   return ca == cb;
 }
 
-/* Given ARGV, return true if argument INDEX is the empty string.
-   This gives the same result as comparing arg_len against 0, but is
-   often faster.  */
+/* Given ARGV, return true if argument ARG is the empty string.  This
+   gives the same result as comparing arg_len against 0, but is often
+   faster.  */
 bool
-arg_empty (macro_arguments *argv, unsigned int index)
+arg_empty (macro_arguments *argv, unsigned int arg)
 {
-  if (index == 0)
+  if (arg == 0)
     return argv->argv0_len == 0;
-  if (index >= argv->argc)
+  if (arg >= argv->argc)
     return true;
-  return arg_token (argv, index, NULL, false) == &empty_token;
+  return arg_token (argv, arg, NULL, false) == &empty_token;
 }
 
-/* Given ARGV, return the length of argument INDEX.  Abort if the
+/* Given ARGV, return the length of argument ARG.  Abort if the
    argument is not text.  Indices beyond argc return 0.  */
 size_t
-arg_len (macro_arguments *argv, unsigned int index)
+arg_len (macro_arguments *argv, unsigned int arg)
 {
   token_data *token;
   token_chain *chain;
   size_t len;
 
-  if (index == 0)
+  if (arg == 0)
     return argv->argv0_len;
-  if (index >= argv->argc)
+  if (arg >= argv->argc)
     return 0;
-  token = arg_token (argv, index, NULL, false);
+  token = arg_token (argv, arg, NULL, false);
   switch (TOKEN_DATA_TYPE (token))
     {
     case TOKEN_TEXT:
@@ -1200,14 +1200,14 @@ arg_len (macro_arguments *argv, unsigned int index)
   abort ();
 }
 
-/* Given ARGV, return the builtin function referenced by argument
-   INDEX.  Abort if it is not a builtin in isolation.  */
+/* Given ARGV, return the builtin function referenced by argument ARG.
+   Abort if it is not a builtin in isolation.  */
 builtin_func *
-arg_func (macro_arguments *argv, unsigned int index)
+arg_func (macro_arguments *argv, unsigned int arg)
 {
   token_data *token;
 
-  token = arg_token (argv, index, NULL, false);
+  token = arg_token (argv, arg, NULL, false);
   assert (TOKEN_DATA_TYPE (token) == TOKEN_FUNC);
   return TOKEN_DATA_FUNC (token);
 }
@@ -1223,7 +1223,7 @@ arg_scratch (void)
 }
 
 /* Dump a representation of ARGV to the obstack OBS, starting with
-   argument INDEX.  If QUOTES is non-NULL, each argument is displayed
+   argument ARG.  If QUOTES is non-NULL, each argument is displayed
    with those quotes.  If FLATTEN, builtins are converted to empty
    quotes; if CHAINP, *CHAINP is updated with macro tokens; otherwise,
    builtins are represented by their name.  Separate arguments with
@@ -1236,7 +1236,7 @@ arg_scratch (void)
    arguments may be discarded.  MAX_LEN and CHAINP may not both be
    specified.  */
 bool
-arg_print (struct obstack *obs, macro_arguments *argv, unsigned int index,
+arg_print (struct obstack *obs, macro_arguments *argv, unsigned int arg,
           const string_pair *quotes, bool flatten, token_chain **chainp,
           const char *sep, size_t *max_len, bool quote_each)
 {
@@ -1254,7 +1254,7 @@ arg_print (struct obstack *obs, macro_arguments *argv, 
unsigned int index,
   if (!sep)
     sep = ",";
   sep_len = strlen (sep);
-  for (i = index; i < argv->argc; i++)
+  for (i = arg; i < argv->argc; i++)
     {
       if (quote_each && max_len)
        len = *max_len;
@@ -1331,18 +1331,18 @@ arg_print (struct obstack *obs, macro_arguments *argv, 
unsigned int index,
 }
 
 /* Populate the new TOKEN as a wrapper to ARGV, starting with argument
-   INDEX.  Allocate any data on OBS, owned by a given expansion LEVEL.
+   ARG.  Allocate any data on OBS, owned by a given expansion LEVEL.
    FLATTEN determines whether to allow builtins, and QUOTES determines
    whether all arguments are quoted.  Return TOKEN when successful,
    NULL when wrapping ARGV is trivially empty.  */
 static token_data *
 make_argv_ref_token (token_data *token, struct obstack *obs, int level,
-                    macro_arguments *argv, unsigned int index, bool flatten,
+                    macro_arguments *argv, unsigned int arg, bool flatten,
                     const string_pair *quotes)
 {
   token_chain *chain;
 
-  if (index >= argv->argc)
+  if (arg >= argv->argc)
     return NULL;
   TOKEN_DATA_TYPE (token) = TOKEN_COMP;
   token->u.u_c.chain = token->u.u_c.end = NULL;
@@ -1359,13 +1359,13 @@ make_argv_ref_token (token_data *token, struct obstack 
*obs, int level,
               && argv->array[i]->u.u_c.wrapper)
              || level >= 0)
            break;
-         if (index == 1)
+         if (arg == 1)
            {
              push_arg_quote (obs, argv, i + 1, quotes);
              obstack_1grow (obs, ',');
            }
          else
-           index--;
+           arg--;
        }
       assert (i < argv->arraylen);
       if (i + 1 == argv->arraylen)
@@ -1376,11 +1376,11 @@ make_argv_ref_token (token_data *token, struct obstack 
*obs, int level,
          assert (!chain->next && chain->type == CHAIN_ARGV
                  && !chain->u.u_a.skip_last);
          argv = chain->u.u_a.argv;
-         index += chain->u.u_a.index - 1;
+         arg += chain->u.u_a.index - 1;
        }
       else
        {
-         index += i;
+         arg += i;
          break;
        }
     }
@@ -1398,7 +1398,7 @@ make_argv_ref_token (token_data *token, struct obstack 
*obs, int level,
   chain->type = CHAIN_ARGV;
   chain->quote_age = argv->quote_age;
   chain->u.u_a.argv = argv;
-  chain->u.u_a.index = index;
+  chain->u.u_a.index = arg;
   chain->u.u_a.flatten = flatten;
   chain->u.u_a.has_func = argv->has_func;
   chain->u.u_a.comma = false;
@@ -1421,12 +1421,12 @@ make_argv_ref (macro_arguments *argv, const char 
*argv0, size_t argv0_len,
   macro_arguments *new_argv;
   token_data *token;
   token_data *new_token;
-  unsigned int index = skip ? 2 : 1;
+  unsigned int i = skip ? 2 : 1;
   struct obstack *obs = arg_scratch ();
 
   new_token = (token_data *) obstack_alloc (obs, sizeof *token);
-  token = make_argv_ref_token (new_token, obs, expansion_level - 1, argv,
-                              index, flatten, NULL);
+  token = make_argv_ref_token (new_token, obs, expansion_level - 1, argv, i,
+                              flatten, NULL);
   if (!token)
     {
       obstack_free (obs, new_token);
@@ -1449,7 +1449,7 @@ make_argv_ref (macro_arguments *argv, const char *argv0, 
size_t argv0_len,
       new_argv->flatten = flatten;
       new_argv->has_func = argv->has_func;
     }
-  new_argv->argc = argv->argc - (index - 1);
+  new_argv->argc = argv->argc - (i - 1);
   new_argv->inuse = false;
   new_argv->argv0 = argv0;
   new_argv->argv0_len = argv0_len;
@@ -1458,33 +1458,32 @@ make_argv_ref (macro_arguments *argv, const char 
*argv0, size_t argv0_len,
   return new_argv;
 }
 
-/* Push argument INDEX from ARGV onto the expansion stack OBS for
+/* Push argument ARG from ARGV onto the expansion stack OBS for
    rescanning.  */
 void
-push_arg (struct obstack *obs, macro_arguments *argv, unsigned int index)
+push_arg (struct obstack *obs, macro_arguments *argv, unsigned int arg)
 {
-  if (index == 0)
+  if (arg == 0)
     {
       /* Always push copy of arg 0, since its lifetime is not
         guaranteed beyond expand_macro.  */
       obstack_grow (obs, argv->argv0, argv->argv0_len);
       return;
     }
-  if (index >= argv->argc)
+  if (arg >= argv->argc)
     return;
-  push_arg_quote (obs, argv, index, NULL);
+  push_arg_quote (obs, argv, arg, NULL);
 }
 
-/* Push argument INDEX from ARGV onto the expansion stack OBS for
-   rescanning.  INDEX must be > 0, < argc.  QUOTES determines any
-   quote delimiters that were in effect when the reference was
-   created.  */
+/* Push argument ARG from ARGV onto the expansion stack OBS for
+   rescanning.  ARG must be > 0, < argc.  QUOTES determines any quote
+   delimiters that were in effect when the reference was created.  */
 void
-push_arg_quote (struct obstack *obs, macro_arguments *argv, unsigned int index,
+push_arg_quote (struct obstack *obs, macro_arguments *argv, unsigned int arg,
                const string_pair *quotes)
 {
   int level;
-  token_data *token = arg_token (argv, index, &level, false);
+  token_data *token = arg_token (argv, arg, &level, false);
 
   if (quotes)
     obstack_grow (obs, quotes->str1, quotes->len1);
diff --git a/src/output.c b/src/output.c
index 24b6fa8..d7f8570 100644
--- a/src/output.c
+++ b/src/output.c
@@ -121,10 +121,10 @@ cmp_diversion_CB (const void *elt1, const void *elt2)
 static bool
 threshold_diversion_CB (const void *elt, const void *threshold)
 {
-  const m4_diversion *div = (const m4_diversion *) elt;
+  const m4_diversion *diversion = (const m4_diversion *) elt;
   /* No need to worry about overflow, since we don't create diversions
      with negative divnum.  */
-  return div->divnum >= *(const int *) threshold;
+  return diversion->divnum >= *(const int *) threshold;
 }
 
 void


hooks/post-receive
--
GNU M4 source repository




reply via email to

[Prev in Thread] Current Thread [Next in Thread]