Commit f74c4d96 f74c4d960cc8c68d59187bf24d87f3ff3c09dbc9 by Sergey Poznyakoff

(expand_escape): Use argcv_unescape_char() instead of backslash().

1 parent 12c9b1de
...@@ -79,22 +79,6 @@ act_getline (FILE *fp, char **sptr, size_t *size) ...@@ -79,22 +79,6 @@ act_getline (FILE *fp, char **sptr, size_t *size)
79 return used; 79 return used;
80 } 80 }
81 81
82 /* Convert second character of a backslash sequence to its ASCII
83 value: */
84 static int
85 backslash(int c)
86 {
87 static char transtab[] = "a\ab\bf\fn\nr\rt\t";
88 char *p;
89
90 for (p = transtab; *p; p += 2)
91 {
92 if (*p == c)
93 return p[1];
94 }
95 return c;
96 }
97
98 static int 82 static int
99 expand_escape (char **pp, message_t msg, struct obstack *stk) 83 expand_escape (char **pp, message_t msg, struct obstack *stk)
100 { 84 {
...@@ -213,7 +197,7 @@ expand_line (const char *str, message_t msg) ...@@ -213,7 +197,7 @@ expand_line (const char *str, message_t msg)
213 p++; 197 p++;
214 if (*p) 198 if (*p)
215 { 199 {
216 c = backslash (*p); 200 c = argcv_unescape_char (*p);
217 obstack_1grow (&stk, c); 201 obstack_1grow (&stk, c);
218 } 202 }
219 break; 203 break;
......