Re: doc merge

Eric Blake <[email protected]>
Newsgroups gmane.comp.gnu.m4.patches
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Eric Blake on 3/1/2007 8:24 PM:
> 
> Another merge.  This makes the index consistent between both branches, and
> picks up the sysval section in HEAD.

Another round; this time picking up m4exit.  I also discovered that 'm4
- --synclines --batch' has been broken for ages on head (it took me a while
to figure out why my synclines example from the manual worked when I typed
it in my tty but failed when I ran the testsuite).

2007-03-03  Eric Blake  <[email protected]>

	* m4/input.c (m4__next_token): Fix synclines when in batch mode.
	* doc/m4.texinfo (M4exit): Synch another section.
	(Syncoutput): Make similar to other sections.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             [email protected]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF6btT84KuGfSFAYARAr+GAKDYqCRZNaghqFBZ35MjezgLbjCB3gCgn5D3
m9T/LMAmUWilAL+GB9VILV0=
=Jq0c
-----END PGP SIGNATURE-----

_______________________________________________
M4-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/m4-patches
m4.patch145 (text/plain, 22.4 KB)
Index: doc/m4.texinfo
===================================================================
RCS file: /sources/m4/m4/doc/m4.texinfo,v
retrieving revision 1.38
diff -u -p -r1.38 m4.texinfo
--- doc/m4.texinfo	30 Aug 2006 13:35:20 -0000	1.38
+++ doc/m4.texinfo	31 Aug 2006 03:20:24 -0000
@@ -1202,12 +1202,12 @@ defined macros, there is no check of the
 @example
 $ @kbd{m4}
 index(`abc')
-@error{}m4:input.m4:1: Warning: index: too few arguments: 1 < 2
+@error{}m4:stdin:1: Warning: index: too few arguments: 1 < 2
 @result{}0
 index(`abc',)
 @result{}0
 index(`abc', `b', `ignored')
-@error{}m4:input.m4:3: Warning: index: extra arguments ignored: 3 > 2
+@error{}m4:stdin:3: Warning: index: extra arguments ignored: 3 > 2
 @result{}1
 @end example
 
@@ -1256,7 +1256,7 @@ It is an error if the end of file occurs
 @example
 define(
 ^D
-@error{}m4:input.m4:1: ERROR: end of file in argument list
+@error{}m4:stdin:1: ERROR: end of file in argument list
 @end example
 
 @node Quoting Arguments
@@ -1784,7 +1784,7 @@ of expected contexts can sometimes trigg
 
 @example
 define(defn(`divnum'), `cannot redefine a builtin token')
-@error{}m4:input.m4:1: Warning: define: invalid macro name ignored
+@error{}m4:stdin:1: Warning: define: invalid macro name ignored
 @result{}
 divnum
 @result{}0
@@ -1797,14 +1797,14 @@ concatenate multiple macros into one.
 
 @example
 defn(`foo')
-@error{}m4:input.m4:1: Warning: defn: undefined macro: foo
+@error{}m4:stdin:1: Warning: defn: undefined macro `foo'
 @result{}
 define(`foo', `a')
 @result{}
 define(`bar', defn(`foo', `divnum'))
-@result
+@result{}
 define(`blah', defn(`divnum', `foo'))
-@result
+@result{}
 bar
 @result{}a0
 blah
@@ -1856,7 +1856,6 @@ pushdef(`foo', `Expansion four.')
 popdef(`foo')
 @result{}
 foo
-@result{}Expansion one.
 @result{}Expansion three.
 popdef(`foo', `foo')
 @result{}
@@ -1977,16 +1976,19 @@ m4_renamesyms(`^m4_m4(\w*)$', `m4_\1', `
 @cindex indirect call of macros
 @cindex call of macros, indirect
 @cindex macros, indirect call of
-@cindex GNU extensions
+@cindex @acronym{GNU} extensions
+Any macro can be called indirectly with @code{indir}:
+
 @deffn {Builtin (gnu)} indir (@var{name}, @dots{})
-Any macro can be called indirectly with @code{indir}, which results in a
-call to the macro @var{name}, which is passed the rest of the arguments.
+Results in a call to the macro @var{name}, which is passed the
+rest of the arguments.  If @var{name} is not defined, an error message
+is printed, and the expansion is void.
 
-The macro @code{defn} is recognized only with parameters.
+The macro @code{indir} is recognized only with parameters.
 @end deffn
 
-This can be used to call macros with computed or with ``illegal'' names
-(@code{define} allows such names to be defined):
+This can be used to call macros with computed or ``invalid''
+names (@code{define} allows such names to be defined):
 
 @example
 define(`$$internal$macro', `Internal macro (name `$0')')
@@ -1997,7 +1999,7 @@ indir(`$$internal$macro')
 @result{}Internal macro (name $$internal$macro)
 @end example
 
-The point here is that larger macro packages can have private macros
+The point is, here, that larger macro packages can have private macros
 defined, that will not be called by accident.  They can @emph{only} be
 called through the builtin @code{indir}.
 
@@ -2007,45 +2009,115 @@ called through the builtin @code{indir}.
 @cindex indirect call of builtins
 @cindex call of builtins, indirect
 @cindex builtins, indirect call of
-@cindex GNU extensions
+@cindex @acronym{GNU} extensions
+Builtin macros can be called indirectly with @code{builtin}:
+
 @deffn {Builtin (gnu)} builtin (@var{name}, @dots{})
-Builtin macros can be called indirectly with @code{builtin}, which
-results in a call to the builtin @var{name}, which is passed the rest of
-the arguments.  This can be used, if @var{name} has been given another
-definition that has covered the original.
+Results in a call to the builtin @var{name}, which is passed the
+rest of the arguments.  If @var{name} does not name a builtin, a warning
+message is printed, and the expansion is void.
 
 The macro @code{builtin} is recognized only with parameters.
 @end deffn
 
+This can be used even if @var{name} has been given another definition
+that has covered the original, or been undefined so that no macro
+maps to the builtin.
+
+@example
+pushdef(`define', `hidden')
+@result{}
+undefine(`undefine')
+@result{}
+define(`foo', `bar')
+@result{}hidden
+foo
+@result{}foo
+builtin(`define', `foo', `BAR')
+@result{}
+foo
+@result{}BAR
+undefine(`foo')
+@result{}undefine(foo)
+foo
+@result{}BAR
+builtin(`undefine', `foo')
+@result{}
+foo
+@result{}foo
+@end example
+
+The @var{name} argument only matches the original name of the builtin,
+even when the @option{--prefix-builtins} option (or @option{-P},
+@pxref{Invoking m4}) is in effect.  This is different from @code{indir},
+which only tracks current macro names.
+
+@comment options: -P
+@example
+$ @kbd{m4 -P}
+m4_builtin(`divnum')
+@result{}0
+m4_builtin(`m4_divnum')
+@error{}m4:stdin:2: Warning: m4_builtin: undefined builtin `m4_divnum'
+@result{}
+m4_indir(`divnum')
+@error{}m4:stdin:3: Warning: m4_indir: undefined macro `divnum'
+@result{}
+m4_indir(`m4_divnum')
+@result{}0
+@end example
+
+Note that @code{indir} and @code{builtin} can be used to invoke builtins
+without arguments, even when they normally require parameters to be
+recognized; but it will provoke a warning, and the expansion will behave
+as though empty strings had been passed as the required arguments.
+
+@example
+builtin
+@result{}builtin
+builtin()
+@error{}m4:stdin:2: Warning: builtin: undefined builtin `'
+@result{}
+builtin(`builtin')
+@error{}m4:stdin:3: Warning: builtin: too few arguments: 0 < 1
+@result{}
+builtin(`builtin',)
+@error{}m4:stdin:4: Warning: builtin: undefined builtin `'
+@result{}
+indir(`index')
+@error{}m4:stdin:5: Warning: index: too few arguments: 0 < 2
+@result{}0
+@end example
+
 @node Symbols
 @section Getting the defined macro names
 
 @cindex macro names
-@cindex GNU extensions
-The name of the currently defined macro can be accessed by
+@cindex @acronym{GNU} extensions
+The name of the currently defined macros can be accessed by
 @code{symbols}:
 
-@deffn {Builtin (gnu)} symbols
-@deffnx {Builtin (gnu)} symbols (@dots{})
+@deffn {Builtin (gnu)} symbols (@dots{})
 Without arguments, @samp{symbols} expands to a sorted list of quoted
-strings.  This contrasts with @code{dumpdef} which output can not be
-accessed by @code{m4} programs.
+strings, separated by commas.  This contrasts with @code{dumpdef}
+(@pxref{Dumpdef}), whose output cannot be accessed by @code{m4}
+programs.
 
 When given arguments, @code{symbols} returns the sorted subset of the
-symbols currently defined:
+symbols currently defined.
+@end deffn
 
 @example
 symbols(`ifndef', `ifdef', `define', `undef')
 @result{}define,ifdef
 @end example
-@end deffn
 
 @node Conditionals
 @chapter Conditionals, loops, and recursion
 
 Macros, expanding to plain text, perhaps with arguments, are not quite
 enough.  We would like to have macros expand to different things, based
-on decisions taken at run-time.  E.g., we need some kind of conditionals.
+on decisions taken at run-time.  For that, we need some kind of conditionals.
 Also, we would like to have some kind of loop construct, so we could do
 something a number of times, or while some condition is true.
 
@@ -2059,10 +2131,11 @@ something a number of times, or while so
 @section Testing macro definitions
 
 @cindex conditionals
-@deffn {Builtin (m4)} ifdef (@var{name}, @var{string-1}, @w{opt @var{string-2})}
 There are two different builtin conditionals in @code{m4}.  The first is
-@code{ifdef}, which test whether a macro is defined or not.  If
-@var{name} is defined as a macro, @code{ifdef} expands to
+@code{ifdef}:
+
+@deffn {Builtin (m4)} ifdef (@var{name}, @var{string-1}, @ovar{string-2})
+If @var{name} is defined as a macro, @code{ifdef} expands to
 @var{string-1}, otherwise to @var{string-2}.  If @var{string-2} is
 omitted, it is taken to be the empty string (according to the normal
 rules).
@@ -2077,6 +2150,9 @@ define(`foo', `')
 @result{}
 ifdef(`foo', ``foo' is defined', ``foo' is not defined')
 @result{}foo is defined
+ifdef(`no_such_macro', `yes', `no', `extra argument')
+@error{}m4:stdin:4: Warning: ifdef: extra arguments ignored: 4 > 3
+@result{}no
 @end example
 
 @node Ifelse
@@ -2100,7 +2176,7 @@ warning about missing arguments is never
 ifelse(`some comments')
 @result{}
 ifelse(`foo', `bar')
-@error{}m4:input.m4:2: Warning: ifelse: too few arguments: 2 < 3
+@error{}m4:stdin:2: Warning: ifelse: too few arguments: 2 < 3
 @result{}
 @end example
 
@@ -2249,6 +2325,13 @@ enough for general use. They lack even b
 like start value less than final value, and the first argument not being
 a name.  Correcting these errors are left as an exercise to the reader.
 
+@comment FIXME - it would be nice to introduce foreach here, and even
+@comment give an example like this for finding defined macros that meet
+@comment a certain pattern (see examples/foreach.m4):
+@comment define(`quote', ``$@'')
+@comment foreach(`macro', (quote(symbols)),
+@comment         `regexp(macro, `.*_.*', ``\&',')')
+
 @node Debugging
 @chapter How to debug macros and input
 
@@ -2823,7 +2906,7 @@ With @code{changesyntax} we can modify t
 define(`test.1', `TEST ONE')
 @result{}
 __file__
-@result{}input.m4
+@result{}stdin
 changesyntax(`O_', `W.')
 @result{}
 __file__
@@ -3092,7 +3175,7 @@ only when given arguments.
 @example
 include(`n')
 @result{}
-@error{}m4:input.m4:1: include: cannot open `n': No such file or directory
+@error{}m4:stdin:1: include: cannot open `n': No such file or directory
 sinclude(`n')
 @result{}
 @end example
@@ -4076,7 +4159,7 @@ square(square(5)+1)
 define(`foo', `666')
 @result{}
 eval(`foo / 6')
-@error{}m4:input.m4:7: eval: bad expression: foo / 6
+@error{}m4:stdin:7: eval: bad expression: foo / 6
 @result{}
 eval(foo/6)
 @result{}111
@@ -4317,7 +4400,7 @@ the current input line number in that fi
 @example
 errprint(`m4:'__file__:__line__: `Input error
 ')
-@error{}m4:input.m4:1: Input error
+@error{}m4:stdin:1: Input error
 @result{}
 @end example
 @end deffn
@@ -4341,7 +4424,7 @@ define(`fatal_error',
 ')m4exit(1)')
 @result{}
 fatal_error(`This is a BAD one, buster')
-@error{}m4:input.m4:4: fatal error: This is a BAD one, buster
+@error{}m4:stdin:4: fatal error: This is a BAD one, buster
 @end example
 
 After this macro call, @code{m4} will exit with exit code 1.  This macro
Index: m4/macro.c
===================================================================
RCS file: /sources/m4/m4/m4/macro.c,v
retrieving revision 1.50
diff -u -p -r1.50 macro.c
--- m4/macro.c	25 Aug 2006 22:06:42 -0000	1.50
+++ m4/macro.c	31 Aug 2006 03:20:24 -0000
@@ -332,8 +332,8 @@ m4_macro_call (m4 *context, m4_symbol *s
     }
   else if (m4_is_symbol_placeholder (symbol))
     {
-      m4_warn (context, 0, _("\
-Warning: %s: builtin `%s' requested by frozen file not found"),
+      m4_warn (context, 0,
+	       _("%s: builtin `%s' requested by frozen file not found"),
 	       M4ARG (0), m4_get_symbol_placeholder (symbol));
     }
   else
Index: m4/utility.c
===================================================================
RCS file: /sources/m4/m4/m4/utility.c,v
retrieving revision 1.46
diff -u -p -r1.46 utility.c
--- m4/utility.c	28 Aug 2006 12:48:54 -0000	1.46
+++ m4/utility.c	31 Aug 2006 03:20:24 -0000
@@ -24,6 +24,7 @@
 
 #include "m4private.h"
 #include "verror.h"
+#include "xvasprintf.h"
 
 
 static const char * skip_space (m4 *, const char *);
@@ -44,14 +45,14 @@ m4_bad_argc (m4 *context, int argc, m4_s
 {
   if (argc - 1 < min)
     {
-      m4_warn (context, 0, _("Warning: %s: too few arguments: %d < %d"),
+      m4_warn (context, 0, _("%s: too few arguments: %d < %d"),
 	       M4ARG (0), argc - 1, min);
       return ! side_effect;
     }
 
   if (argc - 1 > max)
     {
-      m4_warn (context, 0, _("Warning: %s: extra arguments ignored: %d > %d"),
+      m4_warn (context, 0, _("%s: extra arguments ignored: %d > %d"),
 	       M4ARG (0), argc - 1, max);
     }
 
@@ -81,7 +82,7 @@ m4_numeric_arg (m4 *context, int argc, m
       || (*valuep = strtol (skip_space (context, M4ARG (arg)), &endp, 10),
 	  *skip_space (context, endp) != 0))
     {
-      m4_warn (context, 0, _("Warning: %s: argument %d non-numeric: %s"),
+      m4_warn (context, 0, _("%s: argument %d non-numeric: %s"),
 	       M4ARG (0), arg - 1, M4ARG (arg));
       return false;
     }
@@ -129,10 +130,10 @@ m4_error (m4 *context, int status, int e
 
 /* Issue a warning, if they are not being suppressed.  The message is
    printf-style, based on FORMAT and any other arguments, and the
-   program name and location (if we are currently parsing an input
-   file) are automatically prepended.  If ERRNUM is non-zero, include
-   strerror output in the message.  If warnings are fatal, call exit
-   immediately, otherwise exit status is unchanged.  */
+   program name, location (if we are currently parsing an input file),
+   and "Warning:" are automatically prepended.  If ERRNUM is non-zero,
+   include strerror output in the message.  If warnings are fatal,
+   call exit immediately, otherwise exit status is unchanged.  */
 void
 m4_warn (m4 *context, int errnum, const char *format, ...)
 {
@@ -141,11 +142,15 @@ m4_warn (m4 *context, int errnum, const 
       va_list args;
       int status = EXIT_SUCCESS;
       int line = m4_get_current_line (context);
+      char *full_format = xasprintf(_("Warning: %s"), format);
       va_start (args, format);
       if (m4_get_fatal_warnings_opt (context))
 	status = EXIT_FAILURE;
+      /* If the full_format failed (unlikely though that may be), at
+	 least fall back on the original format.  */
       verror_at_line (status, errnum,
 		      line ? m4_get_current_file (context) : NULL, line,
-		      format, args);
+		      full_format ? full_format : format, args);
+      free (full_format);
     }
 }
Index: modules/gnu.c
===================================================================
RCS file: /sources/m4/m4/modules/gnu.c,v
retrieving revision 1.52
diff -u -p -r1.52 gnu.c
--- modules/gnu.c	28 Aug 2006 12:48:54 -0000	1.52
+++ modules/gnu.c	31 Aug 2006 03:20:24 -0000
@@ -194,8 +194,7 @@ substitute (m4 *context, m4_obstack *obs
 	case '7': case '8': case '9':
 	  ch -= '0';
 	  if (buf->pat.re_nsub < ch)
-	    m4_warn (context, 0,
-		     _("Warning: %s: sub-expression %d not present"),
+	    m4_warn (context, 0, _("%s: sub-expression %d not present"),
 		     caller, ch);
 	  else if (buf->regs.end[ch] > 0)
 	    obstack_grow (obs, victim + buf->regs.start[ch],
@@ -203,8 +202,7 @@ substitute (m4 *context, m4_obstack *obs
 	  break;
 
 	case '\0':
-	  m4_warn (context, 0,
-		   _("Warning: %s: trailing \\ ignored in replacement"),
+	  m4_warn (context, 0, _("%s: trailing \\ ignored in replacement"),
 		   caller);
 	  return;
 
@@ -325,7 +323,7 @@ M4BUILTIN_HANDLER (builtin)
   bp = m4_builtin_find_by_name (NULL, name);
 
   if (bp == NULL)
-    m4_error (context, 0, 0, _("%s: undefined builtin `%s'"), M4ARG (0), name);
+    m4_warn (context, 0, _("%s: undefined builtin `%s'"), M4ARG (0), name);
   else if (!m4_bad_argc (context, argc - 1, argv + 1,
 			 bp->min_args, bp->max_args,
 			 (bp->flags & M4_BUILTIN_SIDE_EFFECT) != 0))
@@ -507,7 +505,7 @@ M4BUILTIN_HANDLER (indir)
   m4_symbol *  symbol = m4_symbol_lookup (M4SYMTAB, name);
 
   if (symbol == NULL)
-    m4_error (context, 0, 0, _("%s: undefined macro `%s'"), M4ARG (0), name);
+    m4_warn (context, 0, _("%s: undefined macro `%s'"), M4ARG (0), name);
   else
     m4_macro_call (context, symbol, obs, argc - 1, argv + 1);
 }
@@ -742,6 +740,5 @@ M4BUILTIN_HANDLER (syncoutput)
 	       && (arg[1] == 'n' || arg[1] == 'N')))
     m4_set_sync_output_opt (context, true);
   else
-    m4_warn (context, 0, _("Warning: %s: unknown directive `%s'"),
-	     M4ARG (0), arg);
+    m4_warn (context, 0, _("%s: unknown directive `%s'"), M4ARG (0), arg);
 }
Index: modules/m4.c
===================================================================
RCS file: /sources/m4/m4/modules/m4.c,v
retrieving revision 1.67
diff -u -p -r1.67 m4.c
--- modules/m4.c	30 Aug 2006 04:25:42 -0000	1.67
+++ modules/m4.c	31 Aug 2006 03:20:24 -0000
@@ -180,8 +180,7 @@ M4BUILTIN_HANDLER (define)
       m4_symbol_define (M4SYMTAB, M4ARG (1), value);
     }
   else
-    m4_warn (context, 0, _("Warning: %s: invalid macro name ignored"),
-	     M4ARG (0));
+    m4_warn (context, 0, _("%s: invalid macro name ignored"), M4ARG (0));
 }
 
 M4BUILTIN_HANDLER (undefine)
@@ -192,8 +191,7 @@ M4BUILTIN_HANDLER (undefine)
       const char *name = M4ARG (i);
 
       if (!m4_symbol_lookup (M4SYMTAB, name))
-	m4_warn (context, 0, _("Warning: %s: undefined macro: %s"), M4ARG (0),
-		 name);
+	m4_warn (context, 0, _("%s: undefined macro `%s'"), M4ARG (0), name);
       else
 	m4_symbol_delete (M4SYMTAB, name);
     }
@@ -213,8 +211,7 @@ M4BUILTIN_HANDLER (pushdef)
       m4_symbol_pushdef (M4SYMTAB, M4ARG (1), value);
     }
   else
-    m4_warn (context, 0, _("Warning: %s: invalid macro name ignored"),
-	     M4ARG (0));
+    m4_warn (context, 0, _("%s: invalid macro name ignored"), M4ARG (0));
 }
 
 M4BUILTIN_HANDLER (popdef)
@@ -225,8 +222,7 @@ M4BUILTIN_HANDLER (popdef)
       const char *name = M4ARG (i);
 
       if (!m4_symbol_lookup (M4SYMTAB, name))
-	m4_warn (context, 0, _("Warning: %s: undefined macro: %s"), M4ARG (0),
-		 name);
+	m4_warn (context, 0, _("%s: undefined macro `%s'"), M4ARG (0), name);
       else
 	m4_symbol_popdef (M4SYMTAB, name);
     }
@@ -355,7 +351,7 @@ m4_dump_symbols (m4 *context, m4_dump_sy
 	      dump_symbol_CB (NULL, M4ARG (i), symbol, data);
 	    }
 	  else if (complain)
-	    m4_warn (context, 0, _("Warning: %s: undefined macro: %s"),
+	    m4_warn (context, 0, _("%s: undefined macro `%s'"),
 		     M4ARG (0), M4ARG (i));
 	}
     }
@@ -406,6 +402,7 @@ M4BUILTIN_HANDLER (dumpdef)
       else
 	{
 	  assert (!"invalid token in builtin_dumpdef");
+	  abort ();
 	}
     }
 }
@@ -423,18 +420,20 @@ M4BUILTIN_HANDLER (defn)
       m4_symbol *symbol = m4_symbol_lookup (M4SYMTAB, name);
 
       if (!symbol)
-	m4_warn (context, 0, _("Warning: %s: undefined macro: %s"), M4ARG (0),
-		 name);
+	m4_warn (context, 0, _("%s: undefined macro `%s'"), M4ARG (0), name);
       else if (m4_is_symbol_text (symbol))
 	m4_shipout_string (context, obs, m4_get_symbol_text (symbol), 0, true);
       else if (m4_is_symbol_func (symbol))
 	m4_push_builtin (m4_get_symbol_value (symbol));
       else if (m4_is_symbol_placeholder (symbol))
-	m4_warn (context, 0, _("\
-Warning: %s: builtin `%s' requested by frozen file not found"),
+	m4_warn (context, 0,
+		 _("%s: builtin `%s' requested by frozen file not found"),
 		 name, m4_get_symbol_placeholder (symbol));
       else
-	assert (!"Bad token data type in m4_defn");
+	{
+	  assert (!"Bad token data type in m4_defn");
+	  abort ();
+	}
     }
 }
 
@@ -757,8 +756,7 @@ M4BUILTIN_HANDLER (traceon)
 	if (symbol != NULL)
 	  set_trace_CB (NULL, NULL, symbol, (char *) obs);
 	else
-	  m4_warn (context, 0, _("Warning: %s: undefined macro: %s"),
-		   M4ARG (0), name);
+	  m4_warn (context, 0, _("%s: undefined macro `%s'"), M4ARG (0), name);
       }
 }
 
@@ -777,8 +775,7 @@ M4BUILTIN_HANDLER (traceoff)
 	if (symbol != NULL)
 	  set_trace_CB (NULL, NULL, symbol, NULL);
 	else
-	  m4_warn (context, 0, _("Warning: %s: undefined macro: %s"),
-		   M4ARG (0), name);
+	  m4_warn (context, 0, _("%s: undefined macro `%s'"), M4ARG (0), name);
       }
 }
 
Index: tests/builtins.at
===================================================================
RCS file: /sources/m4/m4/tests/builtins.at,v
retrieving revision 1.15
diff -u -p -r1.15 builtins.at
--- tests/builtins.at	30 Aug 2006 04:25:42 -0000	1.15
+++ tests/builtins.at	31 Aug 2006 03:20:24 -0000
@@ -42,15 +42,15 @@ AT_CHECK_M4([define.m4], 0,
 [[new value.
 hello, world.
 base value.
-]], [[m4:define.m4:1: Warning: undefine: undefined macro: macro
+]], [[m4:define.m4:1: Warning: undefine: undefined macro `macro'
 ]])
 
 AT_CHECK_M4([--traditional define.m4], 0,
 [[new value.
 macro.
 macro.
-]], [[m4:define.m4:1: Warning: undefine: undefined macro: macro
-m4:define.m4:9: Warning: popdef: undefined macro: macro
+]], [[m4:define.m4:1: Warning: undefine: undefined macro `macro'
+m4:define.m4:9: Warning: popdef: undefined macro `macro'
 ]])
 
 AT_CLEANUP
Index: tests/freeze.at
===================================================================
RCS file: /sources/m4/m4/tests/freeze.at,v
retrieving revision 1.7
diff -u -p -r1.7 freeze.at
--- tests/freeze.at	30 Aug 2006 04:25:42 -0000	1.7
+++ tests/freeze.at	31 Aug 2006 03:20:24 -0000
@@ -100,7 +100,7 @@ define 1
 my_define(bar, 4) 3
 bar
 ]],
-[[m4:input.m4:5: Warning: popdef: undefined macro: my_define
+[[m4:input.m4:5: Warning: popdef: undefined macro `my_define'
 ]])
 
 AT_CLEANUP
Index: tests/generate.awk
===================================================================
RCS file: /sources/m4/m4/tests/generate.awk,v
retrieving revision 1.17
diff -u -p -r1.17 generate.awk
--- tests/generate.awk	24 Aug 2006 00:25:04 -0000	1.17
+++ tests/generate.awk	31 Aug 2006 03:20:24 -0000
@@ -135,6 +135,7 @@ function normalize(contents,    i, lines
       gsub ("@tabchar{}", "\t", line);
       gsub ("@comment.*", "@\\&t@", line);
       gsub ("m4_", "m@\\&t@4_", line);
+      gsub ("stdin", "input.m4", line);
 
       # Some of the examples have improperly balanced square brackets.
       gsub ("[[]", "@<:@", line);
Index: tests/macros.at
===================================================================
RCS file: /sources/m4/m4/tests/macros.at,v
retrieving revision 1.7
diff -u -p -r1.7 macros.at
--- tests/macros.at	30 Aug 2006 04:25:42 -0000	1.7
+++ tests/macros.at	31 Aug 2006 03:20:24 -0000
@@ -137,9 +137,9 @@ hej:	`def 4.'
 hej:	`def 3.'
 hej:	`def 2.'
 hej:	`def 1.'
-m4:pushpop.m4:18: Warning: dumpdef: undefined macro: hej
-m4:pushpop.m4:20: Warning: dumpdef: undefined macro: mac2
-m4:pushpop.m4:21: Warning: popdef: undefined macro: mac2
+m4:pushpop.m4:18: Warning: dumpdef: undefined macro `hej'
+m4:pushpop.m4:20: Warning: dumpdef: undefined macro `mac2'
+m4:pushpop.m4:21: Warning: popdef: undefined macro `mac2'
 ]])
 
 AT_CLEANUP
Index: tests/modules.at
===================================================================
RCS file: /sources/m4/m4/tests/modules.at,v
retrieving revision 1.17
diff -u -p -r1.17 modules.at
--- tests/modules.at	30 Aug 2006 04:25:42 -0000	1.17
+++ tests/modules.at	31 Aug 2006 03:20:24 -0000
@@ -100,7 +100,7 @@ Dumpdef: .
 [[Test module loaded.
 test:	<test>
 Test module unloaded.
-m4:input.m4:6: Warning: dumpdef: undefined macro: test
+m4:input.m4:6: Warning: dumpdef: undefined macro `test'
 ]])
 
 AT_CLEANUP
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.