mirror of
https://github.com/stedolan/jq.git
synced 2024-05-11 05:55:39 +00:00
The search path listed in an import directive can now be an array. The top-level search path is appended. Null and empty strings in the path terminate any search. The "." in "." and "./*" is replaced with the directory containing the file doing the import (for command-line programs this is the current directory, though that may be a bad idea). No version numbers or anything of the sort are gratuitously added to the search paths. All this makes external package managers possible by allowing dependencies to be installed local to dependents.
33 lines
921 B
C
33 lines
921 B
C
#ifndef _JQ_H_
|
|
#define _JQ_H_
|
|
|
|
#include <stdio.h>
|
|
#include <jv.h>
|
|
|
|
enum {JQ_DEBUG_TRACE = 1};
|
|
|
|
typedef struct jq_state jq_state;
|
|
typedef void (*jq_err_cb)(void *, jv);
|
|
|
|
jq_state *jq_init(void);
|
|
void jq_set_error_cb(jq_state *, jq_err_cb, void *);
|
|
void jq_get_error_cb(jq_state *, jq_err_cb *, void **);
|
|
void jq_set_nomem_handler(jq_state *, void (*)(void *), void *);
|
|
jv jq_format_error(jv msg);
|
|
void jq_report_error(jq_state *, jv);
|
|
int jq_compile(jq_state *, const char*);
|
|
int jq_compile_args(jq_state *, const char*, jv);
|
|
void jq_dump_disassembly(jq_state *, int);
|
|
void jq_start(jq_state *, jv value, int);
|
|
jv jq_next(jq_state *);
|
|
void jq_teardown(jq_state **);
|
|
|
|
void jq_set_attrs(jq_state *, jv);
|
|
jv jq_get_attrs(jq_state *);
|
|
jv jq_get_jq_origin(jq_state *);
|
|
jv jq_get_prog_origin(jq_state *);
|
|
jv jq_get_lib_dirs(jq_state *);
|
|
void jq_set_attr(jq_state *, jv, jv);
|
|
jv jq_get_attr(jq_state *, jv);
|
|
#endif /* !_JQ_H_ */
|