Commit 058da320 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(l2g_set_first_appendable_key): New function.

parent faaff560
......@@ -809,6 +809,22 @@ l2g_first_appendable_key(const Local_to_global *l2g)
return l2g->first_unused;
}
void
l2g_set_first_appendable_key(Local_to_global *l2g,
Local_text_no key)
{
if (key < l2g->first_unused)
{
kom_log("l2g_append: won't decrease first_unused from %lu to %lu\n",
(unsigned long)l2g->first_unused, (unsigned long)key);
return;
}
l2g->first_unused = key;
}
void
l2g_delete_global_in_sorted(Local_to_global *l2g,
Text_no tno)
......
......@@ -55,6 +55,13 @@ Local_text_no l2g_next_key(const Local_to_global *l2g, Local_text_no lno);
structure has always been empty. */
Local_text_no l2g_first_appendable_key(const Local_to_global *l2g);
/* Set the first the number returned by l2g_first_appendable_key. You
can only set it to a higher value than it already has. This
function is probably only useful when reading in a Local_to_global
structure that was saved with something other than l2g_write. */
void l2g_set_first_appendable_key(Local_to_global *l2g,
Local_text_no key);
/* Delete global text number TNO. This function can only be called if
both the local and global text numbers are monotonous series, as
they are in the Person::created_text_map field. */
......
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