/* macro.c - macro support for gas and gasp
- Copyright (C) 1994, 95, 96, 97, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
Written by Steve and Judy Chamberlain of Cygnus Support,
sac@cygnus.com
{
if (ptr->ptr[i] == '.')
i++;
- if (strncasecmp (ptr->ptr + i, from, from_len) == 0)
+ if (strncasecmp (ptr->ptr + i, from, from_len) == 0
+ && (ptr->len == (i + from_len) || ! isalnum (ptr->ptr[i + from_len])))
depth++;
- if (strncasecmp (ptr->ptr + i, to, to_len) == 0)
+ if (strncasecmp (ptr->ptr + i, to, to_len) == 0
+ && (ptr->len == (i + to_len) || ! isalnum (ptr->ptr[i + to_len])))
{
depth--;
if (depth == 0)
formal_entry *f;
f = loclist->next;
- hash_delete (formal_hash, sb_terminate (&loclist->name));
+ /* Setting the value to NULL effectively deletes the entry. We
+ avoid calling hash_delete because it doesn't reclaim memory. */
+ hash_jam (formal_hash, sb_terminate (&loclist->name), NULL);
sb_kill (&loclist->name);
sb_kill (&loclist->def);
sb_kill (&loclist->actual);