Date: Sat, 7 May 2011 22:03:36 +0000 (UTC) From: Gabor Kovesdan <gabor@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r221610 - user/gabor/tre-integration/contrib/tre/lib Message-ID: <201105072203.p47M3aTf016769@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gabor Date: Sat May 7 22:03:36 2011 New Revision: 221610 URL: http://svn.freebsd.org/changeset/base/221610 Log: - Decouple header files from config.h so that they can be used individually. - Clean up Modified: user/gabor/tre-integration/contrib/tre/lib/regex.h user/gabor/tre-integration/contrib/tre/lib/tre.h Modified: user/gabor/tre-integration/contrib/tre/lib/regex.h ============================================================================== --- user/gabor/tre-integration/contrib/tre/lib/regex.h Sat May 7 21:54:49 2011 (r221609) +++ user/gabor/tre-integration/contrib/tre/lib/regex.h Sat May 7 22:03:36 2011 (r221610) @@ -15,12 +15,10 @@ #include "tre.h" -#ifndef TRE_USE_SYSTEM_REGEX_H #define regcomp tre_regcomp #define regerror tre_regerror #define regexec tre_regexec #define regfree tre_regfree -#endif /* TRE_USE_SYSTEM_REGEX_H */ #define regacomp tre_regacomp #define regaexec tre_regaexec Modified: user/gabor/tre-integration/contrib/tre/lib/tre.h ============================================================================== --- user/gabor/tre-integration/contrib/tre/lib/tre.h Sat May 7 21:54:49 2011 (r221609) +++ user/gabor/tre-integration/contrib/tre/lib/tre.h Sat May 7 22:03:36 2011 (r221610) @@ -9,60 +9,15 @@ #ifndef TRE_H #define TRE_H 1 -#include "tre-config.h" - -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif /* HAVE_SYS_TYPES_H */ -#ifdef HAVE_LIBUTF8_H -#include <libutf8.h> -#endif /* HAVE_LIBUTF8_H */ - -#ifdef TRE_USE_SYSTEM_REGEX_H -/* Include the system regex.h to make TRE ABI compatible with the - system regex. */ -#include TRE_SYSTEM_REGEX_H_PATH -#define tre_regcomp regcomp -#define tre_regexec regexec -#define tre_regerror regerror -#define tre_regfree regfree -#endif /* TRE_USE_SYSTEM_REGEX_H */ +#define TRE_WCHAR 1 +#define TRE_APPROX 1 #ifdef __cplusplus extern "C" { #endif -#ifdef TRE_USE_SYSTEM_REGEX_H - -#ifndef REG_OK -#define REG_OK 0 -#endif /* !REG_OK */ - -#ifndef HAVE_REG_ERRCODE_T -typedef int reg_errcode_t; -#endif /* !HAVE_REG_ERRCODE_T */ - -#if !defined(REG_NOSPEC) && !defined(REG_LITERAL) -#define REG_LITERAL 0x1000 -#endif - -/* Extra tre_regcomp() flags. */ -#ifndef REG_BASIC -#define REG_BASIC 0 -#endif /* !REG_BASIC */ -#define REG_RIGHT_ASSOC (REG_LITERAL << 1) -#define REG_UNGREEDY (REG_RIGHT_ASSOC << 1) - -/* Extra tre_regexec() flags. */ -#define REG_APPROX_MATCHER 0x1000 -#define REG_BACKTRACKING_MATCHER (REG_APPROX_MATCHER << 1) - -#else /* !TRE_USE_SYSTEM_REGEX_H */ - -/* If the we're not using system regex.h, we need to define the - structs and enums ourselves. */ - typedef int regoff_t; typedef struct { size_t re_nsub; /* Number of parenthesized subexpressions. */ @@ -114,8 +69,6 @@ typedef enum { #define REG_APPROX_MATCHER (REG_NOTEOL << 1) #define REG_BACKTRACKING_MATCHER (REG_APPROX_MATCHER << 1) -#endif /* !TRE_USE_SYSTEM_REGEX_H */ - /* REG_NOSPEC and REG_LITERAL mean the same thing. */ #if defined(REG_LITERAL) && !defined(REG_NOSPEC) #define REG_NOSPEC REG_LITERAL @@ -143,9 +96,7 @@ extern void tre_regfree(regex_t *preg); #ifdef TRE_WCHAR -#ifdef HAVE_WCHAR_H #include <wchar.h> -#endif /* HAVE_WCHAR_H */ /* Wide character versions (not in POSIX.2). */ extern int
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105072203.p47M3aTf016769>