diff options
Diffstat (limited to 'src/ucl_internal.h')
-rw-r--r-- | src/ucl_internal.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/ucl_internal.h b/src/ucl_internal.h index 31d6b1361383b..db8a12c408b1f 100644 --- a/src/ucl_internal.h +++ b/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 |