X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fcql2ccl.c;h=54b16e733c56c970cfdbe676080e4611d0176d1f;hp=ab358f6368c09fbff0b987b0484b30a5ad2ec72e;hb=fda1ca39e89e4c7f3479c0a9d2a1e38acfdb46bb;hpb=bfb2ef5f27f900c15c13a239081ad9fa217e91ec diff --git a/src/cql2ccl.c b/src/cql2ccl.c index ab358f6..54b16e7 100644 --- a/src/cql2ccl.c +++ b/src/cql2ccl.c @@ -38,11 +38,20 @@ static void pr_term(struct cql_node *cn, if (*cp == '\\' && cp[1]) { - x[0] = cp[0]; - x[1] = cp[1]; - x[2] = '\0'; + if (!quote_mode) + { + pr("\"", client_data); + quote_mode = 1; + } cp++; - pr(x, client_data); + if (*cp == '\"' || *cp == '\\') + pr("\\\"", client_data); + else + { + x[0] = *cp; + x[1] = '\0'; + pr(x, client_data); + } } else if (*cp == '*') {