[svn-inject] Applying Debian modifications to trunk
[manu/mod-proxy-html.git] / mod_proxy_html.c
index dfdbf60..0215cb2 100644 (file)
@@ -88,7 +88,7 @@ typedef struct urlmap {
   unsigned int flags ;
   union {
     const char* c ;
   unsigned int flags ;
   union {
     const char* c ;
-    regex_t* r ;
+    ap_regex_t* r ;
   } from ;
   const char* to ;
 } urlmap ;
   } from ;
   const char* to ;
 } urlmap ;
@@ -208,7 +208,7 @@ static void dump_content(saxctxt* ctx) {
   size_t match ;
   char c = 0 ;
   int nmatch ;
   size_t match ;
   char c = 0 ;
   int nmatch ;
-  regmatch_t pmatch[10] ;
+  ap_regmatch_t pmatch[10] ;
   char* subs ;
   size_t len, offs ;
 #ifndef GO_FASTER
   char* subs ;
   size_t len, offs ;
 #ifndef GO_FASTER
@@ -323,7 +323,7 @@ static void pstartElement(void* ctxt, const xmlChar* name,
   char* found ;
   saxctxt* ctx = (saxctxt*) ctxt ;
   size_t nmatch ;
   char* found ;
   saxctxt* ctx = (saxctxt*) ctxt ;
   size_t nmatch ;
-  regmatch_t pmatch[10] ;
+  ap_regmatch_t pmatch[10] ;
 #ifndef GO_FASTER
   int verbose = ctx->cfg->verbose ;
 #endif
 #ifndef GO_FASTER
   int verbose = ctx->cfg->verbose ;
 #endif
@@ -580,18 +580,18 @@ static htmlSAXHandlerPtr setupSAX(apr_pool_t* pool) {
   return sax ;
 }
 
   return sax ;
 }
 
-static regex_t* seek_meta_ctype ;
-static regex_t* seek_charset ;
-static regex_t* seek_meta ;
+static ap_regex_t* seek_meta_ctype ;
+static ap_regex_t* seek_charset ;
+static ap_regex_t* seek_meta ;
 
 static void proxy_html_child_init(apr_pool_t* pool, server_rec* s) {
   seek_meta_ctype = ap_pregcomp(pool,
        "(<meta[^>]*http-equiv[ \t\r\n='\"]*content-type[^>]*>)",
 
 static void proxy_html_child_init(apr_pool_t* pool, server_rec* s) {
   seek_meta_ctype = ap_pregcomp(pool,
        "(<meta[^>]*http-equiv[ \t\r\n='\"]*content-type[^>]*>)",
-       REG_EXTENDED|REG_ICASE) ;
+       AP_REG_EXTENDED|AP_REG_ICASE) ;
   seek_charset = ap_pregcomp(pool, "charset=([A-Za-z0-9_-]+)",
   seek_charset = ap_pregcomp(pool, "charset=([A-Za-z0-9_-]+)",
-       REG_EXTENDED|REG_ICASE) ;
+       AP_REG_EXTENDED|AP_REG_ICASE) ;
   seek_meta = ap_pregcomp(pool, "<meta[^>]*(http-equiv)[^>]*>",
   seek_meta = ap_pregcomp(pool, "<meta[^>]*(http-equiv)[^>]*>",
-       REG_EXTENDED|REG_ICASE) ;
+       AP_REG_EXTENDED|AP_REG_ICASE) ;
 }
 
 static xmlCharEncoding sniff_encoding(request_rec* r, const char* cbuf, size_t bytes
 }
 
 static xmlCharEncoding sniff_encoding(request_rec* r, const char* cbuf, size_t bytes
@@ -603,7 +603,7 @@ static xmlCharEncoding sniff_encoding(request_rec* r, const char* cbuf, size_t b
   char* encoding = NULL ;
   char* p ;
   char* q ;
   char* encoding = NULL ;
   char* p ;
   char* q ;
-  regmatch_t match[2] ;
+  ap_regmatch_t match[2] ;
   unsigned char* buf = (unsigned char*)cbuf ;
 
   VERBOSE( ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
   unsigned char* buf = (unsigned char*)cbuf ;
 
   VERBOSE( ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
@@ -673,7 +673,7 @@ static meta* metafix(request_rec* r, const char* buf /*, size_t bytes*/
   const char* q ;
   char* header ;
   char* content ;
   const char* q ;
   char* header ;
   char* content ;
-  regmatch_t pmatch[2] ;
+  ap_regmatch_t pmatch[2] ;
   char delim ;
 
   while ( ! ap_regexec(seek_meta, buf+offs, 2, pmatch, 0) ) {
   char delim ;
 
   while ( ! ap_regexec(seek_meta, buf+offs, 2, pmatch, 0) ) {
@@ -942,10 +942,10 @@ static const char* set_urlmap(cmd_parms* cmd, void* CFG,
     newmap->to = apr_pstrdup(cmd->pool, to) ;
   } else {
     regflags
     newmap->to = apr_pstrdup(cmd->pool, to) ;
   } else {
     regflags
-       = REGFLAG(REG_EXTENDED,flags,'x')
-       | REGFLAG(REG_ICASE,flags,'i')
-       | REGFLAG(REG_NOSUB,flags,'n')
-       | REGFLAG(REG_NEWLINE,flags,'s')
+       = REGFLAG(AP_REG_EXTENDED,flags,'x')
+       | REGFLAG(AP_REG_ICASE,flags,'i')
+       | REGFLAG(AP_REG_NOSUB,flags,'n')
+       | REGFLAG(AP_REG_NEWLINE,flags,'s')
     ;
     newmap->from.r = ap_pregcomp(cmd->pool, from, regflags) ;
     newmap->to = apr_pstrdup(cmd->pool, to) ;
     ;
     newmap->from.r = ap_pregcomp(cmd->pool, from, regflags) ;
     newmap->to = apr_pstrdup(cmd->pool, to) ;