always use pcre for matching
authorGabor Liptak <gliptak@gmail.com>
Thu, 4 Apr 2002 00:36:36 +0000 (00:36 +0000)
committerGabor Liptak <gliptak@gmail.com>
Thu, 4 Apr 2002 00:36:36 +0000 (00:36 +0000)
GNUmakefile.in
acconfig.h
cgisimple.c
config.h.win
config.h.win32threads.win
configure.in
project.h
urlmatch.c
w32log.c

index 37c8694..5da6a33 100644 (file)
@@ -1,6 +1,6 @@
 # Note:  Makefile is built automatically from Makefile.in
 #
 # Note:  Makefile is built automatically from Makefile.in
 #
-# $Id: GNUmakefile.in,v 1.55 2002/04/03 19:54:29 swa Exp $
+# $Id: GNUmakefile.in,v 1.56 2002/04/03 22:28:03 gliptak Exp $
 #
 # Written by and Copyright (C) 2001 the SourceForge
 # Privoxy team. http://www.privoxy.org/
 #
 # Written by and Copyright (C) 2001 the SourceForge
 # Privoxy team. http://www.privoxy.org/
@@ -150,10 +150,9 @@ PCRE_SRC     = @STATIC_PCRE_ONLY@pcre/get.c pcre/maketables.c pcre/study.c pcre/
 PCRE_OBJS    = @STATIC_PCRE_ONLY@$(PCRE_SRC:.c=.@OBJEXT@)
 PCRE_HDRS    = @STATIC_PCRE_ONLY@pcre/config.h pcre/chartables.c pcre/internal.h pcre/pcre.h
 
 PCRE_OBJS    = @STATIC_PCRE_ONLY@$(PCRE_SRC:.c=.@OBJEXT@)
 PCRE_HDRS    = @STATIC_PCRE_ONLY@pcre/config.h pcre/chartables.c pcre/internal.h pcre/pcre.h
 
-# No REGEX (Either because dynamically linked pcreposix, or no regex at all):
+# No REGEX (maybe because dynamically linked pcreposix):
 REGEX_SRC    =
 REGEX_SRC    =
-# PCRE REGEX:
-@PCRE_REGEX_ONLY@@STATIC_PCRE_ONLY@REGEX_SRC = pcre/pcreposix.c
+@STATIC_PCRE_ONLY@REGEX_SRC = pcre/pcreposix.c
 
 REGEX_OBJS   = $(REGEX_SRC:.c=.@OBJEXT@)
 REGEX_HDRS   = $(REGEX_SRC:.c=.h)
 
 REGEX_OBJS   = $(REGEX_SRC:.c=.@OBJEXT@)
 REGEX_HDRS   = $(REGEX_SRC:.c=.h)
@@ -700,6 +699,9 @@ install: all
 ## end:
 
 # $Log: GNUmakefile.in,v $
 ## end:
 
 # $Log: GNUmakefile.in,v $
+# Revision 1.56  2002/04/03 22:28:03  gliptak
+# Removed references to gnu_regex
+#
 # Revision 1.55  2002/04/03 19:54:29  swa
 # freebsd tested to work. attempt to move tarball dist target forward
 #
 # Revision 1.55  2002/04/03 19:54:29  swa
 # freebsd tested to work. attempt to move tarball dist target forward
 #
index a7c6047..2066132 100644 (file)
@@ -37,6 +37,9 @@
  *
  * Revisions   :
  *    $Log: acconfig.h,v $
  *
  * Revisions   :
  *    $Log: acconfig.h,v $
+ *    Revision 1.23  2002/04/03 22:28:03  gliptak
+ *    Removed references to gnu_regex
+ *
  *    Revision 1.22  2002/03/26 22:29:54  swa
  *    we have a new homepage!
  *
  *    Revision 1.22  2002/03/26 22:29:54  swa
  *    we have a new homepage!
  *
  */
 #undef CODE_STATUS
 
  */
 #undef CODE_STATUS
 
