/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2010 Index Data
+ * Copyright (C) 1995-2011 Index Data
* See the file LICENSE for details.
*/
/**
* of lookahead in the handling of relational operations.. So
* it's not really pure.
*/
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <stdlib.h>
#include <string.h>
if (lookahead->name[i] == ' ')
no_spaces++;
len += 1+lookahead->len+lookahead->ws_prefix_len;
- left_trunc = lookahead->left_trunc;
- right_trunc = lookahead->right_trunc;
lookahead = lookahead->next;
}
{
const char *src_str = cclp->look_token->name;
size_t src_len = cclp->look_token->len;
-
+
+ if (i == 0 && src_len > 0 && *src_str == '?')
+ {
+ src_len--;
+ src_str++;
+ left_trunc = 1;
+ }
+ if (i == no - 1 && src_len > 0 && src_str[src_len-1] == '?')
+ {
+ src_len--;
+ right_trunc = 1;
+ }
if (p->u.t.term[0] && cclp->look_token->ws_prefix_len)
{
size_t len = strlen(p->u.t.term);