OSDN Git Service

* changed features:
authorkonn <konn@1a406e8e-add9-4483-a2c8-d8cac5b7c224>
Thu, 6 Mar 2008 14:18:13 +0000 (14:18 +0000)
committerkonn <konn@1a406e8e-add9-4483-a2c8-d8cac5b7c224>
Thu, 6 Mar 2008 14:18:13 +0000 (14:18 +0000)
    - added line number to Node struct.

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/modchxj/mod_chxj/branches/RELEASE_0_8_0@1859 1a406e8e-add9-4483-a2c8-d8cac5b7c224

Makefile.in
configure
configure.ac
include/config.h
include/qs_parse_string.h
src/qs_parse_string.c

index eab9780..10311f5 100644 (file)
@@ -37,14 +37,14 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
        $(srcdir)/Makefile.in $(top_srcdir)/configure \
        $(top_srcdir)/include/config.h.in AUTHORS COPYING ChangeLog \
        INSTALL NEWS TODO compile config.guess config.sub depcomp \
-       install-sh ltmain.sh missing
+       install-sh ltmain.sh missing mkinstalldirs
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno config.status.lineno
-mkinstalldirs = $(install_sh) -d
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/include/config.h
 CONFIG_CLEAN_FILES =
 SOURCES =
index f19a1b3..920b880 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for mod_chxj 0.8.5-1.
+# Generated by GNU Autoconf 2.61 for mod_chxj 0.8.6-1.
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@@ -726,8 +726,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='mod_chxj'
 PACKAGE_TARNAME='mod_chxj'
-PACKAGE_VERSION='0.8.5-1'
-PACKAGE_STRING='mod_chxj 0.8.5-1'
+PACKAGE_VERSION='0.8.6-1'
+PACKAGE_STRING='mod_chxj 0.8.6-1'
 PACKAGE_BUGREPORT=''
 
 ac_unique_file="src/mod_chxj.c"
@@ -1403,7 +1403,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures mod_chxj 0.8.5-1 to adapt to many kinds of systems.
+\`configure' configures mod_chxj 0.8.6-1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1474,7 +1474,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of mod_chxj 0.8.5-1:";;
+     short | recursive ) echo "Configuration of mod_chxj 0.8.6-1:";;
    esac
   cat <<\_ACEOF
 
@@ -1584,7 +1584,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-mod_chxj configure 0.8.5-1
+mod_chxj configure 0.8.6-1
 generated by GNU Autoconf 2.61
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1598,7 +1598,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by mod_chxj $as_me 0.8.5-1, which was
+It was created by mod_chxj $as_me 0.8.6-1, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
@@ -2416,7 +2416,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE=mod_chxj
- VERSION=0.8.5-1
+ VERSION=0.8.6-1
 
 
 cat >>confdefs.h <<_ACEOF
@@ -21736,7 +21736,7 @@ exec 6>&1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by mod_chxj $as_me 0.8.5-1, which was
+This file was extended by mod_chxj $as_me 0.8.6-1, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -21789,7 +21789,7 @@ Report bugs to <bug-autoconf@gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-mod_chxj config.status 0.8.5-1
+mod_chxj config.status 0.8.6-1
 configured by $0, generated by GNU Autoconf 2.61,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
index e96fcf9..365621e 100644 (file)
@@ -1,6 +1,6 @@
 #                                               -*- Autoconf -*-
 # Process this file with autoconf to produce a configure script.
-AC_INIT([mod_chxj],[0.8.5-1])
+AC_INIT([mod_chxj],[0.8.6-1])
 AC_PREREQ(2.59)
 AC_CONFIG_SRCDIR([src/mod_chxj.c])
 AC_CANONICAL_TARGET
index cf6de3c..ed22625 100644 (file)
 #define PACKAGE_NAME "mod_chxj"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "mod_chxj 0.8.4-1"
+#define PACKAGE_STRING "mod_chxj 0.8.6-1"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "mod_chxj"
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "0.8.4-1"
+#define PACKAGE_VERSION "0.8.6-1"
 
 /* Define to 1 if you have the ANSI C header files. */
 #define STDC_HEADERS 1
 
 /* Version number of package */
-#define VERSION "0.8.4-1"
+#define VERSION "0.8.6-1"
 
 /* Define to empty if `const' does not conform to ANSI C. */
 /* #undef const */
index a4894e1..abcfde6 100644 (file)
@@ -123,6 +123,7 @@ struct Node {
   char*          value;
   int            size;
   char*          otext;
+  int            line;
 };
 
 typedef struct pointer_table_t {
index 5ae1569..22a3633 100644 (file)
@@ -158,15 +158,20 @@ qs_parse_string(Doc* doc, const char* src, int srclen)
   /*
    * Now, true parsing is done here. 
    */
+  nl_cnt = 1;
   for (ii=0; ii<srclen; ii++) {
     if (doc->parse_mode != PARSE_MODE_NO_PARSE 
-    && is_white_space(src[ii])) {
+        && is_white_space(src[ii])) {
+      if (src[ii] == '\n') 
+        nl_cnt++;
+
       continue;
     }
     if ((unsigned char)'<' == src[ii]) {
       int endpoint = s_cut_tag(&src[ii], srclen - ii);
       Node* node   = NULL;
       node = qs_parse_tag(doc, &src[ii], endpoint);
+      node->line = nl_cnt;
 
       ii += endpoint;
       if (node->name[0] == '/' ) {
@@ -184,7 +189,7 @@ qs_parse_string(Doc* doc, const char* src, int srclen)
         else
         if (doc->parse_mode == PARSE_MODE_NO_PARSE) {
           if ((node->name[1] == 'c' || node->name[1] == 'C')
-          &&  strcasecmp(&node->name[1], "chxj:if") == 0) {
+              &&  strcasecmp(&node->name[1], "chxj:if") == 0) {
             if (doc->now_parent_node->parent != NULL) {
               doc->now_parent_node = doc->now_parent_node->parent;
               doc->parse_mode = PARSE_MODE_CHTML;
@@ -206,9 +211,9 @@ qs_parse_string(Doc* doc, const char* src, int srclen)
           continue;
       }
 
-      if (doc->parse_mode == PARSE_MODE_CHTML && 
-      (*node->name == 'c' || *node->name == 'C') &&
-      strcasecmp(node->name, "chxj:if") == 0) {
+      if (doc->parse_mode == PARSE_MODE_CHTML 
+          && (*node->name == 'c' || *node->name == 'C') 
+          &&  strcasecmp(node->name, "chxj:if") == 0) {
         Attr* parse_attr;
 
         doc->parse_mode = PARSE_MODE_NO_PARSE;
@@ -238,6 +243,7 @@ qs_parse_string(Doc* doc, const char* src, int srclen)
       node->name  = (char*)apr_palloc(doc->pool,4+1);
       node->otext = (char*)apr_palloc(doc->pool,endpoint+1);
       node->size  = endpoint;
+      node->line  = nl_cnt;
       memset(node->value, 0, endpoint+1);
       memset(node->otext, 0, endpoint+1);
       memset(node->name,  0, 4+1       );