OSDN Git Service

* Added test code of the <ol> tag for SoftBank HTML converter.
[modchxj/mod_chxj.git] / src / chxj_chtml30.c
index de882ce..6feb851 100644 (file)
@@ -28,7 +28,7 @@
 #undef W_V
 #define W_L(X)          do { chtml30->out = BUFFERED_WRITE_LITERAL(chtml30->out, &doc->buf, (X)); } while(0)
 #define W_V(X)          do { chtml30->out = (X) ? BUFFERED_WRITE_VALUE(chtml30->out, &doc->buf, (X))  \
-                                                  : BUFFERED_WRITE_LITERAL(chtml30->out, &doc->buf, ""); } while(0)
+                                                : BUFFERED_WRITE_LITERAL(chtml30->out, &doc->buf, ""); } while(0)
 extern tag_handler chtml20_handler[];
 
 static char *s_chtml30_start_html_tag     (void *pdoc, Node *node);
@@ -1348,33 +1348,27 @@ s_chtml30_end_font_tag(void* pdoc, Node* UNUSED(child))
  * @param node   [i]   The FORM tag node is specified.
  * @return The conversion result is returned.
  */
-static char*
-s_chtml30_start_form_tag(void* pdoc, Node* node) 
+static char *
+s_chtml30_start_form_tag(void *pdoc, Node *node) 
 {
-  chtml30_t*    chtml30;
-  Doc*          doc;
-  request_rec*  r;
-  Attr*         attr;
+  chtml30_t     *chtml30;
+  Doc           *doc;
+  request_rec   *r;
+  Attr          *attr;
 
   chtml30 = GET_CHTML30(pdoc);
   doc     = chtml30->doc;
   r       = doc->r;
 
   W_L("<form");
-
   /*--------------------------------------------------------------------------*/
   /* Get Attributes                                                           */
   /*--------------------------------------------------------------------------*/
   for (attr = qs_get_attr(doc,node);
        attr;
        attr = qs_get_next_attr(doc,attr)) {
-
-    char* name;
-    char* value;
-
-    name  = qs_get_attr_name(doc,attr);
-    value = qs_get_attr_value(doc,attr);
-
+    char *name  = qs_get_attr_name(doc,attr);
+    char *value = qs_get_attr_value(doc,attr);
     if (STRCASEEQ('a','A',"action", name)) {
       /*----------------------------------------------------------------------*/
       /* CHTML 1.0                                                            */
@@ -1398,12 +1392,10 @@ s_chtml30_start_form_tag(void* pdoc, Node* node)
       /* CHTML 3.0                                                            */
       /* It is special only for CHTML.                                        */
       /*----------------------------------------------------------------------*/
-      W_L(" utn ");
+      W_L(" utn");
     }
   }
-
   W_L(">");
-
   return chtml30->out;
 }
 
@@ -1721,10 +1713,10 @@ s_chtml30_start_img_tag(void *pdoc, Node *node)
 #ifndef IMG_NOT_CONVERT_FILENAME
   device_table *spec;
 #endif
-  chtml30_t *chtml30;
-  Doc *doc;
-  request_rec *r;
-  Attr *attr;
+  chtml30_t    *chtml30;
+  Doc          *doc;
+  request_rec  *r;
+  Attr         *attr;
 
   chtml30 = GET_CHTML30(pdoc);
   doc     = chtml30->doc;
@@ -1889,7 +1881,6 @@ s_chtml30_start_select_tag(void* pdoc, Node* child)
        attr = qs_get_next_attr(doc,attr)) {
     char* nm  = qs_get_attr_name(doc,attr);
     char* val = qs_get_attr_value(doc,attr);
-
     if (STRCASEEQ('s','S',"size", nm)) {
       /*----------------------------------------------------------------------*/
       /* CHTML 1.0 version 2.0                                                */
@@ -3108,7 +3099,7 @@ s_chtml30_end_dl_tag(void *pdoc, Node *UNUSED(child))
 
 
 /**
- * It is a handter who processes the DT tag.
+ * It is a handler who processes the DT tag.
  *
  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
  *                     destination is specified.
@@ -3128,7 +3119,7 @@ s_chtml30_start_dt_tag(void *pdoc, Node *UNUSED(child))
 
 
 /**
- * It is a handter who processes the DT tag.
+ * It is a handler who processes the DT tag.
  *
  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
  *                     destination is specified.
@@ -3145,7 +3136,7 @@ s_chtml30_end_dt_tag(void *pdoc, Node *UNUSED(child))
 
 
 /**
- * It is a handder who processes the DD tag.
+ * It is a handler who processes the DD tag.
  *
  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
  *                     destination is specified.
@@ -3163,7 +3154,7 @@ s_chtml30_start_dd_tag(void *pdoc, Node *UNUSED(child))
 
 
 /**
- * It is a handder who processes the DD tag.
+ * It is a handler who processes the DD tag.
  *
  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
  *                     destination is specified.
@@ -3179,7 +3170,7 @@ s_chtml30_end_dd_tag(void *pdoc, Node *UNUSED(child))
 
 
 /**
- * It is a hanmarqueeer who processes the MARQUEE tag.
+ * It is a handler who processes the MARQUEE tag.
  *
  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
  *                     destination is specified.
@@ -3229,7 +3220,7 @@ s_chtml30_start_marquee_tag(void *pdoc, Node *node)
 
 
 /**
- * It is a hanmarqueeer who processes the MARQUEE tag.
+ * It is a handler who processes the MARQUEE tag.
  *
  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
  *                     destination is specified.
@@ -3303,7 +3294,7 @@ s_chtml30_start_menu_tag(void *pdoc, Node *UNUSED(child))
 
 
 /**
- * It is a hanmenuer who processes the MENU tag.
+ * It is a handler who processes the MENU tag.
  *
  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
  *                     destination is specified.
@@ -3321,7 +3312,7 @@ s_chtml30_end_menu_tag(void *pdoc, Node *UNUSED(child))
 
 
 /**
- * It is a hanplaintexter who processes the PLAINTEXT tag.
+ * It is a handler who processes the PLAINTEXT tag.
  *
  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
  *                     destination is specified.
@@ -3360,7 +3351,7 @@ s_chtml30_start_plaintext_tag_inner(void *pdoc, Node *node)
 
 
 /**
- * It is a hanplaintexter who processes the PLAINTEXT tag.
+ * It is a handler who processes the PLAINTEXT tag.
  *
  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
  *                     destination is specified.