X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=index%2Frecords.c;h=d63aac6d367b2dd0d1293c33ea8606e6f2126687;hb=da232e65627649c30c4f804240c899880f379a8b;hp=797ffa5ca3a7afcc785e9f7ce5ec6c5456649c60;hpb=5a5e8d852ce98a805b02679a971cdf4216d94177;p=idzebra-moved-to-github.git diff --git a/index/records.c b/index/records.c index 797ffa5..d63aac6 100644 --- a/index/records.c +++ b/index/records.c @@ -1,5 +1,5 @@ /* This file is part of the Zebra server. - Copyright (C) 1994-2009 Index Data + Copyright (C) 1994-2010 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;