X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=dict%2Flookgrep.c;h=d912151c9fd778d89eaee5734b38da72d96885de;hb=4dde0c63ec2098c9b99896b04f1d27eea2e2c6da;hp=aa01af5991cd693ae6d1821756c5cbe2f8fa09c7;hpb=896c0427df9d8eff5de6a1735dcd992e067df844;p=idzebra-moved-to-github.git diff --git a/dict/lookgrep.c b/dict/lookgrep.c index aa01af5..d912151 100644 --- a/dict/lookgrep.c +++ b/dict/lookgrep.c @@ -1,4 +1,4 @@ -/* $Id: lookgrep.c,v 1.25 2002-08-02 19:26:55 adam Exp $ +/* $Id: lookgrep.c,v 1.26.2.2 2006-12-05 21:14:40 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002 Index Data Aps @@ -15,18 +15,17 @@ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Zebra; see the file LICENSE.zebra. If not, write to the -Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. -*/ - +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ #include #include #include #include +#include #include #include @@ -373,10 +372,10 @@ int dict_lookup_grep (Dict dict, const char *pattern, int range, void *client, 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++) { - logf (LOG_DEBUG, " %3d %c", pattern[i], + yaz_log(YLOG_DEBUG, " %3d %c", pattern[i], (pattern[i] > ' ' && pattern[i] < 127) ? pattern[i] : '?'); } @@ -385,6 +384,7 @@ int dict_lookup_grep (Dict dict, const char *pattern, int range, void *client, i = dfa_parse (dfa, &this_pattern); if (i || *this_pattern) { + yaz_log(YLOG_WARN, "dfa_parse fail=%d", i); dfa_delete (&dfa); return -1; } @@ -417,7 +417,7 @@ int dict_lookup_grep (Dict dict, const char *pattern, int range, void *client, 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);