X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fyaz%2Fcql.h;h=60d9d5cb264ef8c05137301a74c0bb711f4e0682;hb=f9ee3b9ec26306b6397c37434e8066f084d33b3a;hp=817e04b3e324bf669f587d6199acefabd073fb6c;hpb=2cf1b669768e41118f6937dd0afab37c8ed586a8;p=yaz-moved-to-github.git diff --git a/include/yaz/cql.h b/include/yaz/cql.h index 817e04b..60d9d5c 100644 --- a/include/yaz/cql.h +++ b/include/yaz/cql.h @@ -260,6 +260,17 @@ int cql_to_ccl(struct cql_node *cn, YAZ_EXPORT void cql_to_ccl_stdio(struct cql_node *cn, FILE *f); +/** \brief converts CQL tree to CCL and writes result to buffer + \param cn CQL node (tree) + \param out buffer + \param max size of buffer (max chars to write) + \retval 0 OK + \retval -1 conversion error + \retval -2 buffer too small (truncated) + */ +YAZ_EXPORT +int cql_to_ccl_buf(struct cql_node *cn, char *out, int max); + /** \brief stream handle for file (used by cql_to_xml_stdio) */ YAZ_EXPORT void cql_fputs(const char *buf, void *client_data);