X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Futil.h;h=3b3a0564379d67ba80f5b858f5ce850fcfcd1828;hb=4e658ebc585b051672a59b505cc788c12506d364;hp=29e85bb7e14fb7a2dcb56d520b2173fedcd8764a;hpb=5b9fbd354eddd80051de3cd17510d6be60274931;p=elogind.git diff --git a/src/shared/util.h b/src/shared/util.h index 29e85bb7e..3b3a05643 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -183,6 +183,7 @@ static inline char *startswith_no_case(const char *s, const char *prefix) { } char *endswith(const char *s, const char *postfix) _pure_; +char *endswith_no_case(const char *s, const char *postfix) _pure_; char *first_word(const char *s, const char *word) _pure_; @@ -1017,8 +1018,13 @@ int take_password_lock(const char *root); int is_symlink(const char *path); int is_dir(const char *path, bool follow); -int unquote_first_word(const char **p, char **ret, bool relax); -int unquote_many_words(const char **p, ...) _sentinel_; +typedef enum UnquoteFlags{ + UNQUOTE_RELAX = 1, + UNQUOTE_CUNESCAPE = 2, +} UnquoteFlags; + +int unquote_first_word(const char **p, char **ret, UnquoteFlags flags); +int unquote_many_words(const char **p, UnquoteFlags flags, ...) _sentinel_; int free_and_strdup(char **p, const char *s); @@ -1049,8 +1055,6 @@ int fd_getcrtime(int fd, usec_t *usec); int path_getcrtime(const char *p, usec_t *usec); int fd_getcrtime_at(int dirfd, const char *name, usec_t *usec, int flags); -int same_fd(int a, int b); - int chattr_fd(int fd, bool b, unsigned mask); int chattr_path(const char *p, bool b, unsigned mask); int change_attr_fd(int fd, unsigned value, unsigned mask);