X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Futil.h;h=43f4b089b4619fafefa32432e9c3ffb5e7c5c76b;hb=7629889c86005017eb1a7f1f803c0d8e7a5bef08;hp=bd8bbb268f37ac413078fc05b89aa7765bd65c8a;hpb=2c36be2f4ba38f9097cdcdcd1e724ffa46da12c7;p=elogind.git diff --git a/src/shared/util.h b/src/shared/util.h index bd8bbb268..43f4b089b 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -128,6 +128,8 @@ bool streq_ptr(const char *a, const char *b) _pure_; #define newa(t, n) ((t*) alloca(sizeof(t)*(n))) +#define newa0(t, n) ((t*) alloca0(sizeof(t)*(n))) + #define newdup(t, p, n) ((t*) memdup_multiply(p, sizeof(t), (n))) #define malloc0(n) (calloc((n), 1)) @@ -967,4 +969,7 @@ bool is_localhost(const char *hostname); int take_password_lock(const char *root); -int is_symlink(const char *path); \ No newline at end of file +int is_symlink(const char *path); + +int unquote_first_word(const char **p, char **ret); +int unquote_many_words(const char **p, ...) _sentinel_;