From 2078d2c0cae2e17efd18e3772fbfcfcae409078d Mon Sep 17 00:00:00 2001 From: dsl Date: Sat, 19 Mar 2005 15:02:58 +0000 Subject: [PATCH] Don't merge ifs regions with different quoting requirements --- bin/sh/expand.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/sh/expand.c b/bin/sh/expand.c index 47277fd7faa3..1019dfcef900 100644 --- a/bin/sh/expand.c +++ b/bin/sh/expand.c @@ -1,4 +1,4 @@ -/* $NetBSD: expand.c,v 1.68 2005/02/14 20:46:26 dsl Exp $ */ +/* $NetBSD: expand.c,v 1.69 2005/03/19 15:02:58 dsl Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)expand.c 8.5 (Berkeley) 5/15/95"; #else -__RCSID("$NetBSD: expand.c,v 1.68 2005/02/14 20:46:26 dsl Exp $"); +__RCSID("$NetBSD: expand.c,v 1.69 2005/03/19 15:02:58 dsl Exp $"); #endif #endif /* not lint */ @@ -922,7 +922,8 @@ recordregion(int start, int end, int inquotes) if (ifslastp == NULL) { ifsp = &ifsfirst; } else { - if (ifslastp->endoff == start) { + if (ifslastp->endoff == start + && ifslastp->inquotes == inquotes) { /* extend previous area */ ifslastp->endoff = end; return; @@ -1009,7 +1010,7 @@ ifsbreakup(char *string, struct arglist *arglist) p++; if (!inquotes) { - /* Ignore trailing IFS writespace */ + /* Ignore trailing IFS whitespace */ for (; p < string + ifsp->endoff; p++) { q = p; if (*p == CTLESC)