OSDN Git Service

* Writing is changed.
authorkonn <konn@1a406e8e-add9-4483-a2c8-d8cac5b7c224>
Wed, 21 Jun 2006 13:37:38 +0000 (13:37 +0000)
committerkonn <konn@1a406e8e-add9-4483-a2c8-d8cac5b7c224>
Wed, 21 Jun 2006 13:37:38 +0000 (13:37 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/modchxj/mod_chxj/trunk@1108 1a406e8e-add9-4483-a2c8-d8cac5b7c224

src/chxj_chtml10.c

index 198bb90..3d45707 100644 (file)
@@ -68,11 +68,11 @@ static char* s_chtml10_start_tr_tag       (void* pdoc, Node* node);
 static char* s_chtml10_end_tr_tag         (void* pdoc, Node* node);
 static char* s_chtml10_start_font_tag     (void* pdoc, Node* node);
 static char* s_chtml10_end_font_tag       (void* pdoc, Node* node);
+static char* s_chtml10_start_input_tag    (void* pdoc, Node* node);
+static char* s_chtml10_end_input_tag      (void* pdoc, Node* node);
+static char* s_chtml10_start_form_tag     (void* pdoc, Node* node);
+static char* s_chtml10_end_form_tag       (void* pdoc, Node* node);
 
-static char* s_chtml10_start_form_tag   (chtml10_t* chtml, Node* node);
-static char* s_chtml10_end_form_tag     (chtml10_t* chtml, Node* node);
-static char* s_chtml10_start_input_tag  (chtml10_t* chtml, Node* node);
-static char* s_chtml10_end_input_tag    (chtml10_t* chtml, Node* node);
 static char* s_chtml10_start_center_tag (chtml10_t* chtml, Node* node);
 static char* s_chtml10_end_center_tag   (chtml10_t* chtml, Node* node);
 static char* s_chtml10_start_hr_tag     (chtml10_t* chtml, Node* node);
@@ -215,9 +215,17 @@ tag_handler chtml10_handler[] = {
     s_chtml10_start_font_tag,
     s_chtml10_end_font_tag,
   },
+  /* tagFORM */
+  {
+    s_chtml10_start_form_tag,
+    s_chtml10_end_form_tag,
+  },
+  /* tagINPUT */
+  {
+    s_chtml10_start_input_tag,
+    s_chtml10_end_input_tag,
+  },
 #if 0
-  tagFORM,
-  tagINPUT,
   tagCENTER,
   tagHR,
   tagIMG,
@@ -1897,17 +1905,22 @@ s_chtml10_end_font_tag(void* pdoc, Node* child)
 /**
  * It is a handler who processes the FORM tag.
  *
- * @param chtml10  [i/o] The pointer to the CHTML structure at the output
+ * @param pdoc  [i/o] The pointer to the CHTML structure at the output
  *                     destination is specified.
  * @param node   [i]   The FORM tag node is specified.
  * @return The conversion result is returned.
  */
 static char*
-s_chtml10_start_form_tag(chtml10_t* chtml10, Node* node) 
+s_chtml10_start_form_tag(void* pdoc, Node* node) 
 {
-  Doc* doc = chtml10->doc;
-  request_rec* r = doc->r;
-  Attr* attr;
+  chtml10_t*   chtml10;
+  Doc*         doc;
+  request_rec* r;
+  Attr*        attr;
+
+  chtml10 = GET_CHTML10(pdoc);
+  doc     = chtml10->doc;
+  r       = doc->r;
 
   chtml10->out = apr_pstrcat(r->pool, chtml10->out, "<form", NULL);
 
@@ -1954,37 +1967,46 @@ s_chtml10_start_form_tag(chtml10_t* chtml10, Node* node)
   return chtml10->out;
 }
 
+
 /**
  * It is a handler who processes the FORM tag.
  *
- * @param chtml10  [i/o] The pointer to the CHTML structure at the output
+ * @param pdoc  [i/o] The pointer to the CHTML structure at the output
  *                     destination is specified.
  * @param node   [i]   The FORM tag node is specified.
  * @return The conversion result is returned.
  */
 static char*
-s_chtml10_end_form_tag(chtml10_t* chtml10, Node* child) 
+s_chtml10_end_form_tag(void* pdoc, Node* child) 
 {
-  Doc* doc = chtml10->doc;
-  request_rec* r = doc->r;
+  chtml10_t*   chtml10;
+  Doc*         doc;
+  request_rec* r;
+
+  chtml10 = GET_CHTML10(pdoc);
+  doc     = chtml10->doc;
+  r       = doc->r;
 
   chtml10->out = apr_pstrcat(r->pool, chtml10->out, "</form>", NULL);
+
   return chtml10->out;
 }
 
+
 /**
  * It is a handler who processes the INPUT tag.
  *
- * @param chtml10  [i/o] The pointer to the CHTML structure at the output
+ * @param pdoc  [i/o] The pointer to the CHTML structure at the output
  *                     destination is specified.
  * @param node   [i]   The INPUT tag node is specified.
  * @return The conversion result is returned.
  */
 static char*
-s_chtml10_start_input_tag(chtml10_t* chtml10, Node* node) 
+s_chtml10_start_input_tag(void* pdoc, Node* node) 
 {
-  Doc*          doc         = chtml10->doc;
-  request_rec*  r           = doc->r;
+  chtml10_t*    chtml10;
+  Doc*          doc;
+  request_rec*  r;
   char*         max_length  = NULL;
   char*         type        = NULL;
   char*         name        = NULL;
@@ -1994,6 +2016,10 @@ s_chtml10_start_input_tag(chtml10_t* chtml10, Node* node)
   char*         checked     = NULL;
   char*         accesskey   = NULL;
 
+  chtml10 = GET_CHTML10(pdoc);
+  doc     = chtml10->doc;
+  r       = doc->r;
+
   chtml10->out = apr_pstrcat(r->pool, chtml10->out, "<input", NULL);
 
   /*--------------------------------------------------------------------------*/
@@ -2074,20 +2100,24 @@ s_chtml10_start_input_tag(chtml10_t* chtml10, Node* node)
   return chtml10->out;
 }
 
+
 /**
  * It is a handler who processes the INPUT tag.
  *
- * @param chtml10  [i/o] The pointer to the CHTML structure at the output
+ * @param pdoc  [i/o] The pointer to the CHTML structure at the output
  *                     destination is specified.
  * @param node   [i]   The INPUT tag node is specified.
  * @return The conversion result is returned.
  */
 static char*
-s_chtml10_end_input_tag(chtml10_t* chtml10, Node* child) 
+s_chtml10_end_input_tag(void* pdoc, Node* child) 
 {
+  chtml10_t* chtml10 = GET_CHTML10(pdoc);
+
   return chtml10->out;
 }
 
+
 /**
  * It is a handler who processes the CENTER tag.
  *