Transfer i(xx) to xxx#branch only when i is the first

character of the token or preceeded by a space.
This commit is contained in:
Holger Vogt 2022-09-23 12:58:47 +02:00
parent 92ba8ac88e
commit 56d07aab31
1 changed files with 3 additions and 1 deletions

View File

@ -631,7 +631,9 @@ gettoks(char *s)
*prevp = wl;
prevp = &wl->wl_next;
if (*(l - 1) == 'i' || *(l - 1) == 'I') {
/* Transfer i(xx) to xxx#branch only when i is the first
character of the token or preceeded by a space. */
if ((*(l - 1) == 'i' || *(l - 1) == 'I') && (l - 1 == t) || ((l > t + 1) && isspace(*(l-2)))) {
char buf[513];
sprintf(buf, "%s#branch", l + 1);
wl->wl_word = copy(buf);