Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Option bugfix



My previous option patch introduced a little bug, that the no prefix is
ignored for options.

Fix is below.

Zoltan


*** Src/options.c	1996/12/27 23:11:20	3.1.1.4
--- Src/options.c	1996/12/28 02:22:24
***************
*** 551,560 ****
  	}
  
      /* look up name in the table */
!     if (s[0] != 'n' || s[1] != 'o' ||
! 	!(n = (Optname) optiontab->getnode(optiontab, s + 2)))
! 	n = (Optname) optiontab->getnode(optiontab, s);
!     if(n)
  	return n->flags & OPT_ALIAS ? optlookup(n->u.text) : n->u.optno;
      else
  	return 0;
--- 551,560 ----
  	}
  
      /* look up name in the table */
!     if (s[0] == 'n' && s[1] == 'o' &&
! 	(n = (Optname) optiontab->getnode(optiontab, s + 2))) {
! 	return n->flags & OPT_ALIAS ? -optlookup(n->u.text) : -n->u.optno;
!     } else if ((n = (Optname) optiontab->getnode(optiontab, s)))
  	return n->flags & OPT_ALIAS ? optlookup(n->u.text) : n->u.optno;
      else
  	return 0;



Messages sorted by: Reverse Date, Date, Thread, Author