Commit 7f70c998 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(l2gi_searchsome_reverse): New function.

(l2gi_prev): New function.
parent 7e542b42
......@@ -136,4 +136,44 @@ Local_text_no l2gi_end(const L2g_iterator *l2gi);
was created. */
Local_text_no l2gi_begin(const L2g_iterator *l2gi);
/* ================================================================ */
/*
* Reverse iterator for a Local_to_global.
*
* Usage:
*
* Local_to_global l2g;
* L2g_reverse_iterator l2gi;
*
* for (l2gi_searchall_reverse(&l2gi, &l2g); // Not implemented yet.
* !l2gi.search_ended;
* l2gi_prev(&l2gi))
* {
* use(l2gi.lno, l2gi.tno);
* }
*
* or:
*
* for (l2gi_searchsome_reverse(&l2gi, &l2g, lower_limit, upper_limit);
* !l2gi.search_ended;
* l2gi_prev(&l2gi))
* {
* use(l2gi.lno, l2gi.tno);
* }
*/
/* Create an iterator that will iterate through all existing texts
with a local text number lno such that
begin <= lno < end
starting at end-1 and ending at begin. */
void l2gi_searchsome_reverse(L2g_reverse_iterator *l2gi,
const Local_to_global *l2g,
Local_text_no begin,
Local_text_no end);
/* Step the iterator forward, eh, backwards, eh, towards begin. */
void l2gi_prev(L2g_reverse_iterator *l2gi);
#endif /* LOCAL2GLOBAL_H_INCLUDED */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment