/[pcre]/code/trunk/pcre_dfa_exec.c
ViewVC logotype

Diff of /code/trunk/pcre_dfa_exec.c

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

revision 579 by ph10, Wed Nov 24 17:39:25 2010 UTC revision 598 by ph10, Sat May 7 15:37:31 2011 UTC
# Line 7  and semantics are as close as possible t Line 7  and semantics are as close as possible t
7  below for why this module is different).  below for why this module is different).
8    
9                         Written by Philip Hazel                         Written by Philip Hazel
10             Copyright (c) 1997-2010 University of Cambridge             Copyright (c) 1997-2011 University of Cambridge
11    
12  -----------------------------------------------------------------------------  -----------------------------------------------------------------------------
13  Redistribution and use in source and binary forms, with or without  Redistribution and use in source and binary forms, with or without
# Line 2963  back the character offset. */ Line 2963  back the character offset. */
2963  #ifdef SUPPORT_UTF8  #ifdef SUPPORT_UTF8
2964  if (utf8 && (options & PCRE_NO_UTF8_CHECK) == 0)  if (utf8 && (options & PCRE_NO_UTF8_CHECK) == 0)
2965    {    {
2966    int tb;    int errorcode;
2967    if ((tb = _pcre_valid_utf8((uschar *)subject, length)) >= 0)    int tb = _pcre_valid_utf8((uschar *)subject, length, &errorcode);
2968      return (tb == length && (options & PCRE_PARTIAL_HARD) != 0)?    if (tb >= 0)
2969        {
2970        if (offsetcount >= 2)
2971          {
2972          offsets[0] = tb;
2973          offsets[1] = errorcode;
2974          }
2975        return (errorcode <= PCRE_UTF8_ERR5 && (options & PCRE_PARTIAL_HARD) != 0)?
2976        PCRE_ERROR_SHORTUTF8 : PCRE_ERROR_BADUTF8;        PCRE_ERROR_SHORTUTF8 : PCRE_ERROR_BADUTF8;
2977        }
2978    if (start_offset > 0 && start_offset < length)    if (start_offset > 0 && start_offset < length)
2979      {      {
2980      tb = ((USPTR)subject)[start_offset] & 0xc0;      tb = ((USPTR)subject)[start_offset] & 0xc0;

Legend:
Removed from v.579  
changed lines
  Added in v.598

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12