summaryrefslogtreecommitdiff
path: root/src/basic/util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-10-22 20:12:31 +0200
committerLennart Poettering <lennart@poettering.net>2015-10-24 23:03:49 +0200
commit84ac7bea360cd369df26910e9685a7eed2327088 (patch)
tree7b941067ff1af844404ad7c433473b1d5090c1ec /src/basic/util.h
parent0f03c2a4c093e3d44f4072144827e943c05c8904 (diff)
util: split out extract_first_word() and related calls into extract-word.[ch]
This is quite a lot of code these days, hence move it to its own source file.
Diffstat (limited to 'src/basic/util.h')
-rw-r--r--src/basic/util.h13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/basic/util.h b/src/basic/util.h
index a3ebb987e4..132e6f862b 100644
--- a/src/basic/util.h
+++ b/src/basic/util.h
@@ -270,6 +270,7 @@ typedef enum 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);
@@ -879,18 +880,6 @@ int is_symlink(const char *path);
int is_dir(const char *path, bool follow);
int is_device_node(const char *path);
-typedef enum ExtractFlags {
- EXTRACT_RELAX = 1,
- EXTRACT_CUNESCAPE = 2,
- EXTRACT_CUNESCAPE_RELAX = 4,
- EXTRACT_QUOTES = 8,
- EXTRACT_DONT_COALESCE_SEPARATORS = 16,
-} ExtractFlags;
-
-int extract_first_word(const char **p, char **ret, const char *separators, ExtractFlags flags);
-int extract_first_word_and_warn(const char **p, char **ret, const char *separators, ExtractFlags flags, const char *unit, const char *filename, unsigned line, const char *rvalue);
-int extract_many_words(const char **p, const char *separators, ExtractFlags flags, ...) _sentinel_;
-
int free_and_strdup(char **p, const char *s);
#define INOTIFY_EVENT_MAX (sizeof(struct inotify_event) + NAME_MAX + 1)