aboutsummaryrefslogtreecommitdiff
path: root/tr.c
diff options
context:
space:
mode:
Diffstat (limited to 'tr.c')
-rw-r--r--tr.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/tr.c b/tr.c
index 3e7ba583c..48cdd47bd 100644
--- a/tr.c
+++ b/tr.c
@@ -111,22 +111,14 @@ static void map(register unsigned char *string1, register unsigned char *string2
111 } 111 }
112} 112}
113 113
114static void expand(register char *arg, register unsigned char *buffer) 114static void expand(char *arg, register unsigned char *buffer)
115{ 115{
116 int i, ac; 116 int i, ac;
117 117
118 while (*arg) { 118 while (*arg) {
119 if (*arg == '\\') { 119 if (*arg == '\\') {
120 arg++; 120 arg++;
121 i = ac = 0; 121 *buffer++ = process_escape_sequence(&arg);
122 if (*arg >= '0' && *arg <= '7') {
123 do {
124 ac = (ac << 3) + *arg++ - '0';
125 i++;
126 } while (i < 4 && *arg >= '0' && *arg <= '7');
127 *buffer++ = ac;
128 } else if (*arg != '\0')
129 *buffer++ = *arg++;
130 } else if (*arg == '[') { 122 } else if (*arg == '[') {
131 arg++; 123 arg++;
132 i = *arg++; 124 i = *arg++;