-/*
- * Regular expression matching for URLs.  (Highly recommended).
- * If neither of these are defined then you can ony use prefix matching.
- * Don't bother to change this here! Use configure instead.
- */
-#undef REGEX_PCRE
-
 /* 
  * Should pcre be statically built in instead of linkling with libpcre?
  * (This is determined by configure depending on the availiability of
 /* 
  * Should pcre be statically built in instead of linkling with libpcre?
  * (This is determined by configure depending on the availiability of
index 326c5e4..701d3d8 100644 (file)
@@ -1,4 +1,4 @@
-const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.24 2002/04/02 16:12:47 oes Exp $";
+const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.25 2002/04/03 22:28:03 gliptak Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/cgisimple.c,v $
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/cgisimple.c,v $
@@ -36,6 +36,9 @@ const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.24 2002/04/02 16:12:47 oes Ex
  *
  * Revisions   :
  *    $Log: cgisimple.c,v $
  *
  * Revisions   :
  *    $Log: cgisimple.c,v $
+ *    Revision 1.25  2002/04/03 22:28:03  gliptak
+ *    Removed references to gnu_regex
+ *
  *    Revision 1.24  2002/04/02 16:12:47  oes
  *    Fix: moving misplaced lines into #ifdef FEATURE_FORCE
  *
  *    Revision 1.24  2002/04/02 16:12:47  oes
  *    Fix: moving misplaced lines into #ifdef FEATURE_FORCE
  *
@@ -1174,12 +1177,6 @@ static jb_err show_defines(struct map *exports)
    if (!err) err = map_conditional(exports, "FEATURE_TRUST", 0);
 #endif /* ndef FEATURE_TRUST */
 
    if (!err) err = map_conditional(exports, "FEATURE_TRUST", 0);
 #endif /* ndef FEATURE_TRUST */
 
-#ifdef REGEX_PCRE
-   if (!err) err = map_conditional(exports, "REGEX_PCRE", 1);
-#else /* ifndef REGEX_PCRE */
-   if (!err) err = map_conditional(exports, "REGEX_PCRE", 0);
-#endif /* def REGEX_PCRE */
-
 #ifdef STATIC_PCRE
    if (!err) err = map_conditional(exports, "STATIC_PCRE", 1);
 #else /* ifndef STATIC_PCRE */
 #ifdef STATIC_PCRE
    if (!err) err = map_conditional(exports, "STATIC_PCRE", 1);
 #else /* ifndef STATIC_PCRE */
index fdb144e..ce13e57 100755 (executable)
@@ -37,6 +37,9 @@
  *
  * Revisions   :
  *    $Log: config.h.win,v $
  *
  * Revisions   :
  *    $Log: config.h.win,v $
+ *    Revision 1.20  2002/04/03 22:28:03  gliptak
+ *    Removed references to gnu_regex
+ *
  *    Revision 1.19  2002/03/26 22:29:54  swa
  *    we have a new homepage!
  *
  *    Revision 1.19  2002/03/26 22:29:54  swa
  *    we have a new homepage!
  *
  */
 #define CODE_STATUS "beta"
 
  */
 #define CODE_STATUS "beta"
 
-/*
- * Regular expression matching for URLs.  (Highly recommended).
- * If neither of these are defined then you can ony use prefix matching.
- * Don't bother to change this here! Use configure instead.
- */
-#define REGEX_PCRE 1
-
 /* 
  * Should pcre be statically built in instead of linkling with libpcre?
  * (This is determined by configure depending on the availiability of
 /* 
  * Should pcre be statically built in instead of linkling with libpcre?
  * (This is determined by configure depending on the availiability of
index ac28b76..d444ea4 100644 (file)
@@ -37,6 +37,9 @@
  *
  * Revisions   :
  *    $Log: config.h.win32threads.win,v $
  *
  * Revisions   :
  *    $Log: config.h.win32threads.win,v $
+ *    Revision 1.14  2002/03/26 22:29:54  swa
+ *    we have a new homepage!
+ *
  *    Revision 1.13  2002/03/24 17:08:12  jongfoster
  *    Version number bump
  *
  *    Revision 1.13  2002/03/24 17:08:12  jongfoster
  *    Version number bump
  *
  */
 #define CODE_STATUS "beta"
 
  */
 #define CODE_STATUS "beta"
 
