X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fxcqlutil.c;h=188a64c28770e53b226c41fc5e74f5fe49bf2d26;hp=19b5036fe78f954c50ac5d6bda1d35b680c97b5e;hb=053c92d650501a953d68b228ad74d96b4606eaf6;hpb=262800f89e3280c5b594faf6eea2c98e988ee2cb diff --git a/src/xcqlutil.c b/src/xcqlutil.c index 19b5036..188a64c 100644 --- a/src/xcqlutil.c +++ b/src/xcqlutil.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2011 Index Data + * Copyright (C) Index Data * See the file LICENSE for details. */ /** @@ -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) {