| 6 |
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. |
| 7 |
|
|
| 8 |
Written by Philip Hazel |
Written by Philip Hazel |
| 9 |
Copyright (c) 1997-2009 University of Cambridge |
Copyright (c) 1997-2012 University of Cambridge |
| 10 |
|
|
| 11 |
----------------------------------------------------------------------------- |
----------------------------------------------------------------------------- |
| 12 |
Redistribution and use in source and binary forms, with or without |
Redistribution and use in source and binary forms, with or without |
| 46 |
#include "config.h" |
#include "config.h" |
| 47 |
#endif |
#endif |
| 48 |
|
|
| 49 |
|
/* Generate code with 16 bit character support. */ |
| 50 |
|
#define COMPILE_PCRE16 |
| 51 |
|
|
| 52 |
#include "pcre_internal.h" |
#include "pcre_internal.h" |
| 53 |
|
|
| 54 |
|
|
| 83 |
int |
int |
| 84 |
PRIV(valid_utf)(PCRE_PUCHAR string, int length, int *erroroffset) |
PRIV(valid_utf)(PCRE_PUCHAR string, int length, int *erroroffset) |
| 85 |
{ |
{ |
| 86 |
#ifdef SUPPORT_UTF16 |
#ifdef SUPPORT_UTF |
| 87 |
register PCRE_PUCHAR p; |
register PCRE_PUCHAR p; |
| 88 |
register pcre_uchar c; |
register pcre_uchar c; |
| 89 |
|
|
| 135 |
} |
} |
| 136 |
} |
} |
| 137 |
|
|
| 138 |
#else /* SUPPORT_UTF16 */ |
#else /* SUPPORT_UTF */ |
| 139 |
(void)(string); /* Keep picky compilers happy */ |
(void)(string); /* Keep picky compilers happy */ |
| 140 |
(void)(length); |
(void)(length); |
| 141 |
#endif |
#endif /* SUPPORT_UTF */ |
| 142 |
|
|
| 143 |
return PCRE_UTF16_ERR0; /* This indicates success */ |
return PCRE_UTF16_ERR0; /* This indicates success */ |
| 144 |
} |
} |