#include "chxj_img_conv.h"
#include "chxj_qr_code.h"
+#define GET_CHTML10(X) ((chtml10_t*)(X))
+
static char* s_chtml10_node_exchange (chtml10_t* chtml, Node* node, int indent);
static char* s_chtml10_start_html_tag (void* pdoc, Node* node);
static char* s_chtml10_end_textarea_tag (void* pdoc, Node* node);
static char* s_chtml10_start_p_tag (void* pdoc, Node* node);
static char* s_chtml10_end_p_tag (void* pdoc, Node* node);
+static char* s_chtml10_start_pre_tag (void* pdoc, Node* node);
+static char* s_chtml10_end_pre_tag (void* pdoc, Node* node);
-static char* s_chtml10_start_pre_tag (chtml10_t* chtml, Node* node);
-static char* s_chtml10_end_pre_tag (chtml10_t* chtml, Node* node);
static char* s_chtml10_start_ul_tag (chtml10_t* chtml, Node* node);
static char* s_chtml10_end_ul_tag (chtml10_t* chtml, Node* node);
static char* s_chtml10_start_li_tag (chtml10_t* chtml, Node* node);
static void s_chtml10_chxjif_tag(chtml10_t* chtml, Node* node);
tag_handler chtml10_handler[] = {
+ /* tagHTML */
{
"html",
s_chtml10_start_html_tag,
s_chtml10_end_html_tag,
},
+ /* tagMETA */
{
"meta",
s_chtml10_start_meta_tag,
s_chtml10_end_meta_tag,
},
+ /* tagTEXTAREA */
{
"textarea",
s_chtml10_start_textarea_tag,
s_chtml10_end_textarea_tag,
},
+ /* tagP */
{
"p",
s_chtml10_start_p_tag,
s_chtml10_end_p_tag,
},
+ /* tagPRE */
+ {
+ "pre",
+ s_chtml10_start_pre_tag,
+ s_chtml10_end_pre_tag,
+ },
+#if 0
+ tagUL,
+ tagLI,
+ tagOL,
+ tagH1,
+ tagH2,
+ tagH3,
+ tagH4,
+ tagH5,
+ tagH6,
+ tagHEAD,
+ tagTITLE,
+ tagBASE,
+ tagBODY,
+ tagA,
+ tagBR,
+ tagTR,
+ tagFONT,
+ tagFORM,
+ tagINPUT,
+ tagCENTER,
+ tagHR,
+ tagIMG,
+ tagSELECT,
+ tagOPTION,
+ tagDIV,
+ tagCHXJIF,
+#endif
};
request_rec* r;
chtml10_t* chtml10;
- chtml10 = (chtml10_t*)pdoc;
- doc = chtml10->doc;
- r = doc->r;
+ chtml10 = GET_CHTML10(pdoc);
+ doc = chtml10->doc;
+ r = doc->r;
/*--------------------------------------------------------------------------*/
/* start HTML tag */
chtml10_t* chtml10;
- chtml10 = (chtml10_t*)pdoc;
+ chtml10 = GET_CHTML10(pdoc);
doc = chtml10->doc;
r = doc->r;
{
chtml10_t* chtml10;
- chtml10 = (chtml10_t*)pdoc;
+ chtml10 = GET_CHTML10(pdoc);
/* ignore */
return chtml10->out;
{
chtml10_t* chtml10;
- chtml10 = (chtml10_t*)pdoc;
+ chtml10 = GET_CHTML10(pdoc);
return chtml10->out;
}
/**
* It is a handler who processes the PRE tag.
*
- * @param chtml10 [i/o] The pointer to the XHTML structure at the output
+ * @param pdoc [i/o] The pointer to the XHTML structure at the output
* destination is specified.
* @param node [i] The PRE tag node is specified.
* @return The conversion result is returned.
*/
static char*
-s_chtml10_start_pre_tag(chtml10_t* chtml10, Node* node)
+s_chtml10_start_pre_tag(void* pdoc, Node* node)
{
- Doc* doc = chtml10->doc;
- request_rec* r = doc->r;
+ Doc* doc;
+ request_rec* r;
+ chtml10_t* chtml10;
+
+ chtml10 = GET_CHTML10(pdoc);
+ doc = chtml10->doc;
+ r = doc->r;
chtml10->pre_flag++;
chtml10->out = apr_pstrcat(r->pool, chtml10->out, "<pre>", NULL);
/**
* It is a handler who processes the PRE tag.
*
- * @param chtml10 [i/o] The pointer to the XHTML structure at the output
+ * @param pdoc [i/o] The pointer to the XHTML structure at the output
* destination is specified.
* @param node [i] The PRE tag node is specified.
* @return The conversion result is returned.
*/
static char*
-s_chtml10_end_pre_tag(chtml10_t* chtml10, Node* child)
+s_chtml10_end_pre_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, "</pre>", NULL);
chtml10->pre_flag--;
request_rec* r;
chtml10_t* chtml10;
- chtml10 = (chtml10_t*)pdoc;
+ chtml10 = GET_CHTML10(pdoc);
doc = chtml10->doc;
r = doc->r;
request_rec* r;
chtml10_t* chtml10;
- chtml10 = (chtml10_t*)pdoc;
+ chtml10 = GET_CHTML10(pdoc);
doc = chtml10->doc;
r = doc->r;
chtml10_t* chtml10;
Attr* attr;
- chtml10 = (chtml10_t*)pdoc;
+ chtml10 = GET_CHTML10(pdoc);
doc = chtml10->doc;
r = doc->r;
request_rec* r;
chtml10_t* chtml10;
- chtml10 = (chtml10_t*)pdoc;
+ chtml10 = GET_CHTML10(pdoc);
doc = chtml10->doc;
r = doc->r;