diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-10-23 18:52:53 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-10-24 23:04:42 +0200 |
commit | 4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3 (patch) | |
tree | deda3509752ff079dded29c145e4a8fae41812f1 /src/basic/util.h | |
parent | dea7b6b043f0cd9e34ee719b9b612c3a4776387e (diff) |
util: split out escaping code into escape.[ch]
This really deserves its own file, given how much code this is now.
Diffstat (limited to 'src/basic/util.h')
-rw-r--r-- | src/basic/util.h | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/basic/util.h b/src/basic/util.h index 132e6f862b..6674111145 100644 --- a/src/basic/util.h +++ b/src/basic/util.h @@ -53,12 +53,6 @@ #define COMMENTS "#;" #define GLOB_CHARS "*?[" -/* What characters are special in the shell? */ -/* must be escaped outside and inside double-quotes */ -#define SHELL_NEED_ESCAPE "\"\\`$" -/* can be escaped or double-quoted */ -#define SHELL_NEED_QUOTES SHELL_NEED_ESCAPE GLOB_CHARS "'()<>|&;" - #define FORMAT_BYTES_MAX 8 size_t page_size(void) _pure_; @@ -260,20 +254,6 @@ int unbase32hexchar(char c) _const_; char base64char(int x) _const_; int unbase64char(char c) _const_; -char *cescape(const char *s); -size_t cescape_char(char c, char *buf); - -typedef enum UnescapeFlags { - UNESCAPE_RELAX = 1, -} UnescapeFlags; - -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); -int cunescape_one(const char *p, size_t length, char *ret, uint32_t *ret_unicode); - -char *xescape(const char *s, const char *bad); - char *ascii_strlower(char *path); bool dirent_is_file(const struct dirent *de) _pure_; @@ -924,9 +904,6 @@ void cmsg_close_all(struct msghdr *mh); int rename_noreplace(int olddirfd, const char *oldpath, int newdirfd, const char *newpath); -char *shell_escape(const char *s, const char *bad); -char *shell_maybe_quote(const char *s); - int parse_mode(const char *s, mode_t *ret); int mount_move_root(const char *path); |