You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-cvs@tcl.apache.org by mx...@apache.org on 2013/08/29 23:20:38 UTC
svn commit: r1518826 - in /tcl/rivet/branches/2.1: ./ doc/ doc/xml/
rivet/packages/form/ rivet/packages/session/ rivet/packages/tclrivet/
src/apache-2/ src/parser/ src/rivetcmds/ tests/
Author: mxmanghi
Date: Thu Aug 29 21:20:38 2013
New Revision: 1518826
URL: http://svn.apache.org/r1518826
Log: (empty)
Added:
tcl/rivet/branches/2.1/src/rivetcmds/
- copied from r1517865, tcl/rivet/trunk/src/rivetcmds/
tcl/rivet/branches/2.1/src/rivetcmds/rivetCore.c
- copied unchanged from r1517865, tcl/rivet/trunk/src/rivetcmds/rivetCore.c
tcl/rivet/branches/2.1/src/rivetcmds/rivetInspect.c
- copied unchanged from r1517865, tcl/rivet/trunk/src/rivetcmds/rivetInspect.c
tcl/rivet/branches/2.1/tests/parsestring.rvt
- copied unchanged from r1517865, tcl/rivet/trunk/tests/parsestring.rvt
Removed:
tcl/rivet/branches/2.1/src/apache-2/rivetConf.c
tcl/rivet/branches/2.1/src/apache-2/rivetCore.c
Modified:
tcl/rivet/branches/2.1/ (props changed)
tcl/rivet/branches/2.1/ChangeLog
tcl/rivet/branches/2.1/INSTALL
tcl/rivet/branches/2.1/Makefile.am
tcl/rivet/branches/2.1/Makefile.in
tcl/rivet/branches/2.1/configure.ac
tcl/rivet/branches/2.1/doc/ (props changed)
tcl/rivet/branches/2.1/doc/Makefile.am
tcl/rivet/branches/2.1/doc/rivet.xml
tcl/rivet/branches/2.1/doc/xml/commands.xml
tcl/rivet/branches/2.1/doc/xml/install.xml
tcl/rivet/branches/2.1/rivet/packages/form/form.tcl
tcl/rivet/branches/2.1/rivet/packages/form/form2.tcl
tcl/rivet/branches/2.1/rivet/packages/session/session-class.tcl
tcl/rivet/branches/2.1/rivet/packages/tclrivet/tclrivet.tcl
tcl/rivet/branches/2.1/src/apache-2/Makefile.am
tcl/rivet/branches/2.1/src/apache-2/mod_rivet.c
tcl/rivet/branches/2.1/src/apache-2/mod_rivet.h
tcl/rivet/branches/2.1/src/parser/parserPkgInit.c
tcl/rivet/branches/2.1/src/parser/rivetParser.c
tcl/rivet/branches/2.1/tests/parse.test
Propchange: tcl/rivet/branches/2.1/
------------------------------------------------------------------------------
Merged /tcl/rivet/trunk:r1492454-1517865
Modified: tcl/rivet/branches/2.1/ChangeLog
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/ChangeLog?rev=1518826&r1=1518825&r2=1518826&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/ChangeLog (original)
+++ tcl/rivet/branches/2.1/ChangeLog Thu Aug 29 21:20:38 2013
@@ -1,13 +1,87 @@
+2013-08-29 Massimo Manghi <mx...@apache.org>
+ * 2.1: committing changes merged from trunk after release of 2.1.2
+
+2013-08-26 Massimo Manghi <mx...@apache.org>
+ * configure.ac: expanded warning message about broken implementations
+ of Tcl when using forks and the event loop
+ * Makefile.am: target 'install' now depends on targets install-binaries and
+ install-packages, thus install the whole Rivet code as it did before 2.1.2.
+ Packagers wanting to separated binary and Tcl code can draw on those 2
+ targets
+ * INSTALL,doc/xml/install.xml: changed documentation to reflect the restored
+ organization of install targets
+
+2013-08-12 Massimo Manghi <mx...@apache.org>
+ * rivet/packages/form/form2.tcl,form.tcl: form packages called Rivet's command
+ '::rivet::env' in its unqualified form. Fixed adding the ::rivet namespace
+ specification.
+ * src/apache-2/rivetCore.c: errata corrige for entry added on 2013-07-19:
+ command 'parse -string' superseded test command parsestr, thus removed from
+ rivetCore.c
+
+2013-08-07 Massimo Manghi <mx...@apache.org>
+ * src/apache-2/mod_rivet.c: adding MPM descripting fields to the 'server' array
+ * configure.ac: warning message about Tcl version not supporting fork correctly
+ moved to the end of configure.ac, so that it's more readable by the user
+
+2013-08-06 Massimo Manghi <mx...@apache.org>
+ * rivetcmds/rivetCore.c,rivetInspect.c: moved core commands into this new directory.
+ Their code is (nearly) independent from Apache version and in future it might be shared
+ between different versions/branches of the module
+ * src/apache-2/Makefile.am: changed reference to rivetCore.c and rivetConf.c to
+ their new position and new names
+ * src/apache-2/mod_rivet.c: conditional compilation to Tcl_InitIdentifier might
+ help preserving event loop on Unices where no pthreads_atfork call exists (Bug #55153)
+ * configure.ac: Tcl version checked to detect when the notifier might
+ not be working (Tcl < 8.5.15 and Tcl < 8.6.1). In case a warning message is printed
+
+2013-07-19 Massimo Manghi <mx...@apache.org>
+ * tests/parse.test,parsestring.rvt: adding test for 'parse -string' variant
+ to Rivet command 'parse'
+
+2013-07-17 Massimo Manghi <mx...@apache.org>
+ * src/apache-2/mod_rivet.[h|c],rivetCore.c: reverting new command 'parsestr' and
+turning string parsing command into the support for the new -string modifier of the
+ ordinary parse command
+
+2013-07-06 Massimo Manghi <mx...@apache.org>
+ * src/parser/parserPkgInit.c: commands are created through the RIVET_OBJ_CMD macro
+ * rivet/packages/tclrivet/tclrivet.tcl: loading the rivetparser library caused
+ weird side effects and the interpreter failed when this package was required
+ by a script. It's still to be understood why librivetparser was loaded using
+ command 'load' in tclrivet.tcl
+ * src/apache-2/mod_rivet.c: reverting an attempt to include rivetparser
+ as package required by default.
+
+2013-07-05 Massimo Manghi <mx...@apache.org>
+ * configure.ac: changed the default path for installation dir
+ * doc/xml/commands.xml: add manual page for command ::rivet::xml
+
2013-07-02 Massimo Manghi <mx...@apache.org>
* INSTALL: damn, I forgot to include in the rivet-2.1.2 the latest changes
to this file
+2013-06-28 Massimo Manghi <mx...@apache.org>
+ * src/apache-2/mod_rivet.c,rivetCore.c: command 'parsestr' to parse templates stored
+ in Tcl objects coded
+ * doc/Makefile.am: 'clean' target made a little terser
+
2013-06-26 Massimo Manghi <mx...@apache.org>
* Makefile.am: forcing install/unistall targets to recreate pkgIndex.tcl
in order to have a coherent directory of packages actually available
-2013-06-04 Massimo Manghi <mx...@apache.org>
- * 2.1/: merging and committing latest commits done to trunk
+2013-06-24 Massimo Manghi <mx...@apache.org>
+ * INSTALL: It must be made explicit installation is a two stage operation now
+
+2013-06-24 Massimo Manghi <mx...@apache.org>
+ * rivet/packages/session/session-class.tcl: two new methods 'load' (loads a
+ whole package data for a given package and session) and 'clear' (it deletes either
+ a whole package or a single data like for a session)
+
+2013-06-22 Massimo Manghi <mx...@apache.org>
+ * src/apache-2/mod_rivet.c: cleanup of unused code in mod_rivet.c. Adding comments
+ to undocumented functions
+ * src/parser/rivetParse.c: New TODO comment added
2013-06-12 Massimo Manghi <mx...@apache.org>
* Makefile.am: splitting install targets into 'make install' (mod_rivet.so,
Modified: tcl/rivet/branches/2.1/INSTALL
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/INSTALL?rev=1518826&r1=1518825&r2=1518826&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/INSTALL (original)
+++ tcl/rivet/branches/2.1/INSTALL Thu Aug 29 21:20:38 2013
@@ -12,12 +12,12 @@ the source tree running 'aclocal; autore
Example:
-./configure --with-tcl=/usr/lib/tcl8.5/ \
- --with-apxs=/usr/bin/apxs \
- --with-tclsh=/usr/bin/tclsh8.5 \
- --with-apache-version=2 \
- --with-rivet-target-dir=/usr/lib/rivet2.1 \
- --enable-version-display
+./configure --with-tcl=/usr/lib/tcl8.5/ \
+ --with-apxs=/usr/bin/apxs \
+ --with-tclsh=/usr/bin/tclsh8.5 \
+ --with-apache-version=2 \
+ --with-rivet-target-dir=/usr/lib/rivet2.1 \
+ --enable-version-display
2) if 'configure' was successful Rivet is ready for compilation
@@ -27,12 +27,6 @@ make
sudo make install
-4) Install Rivet utils with
-
-sudo make install-packages
-
-if your configuration doesn't require you to have administrative privileges.
-
Along with the usual 'configure' variables Rivet's configure script
handles other specific options.
Modified: tcl/rivet/branches/2.1/Makefile.am
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/Makefile.am?rev=1518826&r1=1518825&r2=1518826&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/Makefile.am (original)
+++ tcl/rivet/branches/2.1/Makefile.am Thu Aug 29 21:20:38 2013
@@ -14,21 +14,29 @@ SUBDIRS = src doc
RIVETLIB_DESTDIR = $(DESTDIR)@RIVET_TCL_TARGET@
RIVET_PACKAGES = $(RIVETLIB_DESTDIR)/packages
+# I expect this symbol sooner or later to be handled by configure for arch dependent builds
+# Current value is the rivetlib directory
+RIVET_LIBS_ARCH =
+
libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck
-install-data-local:
+install-data-local: install-binaries install-packages
+
+install-binaries:
$(mkinstalldirs) $(RIVETLIB_DESTDIR)
cp -v rivet/init.tcl $(RIVETLIB_DESTDIR)/
cp -rv rivet/rivet-tcl $(RIVETLIB_DESTDIR)/
-( cd $(RIVETLIB_DESTDIR); rm -f *.la; \
- echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join *[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
+ echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join $(RIVET_LIBS_ARCH)*[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
uninstall-local:
rm -f $(RIVETLIB_DESTDIR)/init.tcl
rm -fr $(RIVETLIB_DESTDIR)/rivet-tcl
rm -f $(RIVETLIB_DESTDIR)/librivetlib.so
rm -f $(RIVETLIB_DESTDIR)/librivetparser.so
+ rm -fr $(RIVETLIB_DESTDIR)/packages
+ rm -f $(RIVETLIB_DESTDIR)/pkgIndex.tcl
@if [ -z '$(wildcard $(RIVETLIB_DESTDIR)/*)' ]; then \
rmdir $(RIVETLIB_DESTDIR); \
fi
@@ -38,7 +46,7 @@ install-packages:
cp -rv rivet/packages/* $(RIVET_PACKAGES)
-( cd $(RIVETLIB_DESTDIR); \
echo 'eval file delete [glob [file join packages * pkgIndex.tcl]] pkgIndex.tcl' | @TCLSH_PROG@ ; \
- echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join *[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
+ echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join $(RIVET_LIBS_ARCH)*[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
uninstall-packages:
rm -fr $(RIVET_PACKAGES)
@@ -47,7 +55,7 @@ uninstall-packages:
@rmdir $(RIVETLIB_DESTDIR); \
fi
-( cd $(RIVETLIB_DESTDIR); \
- echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join *[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
+ echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join $(RIVET_LIBS_ARCH)*[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
#
distclean-local:
Modified: tcl/rivet/branches/2.1/Makefile.in
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/Makefile.in?rev=1518826&r1=1518825&r2=1518826&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/Makefile.in (original)
+++ tcl/rivet/branches/2.1/Makefile.in Thu Aug 29 21:20:38 2013
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -25,23 +24,51 @@
# before invoking pkg_mkIndex.
# 2013/01/20: removing libtool created .la files
VPATH = @srcdir@
-am__make_dryrun = \
- { \
- am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
- *) \
- for am__flg in $$MAKEFLAGS; do \
- case $$am__flg in \
- *=*|--*) ;; \
- *n*) am__dry=yes; break;; \
- esac; \
- done;; \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
esac; \
- test $$am__dry = yes; \
- }
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -61,12 +88,17 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = .
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(srcdir)/config.h.in \
- $(top_srcdir)/configure ChangeLog INSTALL TODO \
- tclconfig/ChangeLog tclconfig/compile tclconfig/config.guess \
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/configure $(am__configure_deps) \
+ $(srcdir)/config.h.in ChangeLog tclconfig/ChangeLog INSTALL \
+ README TODO tclconfig/compile tclconfig/config.guess \
tclconfig/config.sub tclconfig/depcomp tclconfig/install-sh \
- tclconfig/ltmain.sh tclconfig/missing
+ tclconfig/missing tclconfig/ltmain.sh \
+ $(top_srcdir)/tclconfig/config.guess \
+ $(top_srcdir)/tclconfig/config.sub \
+ $(top_srcdir)/tclconfig/install-sh \
+ $(top_srcdir)/tclconfig/ltmain.sh \
+ $(top_srcdir)/tclconfig/missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/tclconfig/tcl.m4 \
@@ -81,15 +113,28 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
SOURCES =
DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-dvi-recursive install-exec-recursive \
- install-html-recursive install-info-recursive \
- install-pdf-recursive install-ps-recursive install-recursive \
- installcheck-recursive installdirs-recursive pdf-recursive \
- ps-recursive uninstall-recursive
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -97,11 +142,33 @@ am__can_run_installinfo = \
esac
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
- $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
- distdir dist dist-all distcheck
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ cscope distdir dist dist-all distcheck
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
+ $(LISP)config.h.in
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
+CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
@@ -112,6 +179,7 @@ am__remove_distdir = \
&& rm -rf "$(distdir)" \
|| { sleep 5 && rm -rf "$(distdir)"; }; \
else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
@@ -139,12 +207,14 @@ am__relativize = \
reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
+DIST_TARGETS = dist-gzip
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APR_CPPFLAGS = @APR_CPPFLAGS@
APR_INCLUDES = @APR_INCLUDES@
APR_LDFLAGS = @APR_LDFLAGS@
@@ -334,6 +404,10 @@ EXTRA_DIST = LICENSE contrib debian doc
SUBDIRS = src doc
RIVETLIB_DESTDIR = $(DESTDIR)@RIVET_TCL_TARGET@
RIVET_PACKAGES = $(RIVETLIB_DESTDIR)/packages
+
+# I expect this symbol sooner or later to be handled by configure for arch dependent builds
+# Current value is the rivetlib directory
+RIVET_LIBS_ARCH =
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -398,22 +472,25 @@ distclean-libtool:
-rm -f libtool config.lt
# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
@@ -428,57 +505,12 @@ $(RECURSIVE_TARGETS):
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-$(RECURSIVE_CLEAN_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
@@ -494,12 +526,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCE
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
- list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@@ -511,15 +538,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCE
$$unique; \
fi; \
fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@@ -528,9 +551,31 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscope: cscope.files
+ test ! -s cscope.files \
+ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+clean-cscope:
+ -rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+ -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
distdir: $(DISTFILES)
$(am__remove_distdir)
@@ -598,40 +643,36 @@ distdir: $(DISTFILES)
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
- $(am__remove_distdir)
-
-dist-lzma: distdir
- tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
-dist dist-all: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- $(am__remove_distdir)
+dist dist-all:
+ $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+ $(am__post_remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
@@ -642,8 +683,6 @@ distcheck: dist
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
- *.tar.lzma*) \
- lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.lz*) \
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
@@ -655,9 +694,9 @@ distcheck: dist
*.zip*) \
unzip $(distdir).zip ;;\
esac
- chmod -R a-w $(distdir); chmod u+w $(distdir)
- mkdir $(distdir)/_build
- mkdir $(distdir)/_inst
+ chmod -R a-w $(distdir)
+ chmod u+w $(distdir)
+ mkdir $(distdir)/_build $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
@@ -689,7 +728,7 @@ distcheck: dist
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
@@ -825,15 +864,14 @@ ps-am:
uninstall-am: uninstall-local
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
- ctags-recursive install-am install-strip tags-recursive
+.MAKE: $(am__recursive_targets) all install-am install-strip
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am am--refresh check check-am clean clean-generic \
- clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
- dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \
- dist-zip distcheck distclean distclean-generic distclean-hdr \
- distclean-libtool distclean-local distclean-tags \
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+ am--refresh check check-am clean clean-cscope clean-generic \
+ clean-libtool cscope cscopelist-am ctags ctags-am dist \
+ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
+ dist-xz dist-zip distcheck distclean distclean-generic \
+ distclean-hdr distclean-libtool distclean-local distclean-tags \
distcleancheck distdir distuninstallcheck dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-data-local install-dvi install-dvi-am \
@@ -843,24 +881,28 @@ uninstall-am: uninstall-local
installcheck installcheck-am installdirs installdirs-am \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags tags-recursive uninstall uninstall-am uninstall-local
+ tags tags-am uninstall uninstall-am uninstall-local
libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck
-install-data-local:
+install-data-local: install-binaries install-packages
+
+install-binaries:
$(mkinstalldirs) $(RIVETLIB_DESTDIR)
cp -v rivet/init.tcl $(RIVETLIB_DESTDIR)/
cp -rv rivet/rivet-tcl $(RIVETLIB_DESTDIR)/
-( cd $(RIVETLIB_DESTDIR); rm -f *.la; \
- echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join *[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
+ echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join $(RIVET_LIBS_ARCH)*[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
uninstall-local:
rm -f $(RIVETLIB_DESTDIR)/init.tcl
rm -fr $(RIVETLIB_DESTDIR)/rivet-tcl
rm -f $(RIVETLIB_DESTDIR)/librivetlib.so
rm -f $(RIVETLIB_DESTDIR)/librivetparser.so
+ rm -fr $(RIVETLIB_DESTDIR)/packages
+ rm -f $(RIVETLIB_DESTDIR)/pkgIndex.tcl
@if [ -z '$(wildcard $(RIVETLIB_DESTDIR)/*)' ]; then \
rmdir $(RIVETLIB_DESTDIR); \
fi
@@ -870,7 +912,7 @@ install-packages:
cp -rv rivet/packages/* $(RIVET_PACKAGES)
-( cd $(RIVETLIB_DESTDIR); \
echo 'eval file delete [glob [file join packages * pkgIndex.tcl]] pkgIndex.tcl' | @TCLSH_PROG@ ; \
- echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join *[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
+ echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join $(RIVET_LIBS_ARCH)*[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
uninstall-packages:
rm -fr $(RIVET_PACKAGES)
@@ -879,7 +921,7 @@ uninstall-packages:
@rmdir $(RIVETLIB_DESTDIR); \
fi
-( cd $(RIVETLIB_DESTDIR); \
- echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join *[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
+ echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join $(RIVET_LIBS_ARCH)*[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
#
distclean-local:
Modified: tcl/rivet/branches/2.1/configure.ac
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/configure.ac?rev=1518826&r1=1518825&r2=1518826&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/configure.ac (original)
+++ tcl/rivet/branches/2.1/configure.ac Thu Aug 29 21:20:38 2013
@@ -22,7 +22,7 @@ dnl
# so you can encode the package version directly into the source files.
#-----------------------------------------------------------------------
-AC_INIT([Rivet],[2.1.2])
+AC_INIT([Rivet],[2.1.3])
TEA_INIT([3.9])
AC_CONFIG_AUX_DIR(tclconfig)
@@ -245,7 +245,7 @@ AC_DEFUN([APACHE],[
AC_ARG_WITH(
apache,
[ --with-apache[=DIR] Apache server base directory],
- , [with_apache="/usr/local/apache"]
+ , [with_apache="/usr/local/apache2"]
)
apache_base="${with_apache}"
AC_MSG_RESULT([$apache_base])
@@ -350,7 +350,7 @@ AC_DEFUN([APR_HANDLING],[
fi]
)
if test "${apr_found+set}" = set ; then
- AC_MSG_RESULT([$apr_found])
+ AC_MSG_RESULT([$apr_found])
dnl At this point we already have apr sorted out
dnl It actually calls another script, so the PATH needs to be set.
export PATH=$PATH:`dirname ${apr_found}`
@@ -369,19 +369,31 @@ AC_DEFUN([APR_HANDLING],[
#--------------------------------------------------------------------
# 6-Dec-2011: Introducing new ::rivet namespace. Some components
# (namely RivetTcl, providing Tcl level initialization) are required
-# within mod_rivet.c. Unfortunalely Tcl < 8.5.10 loaded shared
-# libs exporting names that clashed with Apache's own namespace and,
-# hence we have to make sure we are running a Tcl compatible version.
-# (See bug #3216070). If you're running Tcl < 8.5.10 we won't go any
-# further ahead...
+# within mod_rivet.c. Unfortunalely Tcl < 8.5.10 shared
+# libs exporting names could clash with Apache's binary own names.
+# Hence we have to make sure we are running a Tcl compatible version.
+# (See Tcl bug #3216070).
+#
+# Effect: If you're running Tcl < 8.5.10 we refuse to build Rivet...
AX_COMPARE_VERSION([$TCL_VERSION$TCL_PATCH_LEVEL],[lt],[8.5.10],[
AC_MSG_ERROR([Rivet 2.1 requires Tcl > 8.5.10 (current is $TCL_VERSION$TCL_PATCH_LEVEL)])
] , [
- AC_MSG_NOTICE([ok, we are running Tcl $TCL_VERSION$TCL_PATCH_LEVEL])
+ AC_MSG_NOTICE([we are building Rivet with Tcl $TCL_VERSION$TCL_PATCH_LEVEL])
])
+print_fileevent_msg="0"
+AX_COMPARE_VERSION([$TCL_VERSION$TCL_PATCH_LEVEL],[lt],[8.5.15],[
+ print_fileevent_msg="1"
+] , )
+
+
+AX_COMPARE_VERSION([$TCL_VERSION],[eq],[8.6],[
+ if test "$TCL_PATCH_LEVEL" = ".0" ; then
+ print_fileevent_msg="1"
+ fi
+] , )
# APACHE_VERSION
#
@@ -680,3 +692,15 @@ AC_CONFIG_FILES([Makefile src/Makefile s
#esac
AC_OUTPUT
+if test "$print_fileevent_msg" = "1"; then
+ AC_MSG_NOTICE([========================================================================])
+ AC_MSG_NOTICE([ WARNING!])
+ AC_MSG_NOTICE([========================================================================])
+ AC_MSG_NOTICE([The Tcl notifier (and consequently the event loop) might not be working ])
+ AC_MSG_NOTICE([in Rivet running Tcl $TCL_VERSION$TCL_PATCH_LEVEL and the 'prefork' MPM of Apache.])
+ AC_MSG_NOTICE([Recommended versions are:])
+ AC_MSG_NOTICE([ - threaded builds: Tcl >= 8.5.15 (8.5 version) or Tcl >= 8.6.1])
+ AC_MSG_NOTICE([ - any non-threaded build of Tcl >= 8.5.10])
+ AC_MSG_NOTICE([========================================================================])
+fi
+
Propchange: tcl/rivet/branches/2.1/doc/
------------------------------------------------------------------------------
Merged /tcl/rivet/trunk/doc:r1492454-1517865
Modified: tcl/rivet/branches/2.1/doc/Makefile.am
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/doc/Makefile.am?rev=1518826&r1=1518825&r2=1518826&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/doc/Makefile.am (original)
+++ tcl/rivet/branches/2.1/doc/Makefile.am Thu Aug 29 21:20:38 2013
@@ -73,14 +73,8 @@ $(MANDIRS):
# this target cleans everything up in the html directory
distclean:
- -rm html/*.html
- -rm html/*.css
- -rm html/images/*.*
- -rmdir html/images
- -rmdir html
- if [ -e graphics ]; then \
- rm graphics ; \
- fi
+ -rm -fr html/*.html
+ -rm -f graphics
-rm Makefile
.PHONY: examples
Modified: tcl/rivet/branches/2.1/doc/rivet.xml
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/doc/rivet.xml?rev=1518826&r1=1518825&r2=1518826&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/doc/rivet.xml (original)
+++ tcl/rivet/branches/2.1/doc/rivet.xml Thu Aug 29 21:20:38 2013
@@ -62,6 +62,7 @@
<year>2010</year>
<year>2011</year>
<year>2012</year>
+ <year>2013</year>
<holder>Apache Software Foundation</holder>
</copyright>
<author>
Modified: tcl/rivet/branches/2.1/doc/xml/commands.xml
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/doc/xml/commands.xml?rev=1518826&r1=1518825&r2=1518826&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/doc/xml/commands.xml (original)
+++ tcl/rivet/branches/2.1/doc/xml/commands.xml Thu Aug 29 21:20:38 2013
@@ -1691,6 +1691,46 @@ form_request end</programlisting>
separated by newline characters.
</para>
</refsect1>
- </refentry>
-
+ </refentry>
+
+ <refentry id="xml">
+ <refnamediv>
+ <refname>xml</refname>
+ <refpurpose>
+ XML Fragments creation
+ </refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>::rivet::xml</command>
+ <arg>string</arg>
+ <arg>tag descriptor</arg>
+ <arg>tag descriptor</arg>
+ <arg>...</arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Description</title>
+ <para>
+ Given a string and a variable number of tag descriptors return XML framgment made
+ by nesting the tags with the same hierarchical order they are listed on the command
+ line. The tag descriptors can be a one element list (the tag) or an odd-length list whose
+ first argument is the tag namme and the remaining elements are interpreted as
+ attribute name-attribute value pairs.
+ </para>
+ <para>
+ <command>::rivet::xml</command> can work as a replacement of <command>::rivet::html</command>
+ provided you take care of sending the string with command <command>puts</command>
+ </para>
+ <programlisting>::rivet::xml "a string" b u
+<== <b><u>a string</u></b></programlisting>
+ <para>
+ You can tell the tags which attributes they must have
+ </para>
+ <programlisting><command>::rivet::xml "a string" [list div class box id testbox] b i</command>
+<== <div class="box" id="testbox"><b><i>a string</i></b></div></programlisting>
+ <programlisting><command>::rivet::xml "text to be wrapped in XML" div [list a href "http://..../" title "info message"]</command>
+<== <div><a href="http://..../" title="info message">text to be wrapped in XML</a></div></programlisting>
+ </refsect1>
+ </refentry>
</section>
Modified: tcl/rivet/branches/2.1/doc/xml/install.xml
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/doc/xml/install.xml?rev=1518826&r1=1518825&r2=1518826&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/doc/xml/install.xml (original)
+++ tcl/rivet/branches/2.1/doc/xml/install.xml Thu Aug 29 21:20:38 2013
@@ -207,19 +207,13 @@ tar -xvf rivet-X.X.X.tar.gz</programlist
<programlisting>make install</programlisting>
<para>
to install the resulting files.
- This should copy the shared object (like <filename>mod_rivet.so</filename>, if one was
- successfully created, into Apache's <filename>libexec</filename> directory, as well as
- install some support scripts. This commands creates a functional Rivet module with its
- core language.
- </para>
- <para>
- Starting with 2.1.2 you need also to run
- </para>
- <programlisting>make install-packages</programlisting>
- <para>
- in order to have the Tcl packages (such as the
- <code>Session</code> or <code>form</code>) installed
- into their target directory
+ This should in turn invoke target <code>install-binaries</code>
+ which copies the shared object <filename>mod_rivet.so</filename>
+ into Apache's <filename>libexec</filename> directory as well as
+ install some support scripts, and target
+ <code>install-packages</code> which installs the utility
+ packages.This commands creates a functional Rivet module with its
+ core language.
</para>
</step>
</substeps>
Modified: tcl/rivet/branches/2.1/rivet/packages/form/form.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/rivet/packages/form/form.tcl?rev=1518826&r1=1518825&r2=1518826&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/rivet/packages/form/form.tcl (original)
+++ tcl/rivet/branches/2.1/rivet/packages/form/form.tcl Thu Aug 29 21:20:38 2013
@@ -35,7 +35,7 @@ package provide form 1.0
# set the form method to be a post and the action to be
# a refetching of the current page
set arguments(method) post
- set arguments(action) [env DOCUMENT_URI]
+ set arguments(action) [::rivet::env DOCUMENT_URI]
# use $this for the type for form-global stuff like form arguments
import_data form $this arguments $args
Modified: tcl/rivet/branches/2.1/rivet/packages/form/form2.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/rivet/packages/form/form2.tcl?rev=1518826&r1=1518825&r2=1518826&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/rivet/packages/form/form2.tcl (original)
+++ tcl/rivet/branches/2.1/rivet/packages/form/form2.tcl Thu Aug 29 21:20:38 2013
@@ -27,7 +27,7 @@ package provide form 2.0
# set the form method to be a post and the action to be
# a refetching of the current page
set arguments(method) post
- set arguments(action) [env DOCUMENT_URI]
+ set arguments(action) [::rivet::env DOCUMENT_URI]
# use $this for the type for form-global stuff like form arguments
import_data form $this arguments $args
Modified: tcl/rivet/branches/2.1/rivet/packages/session/session-class.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/rivet/packages/session/session-class.tcl?rev=1518826&r1=1518825&r2=1518826&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/rivet/packages/session/session-class.tcl (original)
+++ tcl/rivet/branches/2.1/rivet/packages/session/session-class.tcl Thu Aug 29 21:20:38 2013
@@ -347,6 +347,35 @@ package require Itcl
}
#
+ # load - given a package names returns a dictionary storing the key - value pairs for this session
+ #
+ #
+ method load {packageName} {
+ set package_d [dict create]
+
+ $dioObject forall "select key_,data from $sessionCacheTable where package_='$packageName' and session_id='[$this id]'" a {
+ dict set package_d $a(key_) $a(data)
+ }
+
+ return $package_d
+ }
+
+ # clear - given a package name and optionally a key it deletes rows in the cache for this session.
+ # when also the key value is specified only the row for that package-key pair is deleted
+ #
+ method clear {packageName {key ""}} {
+ if {$key == ""} {
+ set keyval [list [$this id] $packageName]
+ set keyfield {session_id package_}
+ } else {
+ set keyval [list [$this id] $packageName $key]
+ set keyfield {session_id package_ key_}
+ }
+
+ $dioObject delete $keyval -table $sessionCacheTable -keyfield $keyfield
+ }
+
+ #
# delete - given a user ID and looking at their IP address we inherited
# from the environment (thanks, webserver), remove them from the session
# table. (the session table is how the server remembers stuff about
Modified: tcl/rivet/branches/2.1/rivet/packages/tclrivet/tclrivet.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/rivet/packages/tclrivet/tclrivet.tcl?rev=1518826&r1=1518825&r2=1518826&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/rivet/packages/tclrivet/tclrivet.tcl (original)
+++ tcl/rivet/branches/2.1/rivet/packages/tclrivet/tclrivet.tcl Thu Aug 29 21:20:38 2013
@@ -18,8 +18,8 @@
package provide tclrivet 0.1
-load [file join [file dirname [info script]] .. .. \
- librivetparser[info sharedlibextension]]
+#load [file join [file dirname [info script]] .. .. \
+# librivetparser[info sharedlibextension]]
proc include { filename } {
set fl [ open $filename ]
Modified: tcl/rivet/branches/2.1/src/apache-2/Makefile.am
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/src/apache-2/Makefile.am?rev=1518826&r1=1518825&r2=1518826&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/src/apache-2/Makefile.am (original)
+++ tcl/rivet/branches/2.1/src/apache-2/Makefile.am Thu Aug 29 21:20:38 2013
@@ -36,15 +36,15 @@ mod_rivet_la_SOURCES = \
apache_request.c \
mod_rivet.c \
TclWebapache.c \
- rivetCore.c \
- rivetConf.c \
- ../rivetChannel.c \
+ ../rivetcmds/rivetCore.c \
+ ../rivetcmds/rivetInspect.c \
+ ../rivetChannel.c \
../parser/rivetParser.c
##mod_rivet_la_SOURCES = mod_rivet.c mod_rivet.h
mod_rivet_la_LDFLAGS = @TCL_LIB_SPEC@ @APXS_LDFLAGS@ @APR_LDFLAGS@ -module -avoid-version
-mod_rivet_la_LIBADD = @TCL_LIBS@ @APXS_LIBS@
+mod_rivet_la_LIBADD = @TCL_LIBS@ @APXS_LIBS@
mod_rivet_la_CPPFLAGS = @TCL_INCLUDES@ @APXS_CPPFLAGS@ @APXS_INCLUDES@ @APR_CPPFLAGS@ @APR_INCLUDES@ -DSTART_TAG='"<?"' -DEND_TAG='"?>"'
# APXS_CPPFLAGS_SHLIB
Modified: tcl/rivet/branches/2.1/src/apache-2/mod_rivet.c
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/src/apache-2/mod_rivet.c?rev=1518826&r1=1518825&r2=1518826&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/src/apache-2/mod_rivet.c (original)
+++ tcl/rivet/branches/2.1/src/apache-2/mod_rivet.c Thu Aug 29 21:20:38 2013
@@ -46,6 +46,8 @@
#include <apr_strings.h>
#include <apr_tables.h>
+#include <ap_mpm.h>
+
/* Tcl includes */
#include <tcl.h>
/* There is code ifdef'ed out below which uses internal
@@ -109,24 +111,29 @@ static int Rivet_chdir_file (const char
return chdir_retval;
}
-/* Function to be used should we desire to upload files to a variable */
-
-#if 0
-int
-Rivet_UploadHook(void *ptr, char *buf, int len, ApacheUpload *upload)
-{
- Tcl_Interp *interp = ptr;
- static int usenum = 0;
- static int uploaded = 0;
- if (oldptr != upload)
- {
- } else {
- }
-
- return len;
-}
-#endif /* 0 */
+/*
+ * -- Rivet_CheckType (request_rec *r)
+ *
+ * Utility function internally used to determine which type
+ * of file (whether rvt template or plain Tcl script) we are
+ * dealing with. In order to speed up multiple tests the
+ * the test returns an integer (RIVET_FILE) for rvt templates
+ * or TCL_FILE for Tcl scripts
+ *
+ * Argument:
+ *
+ * request_rec*: pointer to the current request record
+ *
+ * Returns:
+ *
+ * integer number meaning the type of file we are dealing with
+ *
+ * Side effects:
+ *
+ * none.
+ *
+ */
static int
Rivet_CheckType (request_rec *req)
@@ -143,98 +150,41 @@ Rivet_CheckType (request_rec *req)
return ctype;
}
-/*
- * Rivet_ParseFileArgString (char *szDocRoot, char *szArgs, char **file)
- *
- * parses a string like /path/file.ext?arg1=value1&arg2=value2 into
- * the filename and arguments. A Tcl_Hashtable is utilized for the
- * arguments and returned. The file name is appended to the szDocRoot
- * argument and stored in the *file pointer.
- */
-#if 0
-static int
-Rivet_ParseFileArgString (const char *szDocRoot, const char *szArgs, char **file,apr_pool_t *p,
- Tcl_HashTable *argTbl)
-{
- int flen = 1, argslen, newEntry, i;
- const char *rootPtr = szDocRoot, *argsPtr = szArgs, *argPos;
- char *filePtr;
- char *argument, *value;
- Tcl_HashEntry *entryPtr;
-
- /*
- * parse filename, that is everything before ? in the args string.
- * Append it to the document root, if this is not NULL.
- */
-
- while (*argsPtr != '?' && *argsPtr != '\0') {
- argsPtr++;
- }
- if (*argsPtr == '?')
- argslen = argsPtr-szArgs ;
- else
- argslen = 0;
- flen += strlen(szDocRoot) + argslen ;
- *file = (char*)apr_palloc(p,flen);
- strcat(*file,szDocRoot);
- strncat(*file,szArgs,argslen);
-
- if (argTbl == NULL)
- return RIVET_OK;
-
- /*
- * past this point, parse remainder of the args string. For every argument,
- * create a new entry in the argTbl Tcl_HashTable.
- */
- Tcl_InitHashTable (argTbl, TCL_STRING_KEYS);
-
- for (i = 0, argPos = argsPtr; i < strlen(argsPtr); i++) {
- if (*(argsPtr + i) == '=') {
- /* argument ends */
- argument = (char*) malloc ((strlen(szArgs)+1) * sizeof(char));
- char *ap = argument;
- while ((*ap++ = *argPos++) != '=')
- ;
- *--ap = '\0';
- } else if (*(argsPtr + i) == '&' || i == strlen(argsPtr)-1) {
- /* value ends */
- value = (char*) malloc ((strlen(szArgs)+1) * sizeof(char));
- char *vp = value;
- while ((*vp++ = *argPos++) != '&')
- ;
- *--vp = '\0';
-
- if (argument == NULL) {
- argument = value;
- value = "1";
- }
- entryPtr = Tcl_CreateHashEntry (argTbl, (CONST char*) argument,
- &newEntry);
- Tcl_SetHashValue (entryPtr, value);
- argument = NULL;
- value = NULL;
- }
- }
-
- return RIVET_OK;
-}
-#endif
/*
+ * -- Rivet_InitServerVariables
+ *
* Setup an array in each interpreter to tell us things about Apache.
* This saves us from having to do any real call to load an entire
* environment. This routine only gets called once, when the child process
* is created.
*
- * SERVER_ROOT - Apache's root location
- * SERVER_CONF - Apache's configuration file
- * RIVET_DIR - Rivet's Tcl source directory
- * RIVET_INIT - Rivet's init.tcl file
+ * Arguments:
+ *
+ * Tcl_Interp*: pointer to the Tcl interpreter
+ * apr_pool_t*: pool used for calling Apache framework functions
+ *
+ * Returned value:
+ * none
+ *
+ * Side effects:
+ *
+ * within the global scope of the interpreter passed as first
+ * argument a 'server' array is created and the variable associated
+ * to the following keys are defined
+ *
+ * SERVER_ROOT - Apache's root location
+ * SERVER_CONF - Apache's configuration file
+ * RIVET_DIR - Rivet's Tcl source directory
+ * RIVET_INIT - Rivet's init.tcl file
+ * RIVET_VERSION - Rivet version (only when RIVET_DISPLAY_VERSION is 1)
+ *
*/
static void
-Rivet_InitServerVariables( Tcl_Interp *interp, apr_pool_t *p )
+Rivet_InitServerVariables( Tcl_Interp *interp, apr_pool_t *pool )
{
+ int ap_mpm_result;
Tcl_Obj *obj;
obj = Tcl_NewStringObj(ap_server_root, -1);
@@ -246,7 +196,7 @@ Rivet_InitServerVariables( Tcl_Interp *i
TCL_GLOBAL_ONLY);
Tcl_DecrRefCount(obj);
- obj = Tcl_NewStringObj(ap_server_root_relative(p,SERVER_CONFIG_FILE), -1);
+ obj = Tcl_NewStringObj(ap_server_root_relative(pool,SERVER_CONFIG_FILE), -1);
Tcl_IncrRefCount(obj);
Tcl_SetVar2Ex(interp,
"server",
@@ -255,7 +205,7 @@ Rivet_InitServerVariables( Tcl_Interp *i
TCL_GLOBAL_ONLY);
Tcl_DecrRefCount(obj);
- obj = Tcl_NewStringObj(ap_server_root_relative(p, RIVET_DIR), -1);
+ obj = Tcl_NewStringObj(ap_server_root_relative(pool, RIVET_DIR), -1);
Tcl_IncrRefCount(obj);
Tcl_SetVar2Ex(interp,
"server",
@@ -264,7 +214,7 @@ Rivet_InitServerVariables( Tcl_Interp *i
TCL_GLOBAL_ONLY);
Tcl_DecrRefCount(obj);
- obj = Tcl_NewStringObj(ap_server_root_relative(p, RIVET_INIT), -1);
+ obj = Tcl_NewStringObj(ap_server_root_relative(pool, RIVET_INIT), -1);
Tcl_IncrRefCount(obj);
Tcl_SetVar2Ex(interp,
"server",
@@ -283,46 +233,46 @@ Rivet_InitServerVariables( Tcl_Interp *i
TCL_GLOBAL_ONLY);
Tcl_DecrRefCount(obj);
#endif
-}
-#if 0
-static void
-Rivet_PropagateServerConfArray( Tcl_Interp *interp, rivet_server_conf *rsc )
-{
- apr_table_t *t;
- apr_array_header_t *arr;
- apr_table_entry_t *elts;
- int i, nelts;
- Tcl_Obj *key;
- Tcl_Obj *val;
- Tcl_Obj *arrayName;
-
- /* Propagate all of the ServerConf variables into an array. */
- t = rsc->rivet_server_vars;
- arr = (apr_array_header_t*) apr_table_elts( t );
- elts = (apr_table_entry_t *) arr->elts;
- nelts = arr->nelts;
-
- arrayName = Tcl_NewStringObj("RivetServerConf", -1);
- Tcl_IncrRefCount(arrayName);
+ if (ap_mpm_query(AP_MPMQ_IS_THREADED,&ap_mpm_result) == APR_SUCCESS)
+ {
+ switch (ap_mpm_result)
+ {
+ case AP_MPMQ_STATIC:
+ obj = Tcl_NewStringObj("static", -1);
+ break;
+ case AP_MPMQ_NOT_SUPPORTED:
+ obj = Tcl_NewStringObj("unsupported", -1);
+ break;
+ default:
+ obj = Tcl_NewStringObj("undefined", -1);
+ break;
+ }
+ Tcl_IncrRefCount(obj);
+ Tcl_SetVar2Ex(interp,"server","MPM_THREADED",obj,TCL_GLOBAL_ONLY);
+ Tcl_DecrRefCount(obj);
+ }
- for( i = 0; i < nelts; ++i )
+ if (ap_mpm_query(AP_MPMQ_IS_FORKED,&ap_mpm_result) == APR_SUCCESS)
{
- key = Tcl_NewStringObj( elts[i].key, -1);
- val = Tcl_NewStringObj( elts[i].val, -1);
- Tcl_IncrRefCount(key);
- Tcl_IncrRefCount(val);
- Tcl_ObjSetVar2(interp,
- arrayName,
- key,
- val,
- TCL_GLOBAL_ONLY);
- Tcl_DecrRefCount(key);
- Tcl_DecrRefCount(val);
+ switch (ap_mpm_result)
+ {
+ case AP_MPMQ_STATIC:
+ obj = Tcl_NewStringObj("static", -1);
+ break;
+ case AP_MPMQ_DYNAMIC:
+ obj = Tcl_NewStringObj("dynamic", -1);
+ break;
+ default:
+ obj = Tcl_NewStringObj("undefined", -1);
+ break;
+ }
+ Tcl_IncrRefCount(obj);
+ Tcl_SetVar2Ex(interp,"server","MPM_FORKED",obj,TCL_GLOBAL_ONLY);
+ Tcl_DecrRefCount(obj);
}
- Tcl_DecrRefCount(arrayName);
}
-#endif
+
/* Calls Tcl_EvalObjEx() and checks for errors
* Prints the error buffer if any.
@@ -428,7 +378,26 @@ good:
return TCL_OK;
}
-/* This is a separate function so that it may be called from 'Parse' */
+/*
+ * -- Rivet_ParseExecFile
+ *
+ * given a filename if the file exists it's either parsed (when a rivet
+ * template) and then executed as a Tcl_Obj instance or directly executed
+ * if a Tcl script.
+ *
+ * This is a separate function so that it may be called from command 'parse'
+ *
+ * Arguments:
+ *
+ * - TclWebRequest: pointer to the structure collecting Tcl and Apache
+ * data
+ * - filename: pointer to a string storing the path to the template or
+ * Tcl script
+ * - toplevel: integer to be interpreted as a boolean meaning the
+ * file is pointed by the request. When 0 that's a subtemplate being
+ * parsed and executed from another template
+ */
+
int
Rivet_ParseExecFile(TclWebRequest *req, char *filename, int toplevel)
{
@@ -541,6 +510,7 @@ Rivet_ParseExecFile(TclWebRequest *req,
Tcl_DecrRefCount(outbuf);
return result;
}
+
if (toplevel) {
if (rsc->rivet_after_script) {
Tcl_AppendObjToObj(outbuf,rsc->rivet_after_script);
@@ -587,6 +557,7 @@ Rivet_ParseExecFile(TclWebRequest *req,
outbuf = (Tcl_Obj *)Tcl_GetHashValue(entry);
Tcl_IncrRefCount(outbuf);
}
+
rsc->user_scripts_updated = 0;
{
int res = 0;
@@ -596,6 +567,43 @@ Rivet_ParseExecFile(TclWebRequest *req,
}
}
+/*
+ * -- Rivet_ParseExecString
+ *
+ * This function takes Tcl_Obj carrying a string to be interpreted as
+ * a Rivet template. This function is the core for command 'parsestr'
+ *
+ * Arguments:
+ *
+ * - TclWebRequest* req: pointer to the structure collecting Tcl and
+ * Apache data
+ * - Tcl_Obj* inbuf: Tcl object storing the template to be parsed.
+ */
+
+int
+Rivet_ParseExecString (TclWebRequest* req, Tcl_Obj* inbuf)
+{
+ int res = 0;
+ Tcl_Obj* outbuf = Tcl_NewObj();
+ Tcl_Interp *interp = req->interp;
+
+ Tcl_IncrRefCount(outbuf);
+ Tcl_AppendToObj(outbuf, "puts -nonewline \"", -1);
+
+ /* If we are not inside a <? ?> section, add the closing ". */
+ if (Rivet_Parser(outbuf, inbuf) == 0)
+ {
+ Tcl_AppendToObj(outbuf, "\"\n", 2);
+ }
+
+ Tcl_AppendToObj(outbuf, "\n", -1);
+
+ res = Rivet_ExecuteAndCheck(interp, outbuf, req->req);
+ Tcl_DecrRefCount(outbuf);
+
+ return res;
+}
+
static void
Rivet_CleanupRequest( request_rec *r )
{
@@ -936,7 +944,7 @@ Rivet_PerInterpInit(server_rec *s, rivet
{
ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, s,
MODNAME ": error setting auto_path: %s",
- Tcl_GetStringFromObj(auto_path,NULL));
+ Tcl_GetStringFromObj(auto_path,NULL));
}
Tcl_DecrRefCount(rivet_tcl);
@@ -947,7 +955,6 @@ Rivet_PerInterpInit(server_rec *s, rivet
Rivet_InitServerVariables(interp, p );
// Rivet_PropagateServerConfArray( interp, rsc );
-
/* Loading into the interpreter the commands provided by librivet.so */
/* Tcl Bug #3216070 has been solved with 8.5.10 and commands shipped with
* Rivetlib can be mapped at this stage
@@ -957,7 +964,7 @@ Rivet_PerInterpInit(server_rec *s, rivet
{
ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, s,
MODNAME ": Error loading rivetlib package: %s",
- Tcl_GetStringResult(interp) );
+ Tcl_GetStringResult(interp) );
exit(1);
}
@@ -1274,13 +1281,13 @@ Rivet_InitHandler(apr_pool_t *pPool, apr
if (Tcl_EvalObjEx(interp, rsc->rivet_server_init_script, 0) != TCL_OK)
{
ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, s,
- MODNAME ": Error running ServerInitScript '%s': %s",
- Tcl_GetString(rsc->rivet_server_init_script),
+ MODNAME ": Error running ServerInitScript '%s': %s",
+ Tcl_GetString(rsc->rivet_server_init_script),
Tcl_GetVar(interp, "errorInfo", 0));
} else {
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
- MODNAME ": ServerInitScript '%s' successful",
- Tcl_GetString(rsc->rivet_server_init_script));
+ MODNAME ": ServerInitScript '%s' successful",
+ Tcl_GetString(rsc->rivet_server_init_script));
}
}
@@ -1542,7 +1549,6 @@ Rivet_ChildHandlers(server_rec *s, int i
* None.
*
* Side Effects:
- * Runs Tcl_Finalize.
*
*-----------------------------------------------------------------------------
*/
@@ -1555,7 +1561,7 @@ Rivet_ChildExit(void *data)
ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_EGENERAL, s, MODNAME ": Running ChildExit handler");
Rivet_ChildHandlers(s, 0);
-/* Tcl_Finalize remove to meet requirement to coexist with mod_websh (Bug #54162) */
+ /* Tcl_Finalize removed to meet requirement of coexistence with mod_websh (Bug #54162) */
//Tcl_Finalize();
@@ -1596,7 +1602,7 @@ Rivet_CreateTclInterp (server_rec* s)
{
ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, s,
MODNAME ": Error in Tcl_Init: %s, aborting\n",
- Tcl_GetStringResult(interp));
+ Tcl_GetStringResult(interp));
exit(1);
}
Tcl_SetPanicProc(Rivet_Panic);
@@ -1681,17 +1687,29 @@ Rivet_InitTclStuff(server_rec *s, apr_po
extern int ap_max_requests_per_child;
int interpCount = 0;
+/* This code is run once per child process. In a threaded Tcl builds the forking
+ * of a child process most likely has not preserved the thread where the Tcl
+ * notifier runs. The Notifier should have been restarted by one the
+ * pthread_atfork callbacks (setup in Tcl >= 8.5.14 and Tcl >= 8.6.1). In
+ * case pthread_atfork is not supported we unconditionally call Tcl_InitNotifier
+ * hoping for the best (Bug #55153)
+ */
+
+#if !defined(HAVE_PTHREAD_ATFORK)
+ Tcl_InitNotifier();
+#endif
+
if (rsc->rivet_global_init_script != NULL) {
if (Tcl_EvalObjEx(interp, rsc->rivet_global_init_script, 0) != TCL_OK)
{
ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, s,
- MODNAME ": Error running GlobalInitScript '%s': %s",
- Tcl_GetString(rsc->rivet_global_init_script),
+ MODNAME ": Error running GlobalInitScript '%s': %s",
+ Tcl_GetString(rsc->rivet_global_init_script),
Tcl_GetVar(interp, "errorInfo", 0));
} else {
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
- MODNAME ": GlobalInitScript '%s' successful",
- Tcl_GetString(rsc->rivet_global_init_script));
+ MODNAME ": GlobalInitScript '%s' successful",
+ Tcl_GetString(rsc->rivet_global_init_script));
}
}
@@ -1719,10 +1737,10 @@ Rivet_InitTclStuff(server_rec *s, apr_po
sr->port,
interpCount++);
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
- MODNAME ": Rivet_InitTclStuff: creating slave interpreter '%s', hostname '%s', port '%d', separate interpreters %d",
- slavename, sr->server_hostname, sr->port,
- rsc->separate_virtual_interps);
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
+ MODNAME ": Rivet_InitTclStuff: creating slave interpreter '%s', hostname '%s', port '%d', separate interpreters %d",
+ slavename, sr->server_hostname, sr->port,
+ rsc->separate_virtual_interps);
/* Separate virtual interps. */
myrsc->server_interp = Tcl_CreateSlave(interp, slavename, 0);
@@ -1842,7 +1860,7 @@ Rivet_SendContent(request_rec *r)
if (r->finfo.filetype == 0)
{
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, APR_EGENERAL,
- r->server,
+ r->server,
MODNAME ": File does not exist: %s",
(r->path_info ? (char*)apr_pstrcat(r->pool, r->filename, r->path_info, NULL) : r->filename));
retval = HTTP_NOT_FOUND;
@@ -1866,7 +1884,7 @@ Rivet_SendContent(request_rec *r)
*/
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, APR_EGENERAL, r->server,
MODNAME ": Error accessing %s, could not chdir into directory",
- r->filename);
+ r->filename);
retval = HTTP_INTERNAL_SERVER_ERROR;
goto sendcleanup;
@@ -1979,8 +1997,8 @@ Rivet_SendContent(request_rec *r)
if (Rivet_ParseExecFile(globals->req, r->filename, 1) != TCL_OK)
{
ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, r->server,
- MODNAME ": Error parsing exec file '%s': %s",
- r->filename,
+ MODNAME ": Error parsing exec file '%s': %s",
+ r->filename,
Tcl_GetVar(interp, "errorInfo", 0));
}
@@ -1991,7 +2009,7 @@ Rivet_SendContent(request_rec *r)
if (Tcl_EvalObjEx(interp, request_cleanup, 0) == TCL_ERROR) {
ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, r->server,
- MODNAME ": Error evaluating cleanup request: %s",
+ MODNAME ": Error evaluating cleanup request: %s",
Tcl_GetVar(interp, "errorInfo", 0));
}
Modified: tcl/rivet/branches/2.1/src/apache-2/mod_rivet.h
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/src/apache-2/mod_rivet.h?rev=1518826&r1=1518825&r2=1518826&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/src/apache-2/mod_rivet.h (original)
+++ tcl/rivet/branches/2.1/src/apache-2/mod_rivet.h Thu Aug 29 21:20:38 2013
@@ -74,18 +74,17 @@ typedef struct _rivet_server_conf {
Tcl_Obj *rivet_global_init_script; /* run once when apache is started */
Tcl_Obj *rivet_child_init_script;
Tcl_Obj *rivet_child_exit_script;
- Tcl_Obj *rivet_before_script; /* script run before each page */
+ Tcl_Obj *rivet_before_script; /* script run before each page */
Tcl_Obj *rivet_after_script; /* after */
Tcl_Obj *rivet_error_script; /* for errors */
Tcl_Obj *rivet_abort_script; /* script run upon abort_page call */
Tcl_Obj *after_every_script; /* script to be run always */
- /* This flag is used with the above directives.
- If any of them have changed, it gets set. */
+ /* This flag is used with the above directives. If any of them have changed, it gets set. */
int user_scripts_updated;
- Tcl_Obj *rivet_default_error_script; /* for errors */
+ Tcl_Obj *rivet_default_error_script; /* for errors */
int *cache_size;
int *cache_free;
int upload_max;
@@ -97,7 +96,7 @@ typedef struct _rivet_server_conf {
apr_table_t *rivet_server_vars;
apr_table_t *rivet_dir_vars;
apr_table_t *rivet_user_vars;
- char **objCacheList; /* Array of cached objects (for priority handling) */
+ char **objCacheList; /* Array of cached objects (for priority handling) */
Tcl_HashTable *objCache; /* Objects cache - the key is the script name */
Tcl_Channel *outchannel; /* stuff for buffering output */
@@ -107,14 +106,15 @@ typedef struct _rivet_server_conf {
typedef struct _rivet_interp_globals {
request_rec *r; /* request rec */
- TclWebRequest *req; /* TclWeb API request */
- Tcl_Namespace *rivet_ns; /* Rivet commands namespace */
- int page_aborting; /* set by abort_page. */
- /* to be reset by Rivet_SendContent */
+ TclWebRequest *req; /* TclWeb API request */
+ Tcl_Namespace *rivet_ns; /* Rivet commands namespace */
+ int page_aborting; /* set by abort_page. */
+ /* to be reset by Rivet_SendContent */
Tcl_Obj* abort_code;
} rivet_interp_globals;
int Rivet_ParseExecFile(TclWebRequest *req, char *filename, int toplevel);
+int Rivet_ParseExecString (TclWebRequest* req, Tcl_Obj* inbuf);
rivet_server_conf *Rivet_GetConf(request_rec *r);
Modified: tcl/rivet/branches/2.1/src/parser/parserPkgInit.c
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/src/parser/parserPkgInit.c?rev=1518826&r1=1518825&r2=1518826&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/src/parser/parserPkgInit.c (original)
+++ tcl/rivet/branches/2.1/src/parser/parserPkgInit.c Thu Aug 29 21:20:38 2013
@@ -10,7 +10,7 @@
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
+ http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
@@ -27,6 +27,7 @@
#endif
#include <tcl.h>
+#include "rivet.h"
#include "rivetParser.h"
/*
@@ -54,13 +55,13 @@ Parse_Rivet(
if (objc != 2)
{
- Tcl_WrongNumArgs(interp, 1, objv, "filename");
- return TCL_ERROR;
+ Tcl_WrongNumArgs(interp, 1, objv, "filename");
+ return TCL_ERROR;
}
if (Rivet_GetRivetFile(Tcl_GetString(objv[1]),
- 1, outbuf, interp) == TCL_ERROR) {
- return TCL_ERROR;
+ 1, outbuf, interp) == TCL_ERROR) {
+ return TCL_ERROR;
}
Tcl_SetObjResult(interp, outbuf);
Tcl_DecrRefCount(outbuf);
@@ -72,21 +73,21 @@ Parse_Rivet(
*
* Parse_RivetData --
*
- * Takes a Rivet script as an argument, and returns the parsed
- * tcl script version.
+ * Takes a Rivet script as an argument, and returns the parsed
+ * tcl script version.
*
* Results:
- * A normal Tcl result.
+ * A normal Tcl result.
*
* Side Effects:
- * None.
+ * None.
*
*-----------------------------------------------------------------------------
*/
static int
Parse_RivetData(ClientData clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *CONST objv[])
+ int objc, Tcl_Obj *CONST objv[])
{
Tcl_Obj *outbuf;
@@ -94,8 +95,8 @@ Parse_RivetData(ClientData clientData, T
if (objc != 2)
{
- Tcl_WrongNumArgs(interp, 1, objv, "data");
- return TCL_ERROR;
+ Tcl_WrongNumArgs(interp, 1, objv, "data");
+ return TCL_ERROR;
}
Tcl_IncrRefCount(outbuf);
@@ -103,7 +104,7 @@ Parse_RivetData(ClientData clientData, T
if (Rivet_Parser(outbuf, objv[1]) == 0)
{
- Tcl_AppendToObj(outbuf, "\"\n", 2);
+ Tcl_AppendToObj(outbuf, "\"\n", 2);
}
Tcl_SetObjResult(interp, outbuf);
@@ -117,25 +118,16 @@ EXTERN int
Rivetparser_Init( Tcl_Interp *interp )
{
#ifdef USE_TCL_STUBS
- if (Tcl_InitStubs(interp, "8.5", 0) == NULL) {
+ if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL)
#else
- if (Tcl_PkgRequire(interp, "Tcl", "8.5", 0) == NULL) {
-#endif
- return TCL_ERROR;
+ if (Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, 0) == NULL)
+#endif
+ {
+ return TCL_ERROR;
}
- Tcl_CreateObjCommand(interp,
- "rivet::parserivet",
- Parse_Rivet,
- NULL,
- (Tcl_CmdDeleteProc *)NULL);
-
- Tcl_CreateObjCommand(interp,
- "rivet::parserivetdata",
- Parse_RivetData,
- NULL,
- (Tcl_CmdDeleteProc *)NULL);
-
+ RIVET_OBJ_CMD("parserivet",Parse_Rivet);
+ RIVET_OBJ_CMD("parserivetdata",Parse_RivetData);
return Tcl_PkgProvide( interp, "rivetparser", "0.2" );
}
@@ -154,18 +146,22 @@ Rivetparser_SafeInit( Tcl_Interp *interp
*/
#ifdef USE_TCL_STUBS
- if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) {
+ if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL)
#else
- if (Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, 0) == NULL) {
-#endif
- return TCL_ERROR;
+ if (Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, 0) == NULL)
+#endif
+ {
+ return TCL_ERROR;
}
+/*
Tcl_CreateObjCommand(interp,
- "rivet::parserivetdata",
- Parse_RivetData,
- NULL,
- (Tcl_CmdDeleteProc *)NULL);
+ "rivet::parserivetdata",
+ Parse_RivetData,
+ NULL,
+ (Tcl_CmdDeleteProc *)NULL);
+*/
+ RIVET_OBJ_CMD("parserivetdata",Parse_RivetData);
return Tcl_PkgProvide( interp, "rivetparser", "0.2" );
}
Modified: tcl/rivet/branches/2.1/src/parser/rivetParser.c
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/src/parser/rivetParser.c?rev=1518826&r1=1518825&r2=1518826&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/src/parser/rivetParser.c (original)
+++ tcl/rivet/branches/2.1/src/parser/rivetParser.c Thu Aug 29 21:20:38 2013
@@ -12,7 +12,7 @@
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
+ http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
@@ -57,22 +57,22 @@ Rivet_GetTclFile(char *filename, Tcl_Obj
Tcl_Channel chan = Tcl_OpenFileChannel(interp, filename, "r", 0644);
if (chan == (Tcl_Channel) NULL)
{
- Tcl_ResetResult(interp);
- Tcl_AppendResult(interp, "couldn't read file \"", filename,
- "\": ", Tcl_PosixError(interp), (char *) NULL);
- return TCL_ERROR;
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, "couldn't read file \"", filename,
+ "\": ", Tcl_PosixError(interp), (char *) NULL);
+ return TCL_ERROR;
}
result = Tcl_ReadChars(chan, outbuf, -1, 1);
if (result < 0)
{
- Tcl_Close(interp, chan);
- Tcl_AppendResult(interp, "couldn't read file \"", filename,
- "\": ", Tcl_PosixError(interp), (char *) NULL);
- return TCL_ERROR;
+ Tcl_Close(interp, chan);
+ Tcl_AppendResult(interp, "couldn't read file \"", filename,
+ "\": ", Tcl_PosixError(interp), (char *) NULL);
+ return TCL_ERROR;
}
if (Tcl_Close(interp, chan) != TCL_OK)
- return TCL_ERROR;
+ return TCL_ERROR;
return TCL_OK;
}
@@ -99,6 +99,14 @@ Rivet_GetRivetFile(char *filename, int t
Tcl_Obj *inbuf;
Tcl_Channel rivetfile;
+ /*
+ * TODO There is much switching between Tcl and APR for calling
+ * utility routines. We should make up our minds and keep
+ * a coherent attitude deciding when Tcl should be called upon
+ * and when APR should be invoked instead for a certain class of
+ * tasks
+ */
+
rivetfile = Tcl_OpenFileChannel(interp, filename, "r", 0664);
if (rivetfile == NULL) {
/* Don't need to adderrorinfo - Tcl_OpenFileChannel takes care
Modified: tcl/rivet/branches/2.1/tests/parse.test
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.1/tests/parse.test?rev=1518826&r1=1518825&r2=1518826&view=diff
==============================================================================
--- tcl/rivet/branches/2.1/tests/parse.test (original)
+++ tcl/rivet/branches/2.1/tests/parse.test Thu Aug 29 21:20:38 2013
@@ -22,3 +22,26 @@ set testfilename1 parse.rvt
</body>
</html>}
+
+set testfilename2 parsestring.rvt
+
+::tcltest::test parse-1.2 {Parse command} {
+ set page [ ::http::geturl "${urlbase}$testfilename2" ]
+ ::http::data $page
+} {<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <title>Parse String Test</title>
+ </head>
+
+ <body>
+ <h1>Parse String Test</h1>
+ Hello, World
+
+¡ À È Ì Ò Ù - El Burro Sabe Más Que Tú!
+
+
+<p>ÆüËܸì(EUC-JP Japanese text)</p>
+
+ </body>
+</html>}
---------------------------------------------------------------------
To unsubscribe, e-mail: site-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: site-cvs-help@tcl.apache.org