From 04d622e83b3bc1cb38863719b32c163d57b5ce50 Mon Sep 17 00:00:00 2001 From: konn Date: Wed, 21 Jun 2006 13:37:38 +0000 Subject: [PATCH] * Writing is changed. git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/modchxj/mod_chxj/trunk@1108 1a406e8e-add9-4483-a2c8-d8cac5b7c224 --- src/chxj_chtml10.c | 72 ++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 51 insertions(+), 21 deletions(-) diff --git a/src/chxj_chtml10.c b/src/chxj_chtml10.c index 198bb90f..3d457070 100644 --- a/src/chxj_chtml10.c +++ b/src/chxj_chtml10.c @@ -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, "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, "", 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, "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. * -- 2.11.0