-/*
- * Regular expression matching for URLs.  (Highly recommended).
- * If neither of these are defined then you can ony use prefix matching.
- * Don't bother to change this here! Use configure instead.
- */
-/* #define REGEX_GNU 1 */
-#define REGEX_PCRE 1
-
 /* 
  * Should pcre be statically built in instead of linkling with libpcre?
  * (This is determined by configure depending on the availiability of
 /* 
  * Should pcre be statically built in instead of linkling with libpcre?
  * (This is determined by configure depending on the availiability of
index 4216716..d225683 100644 (file)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 dnl 
 dnl Process this file with autoconf to produce a configure script.
 dnl 
-dnl $Id: configure.in,v 1.55 2002/04/03 03:54:38 gliptak Exp $
+dnl $Id: configure.in,v 1.56 2002/04/03 22:28:03 gliptak Exp $
 dnl 
 dnl Written by and Copyright (C) 2001, 2002 the SourceForge
 dnl Privoxy team. http://www.privoxy.org/
 dnl 
 dnl Written by and Copyright (C) 2001, 2002 the SourceForge
 dnl Privoxy team. http://www.privoxy.org/
@@ -28,6 +28,9 @@ dnl or write to the Free Software Foundation, Inc., 59
 dnl Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 dnl 
 dnl $Log: configure.in,v $
 dnl Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 dnl 
 dnl $Log: configure.in,v $
+dnl Revision 1.56  2002/04/03 22:28:03  gliptak
+dnl Removed references to gnu_regex
+dnl
 dnl Revision 1.55  2002/04/03 03:54:38  gliptak
 dnl Checking pcre version
 dnl
 dnl Revision 1.55  2002/04/03 03:54:38  gliptak
 dnl Checking pcre version
 dnl
@@ -321,7 +324,7 @@ dnl =================================================================
 dnl AutoConf Initialization
 dnl =================================================================
 
 dnl AutoConf Initialization
 dnl =================================================================
 
-AC_REVISION($Revision: 1.55 $)
+AC_REVISION($Revision: 1.56 $)
 AC_INIT(jcc.c)
 AC_CONFIG_HEADER([config.h])
 AC_CANONICAL_HOST
 AC_INIT(jcc.c)
 AC_CONFIG_HEADER([config.h])
 AC_CANONICAL_HOST
@@ -965,14 +968,6 @@ dnl pcre/pcrs is needed for CGI anyway, so
 dnl the choice is only between static and
 dnl dynamic:
 
 dnl the choice is only between static and
 dnl dynamic:
 
-AC_ARG_ENABLE(regex-matching,
-[  --enable-regex-matching=pcre  Use perl-compatible regex for actionsfile
-                                pattern matching (default)
-  --disable-regex-matching      Don't use regex matching, compare URL
-                                prefix instead (won't shrink birary)],
-[ regex_matching=$enableval ],
-[ regex_matching=pcre ])
-
 AC_ARG_ENABLE(dynamic-pcre,
 [  --disable-dynamic-pcre        Use the built-in, static pcre, even if
                                 libpcre is available],
 AC_ARG_ENABLE(dynamic-pcre,
 [  --disable-dynamic-pcre        Use the built-in, static pcre, even if
                                 libpcre is available],
@@ -984,24 +979,15 @@ AC_ARG_ENABLE(dynamic-pcrs,
 [ if test $enableval = "no"; then have_pcrs=no; fi ])
 
 
 [ if test $enableval = "no"; then have_pcrs=no; fi ])
 
 
-# Is the regex URL matching based on libpcreposix, but we
-# don't have that library?
-#
-if test $have_pcreposix = "yes" -o $regex_matching != "pcre"; then
-  dont_miss_pcreposix=yes
-else
-  dont_miss_pcreposix=no
-fi
-
 # If we have libpcre and either we also have pcreposix or
 # we don't need pcreposix, then link pcre dynamically; else
 # build it and link statically
 #
 # If we have libpcre and either we also have pcreposix or
 # we don't need pcreposix, then link pcre dynamically; else
 # build it and link statically
 #
-if test $have_pcre = "yes" -a $dont_miss_pcreposix = "yes"; then
+if test $have_pcre = "yes"; then
   echo "using libpcre"
   pcre_dyn=yes
   STATIC_PCRE_ONLY=#
   echo "using libpcre"
   pcre_dyn=yes
   STATIC_PCRE_ONLY=#
-  LIBS="$LIBS -lpcre"
+  LIBS="$LIBS -lpcre -lpcreposix"
 else
   echo "using built-in static pcre"
   pcre_dyn=no
 else
   echo "using built-in static pcre"
   pcre_dyn=no
@@ -1023,22 +1009,6 @@ else
   STATIC_PCRS_ONLY=
 fi
 
   STATIC_PCRS_ONLY=
 fi
 
-# Which method should be used for URL matching?
-# pcre or prefix matching?
-#
-if test $regex_matching = "pcre"; then
-  echo "using pcre regex for URL matching"
-  AC_DEFINE(REGEX_PCRE)
-  PCRE_REGEX_ONLY=
-  if test $pcre_dyn = "yes"; then
-    LIBS="$LIBS -lpcreposix"
-  fi
-else
-  echo -e "using prefix matching for URLs\nHint: This does NOT make the executable any smaller!"
-  PCRE_REGEX_ONLY=#
-fi
-
-AC_SUBST(PCRE_REGEX_ONLY)
 AC_SUBST(STATIC_PCRE_ONLY)
 AC_SUBST(STATIC_PCRS_ONLY)
 
 AC_SUBST(STATIC_PCRE_ONLY)
 AC_SUBST(STATIC_PCRS_ONLY)
 
index e950284..ca8ea3a 100644 (file)
--- a/project.h
+++ b/project.h
@@ -1,6 +1,6 @@
 #ifndef PROJECT_H_INCLUDED
 #define PROJECT_H_INCLUDED
 #ifndef PROJECT_H_INCLUDED
 #define PROJECT_H_INCLUDED
-#define PROJECT_H_VERSION "$Id: project.h,v 1.63 2002/03/31 17:19:00 jongfoster Exp $"
+#define PROJECT_H_VERSION "$Id: project.h,v 1.64 2002/04/03 22:28:03 gliptak Exp $"
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/project.h,v $
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/project.h,v $
@@ -36,6 +36,9 @@
  *
  * Revisions   :
  *    $Log: project.h,v $
  *
  * Revisions   :
  *    $Log: project.h,v $
+ *    Revision 1.64  2002/04/03 22:28:03  gliptak
+ *    Removed references to gnu_regex
+ *
  *    Revision 1.63  2002/03/31 17:19:00  jongfoster
  *    Win32 only: Enabling STRICT to fix a VC++ compile warning.
  *
  *    Revision 1.63  2002/03/31 17:19:00  jongfoster
  *    Win32 only: Enabling STRICT to fix a VC++ compile warning.
  *
  * and are included anyway.
  */
 
  * and are included anyway.
  */
 
