summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2011-05-06 20:45:50 +0000
committerjilles <jilles@FreeBSD.org>2011-05-06 20:45:50 +0000
commite4f71c5640c5a07d0ab421da1a14958d8dcbf8f5 (patch)
treece754ac7c5dc596c147d70bb1236b3e7173a9f08 /bin
parente444b9c41fac8226f6d530e46586c36d4693e039 (diff)
downloadFreeBSD-src-e4f71c5640c5a07d0ab421da1a14958d8dcbf8f5.zip
FreeBSD-src-e4f71c5640c5a07d0ab421da1a14958d8dcbf8f5.tar.gz
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.
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/parser.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/bin/sh/parser.h b/bin/sh/parser.h
index 64ec97f..dfbda86 100644
--- a/bin/sh/parser.h
+++ b/bin/sh/parser.h
@@ -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 */
OpenPOWER on IntegriCloud