diff options
-rw-r--r-- | src/basic/escape.c | 8 | ||||
-rw-r--r-- | src/basic/escape.h | 8 |
2 files changed, 6 insertions, 10 deletions
diff --git a/src/basic/escape.c b/src/basic/escape.c index 33a6f204f5..a0b0a77109 100644 --- a/src/basic/escape.c +++ b/src/basic/escape.c @@ -360,14 +360,6 @@ int cunescape_length_with_prefix(const char *s, size_t length, const char *prefi return t - r; } -int cunescape_length(const char *s, size_t length, UnescapeFlags flags, char **ret) { - return cunescape_length_with_prefix(s, length, NULL, flags, ret); -} - -int cunescape(const char *s, UnescapeFlags flags, char **ret) { - return cunescape_length(s, strlen(s), flags, ret); -} - char *xescape_full(const char *s, const char *bad, size_t console_width, bool eight_bits) { char *ans, *t, *prev, *prev2; const char *f; diff --git a/src/basic/escape.h b/src/basic/escape.h index b26054c5df..dfd10f9315 100644 --- a/src/basic/escape.h +++ b/src/basic/escape.h @@ -41,9 +41,13 @@ char *cescape(const char *s); char *cescape_length(const char *s, size_t n); int cescape_char(char c, char *buf); -int cunescape(const char *s, UnescapeFlags flags, char **ret); -int cunescape_length(const char *s, size_t length, UnescapeFlags flags, char **ret); int cunescape_length_with_prefix(const char *s, size_t length, const char *prefix, UnescapeFlags flags, char **ret); +static inline int cunescape_length(const char *s, size_t length, UnescapeFlags flags, char **ret) { + return cunescape_length_with_prefix(s, length, NULL, flags, ret); +} +static inline int cunescape(const char *s, UnescapeFlags flags, char **ret) { + return cunescape_length(s, strlen(s), flags, ret); +} int cunescape_one(const char *p, size_t length, char32_t *ret, bool *eight_bit); char *xescape_full(const char *s, const char *bad, size_t console_width, bool eight_bits); |