-#if defined(REGEX_PCRE)
-# define REGEX
-#endif /* defined(REGEX_PCRE) */
-
 #ifdef STATIC_PCRE
 #  include "pcre.h"
 #else
 #ifdef STATIC_PCRE
 #  include "pcre.h"
 #else
 #  include <pcrs.h>
 #endif
 
 #  include <pcrs.h>
 #endif
 
-#if defined(REGEX_PCRE)
-#  ifdef STATIC_PCRE
-#    include "pcreposix.h"
-#  else
-#    include <pcreposix.h>
-#  endif
-#endif /* defined(REGEX_PCRE) */
+#ifdef STATIC_PCRE
+#  include "pcreposix.h"
+#else
+#  include <pcreposix.h>
+#endif
 
 #ifdef AMIGA
 #include "amiga.h"
 
 #ifdef AMIGA
 #include "amiga.h"
@@ -632,15 +629,9 @@ struct url_spec
    char *path;         /* The path prefix (if not using regex), or source   */
                        /* for the regex.                                    */
    int   pathlen;      /* ==strlen(path).  Needed for prefix matching.      */
    char *path;         /* The path prefix (if not using regex), or source   */
                        /* for the regex.                                    */
    int   pathlen;      /* ==strlen(path).  Needed for prefix matching.      */
