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
Many public functions returns ZEBRA_RES rather than int to avoid
[idzebra-moved-to-github.git]
/
dict
/
lookgrep.c
diff --git
a/dict/lookgrep.c
b/dict/lookgrep.c
index
aa01af5
..
3473258
100644
(file)
--- a/
dict/lookgrep.c
+++ b/
dict/lookgrep.c
@@
-1,6
+1,6
@@
-/* $Id: lookgrep.c,v 1.25 2002-08-02 19:26:55 adam Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
- Index Data Aps
+/* $Id: lookgrep.c,v 1.29 2005-01-15 19:38:21 adam Exp $
+ Copyright (C) 1995-2005
+ Index Data ApS
This file is part of the Zebra server.
This file is part of the Zebra server.
@@
-28,7
+28,7
@@
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include <assert.h>
#include <dfa.h>
#include <assert.h>
#include <dfa.h>
-#include <dict.h>
+#include "dict-p.h"
typedef unsigned MatchWord;
#define WORD_BITS 32
typedef unsigned MatchWord;
#define WORD_BITS 32
@@
-373,10
+373,10
@@
int dict_lookup_grep (Dict dict, const char *pattern, int range, void *client,
dfa_verbose = 1;
#endif
dfa_verbose = 1;
#endif
- logf (LOG_DEBUG, "dict_lookup_grep range=%d", range);
+ yaz_log (YLOG_DEBUG, "dict_lookup_grep range=%d", range);
for (i = 0; pattern[i]; i++)
{
for (i = 0; pattern[i]; i++)
{
- logf (LOG_DEBUG, " %3d %c", pattern[i],
+ yaz_log (YLOG_DEBUG, " %3d %c", pattern[i],
(pattern[i] > ' ' && pattern[i] < 127) ? pattern[i] : '?');
}
(pattern[i] > ' ' && pattern[i] < 127) ? pattern[i] : '?');
}
@@
-385,6
+385,7
@@
int dict_lookup_grep (Dict dict, const char *pattern, int range, void *client,
i = dfa_parse (dfa, &this_pattern);
if (i || *this_pattern)
{
i = dfa_parse (dfa, &this_pattern);
if (i || *this_pattern)
{
+ yaz_log (YLOG_WARN, "dfa_parse fail=%d", i);
dfa_delete (&dfa);
return -1;
}
dfa_delete (&dfa);
return -1;
}
@@
-417,7
+418,7
@@
int dict_lookup_grep (Dict dict, const char *pattern, int range, void *client,
dfa, max_pos, init_pos);
else
i = 0;
dfa, max_pos, init_pos);
else
i = 0;
- logf (LOG_DEBUG, "max_pos = %d", *max_pos);
+ yaz_log (YLOG_DEBUG, "max_pos = %d", *max_pos);
dfa_delete (&dfa);
xfree (Rj);
rm_MatchContext (&mc);
dfa_delete (&dfa);
xfree (Rj);
rm_MatchContext (&mc);