Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Jun 2011 14:03:12 +0000 (UTC)
From:      Gabor Kovesdan <gabor@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r222609 - in user/gabor/tre-integration: contrib/tre/lib include
Message-ID:  <201106021403.p52E3CGL020289@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gabor
Date: Thu Jun  2 14:03:12 2011
New Revision: 222609
URL: http://svn.freebsd.org/changeset/base/222609

Log:
  - Add missing regex_t member for REG_PEND
  - REG_PEND is not applicable to regwexec
  - Fix macro definition of REG_STARTEND

Modified:
  user/gabor/tre-integration/contrib/tre/lib/regcomp.c
  user/gabor/tre-integration/include/tre.h

Modified: user/gabor/tre-integration/contrib/tre/lib/regcomp.c
==============================================================================
--- user/gabor/tre-integration/contrib/tre/lib/regcomp.c	Thu Jun  2 14:00:31 2011	(r222608)
+++ user/gabor/tre-integration/contrib/tre/lib/regcomp.c	Thu Jun  2 14:03:12 2011	(r222609)
@@ -127,17 +127,6 @@ tre_regwncomp(regex_t *preg, const wchar
 int
 tre_regwcomp(regex_t *preg, const wchar_t *regex, int cflags)
 {
- size_t len;
-
- if (cflags & REG_PEND)
-   {
-     if (preg->re_endp >= regex)
-       len = preg->re_endp - regex;
-     else
-       len = 0;
-     return tre_compilepreg, regex, len, cflags);
-   }
-  else
     return tre_compile(preg, regex, regex ? wcslen(regex) : 0, cflags);
 }
 #endif /* TRE_WCHAR */

Modified: user/gabor/tre-integration/include/tre.h
==============================================================================
--- user/gabor/tre-integration/include/tre.h	Thu Jun  2 14:00:31 2011	(r222608)
+++ user/gabor/tre-integration/include/tre.h	Thu Jun  2 14:03:12 2011	(r222609)
@@ -22,6 +22,7 @@ typedef int regoff_t;
 typedef struct {
   size_t re_nsub;  /* Number of parenthesized subexpressions. */
   void *value;	   /* For internal use only. */
+  const char *re_endp;
 } regex_t;
 
 typedef struct {
@@ -60,15 +61,16 @@ typedef enum {
 #define REG_LITERAL	(REG_NOSUB << 1)
 #define REG_RIGHT_ASSOC (REG_LITERAL << 1)
 #define REG_UNGREEDY    (REG_RIGHT_ASSOC << 1)
+#define REG_PEND	(REG_UNGREEDY << 1)
 
 /* POSIX tre_regexec() flags. */
 #define REG_NOTBOL 1
 #define REG_NOTEOL (REG_NOTBOL << 1)
-#define REG_STARTEND (REG_NOTEOL << 1)
 
 /* Extra tre_regexec() flags. */
 #define REG_APPROX_MATCHER	 (REG_NOTEOL << 1)
 #define REG_BACKTRACKING_MATCHER (REG_APPROX_MATCHER << 1)
+#define REG_STARTEND		 (REG_BACKTRACKING_MATCHER << 1)
 
 /* REG_NOSPEC and REG_LITERAL mean the same thing. */
 #if defined(REG_LITERAL) && !defined(REG_NOSPEC)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106021403.p52E3CGL020289>