* C-API: Added xpath_first_localonly() as an xpath function that skips prefix and namespace checks.

* Added experimental code for optizing XPath search using binary search.
  * Enable with XPATH_LIST_OPTIMIZE
* Changed `clicon_rpc_generate_error(msg, xerr)` to `clicon_rpc_generate_error(xerr, msg, arg)`
This commit is contained in:
Olof hagsand 2019-12-20 18:21:46 +01:00
parent ab46ce9820
commit 7ad16bd84b
56 changed files with 602 additions and 227 deletions

View file

@ -45,7 +45,6 @@
#include <string.h>
#include <limits.h>
#include <stdint.h>
#include <assert.h>
#include <syslog.h>
#include <fcntl.h>

View file

@ -49,7 +49,6 @@
#include <limits.h>
#include <stdint.h>
#include <syslog.h>
#include <assert.h>
/* cligen */
#include <cligen/cligen.h>

View file

@ -49,7 +49,6 @@
#include <limits.h>
#include <stdint.h>
#include <syslog.h>
#include <assert.h>
#include <fcntl.h>
#include <sys/time.h>
#include <sys/stat.h>

View file

@ -47,7 +47,6 @@
#include <string.h>
#include <limits.h>
#include <stdint.h>
#include <assert.h>
#include <syslog.h>
#include <curl/curl.h>

View file

@ -53,7 +53,6 @@
#include <limits.h>
#include <stdint.h>
#include <syslog.h>
#include <assert.h>
#include <fcntl.h>
#include <sys/time.h>
#include <sys/stat.h>
@ -196,7 +195,7 @@ main(int argc,
if ((ret = json_parse_file(fd, yspec, &xt, &xerr)) < 0)
goto done;
if (ret == 0){
clicon_rpc_generate_error("util_xml", xerr);
clicon_rpc_generate_error(xerr, "util_xml", NULL);
goto done;
}
}

View file

@ -47,7 +47,6 @@ See https://www.w3.org/TR/xpath/
#include <string.h>
#include <limits.h>
#include <stdint.h>
#include <assert.h>
#include <syslog.h>
#include <fcntl.h>
#include <sys/stat.h>
@ -318,7 +317,7 @@ main(int argc,
x = x0;
/* Parse XPATH (use nsc == NULL to indicate dont use) */
if (xpath_vec_ctx(x, nsc, xpath, &xc) < 0)
if (xpath_vec_ctx(x, nsc, xpath, 0, &xc) < 0)
return -1;
/* Print results */
cb = cbuf_new();

View file

@ -50,7 +50,6 @@
#include <regex.h>
#include <dirent.h>
#include <syslog.h>
#include <assert.h>
#include <sys/stat.h>
#include <libgen.h>
#include <netinet/in.h>