[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: argv_ref patch 24: allow NUL in macro names
From: |
Eric Blake |
Subject: |
Re: argv_ref patch 24: allow NUL in macro names |
Date: |
Tue, 3 Jun 2008 20:23:49 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Eric Blake <ebb9 <at> byu.net> writes:
> hardware.] On the master branch, I split it into three patches -
> reworking m4_error to take a call_info * instead of a char * (so that the
> length can be passed in alongside the name), changing the symbol table to
> support NUL, and changing all macro name output (warnings, dumpdef, trace)
> to handle or quote difficult characters while avoiding extra munging of
> the global location variables.
And I'm not sure how I let the master branch testsuite failure in - I thought I
properly ran 'make check' before committing. A (desirable) side-effect of
using quotearg in the locale style is that if the locale-specific close-quote
element also occurs in the quoted string, the quoted occurrence is escaped with
\. Thus, error messages that refer to the literal string "`defn'" now look
like ``defn\'' rather than ``defn''. I'm committing this to rectify the
situation, and expanding the test to show that the extra \ quoting only occurs
when the string would otherwise be ambiguous.
>From e8a049d48816579cd04d339724779f414077fec3 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Tue, 3 Jun 2008 14:16:14 -0600
Subject: [PATCH] Fix fallout from previous patch.
* doc/m4.texinfo (Builtin): Adjust expected output.
Signed-off-by: Eric Blake <address@hidden>
---
ChangeLog | 5 +++++
doc/m4.texinfo | 17 +++++++++++++++--
2 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f06aee7..5b2f0cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-06-03 Eric Blake <address@hidden>
+
+ Fix fallout from previous patch.
+ * doc/m4.texinfo (Builtin): Adjust expected output.
+
2008-06-02 Eric Blake <address@hidden>
Stage 24c: Improve display of macro names with embedded NUL.
diff --git a/doc/m4.texinfo b/doc/m4.texinfo
index 3540710..1c7e4ef 100644
--- a/doc/m4.texinfo
+++ b/doc/m4.texinfo
@@ -2792,8 +2792,12 @@ builtin(`builtin')
builtin(`builtin',)
@error{}m4:stdin:4: Warning: builtin: undefined builtin `'
@result{}
+builtin(`builtin', ``'
+')
address@hidden:stdin:5: Warning: builtin: undefined builtin ``\'\n'
address@hidden
indir(`index')
address@hidden:stdin:5: Warning: index: too few arguments: 0 < 2
address@hidden:stdin:7: Warning: index: too few arguments: 0 < 2
@result{}0
@end example
@@ -2850,10 +2854,19 @@ traceoff
changequote(`[', `]')
@result{}
defn1([foo])
address@hidden:stdin:11: Warning: builtin: undefined builtin ``defn''
address@hidden:stdin:11: Warning: builtin: undefined builtin ``defn\''
@result{}
defn2([foo])
@result{}bar
+define([defn1], [builtin([defn], $@@)])
address@hidden
+defn1([foo])
address@hidden
+changequote
address@hidden
+defn1(`foo')
address@hidden:stdin:16: Warning: builtin: undefined builtin `[defn]'
address@hidden
@end example
@node M4symbols
--
1.5.5.1