[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/3] Properly expand @configure_input@ in config.status.
From: |
Paul Eggert |
Subject: |
Re: [PATCH 1/3] Properly expand @configure_input@ in config.status. |
Date: |
Mon, 07 Jan 2008 13:50:02 -0800 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Paolo Bonzini <address@hidden> writes:
> patches against CVS sed are welcome. Filing an interpretation
> request would also be welcome.
OK, thanks, here is a proposed patch against CVS sed. It does not
attempt to come up with a general fix for the other examples; it
attempts to address just the s&foo&\&& issue.
2008-01-07 Paul Eggert <address@hidden>
* sed/compile.c (match_slash): Treat 's&foo&\&&' compatibly with
traditional 'sed'.
* testsuite/bsd.sh: Add test case for this.
* testsuite/bsd.good: Add test case output.
Index: sed/compile.c
===================================================================
RCS file: /cvsroot/sed/sed/sed/compile.c,v
retrieving revision 1.7
diff -p -u -b -w -r1.7 compile.c
--- sed/compile.c 30 May 2007 14:33:18 -0000 1.7
+++ sed/compile.c 7 Jan 2008 21:46:35 -0000
@@ -566,7 +566,7 @@ match_slash(slash, regex)
else if (ch == 'n' && regex)
ch = '\n';
#endif
- else if (ch != '\n' && ch != slash)
+ else if (ch != '\n' && (ch != slash || (!regex && ch == '&')))
add1_buffer(b, '\\');
}
else if (ch == OPEN_BRACKET && regex)
Index: testsuite/bsd.sh
===================================================================
RCS file: /cvsroot/sed/sed/testsuite/bsd.sh,v
retrieving revision 1.1.1.1
diff -p -u -b -w -r1.1.1.1 bsd.sh
--- testsuite/bsd.sh 7 Sep 2004 09:10:54 -0000 1.1.1.1
+++ testsuite/bsd.sh 7 Jan 2008 21:46:35 -0000
@@ -395,6 +395,7 @@ u2/g' lines1
mark '8.16'
echo 'eeefff' | $SED -e 'p' -e 's/e/X/p' -e ':x' \
-e 's//Y/p' -e '/f/bx'
+ mark '8.17' ; $SED -e 's&.&\&&g' lines1
}
test_error()
Index: testsuite/bsd.good
===================================================================
RCS file: /cvsroot/sed/sed/testsuite/bsd.good,v
retrieving revision 1.1.1.1
diff -p -u -b -w -r1.1.1.1 bsd.good
--- testsuite/bsd.good 7 Sep 2004 09:10:54 -0000 1.1.1.1
+++ testsuite/bsd.good 7 Jan 2008 21:46:35 -0000
@@ -1735,3 +1735,21 @@ XYeYff
XYeYYf
XYeYYY
XYeYYY
+
+=============
+Test 8.17:188
+=============
+&&&&
+&&&&
+&&&&
+&&&&
+&&&&
+&&&&
+&&&&
+&&&&
+&&&&
+&&&&&
+&&&&&
+&&&&&
+&&&&&
+&&&&&
- Re: [PATCH 1/3] Properly expand @configure_input@ in config.status., (continued)
- Re: [PATCH 1/3] Properly expand @configure_input@ in config.status., Paul Eggert, 2008/01/05
- Re: [PATCH 1/3] Properly expand @configure_input@ in config.status., Paolo Bonzini, 2008/01/05
- Re: [PATCH 1/3] Properly expand @configure_input@ in config.status., Paul Eggert, 2008/01/06
- Re: [PATCH 1/3] Properly expand @configure_input@ in config.status., Paolo Bonzini, 2008/01/06
- Re: [PATCH 1/3] Properly expand @configure_input@ in config.status., Paolo Bonzini, 2008/01/06
- Re: [PATCH 1/3] Properly expand @configure_input@ in config.status., Paolo Bonzini, 2008/01/06
- Re: [PATCH 1/3] Properly expand @configure_input@ in config.status., Ralf Wildenhues, 2008/01/06
- Re: [PATCH 1/3] Properly expand @configure_input@ in config.status., Paolo Bonzini, 2008/01/06
- Re: [PATCH 1/3] Properly expand @configure_input@ in config.status., Paul Eggert, 2008/01/07
- Re: [PATCH 1/3] Properly expand @configure_input@ in config.status., Paolo Bonzini, 2008/01/07
- Re: [PATCH 1/3] Properly expand @configure_input@ in config.status.,
Paul Eggert <=