private static CharNode updateCharNodes ( Locale l, Xobj x, CharNode nodes, int cch )
{
assert nodes == null || nodes.locale() == l;
CharNode node = nodes;
int i = 0;
while ( node != null && cch > 0 )
{
assert node.getDom() == x;
if (node._cch > cch)
node._cch = cch;
node._off = i;
i += node._cch;
cch -= node._cch;
node = node._next;
}
if (cch <= 0)
{
for ( ; node != null ; node = node._next )
{
assert node.getDom() == x;
if (node._cch != 0)
node._cch = 0;
node._off = i;
}
}
else
{
node = l.createTextNode();
node.setDom( (Dom) x );
node._cch = cch;
node._off = i;
nodes = CharNode.appendNode( nodes, node );
}