From fd10c2116175815cf6c2da430a439c27991e1918 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 22 Dec 2006 12:13:39 +0000 Subject: [PATCH] Use atoll/atoi for ascii to zint conversion in alvis filter. --- configure.ac | 4 ++-- index/alvis.c | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index af87b2c..73845d8 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ dnl Zebra, Index Data ApS, 1995-2006 -dnl $Id: configure.ac,v 1.42 2006-11-29 10:24:01 adam Exp $ +dnl $Id: configure.ac,v 1.43 2006-12-22 12:13:39 adam Exp $ dnl AC_PREREQ(2.59) AC_INIT([idzebra],[2.0.7],[zebra-help@indexdata.dk]) @@ -107,7 +107,7 @@ else fi dnl dnl ------ various functions -AC_CHECK_FUNCS(mkstemp) +AC_CHECK_FUNCS(mkstemp atoll) dnl dnl ------ GNU Readline READLINE_SHARED_LIBADD="" diff --git a/index/alvis.c b/index/alvis.c index 2f91763..851064f 100644 --- a/index/alvis.c +++ b/index/alvis.c @@ -1,4 +1,4 @@ -/* $Id: alvis.c,v 1.8 2006-12-13 13:05:45 adam Exp $ +/* $Id: alvis.c,v 1.9 2006-12-22 12:13:40 adam Exp $ Copyright (C) 1995-2006 Index Data ApS @@ -434,7 +434,12 @@ static void index_record(struct filter_info *tinfo,struct recExtractCtrl *ctrl, sscanf(id_str, "%255s", ctrl->match_criteria); if (rank_str) - ctrl->staticrank = atoi(rank_str); + ctrl->staticrank = +#if HAVE_ATOLL + atoll(rank_str); +#else + atoi(rank_str); +#endif ptr = ptr->children; } -- 1.7.10.4