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-2007 University of Cambridge |
Copyright (c) 1997-2008 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 |
43 |
|
|
44 |
|
|
45 |
#ifdef HAVE_CONFIG_H |
#ifdef HAVE_CONFIG_H |
46 |
#include <config.h> |
#include "config.h" |
47 |
#endif |
#endif |
48 |
|
|
49 |
#include "pcre_internal.h" |
#include "pcre_internal.h" |
62 |
Originally, this function checked according to RFC 2279, allowing for values in |
Originally, this function checked according to RFC 2279, allowing for values in |
63 |
the range 0 to 0x7fffffff, up to 6 bytes long, but ensuring that they were in |
the range 0 to 0x7fffffff, up to 6 bytes long, but ensuring that they were in |
64 |
the canonical format. Once somebody had pointed out RFC 3629 to me (it |
the canonical format. Once somebody had pointed out RFC 3629 to me (it |
65 |
obsoletes 2279), additional restrictions were applies. The values are now |
obsoletes 2279), additional restrictions were applied. The values are now |
66 |
limited to be between 0 and 0x0010ffff, no more than 4 bytes long, and the |
limited to be between 0 and 0x0010ffff, no more than 4 bytes long, and the |
67 |
subrange 0xd000 to 0xdfff is excluded. |
subrange 0xd000 to 0xdfff is excluded. |
68 |
|
|
154 |
if ((*(++p) & 0xc0) != 0x80) return p - string; |
if ((*(++p) & 0xc0) != 0x80) return p - string; |
155 |
} |
} |
156 |
} |
} |
157 |
|
#else |
158 |
|
(void)(string); /* Keep picky compilers happy */ |
159 |
|
(void)(length); |
160 |
#endif |
#endif |
161 |
|
|
162 |
return -1; |
return -1; |