Index: xotcl/ChangeLog =================================================================== diff -u -rf733c5df1b1a91a473d0e361ff206deaa4ecfa0a -r489071934af0126a0f768b0ced07dea3b2328a23 --- xotcl/ChangeLog (.../ChangeLog) (revision f733c5df1b1a91a473d0e361ff206deaa4ecfa0a) +++ xotcl/ChangeLog (.../ChangeLog) (revision 489071934af0126a0f768b0ced07dea3b2328a23) @@ -1,3 +1,12 @@ +2004-12-02 Gustaf.Neumann@wu-wien.ac.at, Uwe Zdun + * release of distribution XOTcl 1.3.3 + +2004-12-02 Gustaf.Neumann@wu-wien.ac.at + * changed metadata analyser from recursive to iterative + +2004-11-30 + * various fixes to improve portability + 2004-11-27 Gustaf.Neumann@wu-wien.ac.at, Uwe Zdun * release of distribution XOTcl 1.3.3 Index: xotcl/Makefile.in =================================================================== diff -u -rab63a4908f87f226de9730e0afa820388c93acc4 -r489071934af0126a0f768b0ced07dea3b2328a23 --- xotcl/Makefile.in (.../Makefile.in) (revision ab63a4908f87f226de9730e0afa820388c93acc4) +++ xotcl/Makefile.in (.../Makefile.in) (revision 489071934af0126a0f768b0ced07dea3b2328a23) @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: Makefile.in,v 1.12 2004/10/13 10:35:43 neumann Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.13 2004/12/02 00:01:20 neumann Exp $ #======================================================================== # Add additional lines to handle any additional AC_SUBST cases that @@ -27,13 +27,21 @@ src_test_dir = ${srcdir}/tests src_app_dir = ${srcdir}/apps src_generic_dir = ${srcdir}/generic -PLATFORM_DIR = $(srcdir)/@TEA_PLATFORM@ -target_doc_dir = ./doc TCL_LIB_SPEC = @TCL_LIB_SPEC@ TK_LIB_SPEC = @TK_LIB_SPEC@ subdirs = @subdirs@ aol_prefix = @aol_prefix@ +# Requires native paths +PLATFORM_DIR = `@CYGPATH@ $(srcdir)/@TEA_PLATFORM@` +target_doc_dir = ./doc + +src_lib_dir_native = `@CYGPATH@ ${src_lib_dir}` +src_doc_dir_native = `@CYGPATH@ ${src_doc_dir}` +src_test_dir_native = `@CYGPATH@ ${src_test_dir}` +src_app_dir_native = `@CYGPATH@ ${src_app_dir}` +src_generic_dir_native = `@CYGPATH@ ${src_generic_dir}` + libdirs = comm lib serialize @libdirs_actiweb@ libsrc = COPYRIGHT pkgIndex.tcl appdirs = comm scripts utils @apps_actiweb@ @@ -218,14 +226,17 @@ done; fi; libraries-pkgindex: - @$(TCLSH_PROG) $(src_lib_dir)/lib/make.xotcl -dir $(src_lib_dir) -all + @$(TCLSH) $(src_lib_dir_native)/lib/make.xotcl -dir $(src_lib_dir_native) -all fulldoc: doc pdf # use language reference as sample file to trigger generation of documentation files doc: $(target_doc_dir)/langRef-xotcl.html $(target_doc_dir)/langRef-xotcl.html: $(src_doc_dir)/langRef.xotcl $(DOC_SOURCE) - @$(TCLSH_PROG) $(src_lib_dir)/lib/makeDoc.xotcl $(target_doc_dir) $(DOC_SOURCE) + @docs=""; \ + for i in $(DOC_SOURCE); do docs="$$docs `@CYGPATH@ $$i`"; done; \ + $(TCLSH) $(src_lib_dir_native)/lib/makeDoc.xotcl \ + $(target_doc_dir) $$docs pdf: -(cd $(src_doc_dir); htmldoc --webpage --format pdf14 --title \ @@ -252,31 +263,40 @@ install-libraries: libraries $(DESTDIR)$(includedir) $(DESTDIR)$(pkglibdir) @echo "Installing header files in $(DESTDIR)$(includedir)" @for i in $(PKG_HEADERS) ; do \ - echo "Installing $(srcdir)/$$i" ; \ + echo " Installing $$i" ; \ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \ done; + @echo "Installing Libraries to $(DESTDIR)$(pkglibdir)/" @for i in $(libdirs) ; do \ - echo "Installing $$i" ; \ + echo " Installing $$i/" ; \ rm -rf $(DESTDIR)$(pkglibdir)/$$i ; \ - (cd $(src_lib_dir); $(INSTALL) -d $$i $(DESTDIR)$(pkglibdir)/$$i ; \ - $(INSTALL) $$i/*tcl $(DESTDIR)$(pkglibdir)/$$i/) ; \ + mkdir -p $(DESTDIR)$(pkglibdir)/$$i; \ + chmod 755 $(DESTDIR)$(pkglibdir)/$$i; \ + for j in $(src_lib_dir)/$$i/*.*tcl ; do \ + $(INSTALL_DATA) $$j $(DESTDIR)$(pkglibdir)/$$i/; \ + done; \ done; - for i in $(libsrc) ; do \ - echo "Installing $$i" ; \ + @for i in $(libsrc) ; do \ + echo " Installing $$i" ; \ rm -rf $(DESTDIR)$(pkglibdir)/$$i ; \ - (cd $(src_lib_dir); $(INSTALL) $$i $(DESTDIR)$(pkglibdir)/$$i) ; \ + $(INSTALL_DATA) $(src_lib_dir)/$$i $(DESTDIR)$(pkglibdir)/$$i ; \ done; - cat ${srcdir}/unix/pkgIndex.unix >> $(DESTDIR)$(pkglibdir)/pkgIndex.tcl - $(INSTALL) xotclConfig.sh $(DESTDIR)$(libdir)/ + cat unix/pkgIndex.unix >> $(DESTDIR)$(pkglibdir)/pkgIndex.tcl + $(INSTALL_DATA) xotclConfig.sh $(DESTDIR)$(libdir)/ + @echo "Installing Applications to $(DESTDIR)$(pkglibdir)/apps/" @for i in $(appdirs) ; do \ - echo "Installing $$i" ; \ + echo " Installing $$i/" ; \ rm -rf $(DESTDIR)$(pkglibdir)/apps/$$i ; \ - (cd $(src_app_dir); $(INSTALL) -d $$i $(DESTDIR)$(pkglibdir)/apps/$$i) ; \ + mkdir -p $(DESTDIR)$(pkglibdir)/apps/$$i; \ + chmod 755 $(DESTDIR)$(pkglibdir)/apps/$$i; \ + for j in $(src_app_dir)/$$i/* ; do \ + $(INSTALL) $$j $(DESTDIR)$(pkglibdir)/apps/$$i/; \ + done; \ done; @for i in $(appsrc) ; do \ - echo "Installing $$i" ; \ + echo " Installing $$i" ; \ rm -rf $(DESTDIR)$(pkglibdir)/apps/$$i ; \ - $(INSTALL) $(src_app_dir)/$$i $(DESTDIR)$(pkglibdir)/apps ; \ + $(INSTALL_DATA) $(src_app_dir)/$$i $(DESTDIR)$(pkglibdir)/apps ; \ done; @rm -rf $(DESTDIR)$(pkglibdir)/store/XOTclGdbm @rm -rf $(DESTDIR)$(pkglibdir)/store/XOTclSdbm @@ -299,29 +319,35 @@ done) ; \ fi +shell: binaries libraries + @$(TCLSH) $(SCRIPT) + +gdb: + $(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT) + test: binaries libraries test-core @test_actiweb@ #TESTFLAGS = -srcdir $(srcdir) test-core: $(TCLSH_PROG) - $(TCLSH_PROG) `@CYGPATH@ $(src_test_dir)/testx.xotcl` \ - -libdir `@CYGPATH@ $(PLATFORM_DIR)` $(TESTFLAGS) - $(TCLSH_PROG) `@CYGPATH@ $(src_test_dir)/testo.xotcl` \ - -libdir `@CYGPATH@ $(PLATFORM_DIR)` $(TESTFLAGS) - $(TCLSH_PROG) `@CYGPATH@ $(src_test_dir)/speedtest.xotcl` \ - -libdir `@CYGPATH@ $(PLATFORM_DIR)` $(TESTFLAGS) - $(TCLSH_PROG) `@CYGPATH@ $(src_test_dir)/forwardtest.xotcl` \ - -libdir `@CYGPATH@ $(PLATFORM_DIR)` $(TESTFLAGS) - $(TCLSH_PROG) `@CYGPATH@ $(src_test_dir)/xocomm.test` \ - -libdir `@CYGPATH@ $(PLATFORM_DIR)` $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/testx.xotcl \ + -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/testo.xotcl \ + -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/speedtest.xotcl \ + -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/forwardtest.xotcl \ + -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/xocomm.test \ + -libdir $(PLATFORM_DIR) $(TESTFLAGS) test-actiweb: $(TCLSH_PROG) - $(TCLSH_PROG) `@CYGPATH@ $(src_test_dir)/actiweb.test` \ - -libdir `@CYGPATH@ $(PLATFORM_DIR)` $(TESTFLAGS) - $(TCLSH_PROG) `@CYGPATH@ $(src_test_dir)/persistence.test` \ - -libdir `@CYGPATH@ $(PLATFORM_DIR)` $(TESTFLAGS) - $(TCLSH_PROG) `@CYGPATH@ $(src_test_dir)/UNIVERSAL.test` \ - -libdir `@CYGPATH@ $(PLATFORM_DIR)` $(TESTFLAGS) - $(TCLSH_PROG) `@CYGPATH@ $(src_test_dir)/xoRDF.test` \ - -libdir `@CYGPATH@ $(PLATFORM_DIR)` $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/actiweb.test \ + -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/persistence.test \ + -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/UNIVERSAL.test \ + -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/xoRDF.test \ + -libdir $(PLATFORM_DIR) $(TESTFLAGS) @rm -rf receiver depend: @@ -412,7 +438,7 @@ #======================================================================== $(src_generic_dir)/predefined.h: $(src_generic_dir)/mk_predefined.xotcl $(src_generic_dir)/predefined.xotcl - (cd $(src_generic_dir); $(TCLSH_PROG) mk_predefined.xotcl > predefined.h) + (cd $(src_generic_dir); $(TCLSH) mk_predefined.xotcl > predefined.h) xotclStubInit.$(OBJEXT): $(PKG_HEADERS) xotclStubLib.$(OBJEXT): $(src_generic_dir)/xotclStubLib.c $(PKG_HEADERS) @@ -431,7 +457,7 @@ # genstubs: - $(TCLSH_PROG) $(TCL_TOOL_DIR_NATIVE)/genStubs.tcl $(src_generic_dir) \ + $(TCLSH) $(TCL_TOOL_DIR_NATIVE)/genStubs.tcl $(src_generic_dir) \ $(src_generic_dir)/xotcl.decls $(src_generic_dir)/xotclInt.decls # @@ -471,6 +497,7 @@ distclean: clean -rm -rf Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log config.status @if test ! "x$(subdirs)" = "x" ; then dirs="$(subdirs)" ; \ for dir in $$dirs ; do \ if (cd $$dir; $(MAKE) $@) ; then true ; else exit 1 ; fi ; \ Index: xotcl/configure =================================================================== diff -u -r55c33d4f309c661c404d79a77168110864e7258a -r489071934af0126a0f768b0ced07dea3b2328a23 --- xotcl/configure (.../configure) (revision 55c33d4f309c661c404d79a77168110864e7258a) +++ xotcl/configure (.../configure) (revision 489071934af0126a0f768b0ced07dea3b2328a23) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for xotcl 1.3.3. +# Generated by GNU Autoconf 2.59 for xotcl 1.3.4. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation @@ -267,8 +267,8 @@ # Identity of this package. PACKAGE_NAME='xotcl' PACKAGE_TARNAME='xotcl' -PACKAGE_VERSION='1.3.3' -PACKAGE_STRING='xotcl 1.3.3' +PACKAGE_VERSION='1.3.4' +PACKAGE_STRING='xotcl 1.3.4' PACKAGE_BUGREPORT='' # Factoring default headers for most tests. @@ -777,7 +777,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures xotcl 1.3.3 to adapt to many kinds of systems. +\`configure' configures xotcl 1.3.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -834,7 +834,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xotcl 1.3.3:";; + short | recursive ) echo "Configuration of xotcl 1.3.4:";; esac cat <<\_ACEOF @@ -977,7 +977,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -xotcl configure 1.3.3 +xotcl configure 1.3.4 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -991,7 +991,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xotcl $as_me 1.3.3, which was +It was created by xotcl $as_me 1.3.4, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1562,7 +1562,7 @@ # do not modify the following lines manually, they are generated with changeXOTclVersion XOTCL_MAJOR_VERSION=1 XOTCL_MINOR_VERSION=3 -XOTCL_RELEASE_LEVEL=.3 +XOTCL_RELEASE_LEVEL=.4 XOTCL_VERSION=${XOTCL_MAJOR_VERSION}.${XOTCL_MINOR_VERSION} NODOT_VERSION=${XOTCL_MAJOR_VERSION}${XOTCL_MINOR_VERSION} @@ -7058,11 +7058,17 @@ #define BUILD_xotcl 1 _ACEOF + if test "$GCC" != "yes" ; then + cat >>confdefs.h <<\_ACEOF +#define VISUAL_CC 1 +_ACEOF + + fi CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc50.pch vc60.pch" #TEA_ADD_SOURCES([win/winFile.c]) #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/w else - CLEANFILES="*.o *.a *.so *~ core gmon.out config.*" + CLEANFILES="*.o *.a *.so *~ core gmon.out" #TEA_ADD_SOURCES([unix/unixFile.c]) #TEA_ADD_LIBS([-lsuperfly]) fi @@ -10670,7 +10676,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by xotcl $as_me 1.3.3, which was +This file was extended by xotcl $as_me 1.3.4, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -10725,7 +10731,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -xotcl config.status 1.3.3 +xotcl config.status 1.3.4 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" @@ -11320,3 +11326,5 @@ + + Index: xotcl/configure.in =================================================================== diff -u -r55c33d4f309c661c404d79a77168110864e7258a -r489071934af0126a0f768b0ced07dea3b2328a23 --- xotcl/configure.in (.../configure.in) (revision 55c33d4f309c661c404d79a77168110864e7258a) +++ xotcl/configure.in (.../configure.in) (revision 489071934af0126a0f768b0ced07dea3b2328a23) @@ -11,7 +11,7 @@ # for this package, and can be a relative path, such as: # #-------------------------------------------------------------------- -define(XOTclVersion, 1.3.3) +define(XOTclVersion, 1.3.4) AC_INIT([xotcl], [XOTclVersion]) #-------------------------------------------------------------------- @@ -104,7 +104,7 @@ # do not modify the following lines manually, they are generated with changeXOTclVersion XOTCL_MAJOR_VERSION=1 XOTCL_MINOR_VERSION=3 -XOTCL_RELEASE_LEVEL=.3 +XOTCL_RELEASE_LEVEL=.4 XOTCL_VERSION=${XOTCL_MAJOR_VERSION}.${XOTCL_MINOR_VERSION} NODOT_VERSION=${XOTCL_MAJOR_VERSION}${XOTCL_MINOR_VERSION} @@ -240,11 +240,14 @@ if test "${TEA_PLATFORM}" = "windows" ; then AC_DEFINE(BUILD_xotcl) + if test "$GCC" != "yes" ; then + AC_DEFINE(VISUAL_CC) + fi CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc50.pch vc60.pch" #TEA_ADD_SOURCES([win/winFile.c]) #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/w else - CLEANFILES="*.o *.a *.so *~ core gmon.out config.*" + CLEANFILES="*.o *.a *.so *~ core gmon.out" #TEA_ADD_SOURCES([unix/unixFile.c]) #TEA_ADD_LIBS([-lsuperfly]) fi @@ -447,3 +450,5 @@ + + Index: xotcl/doc/xo-daemon.html =================================================================== diff -u -r61ee5d555b387296b00027421f9d6ff9ce54a253 -r489071934af0126a0f768b0ced07dea3b2328a23 --- xotcl/doc/xo-daemon.html (.../xo-daemon.html) (revision 61ee5d555b387296b00027421f9d6ff9ce54a253) +++ xotcl/doc/xo-daemon.html (.../xo-daemon.html) (revision 489071934af0126a0f768b0ced07dea3b2328a23) @@ -76,7 +76,7 @@ Date: - [::xotcl::rcs date {$Date: 2004/11/27 21:15:46 $}] + [::xotcl::rcs date {$Date: 2004/12/02 00:01:20 $}] Index: xotcl/doc/xo-whichPkg.html =================================================================== diff -u -r61ee5d555b387296b00027421f9d6ff9ce54a253 -r489071934af0126a0f768b0ced07dea3b2328a23 --- xotcl/doc/xo-whichPkg.html (.../xo-whichPkg.html) (revision 61ee5d555b387296b00027421f9d6ff9ce54a253) +++ xotcl/doc/xo-whichPkg.html (.../xo-whichPkg.html) (revision 489071934af0126a0f768b0ced07dea3b2328a23) @@ -52,7 +52,7 @@ Date: - [::xotcl::rcs date {$Date: 2004/11/27 21:15:46 $}] + [::xotcl::rcs date {$Date: 2004/12/02 00:01:20 $}] Index: xotcl/generic/xotcl.c =================================================================== diff -u -ra2a38f88c2b4e7891bf5addc324e2023d3adfccd -r489071934af0126a0f768b0ced07dea3b2328a23 --- xotcl/generic/xotcl.c (.../xotcl.c) (revision a2a38f88c2b4e7891bf5addc324e2023d3adfccd) +++ xotcl/generic/xotcl.c (.../xotcl.c) (revision 489071934af0126a0f768b0ced07dea3b2328a23) @@ -1,4 +1,4 @@ -/* $Id: xotcl.c,v 1.32 2004/11/20 18:54:34 neumann Exp $ +/* $Id: xotcl.c,v 1.33 2004/12/02 00:01:20 neumann Exp $ * * XOTcl - Extended OTcl * @@ -64,11 +64,11 @@ #ifdef USE_TCL_STUBS # define XOTcl_ExprObjCmd(cd,in,objc,objv) \ - XOTclCallCommand(in, EXPR, objc, objv) + XOTclCallCommand(in, XOTE_EXPR, objc, objv) # define XOTcl_IncrObjCmd(cd,in,objc,objv) \ - XOTclCallCommand(in, INCR, objc, objv) + XOTclCallCommand(in, XOTE_INCR, objc, objv) # define XOTcl_SubstObjCmd(cd,in,objc,objv) \ - XOTclCallCommand(in, SUBST, objc, objv) + XOTclCallCommand(in, XOTE_SUBST, objc, objv) #else # define XOTcl_ExprObjCmd(cd,in,objc,objv) \ Tcl_ExprObjCmd(cd, in, objc, objv) @@ -93,11 +93,11 @@ static void GuardDel(XOTclCmdList* filterCL); static Tcl_ObjType XOTclObjectType = { - "XOTclObject", + "XOTclObject", FreeXOTclObjectInternalRep, DupXOTclObjectInternalRep, - UpdateStringOfXOTclObject, - SetXOTclObjectFromAny + UpdateStringOfXOTclObject, + SetXOTclObjectFromAny }; @@ -138,8 +138,8 @@ Tcl_Obj * CONST objv[]); static int callDestroyMethod(ClientData cd, Tcl_Interp *in, XOTclObject *obj, int flags); -static XOTclObject *GetObject(Tcl_Interp *in, char *name); -static XOTclClass *GetClass(Tcl_Interp *in, char *name); +static XOTclObject *XOTclpGetObject(Tcl_Interp *in, char *name); +static XOTclClass *XOTclpGetClass(Tcl_Interp *in, char *name); static XOTclCallStackContent* CallStackGetFrame(Tcl_Interp *in); #if !defined(NDEBUG) static void checkAllInstances(Tcl_Interp *in, XOTclClass *startCl, int lvl); @@ -171,7 +171,7 @@ Tcl_IncrObjCmd(ClientData cd, Tcl_Interp *in, int objc, Tcl_Obj *CONST objv[]) { int result; char *argv[3]; - argv[0] = XOTclGlobalStrings[INCR]; + argv[0] = XOTclGlobalStrings[XOTE_INCR]; argv[1] = ObjStr(objv[1]); if (objc == 3) argv[2] = ObjStr(objv[2]); @@ -489,11 +489,11 @@ fprintf(stderr," **** name is '%s'\n", string); INCR_REF_COUNT(tmpName); } - obj = GetObject(in, string); + obj = XOTclpGetObject(in, string); if (tmpName) {DECR_REF_COUNT(tmpName);} } #else - obj = GetObject(in, string); + obj = XOTclpGetObject(in, string); #endif @@ -749,7 +749,7 @@ Tcl_Obj *ov[3]; char* objName = ObjStr(objPtr); ov[0] = RUNTIME_STATE(in)->theClass->object.cmdName; - ov[1] = XOTclGlobalObjects[__UNKNOWN]; + ov[1] = XOTclGlobalObjects[XOTE___UNKNOWN]; if (!isAbsolutePath(objName)) { ov[2] = NameInNamespaceObj(in,objName,callingNameSpace(in)); } else { @@ -1056,7 +1056,7 @@ fprintf(stderr, " command found\n"); PRINTOBJ("callDestroy", obj); #endif - result = callMethod(cd, in, XOTclGlobalObjects[DESTROY], 2, 0, flags); + result = callMethod(cd, in, XOTclGlobalObjects[XOTE_DESTROY], 2, 0, flags); if (result != TCL_OK) { static char cmd[] = "puts stderr \"[self]: Error in instproc destroy\n\ @@ -1251,7 +1251,7 @@ /* fprintf(stderr, " ... child %s\n", oname); */ ALLOC_NAME_NS(&name, ns->fullName, oname); - obj = GetObject(in, Tcl_DStringValue(&name)); + obj = XOTclpGetObject(in, Tcl_DStringValue(&name)); if (obj) { /* @@ -1329,9 +1329,9 @@ XOTclCallStackContent *csc = cs->top; for (; csc > cs->content; csc--) { - if (csc->cmdPtr == cmd) + if (csc->cmdPtr == cmd) { csc->cmdPtr = NULL; - break; + } } return Tcl_DeleteCommandFromToken(in, cmd); } @@ -1464,21 +1464,21 @@ parentName = Tcl_DStringValue(dsp); if (Tcl_FindNamespace(in, parentName, (Tcl_Namespace *) NULL, TCL_GLOBAL_ONLY) == 0) { - XOTclObject *parentObj = (XOTclObject*) GetObject(in, parentName); + XOTclObject *parentObj = (XOTclObject*) XOTclpGetObject(in, parentName); if (parentObj) { requireObjNamespace(in, parentObj); } else { /* call unknown and try again */ Tcl_Obj *ov[3]; int rc; ov[0] = RUNTIME_STATE(in)->theClass->object.cmdName; - ov[1] = XOTclGlobalObjects[__UNKNOWN]; + ov[1] = XOTclGlobalObjects[XOTE___UNKNOWN]; ov[2] = Tcl_NewStringObj(parentName,-1); INCR_REF_COUNT(ov[2]); /*fprintf(stderr,"+++ calling __unknown for %s\n", ObjStr(ov[2]));*/ rc = Tcl_EvalObjv(in, 3, ov, 0); if (rc == TCL_OK) { - XOTclObject *parentObj = (XOTclObject*) GetObject(in, parentName); + XOTclObject *parentObj = (XOTclObject*) XOTclpGetObject(in, parentName); if (parentObj) { requireObjNamespace(in, parentObj); } @@ -1518,17 +1518,16 @@ */ - extern XOTcl_Object* XOTclGetObject(Tcl_Interp *in, char *name) { - return (XOTcl_Object*) GetObject(in, name); + return (XOTcl_Object*) XOTclpGetObject(in, name); } /* * Find an object using a char *name */ static XOTclObject* -GetObject(Tcl_Interp *in, char *name) { +XOTclpGetObject(Tcl_Interp *in, char *name) { register Tcl_Command cmd; assert(name); cmd = NSFindCommand(in, name, NULL); @@ -1544,20 +1543,20 @@ extern XOTcl_Class* XOTclGetClass(Tcl_Interp *in, char *name) { - return (XOTcl_Class*)GetClass(in, name); + return (XOTcl_Class*)XOTclpGetClass(in, name); } static XOTclClass* -GetClass(Tcl_Interp *in, char *name) { - XOTclObject *obj = GetObject(in, name); +XOTclpGetClass(Tcl_Interp *in, char *name) { + XOTclObject *obj = XOTclpGetObject(in, name); return (obj && XOTclObjectIsClass(obj)) ? (XOTclClass*)obj : NULL; } static XOTclClass* GetClassFromFullName(Tcl_Interp *in, char *fullName) { XOTclClass *cl; if (isClassName(fullName)) { - cl = GetClass(in, NSCutXOTclClasses(fullName)); + cl = XOTclpGetClass(in, NSCutXOTclClasses(fullName)); } else { cl = NULL; } @@ -1630,21 +1629,21 @@ flgs |= TCL_NAMESPACE_ONLY; #ifndef PRE83 - valueObject = TclIncrVar2(in, XOTclGlobalObjects[AUTONAMES], name, 1, flgs); + valueObject = TclIncrVar2(in, XOTclGlobalObjects[XOTE_AUTONAMES], name, 1, flgs); #else - valueObject = TclIncrVar2(in, XOTclGlobalObjects[AUTONAMES], name, 1, 0); + valueObject = TclIncrVar2(in, XOTclGlobalObjects[XOTE_AUTONAMES], name, 1, 0); #endif if (resetOpt) { if (valueObject != NULL) { /* we have an entry */ - Tcl_UnsetVar2(in, XOTclGlobalStrings[AUTONAMES], ObjStr(name), flgs); + Tcl_UnsetVar2(in, XOTclGlobalStrings[XOTE_AUTONAMES], ObjStr(name), flgs); } - result = XOTclGlobalObjects[EMPTY]; + result = XOTclGlobalObjects[XOTE_EMPTY]; INCR_REF_COUNT(result); } else { if (valueObject == NULL) { - valueObject = Tcl_ObjSetVar2(in, XOTclGlobalObjects[AUTONAMES], - name, XOTclGlobalObjects[ZERO], flgs); + valueObject = Tcl_ObjSetVar2(in, XOTclGlobalObjects[XOTE_AUTONAMES], + name, XOTclGlobalObjects[XOTE_ZERO], flgs); } if (instanceOpt) { char buffer[1], firstChar, *nextChars; @@ -1688,7 +1687,7 @@ ALLOC_ON_STACK(Tcl_Obj*,3, ov); savedResult = Tcl_GetObjResult(in); INCR_REF_COUNT(savedResult); - ov[0] = XOTclGlobalObjects[FORMAT]; + ov[0] = XOTclGlobalObjects[XOTE_FORMAT]; ov[1] = result; ov[2] = valueObject; if (Tcl_EvalObjv(in, 3, ov, 0) != TCL_OK) { @@ -1973,7 +1972,7 @@ if (Tcl_Interp_framePtr(in) != varFramePtr && top->currentFramePtr) { XOTclCallStackContent *bot = cs->content + 1; /* we are in a uplevel */ - while (varFramePtr > top->currentFramePtr && top>bot) { + while (varFramePtr != top->currentFramePtr && top>bot) { top--; } } @@ -2641,7 +2640,7 @@ XOTclCmdList* new; if (Tcl_ListObjGetElements(in, name, &ocName, &ovName) == TCL_OK && ocName > 1) { - if (ocName == 3 && !strcmp(ObjStr(ovName[1]), XOTclGlobalStrings[GUARD_OPTION])) { + if (ocName == 3 && !strcmp(ObjStr(ovName[1]), XOTclGlobalStrings[XOTE_GUARD_OPTION])) { name = ovName[0]; guard = ovName[2]; /*fprintf(stderr,"mixinadd name = '%s', guard = '%s'\n", ObjStr(name), ObjStr(guard));*/ @@ -2825,7 +2824,7 @@ Tcl_Obj *l = Tcl_NewListObj(0, NULL); Tcl_Obj *g = (Tcl_Obj*) m->clientData; Tcl_ListObjAppendElement(in, l, mixinClass->object.cmdName); - Tcl_ListObjAppendElement(in, l, XOTclGlobalObjects[GUARD_OPTION]); + Tcl_ListObjAppendElement(in, l, XOTclGlobalObjects[XOTE_GUARD_OPTION]); Tcl_ListObjAppendElement(in, l, g); Tcl_ListObjAppendElement(in, list, l); } else @@ -2842,7 +2841,7 @@ Tcl_Command cmd; while (mixinList) { XOTclClass *mcl = - GetClass(in, (char*) Tcl_GetCommandName(in, mixinList->cmdPtr)); + XOTclpGetClass(in, (char*) Tcl_GetCommandName(in, mixinList->cmdPtr)); if (mcl && SearchCMethod(mcl, name, &cmd)) return cmd; @@ -3163,7 +3162,7 @@ XOTclCmdList* new; if (Tcl_ListObjGetElements(in, name, &ocName, &ovName) == TCL_OK && ocName > 1) { - if (ocName == 3 && !strcmp(ObjStr(ovName[1]), XOTclGlobalStrings[GUARD_OPTION])) { + if (ocName == 3 && !strcmp(ObjStr(ovName[1]), XOTclGlobalStrings[XOTE_GUARD_OPTION])) { name = ovName[0]; guard = ovName[2]; } @@ -3317,10 +3316,10 @@ Tcl_Obj *procObj = Tcl_NewStringObj(cmdName, -1); if (cl) { Tcl_ListObjAppendElement(in, list, cl->object.cmdName); - Tcl_ListObjAppendElement(in, list, XOTclGlobalObjects[INSTPROC]); + Tcl_ListObjAppendElement(in, list, XOTclGlobalObjects[XOTE_INSTPROC]); } else { Tcl_ListObjAppendElement(in, list, obj->cmdName); - Tcl_ListObjAppendElement(in, list, XOTclGlobalObjects[PROC]); + Tcl_ListObjAppendElement(in, list, XOTclGlobalObjects[XOTE_PROC]); } Tcl_ListObjAppendElement(in, list, procObj); return list; @@ -3352,14 +3351,14 @@ Tcl_Obj *g = (Tcl_Obj*) f->clientData; Tcl_ListObjAppendElement(in, innerList, Tcl_NewStringObj(simpleName, -1)); - Tcl_ListObjAppendElement(in, innerList, XOTclGlobalObjects[GUARD_OPTION]); + Tcl_ListObjAppendElement(in, innerList, XOTclGlobalObjects[XOTE_GUARD_OPTION]); Tcl_ListObjAppendElement(in, innerList, g); Tcl_ListObjAppendElement(in, list, innerList); } else { if (fullProcQualifiers) { char *fullName = NSCmdFullName(f->cmdPtr); XOTclClass *fcl = GetClassFromFullName(in,fullName); - XOTclObject *fobj = fcl ? 0 : GetObject(in, fullName); + XOTclObject *fobj = fcl ? 0 : XOTclpGetObject(in, fullName); Tcl_ListObjAppendElement(in, list, getFullProcQualifier(in, simpleName, fobj, fcl)); } else { @@ -3398,7 +3397,7 @@ if (!fCl) { /* try to find the object for per-object filter */ - XOTclObject *fObj = GetObject(in, fullName); + XOTclObject *fObj = XOTclpGetObject(in, fullName); /* and then seek class/inherited filters */ if (fObj) fCl = fObj->cl; @@ -3612,7 +3611,7 @@ /* search per-object filters */ if (obj->opt && CmdListFindCmdInList(cmd, obj->opt->filters)) { Tcl_ListObjAppendElement(in, list, obj->cmdName); - Tcl_ListObjAppendElement(in, list, XOTclGlobalObjects[FILTER]); + Tcl_ListObjAppendElement(in, list, XOTclGlobalObjects[XOTE_FILTER]); Tcl_ListObjAppendElement(in, list, Tcl_NewStringObj(Tcl_GetCommandName(in, cmd), -1)); return list; @@ -3624,7 +3623,7 @@ if (opt && opt->instfilters) { if (CmdListFindCmdInList(cmd, opt->instfilters)) { Tcl_ListObjAppendElement(in, list, pl->cl->object.cmdName); - Tcl_ListObjAppendElement(in, list, XOTclGlobalObjects[INSTFILTER]); + Tcl_ListObjAppendElement(in, list, XOTclGlobalObjects[XOTE_INSTFILTER]); Tcl_ListObjAppendElement(in, list, Tcl_NewStringObj(Tcl_GetCommandName(in, cmd), -1)); return list; @@ -3822,7 +3821,7 @@ Tcl_Obj *arg, int objc, Tcl_Obj *CONST objv[], int flags) { XOTclClassOpt* opt = obj->cl->opt; Tcl_Obj *pcl = (opt && opt->parameterClass) ? opt->parameterClass : - XOTclGlobalObjects[PARAM_CL]; + XOTclGlobalObjects[XOTE_PARAM_CL]; XOTclClass *paramCl; int result; @@ -4104,7 +4103,7 @@ Tcl_Obj *cmdName = obj->cmdName; XOTclRuntimeState *rst = RUNTIME_STATE(in); XOTclCallStack *cs = &rst->cs; - /*int isdestroy = (objv[1] == XOTclGlobalObjects[DESTROY]); */ + /*int isdestroy = (objv[1] == XOTclGlobalObjects[XOTE_DESTROY]); */ #ifdef AUTOVARS int isNext; #endif @@ -4121,8 +4120,8 @@ #ifdef OBJDELETION_TRACE method = objv[1]; - if (method == XOTclGlobalObjects[CLEANUP] || - method == XOTclGlobalObjects[DESTROY]) { + if (method == XOTclGlobalObjects[XOTE_CLEANUP] || + method == XOTclGlobalObjects[XOTE_DESTROY]) { fprintf(stderr, "%s->%s id=%p destroyCalled=%d\n", ObjStr(cmdName), methodName, obj, (obj->flags & XOTCL_DESTROY_CALLED)); @@ -4233,7 +4232,7 @@ Tcl_AppendResult(in, ObjStr(objv[0]), ": unable to dispatch method '", callMethod, "'", 0); result = TCL_ERROR; - } else if (objv[1] != XOTclGlobalObjects[UNKNOWN]) { + } else if (objv[1] != XOTclGlobalObjects[XOTE_UNKNOWN]) { /* * back off and try unknown; */ @@ -4245,7 +4244,7 @@ XOTclObjectIsClass(obj), obj, ObjStr(obj->cmdName)); */ tov[0] = obj->cmdName; - tov[1] = XOTclGlobalObjects[UNKNOWN]; + tov[1] = XOTclGlobalObjects[XOTE_UNKNOWN]; if (objc>1) memcpy(tov+2, objv+1, sizeof(Tcl_Obj *)*(objc-1)); /* @@ -4311,7 +4310,7 @@ if (objc == 1) { Tcl_Obj *tov[2]; tov[0] = objv[0]; - tov[1] = XOTclGlobalObjects[DEFAULTMETHOD]; + tov[1] = XOTclGlobalObjects[XOTE_DEFAULTMETHOD]; result = DoDispatch(cd, in, 2, tov, flags); } else { /* try normal dispatch */ @@ -4527,7 +4526,7 @@ Tcl_ListObjAppendElement(in, nonPosArgsObj, npaObj); } - ov[2] = XOTclGlobalObjects[ARGS]; + ov[2] = XOTclGlobalObjects[XOTE_ARGS]; ov[3] = addPrefixToBody(objv[4], 1); hPtr = Tcl_CreateHashEntry(nonPosArgsTable, ObjStr(ov[1]), &nw); @@ -4644,7 +4643,7 @@ key = Tcl_GetHashKey(table, hPtr); Tcl_SetResult(in, key, TCL_VOLATILE); } else { - Tcl_SetObjResult(in, XOTclGlobalObjects[EMPTY]); + Tcl_SetObjResult(in, XOTclGlobalObjects[XOTE_EMPTY]); } } else { Tcl_Obj *list = Tcl_NewListObj(0, NULL); @@ -4726,12 +4725,12 @@ ListObjPtrHashTable(Tcl_Interp *in, Tcl_HashTable *table, char *pattern) { Tcl_HashEntry* hPtr; if (pattern && noMetaChars(pattern)) { - XOTclObject *childobj = GetObject(in, pattern); + XOTclObject *childobj = XOTclpGetObject(in, pattern); hPtr = Tcl_FindHashEntry(table, (char*)childobj); if (hPtr) { Tcl_SetObjResult(in, childobj->cmdName); } else { - Tcl_SetObjResult(in, XOTclGlobalObjects[EMPTY]); + Tcl_SetObjResult(in, XOTclGlobalObjects[XOTE_EMPTY]); } } else { Tcl_Obj *list = Tcl_NewListObj(0, NULL); @@ -4772,7 +4771,7 @@ for (i=0; inext) Tcl_AppendElement(in, className(sc->cl)); } else { - XOTclClass *isc = GetClass(in, pattern); + XOTclClass *isc = XOTclpGetClass(in, pattern); XOTclClasses* pl; XOTclClasses* saved; @@ -5056,7 +5055,7 @@ } else result = TCL_ERROR; } else { - if (Tcl_ObjSetVar2(in, var, 0, XOTclGlobalObjects[EMPTY], 0) != NULL) { + if (Tcl_ObjSetVar2(in, var, 0, XOTclGlobalObjects[XOTE_EMPTY], 0) != NULL) { Tcl_SetIntObj(Tcl_GetObjResult(in), 0); return TCL_OK; } else @@ -5106,11 +5105,11 @@ if (pattern && noMetaChars(pattern)) { XOTcl_PushFrame(in, obj); - if ((childobj = GetObject(in, pattern)) && + if ((childobj = XOTclpGetObject(in, pattern)) && (!classesOnly || XOTclObjectIsClass(childobj))) { Tcl_SetObjResult(in, childobj->cmdName); } else { - Tcl_SetObjResult(in, XOTclGlobalObjects[EMPTY]); + Tcl_SetObjResult(in, XOTclGlobalObjects[XOTE_EMPTY]); } XOTcl_PopFrame(in,obj); } else { @@ -5121,7 +5120,7 @@ for (; hPtr != 0; hPtr = Tcl_NextHashEntry(&hSrch)) { char *key = Tcl_GetHashKey(cmdTable, hPtr); if (!pattern || Tcl_StringMatch(key, pattern)) { - if ((childobj = GetObject(in, key)) && + if ((childobj = XOTclpGetObject(in, key)) && (!classesOnly || XOTclObjectIsClass(childobj))) { Tcl_ListObjAppendElement(in, list, childobj->cmdName); } @@ -5549,7 +5548,7 @@ return XOTclVarErrMsg(in, "Can't find proc", (char *)NULL); } else if (isClassString(option)) { /* class subcommand */ XOTclClass *cl = GetSelfClass(in); - Tcl_SetObjResult(in, cl ? cl->object.cmdName : XOTclGlobalObjects[EMPTY]); + Tcl_SetObjResult(in, cl ? cl->object.cmdName : XOTclGlobalObjects[XOTE_EMPTY]); return TCL_OK; } else { XOTclCallStackContent *csc = NULL; @@ -5569,7 +5568,7 @@ if (RUNTIME_STATE(in)->cmdPtr) { o = XOTclGetObjectFromCmdPtr(RUNTIME_STATE(in)->cmdPtr); } - Tcl_SetObjResult(in, o ? o->cmdName : XOTclGlobalObjects[EMPTY]); + Tcl_SetObjResult(in, o ? o->cmdName : XOTclGlobalObjects[XOTE_EMPTY]); return TCL_OK; } #endif @@ -5592,14 +5591,14 @@ } else if (!strcmp(option, "callingclass")) { csc = XOTclCallStackFindLastInvocation(in, 1); Tcl_SetObjResult(in, csc && csc->cl ? csc->cl->object.cmdName : - XOTclGlobalObjects[EMPTY]); + XOTclGlobalObjects[XOTE_EMPTY]); return TCL_OK; } else if (!strcmp(option, "callinglevel")) { Tcl_SetObjResult(in, computeLevelObj(in, CALLING_LEVEL)); return TCL_OK; } else if (!strcmp(option, "callingobject")) { csc = XOTclCallStackFindLastInvocation(in, 1); - Tcl_SetObjResult(in, csc ? csc->self->cmdName : XOTclGlobalObjects[EMPTY]); + Tcl_SetObjResult(in, csc ? csc->self->cmdName : XOTclGlobalObjects[XOTE_EMPTY]); return TCL_OK; } case 'f': @@ -6206,7 +6205,7 @@ /* * dispatch "cleanup" */ - result = callMethod((ClientData) newobj, in, XOTclGlobalObjects[CLEANUP], 2, 0, 0); + result = callMethod((ClientData) newobj, in, XOTclGlobalObjects[XOTE_CLEANUP], 2, 0, 0); return result; } @@ -6226,7 +6225,7 @@ * Search for default values of parameter on superclasses */ if (!(obj->flags & XOTCL_INIT_CALLED)) { - result = callParameterMethodWithArg(obj, in, XOTclGlobalObjects[SEARCH_DEFAULTS], + result = callParameterMethodWithArg(obj, in, XOTclGlobalObjects[XOTE_SEARCH_DEFAULTS], obj->cmdName, 3, 0, 0); if (result != TCL_OK) return result; @@ -6240,7 +6239,7 @@ */ result = callMethod((ClientData) obj, in, - XOTclGlobalObjects[CONFIGURE], objc, objv+2, 0); + XOTclGlobalObjects[XOTE_CONFIGURE], objc, objv+2, 0); if (result != TCL_OK) return result; @@ -6260,7 +6259,7 @@ if (result == TCL_OK && newargs+2 < objc) initArgsC = newargs+2; - result = callMethod((ClientData) obj, in, XOTclGlobalObjects[INIT], + result = callMethod((ClientData) obj, in, XOTclGlobalObjects[XOTE_INIT], initArgsC, objv+2, 0); obj->flags |= XOTCL_INIT_CALLED; } @@ -6379,7 +6378,7 @@ * call instdestroy for [self] */ return XOTclCallMethodWithArg((ClientData)obj->cl, in, - XOTclGlobalObjects[INSTDESTROY], obj->cmdName, + XOTclGlobalObjects[XOTE_INSTDESTROY], obj->cmdName, objc+2, objv+1, 0); } @@ -6864,7 +6863,6 @@ } return XOTclErrBadVal (in, "an info option (use 'info info' to list all info options)", cmd); - return TCL_OK; } @@ -6968,7 +6966,7 @@ int result; INCR_REF_COUNT(name); result = XOTclCallMethodWithArg((ClientData)cl, in, - XOTclGlobalObjects[CREATE], name, 3, 0, 0); + XOTclGlobalObjects[XOTE_CREATE], name, 3, 0, 0); DECR_REF_COUNT(name); return result; } @@ -6979,21 +6977,21 @@ int result; INCR_REF_COUNT(name); result = XOTclCallMethodWithArg((ClientData)cl, in, - XOTclGlobalObjects[CREATE], name, 3, 0, 0); + XOTclGlobalObjects[XOTE_CREATE], name, 3, 0, 0); DECR_REF_COUNT(name); return result; } int XOTclDeleteObject(Tcl_Interp *in, XOTcl_Object *obji) { XOTclObject *obj = (XOTclObject*) obji; - return callMethod((ClientData)obj, in, XOTclGlobalObjects[DESTROY],2,0,0); + return callMethod((ClientData)obj, in, XOTclGlobalObjects[XOTE_DESTROY],2,0,0); } int XOTclDeleteClass(Tcl_Interp *in, XOTcl_Class *cli) { XOTclClass *cl = (XOTclClass*) cli; - return callMethod((ClientData)cl, in, XOTclGlobalObjects[DESTROY],2,0,0); + return callMethod((ClientData)cl, in, XOTclGlobalObjects[XOTE_DESTROY],2,0,0); } extern Tcl_Obj* @@ -7211,7 +7209,7 @@ Tcl_Obj *alias = 0; ALLOC_ON_STACK(Tcl_Obj*,2, objv); - objv[0] = XOTclGlobalObjects[INSTVAR]; + objv[0] = XOTclGlobalObjects[XOTE_INSTVAR]; objv[1] = Tcl_NewStringObj(name, -1); INCR_REF_COUNT(objv[1]); @@ -8062,7 +8060,7 @@ opt = obj->opt; if (opt && opt->mixins) { - XOTclClass *mixinCl = GetClass(in, ObjStr(objv[1])); + XOTclClass *mixinCl = XOTclpGetClass(in, ObjStr(objv[1])); Tcl_Command mixinCmd = NULL; if (mixinCl) { mixinCmd = Tcl_GetCommandFromObj(in, mixinCl->object.cmdName); @@ -8148,7 +8146,7 @@ if ((fcl = GetClassFromFullName(in, fullName))) { fobj = 0; } else { - fobj = GetObject(in, fullName); + fobj = XOTclpGetObject(in, fullName); } Tcl_SetObjResult(in, getFullProcQualifier(in, methodName, fobj, fcl)); @@ -8179,7 +8177,7 @@ if (obj->flags & XOTCL_MIXIN_ORDER_DEFINED_AND_VALID) { XOTclCmdList* mixinList = obj->mixinOrder; while (mixinList) { - XOTclClass *mcl = GetClass(in, (char *)Tcl_GetCommandName(in, mixinList->cmdPtr)); + XOTclClass *mcl = XOTclpGetClass(in, (char *)Tcl_GetCommandName(in, mixinList->cmdPtr)); if (mcl && SearchCMethod(mcl, methodName, &cmd)) break; mixinList = mixinList->next; @@ -8193,7 +8191,7 @@ if (cmd) { char *fullName = NSCmdFullName(cmd); XOTclClass *pcl = GetClassFromFullName(in, fullName); - XOTclObject *pobj = pcl ? 0 : GetObject(in, fullName); + XOTclObject *pobj = pcl ? 0 : XOTclpGetObject(in, fullName); simpleName = (char*) Tcl_GetCommandName(in, cmd); Tcl_SetObjResult(in, getFullProcQualifier(in, simpleName, pobj, pcl)); } @@ -8517,7 +8515,7 @@ INCR_REF_COUNT(tmpObj); tov[1] = tmpObj; } - newobj = GetObject(in, objName); + newobj = XOTclpGetObject(in, objName); /*fprintf(stderr,"+++ create objv[1] '%s', usedName '%s', newObj=%p\n", specifiedName, objName, newobj);*/ @@ -8526,7 +8524,7 @@ /*fprintf(stderr, "+++ recreate, call recreate method ... %s\n", ObjStr(tov[1]));*/ /* call recreate --> initialization */ result = callMethod((ClientData) obj, in, - XOTclGlobalObjects[RECREATE], objc+1, tov+1, 0); + XOTclGlobalObjects[XOTE_RECREATE], objc+1, tov+1, 0); if (result != TCL_OK) goto create_method_exit; @@ -8544,7 +8542,7 @@ /* fprintf(stderr, "alloc ... %s\n", ObjStr(tov[1]));*/ result = callMethod((ClientData) obj, in, - XOTclGlobalObjects[ALLOC], objc+1, tov+1, 0); + XOTclGlobalObjects[XOTE_ALLOC], objc+1, tov+1, 0); if (result != TCL_OK) goto create_method_exit; @@ -8596,7 +8594,7 @@ Tcl_Obj *res = Tcl_GetObjResult(in); /* save the result */ INCR_REF_COUNT(res); - if (callMethod((ClientData)o, in, XOTclGlobalObjects[DESTROY],2,0,0) != TCL_OK) { + if (callMethod((ClientData)o, in, XOTclGlobalObjects[XOTE_DESTROY],2,0,0) != TCL_OK) { result = "Destroy for volatile object failed"; } else result = "No XOTcl Object passed"; @@ -8663,7 +8661,7 @@ ALLOC_ON_STACK(Tcl_Obj*,objc+3, ov); ov[0] = objv[0]; - ov[1] = XOTclGlobalObjects[CREATE]; + ov[1] = XOTclGlobalObjects[XOTE_CREATE]; ov[2] = fullname; if (objc >= 1) memcpy(ov+3, objv+offset, sizeof(Tcl_Obj *)*objc); @@ -9046,14 +9044,14 @@ if (opt && opt->parameterClass) { Tcl_SetObjResult(in, opt->parameterClass); } else { - Tcl_SetObjResult(in, XOTclGlobalObjects[PARAM_CL]); + Tcl_SetObjResult(in, XOTclGlobalObjects[XOTE_PARAM_CL]); } return TCL_OK; } else if (!strcmp(cmd, "parameter")) { if (cl->parameters) { Tcl_SetObjResult(in, cl->parameters); } else { - Tcl_SetObjResult(in, XOTclGlobalObjects[EMPTY]); + Tcl_SetObjResult(in, XOTclGlobalObjects[XOTE_EMPTY]); } return TCL_OK; } @@ -9105,7 +9103,7 @@ for (elts = 0; elts < pc; elts++) { result = Tcl_ListObjGetElements(in, pv[elts], &oc, &ov); if (result == TCL_OK && oc > 0 ) { - result = callParameterMethodWithArg(obj, in, XOTclGlobalObjects[MKGETTERSETTER], + result = callParameterMethodWithArg(obj, in, XOTclGlobalObjects[XOTE_MKGETTERSETTER], cl->object.cmdName, 3+oc, ov,0); } if (result != TCL_OK) @@ -9477,7 +9475,7 @@ "instmixinguard mixin guard"); if (cl->opt && cl->opt->instmixins) { - XOTclClass *mixinCl = GetClass(in, ObjStr(objv[1])); + XOTclClass *mixinCl = XOTclpGetClass(in, ObjStr(objv[1])); Tcl_Command mixinCmd = NULL; if (mixinCl) { mixinCmd = Tcl_GetCommandFromObj(in, mixinCl->object.cmdName); @@ -9529,7 +9527,7 @@ return XOTclVarErrMsg(in, "error ", self, ": unable to dispatch '", ObjStr(objv[1]), "'", (char*)NULL); - rc = callMethod(cd, in, XOTclGlobalObjects[CREATE], objc+1, objv+1, 0); + rc = callMethod(cd, in, XOTclGlobalObjects[XOTE_CREATE], objc+1, objv+1, 0); return rc; } @@ -9585,7 +9583,7 @@ if (cmd != NULL) { /*fprintf(stderr, "%s already exists\n", newName);*/ - if (!GetObject(in, newName)) { + if (!XOTclpGetObject(in, newName)) { /* command or instproc will be deleted & than copied */ Tcl_DeleteCommandFromToken(in, cmd); } else { @@ -9611,7 +9609,7 @@ /* * Do not copy Objects or Classes */ - if (!GetObject(in, oldName)) { + if (!XOTclpGetObject(in, oldName)) { if (TclIsProc((Command*)cmd)) { Proc *procPtr = TclFindProc((Interp *)in, oldName); Tcl_Obj *arglistObj; @@ -9644,7 +9642,7 @@ if (isClassName(ns->fullName)) { /* it started with ::xotcl::classes */ - XOTclClass *cl = GetClass(in, NSCutXOTclClasses(ns->fullName)); + XOTclClass *cl = XOTclpGetClass(in, NSCutXOTclClasses(ns->fullName)); XOTclProcAssertion* procs; if (cl) { @@ -9671,7 +9669,7 @@ Tcl_Eval(in, Tcl_DStringValue(dsPtr)); DSTRING_FREE(dsPtr); } else { - XOTclObject *obj = GetObject(in, ns->fullName); + XOTclObject *obj = XOTclpGetObject(in, ns->fullName); XOTclProcAssertion* procs; if (obj) { procs = obj->opt ? @@ -9746,16 +9744,16 @@ if (!newNs) return XOTclVarErrMsg(in, "CopyVars: Destination namespace ", ObjStr(objv[2]), " does not exist", (char *)NULL); - obj = GetObject(in, ns->fullName); + obj = XOTclpGetObject(in, ns->fullName); varTable = Tcl_Namespace_varTable(ns); destFullName = newNs->fullName; } else { XOTclObject *newObj; - obj = GetObject(in, ObjStr(objv[1])); + obj = XOTclpGetObject(in, ObjStr(objv[1])); if (!obj) return XOTclVarErrMsg(in, "CopyVars: Origin object/namespace ", ObjStr(objv[1]), " does not exist", (char *)NULL); - newObj = GetObject(in, ObjStr(objv[2])); + newObj = XOTclpGetObject(in, ObjStr(objv[2])); if (!newObj) return XOTclVarErrMsg(in, "CopyVars: Destination object/namespace ", ObjStr(objv[2]), " does not exist", (char *)NULL); @@ -10074,7 +10072,7 @@ if (r1 == TCL_OK && npac > 1 && *(ObjStr(npav[1])) != '\0') { r1 = Tcl_ListObjGetElements(in, npav[1], &checkc, &checkv); if (r1 == TCL_OK) { - checkObj = XOTclGlobalObjects[NON_POS_ARGS_OBJ]; + checkObj = XOTclGlobalObjects[XOTE_NON_POS_ARGS_OBJ]; for (j=0; j < checkc; j++) { r1 = Tcl_ListObjGetElements(in, checkv[j], &checkArgc, &checkArgv); if (r1 == TCL_OK && checkArgc > 1) { @@ -10120,7 +10118,7 @@ return XOTclObjErrArgCnt(in, NULL, "::xotcl::interp name ?args?"); saved = objv[0]; - objv[0] = XOTclGlobalObjects[INTERP]; + objv[0] = XOTclGlobalObjects[XOTE_INTERP]; if (Tcl_EvalObjv(in, objc, objv, TCL_GLOBAL_ONLY|TCL_LEAVE_ERR_MSG) != TCL_OK) { objv[0] = saved; return TCL_ERROR; @@ -10274,7 +10272,7 @@ for (hPtr = Tcl_FirstHashEntry(cmdTable, &hSrch); hPtr; hPtr = Tcl_NextHashEntry(&hSrch)) { char *key = Tcl_GetHashKey(cmdTable, hPtr); - if (GetObject(in, key)) { + if (XOTclpGetObject(in, key)) { /*fprintf(stderr,"child = %s\n",key);*/ result = 1; break; @@ -10302,7 +10300,7 @@ hPtr = Tcl_FirstHashEntry(commandTable, &hSrch); while (hPtr) { char *key = Tcl_GetHashKey(commandTable, hPtr); - obj = GetObject(in, key); + obj = XOTclpGetObject(in, key); if (obj && !XOTclObjectIsClass(obj) && !ObjectHasChildren(in,obj)) { /*fprintf(stderr," ... delete object %s %p\n",key,obj);*/ Tcl_DeleteCommandFromToken(in, obj->id); @@ -10323,7 +10321,7 @@ hPtr = Tcl_FirstHashEntry(commandTable, &hSrch); while (hPtr) { char *key = Tcl_GetHashKey(commandTable, hPtr); - cl = GetClass(in, key); + cl = XOTclpGetClass(in, key); /*fprintf(stderr,"cl key = %s %p\n", key, cl);*/ if (cl && !ObjectHasChildren(in, (XOTclObject*)cl) @@ -10422,7 +10420,7 @@ * evaluate user-defined exit handler */ result = callMethod((ClientData)RUNTIME_STATE(in)->theObject, in, - XOTclGlobalObjects[EXIT_HANDLER], 2, 0, 0); + XOTclGlobalObjects[XOTE_EXIT_HANDLER], 2, 0, 0); if (result != TCL_OK) { fprintf(stderr,"User defined exit handler contains errors!\n" "Error in line %d: %s\nExecution interrupted.\n", @@ -10458,7 +10456,7 @@ hPtr = Tcl_FirstHashEntry(commandTable, &hSrch); while (hPtr) { char *key = Tcl_GetHashKey(commandTable, hPtr); - obj = GetObject(in, key); + obj = XOTclpGetObject(in, key); /*fprintf(stderr,"key = %s %p %d\n", key, obj, obj && !XOTclObjectIsClass(obj));*/ if (obj && !XOTclObjectIsClass(obj) @@ -10469,7 +10467,7 @@ hPtr = Tcl_FirstHashEntry(commandTable, &hSrch); while (hPtr) { char *key = Tcl_GetHashKey(commandTable, hPtr); - cl = GetClass(in, key); + cl = XOTclpGetClass(in, key); if (cl && !(cl->object.flags & XOTCL_DESTROY_CALLED)) callDestroyMethod((ClientData)cl, in, (XOTclObject*)cl, 0); @@ -10805,23 +10803,23 @@ */ nonPositionalArgsCl = PrimitiveCCreate(in, - XOTclGlobalStrings[NON_POS_ARGS_CL], - thecls); + XOTclGlobalStrings[XOTE_NON_POS_ARGS_CL], + thecls); XOTclAddIMethod(in, (XOTcl_Class*) nonPositionalArgsCl, "required", (Tcl_ObjCmdProc*) XOTclCheckRequiredArgs, 0, 0); XOTclAddIMethod(in, (XOTcl_Class*) nonPositionalArgsCl, "boolean", (Tcl_ObjCmdProc*) XOTclCheckBooleanArgs, 0, 0); - PrimitiveOCreate(in, XOTclGlobalStrings[NON_POS_ARGS_OBJ], + PrimitiveOCreate(in, XOTclGlobalStrings[XOTE_NON_POS_ARGS_OBJ], nonPositionalArgsCl); /* * Parameter Class */ - paramCl = PrimitiveCCreate(in, XOTclGlobalStrings[PARAM_CL], thecls); + paramCl = PrimitiveCCreate(in, XOTclGlobalStrings[XOTE_PARAM_CL], thecls); XOTclAddPMethod(in, (XOTcl_Object*) ¶mCl->object, - XOTclGlobalStrings[SEARCH_DEFAULTS], + XOTclGlobalStrings[XOTE_SEARCH_DEFAULTS], (Tcl_ObjCmdProc*) ParameterSearchDefaultsMethod, 0, 0); /* * set runtime version information in Tcl variable Index: xotcl/generic/xotclInt.h =================================================================== diff -u -rfda7a40548bb07598ac92453064c2d844d6b12da -r489071934af0126a0f768b0ced07dea3b2328a23 --- xotcl/generic/xotclInt.h (.../xotclInt.h) (revision fda7a40548bb07598ac92453064c2d844d6b12da) +++ xotcl/generic/xotclInt.h (.../xotclInt.h) (revision 489071934af0126a0f768b0ced07dea3b2328a23) @@ -1,5 +1,5 @@ /* -*- Mode: c++ -*- - * $Id: xotclInt.h,v 1.11 2004/11/19 01:41:32 neumann Exp $ + * $Id: xotclInt.h,v 1.12 2004/12/02 00:01:20 neumann Exp $ * Extended Object Tcl (XOTcl) * * Copyright (C) 1999-2002 Gustaf Neumann, Uwe Zdun @@ -140,7 +140,7 @@ *m == 'i' && m[1] == 'n' && m[2] == 'f' && m[3] == 'o' && \ m[4] == '\0') #ifdef AUTOVARS -#define isNextString(m) (\ +# define isNextString(m) (\ *m == 'n' && m[1] == 'e' && m[2] == 'x' && m[3] == 't' && \ m[4] == '\0') #endif @@ -159,26 +159,23 @@ *m == 'p' && m[1] == 'r' && m[2] == 'o' && m[3] == 'c' && \ m[4] == '\0') -#if defined(sun) /*|| defined(__linux__)*/ +#if (defined(sun) || defined(__hpux)) && !defined(__GNUC__) # define USE_ALLOCA #endif -#if _IBMC__ >= 0x0306 +#if defined(__IBMC__) && !defined(__GNUC__) +# if __IBMC__ >= 0x0306 # define USE_ALLOCA +# else +# define USE_MALLOC +# endif #endif #if defined(VISUAL_CC) # define USE_MALLOC #endif - -#if defined(USE_MALLOC) -# define ALLOC_ON_STACK(type,n,var) type *var = (type *)ckalloc((n)*sizeof(type)) -# define FREE_ON_STACK(var) ckfree((char*)var) -#elif defined(USE_ALLOCA) -# define ALLOC_ON_STACK(type,n,var) type *var = (type *)alloca((n)*sizeof(type)) -# define FREE_ON_STACK(var) -#else +#if defined(__GNUC__) && !defined(USE_ALLOCA) && !defined(USE_MALLOC) # if !defined(NDEBUG) # define ALLOC_ON_STACK(type,n,var) \ int __##var##_count = (n); type __##var[n+2]; \ @@ -189,6 +186,12 @@ # define ALLOC_ON_STACK(type,n,var) type var[(n)] # define FREE_ON_STACK(var) # endif +#elif defined(USE_ALLOCA) +# define ALLOC_ON_STACK(type,n,var) type *var = (type *)alloca((n)*sizeof(type)) +# define FREE_ON_STACK(var) +#else +# define ALLOC_ON_STACK(type,n,var) type *var = (type *)ckalloc((n)*sizeof(type)) +# define FREE_ON_STACK(var) ckfree((char*)var) #endif #ifdef USE_ALLOCA @@ -201,17 +204,20 @@ # define DECR_REF_COUNT(A) \ MEM_COUNT_FREE("INCR_REF_COUNT",A); Tcl_DecrRefCount(A) #else -# if defined(sun) || __IBMC__ >= 0x0306 -# define XOTCLINLINE -# else +/* + * This was defined to be inline for anything !sun or __IBMC__ >= 0x0306, + * but __hpux should also be checked - switched to only allow in gcc - JH + */ +# if defined(__GNUC__) # define XOTCLINLINE inline +# else +# define XOTCLINLINE # endif # ifdef USE_TCL_STUBS # define XOTclNewObj(A) A=Tcl_NewObj() # define DECR_REF_COUNT(A) \ MEM_COUNT_FREE("INCR_REF_COUNT",A); assert((A)->refCount > -1); \ - Tcl_DecrRefCount(A) \ - + Tcl_DecrRefCount(A) # else # define XOTclNewObj(A) TclNewObj(A) # define DECR_REF_COUNT(A) \ @@ -506,35 +512,35 @@ and Strings - otherwise these "constants" would have to be built every time they are used; now they are built once in XOTcl_Init */ typedef enum { - EMPTY, UNKNOWN, CREATE, DESTROY, INSTDESTROY, ALLOC, - INIT, INSTVAR, INTERP, AUTONAMES, - ZERO, MOVE, SELF, CLASS, RECREATE, - SELF_CLASS, SELF_PROC, PARAM_CL, - SEARCH_DEFAULTS, EXIT_HANDLER, - NON_POS_ARGS_CL, NON_POS_ARGS_OBJ, - CLEANUP, CONFIGURE, FILTER, INSTFILTER, - INSTPROC, PROC, MKGETTERSETTER, FORMAT, - NEWOBJ, GUARD_OPTION, DEFAULTMETHOD, - __UNKNOWN, ARGS, SPLIT, COMMA, + XOTE_EMPTY, XOTE_UNKNOWN, XOTE_CREATE, XOTE_DESTROY, XOTE_INSTDESTROY, + XOTE_ALLOC, XOTE_INIT, XOTE_INSTVAR, XOTE_INTERP, XOTE_AUTONAMES, + XOTE_ZERO, XOTE_MOVE, XOTE_SELF, XOTE_CLASS, XOTE_RECREATE, + XOTE_SELF_CLASS, XOTE_SELF_PROC, XOTE_PARAM_CL, + XOTE_SEARCH_DEFAULTS, XOTE_EXIT_HANDLER, + XOTE_NON_POS_ARGS_CL, XOTE_NON_POS_ARGS_OBJ, + XOTE_CLEANUP, XOTE_CONFIGURE, XOTE_FILTER, XOTE_INSTFILTER, + XOTE_INSTPROC, XOTE_PROC, XOTE_MKGETTERSETTER, XOTE_FORMAT, + XOTE_NEWOBJ, XOTE_GUARD_OPTION, XOTE_DEFAULTMETHOD, + XOTE___UNKNOWN, XOTE_ARGS, XOTE_SPLIT, XOTE_COMMA, /** these are the redefined tcl commands; leave them together at the end */ - EXPR, INCR, INFO, RENAME, SUBST, + XOTE_EXPR, XOTE_INCR, XOTE_INFO, XOTE_RENAME, XOTE_SUBST, } XOTclGlobalNames; #if !defined(XOTCL_C) extern char *XOTclGlobalStrings[]; #else char *XOTclGlobalStrings[] = { - "", "unknown", "create", "destroy", "instdestroy", "alloc", - "init", "instvar", "interp", "__autonames", + "", "unknown", "create", "destroy", "instdestroy", + "alloc", "init", "instvar", "interp", "__autonames", "0", "move", "self", "class", "recreate", "self class", "self proc", "::xotcl::Class::Parameter", "searchDefaults", "__exitHandler", - "::xotcl::NonPosArgs", "::xotcl::nonPosArgs", + "::xotcl::NonPosArgs", "::xotcl::nonPosArgs", "cleanup", "configure", "filter", "instfilter", - "instproc", "proc", "mkGetterSetter", "format", + "instproc", "proc", "mkGetterSetter", "format", "__#", "-guard", "defaultmethod", "__unknown", "args", "split", ",", - "expr", "incr", "info", "rename", "subst", + "expr", "incr", "info", "rename", "subst", }; #endif Index: xotcl/generic/xotclShadow.c =================================================================== diff -u -r638782f84b31e4ebfd00529381e280c70f9950bc -r489071934af0126a0f768b0ced07dea3b2328a23 --- xotcl/generic/xotclShadow.c (.../xotclShadow.c) (revision 638782f84b31e4ebfd00529381e280c70f9950bc) +++ xotcl/generic/xotclShadow.c (.../xotclShadow.c) (revision 489071934af0126a0f768b0ced07dea3b2328a23) @@ -1,5 +1,5 @@ /* -*- Mode: c++ -*- - * $Id: xotclShadow.c,v 1.2 2004/08/17 10:12:55 neumann Exp $ + * $Id: xotclShadow.c,v 1.3 2004/12/02 00:01:20 neumann Exp $ * * Extended Object Tcl (XOTcl) * @@ -19,7 +19,7 @@ XOTclReplaceCommandCleanup(Tcl_Interp *in, XOTclGlobalNames name) { Tcl_Command cmd; int result = TCL_OK; - XOTclShadowTclCommandInfo *ti = &RUNTIME_STATE(in)->tclCommands[name-EXPR]; + XOTclShadowTclCommandInfo *ti = &RUNTIME_STATE(in)->tclCommands[name-XOTE_EXPR]; /*fprintf(stderr," cleanup for %s ti=%p in %p\n", XOTclGlobalStrings[name], ti, in);*/ cmd = Tcl_GetCommandFromObj(in, XOTclGlobalObjects[name]); @@ -36,7 +36,7 @@ static void XOTclReplaceCommandCheck(Tcl_Interp *in, XOTclGlobalNames name, Tcl_ObjCmdProc *proc) { Tcl_Command cmd; - XOTclShadowTclCommandInfo *ti = &RUNTIME_STATE(in)->tclCommands[name-EXPR]; + XOTclShadowTclCommandInfo *ti = &RUNTIME_STATE(in)->tclCommands[name-XOTE_EXPR]; cmd = Tcl_GetCommandFromObj(in, XOTclGlobalObjects[name]); if (cmd != NULL && ti->proc && Tcl_Command_objProc(cmd) != proc) { @@ -54,7 +54,7 @@ XOTclReplaceCommand(Tcl_Interp *in, XOTclGlobalNames name, Tcl_ObjCmdProc *xotclReplacementProc, int pass) { Tcl_Command cmd; - XOTclShadowTclCommandInfo *ti = &RUNTIME_STATE(in)->tclCommands[name-EXPR]; + XOTclShadowTclCommandInfo *ti = &RUNTIME_STATE(in)->tclCommands[name-XOTE_EXPR]; int result = TCL_OK; /*fprintf(stderr,"XOTclReplaceCommand %d\n",name);*/ @@ -91,7 +91,7 @@ /* wrong # args => normal Tcl ErrMsg*/ if (objc != 3) - return XOTclCallCommand(in, RENAME, objc, objv); + return XOTclCallCommand(in, XOTE_RENAME, objc, objv); /* if an obj/cl should be renamed => call the XOTcl move method */ cmd = Tcl_FindCommand(in, ObjStr(objv[1]), (Tcl_Namespace *)NULL,0); @@ -100,12 +100,12 @@ obj = XOTclGetObjectFromCmdPtr(cmd); if (obj) { return XOTclCallMethodWithArg((ClientData)obj, in, - XOTclGlobalObjects[MOVE], objv[2], 3, 0, 0); + XOTclGlobalObjects[XOTE_MOVE], objv[2], 3, 0, 0); } } /* Actually rename the cmd using Tcl's rename*/ - return XOTclCallCommand(in, RENAME, objc, objv); + return XOTclCallCommand(in, XOTE_RENAME, objc, objv); } static int @@ -117,7 +117,7 @@ if (isBodyString(opt) && objc > 2) isBody = 1; } - result = XOTclCallCommand(in, INFO, objc, objv); + result = XOTclCallCommand(in, XOTE_INFO, objc, objv); if (isBody && result == TCL_OK) { char *body = ObjStr(Tcl_GetObjResult(in)); @@ -140,28 +140,28 @@ int initialized = (int) RUNTIME_STATE(in)->tclCommands; assert(initialized == 0); RUNTIME_STATE(in)->tclCommands = - NEW_ARRAY(XOTclShadowTclCommandInfo, SUBST-EXPR+1); + NEW_ARRAY(XOTclShadowTclCommandInfo, XOTE_SUBST - XOTE_EXPR + 1); /*fprintf(stderr, "+++ load tcl commands %d %d\n", load, initialized);*/ #ifdef USE_TCL_STUBS /* no commands are overloeaded, these are only used for calling e.g. Tcl_ExprObjCmd(), Tcl_IncrObjCmd() and Tcl_SubstObjCmd(), which are not avalailable in though the stub table */ - rc|= XOTclReplaceCommand(in, EXPR, 0, initialized); - rc|= XOTclReplaceCommand(in, INCR, 0, initialized); - rc|= XOTclReplaceCommand(in, SUBST, 0, initialized); + rc|= XOTclReplaceCommand(in, XOTE_EXPR, 0, initialized); + rc|= XOTclReplaceCommand(in, XOTE_INCR, 0, initialized); + rc|= XOTclReplaceCommand(in, XOTE_SUBST, 0, initialized); #endif /* for the following commands, we have to add our own semantics */ - rc|= XOTclReplaceCommand(in, INFO, XOTcl_InfoObjCmd, initialized); - rc|= XOTclReplaceCommand(in, RENAME, XOTcl_RenameObjCmd, initialized); + rc|= XOTclReplaceCommand(in, XOTE_INFO, XOTcl_InfoObjCmd, initialized); + rc|= XOTclReplaceCommand(in, XOTE_RENAME, XOTcl_RenameObjCmd, initialized); } else if (load == SHADOW_REFETCH) { - XOTclReplaceCommandCheck(in, INFO, XOTcl_InfoObjCmd); - XOTclReplaceCommandCheck(in, RENAME, XOTcl_RenameObjCmd); + XOTclReplaceCommandCheck(in, XOTE_INFO, XOTcl_InfoObjCmd); + XOTclReplaceCommandCheck(in, XOTE_RENAME, XOTcl_RenameObjCmd); } else { - XOTclReplaceCommandCleanup(in, INFO); - XOTclReplaceCommandCleanup(in, RENAME); + XOTclReplaceCommandCleanup(in, XOTE_INFO); + XOTclReplaceCommandCleanup(in, XOTE_RENAME); FREE(XOTclShadowTclCommandInfo*, RUNTIME_STATE(in)->tclCommands); RUNTIME_STATE(in)->tclCommands = NULL; } @@ -175,7 +175,7 @@ int XOTclCallCommand(Tcl_Interp *in, XOTclGlobalNames name, int objc, Tcl_Obj *CONST objv[]) { int result; - XOTclShadowTclCommandInfo *ti = &RUNTIME_STATE(in)->tclCommands[name-EXPR]; + XOTclShadowTclCommandInfo *ti = &RUNTIME_STATE(in)->tclCommands[name-XOTE_EXPR]; ALLOC_ON_STACK(Tcl_Obj*,objc, ov); /* {int i; Index: xotcl/library/lib/changeXOTclVersion.xotcl =================================================================== diff -u -rab63a4908f87f226de9730e0afa820388c93acc4 -r489071934af0126a0f768b0ced07dea3b2328a23 --- xotcl/library/lib/changeXOTclVersion.xotcl (.../changeXOTclVersion.xotcl) (revision ab63a4908f87f226de9730e0afa820388c93acc4) +++ xotcl/library/lib/changeXOTclVersion.xotcl (.../changeXOTclVersion.xotcl) (revision 489071934af0126a0f768b0ced07dea3b2328a23) @@ -6,7 +6,7 @@ # set XOTCL_MAJOR_VERSION 1 set XOTCL_MINOR_VERSION 3 -set XOTCL_RELEASE_LEVEL .3 +set XOTCL_RELEASE_LEVEL .4 # example settings: # 1.0 Index: xotcl/library/lib/makeDoc.xotcl =================================================================== diff -u -r2139510e0635ca88521b99d7c9751c2c15b306b6 -r489071934af0126a0f768b0ced07dea3b2328a23 --- xotcl/library/lib/makeDoc.xotcl (.../makeDoc.xotcl) (revision 2139510e0635ca88521b99d7c9751c2c15b306b6) +++ xotcl/library/lib/makeDoc.xotcl (.../makeDoc.xotcl) (revision 489071934af0126a0f768b0ced07dea3b2328a23) @@ -1,4 +1,4 @@ -#$Id: makeDoc.xotcl,v 1.2 2004/08/22 09:30:46 neumann Exp $ +#$Id: makeDoc.xotcl,v 1.3 2004/12/02 00:01:20 neumann Exp $ package require XOTcl namespace import ::xotcl::* @ @File { @@ -23,18 +23,14 @@ if {![file isdirectory $DOCDIR]} { file mkdir $DOCDIR } - if {$::tcl_platform(platform) == "windows"} { - set files "" - foreach f [lrange $argv 1 end] { - eval lappend files [glob -nocomplain $f] - } - } else { - set files [lrange $argv 1 end] - } + set files [lrange $argv 1 end] foreach file $files { - puts "...$file" - set fb [XODoc documentFileAsHTML $file $DOCDIR] - lappend fileList $file $fb + puts "...$file" + if {[catch {XODoc documentFileAsHTML $file $DOCDIR} fb]} { + puts stderr "\terror processing $file:\n[string replace $::errorInfo 400 end ...]" + } else { + lappend fileList $file $fb + } } } else { error "usage: xodoc docdir filename ?filename ...?" Index: xotcl/library/lib/package.xotcl =================================================================== diff -u -rf7894d9be99a8da3a04218abcdb9bd46b6d625c8 -r489071934af0126a0f768b0ced07dea3b2328a23 --- xotcl/library/lib/package.xotcl (.../package.xotcl) (revision f7894d9be99a8da3a04218abcdb9bd46b6d625c8) +++ xotcl/library/lib/package.xotcl (.../package.xotcl) (revision 489071934af0126a0f768b0ced07dea3b2328a23) @@ -1,4 +1,4 @@ -#$Id: package.xotcl,v 1.1 2004/05/23 22:50:39 neumann Exp $ +#$Id: package.xotcl,v 1.2 2004/12/02 00:01:20 neumann Exp $ package provide xotcl::package 0.91 package require xotcl::mixinStrategy @@ -70,7 +70,7 @@ set v [eval tcl_package require $args] if {$v != "" && $verbose} { set path [lindex [tcl_package ifneeded $pkg $v] 1] - puts "... $pkg $v loaded from �$path�" + puts "... $pkg $v loaded from '$path'" set loaded($pkg) $v ;# loaded stuff needed for Tcl 8.0 } } Index: xotcl/library/lib/staticMetadata.xotcl =================================================================== diff -u -rf7894d9be99a8da3a04218abcdb9bd46b6d625c8 -r489071934af0126a0f768b0ced07dea3b2328a23 --- xotcl/library/lib/staticMetadata.xotcl (.../staticMetadata.xotcl) (revision f7894d9be99a8da3a04218abcdb9bd46b6d625c8) +++ xotcl/library/lib/staticMetadata.xotcl (.../staticMetadata.xotcl) (revision 489071934af0126a0f768b0ced07dea3b2328a23) @@ -17,40 +17,26 @@ } Class StaticMetadataAnalyzer -superclass MetadataAnalyzer - -StaticMetadataAnalyzer instproc getCommand {content} { - upvar [self callinglevel] $content c - my instvar cmd - if {[set line [string first "\n" $c]] != -1} { - append cmd [string range $c 0 $line] - set c [string range $c [expr $line + 1] end] - if {[info complete $cmd]} { - set r $cmd; set cmd "" - return $r +StaticMetadataAnalyzer instproc cmdsplit {cmd} { + # from Jeffrey's tkcon + set inc {} + set cmds {} + foreach cmd [split [string trimleft $cmd] \n] { + if {[string compare {} $inc]} { + append inc \n$cmd + } else { + append inc [string trimleft $cmd] } - } elseif {[string length [string trim $c]] >0} { - # We have some data left which doesn't end with a "\n". This happens - # if an EOF marks the end of a line instead of a newline. - append cmd $c - set c "" - if {[info complete $cmd]} { - set r $cmd - set cmd "" - return $r - } - } else { - return "" + if {[info complete $inc] && ![regexp {[^\\]\\$} $inc]} { + if {[regexp "^\[^#\]" $inc]} {lappend cmds $inc} + set inc {} + } } - my getCommand c + if {[regexp "^\[^#\]" $inc]} {lappend cmds $inc} + return $cmds } - - StaticMetadataAnalyzer instproc evaluateCommands {c} { - while 1 { - set command [my getCommand c] - if {$command == ""} { - break - } + foreach command [my cmdsplit $c] { #puts stderr "$command===========================" if {[regexp "^ *:*@ " $command]} { #puts stderr "$command===========================" @@ -61,10 +47,11 @@ } elseif {[regexp "^ *namespace *eval *(\[^\{\]*) *\{(.*)\}\[^\}\]*$" $command _ namespace nsc]} { #puts stderr "$command===========================" my evaluateCommands $nsc - } + } } } + @ StaticMetadataAnalyzer instproc analyzeFile {name "File name"} { description "Analyze a file and build up a token structure for each metadata token in the file." } Index: xotcl/library/store/XOTclGdbm/configure =================================================================== diff -u -rab63a4908f87f226de9730e0afa820388c93acc4 -r489071934af0126a0f768b0ced07dea3b2328a23 --- xotcl/library/store/XOTclGdbm/configure (.../configure) (revision ab63a4908f87f226de9730e0afa820388c93acc4) +++ xotcl/library/store/XOTclGdbm/configure (.../configure) (revision 489071934af0126a0f768b0ced07dea3b2328a23) @@ -10920,3 +10920,5 @@ + + Index: xotcl/library/store/XOTclGdbm/configure.in =================================================================== diff -u -rab63a4908f87f226de9730e0afa820388c93acc4 -r489071934af0126a0f768b0ced07dea3b2328a23 --- xotcl/library/store/XOTclGdbm/configure.in (.../configure.in) (revision ab63a4908f87f226de9730e0afa820388c93acc4) +++ xotcl/library/store/XOTclGdbm/configure.in (.../configure.in) (revision 489071934af0126a0f768b0ced07dea3b2328a23) @@ -3,7 +3,7 @@ dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.5 2004/10/13 10:35:43 neumann Exp $ +# RCS: @(#) $Id: configure.in,v 1.6 2004/12/02 00:01:20 neumann Exp $ #----------------------------------------------------------------------- # Sample configure.in for Tcl Extensions. The only places you should @@ -251,3 +251,5 @@ + + Index: xotcl/library/store/XOTclSdbm/configure =================================================================== diff -u -rab63a4908f87f226de9730e0afa820388c93acc4 -r489071934af0126a0f768b0ced07dea3b2328a23 --- xotcl/library/store/XOTclSdbm/configure (.../configure) (revision ab63a4908f87f226de9730e0afa820388c93acc4) +++ xotcl/library/store/XOTclSdbm/configure (.../configure) (revision 489071934af0126a0f768b0ced07dea3b2328a23) @@ -10876,3 +10876,5 @@ + + Index: xotcl/library/store/XOTclSdbm/configure.in =================================================================== diff -u -rab63a4908f87f226de9730e0afa820388c93acc4 -r489071934af0126a0f768b0ced07dea3b2328a23 --- xotcl/library/store/XOTclSdbm/configure.in (.../configure.in) (revision ab63a4908f87f226de9730e0afa820388c93acc4) +++ xotcl/library/store/XOTclSdbm/configure.in (.../configure.in) (revision 489071934af0126a0f768b0ced07dea3b2328a23) @@ -3,7 +3,7 @@ dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.5 2004/10/13 10:35:43 neumann Exp $ +# RCS: @(#) $Id: configure.in,v 1.6 2004/12/02 00:01:20 neumann Exp $ #----------------------------------------------------------------------- # Sample configure.in for Tcl Extensions. The only places you should @@ -214,3 +214,5 @@ + + Index: xotcl/library/xml/TclExpat-1.1/configure =================================================================== diff -u -rab63a4908f87f226de9730e0afa820388c93acc4 -r489071934af0126a0f768b0ced07dea3b2328a23 --- xotcl/library/xml/TclExpat-1.1/configure (.../configure) (revision ab63a4908f87f226de9730e0afa820388c93acc4) +++ xotcl/library/xml/TclExpat-1.1/configure (.../configure) (revision 489071934af0126a0f768b0ced07dea3b2328a23) @@ -10876,3 +10876,5 @@ + + Index: xotcl/library/xml/TclExpat-1.1/configure.in =================================================================== diff -u -rab63a4908f87f226de9730e0afa820388c93acc4 -r489071934af0126a0f768b0ced07dea3b2328a23 --- xotcl/library/xml/TclExpat-1.1/configure.in (.../configure.in) (revision ab63a4908f87f226de9730e0afa820388c93acc4) +++ xotcl/library/xml/TclExpat-1.1/configure.in (.../configure.in) (revision 489071934af0126a0f768b0ced07dea3b2328a23) @@ -3,7 +3,7 @@ dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.5 2004/10/13 10:35:43 neumann Exp $ +# RCS: @(#) $Id: configure.in,v 1.6 2004/12/02 00:01:20 neumann Exp $ #----------------------------------------------------------------------- # Sample configure.in for Tcl Extensions. The only places you should @@ -214,3 +214,5 @@ + +