/[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 349 by ph10, Wed Jul 2 18:42:11 2008 UTC revision 364 by ph10, Fri Jul 11 14:53:41 2008 UTC
# Line 132  PCRE_EXP_DATA_DEFN only if they are not Line 132  PCRE_EXP_DATA_DEFN only if they are not
132  #  endif  #  endif
133  #endif  #endif
134    
135    /* When compiling with the MSVC compiler, it is sometimes necessary to include
136    a "calling convention" before exported function names. (This is secondhand
137    information; I know nothing about MSVC myself). For example, something like
138    
139      void __cdecl function(....)
140    
141    might be needed. In order so make this easy, all the exported functions have
142    PCRE_CALL_CONVENTION just before their names. It is rarely needed; if not
143    set, we ensure here that it has no effect. */
144    
145    #ifndef PCRE_CALL_CONVENTION
146    #define PCRE_CALL_CONVENTION
147    #endif
148    
149  /* We need to have types that specify unsigned 16-bit and 32-bit integers. We  /* We need to have types that specify unsigned 16-bit and 32-bit integers. We
150  cannot determine these outside the compilation (e.g. by running a program as  cannot determine these outside the compilation (e.g. by running a program as
151  part of "configure") because PCRE is often cross-compiled for use on other  part of "configure") because PCRE is often cross-compiled for use on other
# Line 367  never be called in byte mode. To make su Line 381  never be called in byte mode. To make su
381  support is omitted, we don't even define it. */  support is omitted, we don't even define it. */
382    
383  #ifndef SUPPORT_UTF8  #ifndef SUPPORT_UTF8
 #define NEXTCHAR(p) p++;  
384  #define GETCHAR(c, eptr) c = *eptr;  #define GETCHAR(c, eptr) c = *eptr;
385  #define GETCHARTEST(c, eptr) c = *eptr;  #define GETCHARTEST(c, eptr) c = *eptr;
386  #define GETCHARINC(c, eptr) c = *eptr++;  #define GETCHARINC(c, eptr) c = *eptr++;
# Line 377  support is omitted, we don't even define Line 390  support is omitted, we don't even define
390    
391  #else   /* SUPPORT_UTF8 */  #else   /* SUPPORT_UTF8 */
392    
 /* Advance a character pointer one byte in non-UTF-8 mode and by one character  
 in UTF-8 mode. */  
   
 #define NEXTCHAR(p) \  
   p++; \  
   if (utf8) { while((*p & 0xc0) == 0x80) p++; }  
   
393  /* Get the next UTF-8 character, not advancing the pointer. This is called when  /* Get the next UTF-8 character, not advancing the pointer. This is called when
394  we know we are in UTF-8 mode. */  we know we are in UTF-8 mode. */
395    
# Line 1141  extern BOOL         _pcre_xclass(int, co Line 1147  extern BOOL         _pcre_xclass(int, co
1147  typedef struct {  typedef struct {
1148    uschar script;    uschar script;
1149    uschar chartype;    uschar chartype;
1150    pcre_int16 other_case;    pcre_int32 other_case;
1151  } ucd_record;  } ucd_record;
1152    
1153  extern const ucd_record  ucd_records[];  extern const ucd_record  _pcre_ucd_records[];
1154  extern const uschar      ucd_stage1[];  extern const uschar      _pcre_ucd_stage1[];
1155  extern const pcre_uint16 ucd_stage2[];  extern const pcre_uint16 _pcre_ucd_stage2[];
1156  extern const int ucp_gentype[];  extern const int         _pcre_ucp_gentype[];
1157    
1158    
1159  /* UCD access macros */  /* UCD access macros */
1160    
1161  #define UCD_BLOCK_SIZE 128  #define UCD_BLOCK_SIZE 128
1162  #define GET_UCD(ch) (ucd_records + ucd_stage2[ucd_stage1[(ch) / UCD_BLOCK_SIZE] * \  #define GET_UCD(ch) (_pcre_ucd_records + \
1163            _pcre_ucd_stage2[_pcre_ucd_stage1[(ch) / UCD_BLOCK_SIZE] * \
1164          UCD_BLOCK_SIZE + ch % UCD_BLOCK_SIZE])          UCD_BLOCK_SIZE + ch % UCD_BLOCK_SIZE])
1165    
1166  #define UCD_CHARTYPE(ch)  GET_UCD(ch)->chartype  #define UCD_CHARTYPE(ch)  GET_UCD(ch)->chartype
1167  #define UCD_SCRIPT(ch)    GET_UCD(ch)->script  #define UCD_SCRIPT(ch)    GET_UCD(ch)->script
1168  #define UCD_CATEGORY(ch)  ucp_gentype[UCD_CHARTYPE(ch)]  #define UCD_CATEGORY(ch)  _pcre_ucp_gentype[UCD_CHARTYPE(ch)]
1169  #define UCD_OTHERCASE(ch) (ch + GET_UCD(ch)->other_case)  #define UCD_OTHERCASE(ch) (ch + GET_UCD(ch)->other_case)
1170    
1171  #endif  #endif
1172    

Legend:
Removed from v.349  
changed lines
  Added in v.364

  ViewVC Help
Powered by ViewVC 1.1.5