summaryrefslogtreecommitdiffstats
path: root/bin/sh/parser.c
diff options
context:
space:
mode:
authorpaul <paul@FreeBSD.org>1995-01-11 07:07:00 +0000
committerpaul <paul@FreeBSD.org>1995-01-11 07:07:00 +0000
commit5c96f27c9cb5effd9a137f2a57aeb7b6c603bdc4 (patch)
tree787a7884c64b7922536eab4b846cb3bf3e801603 /bin/sh/parser.c
parentfd4a9ed5dfb75b12e708f6a70212ea7b679ccbe6 (diff)
downloadFreeBSD-src-5c96f27c9cb5effd9a137f2a57aeb7b6c603bdc4.zip
FreeBSD-src-5c96f27c9cb5effd9a137f2a57aeb7b6c603bdc4.tar.gz
What I think is a more correct fix for the handling of backslashes
inside backquotes. Reversed my previous fix.
Diffstat (limited to 'bin/sh/parser.c')
-rw-r--r--bin/sh/parser.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/sh/parser.c b/bin/sh/parser.c
index d890595..cc9e0c4 100644
--- a/bin/sh/parser.c
+++ b/bin/sh/parser.c
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: parser.c,v 1.3 1994/09/24 02:58:08 davidg Exp $
+ * $Id: parser.c,v 1.4 1995/01/09 20:00:54 paul Exp $
*/
#ifndef lint
@@ -835,7 +835,7 @@ readtoken1(firstc, syntax, eofmark, striptabs)
CHECKSTRSPACE(3, out); /* permit 3 calls to USTPUTC */
if (parsebackquote && c == '\\') {
c = pgetc(); /* XXX - compat with old /bin/sh */
- if (c != '\\' && c != '`' && c != '$') {
+ if (/*c != '\\' && */c != '`' && c != '$') {
pungetc();
c = '\\';
}
@@ -1181,7 +1181,7 @@ parsebackq: {
while ((c = pgetc ()) != '`') {
if (c == '\\') {
c = pgetc ();
- if (c != '`' && c != '$'
+ if ( c != '\\' && c != '`' && c != '$'
&& (!dblquote || c != '"'))
STPUTC('\\', out);
}
OpenPOWER on IntegriCloud