/[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 364 by ph10, Fri Jul 11 14:53:41 2008 UTC revision 384 by ph10, Sun Mar 8 16:27:43 2009 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-2008 University of Cambridge             Copyright (c) 1997-2009 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 133  PCRE_EXP_DATA_DEFN only if they are not Line 133  PCRE_EXP_DATA_DEFN only if they are not
133  #endif  #endif
134    
135  /* When compiling with the MSVC compiler, it is sometimes necessary to include  /* When compiling with the MSVC compiler, it is sometimes necessary to include
136  a "calling convention" before exported function names. (This is secondhand  a "calling convention" before exported function names. (This is secondhand
137  information; I know nothing about MSVC myself). For example, something like  information; I know nothing about MSVC myself). For example, something like
138    
139    void __cdecl function(....)    void __cdecl function(....)
140    
141  might be needed. In order so make this easy, all the exported functions have  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  PCRE_CALL_CONVENTION just before their names. It is rarely needed; if not
143  set, we ensure here that it has no effect. */  set, we ensure here that it has no effect. */
144    
145  #ifndef PCRE_CALL_CONVENTION  #ifndef PCRE_CALL_CONVENTION
146  #define PCRE_CALL_CONVENTION  #define PCRE_CALL_CONVENTION
# Line 478  if there are extra bytes. This is called Line 478  if there are extra bytes. This is called
478      len += gcaa; \      len += gcaa; \
479      }      }
480    
481    /* Get the next UTF-8 character, testing for UTF-8 mode, not advancing the
482    pointer, incrementing length if there are extra bytes. This is called when we
483    know we are in UTF-8 mode. */
484    
485    #define GETCHARLENTEST(c, eptr, len) \
486      c = *eptr; \
487      if (utf8 && c >= 0xc0) \
488        { \
489        int gcii; \
490        int gcaa = _pcre_utf8_table4[c & 0x3f];  /* Number of additional bytes */ \
491        int gcss = 6*gcaa; \
492        c = (c & _pcre_utf8_table3[gcaa]) << gcss; \
493        for (gcii = 1; gcii <= gcaa; gcii++) \
494          { \
495          gcss -= 6; \
496          c |= (eptr[gcii] & 0x3f) << gcss; \
497          } \
498        len += gcaa; \
499        }
500    
501  /* If the pointer is not at the start of a character, move it back until  /* If the pointer is not at the start of a character, move it back until
502  it is. This is called only in UTF-8 mode - we don't put a test within the macro  it is. This is called only in UTF-8 mode - we don't put a test within the macro
503  because almost all calls are already within a block of UTF-8 only code. */  because almost all calls are already within a block of UTF-8 only code. */
# Line 559  variable-length repeat, or a anything ot Line 579  variable-length repeat, or a anything ot
579  #define REQ_CASELESS 0x0100    /* indicates caselessness */  #define REQ_CASELESS 0x0100    /* indicates caselessness */
580  #define REQ_VARY     0x0200    /* reqbyte followed non-literal item */  #define REQ_VARY     0x0200    /* reqbyte followed non-literal item */
581    
582  /* Miscellaneous definitions */  /* Miscellaneous definitions. The #ifndef is to pacify compiler warnings in
583    environments where these macros are defined elsewhere. Unfortunately, there
584    is no way to do the same for the typedef. */
585    
586  typedef int BOOL;  typedef int BOOL;
587    
588    #ifndef FALSE
589  #define FALSE   0  #define FALSE   0
590  #define TRUE    1  #define TRUE    1
591    #endif
592    
593  /* Escape items that are just an encoding of a particular data value. */  /* Escape items that are just an encoding of a particular data value. */
594    

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

  ViewVC Help
Powered by ViewVC 1.1.5