projects
/
idzebra-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Happy new year.
[idzebra-moved-to-github.git]
/
index
/
rpnsearch.c
diff --git
a/index/rpnsearch.c
b/index/rpnsearch.c
index
69a7e9a
..
6eb12e6
100644
(file)
--- a/
index/rpnsearch.c
+++ b/
index/rpnsearch.c
@@
-1,5
+1,5
@@
/* This file is part of the Zebra server.
/* This file is part of the Zebra server.
- Copyright (C) 1994-2010 Index Data
+ Copyright (C) 1994-2011 Index Data
Zebra is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Zebra is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
@@
-154,7
+154,7
@@
static int grep_handle(char *name, const char *info, void *p)
}
static int term_pre(zebra_map_t zm, const char **src,
}
static int term_pre(zebra_map_t zm, const char **src,
- const char *ct1, const char *ct2, int first)
+ const char *ct1, int first)
{
const char *s1, *s0 = *src;
const char **map;
{
const char *s1, *s0 = *src;
const char **map;
@@
-164,8
+164,6
@@
static int term_pre(zebra_map_t zm, const char **src,
{
if (ct1 && strchr(ct1, *s0))
break;
{
if (ct1 && strchr(ct1, *s0))
break;
- if (ct2 && strchr(ct2, *s0))
- break;
s1 = s0;
map = zebra_maps_input(zm, &s1, strlen(s1), first);
if (**map != *CHR_SPACE)
s1 = s0;
map = zebra_maps_input(zm, &s1, strlen(s1), first);
if (**map != *CHR_SPACE)
@@
-297,7
+295,7
@@
static int term_100(zebra_map_t zm,
const char *space_start = 0;
const char *space_end = 0;
const char *space_start = 0;
const char *space_end = 0;
- if (!term_pre(zm, src, NULL, NULL, !space_split))
+ if (!term_pre(zm, src, 0, !space_split))
return 0;
s0 = *src;
while (*s0)
return 0;
s0 = *src;
while (*s0)
@@
-350,7
+348,7
@@
static int term_101(zebra_map_t zm,
const char **map;
int i = 0;
const char **map;
int i = 0;
- if (!term_pre(zm, src, "#", "#", !space_split))
+ if (!term_pre(zm, src, "#", !space_split))
return 0;
s0 = *src;
while (*s0)
return 0;
s0 = *src;
while (*s0)
@@
-387,7
+385,7
@@
static int term_103(zebra_map_t zm, const char **src,
const char *s0;
const char **map;
const char *s0;
const char **map;
- if (!term_pre(zm, src, "^\\()[].*+?|", "(", !space_split))
+ if (!term_pre(zm, src, "^\\()[].*+?|", !space_split))
return 0;
s0 = *src;
if (errors && *s0 == '+' && s0[1] && s0[2] == '+' && s0[3] &&
return 0;
s0 = *src;
if (errors && *s0 == '+' && s0[1] && s0[2] == '+' && s0[3] &&
@@
-440,7
+438,7
@@
static int term_104(zebra_map_t zm, const char **src,
const char **map;
int i = 0;
const char **map;
int i = 0;
- if (!term_pre(zm, src, "?*#", "?*#", !space_split))
+ if (!term_pre(zm, src, "?*#", !space_split))
return 0;
s0 = *src;
while (*s0)
return 0;
s0 = *src;
while (*s0)
@@
-510,7
+508,7
@@
static int term_105(zebra_map_t zm, const char **src,
const char **map;
int i = 0;
const char **map;
int i = 0;
- if (!term_pre(zm, src, "*!", "*!", !space_split))
+ if (!term_pre(zm, src, "\\*!", !space_split))
return 0;
s0 = *src;
while (*s0)
return 0;
s0 = *src;
while (*s0)
@@
-529,6
+527,13
@@
static int term_105(zebra_map_t zm, const char **src,
wrbuf_putc(display_term, *s0);
s0++;
}
wrbuf_putc(display_term, *s0);
s0++;
}
+ else if (*s0 == '\\')
+ {
+ i++;
+ wrbuf_puts(term_dict, "\\\\");
+ wrbuf_putc(display_term, *s0);
+ s0++;
+ }
else
{
const char *s1 = s0;
else
{
const char *s1 = s0;
@@
-1977,7
+1982,7
@@
static ZEBRA_RES rpn_sort_spec(ZebraHandle zh, Z_AttributesPlusTerm *zapt,
sk->u.sortAttributes->id = odr_oiddup_nmem(stream, attributeSet);
sk->u.sortAttributes->list = zapt->attributes;
sk->u.sortAttributes->id = odr_oiddup_nmem(stream, attributeSet);
sk->u.sortAttributes->list = zapt->attributes;
- sks->sortRelation = (int *)
+ sks->sortRelation = (Odr_int *)
nmem_malloc(stream, sizeof(*sks->sortRelation));
if (sort_relation_value == 1)
*sks->sortRelation = Z_SortKeySpec_ascending;
nmem_malloc(stream, sizeof(*sks->sortRelation));
if (sort_relation_value == 1)
*sks->sortRelation = Z_SortKeySpec_ascending;
@@
-1986,7
+1991,7
@@
static ZEBRA_RES rpn_sort_spec(ZebraHandle zh, Z_AttributesPlusTerm *zapt,
else
*sks->sortRelation = Z_SortKeySpec_ascending;
else
*sks->sortRelation = Z_SortKeySpec_ascending;
- sks->caseSensitivity = (int *)
+ sks->caseSensitivity = (Odr_int *)
nmem_malloc(stream, sizeof(*sks->caseSensitivity));
*sks->caseSensitivity = 0;
nmem_malloc(stream, sizeof(*sks->caseSensitivity));
*sks->caseSensitivity = 0;