Lines Matching refs:src
133 static bool unescape_space(char **src, char **dst) in unescape_space() argument
135 char *p = *dst, *q = *src; in unescape_space()
157 *src += 1; in unescape_space()
161 static bool unescape_octal(char **src, char **dst) in unescape_octal() argument
163 char *p = *dst, *q = *src; in unescape_octal()
170 while (num < 32 && isodigit(*q) && (q - *src < 3)) { in unescape_octal()
176 *src = q; in unescape_octal()
180 static bool unescape_hex(char **src, char **dst) in unescape_hex() argument
182 char *p = *dst, *q = *src; in unescape_hex()
200 *src = q; in unescape_hex()
204 static bool unescape_special(char **src, char **dst) in unescape_special() argument
206 char *p = *dst, *q = *src; in unescape_special()
225 *src += 1; in unescape_special()
268 int string_unescape(char *src, char *dst, size_t size, unsigned int flags) in string_unescape() argument
272 while (*src && --size) { in string_unescape()
273 if (src[0] == '\\' && src[1] != '\0' && size > 1) { in string_unescape()
274 src++; in string_unescape()
278 unescape_space(&src, &out)) in string_unescape()
282 unescape_octal(&src, &out)) in string_unescape()
286 unescape_hex(&src, &out)) in string_unescape()
290 unescape_special(&src, &out)) in string_unescape()
295 *out++ = *src++; in string_unescape()
497 int string_escape_mem(const char *src, size_t isz, char *dst, size_t osz, in string_escape_mem() argument
505 unsigned char c = *src++; in string_escape_mem()
546 int string_escape_mem_ascii(const char *src, size_t isz, char *dst, in string_escape_mem_ascii() argument
553 unsigned char c = *src++; in string_escape_mem_ascii()
569 char *kstrdup_quotable(const char *src, gfp_t gfp) in kstrdup_quotable() argument
576 if (!src) in kstrdup_quotable()
578 slen = strlen(src); in kstrdup_quotable()
580 dlen = string_escape_mem(src, slen, NULL, 0, flags, esc); in kstrdup_quotable()
585 WARN_ON(string_escape_mem(src, slen, dst, dlen, flags, esc) != dlen); in kstrdup_quotable()