Commit 32273ec9 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Comments improved.

parent c476b708
......@@ -351,15 +351,15 @@ find_block_index_key(const Local_to_global *l2g, Local_text_no lno,
}
}
/*
* If the block didn't contain anything more, try next block
* until there are no more blocks.
* If the block didn't contain anything more, try the next
* block, if there is one.
*/
binfo++;
}
/*
* We want the first existing entry in the block that binfo points
* to. However, binfo may point past the last text.
* to. However, binfo may point past the last block.
*/
if (binfo >= l2g->blocks + l2g->num_blocks)
return 0;
......@@ -720,11 +720,6 @@ l2g_delete(Local_to_global *l2g,
}
/*
* Lookup the global text number which corresponds to the local text
* number LNO.
*/
Text_no
l2g_lookup(const Local_to_global *l2g,
Local_text_no lno)
......@@ -752,10 +747,6 @@ l2g_lookup(const Local_to_global *l2g,
}
/*
* Return the next local text number which is not
*/
Local_text_no
l2g_next_key(const Local_to_global *l2g,
Local_text_no lno)
......@@ -794,10 +785,6 @@ l2g_delete_global_in_sorted(Local_to_global *l2g,
}
/*
* Dump the internal structure of L2G onto the file FILE.
*/
void
l2g_dump(FILE *file,
const Local_to_global *l2g)
......@@ -834,10 +821,6 @@ l2g_dump(FILE *file,
}
/*
* Read a Local to global structure from the file FILE.
*/
Success
l2g_read(FILE *fp, Local_to_global *l2g)
{
......@@ -886,10 +869,6 @@ l2g_read(FILE *fp, Local_to_global *l2g)
}
/*
* Print the structure to the file FILE.
*/
void
l2g_write(FILE *fp, const Local_to_global *l2g)
{
......
......@@ -17,11 +17,16 @@ void l2g_clear (Local_to_global *l2g);
void l2g_copy (Local_to_global *dest,
const Local_to_global *src);
/* Invalidates all iterators. */
/* Append a new mapping from LNO to TNO. LNO must be higher than any
LNO previously stored in the structure.
Invalidates all iterators. */
void l2g_append (Local_to_global *l2g, Local_text_no lno,
Text_no tno);
/* Invalidates all iterators. */
/* Delete LNO from the structure. Invalidates all iterators. */
void l2g_delete (Local_to_global *l2g, Local_text_no lno);
/* Return the TNO previously stored under LNO. Returns 0 if no such
LNO exists. */
Text_no l2g_lookup (const Local_to_global *l2g, Local_text_no lno);
/* Returns the next local text number, or 0 if lno is larger than the
......@@ -88,6 +93,8 @@ void l2gi_searchall (L2g_iterator *l2gi, const Local_to_global *l2g);
The search will be unbound if end is set to 0. */
void l2gi_searchsome(L2g_iterator *l2gi, const Local_to_global *l2g,
Local_text_no begin, Local_text_no end);
/* Step the iterator forward. */
void l2gi_next(L2g_iterator *l2gi);
/* This can only be used on iterators created with l2gi_searchsome.
......
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