[Pcre-svn] [1113] code/trunk: pcre32: Rename new values to p…

Top Page
Delete this message
Author: Subversion repository
Date:  
To: pcre-svn
Subject: [Pcre-svn] [1113] code/trunk: pcre32: Rename new values to pcre32_fullinfo
Revision: 1113
          http://vcs.pcre.org/viewvc?view=rev&revision=1113
Author:   chpe
Date:     2012-10-16 16:57:12 +0100 (Tue, 16 Oct 2012)


Log Message:
-----------
pcre32: Rename new values to pcre32_fullinfo

Rename to PCRE_INFO_FIRSTCHARACTER[FLAGS] (unfortunately
PCRE_INFO_FIRSTCHAR was already taken) and
PCRE_INFO_REQUIREDCHAR[FLAGS].

Modified Paths:
--------------
    code/trunk/doc/pcre_fullinfo.3
    code/trunk/doc/pcreapi.3
    code/trunk/pcre.h.in
    code/trunk/pcre_fullinfo.c
    code/trunk/pcretest.c


Modified: code/trunk/doc/pcre_fullinfo.3
===================================================================
--- code/trunk/doc/pcre_fullinfo.3    2012-10-16 15:57:09 UTC (rev 1112)
+++ code/trunk/doc/pcre_fullinfo.3    2012-10-16 15:57:12 UTC (rev 1113)
@@ -53,16 +53,16 @@
   PCRE_INFO_OPTIONS         Option bits used for compilation
   PCRE_INFO_SIZE            Size of compiled pattern
   PCRE_INFO_STUDYSIZE       Size of study data
-  PCRE_INFO_FIRSTLITERAL    Literal first data character for a match (if any; else 0)
-  PCRE_INFO_FIRSTLITERALSET Returns
-                              1 if there is a first data character set, which can
-                                then be retrieved using PCRE_INFO_FIRSTLITERAL,
-                              2 if the first character is at the start of the data
-                                string or after a newline, and
-                              0 otherwise
-  PCRE_INFO_LASTLITERAL2    Literal last data character required (if any; else 0)
-  PCRE_INFO_LASTLITERAL2SET Returns 1 if the last data character is set (which can then
-                              be retrieved using PCRE_INFO_LASTLITERAL2); 0 otherwise
+  PCRE_INFO_FIRSTCHARACTER      Fixed first data unit for a match
+  PCRE_INFO_FIRSTCHARACTERFLAGS Returns
+                                  1 if there is a first data character set, which can
+                                    then be retrieved using PCRE_INFO_FIRSTCHARACTER,
+                                  2 if the first character is at the start of the data
+                                    string or after a newline, and
+                                  0 otherwise
+  PCRE_INFO_REQUIREDCHAR      Literal last data unit required
+  PCRE_INFO_REQUIREDCHARFLAGS Returns 1 if the last data character is set (which can then
+                              be retrieved using PCRE_INFO_REQUIREDCHAR); 0 otherwise
 .sp
 The \fIwhere\fP argument must point to an integer variable, except for the
 following \fIwhat\fP values:
@@ -74,8 +74,8 @@
   PCRE_INFO_NAMETABLE       const unsigned char * (8-bit library)
   PCRE_INFO_OPTIONS         unsigned long int
   PCRE_INFO_SIZE            size_t
-  PCRE_INFO_FIRSTLITERAL    uint32_t
-  PCRE_INOF_LASTLITERAL2    uint32_t
+  PCRE_INFO_FIRSTCHARACTER  uint32_t
+  PCRE_INFO_REQUIREDCHAR    uint32_t
 .sp
 The yield of the function is zero on success or:
 .sp


Modified: code/trunk/doc/pcreapi.3
===================================================================
--- code/trunk/doc/pcreapi.3    2012-10-16 15:57:09 UTC (rev 1112)
+++ code/trunk/doc/pcreapi.3    2012-10-16 15:57:12 UTC (rev 1113)
@@ -1238,7 +1238,7 @@
 .P
 Since for the 32-bit library using the non-UTF-32 mode, this function is unable
 to return the full 32-bit range of the character, this value is deprecated;
