DragonFly submit List (threaded) for 2004-02
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
patch to make(1) to fix quoting bug
As subject.
Obtained from: FreeBSD
PR: bin/61673
CVS: src/usr.bin/make/str.c 1.12.2.2
Testing: passes test given in PR; make buildworld in progress
-Chris
Index: usr.bin/make/str.c
===================================================================
RCS file: /home/dcvs/src/usr.bin/make/str.c,v
retrieving revision 1.2
diff -u -r1.2 str.c
--- usr.bin/make/str.c 17 Jun 2003 04:29:29 -0000 1.2
+++ usr.bin/make/str.c 23 Feb 2004 12:23:25 -0000
@@ -37,7 +37,7 @@
*
* @(#)str.c 5.8 (Berkeley) 6/1/90
* $FreeBSD: src/usr.bin/make/str.c,v 1.12.2.1 2002/06/17 04:30:48 jmallett Exp $
- * $DragonFly: src/usr.bin/make/str.c,v 1.2 2003/06/17 04:29:29 dillon Exp $
+ * $DragonFly: src/usr.bin/make/str.c,v 1.1 2003/06/16 07:03:41 dillon Exp $
*/
#include "make.h"
@@ -164,24 +164,17 @@
case '"':
case '\'':
if (inquote) {
- if (inquote == ch)
- inquote = '\0';
- else
+ if (ch != inquote)
break;
- } else {
- inquote = (char) ch;
+ inquote = '\0';
/* Don't miss "" or '' */
- if (start == NULL && p[1] == inquote) {
- start = t + 1;
- break;
- }
- }
- if (!expand) {
if (!start)
start = t;
- *t++ = ch;
- }
- continue;
+ } else
+ inquote = (char)ch;
+ if (expand)
+ continue;
+ break;
case ' ':
case '\t':
case '\n':
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]