OSDN Git Service

* Added test code of the <plaintext> tag for au HDML converter.
[modchxj/mod_chxj.git] / src / chxj_apply_convrule.c
index dd826df..6773c27 100644 (file)
@@ -1,6 +1,6 @@
 /*
+ * Copyright (C) 2005-2008 Atsushi Konno All rights reserved.
  * Copyright (C) 2005 QSDN,Inc. All rights reserved.
- * Copyright (C) 2005 Atsushi Konno All rights reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@
 
 static int s_apply_rule(request_rec* r, chxjconvrule_entry* pp);
 
-int 
+chxjconvrule_entry*
 chxj_apply_convrule(request_rec* r, apr_array_header_t* convrules)
 {
   chxjconvrule_entry *entries;
@@ -34,9 +34,9 @@ chxj_apply_convrule(request_rec* r, apr_array_header_t* convrules)
 
     /* Match */
     if (s_apply_rule(r, pp)) 
-      return pp->action;
+      return pp;
   }
-  return 0;
+  return NULL;
 }
 
 static int
@@ -48,10 +48,9 @@ s_apply_rule(request_rec* r, chxjconvrule_entry* pp)
 
   uri = r->uri;
 
-  ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "convert rule pattern=[%s] uri=[%s]",
-    pp->pattern, uri);
+  DBG(r,"convert rule pattern=[%s] uri=[%s]", pp->pattern, uri);
 
-  rtn = ap_regexec(pp->regexp, uri, AP_MAX_REG_MATCH, regmatch, 0);
+  rtn = ap_regexec((const ap_regex_t*)pp->regexp, uri, AP_MAX_REG_MATCH, (ap_regmatch_t*)regmatch, 0);
   if (rtn == 0) {
     /* Match */
     if (pp->flags & CONVRULE_FLAG_NOTMATCH) {