X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=isamb%2Ftstisamb.c;h=78b65b0bf421110c97822e62e6694d4cf6ab28c4;hb=64e3d8bb310ec317082d1fc89af4d7cb15d9e106;hp=a2c9140f092b05c1f639fd195ead51e9c26b923b;hpb=ae2d0647bd3a555df77397b6c2f9c129fda0733a;p=idzebra-moved-to-github.git diff --git a/isamb/tstisamb.c b/isamb/tstisamb.c index a2c9140..78b65b0 100644 --- a/isamb/tstisamb.c +++ b/isamb/tstisamb.c @@ -1,5 +1,5 @@ -/* $Id: tstisamb.c,v 1.1 2003-06-23 15:36:11 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