View | Details | Raw Unified
Collapse All | Expand All

(-) gawk-3.1.4/dfa.c.dfacache (-3 / +14 lines)
 Lines 2871-2876    Link Here 
  if (MB_CUR_MAX > 1)
  if (MB_CUR_MAX > 1)
    {
    {
      int remain_bytes, i;
      int remain_bytes, i;
#if 0
      /*
       * This caching can get things wrong:
      printf "ab\n\tb\n" | LC_ALL=de_DE.UTF-8 ./gawk '/^[ \t]/ { print }'
       * should print \tb but doesn't
       */
      buf_begin -= buf_offset;
      buf_begin -= buf_offset;
      if (buf_begin <= (unsigned char const *)begin && (unsigned char const *) end <= buf_end) {
      if (buf_begin <= (unsigned char const *)begin && (unsigned char const *) end <= buf_end) {
	buf_offset = (unsigned char const *)begin - buf_begin;
	buf_offset = (unsigned char const *)begin - buf_begin;
 Lines 2878-2883    Link Here 
	buf_end = end;
	buf_end = end;
	goto go_fast;
	goto go_fast;
      }
      }
#endif
      buf_offset = 0;
      buf_offset = 0;
      buf_begin = begin;
      buf_begin = begin;
 Lines 2916-2922    Link Here 
      mblen_buf[i] = 0;
      mblen_buf[i] = 0;
      inputwcs[i] = 0; /* sentinel */
      inputwcs[i] = 0; /* sentinel */
    }
    }
#if 0
go_fast:
go_fast:
#endif
#endif /* MBS_SUPPORT */
#endif /* MBS_SUPPORT */
  for (;;)
  for (;;)
 Lines 2930-2936    Link Here 
            s1 = s;
            s1 = s;
	    if (d->states[s].mbps.nelem != 0)
	    if (d->states[s].mbps.nelem != 0)
	      {
	      {
		/* Can match with a multibyte character( and multi character
		/* Can match with a multibyte character (and multi character
		   collating element).  */
		   collating element).  */
		unsigned char const *nextp;
		unsigned char const *nextp;
 Lines 3668-3676    Link Here 
 done:
 done:
  if (strlen(result))
  if (strlen(result))
    {
    {
      dm = (struct dfamust *) malloc(sizeof (struct dfamust));
      MALLOC(dm, struct dfamust, 1);
      dm->exact = exact;
      dm->exact = exact;
      dm->must = malloc(strlen(result) + 1);
      MALLOC(dm->must, char, strlen(result) + 1);
      strcpy(dm->must, result);
      strcpy(dm->must, result);
      dm->next = dfa->musts;
      dm->next = dfa->musts;
      dfa->musts = dm;
      dfa->musts = dm;