MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / parse__string

Function parse__string

extern/editline/src/parse.c:238–269  ·  view source on GitHub ↗

parse__string(): * Parse the escapes from in and put the raw string out */

Source from the content-addressed store, hash-verified

236 * Parse the escapes from in and put the raw string out
237 */
238protected Char *
239parse__string(Char *out, const Char *in)
240{
241 Char *rv = out;
242 int n;
243
244 for (;;)
245 switch (*in) {
246 case '\0':
247 *out = '\0';
248 return rv;
249
250 case '\\':
251 case '^':
252 if ((n = parse__escape(&in)) == -1)
253 return NULL;
254 *out++ = n;
255 break;
256
257 case 'M':
258 if (in[1] == '-' && in[2] != '\0') {
259 *out++ = '\033';
260 in += 2;
261 break;
262 }
263 /*FALLTHROUGH*/
264
265 default:
266 *out++ = *in++;
267 break;
268 }
269}
270
271
272/* parse_cmd():

Callers 1

map_bindFunction · 0.85

Calls 1

parse__escapeFunction · 0.85

Tested by

no test coverage detected