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 */
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to