Commit 79f50f2a by Neil Booth Committed by Zack Weinberg

cpplex.c (expand_name_space): Don't use ptrdiff_t.

2000-05-17  Neil Booth  <neilb@earthling.net>

	* cpplex.c (expand_name_space): Don't use ptrdiff_t.

From-SVN: r33964
parent ff9f1a5d
2000-05-17 Neil Booth <neilb@earthling.net>
* cpplex.c (expand_name_space): Don't use ptrdiff_t.
2000-05-17 Zack Weinberg <zack@wolery.cumb.org>
* cpplib.c: New feature, #pragma system_header.
......
......@@ -526,21 +526,19 @@ expand_name_space (list, len)
unsigned int len;
{
const U_CHAR *old_namebuf;
ptrdiff_t delta;
old_namebuf = list->namebuf;
list->name_cap += len;
list->namebuf = (unsigned char *) xrealloc (list->namebuf, list->name_cap);
/* Fix up token text pointers. */
delta = list->namebuf - old_namebuf;
if (delta)
if (list->namebuf != old_namebuf)
{
unsigned int i;
for (i = 0; i < list->tokens_used; i++)
if (token_spellings[list->tokens[i].type].type > SPELL_NONE)
list->tokens[i].val.name.text += delta;
list->tokens[i].val.name.text += (list->namebuf - old_namebuf);
}
}
......
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