Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Apr 2010 21:01:01 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r206146 - head/bin/sh
Message-ID:  <201004032101.o33L111r098764@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jilles
Date: Sat Apr  3 21:01:01 2010
New Revision: 206146
URL: http://svn.freebsd.org/changeset/base/206146

Log:
  sh: Remove special handling for ' and " in arithmetic.
  They will be treated like normal characters, resulting in a runtime
  arithmetic expression error.
  
  Exp-run done by: erwin (with some other sh(1) changes)

Modified:
  head/bin/sh/mksyntax.c
  head/bin/sh/parser.c

Modified: head/bin/sh/mksyntax.c
==============================================================================
--- head/bin/sh/mksyntax.c	Sat Apr  3 20:55:56 2010	(r206145)
+++ head/bin/sh/mksyntax.c	Sat Apr  3 21:01:01 2010	(r206146)
@@ -232,8 +232,6 @@ main(int argc __unused, char **argv __un
 	add("\n", "CNL");
 	add("\\", "CBACK");
 	add("`", "CBQUOTE");
-	add("'", "CSQUOTE");
-	add("\"", "CDQUOTE");
 	add("$", "CVAR");
 	add("}", "CENDVAR");
 	add("(", "CLP");

Modified: head/bin/sh/parser.c
==============================================================================
--- head/bin/sh/parser.c	Sat Apr  3 20:55:56 2010	(r206145)
+++ head/bin/sh/parser.c	Sat Apr  3 21:01:01 2010	(r206146)
@@ -1223,10 +1223,7 @@ readtoken1(int firstc, char const *initi
 				if (eofmark != NULL && newvarnest == 0)
 					USTPUTC(c, out);
 				else {
-					if (state[level].category == TSTATE_ARITH)
-						state[level].syntax = ARISYNTAX;
-					else
-						state[level].syntax = BASESYNTAX;
+					state[level].syntax = BASESYNTAX;
 					quotef++;
 				}
 				break;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004032101.o33L111r098764>