-#ifdef REGEX
    regex_t *preg;      /* Regex for matching path part                      */
    regex_t *preg;      /* Regex for matching path part                      */
-#endif
 };
 };
-#ifdef REGEX
 #define URL_SPEC_INITIALIZER { NULL, NULL, NULL, 0, 0, 0, NULL, 0, NULL }
 #define URL_SPEC_INITIALIZER { NULL, NULL, NULL, 0, 0, 0, NULL, 0, NULL }
-#else /* ifndef REGEX */
-#define URL_SPEC_INITIALIZER { NULL, NULL, NULL, 0, 0, 0, NULL, 0 }
-#endif /* ndef REGEX */
 
 /* Constants for host part matching in URLs */
 #define ANCHOR_LEFT  1
 
 /* Constants for host part matching in URLs */
 #define ANCHOR_LEFT  1
index bdc58ee..80a1842 100644 (file)
@@ -1,4 +1,4 @@
-const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.7 2002/03/26 22:29:55 swa Exp $";
+const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.8 2002/04/03 23:32:47 jongfoster Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/urlmatch.c,v $
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/urlmatch.c,v $
@@ -33,6 +33,9 @@ const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.7 2002/03/26 22:29:55 swa Exp $
  *
  * Revisions   :
  *    $Log: urlmatch.c,v $
  *
  * Revisions   :
  *    $Log: urlmatch.c,v $
+ *    Revision 1.8  2002/04/03 23:32:47  jongfoster
+ *    Fixing memory leak on error
+ *
  *    Revision 1.7  2002/03/26 22:29:55  swa
  *    we have a new homepage!
  *
  *    Revision 1.7  2002/03/26 22:29:55  swa
  *    we have a new homepage!
  *
@@ -635,7 +638,6 @@ jb_err create_url_spec(struct url_spec * url, const char * buf)
       url->path    = NULL;
       url->pathlen = 0;
    }
       url->path    = NULL;
       url->pathlen = 0;
    }
-#ifdef REGEX
    if (url->path)
    {
       int errcode;
    if (url->path)
    {
       int errcode;
@@ -674,7 +676,6 @@ jb_err create_url_spec(struct url_spec * url, const char * buf)
          return JB_ERR_PARSE;
       }
    }
          return JB_ERR_PARSE;
       }
    }
