X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fzsets.c;h=52cb82b20a94d61044785418d0e548e294c1377c;hb=05b9b8ed020c5bfa48a913d6a2e2b50ddf1bab8e;hp=6fe00c48165402d294b9b92931d6e5a02482a468;hpb=39cb125e7755c6058a93dada8d5172804213cf8e;p=idzebra-moved-to-github.git diff --git a/index/zsets.c b/index/zsets.c index 6fe00c4..52cb82b 100644 --- a/index/zsets.c +++ b/index/zsets.c @@ -1,4 +1,4 @@ -/* $Id: zsets.c,v 1.72 2004-11-29 21:55:28 adam Exp $ +/* $Id: zsets.c,v 1.73 2004-12-02 17:27:04 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 Index Data Aps @@ -278,6 +278,31 @@ void resultSetDestroy (ZebraHandle zh, int num, char **names,int *statuses) } } +ZebraMetaRecord *zebra_meta_records_create_range (ZebraHandle zh, + const char *name, + zint start, int num) +{ + zint pos_small[10]; + zint *pos = pos_small; + ZebraMetaRecord *mr; + int i; + + if (num > 10000 || num <= 0) + return 0; + + if (num > 10) + pos = xmalloc(sizeof(*pos) * num); + + for (i = 0; i 10) + xfree(pos); + return mr; +} + ZebraMetaRecord *zebra_meta_records_create (ZebraHandle zh, const char *name, int num, zint *positions) {