Commit 664f85a3 authored by Per Cederqvist's avatar Per Cederqvist

(Local_text_no_iter): New experimental typedef.

(l2g_append): Renamed i to ix and changed type to Local_text_no_iter.
parent 2eebd1b7
...@@ -330,13 +330,16 @@ l2g_copy(Local_to_global *from, Local_to_global *to) ...@@ -330,13 +330,16 @@ l2g_copy(Local_to_global *from, Local_to_global *to)
* Append the pair LNO-TNO. LNO has to be bigger than the last local * Append the pair LNO-TNO. LNO has to be bigger than the last local
* number in the structure (this is not tested FIXME?). * number in the structure (this is not tested FIXME?).
*/ */
typedef Local_text_no Local_text_no_iter;
void void
l2g_append(Local_to_global *l2g, l2g_append(Local_to_global *l2g,
Local_text_no lno, Local_text_no lno,
Text_no tno) Text_no tno)
{ {
L2g_block_info * binfo; L2g_block_info * binfo;
int i; Local_text_no_iter ix;
/* Don't add anything if tno == 0. */ /* Don't add anything if tno == 0. */
if (tno == 0) if (tno == 0)
...@@ -391,8 +394,8 @@ l2g_append(Local_to_global *l2g, ...@@ -391,8 +394,8 @@ l2g_append(Local_to_global *l2g,
if (binfo->key_block == NULL) { if (binfo->key_block == NULL) {
/* A dense block. */ /* A dense block. */
for (i = binfo->first_free; i < lno - binfo->start; ++i) for (ix = binfo->first_free; ix < lno - binfo->start; ++ix)
binfo->value_block[i] = 0; binfo->value_block[ix] = 0;
binfo->value_block[lno - binfo->start] = tno; binfo->value_block[lno - binfo->start] = tno;
binfo->first_free = lno - binfo->start + 1; binfo->first_free = lno - binfo->start + 1;
......
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