diff options
author | bapt <bapt@FreeBSD.org> | 2016-04-17 21:30:40 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2016-04-17 21:30:40 +0000 |
commit | f1f86fc26ac7bb139234db8be5840e7fbb3ece3b (patch) | |
tree | 0f882185304d4ce271b3e3f95f25c20e20bdffea /contrib/libucl/src/ucl_internal.h | |
parent | eab6f9627ac3807e63427aae509529a6c39af635 (diff) | |
parent | 0a117fc9041121515084289fa2962638887aeca2 (diff) | |
download | FreeBSD-src-f1f86fc26ac7bb139234db8be5840e7fbb3ece3b.zip FreeBSD-src-f1f86fc26ac7bb139234db8be5840e7fbb3ece3b.tar.gz |
Import libucl 0.8.0
Diffstat (limited to 'contrib/libucl/src/ucl_internal.h')
-rw-r--r-- | contrib/libucl/src/ucl_internal.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/contrib/libucl/src/ucl_internal.h b/contrib/libucl/src/ucl_internal.h index 31d6b13..db8a12c 100644 --- a/contrib/libucl/src/ucl_internal.h +++ b/contrib/libucl/src/ucl_internal.h @@ -211,6 +211,8 @@ struct ucl_parser { struct ucl_variable *variables; ucl_variable_handler var_handler; void *var_data; + ucl_object_t *comments; + ucl_object_t *last_comment; UT_string *err; }; @@ -524,6 +526,34 @@ void ucl_emitter_print_key_msgpack (bool print_key, const ucl_object_t *obj); /** + * Fetch URL into a buffer + * @param url url to fetch + * @param buf pointer to buffer (must be freed by callee) + * @param buflen pointer to buffer length + * @param err pointer to error argument + * @param must_exist fail if cannot find a url + */ +bool ucl_fetch_url (const unsigned char *url, + unsigned char **buf, + size_t *buflen, + UT_string **err, + bool must_exist); + +/** + * Fetch a file and save results to the memory buffer + * @param filename filename to fetch + * @param len length of filename + * @param buf target buffer + * @param buflen target length + * @return + */ +bool ucl_fetch_file (const unsigned char *filename, + unsigned char **buf, + size_t *buflen, + UT_string **err, + bool must_exist); + +/** * Add new element to an object using the current merge strategy and priority * @param parser * @param nobj |