-#endif
    if ((p = strchr(buf, ':')) == NULL)
    {
       url->port = 0;
    if ((p = strchr(buf, ':')) == NULL)
    {
       url->port = 0;
@@ -707,10 +708,8 @@ jb_err create_url_spec(struct url_spec * url, const char * buf)
       {
          freez(url->spec);
          freez(url->path);
       {
          freez(url->spec);
          freez(url->path);
-#ifdef REGEX
          regfree(url->preg);
          freez(url->preg);
          regfree(url->preg);
          freez(url->preg);
-#endif /* def REGEX */
          return JB_ERR_MEMORY;
       }
 
          return JB_ERR_MEMORY;
       }
 
@@ -727,10 +726,8 @@ jb_err create_url_spec(struct url_spec * url, const char * buf)
       {
          freez(url->spec);
          freez(url->path);
       {
          freez(url->spec);
          freez(url->path);
-#ifdef REGEX
          regfree(url->preg);
          freez(url->preg);
          regfree(url->preg);
          freez(url->preg);
-#endif /* def REGEX */
          freez(url->dbuffer);
          url->dcount = 0;
          return JB_ERR_MEMORY;
          freez(url->dbuffer);
          url->dcount = 0;
          return JB_ERR_MEMORY;
@@ -746,10 +743,8 @@ jb_err create_url_spec(struct url_spec * url, const char * buf)
          {
             freez(url->spec);
             freez(url->path);
          {
             freez(url->spec);
             freez(url->path);
-#ifdef REGEX
             regfree(url->preg);
             freez(url->preg);
             regfree(url->preg);
             freez(url->preg);
-#endif /* def REGEX */
             freez(url->dbuffer);
             url->dcount = 0;
             return JB_ERR_MEMORY;
             freez(url->dbuffer);
             url->dcount = 0;
             return JB_ERR_MEMORY;
@@ -785,14 +780,11 @@ void free_url_spec(struct url_spec *url)
    freez(url->dbuffer);
    freez(url->dvec);
    freez(url->path);
    freez(url->dbuffer);
    freez(url->dvec);
    freez(url->path);
-#ifdef REGEX
    if (url->preg)
    {
       regfree(url->preg);
       freez(url->preg);
    }
    if (url->preg)
    {
       regfree(url->preg);
       freez(url->preg);
    }
-#endif
-
 }
 
 
 }
 
 
@@ -815,11 +807,7 @@ int url_match(const struct url_spec *pattern,
    return ((pattern->port == 0) || (pattern->port == url->port))
        && ((pattern->dbuffer == NULL) || (domain_match(pattern, url) == 0))
        && ((pattern->path == NULL) ||
    return ((pattern->port == 0) || (pattern->port == url->port))
        && ((pattern->dbuffer == NULL) || (domain_match(pattern, url) == 0))
        && ((pattern->path == NULL) ||
-#ifdef REGEX
             (regexec(pattern->preg, url->path, 0, NULL, 0) == 0)
             (regexec(pattern->preg, url->path, 0, NULL, 0) == 0)
-#else
-            (strncmp(pattern->path, url->path, pattern->pathlen) == 0)
-#endif
       );
 }
 
       );
 }
 
index 7cb41ff..ada06b2 100644 (file)
--- a/w32log.c
+++ b/w32log.c
@@ -1,4 +1,4 @@
-const char w32log_rcs[] = "$Id: w32log.c,v 1.23 2002/03/26 22:57:10 jongfoster Exp $";
+const char w32log_rcs[] = "$Id: w32log.c,v 1.24 2002/03/31 17:19:00 jongfoster Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/w32log.c,v $
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/w32log.c,v $
@@ -32,6 +32,9 @@ const char w32log_rcs[] = "$Id: w32log.c,v 1.23 2002/03/26 22:57:10 jongfoster E
  *
  * Revisions   :
  *    $Log: w32log.c,v $
  *
  * Revisions   :
  *    $Log: w32log.c,v $
+ *    Revision 1.24  2002/03/31 17:19:00  jongfoster
+ *    Win32 only: Enabling STRICT to fix a VC++ compile warning.
+ *
  *    Revision 1.23  2002/03/26 22:57:10  jongfoster
  *    Web server name should begin www.
  *
  *    Revision 1.23  2002/03/26 22:57:10  jongfoster
  *    Web server name should begin www.
  *
@@ -253,8 +256,6 @@ const char * g_trustfile = NULL;
 
 /* FIXME: end kludge */
 
 
 /* FIXME: end kludge */
 
-
-#ifdef REGEX
 /* Regular expression for detected URLs */
 #define RE_URL "http:[^ \n\r]*"
 
 /* Regular expression for detected URLs */
 #define RE_URL "http:[^ \n\r]*"
 
@@ -300,8 +301,6 @@ static struct _Pattern
    /* this is the terminator statement - do not delete! */
    { NULL,                  STYLE_NONE }
 };
    /* this is the terminator statement - do not delete! */
    { NULL,                  STYLE_NONE }
 };
-#endif /* def REGEX */
-
 
 /*
  * Public variables
 
 /*
  * Public variables
@@ -417,14 +416,11 @@ void TermLogWindow(void)
  *********************************************************************/
 void LogCreatePatternMatchingBuffers(void)
 {
  *********************************************************************/
 void LogCreatePatternMatchingBuffers(void)
 {
-#ifdef REGEX
    int i;
    for (i = 0; patterns_to_highlight[i].str != NULL; i++)
    {
       regcomp(&patterns_to_highlight[i].buffer, patterns_to_highlight[i].str, REG_ICASE);
    }
    int i;
    for (i = 0; patterns_to_highlight[i].str != NULL; i++)
    {
       regcomp(&patterns_to_highlight[i].buffer, patterns_to_highlight[i].str, REG_ICASE);
    }
-#endif
-
 }
 
 
 }
 
 
@@ -441,14 +437,11 @@ void LogCreatePatternMatchingBuffers(void)
  *********************************************************************/
 void LogDestroyPatternMatchingBuffers(void)
 {
  *********************************************************************/
 void LogDestroyPatternMatchingBuffers(void)
 {
-#ifdef REGEX
    int i;
    for (i = 0; patterns_to_highlight[i].str != NULL; i++)
    {
       regfree(&patterns_to_highlight[i].buffer);
    }
    int i;
    for (i = 0; patterns_to_highlight[i].str != NULL; i++)
    {
       regfree(&patterns_to_highlight[i].buffer);
    }
-#endif
-
 }
 
 
 }
 
 
@@ -466,7 +459,6 @@ void LogDestroyPatternMatchingBuffers(void)
 char *LogGetURLUnderCursor(void)
 {
    char *szResult = NULL;
 char *LogGetURLUnderCursor(void)
 {
    char *szResult = NULL;
-#ifdef REGEX
    regex_t re;
    POINT ptCursor;
    POINTL ptl;
    regex_t re;
    POINT ptCursor;
    POINTL ptl;
@@ -509,7 +501,6 @@ char *LogGetURLUnderCursor(void)
 
       regfree(&re);
    }
 
       regfree(&re);
    }
-#endif
    return szResult;
 
 }
    return szResult;
 
 }
