Look for seperator after TO and FROM tokens when exploring nested structures

This commit is contained in:
Nick Clifton 1999-11-11 16:35:12 +00:00
parent 26f59a9e6b
commit c1eae11499
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,8 @@
1999-11-11 Nick Clifton <nickc@cygnus.com>
* macro.c (buffer_and_nest): Look for seperator after TO and
FROM tokens.
1999-11-08 Andrew Haley <aph@cygnus.com>
* app.c (do_scrub_chars): When in State 10, treat backslash

View File

@ -245,9 +245,11 @@ buffer_and_nest (from, to, ptr, get_line)
{
if (ptr->ptr[i] == '.')
i++;
if (strncasecmp (ptr->ptr + i, from, from_len) == 0)
if (strncasecmp (ptr->ptr + i, from, from_len) == 0
&& ! 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
&& ! isalnum (ptr->ptr[i + to_len]))
{
depth--;
if (depth == 0)