The R Project SVN R

Rev

Rev 57571 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 57571 Rev 58359
Line 114... Line 114...
114
    return REG_ESPACE;
114
    return REG_ESPACE;
115
 
115
 
116
  for (i = 0; i < n; i++)
116
  for (i = 0; i < n; i++)
117
    wregex[i] = (tre_char_t) ((unsigned char) regex[i]);
117
    wregex[i] = (tre_char_t) ((unsigned char) regex[i]);
118
 
118
 
119
  ret = tre_compile(preg, wregex, n, cflags);
119
  ret = tre_compile(preg, wregex, n, cflags | REG_USEBYTES);
120
  xfree(wregex);
120
  xfree(wregex);
121
#else /* !TRE_WCHAR */
121
#else /* !TRE_WCHAR */
122
  ret = tre_compile(preg, (const tre_char_t *)regex, n, cflags);
122
  ret = tre_compile(preg, (const tre_char_t *)regex, n, cflags | REG_USEBYTES);
123
#endif /* !TRE_WCHAR */
123
#endif /* !TRE_WCHAR */
124
 
124
 
125
  return ret;
125
  return ret;
126
}
126
}
127
 
127
 
Line 147... Line 147...
147
  wstr = wregex;
147
  wstr = wregex;
148
 
148
 
149
  for (i = 0; i < n; i++) *(wstr++) = *(str++);
149
  for (i = 0; i < n; i++) *(wstr++) = *(str++);
150
  wlen = n;
150
  wlen = n;
151
  wregex[wlen] = L'\0';
151
  wregex[wlen] = L'\0';
152
  ret = tre_compile(preg, wregex, wlen, cflags);
152
  ret = tre_compile(preg, wregex, wlen, cflags | REG_USEBYTES);
153
  xfree(wregex);
153
  xfree(wregex);
154
  return ret;
154
  return ret;
155
}
155
}
156
 
156
 
157
 
157