OSDN Git Service

* Added Sample Device Data.
[modchxj/mod_chxj.git] / include / qs_parse_string.h
index 878ee1a..c69b3b6 100644 (file)
@@ -17,7 +17,8 @@
 #ifndef __QS_PARSE_STRING_H__
 #define __QS_PARSE_STRING_H__
 
-#include <httpd.h>
+#include "chxj_apache.h"
+#include "chxj_buffered_write.h"
 
 /*
 #define DEBUG
  * It is judged whether it is the first byte of Japanese Shift_JIS 
  * "ZENKAKU KANJI". 
  */
-#define is_sjis_kanji(c)  ((0x81 <= (unsigned char)(c&0xff) && \
-                           (unsigned char)(c&0xff) <= 0x9f)  \
-                          || (0xe0 <= (unsigned char)(c&0xff) && \
-                           (unsigned char)(c&0xff) <= 0xfc))
+#define is_sjis_kanji(c)    ((0x81 <= (unsigned char)(c&0xff) && (unsigned char)(c&0xff) <= 0x9f)  \
+                          || (0xe0 <= (unsigned char)(c&0xff) && (unsigned char)(c&0xff) <= 0xfc))
 /**
  * It is judged whether it is a byte of Japanese Shift_JIS "HANKAKU KANA". 
  */
 #define has_child(c)       ((strcasecmp(c, "base"     ) != 0) \
                         &&  (strcasecmp(c, "meta"     ) != 0) \
                         &&  (strcasecmp(c, "br"       ) != 0) \
-                        &&  (strcasecmp(c, "dt"       ) != 0) \
-                        &&  (strcasecmp(c, "dd"       ) != 0) \
                         &&  (strcasecmp(c, "hr"       ) != 0) \
                         &&  (strcasecmp(c, "img"      ) != 0) \
                         &&  (strcasecmp(c, "input"    ) != 0) \
-                        &&  (strcasecmp(c, "p"        ) != 0) \
-                        &&  (strcasecmp(c, "plaintext") != 0) \
                         &&  (strcasecmp(c, "?xml"     ) != 0) \
                         &&  (strcasecmp(c, "!doctype" ) != 0) \
                         &&  (strcasecmp(c, "link"     ) != 0) \
@@ -95,6 +90,8 @@
                         &&  (strcasecmp(c, "action"     ) != 0) \
                         &&  (strcasecmp(c, "!--"      ) != 0))
 
+#define QS_PARSE_NL_MARK "CrLf"
+
 /**
  * The structure of the attribute is defined.
  */
@@ -121,16 +118,17 @@ struct Node {
   struct Attr   *attr_tail;
   char          *name;
   char          *value;
-  int            size;
+  int           size;
   char          *otext;
-  int            line;
+  int           line;
+  int           closed_by_itself;
 };
 
 typedef struct pointer_table_t {
   unsigned int            address;
   unsigned long           size;
-  struct pointer_table_tnext;
-  struct pointer_table_tprev;
+  struct pointer_table_t *next;
+  struct pointer_table_t *prev;
 } Pointer_Table;
 
 
@@ -157,6 +155,8 @@ typedef struct _doc {
   apr_allocator_t *allocator;
   apr_pool_t      *pool;
 
+  buf_object buf;
+
 #ifndef __NON_MOD_CHXJ__
   request_rec *r;
 #endif