- [[[ Broken commit ]]]

More intermediate work.
This commit is contained in:
ccremers
2006-02-26 17:18:59 +00:00
parent 0ce88af6ac
commit 95df010a54
7 changed files with 338 additions and 2 deletions

View File

@@ -295,6 +295,29 @@ termlistConcat (Termlist tl1, Termlist tl2)
return tl1;
}
//! Concatenates two termlists.
/**
* Creates a completely new list that can be deleted.
*
* Note that the order is not preserved currently.
*/
Termlist
termlistConcatStatic (Termlist tl1, Termlist tl2)
{
Termlist tl, tls;
tl = NULL;
for (tls = tl1; tls != NULL; tls = tls->next)
{
tl = termlistAdd (tl, tls->term);
}
for (tls = tl2; tls != NULL; tls = tls->next)
{
tl = termlistAdd (tl, tls->term);
}
return tl;
}
//! Remove the pointed at element from the termlist.
/**
* Easier because of the double linked list. Note: does not do termDelete on the term.