X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=util%2Fsnippet.c;h=62663cff68e381a6f7d3722093816ff9f79a508b;hb=918c8b1ec479083d82c390d5dceb4899654cb666;hp=b900c1be4770f0e05249e7a986216c56875aa6bf;hpb=0af00389d43835ef54928dc22f7d34ae30f3c723;p=idzebra-moved-to-github.git diff --git a/util/snippet.c b/util/snippet.c index b900c1b..62663cf 100644 --- a/util/snippet.c +++ b/util/snippet.c @@ -1,4 +1,4 @@ -/* $Id: snippet.c,v 1.7 2006-06-07 10:14:42 adam Exp $ +/* $Id: snippet.c,v 1.10 2006-08-14 10:40:34 adam Exp $ Copyright (C) 1995-2006 Index Data ApS @@ -15,9 +15,9 @@ 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 @@ -95,9 +95,9 @@ zebra_snippets *zebra_snippets_window(zebra_snippets *doc, zebra_snippets *hit, while(1) { - int window_start; - int first_seq_no_best_window = 0; - int last_seq_no_best_window = 0; + zint window_start; + zint first_seq_no_best_window = 0; + zint last_seq_no_best_window = 0; int number_best_window = 0; zebra_snippet_word *hit_w, *doc_w; int min_ord = 0; /* not set yet */ @@ -118,7 +118,7 @@ zebra_snippets *zebra_snippets_window(zebra_snippets *doc, zebra_snippets *hit, { zebra_snippet_word *look_w = hit_w; int number_this = 0; - int seq_no_last = 0; + zint seq_no_last = 0; while (look_w && look_w->seqno < hit_w->seqno + window_size) { if (look_w->ord == ord) @@ -137,8 +137,10 @@ zebra_snippets *zebra_snippets_window(zebra_snippets *doc, zebra_snippets *hit, } } yaz_log(YLOG_DEBUG, "ord=%d", ord); - yaz_log(YLOG_DEBUG, "first_seq_no_best_window=%d", first_seq_no_best_window); - yaz_log(YLOG_DEBUG, "last_seq_no_best_window=%d", last_seq_no_best_window); + yaz_log(YLOG_DEBUG, "first_seq_no_best_window=" ZINT_FORMAT, + first_seq_no_best_window); + yaz_log(YLOG_DEBUG, "last_seq_no_best_window=" ZINT_FORMAT, + last_seq_no_best_window); yaz_log(YLOG_DEBUG, "number_best_window=%d", number_best_window); window_start = (first_seq_no_best_window + last_seq_no_best_window -