/* This file is part of the Zebra server.
- Copyright (C) 1995-2008 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
*/
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <stdio.h>
#include <assert.h>
#include <sys/types.h>
return 0;
sp_lex(sp);
- if (wrd->term_buf && wrd->term_len)
+ if (wrd->term_buf)
{
- wrd->term_buf += start;
- wrd->term_len -= start;
- if (wrd->term_len > len)
- wrd->term_len = len;
+ if (start >= wrd->term_len)
+ wrd->term_len = 0;
+ else
+ {
+ wrd->term_len -= start;
+ wrd->term_buf += start;
+
+ if (wrd->term_len > len)
+ wrd->term_len = len;
+ }
}
return 1;
}
memcpy(&wrd_tl, wrd, sizeof(*wrd));
if (tl->source)
sp_parse(sp, n, &wrd_tl, tl->source);
-
+
/* this is just the old fashioned attribute based index */
wrd_tl.index_name = tl->index_name;
if (p->flagShowRecords)
struct recExtractCtrl *p, int level, RecWord *wrd)
{
data1_termlist *tlist = 0;
- data1_datatype dtype = DATA1K_string;
-
/*
* cycle up towards the root until we find a tag with an att..
* this has the effect of indexing locally defined tags with
break;
if (!par || !(tlist = par->u.tag.element->termlists))
return;
- if (par->u.tag.element->tag)
- dtype = par->u.tag.element->tag->kind;
-
for (; tlist; tlist = tlist->next)
{
/* consider source */
yaz_log(YLOG_DEBUG, "grs_retrieve: schema mapping");
for (map = node->u.root.absyn->maptabs; map; map = map->next)
{
- // if (map->target_absyn_ref == requested_schema)
if (!oid_oidcmp(map->oid, requested_schema))
{
onode = node;
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab