12 |
|
|
13 |
Written by: Philip Hazel <ph10@cam.ac.uk> |
Written by: Philip Hazel <ph10@cam.ac.uk> |
14 |
|
|
15 |
Copyright (c) 1998 University of Cambridge |
Copyright (c) 1997-1999 University of Cambridge |
16 |
|
|
17 |
----------------------------------------------------------------------------- |
----------------------------------------------------------------------------- |
18 |
Permission is granted to anyone to use this software for any purpose on any |
Permission is granted to anyone to use this software for any purpose on any |
28 |
|
|
29 |
3. Altered versions must be plainly marked as such, and must not be |
3. Altered versions must be plainly marked as such, and must not be |
30 |
misrepresented as being the original software. |
misrepresented as being the original software. |
31 |
|
|
32 |
|
4. If PCRE is embedded in any software that is released under the GNU |
33 |
|
General Purpose Licence (GPL), then the terms of that licence shall |
34 |
|
supersede any condition above with which it is incompatible. |
35 |
----------------------------------------------------------------------------- |
----------------------------------------------------------------------------- |
36 |
*/ |
*/ |
37 |
|
|
195 |
if ((cflags & REG_ICASE) != 0) options |= PCRE_CASELESS; |
if ((cflags & REG_ICASE) != 0) options |= PCRE_CASELESS; |
196 |
if ((cflags & REG_NEWLINE) != 0) options |= PCRE_MULTILINE; |
if ((cflags & REG_NEWLINE) != 0) options |= PCRE_MULTILINE; |
197 |
|
|
198 |
preg->re_pcre = pcre_compile(pattern, options, &errorptr, &erroffset); |
preg->re_pcre = pcre_compile(pattern, options, &errorptr, &erroffset, NULL); |
199 |
preg->re_erroffset = erroffset; |
preg->re_erroffset = erroffset; |
200 |
|
|
201 |
if (preg->re_pcre == NULL) return pcre_posix_error_code(errorptr); |
if (preg->re_pcre == NULL) return pcre_posix_error_code(errorptr); |