[Pcre-svn] [444] code/trunk: Make startoffset a synonym of o…

Top Page
Delete this message
Author: Subversion repository
Date:  
To: pcre-svn
Subject: [Pcre-svn] [444] code/trunk: Make startoffset a synonym of offset in pcre2test.
Revision: 444
          http://www.exim.org/viewvc/pcre2?view=rev&revision=444
Author:   ph10
Date:     2015-11-21 16:10:24 +0000 (Sat, 21 Nov 2015)
Log Message:
-----------
Make startoffset a synonym of offset in pcre2test.


Modified Paths:
--------------
    code/trunk/ChangeLog
    code/trunk/doc/pcre2test.1
    code/trunk/src/pcre2test.c
    code/trunk/testdata/testinput2
    code/trunk/testdata/testoutput2


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2015-11-20 16:55:36 UTC (rev 443)
+++ code/trunk/ChangeLog    2015-11-21 16:10:24 UTC (rev 444)
@@ -327,7 +327,10 @@
 turned into Unicode properties), wide characters were not correctly handled, 
 and could fail to match.


+98. In pcre2test, make the "startoffset" modifier a synonym of "offset",
+because it sets the "startoffset" parameter for pcre2_match().

+
Version 10.20 30-June-2015
--------------------------


Modified: code/trunk/doc/pcre2test.1
===================================================================
--- code/trunk/doc/pcre2test.1    2015-11-20 16:55:36 UTC (rev 443)
+++ code/trunk/doc/pcre2test.1    2015-11-21 16:10:24 UTC (rev 444)
@@ -1,4 +1,4 @@
-.TH PCRE2TEST 1 "14 November 2015" "PCRE 10.21"
+.TH PCRE2TEST 1 "21 November 2015" "PCRE 10.21"
 .SH NAME
 pcre2test - a program for testing Perl-compatible regular expressions.
 .SH SYNOPSIS
@@ -959,6 +959,7 @@
       recursion_limit=<n>       set a recursion limit
       replace=<string>          specify a replacement string
       startchar                 show startchar when relevant
+      startoffset=<n>           same as offset=<n>
       zero_terminate            pass the subject as zero-terminated
 .sp
 The effects of these modifiers are described in the following sections.
@@ -1609,6 +1610,6 @@
 .rs
 .sp
 .nf
-Last updated: 14 November 2015
+Last updated: 21 November 2015
 Copyright (c) 1997-2015 University of Cambridge.
 .fi


Modified: code/trunk/src/pcre2test.c
===================================================================
--- code/trunk/src/pcre2test.c    2015-11-20 16:55:36 UTC (rev 443)
+++ code/trunk/src/pcre2test.c    2015-11-21 16:10:24 UTC (rev 444)
@@ -572,6 +572,7 @@
   { "replace",             MOD_PND,  MOD_STR, REPLACE_MODSIZE,           PO(replacement) },
   { "stackguard",          MOD_PAT,  MOD_INT, 0,                         PO(stackguard_test) },
   { "startchar",           MOD_PND,  MOD_CTL, CTL_STARTCHAR,             PO(control) },
+  { "startoffset",         MOD_DAT,  MOD_INT, 0,                         DO(offset) },
   { "substitute_extended", MOD_PAT,  MOD_CTL, CTL_SUBSTITUTE_EXTENDED,   PO(control) },
   { "tables",              MOD_PAT,  MOD_INT, 0,                         PO(tables_id) },
   { "ucp",                 MOD_PATP, MOD_OPT, PCRE2_UCP,                 PO(options) },


Modified: code/trunk/testdata/testinput2
===================================================================
--- code/trunk/testdata/testinput2    2015-11-20 16:55:36 UTC (rev 443)
+++ code/trunk/testdata/testinput2    2015-11-21 16:10:24 UTC (rev 444)
@@ -1328,7 +1328,7 @@
   ab cd\=offset=1


/\b.*/Is
- ab cd\=offset=1
+ ab cd\=startoffset=1

/(?!.bcd).*/I
Xbcd12345

Modified: code/trunk/testdata/testoutput2
===================================================================
--- code/trunk/testdata/testoutput2    2015-11-20 16:55:36 UTC (rev 443)
+++ code/trunk/testdata/testoutput2    2015-11-21 16:10:24 UTC (rev 444)
@@ -5181,7 +5181,7 @@
 May match empty string
 Options: dotall
 Subject length lower bound = 0
-  ab cd\=offset=1
+  ab cd\=startoffset=1
  0:  cd


/(?!.bcd).*/I