rem: if (0 == (options & B_NO_ZWJZWNJZWJ))
add: if (!(options & B_NO_ZWJZWNJZWJ))
context: bconsole_ligature (  unichar * us,  int *retlen,  int options){  int p, q, len;  unichar lig;  enum  { NO, YES }  join;  int dir, startindex, endindex, counter, hasprev;  int zwnl = 0;  int *stoplig = 0;  int nls;  int nls_tab[5][3] = {    {0, 0, 1},    {2, 0, 1},    {2, 3, 1},    {4, 3, 1},    {4, 3, 5},  };  len = *retlen;  if (0 == (options & B_LOGICAL_OUTPUT))    {      startindex = len - 1;      endindex = 0;      dir = -1;    }  else    {      startindex = 0;      endindex = len - 1;      dir = +1;    }  for (counter = len, p = startindex, join = NO; counter; --counter, p += dir)    {      if (bjoining_isnonspacing (us[p]))	{	  nsm_shape_type *t = nsm_shape (us[p]);	  if (t)	    us[p] = join ? t->with_tatweel : t->without_tatweel;	}      else	join = join_type (us[p], 1);    }  if (0 == (options & B_NO_ZWJZWNJZWJ))    {      for (counter = len, zwnl = 0, nls = 0, p = endindex; counter;	   --counter, p -= dir)	{	  switch (us[p])	    {	    case ZWJ:	      nls = nls_tab[nls][0];	      break;	    case ZWNJ:	      nls = nls_tab[nls][1];	      break;	    default:	      nls = nls_tab[nls][2];	      break;	    }	  if (nls == 5)	    {	      if (zwnl == 0)		{		  stoplig = malloc (len * sizeof (stoplig[0]));		  memset (stoplig, 0, len * sizeof (stoplig[0]));		  zwnl = 1;		}	      stoplig[p] = 1;	      nls = 1;	    }	}    }  for (counter = len, hasprev = 0, p = q = endindex; counter;       --counter, p -= dir)    {      us[q] = us[p];      if ((0 == (options & B_NO_EXTRA_LIGATURE)) && hasprev	  && ((0 != (options & B_NO_ZWJZWNJZWJ) || !zwnl || stoplig[p] == 0))	  && (lig = ligature (us[q], us[q + dir])) != NOLIG)	{	  us[q + dir] = lig;	}      else	{	  if ((us[q] != ZWJ && us[q] != ZWNJ)	      || 0 != (options & B_KEEP_JOINING_MARKS))	    q -= dir;	}      hasprev = 1;    }  *retlen = endindex - q * dir;  if (dir == 1)    memmove (us, us + len - *retlen, *retlen * sizeof us[0]);  if (zwnl)    free (stoplig);  return 1;}