X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=index%2Frecords.c;h=ad0a19f55cfe76d43963c6440a2116ee48ab9f22;hb=4c45f1ecb67feb1cb08457b7129d94d70e0af293;hp=f6ef93d0e7301709250532f4f587c27b5464263c;hpb=a66b7d79383ae700f3358731eecfe2aafed0e90d;p=idzebra-moved-to-github.git diff --git a/index/records.c b/index/records.c index f6ef93d..ad0a19f 100644 --- a/index/records.c +++ b/index/records.c @@ -1,5 +1,5 @@ /* This file is part of the Zebra server. - Copyright (C) 1994-2010 Index Data + Copyright (C) 1994-2011 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -934,6 +934,21 @@ Record rec_get_root(Records p) return rec_get(p, rec_sysno_to_ext(1)); } +Record rec_get_next(Records p, Record rec) +{ + Record next = 0; + zint next_sysno_int = rec_sysno_to_int(rec->sysno); + + while (!next) + { + ++next_sysno_int; + if (next_sysno_int == p->head.index_last) + break; + next = rec_get(p, rec_sysno_to_ext(next_sysno_int)); + } + return next; +} + static Record rec_new_int(Records p) { int i;