/[pcre]/code/branches/pcre16/pcre_internal.h
ViewVC logotype

Diff of /code/branches/pcre16/pcre_internal.h

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

revision 756 by ph10, Mon Nov 21 10:48:42 2011 UTC revision 757 by ph10, Mon Nov 21 11:44:55 2011 UTC
# Line 51  functions whose names all begin with "_p Line 51  functions whose names all begin with "_p
51  #define PCRE_DEBUG  #define PCRE_DEBUG
52  #endif  #endif
53    
54  /* We do not support both EBCDIC and UTF-8 at the same time. The "configure"  /* We do not support both EBCDIC and UTF-8/16 at the same time. The "configure"
55  script prevents both being selected, but not everybody uses "configure". */  script prevents both being selected, but not everybody uses "configure". */
56    
57  #if defined EBCDIC && defined SUPPORT_UTF8  #if defined EBCDIC && (defined SUPPORT_UTF8 || defined SUPPORT_UTF16)
58  #error The use of both EBCDIC and SUPPORT_UTF8 is not supported.  #error The use of both EBCDIC and SUPPORT_UTF8/16 is not supported.
59  #endif  #endif
60    
61  /* If SUPPORT_UCP is defined, SUPPORT_UTF8 must also be defined. The  /* If SUPPORT_UCP is defined, SUPPORT_UTF8 must also be defined. The
# Line 208  by "configure". */ Line 208  by "configure". */
208    
209  /* All character handling must be done as unsigned characters. Otherwise there  /* All character handling must be done as unsigned characters. Otherwise there
210  are problems with top-bit-set characters and functions such as isspace().  are problems with top-bit-set characters and functions such as isspace().
211  However, we leave the interface to the outside world as char *, because that  However, we leave the interface to the outside world as char * or short *,
212  should make things easier for callers. */  because that should make things easier for callers. We define a short type
213    for the current character representation (either 8 or 16 bit) to save lots
214    of typing. I tried "uchar", but it causes problems on Digital Unix, where
215    it is defined in sys/types, so use "uschar" instead. */
216    
217    #ifndef COMPILE_PCRE16
218  typedef unsigned char pcre_uchar;  typedef unsigned char pcre_uchar;
219    #else
220    #if USHRT_MAX != 65535
221    /* This is a warning message. Change PCRE_SCHAR16 to a 16 bit data type in
222    pcre.h(.in) and disable (comment out) this message. */
223    #error Warning: PCRE_SCHAR16 is not a 16 bit data type.
224    #endif
225    typedef pcre_uint16 uschar;
226    #endif
227    
228    /* A 8 bit unsigned data type. */
229    typedef unsigned char pcre_uint8;
230    
231  /* This is an unsigned int value that no character can ever have. UTF-8  /* This is an unsigned int value that no character can ever have. UTF-8
232  characters only go up to 0x7fffffff (though Unicode doesn't go beyond  characters only go up to 0x7fffffff (though Unicode doesn't go beyond
# Line 270  must begin with PCRE_. */ Line 285  must begin with PCRE_. */
285  #define PCRE_PUCHAR CUSTOM_SUBJECT_PTR  #define PCRE_PUCHAR CUSTOM_SUBJECT_PTR
286  #else  #else
287  #define PCRE_PUCHAR const pcre_uchar *  #define PCRE_PUCHAR const pcre_uchar *
 #endif  
   
288    
289    /* PCRE_SPTR is defined in pcre.h. */
290    #define USPTR const uschar *
291    #endif
292    
293  /* Include the public PCRE header and the definitions of UCP character property  /* Include the public PCRE header and the definitions of UCP character property
294  values. */  values. */
# Line 1936  extern BOOL              _pcre_is_newlin Line 1952  extern BOOL              _pcre_is_newlin
1952  extern int               _pcre_ord2utf8(int, pcre_uint8 *);  extern int               _pcre_ord2utf8(int, pcre_uint8 *);
1953  extern real_pcre        *_pcre_try_flipped(const real_pcre *, real_pcre *,  extern real_pcre        *_pcre_try_flipped(const real_pcre *, real_pcre *,
1954                             const pcre_study_data *, pcre_study_data *);                             const pcre_study_data *, pcre_study_data *);
1955    #ifndef COMPILE_PCRE16
1956  extern int               _pcre_valid_utf8(PCRE_PUCHAR, int, int *);  extern int               _pcre_valid_utf8(PCRE_PUCHAR, int, int *);
1957    #else
1958    extern int               _pcre16_valid_utf16(PCRE_PUCHAR, int, int *);
1959    #endif
1960  extern BOOL              _pcre_was_newline(PCRE_PUCHAR, int, PCRE_PUCHAR,  extern BOOL              _pcre_was_newline(PCRE_PUCHAR, int, PCRE_PUCHAR,
1961                             int *, BOOL);                             int *, BOOL);
1962  extern BOOL              _pcre_xclass(int, const pcre_uchar *);  extern BOOL              _pcre_xclass(int, const pcre_uchar *);

Legend:
Removed from v.756  
changed lines
  Added in v.757

  ViewVC Help
Powered by ViewVC 1.1.5