/[pcre]/code/trunk/doc/pcreprecompile.3
ViewVC logotype

Diff of /code/trunk/doc/pcreprecompile.3

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

revision 75 by nigel, Sat Feb 24 21:40:37 2007 UTC revision 99 by ph10, Tue Mar 6 12:27:42 2007 UTC
# Line 1  Line 1 
1  .TH PCRE 3  .TH PCREPRECOMPILE 3
2  .SH NAME  .SH NAME
3  PCRE - Perl-compatible regular expressions  PCRE - Perl-compatible regular expressions
4  .SH "SAVING AND RE-USING PRECOMPILED PCRE PATTERNS"  .SH "SAVING AND RE-USING PRECOMPILED PCRE PATTERNS"
# Line 79  return a non-NULL value before trying to Line 79  return a non-NULL value before trying to
79  .rs  .rs
80  .sp  .sp
81  Re-using a precompiled pattern is straightforward. Having reloaded it into main  Re-using a precompiled pattern is straightforward. Having reloaded it into main
82  memory, you pass its pointer to \fBpcre_exec()\fP in the usual way. This should  memory, you pass its pointer to \fBpcre_exec()\fP or \fBpcre_dfa_exec()\fP in
83  work even on another host, and even if that host has the opposite endianness to  the usual way. This should work even on another host, and even if that host has
84  the one where the pattern was compiled.  the opposite endianness to the one where the pattern was compiled.
85  .P  .P
86  However, if you passed a pointer to custom character tables when the pattern  However, if you passed a pointer to custom character tables when the pattern
87  was compiled (the \fItableptr\fP argument of \fBpcre_compile()\fP), you must  was compiled (the \fItableptr\fP argument of \fBpcre_compile()\fP), you must
88  now pass a similar pointer to \fBpcre_exec()\fP, because the value saved with  now pass a similar pointer to \fBpcre_exec()\fP or \fBpcre_dfa_exec()\fP,
89  the compiled pattern will obviously be nonsense. A field in a  because the value saved with the compiled pattern will obviously be nonsense. A
90  \fBpcre_extra()\fP block is used to pass this data, as described in the  field in a \fBpcre_extra()\fP block is used to pass this data, as described in
91    the
92  .\" HTML <a href="pcreapi.html#extradata">  .\" HTML <a href="pcreapi.html#extradata">
93  .\" </a>  .\" </a>
94  section on matching a pattern  section on matching a pattern
# Line 107  If you saved study data with the compile Line 108  If you saved study data with the compile
108  \fBpcre_extra\fP data block and set the \fIstudy_data\fP field to point to the  \fBpcre_extra\fP data block and set the \fIstudy_data\fP field to point to the
109  reloaded study data. You must also set the PCRE_EXTRA_STUDY_DATA bit in the  reloaded study data. You must also set the PCRE_EXTRA_STUDY_DATA bit in the
110  \fIflags\fP field to indicate that study data is present. Then pass the  \fIflags\fP field to indicate that study data is present. Then pass the
111  \fBpcre_extra\fP block to \fBpcre_exec()\fP in the usual way.  \fBpcre_extra\fP block to \fBpcre_exec()\fP or \fBpcre_dfa_exec()\fP in the
112    usual way.
113  .  .
114  .  .
115  .SH "COMPATIBILITY WITH DIFFERENT PCRE RELEASES"  .SH "COMPATIBILITY WITH DIFFERENT PCRE RELEASES"
# Line 116  reloaded study data. You must also set t Line 118  reloaded study data. You must also set t
118  The layout of the control block that is at the start of the data that makes up  The layout of the control block that is at the start of the data that makes up
119  a compiled pattern was changed for release 5.0. If you have any saved patterns  a compiled pattern was changed for release 5.0. If you have any saved patterns
120  that were compiled with previous releases (not a facility that was previously  that were compiled with previous releases (not a facility that was previously
121  advertised), you will have to recompile them for release 5.0. However, from now  advertised), you will have to recompile them for release 5.0 and above.
 on, it should be possible to make changes in a compabible manner.  
122  .P  .P
123  .in 0  If you have any saved patterns in UTF-8 mode that use \ep or \eP that were
124  Last updated: 10 September 2004  compiled with any release up to and including 6.4, you will have to recompile
125  .br  them for release 6.5 and above.
126  Copyright (c) 1997-2004 University of Cambridge.  .P
127    All saved patterns from earlier releases must be recompiled for release 7.0 or
128    higher, because there was an internal reorganization at that release.
129    .
130    .
131    .
132    .SH AUTHOR
133    .rs
134    .sp
135    .nf
136    Philip Hazel
137    University Computing Service
138    Cambridge CB2 3QH, England.
139    .fi
140    .
141    .
142    .SH REVISION
143    .rs
144    .sp
145    .nf
146    Last updated: 06 March 2007
147    Copyright (c) 1997-2007 University of Cambridge.
148    .fi

Legend:
Removed from v.75  
changed lines
  Added in v.99

  ViewVC Help
Powered by ViewVC 1.1.5