- If <?xml ...> is not found, give it up.
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/modchxj/mod_chxj/branches/RELEASE_0_8_0@1858
1a406e8e-add9-4483-a2c8-
d8cac5b7c224
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
/*------------------------------------------------------------------------*/
/* Here, the parsing of the received character string is done */
/*------------------------------------------------------------------------*/
- // char *ss = apr_pstrdup(r->pool, src);
char *ss = apr_palloc(r->pool, srclen + 1);
memset(ss, 0, srclen + 1);
memcpy(ss, src, srclen);
# endif
#endif
+#define NL_COUNT_MAX (10)
+
static int s_cut_tag (const char* s, int len) ;
static int s_cut_text(const char* s, int len) ;
static void qs_dump_node(Doc* doc, Node* node, int indent);
qs_parse_string(Doc* doc, const char* src, int srclen)
{
int ii;
+ int nl_cnt = 0;
char encoding[256];
char* osrc;
char* ibuf;
* Because I want to specify encoding.
*/
for (ii=0; ii<srclen; ii++) {
+ if (src[ii] == '\n') nl_cnt++;
+ if (nl_cnt >= NL_COUNT_MAX) break; /* not found <?xml ...> */
+
if (is_white_space(src[ii]))
continue;