/[pcre]/code/branches/pcre16/pcre_valid_utf8.c
ViewVC logotype

Diff of /code/branches/pcre16/pcre_valid_utf8.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 763 by ph10, Mon Nov 21 10:48:42 2011 UTC revision 764 by zherczeg, Wed Nov 23 17:23:20 2011 UTC
# Line 103  Returns:       = 0    if the string is a Line 103  Returns:       = 0    if the string is a
103  */  */
104    
105  int  int
106  _pcre_valid_utf8(PCRE_PUCHAR string, int length, int *erroroffset)  PRIV(valid_utf8)(PCRE_PUCHAR string, int length, int *erroroffset)
107  {  {
108  #ifdef SUPPORT_UTF8  #ifdef SUPPORT_UTF8
109  register PCRE_PUCHAR p;  register PCRE_PUCHAR p;
# Line 133  for (p = string; length-- > 0; p++) Line 133  for (p = string; length-- > 0; p++)
133      return PCRE_UTF8_ERR21;      return PCRE_UTF8_ERR21;
134      }      }
135    
136    ab = _pcre_utf8_table4[c & 0x3f];     /* Number of additional bytes */    ab = PRIV(utf8_table4)[c & 0x3f];     /* Number of additional bytes */
137    if (length < ab)    if (length < ab)
138      {      {
139      *erroroffset = p - string;          /* Missing bytes */      *erroroffset = p - string;          /* Missing bytes */

Legend:
Removed from v.763  
changed lines
  Added in v.764

  ViewVC Help
Powered by ViewVC 1.1.5