/[pcre]/code/trunk/pcre_internal.h
ViewVC logotype

Diff of /code/trunk/pcre_internal.h

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

revision 1430 by ph10, Tue Dec 31 17:44:40 2013 UTC revision 1431 by ph10, Thu Jan 2 17:41:28 2014 UTC
# Line 7  Line 7 
7  and semantics are as close as possible to those of the Perl 5 language.  and semantics are as close as possible to those of the Perl 5 language.
8    
9                         Written by Philip Hazel                         Written by Philip Hazel
10             Copyright (c) 1997-2013 University of Cambridge             Copyright (c) 1997-2014 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 316  start/end of string field names are. */ Line 316  start/end of string field names are. */
316         &(NLBLOCK->nllen), utf)) \         &(NLBLOCK->nllen), utf)) \
317      : \      : \
318      ((p) <= NLBLOCK->PSEND - NLBLOCK->nllen && \      ((p) <= NLBLOCK->PSEND - NLBLOCK->nllen && \
319       *p == NLBLOCK->nl[0] && (NLBLOCK->nllen == 1 || p[1] == NLBLOCK->nl[1]) \       UCHAR21TEST(p) == NLBLOCK->nl[0] && \
320         (NLBLOCK->nllen == 1 || UCHAR21TEST(p+1) == NLBLOCK->nl[1])       \
321      ) \      ) \
322    )    )
323    
# Line 329  start/end of string field names are. */ Line 330  start/end of string field names are. */
330         &(NLBLOCK->nllen), utf)) \         &(NLBLOCK->nllen), utf)) \
331      : \      : \
332      ((p) >= NLBLOCK->PSSTART + NLBLOCK->nllen && \      ((p) >= NLBLOCK->PSSTART + NLBLOCK->nllen && \
333       *(p - NLBLOCK->nllen) == NLBLOCK->nl[0] &&              \       UCHAR21TEST(p - NLBLOCK->nllen) == NLBLOCK->nl[0] &&              \
334       (NLBLOCK->nllen == 1 || *(p - NLBLOCK->nllen + 1) == NLBLOCK->nl[1]) \       (NLBLOCK->nllen == 1 || UCHAR21TEST(p - NLBLOCK->nllen + 1) == NLBLOCK->nl[1]) \
335      ) \      ) \
336    )    )
337    
# Line 581  changed in future to be a fixed number o Line 582  changed in future to be a fixed number o
582  #define MAX_MARK ((1u << 8) - 1)  #define MAX_MARK ((1u << 8) - 1)
583  #endif  #endif
584    
585    /* There is a proposed future special "UTF-21" mode, in which only the lowest
586    21 bits of a 32-bit character are interpreted as UTF, with the remaining 11
587    high-order bits available to the application for other uses. In preparation for
588    the future implementation of this mode, there are macros that load a data item
589    and, if in this special mode, mask it to 21 bits. These macros all have names
590    starting with UCHAR21. In all other modes, including the normal 32-bit
591    library, the macros all have the same simple definitions. When the new mode is
592    implemented, it is expected that these definitions will be varied appropriately
593    using #ifdef when compiling the library that supports the special mode. */
594    
595    #define UCHAR21(eptr)        (*(eptr))
596    #define UCHAR21TEST(eptr)    (*(eptr))
597    #define UCHAR21INC(eptr)     (*(eptr)++)
598    #define UCHAR21INCTEST(eptr) (*(eptr)++)
599    
600  /* When UTF encoding is being used, a character is no longer just a single  /* When UTF encoding is being used, a character is no longer just a single
601  byte. The macros for character handling generate simple sequences when used in  byte in 8-bit mode or a single short in 16-bit mode. The macros for character
602  character-mode, and more complicated ones for UTF characters. GETCHARLENTEST  handling generate simple sequences when used in the basic mode, and more
603  and other macros are not used when UTF is not supported, so they are not  complicated ones for UTF characters. GETCHARLENTEST and other macros are not
604  defined. To make sure they can never even appear when UTF support is omitted,  used when UTF is not supported. To make sure they can never even appear when
605  we don't even define them. */  UTF support is omitted, we don't even define them. */
606    
607  #ifndef SUPPORT_UTF  #ifndef SUPPORT_UTF
608    

Legend:
Removed from v.1430  
changed lines
  Added in v.1431

  ViewVC Help
Powered by ViewVC 1.1.5