-instead the PCRE_INFO_FIRSTLITERALSET and PCRE_INFO_FIRSTLITERAL values should
+instead the PCRE_INFO_FIRSTCHARACTERFLAGS and PCRE_INFO_FIRSTCHARACTER values should
 be used.
 .sp
   PCRE_INFO_FIRSTTABLE
@@ -1290,7 +1290,7 @@
 .P
 Since for the 32-bit library using the non-UTF-32 mode, this function is unable
 to return the full 32-bit range of the character, this value is deprecated;
-instead the PCRE_INFO_LASTLITERAL2SET and PCRE_INFO_LASTLITERAL2 values should
+instead the PCRE_INFO_REQUIREDCHARFLAGS and PCRE_INFO_REQUIREDCHAR values should
 be used.
 .sp
   PCRE_INFO_MAXLOOKBEHIND
@@ -1436,7 +1436,7 @@
 .\"
 documentation for details).
 .sp
-  PCRE_INFO_FIRSTLITERALSET
+  PCRE_INFO_FIRSTCHARACTERFLAGS
 .sp
 Return information about the first data unit of any matched string, for a
 non-anchored pattern. The fourth argument should point to an \fBint\fP
@@ -1444,7 +1444,7 @@
 .P
 If there is a fixed first value, for example, the letter "c" from a pattern
 such as (cat|cow|coyote), 1 is returned, and the character value can be
-retrieved using PCRE_INFO_FIRSTLITERAL.
+retrieved using PCRE_INFO_FIRSTCHARACTER.
 .P
 If there is no fixed first value, and if either
 .sp
@@ -1458,9 +1458,9 @@
 subject string or after any newline within the string. Otherwise 0 is
 returned. For anchored patterns, 0 is returned.
 .sp
-  PCRE_INFO_FIRSTLITERAL
+  PCRE_INFO_FIRSTCHARACTER
 .sp
-Return the fixed first character value, if PCRE_INFO_FIRSTLITERALSET returned 1;
+Return the fixed first character value, if PCRE_INFO_FIRSTCHARACTERFLAGS returned 1;
 otherwise returns 0. The fourth argument should point to an \fBuint_t\fP
 variable.
 .P
@@ -1480,19 +1480,19 @@
 subject string or after any newline within the string. Otherwise -2 is
 returned. For anchored patterns, -2 is returned.
 .sp
-  PCRE_INFO_LASTLITERAL2SET
+  PCRE_INFO_REQUIREDCHARFLAGS
 .sp
 Returns 1 if there is a rightmost literal data unit that must exist in any matched
 string, other than at its start. The fourth argument should  point to an \fBint\fP
 variable. If there is no such value, 0 is returned. If returning 1, the character
-value itself can be retrieved using PCRE_INFO_LASTLITERAL2.
+value itself can be retrieved using PCRE_INFO_REQUIREDCHAR.
 .P
 For anchored patterns, a last literal value is recorded only if it follows something
 of variable length. For example, for the pattern /^a\ed+z\ed+/ the returned value
-1 (with "z" returned from PCRE_INFO_LASTLITERAL2), but for /^a\edz\ed/ the returned
+1 (with "z" returned from PCRE_INFO_REQUIREDCHAR), but for /^a\edz\ed/ the returned
 value is 0.
 .sp
-  PCRE_INFO_LASTLITERAL2
+  PCRE_INFO_REQUIREDCHAR
 .sp
 Return the value of the rightmost literal data unit that must exist in any
 matched string, other than at its start, if such a value has been recorded. The


Modified: code/trunk/pcre.h.in
===================================================================
--- code/trunk/pcre.h.in    2012-10-16 15:57:09 UTC (rev 1112)
+++ code/trunk/pcre.h.in    2012-10-16 15:57:12 UTC (rev 1113)
@@ -247,10 +247,10 @@
 #define PCRE_INFO_JIT               16
 #define PCRE_INFO_JITSIZE           17
 #define PCRE_INFO_MAXLOOKBEHIND     18
