X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fxcqlutil.c;h=8bbb752735ef42102f92ff9501711d6b73f7c02f;hp=ba3a2536639818ee4e5876c5c7b5d468b2f52705;hb=5242cb5a8634bfa38b9333ff7f903e718ac6e292;hpb=7b27a8f378d73a86e8ff5e4fa3285117362481c5 diff --git a/src/xcqlutil.c b/src/xcqlutil.c index ba3a253..8bbb752 100644 --- a/src/xcqlutil.c +++ b/src/xcqlutil.c @@ -16,7 +16,7 @@ #include -static void pr_n(const char *buf, +static void pr_n(const char *buf, void (*pr)(const char *buf, void *client_data), void *client_data, int n) { @@ -53,7 +53,7 @@ static void pr_cdata(const char *buf, src++; } } - + static void prefixes(struct cql_node *cn, void (*pr)(const char *buf, void *client_data), void *client_data, int level) @@ -86,7 +86,7 @@ static void prefixes(struct cql_node *cn, if (head) pr_n("\n", pr, client_data, level); } - + static void cql_to_xml_mod(struct cql_node *m, void (*pr)(const char *buf, void *client_data), void *client_data, int level) @@ -118,7 +118,7 @@ static void cql_to_xml_mod(struct cql_node *m, } } -static void cql_sort_to_xml(struct cql_node *cn, +static void cql_sort_to_xml(struct cql_node *cn, void (*pr)(const char *buf, void *client_data), void *client_data, int level) { @@ -128,7 +128,7 @@ static void cql_sort_to_xml(struct cql_node *cn, for (; cn; cn = cn->u.sort.next) { pr_n("\n", pr, client_data, level+2); - + if (cn->u.sort.index) { pr_n("", pr, client_data, level+4); @@ -236,7 +236,7 @@ static void cql_to_xml_r(struct cql_node *cn, } } -void cql_to_xml(struct cql_node *cn, +void cql_to_xml(struct cql_node *cn, void (*pr)(const char *buf, void *client_data), void *client_data) {