From: Adam Dickmeiss Date: Wed, 2 Jun 2004 06:39:36 +0000 (+0000) Subject: Added isamb_pp_forward test. Changed messages from test program from X-Git-Tag: ZEBRA.1.3.16~85 X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=commitdiff_plain;h=64e3d8bb310ec317082d1fc89af4d7cb15d9e106 Added isamb_pp_forward test. Changed messages from test program from LOG_DEBUG to LOG_WARN so we see them! Test program calling bfs_reset. --- diff --git a/isamb/tstisamb.c b/isamb/tstisamb.c index b990d82..78b65b0 100644 --- a/isamb/tstisamb.c +++ b/isamb/tstisamb.c @@ -1,5 +1,5 @@ -/* $Id: tstisamb.c,v 1.2 2004-06-01 13:04:29 adam Exp $ - Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003 +/* $Id: tstisamb.c,v 1.3 2004-06-02 06:39:36 adam Exp $ + Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 Index Data Aps This file is part of the Zebra server. @@ -77,6 +77,61 @@ int code_read(void *vp, char **dst, int *insertMode) return 1; } +void tst_forward(ISAMB isb, int n) +{ + ISAMC_I isamc_i; + ISAMC_P isamc_p; + struct read_info ri; + int i; + ISAMB_PP pp; + char key_buf[10]; + + /* insert a number of entries */ + ri.no = 0; + ri.max = n; + + isamc_i.clientData = &ri; + isamc_i.read_item = code_read; + + isamc_p = isamb_merge (isb, 0 /* new list */ , &isamc_i); + + /* read the entries */ + pp = isamb_pp_open (isb, isamc_p); + + for (i = 0; i