#include "chxj_buffered_write.h"
#define GET_CHTML10(X) ((chtml10_t *)(X))
+#undef W_L
+#undef W_V
#define W_L(X) do { chtml10->out = BUFFERED_WRITE_LITERAL(chtml10->out, &doc->buf, (X)); } while(0)
#define W_V(X) do { chtml10->out = (X) ? BUFFERED_WRITE_VALUE(chtml10->out, &doc->buf, (X)) \
: BUFFERED_WRITE_LITERAL(chtml10->out, &doc->buf, ""); } while(0)
+#undef W_NLCODE
#define W_NLCODE() do { char *nlcode = TO_NLCODE(chtml10->conf); W_V(nlcode); } while (0)
static char *s_chtml10_start_html_tag (void *pdoc, Node *node);
#define W_L(X) do { chtml20->out = BUFFERED_WRITE_LITERAL(chtml20->out, &doc->buf, (X)); } while(0)
#define W_V(X) do { chtml20->out = (X) ? BUFFERED_WRITE_VALUE(chtml20->out, &doc->buf, (X)) \
: BUFFERED_WRITE_LITERAL(chtml20->out, &doc->buf, ""); } while(0)
+#undef W_NLCODE
#define W_NLCODE() do { char *nlcode = TO_NLCODE(chtml20->conf); W_V(nlcode); } while (0)
static char *s_chtml20_start_html_tag (void *pdoc, Node *node);
#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)
+#undef W_NLCODE
#define W_NLCODE() do { char *nlcode = TO_NLCODE(chtml30->conf); W_V(nlcode); } while (0)
static char *s_chtml30_start_html_tag (void *pdoc, Node *node);
#define W_L(X) do { chtml40->out = BUFFERED_WRITE_LITERAL(chtml40->out, &doc->buf, (X)); } while(0)
#define W_V(X) do { chtml40->out = (X) ? BUFFERED_WRITE_VALUE(chtml40->out, &doc->buf, (X)) \
: BUFFERED_WRITE_LITERAL(chtml40->out, &doc->buf, ""); } while(0)
+#undef W_NLCODE
#define W_NLCODE() do { char *nlcode = TO_NLCODE(chtml40->conf); W_V(nlcode); } while (0)
static char *s_chtml40_start_html_tag (void *pdoc, Node *node);
#define W_L(X) do { chtml50->out = BUFFERED_WRITE_LITERAL(chtml50->out, &doc->buf, (X)); } while(0)
#define W_V(X) do { chtml50->out = (X) ? BUFFERED_WRITE_VALUE(chtml50->out, &doc->buf, (X)) \
: BUFFERED_WRITE_LITERAL(chtml50->out, &doc->buf, ""); } while(0)
+#undef W_NLCODE
#define W_NLCODE() do { char *nlcode = TO_NLCODE(chtml50->conf); W_V(nlcode); } while (0)
static char *s_chtml50_start_html_tag (void *pdoc, Node *node);
#define W_L(X) do { jhtml->out = BUFFERED_WRITE_LITERAL(jhtml->out, &doc->buf, (X)); } while(0)
#define W_V(X) do { jhtml->out = (X) ? BUFFERED_WRITE_VALUE(jhtml->out, &doc->buf, (X)) \
: BUFFERED_WRITE_LITERAL(jhtml->out, &doc->buf, ""); } while(0)
+#undef W_NLCODE
#define W_NLCODE() do { char *nlcode = TO_NLCODE(jhtml->conf); W_V(nlcode); } while (0)
static char *s_jhtml_start_html_tag (void *pdoc, Node *node);
#define W_L(X) do { jxhtml->out = BUFFERED_WRITE_LITERAL(jxhtml->out, &doc->buf, (X)); } while(0)
#define W_V(X) do { jxhtml->out = (X) ? BUFFERED_WRITE_VALUE(jxhtml->out, &doc->buf, (X)) \
: BUFFERED_WRITE_LITERAL(jxhtml->out, &doc->buf, ""); } while(0)
+#undef W_NLCODE
#define W_NLCODE() do { char *nlcode = TO_NLCODE(jxhtml->conf); W_V(nlcode); } while (0)
static char *s_jxhtml_start_html_tag (void *pdoc, Node *node);
#define W_L(X) do { xhtml->out = BUFFERED_WRITE_LITERAL(xhtml->out, &doc->buf, (X)); } while(0)
#define W_V(X) do { xhtml->out = (X) ? BUFFERED_WRITE_VALUE(xhtml->out, &doc->buf, (X)) \
: BUFFERED_WRITE_LITERAL(xhtml->out, &doc->buf, ""); } while(0)
+#undef W_NLCODE
#define W_NLCODE() do { char *nlcode = TO_NLCODE(xhtml->conf); W_V(nlcode); } while (0)
static char *s_xhtml_1_0_start_html_tag (void *pdoc, Node *node);
{
static mod_chxj_config cfg;
memset(&cfg, 0, sizeof(mod_chxj_config));
+ cfg.new_line_type = NLTYPE_NONE;
return &cfg;
}
{
static mod_chxj_config cfg;
memset(&cfg, 0, sizeof(mod_chxj_config));
+ cfg.new_line_type = NLTYPE_NONE;
return &cfg;
}
{
static mod_chxj_config cfg;
memset(&cfg, 0, sizeof(mod_chxj_config));
+ cfg.new_line_type = NLTYPE_NONE;
return &cfg;
}
{
static mod_chxj_config cfg;
memset(&cfg, 0, sizeof(mod_chxj_config));
+ cfg.new_line_type = NLTYPE_NONE;
return &cfg;
}
{
static mod_chxj_config cfg;
memset(&cfg, 0, sizeof(mod_chxj_config));
+ cfg.new_line_type = NLTYPE_NONE;
return &cfg;
}
{
static mod_chxj_config cfg;
memset(&cfg, 0, sizeof(mod_chxj_config));
+ cfg.new_line_type = NLTYPE_NONE;
return &cfg;
}
{
static mod_chxj_config cfg;
memset(&cfg, 0, sizeof(mod_chxj_config));
+ cfg.new_line_type = NLTYPE_NONE;
return &cfg;
}
void test_jxhtml_comment_tag_001()
{
#define TEST_STRING "<html><!--</html><body>--><head></head><body></body></html>"
-#define RESULT_STRING "<?xml version='1.0' encoding='Shift_JIS' ?><!DOCTYPE html PUBLIC \"-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN\" \"html-basic10-plus.dtd\"><html version=\"1.0\"><head></head><body></body></html>"
+#define RESULT_STRING "<?xml version='1.0' encoding='Shift_JIS' ?><!DOCTYPE html PUBLIC \"-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN\" \"html-basic10-plus.dtd\"><html><head></head><body><div></div></body></html>"
char *ret;
device_table spec;
chxjconvrule_entry entry;
void test_jxhtml_body_tag_001()
{
#define TEST_STRING "<body></body>"
-#define RESULT_STRING "<body></body>"
+#define RESULT_STRING "<body><div></div></body>"
char *ret;
char *tmp;
device_table spec;
void test_jxhtml_body_tag_002()
{
#define TEST_STRING "<body bgcolor>"
-#define RESULT_STRING "<body></body>"
+#define RESULT_STRING "<body><div></div></body>"
char *ret;
char *tmp;
device_table spec;
void test_jxhtml_body_tag_003()
{
#define TEST_STRING "<body bgcolor=\"\"></body>"
-#define RESULT_STRING "<body></body>"
+#define RESULT_STRING "<body><div></div></body>"
char *ret;
char *tmp;
device_table spec;
void test_jxhtml_body_tag_004()
{
#define TEST_STRING "<body bgcolor=\"#ff0000\"></body>"
-#define RESULT_STRING "<body bgcolor=\"#ff0000\"></body>"
+#define RESULT_STRING "<body bgcolor=\"#ff0000\"><div></div></body>"
char *ret;
char *tmp;
device_table spec;
void test_jxhtml_body_tag_005()
{
#define TEST_STRING "<body text></body>"
-#define RESULT_STRING "<body></body>"
+#define RESULT_STRING "<body><div></div></body>"
char *ret;
char *tmp;
device_table spec;
void test_jxhtml_body_tag_006()
{
#define TEST_STRING "<body text=\"\"></body>"
-#define RESULT_STRING "<body></body>"
+#define RESULT_STRING "<body><div></div></body>"
char *ret;
char *tmp;
device_table spec;
void test_jxhtml_body_tag_007()
{
#define TEST_STRING "<body text=\"#ff0000\"></body>"
-#define RESULT_STRING "<body text=\"#ff0000\"></body>"
+#define RESULT_STRING "<body text=\"#ff0000\"><div></div></body>"
char *ret;
char *tmp;
device_table spec;
void test_jxhtml_body_tag_008()
{
#define TEST_STRING "<body link></body>"
-#define RESULT_STRING "<body></body>"
+#define RESULT_STRING "<body><div></div></body>"
char *ret;
char *tmp;
device_table spec;
void test_jxhtml_body_tag_009()
{
#define TEST_STRING "<body link=\"\"></body>"
-#define RESULT_STRING "<body></body>"
+#define RESULT_STRING "<body><div></div></body>"
char *ret;
char *tmp;
device_table spec;
void test_jxhtml_body_tag_010()
{
#define TEST_STRING "<body link=\"#ff0000\"></body>"
-#define RESULT_STRING "<body link=\"#ff0000\"></body>"
+#define RESULT_STRING "<body link=\"#ff0000\"><div></div></body>"
char *ret;
char *tmp;
device_table spec;
void test_jxhtml_body_tag_011()
{
#define TEST_STRING "<body vlink></body>"
-#define RESULT_STRING "<body></body>"
+#define RESULT_STRING "<body><div></div></body>"
char *ret;
char *tmp;
device_table spec;
void test_jxhtml_body_tag_012()
{
#define TEST_STRING "<body vlink=\"\"></body>"
-#define RESULT_STRING "<body></body>"
+#define RESULT_STRING "<body><div></div></body>"
char *ret;
char *tmp;
device_table spec;
void test_jxhtml_body_tag_013()
{
#define TEST_STRING "<body vlink=\"#ff0000\"></body>"
-#define RESULT_STRING "<body></body>"
+#define RESULT_STRING "<body><div></div></body>"
char *ret;
char *tmp;
device_table spec;
void test_jxhtml_body_tag_014()
{
#define TEST_STRING "<body alink=\"#FF0000\"></body>"
-#define RESULT_STRING "<body></body>"
+#define RESULT_STRING "<body><div></div></body>"
char *ret;
char *tmp;
device_table spec;
void test_jxhtml_body_tag_015()
{
#define TEST_STRING "<body boyoyon=\"#FF0000\"></body>"
-#define RESULT_STRING "<body></body>"
+#define RESULT_STRING "<body><div></div></body>"
char *ret;
char *tmp;
device_table spec;
void test_jxhtml_html_tag_001()
{
#define TEST_STRING "<html><head></head><body></body></html>"
-#define RESULT_STRING "<?xml version='1.0' encoding='Shift_JIS' ?><!DOCTYPE html PUBLIC \"-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN\" \"html-basic10-plus.dtd\"><html version=\"1.0\"><head></head><body></body></html>"
+#define RESULT_STRING "<?xml version='1.0' encoding='Shift_JIS' ?><!DOCTYPE html PUBLIC \"-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN\" \"html-basic10-plus.dtd\"><html><head></head><body><div></div></body></html>"
char *ret;
char *tmp;
device_table spec;
void test_jxhtml_input_tag_030()
{
#define TEST_STRING "<input checked>"
-#define RESULT_STRING "<input checked />"
+#define RESULT_STRING "<input checked=\"checked\" />"
char *ret;
char *tmp;
device_table spec;