@@ -520,7 +511,7 @@ char *LogGetURLUnderCursor(void)
  * Function    :  LogPutString
  *
  * Description :  Inserts text into the logging window.  This is really
  * Function    :  LogPutString
  *
  * Description :  Inserts text into the logging window.  This is really
- *                a REGEXP aware wrapper function to `LogPutStringNoMatch'.
+ *                a regexp aware wrapper function to `LogPutStringNoMatch'.
  *
  * Parameters  :
  *          1  :  pszText = pointer to string going to the log window
  *
  * Parameters  :
  *          1  :  pszText = pointer to string going to the log window
@@ -532,9 +523,7 @@ char *LogGetURLUnderCursor(void)
  *********************************************************************/
 int LogPutString(const char *pszText)
 {
  *********************************************************************/
 int LogPutString(const char *pszText)
 {
-#ifdef REGEX
    int i;
    int i;
-#endif
    int result = 0;
 
    if (pszText == NULL || strlen(pszText) == 0)
    int result = 0;
 
    if (pszText == NULL || strlen(pszText) == 0)
@@ -552,7 +541,6 @@ int LogPutString(const char *pszText)
     */
    EnterCriticalSection(&g_criticalsection);
 
     */
    EnterCriticalSection(&g_criticalsection);
 
-#ifdef REGEX
    if (g_bHighlightMessages)
    {
       regmatch_t match;
    if (g_bHighlightMessages)
    {
       regmatch_t match;
@@ -607,13 +595,10 @@ int LogPutString(const char *pszText)
          }
       }
    }
          }
       }
    }
-#endif
 
    result = LogPutStringNoMatch(pszText, STYLE_NONE);
 
 
    result = LogPutStringNoMatch(pszText, STYLE_NONE);
 
-#ifdef REGEX
 end:
 end:
-#endif
    LeaveCriticalSection(&g_criticalsection);
 
    return result;
    LeaveCriticalSection(&g_criticalsection);
 
    return result;