Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 May 2011 20:45:50 +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: r221551 - head/bin/sh
Message-ID:  <201105062045.p46KjoUV065463@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jilles
Date: Fri May  6 20:45:50 2011
New Revision: 221551
URL: http://svn.freebsd.org/changeset/base/221551

Log:
  sh: Change the CTL* bytes to ones invalid in UTF-8.
  
  This ensures that mbrtowc(3) can be used directly once it has been verified
  that there is no CTL* byte. Dealing with a CTLESC byte within a multibyte
  character would be complicated.
  
  The new values do occur in iso-8859-* encodings. This decreases efficiency
  slightly but should not affect correctness.
  
  Caveat: Updating across this change and rebuilding without cleaning may
  yield a subtly broken sh binary. By default, make buildworld will clean and
  avoid problems.

Modified:
  head/bin/sh/parser.h

Modified: head/bin/sh/parser.h
==============================================================================
--- head/bin/sh/parser.h	Fri May  6 20:43:02 2011	(r221550)
+++ head/bin/sh/parser.h	Fri May  6 20:45:50 2011	(r221551)
@@ -34,16 +34,16 @@
  */
 
 /* control characters in argument strings */
-#define CTLESC '\201'
-#define CTLVAR '\202'
-#define CTLENDVAR '\203'
-#define CTLBACKQ '\204'
+#define CTLESC '\300'
+#define CTLVAR '\301'
+#define CTLENDVAR '\371'
+#define CTLBACKQ '\372'
 #define CTLQUOTE 01		/* ored with CTLBACKQ code if in quotes */
 /*	CTLBACKQ | CTLQUOTE == '\205' */
-#define	CTLARI	'\206'
-#define	CTLENDARI '\207'
-#define	CTLQUOTEMARK '\210'
-#define	CTLQUOTEEND '\211' /* only for ${v+-...} */
+#define	CTLARI	'\374'
+#define	CTLENDARI '\375'
+#define	CTLQUOTEMARK '\376'
+#define	CTLQUOTEEND '\377' /* only for ${v+-...} */
 
 /* variable substitution byte (follows CTLVAR) */
 #define VSTYPE		0x0f	/* type of variable substitution */



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