[PATCH] ash: remove defunct control character to save a few bytes
Ron Yorston
rmy at pobox.com
Wed Apr 25 10:35:54 UTC 2018
Commit 549deab5a (ash: move parse-time quote flag detection to
run-time) did away with the need to distinguish between backquotes
inside and outside quotes. This left a gap among the control
characters used in argument strings. Removing this gap saves a
few bytes.
function old new delta
.rodata 167346 167338 -8
cmdputs 399 388 -11
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-19) Total: -19 bytes
Signed-off-by: Ron Yorston <rmy at pobox.com>
---
shell/ash.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/shell/ash.c b/shell/ash.c
index 051cc671f..f945f7f74 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -705,9 +705,9 @@ out2str(const char *p)
#define CTLVAR ((unsigned char)'\202') /* variable defn */
#define CTLENDVAR ((unsigned char)'\203')
#define CTLBACKQ ((unsigned char)'\204')
-#define CTLARI ((unsigned char)'\206') /* arithmetic expression */
-#define CTLENDARI ((unsigned char)'\207')
-#define CTLQUOTEMARK ((unsigned char)'\210')
+#define CTLARI ((unsigned char)'\205') /* arithmetic expression */
+#define CTLENDARI ((unsigned char)'\206')
+#define CTLQUOTEMARK ((unsigned char)'\207')
#define CTL_LAST CTLQUOTEMARK
/* variable substitution byte (follows CTLVAR) */
@@ -3145,10 +3145,10 @@ static const uint8_t syntax_index_table[] ALIGN1 = {
/* 130 CTLVAR */ CCTL_CCTL_CCTL_CCTL,
/* 131 CTLENDVAR */ CCTL_CCTL_CCTL_CCTL,
/* 132 CTLBACKQ */ CCTL_CCTL_CCTL_CCTL,
- /* 133 CTLQUOTE */ CCTL_CCTL_CCTL_CCTL,
- /* 134 CTLARI */ CCTL_CCTL_CCTL_CCTL,
- /* 135 CTLENDARI */ CCTL_CCTL_CCTL_CCTL,
- /* 136 CTLQUOTEMARK */ CCTL_CCTL_CCTL_CCTL,
+ /* 133 CTLARI */ CCTL_CCTL_CCTL_CCTL,
+ /* 134 CTLENDARI */ CCTL_CCTL_CCTL_CCTL,
+ /* 135 CTLQUOTEMARK */ CCTL_CCTL_CCTL_CCTL,
+ /* 136 */ CWORD_CWORD_CWORD_CWORD,
/* 137 */ CWORD_CWORD_CWORD_CWORD,
/* 138 */ CWORD_CWORD_CWORD_CWORD,
/* 139 */ CWORD_CWORD_CWORD_CWORD,
--
2.14.3
More information about the busybox
mailing list