-#define PCRE_INFO_FIRSTLITERAL      19
-#define PCRE_INFO_FIRSTLITERALSET   20
-#define PCRE_INFO_LASTLITERAL2      21
-#define PCRE_INFO_LASTLITERAL2SET   22
+#define PCRE_INFO_FIRSTCHARACTER      19
+#define PCRE_INFO_FIRSTCHARACTERFLAGS   20
+#define PCRE_INFO_REQUIREDCHAR      21
+#define PCRE_INFO_REQUIREDCHARFLAGS   22


/* Request types for pcre_config(). Do not re-arrange, in order to remain
compatible. */

Modified: code/trunk/pcre_fullinfo.c
===================================================================
--- code/trunk/pcre_fullinfo.c    2012-10-16 15:57:09 UTC (rev 1112)
+++ code/trunk/pcre_fullinfo.c    2012-10-16 15:57:12 UTC (rev 1113)
@@ -140,12 +140,12 @@
     ((re->flags & PCRE_STARTLINE) != 0)? -1 : -2;
   break;


-  case PCRE_INFO_FIRSTLITERAL:
+  case PCRE_INFO_FIRSTCHARACTER:
     *((pcre_uint32 *)where) =
       (re->flags & PCRE_FIRSTSET) != 0 ? re->first_char : 0;
     break;


-  case PCRE_INFO_FIRSTLITERALSET:
+  case PCRE_INFO_FIRSTCHARACTERFLAGS:
     *((int *)where) =
       ((re->flags & PCRE_FIRSTSET) != 0) ? 1 :
       ((re->flags & PCRE_STARTLINE) != 0) ? 2 : 0;
@@ -177,12 +177,12 @@
     ((re->flags & PCRE_REQCHSET) != 0)? re->req_char : -1;
   break;


-  case PCRE_INFO_LASTLITERAL2:
+  case PCRE_INFO_REQUIREDCHAR:
     *((pcre_uint32 *)where) =
       ((re->flags & PCRE_REQCHSET) != 0) ? re->req_char : 0;
     break;


-  case PCRE_INFO_LASTLITERAL2SET:
+  case PCRE_INFO_REQUIREDCHARFLAGS:
     *((int *)where) =
       ((re->flags & PCRE_REQCHSET) != 0);
     break;


Modified: code/trunk/pcretest.c
===================================================================
--- code/trunk/pcretest.c    2012-10-16 15:57:09 UTC (rev 1112)
+++ code/trunk/pcretest.c    2012-10-16 15:57:12 UTC (rev 1113)
@@ -3772,10 +3772,10 @@
       if (new_info(re, NULL, PCRE_INFO_SIZE, &size) +
           new_info(re, NULL, PCRE_INFO_CAPTURECOUNT, &count) +
           new_info(re, NULL, PCRE_INFO_BACKREFMAX, &backrefmax) +
-          new_info(re, NULL, PCRE_INFO_FIRSTLITERAL, &first_char) +
-          new_info(re, NULL, PCRE_INFO_FIRSTLITERALSET, &first_char_set) +
-          new_info(re, NULL, PCRE_INFO_LASTLITERAL2, &need_char) +
-          new_info(re, NULL, PCRE_INFO_LASTLITERAL2SET, &need_char_set) +
+          new_info(re, NULL, PCRE_INFO_FIRSTCHARACTER, &first_char) +
+          new_info(re, NULL, PCRE_INFO_FIRSTCHARACTERFLAGS, &first_char_set) +
+          new_info(re, NULL, PCRE_INFO_REQUIREDCHAR, &need_char) +
+          new_info(re, NULL, PCRE_INFO_REQUIREDCHARFLAGS, &need_char_set) +
           new_info(re, NULL, PCRE_INFO_NAMEENTRYSIZE, &nameentrysize) +
           new_info(re, NULL, PCRE_INFO_NAMECOUNT, &namecount) +
           new_info(re, NULL, PCRE_INFO_NAMETABLE, (void *)&nametable) +