X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fcclfind.c;h=1d4f6c6f48b8a15c9a80f3bd60dffd65a4a4a107;hp=aa4b303e449e62e5fae35365965f29444ade7978;hb=bc2c68cf9316d95c5b00444aaaa2f0a6127c1aa9;hpb=5176062be1e2c2e8fd7f7a506acd990e711d9316 diff --git a/src/cclfind.c b/src/cclfind.c index aa4b303..1d4f6c6 100644 --- a/src/cclfind.c +++ b/src/cclfind.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2013 Index Data + * Copyright (C) Index Data * See the file LICENSE for details. */ /** @@ -687,9 +687,14 @@ struct ccl_rpn_node *qualifiers_order(CCL_parser cclp, if (KIND == CCL_TOK_TERM) { size_t i; + int quote_mode = 0; for (i = 0; ilook_token->len; i++) { - if (cclp->look_token->name[i] == '-') + if (i > 0 && cclp->look_token->name[i] == '\\') + ; + else if (cclp->look_token->name[i] == '"') + quote_mode = !quote_mode; + else if (cclp->look_token->name[i] == '-' && !quote_mode) break; }