From owner-svn-src-user@FreeBSD.ORG Thu Jun 2 14:03:12 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1421106566B; Thu, 2 Jun 2011 14:03:12 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78CA28FC0C; Thu, 2 Jun 2011 14:03:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p52E3CPb020292; Thu, 2 Jun 2011 14:03:12 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p52E3CGL020289; Thu, 2 Jun 2011 14:03:12 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201106021403.p52E3CGL020289@svn.freebsd.org> From: Gabor Kovesdan Date: Thu, 2 Jun 2011 14:03:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222609 - in user/gabor/tre-integration: contrib/tre/lib include X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jun 2011 14:03:12 -0000 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)