OSDN Git Service

* Added h2 tag with CSS for au XHTML converter.
authorkonn <konn@1a406e8e-add9-4483-a2c8-d8cac5b7c224>
Sun, 13 Jul 2008 14:44:31 +0000 (14:44 +0000)
committerkonn <konn@1a406e8e-add9-4483-a2c8-d8cac5b7c224>
Sun, 13 Jul 2008 14:44:31 +0000 (14:44 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/modchxj/mod_chxj/branches/sandbox@2898 1a406e8e-add9-4483-a2c8-d8cac5b7c224

Makefile.in
configure
configure.ac
src/Makefile.am
src/Makefile.in
src/chxj_xhtml_mobile_1_0.c
src/css/config.status
test/chxj_xhtml_mobile_1_0/test_chxj_xhtml_mobile_1_0.c

index 8fb1942..a18fc68 100644 (file)
@@ -90,8 +90,6 @@ CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
-CROCO_06_CONFIG = @CROCO_06_CONFIG@
-CROCO_CONFIG = @CROCO_CONFIG@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
index 6687556..f7d7013 100755 (executable)
--- a/configure
+++ b/configure
@@ -880,8 +880,6 @@ APR_CONFIG
 APR_1_CONFIG
 APU_CONFIG
 APU_1_CONFIG
-CROCO_CONFIG
-CROCO_06_CONFIG
 PCRE_CONFIG
 PCRE_1_CONFIG
 LIBOBJS
@@ -1511,7 +1509,6 @@ Optional Packages:
   --with-apr-config=ARG  Path of apr-config program file.
   --with-apu-config=ARG  Path of apu-config program file.
   --with-pcre-config=ARG  Path of pcre-config program file.
-  --with-croco-config=ARG  Path of croco-config program file.
   --with-memcached-header Path of "memcached.h"
   --with-memcached-lib-dir Path of "libmemcached.so"
   --with-mysql-header=ARG  Path of "mysql.h"
@@ -4462,7 +4459,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 4465 "configure"' > conftest.$ac_ext
+  echo '#line 4462 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -7188,11 +7185,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7191: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7188: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7195: \$? = $ac_status" >&5
+   echo "$as_me:7192: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -7456,11 +7453,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7459: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7456: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7463: \$? = $ac_status" >&5
+   echo "$as_me:7460: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -7560,11 +7557,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7563: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7560: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:7567: \$? = $ac_status" >&5
+   echo "$as_me:7564: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -9857,7 +9854,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 9860 "configure"
+#line 9857 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -9957,7 +9954,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 9960 "configure"
+#line 9957 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12293,11 +12290,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12296: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:12293: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:12300: \$? = $ac_status" >&5
+   echo "$as_me:12297: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -12397,11 +12394,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12400: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:12397: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:12404: \$? = $ac_status" >&5
+   echo "$as_me:12401: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -13958,11 +13955,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13961: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13958: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:13965: \$? = $ac_status" >&5
+   echo "$as_me:13962: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -14062,11 +14059,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14065: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14062: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:14069: \$? = $ac_status" >&5
+   echo "$as_me:14066: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -16249,11 +16246,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16252: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16249: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:16256: \$? = $ac_status" >&5
+   echo "$as_me:16253: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -16517,11 +16514,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16520: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16517: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:16524: \$? = $ac_status" >&5
+   echo "$as_me:16521: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -16621,11 +16618,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16624: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16621: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:16628: \$? = $ac_status" >&5
+   echo "$as_me:16625: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -19428,21 +19425,6 @@ Please specify the --with-pcre-config option. And, please specify the place of t
 fi
 
 
-# Check whether --with-croco-config was given.
-if test "${with_croco_config+set}" = set; then
-  withval=$with_croco_config;
-fi
-
-if test "x$with_croco_config" = "xyes" ; then
-    { { echo "$as_me:$LINENO: error:
-Please specify the --with-croco-config option. And, please specify the place of the croco-config program.
-" >&5
-echo "$as_me: error:
-Please specify the --with-croco-config option. And, please specify the place of the croco-config program.
-" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
 
 # Check whether --enable-img-conv-f was given.
 if test "${enable_img_conv_f+set}" = set; then
@@ -19958,106 +19940,6 @@ if test "x$with_apu_config" != "x" ; then
   APU_CONFIG=$with_apu_config
 fi
 
-if test "x$with_croco_config" = "x" ; then
-  # Extract the first word of "croco-config", so it can be a program name with args.
-set dummy croco-config; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_CROCO_CONFIG+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $CROCO_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_CROCO_CONFIG="$CROCO_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
-for as_dir in $as_dummy
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_CROCO_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_path_CROCO_CONFIG" && ac_cv_path_CROCO_CONFIG="no"
-  ;;
-esac
-fi
-CROCO_CONFIG=$ac_cv_path_CROCO_CONFIG
-if test -n "$CROCO_CONFIG"; then
-  { echo "$as_me:$LINENO: result: $CROCO_CONFIG" >&5
-echo "${ECHO_T}$CROCO_CONFIG" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-  if test "x$CROCO_CONFIG" = "xno" ; then
-    # Extract the first word of "croco-0.6-config", so it can be a program name with args.
-set dummy croco-0.6-config; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_CROCO_06_CONFIG+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $CROCO_06_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_CROCO_06_CONFIG="$CROCO_06_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
-for as_dir in $as_dummy
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_CROCO_06_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_path_CROCO_06_CONFIG" && ac_cv_path_CROCO_06_CONFIG="no"
-  ;;
-esac
-fi
-CROCO_06_CONFIG=$ac_cv_path_CROCO_06_CONFIG
-if test -n "$CROCO_06_CONFIG"; then
-  { echo "$as_me:$LINENO: result: $CROCO_06_CONFIG" >&5
-echo "${ECHO_T}$CROCO_06_CONFIG" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-    if test "x$CROCO_06_CONFIG" = "xno" ; then
-      { { echo "$as_me:$LINENO: error: croco-config and croco-0.6-config not found." >&5
-echo "$as_me: error: croco-config and croco-0.6-config not found." >&2;}
-   { (exit 1); exit 1; }; }
-    else
-      CROCO_CONFIG="$CROCO_06_CONFIG"
-    fi
-  fi
-fi
-if test "x$with_apu_config" != "x" ; then
-  APU_CONFIG=$with_apu_config
-fi
-
-
 case $host_os in
   freebsd*)
     CFLAGS="${CFLAGS} -I/usr/local/include "
@@ -20073,17 +19955,13 @@ LIBS="${LIBS} `${APR_CONFIG} --ldflags` `${APR_CONFIG} --libs` "
 LIBS="${LIBS} `${APU_CONFIG} --ldflags` `${APU_CONFIG} --libs` "
 LIBS="${LIBS} ${MYSQL_COOKIE_LIBS}"
 LIBS="${LIBS} ${MEMCACHE_COOKIE_LIBS} "
-<<<<<<< HEAD:configure
-LIBS="${LIBS} `${CROCO_CONFIG} --libs` "
-=======
 LIBS="${LIBS} serf/.libs/libserf-0.a"
->>>>>>> branch_0.12.0:configure
+LIBS="${LIBS} css/src/.libs/libscss.a"
 CFLAGS="${CFLAGS} `${WAND_CONFIG} --cppflags` `${WAND_CONFIG} --cflags`"
 CFLAGS="${CFLAGS} `${APR_CONFIG} --includes` `${APR_CONFIG} --cflags` `${APR_CONFIG} --cppflags`"
 CFLAGS="${CFLAGS} `${APU_CONFIG} --includes`"
 CFLAGS="${CFLAGS} ${MYSQL_COOKIE_DEFS}"
 CFLAGS="${CFLAGS} ${MEMCACHE_COOKIE_DEFS}"
-CFLAGS="${CFLAGS} `${CROCO_CONFIG} --cflags`"
 CPPFLAGS="${CPPFLAGS} `${APR_CONFIG} --includes` -I${with_apache_header}"
 CPPFLAGS="${CPPFLAGS} ${MYSQL_COOKIE_DEFS}"
 CPPFLAGS="${CPPFLAGS} ${MEMCACHE_COOKIE_DEFS}"
@@ -22479,8 +22357,6 @@ APR_CONFIG!$APR_CONFIG$ac_delim
 APR_1_CONFIG!$APR_1_CONFIG$ac_delim
 APU_CONFIG!$APU_CONFIG$ac_delim
 APU_1_CONFIG!$APU_1_CONFIG$ac_delim
-CROCO_CONFIG!$CROCO_CONFIG$ac_delim
-CROCO_06_CONFIG!$CROCO_06_CONFIG$ac_delim
 PCRE_CONFIG!$PCRE_CONFIG$ac_delim
 PCRE_1_CONFIG!$PCRE_1_CONFIG$ac_delim
 LIBOBJS!$LIBOBJS$ac_delim
@@ -22490,7 +22366,7 @@ DDEFS!$DDEFS$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 25; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 23; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
index 1d61257..7b5f0e5 100644 (file)
@@ -74,17 +74,6 @@ Please specify the --with-pcre-config option. And, please specify the place of t
 ])
 fi
 
-dnl ==================================================
-dnl
-dnl croco-config
-dnl
-dnl ==================================================
-AC_ARG_WITH(croco-config, [  --with-croco-config=ARG  Path of croco-config program file.])
-if test "x$with_croco_config" = "xyes" ; then
-    AC_MSG_ERROR([
-Please specify the --with-croco-config option. And, please specify the place of the croco-config program.
-])
-fi
 
 
 dnl ==================================================
@@ -244,22 +233,6 @@ if test "x$with_apu_config" != "x" ; then
   APU_CONFIG=$with_apu_config
 fi
 
-if test "x$with_croco_config" = "x" ; then
-  AC_PATH_PROG(CROCO_CONFIG, croco-config, no, /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin)
-  if test "x$CROCO_CONFIG" = "xno" ; then
-    AC_PATH_PROG(CROCO_06_CONFIG, croco-0.6-config, no, /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin)
-    if test "x$CROCO_06_CONFIG" = "xno" ; then
-      AC_MSG_ERROR([croco-config and croco-0.6-config not found.])
-    else
-      CROCO_CONFIG="$CROCO_06_CONFIG"
-    fi
-  fi
-fi
-if test "x$with_apu_config" != "x" ; then
-  APU_CONFIG=$with_apu_config
-fi
-
-
 case $host_os in
   freebsd*)
     CFLAGS="${CFLAGS} -I/usr/local/include "
@@ -276,12 +249,12 @@ LIBS="${LIBS} `${APU_CONFIG} --ldflags` `${APU_CONFIG} --libs` "
 LIBS="${LIBS} ${MYSQL_COOKIE_LIBS}"
 LIBS="${LIBS} ${MEMCACHE_COOKIE_LIBS} "
 LIBS="${LIBS} serf/.libs/libserf-0.a"
+LIBS="${LIBS} css/src/.libs/libscss.a"
 CFLAGS="${CFLAGS} `${WAND_CONFIG} --cppflags` `${WAND_CONFIG} --cflags`"
 CFLAGS="${CFLAGS} `${APR_CONFIG} --includes` `${APR_CONFIG} --cflags` `${APR_CONFIG} --cppflags`"
 CFLAGS="${CFLAGS} `${APU_CONFIG} --includes`"
 CFLAGS="${CFLAGS} ${MYSQL_COOKIE_DEFS}"
 CFLAGS="${CFLAGS} ${MEMCACHE_COOKIE_DEFS}"
-CFLAGS="${CFLAGS} `${CROCO_CONFIG} --cflags`"
 CPPFLAGS="${CPPFLAGS} `${APR_CONFIG} --includes` -I${with_apache_header}"
 CPPFLAGS="${CPPFLAGS} ${MYSQL_COOKIE_DEFS}"
 CPPFLAGS="${CPPFLAGS} ${MEMCACHE_COOKIE_DEFS}"
index a6a445f..a19d0c6 100644 (file)
@@ -42,9 +42,9 @@ libmod_chxj_la_SOURCES = mod_chxj.c \
     chxj_css.c
 
 
-libmod_chxj_la_CFLAGS = -O2 -prefer-pic @QDEFS@ @DDEFS@ -I. -I../include -I@with_apache_header@  -I./serf
+libmod_chxj_la_CFLAGS = -O2 -prefer-pic @QDEFS@ @DDEFS@ -I. -I../include -I@with_apache_header@  -I./serf -I./css/include
 AM_CFLAGS = @CFLAGS@ -O2 -prefer-pic @QDEFS@ @DDEFS@ -I. -I../include -I@with_apache_header@
-libmod_chxj_la_DEPENDENCIES = serf/libserf-0.la
+libmod_chxj_la_DEPENDENCIES = serf/libserf-0.la css/src/libscss.la
 lib_LTLIBRARIES = libmod_chxj.la
 
 make_so:
@@ -53,14 +53,15 @@ make_so:
 serf/libserf-0.la:
        (cd serf; ./configure --with-apr=`dirname @APR_CONFIG@` --with-apr-util=`dirname @APU_CONFIG@`; make)
 
+css/src/libscss.la:
+       (cd css; ./configure --with-apr-config=@APR_CONFIG@ --with-apu-config=@APU_CONFIG@; make)
+
 clean:
        rm -fr .libs
        rm -f *.o *.lo *.la
        rm -f mod_chxj.so
-       (cd serf; make clean)
-
-serf/libserf-0.la:
-       (cd serf; ./configure --with-apr=`dirname @APR_CONFIG@` --with-apr-util=`dirname @APU_CONFIG@`; make)
+       @(cd serf; make clean)
+       @(cd css; make clean)
 
 install: make_so
        @@APXS@ -i -n "chxj" @PACKAGE_NAME@.so 
index 94fd47b..6ab0978 100644 (file)
@@ -119,8 +119,6 @@ CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
-CROCO_06_CONFIG = @CROCO_06_CONFIG@
-CROCO_CONFIG = @CROCO_CONFIG@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
@@ -267,9 +265,9 @@ libmod_chxj_la_SOURCES = mod_chxj.c \
     chxj_serf.c \
     chxj_css.c
 
-libmod_chxj_la_CFLAGS = -O2 -prefer-pic @QDEFS@ @DDEFS@ -I. -I../include -I@with_apache_header@  -I./serf
+libmod_chxj_la_CFLAGS = -O2 -prefer-pic @QDEFS@ @DDEFS@ -I. -I../include -I@with_apache_header@  -I./serf -I./css/include
 AM_CFLAGS = @CFLAGS@ -O2 -prefer-pic @QDEFS@ @DDEFS@ -I. -I../include -I@with_apache_header@
-libmod_chxj_la_DEPENDENCIES = serf/libserf-0.la
+libmod_chxj_la_DEPENDENCIES = serf/libserf-0.la css/src/libscss.la
 lib_LTLIBRARIES = libmod_chxj.la
 all: all-am
 
@@ -873,14 +871,15 @@ make_so:
 serf/libserf-0.la:
        (cd serf; ./configure --with-apr=`dirname @APR_CONFIG@` --with-apr-util=`dirname @APU_CONFIG@`; make)
 
+css/src/libscss.la:
+       (cd css; ./configure --with-apr-config=@APR_CONFIG@ --with-apu-config=@APU_CONFIG@; make)
+
 clean:
        rm -fr .libs
        rm -f *.o *.lo *.la
        rm -f mod_chxj.so
-       (cd serf; make clean)
-
-serf/libserf-0.la:
-       (cd serf; ./configure --with-apr=`dirname @APR_CONFIG@` --with-apr-util=`dirname @APU_CONFIG@`; make)
+       @(cd serf; make clean)
+       @(cd css; make clean)
 
 install: make_so
        @@APXS@ -i -n "chxj" @PACKAGE_NAME@.so 
index b97aa0b..9e0de49 100644 (file)
@@ -2014,37 +2014,51 @@ s_xhtml_1_0_start_h2_tag(void *pdoc, Node *node)
   xhtml_t *xhtml = GET_XHTML(pdoc);
   Doc     *doc = xhtml->doc;
   Attr    *attr;
+  char    *attr_style = NULL;
+  char    *attr_align = NULL;
 
-  W_L("<h2");
   for (attr = qs_get_attr(doc,node);
        attr;
        attr = qs_get_next_attr(doc,attr)) {
-    char* name;
-    char* value;
-    name  = qs_get_attr_name(doc,attr);
-    value = qs_get_attr_value(doc,attr);
+    char *name  = qs_get_attr_name(doc,attr);
+    char *value = qs_get_attr_value(doc,attr);
     if (STRCASEEQ('a','A',"align", name)) {
-      if (value) {
-        if (STRCASEEQ('l','L',"left",value)) {
-          W_L(" style=\"");
-          W_L("text-align:left");
-          W_L("\"");
+      if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
+        attr_align = value;
+      }
+    }
+    else if (STRCASEEQ('s','S',"style",name) && value && *value) {
+      attr_style = value;
+    }
+  }
+  if (IS_CSS_ON(xhtml->entryp)) {
+    css_prop_list_t *style = s_xhtml_1_0_push_and_get_now_style(pdoc, node, attr_style);
+    if (style) {
+      css_property_t *list_style_type_prop = chxj_css_get_property_value(doc, style, "text-align");
+      css_property_t *cur;
+      for (cur = list_style_type_prop->next; cur != list_style_type_prop; cur = cur->next) {
+        if (STRCASEEQ('l','L',"left", cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "left");
         }
-        else if (STRCASEEQ('r','R',"right",value)) {
-          W_L(" style=\"");
-          W_L("text-align:right");
-          W_L("\"");
+        else if (STRCASEEQ('c','C',"center",cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "center");
         }
-        else if (STRCASEEQ('c','C',"center",value)) {
-          W_L(" style=\"");
-          W_L("text-align:center");
-          W_L("\"");
+        else if (STRCASEEQ('r','R',"right",cur->value)) {
+          attr_align = apr_pstrdup(doc->pool, "right");
         }
-        break;
       }
     }
   }
+  W_L("<h2");
+  if (attr_align) {
+    W_L(" style=\"");
+    W_L("text-align:");
+    W_V(attr_align);
+    W_L(";");
+    W_L("\"");
+  }
   W_L(">");
+
   return xhtml->out;
 }
 
@@ -2064,6 +2078,9 @@ s_xhtml_1_0_end_h2_tag(void *pdoc, Node *UNUSED(child))
   Doc     *doc   = xhtml->doc;
 
   W_L("</h2>");
+  if (IS_CSS_ON(xhtml->entryp)) {
+    chxj_css_pop_prop_list(xhtml->css_prop_stack);
+  }
   return xhtml->out;
 }
 
index 652f16a..ff0653b 100755 (executable)
@@ -335,7 +335,7 @@ Report bugs to <bug-autoconf@gnu.org>."
 ac_cs_version="\
 scss config.status 1.0.0
 configured by ./configure, generated by GNU Autoconf 2.61,
-  with options \"\"
+  with options \"'--with-apr-config=/usr/bin/apr-config' '--with-apu-config=/usr/bin/apu-config'\"
 
 Copyright (C) 2006 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
@@ -410,10 +410,10 @@ if $ac_cs_silent; then
 fi
 
 if $ac_cs_recheck; then
-  echo "running CONFIG_SHELL=/bin/sh /bin/sh ./configure " $ac_configure_extra_args " --no-create --no-recursion" >&6
+  echo "running CONFIG_SHELL=/bin/sh /bin/sh ./configure " '--with-apr-config=/usr/bin/apr-config' '--with-apu-config=/usr/bin/apu-config' $ac_configure_extra_args " --no-create --no-recursion" >&6
   CONFIG_SHELL=/bin/sh
   export CONFIG_SHELL
-  exec /bin/sh "./configure" $ac_configure_extra_args --no-create --no-recursion
+  exec /bin/sh "./configure" '--with-apr-config=/usr/bin/apr-config' '--with-apu-config=/usr/bin/apu-config' $ac_configure_extra_args --no-create --no-recursion
 fi
 
 exec 5>>config.log
index e16f8ff..c18de1f 100644 (file)
@@ -4067,7 +4067,7 @@ void test_xhtml_h2_tag_006()
 void test_xhtml_h2_tag_007() 
 {
 #define  TEST_STRING "<h2 align=\"left\"></h2>"
-#define  RESULT_STRING "<h2 style=\"text-align:left\"></h2>"
+#define  RESULT_STRING "<h2 style=\"text-align:left;\"></h2>"
   char  *ret;
   char  *tmp;
   device_table spec;
@@ -4096,7 +4096,7 @@ void test_xhtml_h2_tag_007()
 void test_xhtml_h2_tag_008() 
 {
 #define  TEST_STRING "<h2 align=\"right\"></h2>"
-#define  RESULT_STRING "<h2 style=\"text-align:right\"></h2>"
+#define  RESULT_STRING "<h2 style=\"text-align:right;\"></h2>"
   char  *ret;
   char  *tmp;
   device_table spec;
@@ -4125,7 +4125,7 @@ void test_xhtml_h2_tag_008()
 void test_xhtml_h2_tag_009() 
 {
 #define  TEST_STRING "<h2 align=\"center\"></h2>"
-#define  RESULT_STRING "<h2 style=\"text-align:center\"></h2>"
+#define  RESULT_STRING "<h2 style=\"text-align:center;\"></h2>"
   char  *ret;
   char  *tmp;
   device_table spec;
@@ -16583,6 +16583,258 @@ void test_xhtml_h1_tag_with_css_006()
 #undef TEST_STRING
 #undef RESULT_STRING
 }
+
+
+
+/*===========================================================================*/
+/* h2 tag with CSS                                                           */
+/*===========================================================================*/
+char *test_chxj_serf_get043(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
+{
+  static char *css = "a:focus { display: none }\n"
+                     "a:link  { display: none }\n"
+                     "a       { display: none }\n"
+                     "hr      { display: none }\n"
+                     "a:visited { display:none }\n"
+                     "h2      { text-align: right }\n";
+  *len = strlen(css);
+  call_check = 1;
+  return css;
+}
+void test_xhtml_h2_tag_with_css_001()
+{
+#define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
+                     "</head><body><h2>あいう</h2></body></html>"
+#define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Windows-31J\"?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML Basic 1.0//EN\" \"http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd\">" \
+                       "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
+                       "<head></head><body><h2 style=\"text-align:right;\">あいう</h2></body></html>"
+  char  *ret;
+  char  *tmp;
+  device_table spec;
+  chxjconvrule_entry entry;
+  cookie_t cookie;
+  apr_size_t destlen;
+  APR_INIT;
+  chxj_serf_get = test_chxj_serf_get043;
+  call_check = 0;
+
+  COOKIE_INIT(cookie);
+
+  SPEC_INIT(spec);
+  destlen = sizeof(TEST_STRING)-1;
+  entry.action |= CONVRULE_CSS_ON_BIT;
+
+  tmp = chxj_encoding(&r, TEST_STRING, &destlen);
+  ret = chxj_convert_xhtml_mobile_1_0(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
+  ret = chxj_rencoding(&r, ret, &destlen);
+  CU_ASSERT(ret != NULL);
+  CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
+  CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
+  CU_ASSERT(call_check == 1);
+
+  APR_TERM;
+#undef TEST_STRING
+#undef RESULT_STRING
+}
+char *test_chxj_serf_get044(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
+{
+  static char *css = "a:focus { display: none }\n"
+                     "a:link  { display: none }\n"
+                     "a       { display: none }\n"
+                     "hr      { display: none }\n"
+                     "a:visited { display:none }\n"
+                     "h2      { text-align: center }\n";
+  *len = strlen(css);
+  call_check = 1;
+  return css;
+}
+void test_xhtml_h2_tag_with_css_002()
+{
+#define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
+                     "</head><body><h2>あいう</h2></body></html>"
+#define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Windows-31J\"?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML Basic 1.0//EN\" \"http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd\">" \
+                       "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
+                       "<head></head><body><h2 style=\"text-align:center;\">あいう</h2></body></html>"
+  char  *ret;
+  char  *tmp;
+  device_table spec;
+  chxjconvrule_entry entry;
+  cookie_t cookie;
+  apr_size_t destlen;
+  APR_INIT;
+  chxj_serf_get = test_chxj_serf_get044;
+  call_check = 0;
+
+  COOKIE_INIT(cookie);
+
+  SPEC_INIT(spec);
+  destlen = sizeof(TEST_STRING)-1;
+  entry.action |= CONVRULE_CSS_ON_BIT;
+
+  tmp = chxj_encoding(&r, TEST_STRING, &destlen);
+  ret = chxj_convert_xhtml_mobile_1_0(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
+  ret = chxj_rencoding(&r, ret, &destlen);
+  CU_ASSERT(ret != NULL);
+  CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
+  CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
+  CU_ASSERT(call_check == 1);
+
+  APR_TERM;
+#undef TEST_STRING
+#undef RESULT_STRING
+}
+char *test_chxj_serf_get045(request_rec *r, apr_pool_t *ppool, const char *uri_path, int ss, apr_size_t *len)
+{
+  static char *css = "a:focus { display: none }\n"
+                     "a:link  { display: none }\n"
+                     "a       { display: none }\n"
+                     "hr      { display: none }\n"
+                     "a:visited { display:none }\n"
+                     "h2      { text-align: right }\n";
+  *len = strlen(css);
+  call_check = 1;
+  return css;
+}
+void test_xhtml_h2_tag_with_css_003()
+{
+#define  TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\"  type=\"text/css\" />" \
+                     "</head><body><h2>あいう</h2></body></html>"
+#define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Windows-31J\"?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML Basic 1.0//EN\" \"http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd\">" \
+                       "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
+                       "<head></head><body><h2 style=\"text-align:right;\">あいう</h2></body></html>"
+  char  *ret;
+  char  *tmp;
+  device_table spec;
+  chxjconvrule_entry entry;
+  cookie_t cookie;
+  apr_size_t destlen;
+  APR_INIT;
+  chxj_serf_get = test_chxj_serf_get045;
+  call_check = 0;
+
+  COOKIE_INIT(cookie);
+
+  SPEC_INIT(spec);
+  destlen = sizeof(TEST_STRING)-1;
+  entry.action |= CONVRULE_CSS_ON_BIT;
+
+  tmp = chxj_encoding(&r, TEST_STRING, &destlen);
+  ret = chxj_convert_xhtml_mobile_1_0(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
+  ret = chxj_rencoding(&r, ret, &destlen);
+  CU_ASSERT(ret != NULL);
+  CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
+  CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
+  CU_ASSERT(call_check == 1);
+
+  APR_TERM;
+#undef TEST_STRING
+#undef RESULT_STRING
+}
+void test_xhtml_h2_tag_with_css_004()
+{
+#define  TEST_STRING "<html><head>" \
+                     "</head><body><h2 style=\"text-align: left\">あいう</h2></body></html>"
+#define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Windows-31J\"?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML Basic 1.0//EN\" \"http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd\">" \
+                       "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
+                       "<head></head><body><h2 style=\"text-align:left;\">あいう</h2></body></html>"
+  char  *ret;
+  char  *tmp;
+  device_table spec;
+  chxjconvrule_entry entry;
+  cookie_t cookie;
+  apr_size_t destlen;
+  APR_INIT;
+  chxj_serf_get = test_chxj_serf_get045;
+  call_check = 0;
+
+  COOKIE_INIT(cookie);
+
+  SPEC_INIT(spec);
+  destlen = sizeof(TEST_STRING)-1;
+  entry.action |= CONVRULE_CSS_ON_BIT;
+
+  tmp = chxj_encoding(&r, TEST_STRING, &destlen);
+  ret = chxj_convert_xhtml_mobile_1_0(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
+  ret = chxj_rencoding(&r, ret, &destlen);
+  CU_ASSERT(ret != NULL);
+  CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
+  CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
+  CU_ASSERT(call_check == 0);
+
+  APR_TERM;
+#undef TEST_STRING
+#undef RESULT_STRING
+}
+void test_xhtml_h2_tag_with_css_005()
+{
+#define  TEST_STRING "<html><head>" \
+                     "</head><body><h2 style=\"text-align: center\">あいう</h2></body></html>"
+#define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Windows-31J\"?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML Basic 1.0//EN\" \"http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd\">" \
+                       "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
+                       "<head></head><body><h2 style=\"text-align:center;\">あいう</h2></body></html>"
+  char  *ret;
+  char  *tmp;
+  device_table spec;
+  chxjconvrule_entry entry;
+  cookie_t cookie;
+  apr_size_t destlen;
+  APR_INIT;
+  chxj_serf_get = test_chxj_serf_get045;
+  call_check = 0;
+
+  COOKIE_INIT(cookie);
+
+  SPEC_INIT(spec);
+  destlen = sizeof(TEST_STRING)-1;
+  entry.action |= CONVRULE_CSS_ON_BIT;
+
+  tmp = chxj_encoding(&r, TEST_STRING, &destlen);
+  ret = chxj_convert_xhtml_mobile_1_0(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
+  ret = chxj_rencoding(&r, ret, &destlen);
+  CU_ASSERT(ret != NULL);
+  CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
+  CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
+  CU_ASSERT(call_check == 0);
+
+  APR_TERM;
+#undef TEST_STRING
+#undef RESULT_STRING
+}
+void test_xhtml_h2_tag_with_css_006()
+{
+#define  TEST_STRING "<html><head>" \
+                     "</head><body><h2 style=\"text-align: right\">あいう</h2></body></html>"
+#define  RESULT_STRING "<?xml version=\"1.0\" encoding=\"Windows-31J\"?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML Basic 1.0//EN\" \"http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd\">" \
+                       "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
+                       "<head></head><body><h2 style=\"text-align:right;\">あいう</h2></body></html>"
+  char  *ret;
+  char  *tmp;
+  device_table spec;
+  chxjconvrule_entry entry;
+  cookie_t cookie;
+  apr_size_t destlen;
+  APR_INIT;
+  chxj_serf_get = test_chxj_serf_get045;
+  call_check = 0;
+
+  COOKIE_INIT(cookie);
+
+  SPEC_INIT(spec);
+  destlen = sizeof(TEST_STRING)-1;
+  entry.action |= CONVRULE_CSS_ON_BIT;
+
+  tmp = chxj_encoding(&r, TEST_STRING, &destlen);
+  ret = chxj_convert_xhtml_mobile_1_0(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
+  ret = chxj_rencoding(&r, ret, &destlen);
+  CU_ASSERT(ret != NULL);
+  CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
+  CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
+  CU_ASSERT(call_check == 0);
+
+  APR_TERM;
+#undef TEST_STRING
+#undef RESULT_STRING
+}
 /*
  * vim:ts=2 et
  */