Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Difference From fe91db4e276040d4 To ab191039017d009c

2017-08-24
13:57
Install also tdomConfig.sh. And since tdomConfig.sh is generated by configure, don't remove it with make clean but only with make distclean. Closed-Leaf check-in: 9ca8c82d0a user: rolf tags: prepare-release
2017-08-23
16:16
Changed a last comma. check-in: fe91db4e27 user: rolf tags: prepare-release
15:52
Hopfully final proof-reading of README. check-in: 1aaa919d6e user: rolf tags: prepare-release
2017-08-17
17:58
Merged trunk. check-in: c75669c175 user: rolf tags: prepare-release
2017-08-14
12:51
Merged from trunk. check-in: ab19103901 user: rolf tags: prepare-release
12:17
Updated TEA to tclconfig trunk. check-in: dcb4735ca9 user: rolf tags: trunk
2017-08-05
12:57
Merged from trunk. check-in: d9388d5e29 user: rolf tags: prepare-release

Changes to CHANGES.

     1         -2017-08-21 Ashok Nadkarni
     2      1   
     3         -        Windows build system (VC and mingw) modernised.
     4         -
     5         -2017-08-17 Rolf Ade  <rolf@pointsman.de>
     6         -
     7         -        New feature "creating real FQ nodes with *fromScript methods",
     8         -        by adding option -namespace to [dom createNodeCmd].
     9         -
    10         -2017-08-14 Rolf Ade  <rolf@pointsman.de>
    11         -
    12         -        Updated TEA.
    13         -
    14         -2017-07-29 Rolf Ade  <rolf@pointsman.de>
    15         -
    16         -        Removed hacky check on [load] time if the tclsh and tDOM are
    17         -        build with incompatible TCL_UTF_MAX (because it did not work
    18         -        anymore with recent tcl because of changes in core).
    19         -
    20         -2017-07-28 Rolf Ade  <rolf@pointsman.de>
    21         -
    22         -        Added JSON support. New -json option to [dom parse]. New doc
    23         -        method asJSON. New node method jsonType. New option -jsonType
    24         -        of [dom createNodeCmd]. New option -tagName of [dom
    25         -        createNodeCmd]. New option -jsonType to dom method
    26         -        createDocumentNode.
    27         -
    28         -2017-04-06 Rolf Ade  <rolf@pointsman.de>
    29         -
    30         -        Added HTM5 parser (new -html5 option to [dom parse]). Requires
    31         -        gumbo lib and must be enabled at configure time.
    32         -        
    33      2   2016-10-01 Rolf Ade  <rolf@pointsman.de>
    34      3   
    35      4           Updated to expat 2.2.0.
    36      5   
    37      6   2015-09-11 Rolf Ade  <rolf@pointsman.de>
    38      7   
    39      8           Added options -xmlDeclaration and -encString to the asXML

Changes to ChangeLog.

     1      1   
     2      2   NOTICE: This file isn't kept up to date anymore. Look at the timeline
     3         -of the leading fossil repository (http://tdom.org) or at the backup
            3  +of the leading fossil repository
            4  +(https://46.163.78.80/cgi-bin/repros/tdom/timeline) or at the backup
     4      5   repository at https://core.tcl.tk/tdom/timeline for detailed lists of
     5      6   code changes.
     6      7   
     7      8   User interface changes/enhancements and other important changes will
     8      9   still be documented in the CHANGES file.
     9     10   
    10     11   2012-05-17  Rolf Ade  <rolf@pointsman.de>

Changes to README.

     1      1   
     2      2   
     3         -    tDOM - a XML/DOM/XPath/XSLT/HTML/JSON implementation for Tcl
     4         -                          (Version 0.9.0)
            3  +              tDOM - a XML/DOM/XPath/XSLT implementation for Tcl
            4  +                          (Version 0.8.4)
     5      5   
            6  +		    Jochen Loewer (loewerj@hotmail.com)
            7  +                       Rolf Ade (rolf@pointsman.de)
     6      8   
     7         -This directory contains a freely distributable thread-safe extension
     8         -to Tcl/Tk called tDOM.
            9  +                       with some contributions by:
     9     10   
    10         -tDOM was started by Jochen Loewer (loewerj@hotmail.com) and developed
    11         -by Jochen and Rolf Ade (rolf@pointsman.de) with contributions by Zoran
    12         -Vasiljevic (zv@archiware.com). Since more than a decade it is
    13         -maintained and developed by Rolf Ade.
           11  +                 Zoran Vasiljevic (zv@archiware.com)
           12  +                
           13  +
           14  +This directory contains a freely distributable (under the Mozilla Public 
           15  +License) thread-safe extension to Tcl/Tk called tDOM.
    14     16   
    15     17   
    16     18   tDOM contains:
    17     19   
    18         -    *  for convenience expat 2.2.0, the XML parser originated from
    19         -       James Clark, although you're able to link tDOM with other
    20         -       expat versions or the library provided by the system.
           20  +    *  the newest version of Expat, the XML parser from James Clark,
           21  +       including namespace and DTD support.
    21     22   
    22         -    *  building a DOM tree from XML in one go implemented in C for
    23         -       maximum performance and minimum memory usage, and DOM I and II
    24         -       methods to work on such a tree using either a OO-like or a
    25         -       handle syntax.
           23  +    *  a modified version of Steve Ball's Tclexpat, the Tcl interface to 
           24  +       expat, for event-like (SAX-like) XML parsing. The modifications
           25  +       are for performance improvements, to make the newest Expat
           26  +       features (XML namespace) available and for some additional features.
    26     27   
    27         -    *  a Tcl interface to expat for event-like (SAX-like) XML parsing.
           28  +    *  a (partial) DOM I and II implementation in C for maximum
           29  +       performance and minimum memory need following the W3C DOM Core
           30  +       Level 1 recommendation using a OO-like syntax.
    28     31   
    29         -    *  a complete, compliant and fast XPath implementation in C
    30         -       following the November 99 W3C recommendation for navigating and
    31         -       data extraction.
           32  +    *  a very complete, compliant and fast XPath implementation in C
           33  +       following the November 99 W3C recommendation.
    32     34   
    33     35       *  a fast XSLT implementation in C following the W3C Recommendation
    34     36          16 November 1999.
    35     37       
    36         -    *  optional DTD validation.
           38  +    *  a (partial) implementation in C of the XPointer (97) navigational 
           39  +       functions.
    37     40   
    38         -    *  a JSON parser which parses any possible JSON input into a DOM
    39         -       tree without losing information.
           41  +    *  UTF-8 to 8 bit encoding back conversion functionality to support
           42  +       Tcl version < 8.1x
    40     43   
    41         -    *  an efficient and Tcl'ish way to create XML and HTML documents
    42         -       and JSON string.
           44  +    *  optional DTD validation   
    43     45   
    44         -    *  as build option an interface to the gumbo HTML5 parser, which
    45         -       also digests almost any other HTML.
           46  +    *  additional convenience methods
           47  + 
           48  +    *  documentation in TMML, HTML and nroff format
           49  +
    46     50   
    47         -    *  an even faster simple XML parser for trusted XML input.
    48         -
    49         -    *  additional convenience methods.
    50         - 
    51         -    *  and more.
           51  +COMPILING/USING tDOM
    52     52   
    53         -
    54         -DOCUMENTATION
    55         -
    56         -    The documentation is included into the source distribution in HTML
    57         -    and man format. Alternatively, read it online starting at
    58         -    http://tdom.org/index.html/doc/tdom-0-9-0/doc/index.html
    59         -
    60         -
    61         -GETTING THE CODE
    62         -
    63         -    The development repository is hosted at http://tdom.org and is
    64         -    mirrored at http://core.tcl.tk/tdom. You are encouraged to use
    65         -    trunk.
    66         -
    67         -    If you insist on using an older tDOM with lesser features and
    68         -    probably more bugs, you should use the latest release 0.9.0. Get
    69         -    the source code release from
    70         -    http://tdom.org/downloads/tdom-0.9.0-src.tgz or
    71         -    http://tdom.org/downloads/tdom-0.9.0-src.zip
    72         -
    73         -    Windows binaries (32 bit as well as 64 bit) of the 0.9.0 release
    74         -    are also available. Get it from
    75         -    http://tdom.org/downloads/tdom-0.9-windows-x64.zip and 
    76         -    http://tdom.org/downloads/tdom-0.9-windows-x86.zip
    77         -    
    78         -    The provided windows binaries include (statically linked) the
    79         -    HTML5 parser.
    80         -
    81         -
    82         -COMPILING tDOM
    83         -
    84         -    Depending on your platform (unix/mac or win), go to the
    85         -    corresponding directory and invoke the configure script:
           53  +    Depending on your platform, (unix or win) go to the corresponding
           54  +    directory and invoke the configure script:
    86     55   
    87     56           ../configure
    88     57           make 
    89     58           make test
    90     59           make install
    91     60   
    92     61       Alternatively, you can build the tDOM package in just about any
    93     62       directory elsewhere on the fileystem (since TEA-compatible).
           63  +
           64  +    Don't build against Tcl 8.6.2 (or Tcl 8.5.16). This tcl releases
           65  +    had bugs in the I/O system, that may bite you while using tDOM.
    94     66       
    95         -    You might also want to do "../configure --help" to get a list of
    96         -    all supported options of the configure script. In the "unix"
    97         -    directory there is a "CONFIG" file containing some examples on how
    98         -    to invoke the "configure" script for some common cases. You can
    99         -    peek there. This file also includes a short description of the
   100         -    tDOM specific configure options.
           67  +    You might also want to do "../configure --help" to get list of all
           68  +    supported options of the configure script. In the "unix" directory
           69  +    there is a "CONFIG" file containing some examples on how to invoke
           70  +    the "configure" script for some common cases. You can peek
           71  +    there. This file also includes a short description of the tDOM
           72  +    specific configure options.
   101     73   
   102     74       Since tDOM is TEA-compatible you should be able to build it using
   103     75       the MinGW build environment for Windows. There is also the MSVC
   104     76       nmake file so you can compile the package with Microsoft tools.
   105         -    Refer to the README in the win directory for more details about
   106         -    building on Windows.
   107     77   
   108     78       The compile process will build the tDOM shared library suitable for
   109     79       loading into the Tcl shell using standard "package require" mechanism.
   110     80   
   111         -
   112         -REPORTING BUGS
           81  +Have fun! 
   113     82   
   114         -    Please head to http://tdom.org/index.html/ticket and click on "New
   115         -    Ticket". Log in as anonymous and report your findings. If you
   116         -    prefer to have an individual login write Rolf a mail.
           83  +- EOF -

Changes to README.AOL.

     1      1   
     2      2   
     3      3                 tDOM - a XML/DOM/XPath/XSLT implementation for Tcl
     4         -                          (Version 0.9.0)
            4  +                          (Version 0.8.3)
     5      5   
     6      6   		    Jochen Loewer (loewerj@hotmail.com)
     7      7                          Rolf Ade (rolf@pointsman.de)
     8      8   
     9      9                          with some contributions by:
    10     10   
    11     11                    Zoran Vasiljevic (zv@archiware.com)

Changes to configure.

     1      1   #! /bin/sh
     2      2   # Guess values for system-dependent variables and create Makefiles.
     3         -# Generated by GNU Autoconf 2.69 for tdom 0.9.0.
            3  +# Generated by GNU Autoconf 2.69 for tdom 0.8.4.
     4      4   #
     5      5   #
     6      6   # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
     7      7   #
     8      8   #
     9      9   # This configure script is free software; the Free Software Foundation
    10     10   # gives unlimited permission to copy, distribute and modify it.
................................................................................
   573    573   subdirs=
   574    574   MFLAGS=
   575    575   MAKEFLAGS=
   576    576   
   577    577   # Identity of this package.
   578    578   PACKAGE_NAME='tdom'
   579    579   PACKAGE_TARNAME='tdom'
   580         -PACKAGE_VERSION='0.9.0'
   581         -PACKAGE_STRING='tdom 0.9.0'
          580  +PACKAGE_VERSION='0.8.4'
          581  +PACKAGE_STRING='tdom 0.8.4'
   582    582   PACKAGE_BUGREPORT=''
   583    583   PACKAGE_URL=''
   584    584   
   585    585   # Factoring default headers for most tests.
   586    586   ac_includes_default="\
   587    587   #include <stdio.h>
   588    588   #ifdef HAVE_SYS_TYPES_H
................................................................................
  1305   1305   #
  1306   1306   # Report the --help message.
  1307   1307   #
  1308   1308   if test "$ac_init_help" = "long"; then
  1309   1309     # Omit some internal or obsolete options to make the list less imposing.
  1310   1310     # This message is too long to be a string in the A/UX 3.1 sh.
  1311   1311     cat <<_ACEOF
  1312         -\`configure' configures tdom 0.9.0 to adapt to many kinds of systems.
         1312  +\`configure' configures tdom 0.8.4 to adapt to many kinds of systems.
  1313   1313   
  1314   1314   Usage: $0 [OPTION]... [VAR=VALUE]...
  1315   1315   
  1316   1316   To assign environment variables (e.g., CC, CFLAGS...), specify them as
  1317   1317   VAR=VALUE.  See below for descriptions of some of the useful variables.
  1318   1318   
  1319   1319   Defaults for the options are specified in brackets.
................................................................................
  1366   1366   
  1367   1367     cat <<\_ACEOF
  1368   1368   _ACEOF
  1369   1369   fi
  1370   1370   
  1371   1371   if test -n "$ac_init_help"; then
  1372   1372     case $ac_init_help in
  1373         -     short | recursive ) echo "Configuration of tdom 0.9.0:";;
         1373  +     short | recursive ) echo "Configuration of tdom 0.8.4:";;
  1374   1374      esac
  1375   1375     cat <<\_ACEOF
  1376   1376   
  1377   1377   Optional Features:
  1378   1378     --disable-option-checking  ignore unrecognized --enable/--with options
  1379   1379     --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  1380   1380     --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
................................................................................
  1477   1477       cd "$ac_pwd" || { ac_status=$?; break; }
  1478   1478     done
  1479   1479   fi
  1480   1480   
  1481   1481   test -n "$ac_init_help" && exit $ac_status
  1482   1482   if $ac_init_version; then
  1483   1483     cat <<\_ACEOF
  1484         -tdom configure 0.9.0
         1484  +tdom configure 0.8.4
  1485   1485   generated by GNU Autoconf 2.69
  1486   1486   
  1487   1487   Copyright (C) 2012 Free Software Foundation, Inc.
  1488   1488   This configure script is free software; the Free Software Foundation
  1489   1489   gives unlimited permission to copy, distribute and modify it.
  1490   1490   _ACEOF
  1491   1491     exit
................................................................................
  1842   1842     eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  1843   1843   
  1844   1844   } # ac_fn_c_check_header_mongrel
  1845   1845   cat >config.log <<_ACEOF
  1846   1846   This file contains any messages produced by compilers while
  1847   1847   running configure, to aid debugging if configure makes a mistake.
  1848   1848   
  1849         -It was created by tdom $as_me 0.9.0, which was
         1849  +It was created by tdom $as_me 0.8.4, which was
  1850   1850   generated by GNU Autoconf 2.69.  Invocation command line was
  1851   1851   
  1852   1852     $ $0 $@
  1853   1853   
  1854   1854   _ACEOF
  1855   1855   exec 5>>config.log
  1856   1856   {
................................................................................
  2208   2208   
  2209   2209       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct TEA configuration" >&5
  2210   2210   $as_echo_n "checking for correct TEA configuration... " >&6; }
  2211   2211       if test x"${PACKAGE_NAME}" = x ; then
  2212   2212   	as_fn_error $? "
  2213   2213   The PACKAGE_NAME variable must be defined by your TEA configure.ac" "$LINENO" 5
  2214   2214       fi
  2215         -    if test x"3.10" = x ; then
         2215  +    if test x"3.9" = x ; then
  2216   2216   	as_fn_error $? "
  2217   2217   TEA version not specified." "$LINENO" 5
  2218         -    elif test "3.10" != "${TEA_VERSION}" ; then
  2219         -	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: warning: requested TEA version \"3.10\", have \"${TEA_VERSION}\"" >&5
  2220         -$as_echo "warning: requested TEA version \"3.10\", have \"${TEA_VERSION}\"" >&6; }
         2218  +    elif test "3.9" != "${TEA_VERSION}" ; then
         2219  +	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&5
         2220  +$as_echo "warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&6; }
  2221   2221       else
  2222   2222   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (TEA ${TEA_VERSION})" >&5
  2223   2223   $as_echo "ok (TEA ${TEA_VERSION})" >&6; }
  2224   2224       fi
  2225   2225   
  2226   2226       # If the user did not set CFLAGS, set it now to keep macros
  2227   2227       # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
................................................................................
  5547   5547       if test "$tcl_ok" = "yes" ; then
  5548   5548           HAVEGUMBO=`pkg-config --exists gumbo && echo "1"`
  5549   5549           if test "$HAVEGUMBO" = "1" ; then
  5550   5550               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  5551   5551   $as_echo "yes" >&6; }
  5552   5552               $as_echo "#define TDOM_HAVE_GUMBO 1" >>confdefs.h
  5553   5553   
  5554         -            if test "${TEA_PLATFORM}" = "windows" ; then
  5555         -                HTML5_LIBS="-Wl,-Bstatic `pkg-config --static --cflags --libs gumbo` -Wl,-Bdynamic"
  5556         -            else
  5557         -                HTML5_LIBS="`pkg-config --cflags --libs gumbo`"
  5558         -            fi
         5554  +            HTML5_LIBS="`pkg-config --cflags --libs gumbo`"
  5559   5555           else
  5560   5556               as_fn_error $? "The required lib gumbo not found" "$LINENO" 5
  5561   5557           fi
  5562   5558       else
  5563   5559           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  5564   5560   $as_echo "no" >&6; }
  5565   5561       fi
................................................................................
  5701   5697   # and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var.
  5702   5698   #
  5703   5699   # A few miscellaneous platform-specific items:
  5704   5700   # TEA_ADD_* any platform specific compiler/build info here.
  5705   5701   #--------------------------------------------------------------------
  5706   5702   
  5707   5703   if test "${TEA_PLATFORM}" = "windows" ; then
         5704  +    $as_echo "#define BUILD_tdom 1" >>confdefs.h
         5705  +
  5708   5706       CLEANFILES="pkgIndex.tcl *.lib *.dll *.exp *.ilk *.pdb vc*.pch"
  5709   5707       #TEA_ADD_SOURCES([win/winFile.c])
  5710   5708       #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"])
  5711   5709   else
  5712   5710       CLEANFILES="pkgIndex.tcl tdomConfig.sh tdom.tcl tcldomsh"
  5713   5711       #TEA_ADD_SOURCES([unix/unixFile.c])
  5714   5712       #TEA_ADD_LIBS([-lsuperfly])
................................................................................
  9696   9694   test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
  9697   9695   
  9698   9696   cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  9699   9697   # Save the log message, to keep $0 and so on meaningful, and to
  9700   9698   # report actual input values of CONFIG_FILES etc. instead of their
  9701   9699   # values after options handling.
  9702   9700   ac_log="
  9703         -This file was extended by tdom $as_me 0.9.0, which was
         9701  +This file was extended by tdom $as_me 0.8.4, which was
  9704   9702   generated by GNU Autoconf 2.69.  Invocation command line was
  9705   9703   
  9706   9704     CONFIG_FILES    = $CONFIG_FILES
  9707   9705     CONFIG_HEADERS  = $CONFIG_HEADERS
  9708   9706     CONFIG_LINKS    = $CONFIG_LINKS
  9709   9707     CONFIG_COMMANDS = $CONFIG_COMMANDS
  9710   9708     $ $0 $@
................................................................................
  9749   9747   
  9750   9748   Report bugs to the package provider."
  9751   9749   
  9752   9750   _ACEOF
  9753   9751   cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  9754   9752   ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
  9755   9753   ac_cs_version="\\
  9756         -tdom config.status 0.9.0
         9754  +tdom config.status 0.8.4
  9757   9755   configured by $0, generated by GNU Autoconf 2.69,
  9758   9756     with options \\"\$ac_cs_config\\"
  9759   9757   
  9760   9758   Copyright (C) 2012 Free Software Foundation, Inc.
  9761   9759   This config.status script is free software; the Free Software Foundation
  9762   9760   gives unlimited permission to copy, distribute and modify it."
  9763   9761   

Changes to configure.in.

    15     15   # This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION
    16     16   # set as provided.  These will also be added as -D defs in your Makefile
    17     17   # so you can encode the package version directly into the source files.
    18     18   # This will also define a special symbol for Windows (BUILD_sample in
    19     19   # this case) so that we create the export library with the dll.
    20     20   #-----------------------------------------------------------------------
    21     21   
    22         -AC_INIT([tdom], [0.9.0])
           22  +AC_INIT([tdom], [0.8.4])
    23     23   
    24     24   #--------------------------------------------------------------------
    25     25   # Call TEA_INIT as the first TEA_ macro to set up initial vars.
    26     26   # This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
    27     27   # as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
    28     28   #--------------------------------------------------------------------
    29     29   
    30         -TEA_INIT([3.10])
           30  +TEA_INIT([3.9])
    31     31   
    32     32   AC_CONFIG_AUX_DIR(tclconfig)
    33     33   
    34     34   #--------------------------------------------------------------------
    35     35   # Load the tclConfig.sh file
    36     36   #--------------------------------------------------------------------
    37     37   
................................................................................
   125    125   # and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var.
   126    126   #
   127    127   # A few miscellaneous platform-specific items:
   128    128   # TEA_ADD_* any platform specific compiler/build info here.
   129    129   #--------------------------------------------------------------------
   130    130   
   131    131   if test "${TEA_PLATFORM}" = "windows" ; then
          132  +    AC_DEFINE(BUILD_tdom)
   132    133       CLEANFILES="pkgIndex.tcl *.lib *.dll *.exp *.ilk *.pdb vc*.pch"
   133    134       #TEA_ADD_SOURCES([win/winFile.c])
   134    135       #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"])
   135    136   else
   136    137       CLEANFILES="pkgIndex.tcl tdomConfig.sh tdom.tcl tcldomsh"
   137    138       #TEA_ADD_SOURCES([unix/unixFile.c])
   138    139       #TEA_ADD_LIBS([-lsuperfly])

Changes to doc/category-index.html.

     1      1   <html>
     2      2   <head>
     3         -<title>tDOM manual: Index</title><link rel="stylesheet" href="manpage.css"><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: category-index.xsl,v $ $Revision: 1.5 $"><meta charset="utf-8">
            3  +<title>tDOM manual: Index</title><link rel="stylesheet" href="manpage.css"><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: category-index.xsl,v $ $Revision: 1.5 $">
     4      4   </head><body>
     5      5   <div class="header">
     6      6   <h1 class="title" align="center">tDOM manual: Index</h1><p class="navaid" align="center">
     7         -<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
            7  +<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a>
     8      8   </p><hr class="navsep"><div class="navbar">
     9         -<a href="#cat_cmd">Tcl commands</a> · <a href="#cat_fun">C functions</a> · </div>
            9  +<a href="#cat_cmd">Tcl commands</a> · <a href="#cat_fun">C functions</a> · </div>
    10     10   </div><div class="body">
    11         -<h2><a name="cat_cmd">Tcl commands</a></h2><a href="dom.html">dom</a> · <a href="domDoc.html">domDoc</a> · <a href="domNode.html">domNode</a> · <a href="expat.html">expat</a> · <a href="tdomcmd.html">tdom</a> · <a href="tnc.html">tnc</a> · <a href="expat.html">xml::parser</a><h2><a name="cat_fun">C functions</a></h2><a href="expatapi.html">CheckExpatParserObj, CHandlerSetInstall, CHandlerSetRemove,
           11  +<h2><a name="cat_cmd">Tcl commands</a></h2><a href="dom.html">dom</a> · <a href="domDoc.html">domDoc</a> · <a href="domNode.html">domNode</a> · <a href="expat.html">expat</a> · <a href="tdomcmd.html">tdom</a> · <a href="tnc.html">tnc</a> · <a href="expat.html">xml::parser</a><h2><a name="cat_fun">C functions</a></h2><a href="expatapi.html">CheckExpatParserObj, CHandlerSetInstall, CHandlerSetRemove,
    12     12            CHandlerSetCreate, CHandlerSetGetUserData, GetExpatInfo</a>
    13     13   </div><div class="footer">
    14     14   <hr class="navsep"><div class="navbar" align="center">
    15         -<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
           15  +<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a>
    16     16   </div>
    17     17   </div>
    18     18   </body>
    19     19   </html>

Changes to doc/dom.html.

     1      1   <html>
     2      2   <head>
     3         -<link rel="stylesheet" href="manpage.css"><title>tDOM manual: dom</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
            3  +<link rel="stylesheet" href="manpage.css"><title>tDOM manual: dom</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $">
     4      4   </head><body>
     5      5   <div class="header">
     6      6   <div class="navbar" align="center">
     7         -<a href="#SECTid0x1f2bd90">NAME</a> · <a href="#SECTid0x1e4db70">SYNOPSIS</a> · <a href="#SECTid0x1f36320">DESCRIPTION </a> · <a href="#SECTid0x1f86b10">KEYWORDS</a>
            7  +<a href="#SECTid0xb56980">NAME</a> · <a href="#SECTid0xa76ae0">SYNOPSIS</a> · <a href="#SECTid0xb62b50">DESCRIPTION </a> · <a href="#SECTid0xb84020">KEYWORDS</a>
     8      8   </div><hr class="navsep">
     9      9   </div><div class="body">
    10         -  <h2><a name="SECTid0x1f2bd90">NAME</a></h2><p class="namesection">
           10  +  <h2><a name="SECTid0xb56980">NAME</a></h2><p class="namesection">
    11     11   <b class="names">dom - </b><br>Create an in-memory DOM tree from XML</p>
    12     12     
    13         -  <h2><a name="SECTid0x1e4db70">SYNOPSIS</a></h2><pre class="syntax">package require tdom
           13  +  <h2><a name="SECTid0xa76ae0">SYNOPSIS</a></h2><pre class="syntax">package require tdom
    14     14   
    15     15   <b class="cmd">dom</b> <i class="m">method</i> ?<i class="m">arg arg ...</i>?</pre>
    16     16   
    17         -  <h2><a name="SECTid0x1f36320">DESCRIPTION </a></h2><p>This command provides the creation of DOM trees in memory. In
           17  +  <h2><a name="SECTid0xb62b50">DESCRIPTION </a></h2><p>This command provides the creation of DOM trees in memory. In
    18     18   the usual case a string containing a XML information is parsed and converted
    19     19   into a DOM tree. Other possible parse input may be HTML or JSON.
    20     20   The <i class="m">method</i> indicates a specific subcommand. </p><p>The valid methods are:</p><dl class="commandlist">
    21     21           
    22     22             <dt>
    23     23   <b class="cmd">dom</b> <b class="method">parse</b> ?<i class="m">options</i>? ?<i class="m">data</i>?</dt>
    24     24             <dd>Parses the XML information and builds up the DOM tree in memory
................................................................................
    55     55                 
    56     56                   <dt><b>-simple</b></dt> 
    57     57                   <dd>If <i class="m">-simple</i> is
    58     58   specified, a simple but fast parser is used (conforms not fully to XML
    59     59   recommendation). That should double parsing and DOM generation speed. The
    60     60   encoding of the data is not transformed inside the parser. The simple parser
    61     61   does not respect any encoding information in the XML declaration. It skips over
    62         -the internal DTD subset and ignores any information in it. Therefore it doesn't
           62  +the internal DTD subset and ignores any information in it. Therefor it doesn't
    63     63   include defaulted attribute values into the tree, even if the according
    64     64   attribute declaration is in the internal subset. It also doesn't expand
    65     65   internal or external entity references other than the predefined entities and
    66     66   character references.</dd>
    67     67                 
    68     68   
    69     69                 
................................................................................
    70     70                   <dt><b>-html</b></dt>
    71     71                   <dd>If <i class="m">-html</i> is specified, a fast HTML parser is 
    72     72   used, which tries to even parse badly formed HTML into a DOM tree.</dd>
    73     73                 
    74     74   
    75     75                 
    76     76                   <dt><b>-html5</b></dt>
    77         -                <dd>This option is only available if tDOM was build
           77  +                <dd>This option is only available, if tDOM was build
    78     78                   with --enable-html5. Try the <i class="m">featureinfo</i> method
    79         -                if you need to know if this feature is build in. If
           79  +                if you need to know, if this feature is build in. If
    80     80                   <i class="m">-html5</i> is specified, the gumbo lib html5 parser
    81         -                (https://github.com/google/gumbo-parser) is used to
           81  +                (https://github.com/google/gumbo-parser) is used, to
    82     82                   build the DOM tree. This is, as far as it goes, XML
    83         -                namespace-aware. Since this probably isn't wanted by a
           83  +                namespace aware. Since this probably isn't wanted by a
    84     84                   lot of users and adds only burden for no good in a lot
    85     85                   of use cases <i class="m">-html5</i> can be combined with
    86     86                   <i class="m">-ignorexmlns</i>, in which case all nodes and
    87     87                   attributes in the DOM tree are not in an XML
    88     88                   namespace. All tag and attribute names in the DOM tree
    89     89                   will be lower case, even for foreign elements not in
    90     90                   the xhtml, svg or mathml namespace. The DOM tree may
    91         -                include nodes, that the parser inserted because they
           91  +                include nodes, that the parser inserted, because they
    92     92                   are implied by the context (as &lt;head&gt;,
    93     93                   &lt;tbody&gt;, etc.).</dd>
    94     94                 
    95     95   
    96     96                 
    97     97                   <dt><b>-json</b></dt>
    98     98                   <dd>If <i class="m">-json</i> is specified, the <i class="m">data</i> is
................................................................................
   118    118                   command or handle is an ordinary DOM doc, which may be
   119    119                   investigated or modified with the full range of the
   120    120                   doc and node methods. Please note that the element
   121    121                   node names and the text node values within the tree
   122    122                   may be outside of what the appropriate XML productions
   123    123                   allow.</dd>
   124    124                 
   125         -
   126    125                 
   127         -                <dt>
   128         -<b>-jsonmaxnesting</b> <i>integer</i>
   129         -</dt>
   130         -                
   131         -                <dd>This options only has effect if used together
   132         -                with the <i class="m">-json</i> option. The current implementation uses recursive descent JSON parser. In order to avoid using excess stack space, any JSON input that has more than a certain levels of nesting is considered invalid. The default maximum nesting is 2000. The option -jsonmaxnesting allows the user to adjust that.</dd>
   133         -              
   134         -              
   135         -              
   136         -                <dt><b>--</b></dt> 
   137         -                <dd>The option <i class="m">--</i> marks the end of options.
   138         -                While respected in general this option is only needed
   139         -                in case of parsing JSON data, which may start with a
   140         -                "-".</dd>
   141         -              
   142         -
   143    126                 
   144    127                   <dt><b>-keepEmpties</b></dt> 
   145    128                   <dd>If <i class="m">-keepEmpties</i> is
   146         -specified then text nodes which contain only whitespaces will be part of the
          129  +specified, text nodes, which contain only whitespaces, will be part of the
   147    130   resulting DOM tree. In default case (<i class="m">-keepEmpties</i> not given) those empty
   148    131   text nodes are removed at parsing time.</dd>
   149    132                 
   150    133   
   151    134                 
   152    135                   <dt>
   153    136   <b>-channel</b> <i>&lt;channel-ID&gt;</i>
   154    137   </dt>
   155    138                   
   156    139                   <dd>If <i class="m">-channel &lt;channel-ID&gt;</i> is specified, the
   157    140   input to be parsed is read from the specified channel. The encoding setting of
   158    141   the channel (via fconfigure -encoding) is respected, ie the data read from the
   159         -channel are converted to UTF-8 according to the encoding settings before the
          142  +channel are converted to UTF-8 according to the encoding settings, befor the
   160    143   data is parsed.</dd>
   161    144                 
   162    145   
   163    146                 
   164    147                   <dt>
   165    148   <b>-baseurl</b> <i>&lt;baseURI&gt;</i>
   166    149   </dt>
   167    150                   
   168         -                <dd>If <i class="m">-baseurl &lt;baseURI&gt;</i> is specified,
   169         -                the baseURI is used as the base URI of the document.
   170         -                External entities references in the document are
   171         -                resolved relative to this base URI. This base URI is
   172         -                also stored within the DOM tree.</dd>
          151  +                <dd>If <i class="m">-baseurl &lt;baseURI&gt;</i> is specified, the
          152  +baseURI is used as the base URI of the document. External entities referenced
          153  +in the document are resolved relative to this base URI. This base URI is also
          154  +stored within the DOM tree.</dd>
   173    155                 
   174    156   
   175    157                 
   176    158                   <dt>
   177    159   <b>-feedbackAfter</b> <i>&lt;#bytes&gt;</i>
   178    160   </dt>
   179    161                   
   180         -                <dd>If <i class="m">-feedbackAfter &lt;#bytes&gt;</i> is
   181         -                specified, the tcl command given by
   182         -                <i class="m">-feedbackcmd</i> is evaluated at the first element
   183         -                start within the document (or an external entity)
   184         -                after the start of the document or external entity or
   185         -                the last such call after #bytes. For backward
   186         -                compatibility if no -feedbackcmd is given but there is
   187         -                a tcl proc named ::dom::domParseFeedback this proc is
   188         -                used as -feedbackcmd. If there isn't such a proc and
   189         -                -feedbackAfter is used it is an error to not also use
   190         -                -feedbackcmd. If the called script raises error, then
   191         -                parsing will be aborted, the <i class="m">dom parse</i> call
   192         -                returns error, with the script error msg as error msg.
   193         -                If the called script <i class="m">return -code break</i>, the
   194         -                parsing will abort and the <i class="m">dom parse</i> call will
   195         -                return the empty string.</dd>
          162  +                <dd>If <i class="m">-feedbackAfter &lt;#bytes&gt;</i> is specified, the
          163  +tcl command given by <i class="m">-feedbackcmd</i> is evaluated at the first
          164  +element start within the document (or an external entity) after the
          165  +start of the document or external entity or the last such call after
          166  +#bytes.For backward compatibility, if no -feedbackcmd is given, but
          167  +there is a tcl proc named ::dom::domParseFeedback then this proc is
          168  +used as -feedbackcmd. If there isn't such a proc and -feedbackAfter is
          169  +used, it is an error to not also use -feedbackcmd. If the called
          170  +script raises error, then parsing will be aborted, the
          171  +<i class="m">dom parse</i> call returns error, with the script
          172  +error msg as error msg. If the called script <i class="m">return
          173  +-code break</i>, the parsing will abort and the <i class="m">dom
          174  +parse</i> call will return the empty string.</dd>
   196    175                 
   197    176   
   198    177                 
   199    178                   <dt>
   200    179   <b>-feedbackcmd</b> <i>&lt;script&gt;</i>
   201    180   </dt>
   202    181                   
................................................................................
   221    200                   
   222    201                   <dd>If <i class="m">-externalentitycommand &lt;script&gt;</i> is
   223    202   specified, the specified tcl script is called to resolve any external entities
   224    203   of the document. The actual evaluated command consists of this option followed
   225    204   by three arguments: the base uri, the system identifier of the entity and the
   226    205   public identifier of the entity. The base uri and the public identifier may be
   227    206   the empty list. The script has to return a tcl list consisting of three
   228         -elements. The first element of this list signals how the external entity is
   229         -returned to the processor. Currently the two allowed types are "string"
          207  +elements. The first element of this list signals, how the external entity is
          208  +returned to the processor. At the moment, the two allowed types are "string"
   230    209   and "channel". The second element of the list has to be the (absolute) base URI
   231    210   of the external entity to be parsed.  The third element of the list are data,
   232    211   either the already read data out of the external entity as string in the case
   233    212   of type "string", or the name of a tcl channel, in the case of type
   234    213   "channel". Note that if the script returns a tcl channel, it will not be closed
   235    214   by the processor.  It must be closed separately if it is no longer
   236         -needed.</dd>
          215  +required.</dd>
   237    216                 
   238    217   
   239    218                 
   240    219                   <dt>
   241    220   <b>-useForeignDTD</b> <i>&lt;boolean&gt;</i>
   242    221   </dt>
   243    222                   
   244    223                   <dd>If &lt;boolean&gt; is true and the document does not have
   245    224   an external subset, the parser will call the -externalentitycommand script with
   246         -empty values for the systemId and publicID arguments. Please note that if
          225  +empty values for the systemId and publicID arguments. Pleace notice, that, if
   247    226   the document also doesn't have an internal subset, the
   248    227   -startdoctypedeclcommand and -enddoctypedeclcommand scripts, if set, are not
   249    228   called. The <i class="m">-useForeignDTD</i> respects </dd>
   250    229                 
   251    230   
   252    231                 
   253    232                   <dt>
   254    233   <b>-paramentityparsing</b> <i>&lt;always|never|notstandalone&gt;</i>
   255    234   </dt>
   256    235                   
   257         -                <dd>The <i class="m">-paramentityparsing</i> option controls,
   258         -                if the parser tries to resolve the external entities
   259         -                (including the external DTD subset) of the document
   260         -                while building the DOM tree.
   261         -                <i class="m">-paramentityparsing</i> requires an argument, which
   262         -                must be either "always", "never", or "notstandalone".
   263         -                The value "always" means that the parser tries to
   264         -                resolves (recursively) all external entities of the
   265         -                XML source. This is the default in case
   266         -                <i class="m">-paramentityparsing</i> is omitted. The value
   267         -                "never" means that only the given XML source is
   268         -                parsed and no external entity (including the external
   269         -                subset) will be resolved and parsed. The value
   270         -                "notstandalone" means, that all external entities will
   271         -                be resolved and parsed, with the execption of
   272         -                documents, which explicitly states standalone="yes" in
   273         -                their XML declaration.</dd>
          236  +                <dd>The <i class="m">-paramentityparsing</i> option controls, if the
          237  +parser tries to resolve the external entities (including the external DTD
          238  +subset) of the document, while building the DOM
          239  +tree. <i class="m">-paramentityparsing</i> requires an argument, which must be either
          240  +"always", "never", or "notstandalone". The value "always" means, that the
          241  +parser tries to resolves (recursively) all external entities of the XML
          242  +source. This is the default, in case <i class="m">-paramentityparsing</i> is omitted. The
          243  +value "never" means, that only the given XML source is parsed and no external
          244  +entity (including the external subset) will be resolved and parsed. The value
          245  +"notstandalone" means, that all external entities will be resolved and parsed,
          246  +with the execption of documents, which explicitly states standalone="yes" in
          247  +their XML declaration.</dd>
   274    248                 
   275    249   
   276    250   
   277    251                 
   278    252                   <dt><b>-ignorexmlns</b></dt>
   279    253                   <dd>It is recommended, that you only use this option
   280         -                with the <i class="m">-html5</i> option. If this option is
   281         -                given, no node within the created DOM tree will be
   282         -                internally marked as placed into an XML Namespace,
   283         -                even if there is a default namespace in scope for
   284         -                un-prefixed elements or even if the element has a
   285         -                defined namespace prefix. One consequence is that
   286         -                XPath node expressions on such a DOM tree doesn't work
   287         -                as expected. Prefixed element nodes can't be selected
   288         -                and element nodes without prefix will be seen by XPath
   289         -                expressions as if they are not in any namespace (no
   290         -                matter if they are in fact should be in a default
          254  +                together with the <i class="m">-html5</i> option, if ever. If
          255  +                this option is given, no node within the created DOM
          256  +                tree will be internally marked as placed into an XML
          257  +                Namespace, even if there is a default namespace in
          258  +                scope for un-prefixed elements or even if the element
          259  +                has a defined namespace prefix. One consequence is of
          260  +                this is, that XPath node expressions on such a DOM
          261  +                tree doesn't work as expected. Prefixed element nodes
          262  +                can't be selected and element nodes without prefix
          263  +                will be seen by XPath expressions as if they haven't
          264  +                any namespace (no matter if they in fact in a default
   291    265                   namespace).
   292    266                   </dd>
   293    267                 
   294    268   
   295    269               </dl>
   296    270   <p></p>
   297    271   </dd>
................................................................................
   316    290   memory handling as explained above.</dd>
   317    291           
   318    292   
   319    293           
   320    294             <dt>
   321    295   <b class="cmd">dom</b> <b class="method">createDocumentNode</b>
   322    296   ?<i class="m">objVar</i>?</dt>
   323         -          <dd>Creates a new 'empty' DOM document object without any element
          297  +          <dd>Creates a new, 'empty' DOM document object without any element
   324    298   node. <i class="m">objVar</i> controls the memory handling as explained above.</dd>
   325    299           
   326    300   
   327    301           
   328    302             <dt>
   329    303   <b class="cmd">dom</b> <b class="method">setResultEncoding</b> ?<i class="m">encodingName</i>?</dt>
   330         -          <dd>This option is for backward compatibility with Tcl
   331         -          8.0. If tDOM is build with any newer Tcl version this option
   332         -          does not has any effect. If <i class="m">encodingName</i> is not given
   333         -          the current global result encoding is returned. Otherwise
   334         -          the global result encoding is set to <i class="m">encodingName</i>.
   335         -          All character data, attribute values etc. will then be
   336         -          converted from UTF-8, which is delivered from the Expat XML
   337         -          parser, to the given 8 bit encoding at XML/DOM parse time.
   338         -          Valid values for <i class="m">encodingName</i> are: utf-8, ascii,
   339         -          cp1250, cp1251, cp1252, cp1253, cp1254, cp1255, cp1256,
   340         -          cp437, cp850, en, iso8859-1, iso8859-2, iso8859-3,
   341         -          iso8859-4, iso8859-5, iso8859-6, iso8859-7, iso8859-8,
   342         -          iso8859-9, koi8-r.</dd>
          304  +          <dd>If <i class="m">encodingName</i> is not given the current global
          305  +result encoding is returned.  Otherwise the global result encoding is set to
          306  +<i class="m">encodingName</i>.  All character data, attribute values, etc. will
          307  +then be converted from UTF-8, which is delivered from the Expat XML parser, to
          308  +the given 8 bit encoding at XML/DOM parse time.  Valid values for
          309  +<i class="m">encodingName</i> are: utf-8, ascii, cp1250, cp1251, cp1252, cp1253,
          310  +cp1254, cp1255, cp1256, cp437, cp850, en, iso8859-1, iso8859-2, iso8859-3,
          311  +iso8859-4, iso8859-5, iso8859-6, iso8859-7, iso8859-8, iso8859-9, koi8-r.</dd>
   343    312           
   344    313   
   345    314           
   346    315             <dt>
   347    316   <b class="cmd">dom</b> <b class="method">createNodeCmd</b>
   348         -<i class="m">?-returnNodeCmd?</i> <i class="m">?-tagName name?</i> <i class="m">?-jsonType jsonType?</i> <i class="m">?-namespace URI?</i> <i class="m">(element|comment|text|cdata|pi)Node</i> <i class="m">commandName</i>
          317  +<i class="m">?-returnNodeCmd?</i> <i class="m">?-tagName name?</i> <i class="m">?-jsonType jsonType</i> <i class="m">(element|comment|text|cdata|pi)Node</i> <i class="m">commandName</i>
   349    318   </dt>
   350    319             <dd>This method creates Tcl commands, which in turn create
   351    320             tDOM nodes. Tcl commands created by this command are only
   352    321             avaliable inside a script given to the domNode methods
   353    322             <i class="m">appendFromScript</i> or <i class="m">insertBeforeFromScript</i>. If
   354    323             a command created with <i class="m">createNodeCmd</i> is invoked in
   355    324             any other context, it will return error. The created command
................................................................................
   367    336   option <i class="m">-returnNodeCmd</i> was given, the command returns the
   368    337   created node as Tcl command. If this option was omitted, the command
   369    338   returns nothing. Each command creates always the same type of node.
   370    339   Which type of node is created by the command is determined by the
   371    340   first argument to the <i class="m">createNodeCmd</i>. The syntax of the created
   372    341   command depends on the type of the node it creates.</p>
   373    342   
   374         -<p>If the command type to create is <i class="m">elementNode</i>, the created
   375         -command will create an element node, if called. Without the
          343  +<p>If the first argument of the method is <i class="m">elementNode</i>, the
          344  +created command will create an element node. Without the
   376    345   <i class="m">-tagName</i> option the tag name of the created node is
   377    346   <i class="m">commandName</i> without namespace qualifiers. If the
   378    347   <i class="m">-tagName</i> option was given then the created command the created
   379    348   elements will have this tag name. If the <i class="m">-jsonType</i> option was
   380         -given then the created node elements will have the given JSON type. If
   381         -the <i class="m">-namespace</i> option is given the created element node will be
   382         -XML namespaced and in the namespace given by the option. The element
   383         -name will be literal as given either by the command name or the
   384         -<i class="m">-tagname</i> option, if that was given. An appropriate XML
   385         -namespace declaration will be automatically added, to bind the prefix
   386         -(if the element name has one) or the default namespace (if the element
   387         -name hasn't a prefix) to the namespace if such a binding isn't in
   388         -scope.</p>
   389         -
   390         -<p>The syntax of the created command is:</p>
          349  +given then the created node elements will have the given JSON type.
          350  +The syntax of the created command is:</p>
   391    351   
   392    352   <pre class="syntax">
   393    353   <b class="cmd">elementNodeCmd</b> <i class="m">?attributeName attributeValue ...? ?script?</i>
   394    354   <b class="cmd">elementNodeCmd</b> <i class="m">?-attributeName attributeValue ...? ?script?</i>
   395    355   <b class="cmd">elementNodeCmd</b> <i class="m">name_value_list script</i>
   396    356   </pre>
   397    357   
................................................................................
   442    402           
   443    403   
   444    404           
   445    405             <dt>
   446    406   <b class="cmd">dom</b> <b class="method">setStoreLineColumn</b> <i class="m">?boolean</i>?</dt>
   447    407             <dd>If switched on, the DOM nodes will contain line and column
   448    408   position information for the original XML document after parsing. The default
   449         -is not to store line and column position information.</dd>
          409  +is, not to store line and column position information.</dd>
   450    410           
   451    411   
   452    412           
   453    413             <dt>
   454    414   <b class="cmd">dom</b> <b class="method">setNameCheck</b> <i class="m">?boolean</i>?</dt>
   455    415             <dd>If NameCheck is true, every method which expects an XML Name,
   456    416   a full qualified name or a processing instructing target will check, if the
   457         -given string is valid according to its production rule. For commands created
          417  +given string is valid according to his production rule. For commands created
   458    418   with the <i class="m">createNodeCmd</i> method to be used in the context of
   459    419   <i class="m">appendFromScript</i> the status of the flag at creation time
   460    420   decides. If NameCheck is true at creation time, the command will
   461         -check its arguments, otherwise not. The <i class="m">setNameCheck</i>
          421  +check his arguments, otherwise not. The <i class="m">setNameCheck</i>
   462    422   set this flag. It returns the current NameCheck flag state. The
   463    423   default state for NameCheck is true. </dd>
   464    424           
   465    425   
   466    426           
   467    427             <dt>
   468    428   <b class="cmd">dom</b> <b class="method">setTextCheck</b> <i class="m">?boolean</i>?</dt>
   469    429             <dd>If TextCheck is true, every command which expects XML Chars,
   470    430   a comment, a CDATA section value or a processing instructing value will check,
   471         -if the given string is valid according to its production rule. For commands
          431  +if the given string is valid according to his production rule. For commands
   472    432   created with the <i class="m">createNodeCmd</i> method to be used in the
   473    433   context of <i class="m">appendFromScript</i> the status of the flag at
   474    434   creation time decides. If TextCheck is true at creation time, the
   475         -command will check its arguments, otherwise not.The
   476         -<i class="m">setTextCheck</i> method sets this flag. It returns the current
          435  +command will check his arguments, otherwise not.The
          436  +<i class="m">setTextCheck</i> method set this flag. It returns the current
   477    437   TextCheck flag state. The default state for TextCheck is true.</dd>
   478    438         
   479    439   
   480    440           
   481    441             <dt>
   482    442   <b class="cmd">dom</b> <b class="method">setObjectCommands</b> ?<i class="m">(automatic|token|command)</i>?</dt>
   483         -          <dd>Controls if documents and nodes are created as tcl commands or
          443  +          <dd>Controls, if documents and nodes are created as tcl commands or
   484    444   as token to be
   485    445   used with the domNode and domDoc commands. If the mode is
   486    446   'automatic', then methods used at tcl commands will create tcl
   487    447   commands and methods used at doc or node tokes will create tokens. If
   488    448   the mode is 'command' then always tcl commands will be created. If
   489    449   the mode is 'token', then always token will be created. The method
   490    450   returns the current mode. This method is an experimental interface.</dd>
   491    451         
   492    452   
   493    453           
   494    454             <dt>
   495    455   <b class="cmd">dom</b> <b class="method">isName</b> <i class="m">name</i>
   496    456   </dt>
   497         -          <dd>Returns 1 if <i class="m">name</i> is a valid XML Name according to
          457  +          <dd>Returns 1, if <i class="m">name</i> is a valid XML Name according to
   498    458   production 5 of the <a href="http://www.w3.org/TR/2004/REC-xml-20040204/#NT-NameChar">XML
   499         -            1.0</a> recommendation. This means that <i class="m">name</i> is a valid
          459  +            1.0</a> recommendation. This means, that <i class="m">name</i> is a valid
   500    460             XML element or attribute name. Otherwise it returns 0.</dd>
   501    461           
   502    462   
   503    463           
   504    464             <dt>
   505    465   <b class="cmd">dom</b> <b class="method">isPIName</b> <i class="m">name</i>
   506    466   </dt>
   507         -          <dd>Returns 1 if <i class="m">name</i> is a valid XML processing instruction
          467  +          <dd>Returns 1, if <i class="m">name</i> is a valid XML processing instruction
   508    468             target according to
   509    469   production 17 of the <a href="http://www.w3.org/TR/2000/REC-xml-20001006.html">XML 1.0</a> recommendation. Otherwise it returns 0.</dd>
   510    470           
   511    471   
   512    472           
   513    473             <dt>
   514    474   <b class="cmd">dom</b> <b class="method">isNCName</b> <i class="m">name</i>
   515    475   </dt>
   516         -          <dd>Returns 1 if <i class="m">name</i> is a valid NCName according
          476  +          <dd>Returns 1, if <i class="m">name</i> is a valid NCName according
   517    477   to production 4 of the of the <a href="http://www.w3.org/TR/1999/REC-xml-names-19990114">Namespaces in XML</a> recommendation. Otherwise it returns
   518    478   0.</dd>
   519    479           
   520    480   
   521    481           
   522    482             <dt>
   523    483   <b class="cmd">dom</b> <b class="method">isQName</b> <i class="m">name</i>
   524    484   </dt>
   525         -          <dd>Returns 1 if <i class="m">name</i> is a valid QName according
          485  +          <dd>Returns 1, if <i class="m">name</i> is a valid QName according
   526    486   to production 6 of the of the <a href="http://www.w3.org/TR/1999/REC-xml-names-19990114">Namespaces in XML</a> recommendation. Otherwise it returns
   527    487   0.</dd>
   528    488           
   529    489   
   530    490           
   531    491             <dt>
   532    492   <b class="cmd">dom</b> <b class="method">isCharData</b>
   533    493   <i class="m">string</i>
   534    494   </dt>
   535         -          <dd>Returns 1 if every character in <i class="m">string</i> is
          495  +          <dd>Returns 1, if every character in <i class="m">string</i> is
   536    496   a valid XML Char according to production 2 of the <a href="http://www.w3.org/TR/2000/REC-xml-20001006.html">XML 1.0</a>
   537    497   recommendation. Otherwise it returns 0.</dd>
   538    498           
   539    499   
   540    500           
   541    501             <dt>
   542    502   <b class="cmd">dom</b> <b class="method">isBMPCharData</b>
   543    503   <i class="m">string</i>
   544    504   </dt>
   545         -          <dd>Returns 1 if every character in <i class="m">string</i> is
          505  +          <dd>Returns 1, if every character in <i class="m">string</i> is
   546    506   a valid XML Char with a Unicode code point within the Basic
   547    507   Multilingual Plane (that means, that every character within the string
   548    508   is at most 3 bytes long). Otherwise it returns 0.</dd>
   549    509           
   550    510   
   551    511           
   552    512             <dt>
   553    513   <b class="cmd">dom</b> <b class="method">isComment</b>
   554    514   <i class="m">string</i>
   555    515   </dt>
   556         -          <dd>Returns 1 if <i class="m">string</i> is
          516  +          <dd>Returns 1, if <i class="m">string</i> is
   557    517   a valid comment according to production 15 of the <a href="http://www.w3.org/TR/2000/REC-xml-20001006.html">XML 1.0</a>
   558    518   recommendation. Otherwise it returns 0.</dd>
   559    519           
   560    520   
   561    521           
   562    522             <dt>
   563    523   <b class="cmd">dom</b> <b class="method">isCDATA</b>
   564    524   <i class="m">string</i>
   565    525   </dt>
   566         -          <dd>Returns 1 if <i class="m">string</i> is
          526  +          <dd>Returns 1, if <i class="m">string</i> is
   567    527   valid according to production 20 of the <a href="http://www.w3.org/TR/2000/REC-xml-20001006.html">XML 1.0</a>
   568    528   recommendation. Otherwise it returns 0.</dd>
   569    529           
   570    530   
   571    531           
   572    532             <dt>
   573    533   <b class="cmd">dom</b> <b class="method">isPIValue</b>
   574    534   <i class="m">string</i>
   575    535   </dt>
   576         -          <dd>Returns 1 if <i class="m">string</i> is
          536  +          <dd>Returns 1, if <i class="m">string</i> is
   577    537   valid according to production 16 of the <a href="http://www.w3.org/TR/2000/REC-xml-20001006.html">XML 1.0</a>
   578    538   recommendation. Otherwise it returns 0.</dd>
   579    539           
   580    540   
   581    541           
   582    542               <dt>
   583    543   <b class="cmd">dom</b> <b class="method">featureinfo</b> <i class="m">feature</i>
................................................................................
   586    546               build options and the expat version. The valid values for
   587    547               the <i class="m">feature</i> argument are:
   588    548               <dl class="optlist">
   589    549                   
   590    550                       <dt><b>expatversion</b></dt>
   591    551                       <dd>Returns the version of the underlyling expat
   592    552                       version as string, something like
   593         -                    "exapt_2.1.0". This is what the expat API
          553  +                    "exapt_2.1.0". This is. what the expat API
   594    554                       function XML_ExpatVersion() returns.</dd>
   595    555                   
   596    556                   
   597    557                       <dt><b>expatmajorversion</b></dt>
   598    558                       <dd>Returns the major version of the underlyling
   599    559                       expat version as integer.</dd>
   600    560                   
................................................................................
   606    566                   
   607    567                       <dt><b>expatmicroversion</b></dt>
   608    568                       <dd>Returns the micro version of the underlyling
   609    569                       expat version as integer.</dd>
   610    570                   
   611    571                   
   612    572                       <dt><b>dtd</b></dt>
   613         -                    <dd>Returns as boolean if build with
          573  +                    <dd>Returns as boolean, if build with
   614    574                       <i class="m">--enable-dtd</i>.</dd>
   615    575                   
   616    576                   
   617    577                       <dt><b>ns</b></dt>
   618         -                    <dd>Returns as boolean if build with
          578  +                    <dd>Returns as boolean, if build with
   619    579                       <i class="m">--enable-ns</i>.</dd>
   620    580                   
   621    581                   
   622    582                       <dt><b>unknown</b></dt>
   623         -                    <dd>Returns as boolean if build with
          583  +                    <dd>Returns as boolean, if build with
   624    584                       <i class="m">--enable-unknown</i>.</dd>
   625    585                   
   626    586                   
   627    587                       <dt><b>tdomalloc</b></dt>
   628         -                    <dd>Returns as boolean if build with
          588  +                    <dd>Returns as boolean, if build with
   629    589                       <i class="m">--enable-tdomalloc</i>.</dd>
   630    590                   
   631    591                   
   632    592                       <dt><b>lessns</b></dt>
   633         -                    <dd>Returns as boolean if build with
          593  +                    <dd>Returns as boolean, if build with
   634    594                       <i class="m">--enable-lessns</i>.</dd>
   635    595                   
   636    596                   
   637    597                       <dt><b>TCL_UTF_MAX</b></dt>
   638    598                       <dd>Returns the TCL_UTF_MAX value of the tcl
   639    599                       core, tDOM was build with as integer</dd>
   640    600                   
................................................................................
   644    604                       <i class="m">--enable-html5</i>.</dd>
   645    605                   
   646    606               </dl>
   647    607               </dd>   
   648    608           
   649    609       </dl>
   650    610   
   651         -<h2><a name="SECTid0x1f86b10">KEYWORDS</a></h2><p class="keywords">
          611  +<h2><a name="SECTid0xb84020">KEYWORDS</a></h2><p class="keywords">
   652    612   <a class="keyword" href="keyword-index.html#KW-XML">XML</a>, <a class="keyword" href="keyword-index.html#KW-DOM">DOM</a>, <a class="keyword" href="keyword-index.html#KW-document">document</a>, <a class="keyword" href="keyword-index.html#KW-node">node</a>, <a class="keyword" href="keyword-index.html#KW-parsing">parsing</a>
   653    613   </p>
   654    614   </div><hr class="navsep"><div class="navbar" align="center">
   655         -<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
          615  +<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a>
   656    616   </div>
   657    617   </body>
   658    618   </html>

Changes to doc/dom.n.

   226    226   The valid options are:
   227    227   .IP "\fB-simple\fR"
   228    228   If \fI-simple\fR is
   229    229   specified, a simple but fast parser is used (conforms not fully to XML
   230    230   recommendation). That should double parsing and DOM generation speed. The
   231    231   encoding of the data is not transformed inside the parser. The simple parser
   232    232   does not respect any encoding information in the XML declaration. It skips over
   233         -the internal DTD subset and ignores any information in it. Therefore it doesn't
          233  +the internal DTD subset and ignores any information in it. Therefor it doesn't
   234    234   include defaulted attribute values into the tree, even if the according
   235    235   attribute declaration is in the internal subset. It also doesn't expand
   236    236   internal or external entity references other than the predefined entities and
   237    237   character references.
   238    238   .IP "\fB-html\fR"
   239    239   If \fI-html\fR is specified, a fast HTML parser is
   240    240   used, which tries to even parse badly formed HTML into a DOM tree.
   241    241   .IP "\fB-html5\fR"
   242         -This option is only available if tDOM was build
          242  +This option is only available, if tDOM was build
   243    243   with --enable-html5. Try the \fIfeatureinfo\fR method
   244         -if you need to know if this feature is build in. If
          244  +if you need to know, if this feature is build in. If
   245    245   \&\fI-html5\fR is specified, the gumbo lib html5 parser
   246         -(https://github.com/google/gumbo-parser) is used to
          246  +(https://github.com/google/gumbo-parser) is used, to
   247    247   build the DOM tree. This is, as far as it goes, XML
   248         -namespace-aware. Since this probably isn't wanted by a
          248  +namespace aware. Since this probably isn't wanted by a
   249    249   lot of users and adds only burden for no good in a lot
   250    250   of use cases \fI-html5\fR can be combined with
   251    251   \&\fI-ignorexmlns\fR, in which case all nodes and
   252    252   attributes in the DOM tree are not in an XML
   253    253   namespace. All tag and attribute names in the DOM tree
   254    254   will be lower case, even for foreign elements not in
   255    255   the xhtml, svg or mathml namespace. The DOM tree may
   256         -include nodes, that the parser inserted because they
          256  +include nodes, that the parser inserted, because they
   257    257   are implied by the context (as <head>,
   258    258   <tbody>, etc.).
   259    259   .IP "\fB-json\fR"
   260    260   If \fI-json\fR is specified, the \fIdata\fR is
   261    261   expected to be a valid JSON string (according to RFC
   262    262   7159). The command returns an ordinary DOM document
   263    263   with nesting token inside the JSON data translated
................................................................................
   279    279   from this JSON type information the returned doc
   280    280   command or handle is an ordinary DOM doc, which may be
   281    281   investigated or modified with the full range of the
   282    282   doc and node methods. Please note that the element
   283    283   node names and the text node values within the tree
   284    284   may be outside of what the appropriate XML productions
   285    285   allow.
   286         -.IP "\fB-jsonmaxnesting  \fIinteger\fP\fR"
   287         -This options only has effect if used together
   288         -with the \fI-json\fR option. The current implementation uses recursive descent JSON parser. In order to avoid using excess stack space, any JSON input that has more than a certain levels of nesting is considered invalid. The default maximum nesting is 2000. The option -jsonmaxnesting allows the user to adjust that.
   289         -.IP "\fB--\fR"
   290         -The option \fI--\fR marks the end of options.
   291         -While respected in general this option is only needed
   292         -in case of parsing JSON data, which may start with a
   293         -"-".
   294    286   .IP "\fB-keepEmpties\fR"
   295    287   If \fI-keepEmpties\fR is
   296         -specified then text nodes which contain only whitespaces will be part of the
          288  +specified, text nodes, which contain only whitespaces, will be part of the
   297    289   resulting DOM tree. In default case (\fI-keepEmpties\fR not given) those empty
   298    290   text nodes are removed at parsing time.
   299    291   .IP "\fB-channel  \fI<channel-ID>\fP\fR"
   300    292   If \fI-channel <channel-ID>\fR is specified, the
   301    293   input to be parsed is read from the specified channel. The encoding setting of
   302    294   the channel (via fconfigure -encoding) is respected, ie the data read from the
   303         -channel are converted to UTF-8 according to the encoding settings before the
          295  +channel are converted to UTF-8 according to the encoding settings, befor the
   304    296   data is parsed.
   305    297   .IP "\fB-baseurl  \fI<baseURI>\fP\fR"
   306         -If \fI-baseurl <baseURI>\fR is specified,
   307         -the baseURI is used as the base URI of the document.
   308         -External entities references in the document are
   309         -resolved relative to this base URI. This base URI is
   310         -also stored within the DOM tree.
          298  +If \fI-baseurl <baseURI>\fR is specified, the
          299  +baseURI is used as the base URI of the document. External entities referenced
          300  +in the document are resolved relative to this base URI. This base URI is also
          301  +stored within the DOM tree.
   311    302   .IP "\fB-feedbackAfter  \fI<#bytes>\fP\fR"
   312         -If \fI-feedbackAfter <#bytes>\fR is
   313         -specified, the tcl command given by
   314         -\&\fI-feedbackcmd\fR is evaluated at the first element
   315         -start within the document (or an external entity)
   316         -after the start of the document or external entity or
   317         -the last such call after #bytes. For backward
   318         -compatibility if no -feedbackcmd is given but there is
   319         -a tcl proc named ::dom::domParseFeedback this proc is
   320         -used as -feedbackcmd. If there isn't such a proc and
   321         --feedbackAfter is used it is an error to not also use
   322         --feedbackcmd. If the called script raises error, then
   323         -parsing will be aborted, the \fIdom parse\fR call
   324         -returns error, with the script error msg as error msg.
   325         -If the called script \fIreturn -code break\fR, the
   326         -parsing will abort and the \fIdom parse\fR call will
   327         -return the empty string.
          303  +If \fI-feedbackAfter <#bytes>\fR is specified, the
          304  +tcl command given by \fI-feedbackcmd\fR is evaluated at the first
          305  +element start within the document (or an external entity) after the
          306  +start of the document or external entity or the last such call after
          307  +#bytes.For backward compatibility, if no -feedbackcmd is given, but
          308  +there is a tcl proc named ::dom::domParseFeedback then this proc is
          309  +used as -feedbackcmd. If there isn't such a proc and -feedbackAfter is
          310  +used, it is an error to not also use -feedbackcmd. If the called
          311  +script raises error, then parsing will be aborted, the
          312  +\&\fIdom parse\fR call returns error, with the script
          313  +error msg as error msg. If the called script \fIreturn
          314  +-code break\fR, the parsing will abort and the \fIdom
          315  +parse\fR call will return the empty string.
   328    316   .IP "\fB-feedbackcmd  \fI<script>\fP\fR"
   329    317   If \fI-feedbackcmd <script>\fR is specified, the
   330    318   script \fIscript\fR is evaluated at the first
   331    319   element start within the document (or an external entity) after the
   332    320   start of the document or external entity or the last such call after
   333    321   #bytes value given by the \fI-feedbackAfter\fR option. If
   334    322   \&\fI-feedbackAfter\fR isn't given, using this option
................................................................................
   341    329   .IP "\fB-externalentitycommand  \fI<script>\fP\fR"
   342    330   If \fI-externalentitycommand <script>\fR is
   343    331   specified, the specified tcl script is called to resolve any external entities
   344    332   of the document. The actual evaluated command consists of this option followed
   345    333   by three arguments: the base uri, the system identifier of the entity and the
   346    334   public identifier of the entity. The base uri and the public identifier may be
   347    335   the empty list. The script has to return a tcl list consisting of three
   348         -elements. The first element of this list signals how the external entity is
   349         -returned to the processor. Currently the two allowed types are "string"
          336  +elements. The first element of this list signals, how the external entity is
          337  +returned to the processor. At the moment, the two allowed types are "string"
   350    338   and "channel". The second element of the list has to be the (absolute) base URI
   351    339   of the external entity to be parsed.  The third element of the list are data,
   352    340   either the already read data out of the external entity as string in the case
   353    341   of type "string", or the name of a tcl channel, in the case of type
   354    342   "channel". Note that if the script returns a tcl channel, it will not be closed
   355    343   by the processor.  It must be closed separately if it is no longer
   356         -needed.
          344  +required.
   357    345   .IP "\fB-useForeignDTD  \fI<boolean>\fP\fR"
   358    346   If <boolean> is true and the document does not have
   359    347   an external subset, the parser will call the -externalentitycommand script with
   360         -empty values for the systemId and publicID arguments. Please note that if
          348  +empty values for the systemId and publicID arguments. Pleace notice, that, if
   361    349   the document also doesn't have an internal subset, the
   362    350   -startdoctypedeclcommand and -enddoctypedeclcommand scripts, if set, are not
   363    351   called. The \fI-useForeignDTD\fR respects
   364    352   .IP "\fB-paramentityparsing  \fI<always|never|notstandalone>\fP\fR"
   365         -The \fI-paramentityparsing\fR option controls,
   366         -if the parser tries to resolve the external entities
   367         -(including the external DTD subset) of the document
   368         -while building the DOM tree.
   369         -\&\fI-paramentityparsing\fR requires an argument, which
   370         -must be either "always", "never", or "notstandalone".
   371         -The value "always" means that the parser tries to
   372         -resolves (recursively) all external entities of the
   373         -XML source. This is the default in case
   374         -\&\fI-paramentityparsing\fR is omitted. The value
   375         -"never" means that only the given XML source is
   376         -parsed and no external entity (including the external
   377         -subset) will be resolved and parsed. The value
   378         -"notstandalone" means, that all external entities will
   379         -be resolved and parsed, with the execption of
   380         -documents, which explicitly states standalone="yes" in
          353  +The \fI-paramentityparsing\fR option controls, if the
          354  +parser tries to resolve the external entities (including the external DTD
          355  +subset) of the document, while building the DOM
          356  +tree. \fI-paramentityparsing\fR requires an argument, which must be either
          357  +"always", "never", or "notstandalone". The value "always" means, that the
          358  +parser tries to resolves (recursively) all external entities of the XML
          359  +source. This is the default, in case \fI-paramentityparsing\fR is omitted. The
          360  +value "never" means, that only the given XML source is parsed and no external
          361  +entity (including the external subset) will be resolved and parsed. The value
          362  +"notstandalone" means, that all external entities will be resolved and parsed,
          363  +with the execption of documents, which explicitly states standalone="yes" in
   381    364   their XML declaration.
   382    365   .IP "\fB-ignorexmlns\fR"
   383    366   It is recommended, that you only use this option
   384         -with the \fI-html5\fR option. If this option is
   385         -given, no node within the created DOM tree will be
   386         -internally marked as placed into an XML Namespace,
   387         -even if there is a default namespace in scope for
   388         -un-prefixed elements or even if the element has a
   389         -defined namespace prefix. One consequence is that
   390         -XPath node expressions on such a DOM tree doesn't work
   391         -as expected. Prefixed element nodes can't be selected
   392         -and element nodes without prefix will be seen by XPath
   393         -expressions as if they are not in any namespace (no
   394         -matter if they are in fact should be in a default
          367  +together with the \fI-html5\fR option, if ever. If
          368  +this option is given, no node within the created DOM
          369  +tree will be internally marked as placed into an XML
          370  +Namespace, even if there is a default namespace in
          371  +scope for un-prefixed elements or even if the element
          372  +has a defined namespace prefix. One consequence is of
          373  +this is, that XPath node expressions on such a DOM
          374  +tree doesn't work as expected. Prefixed element nodes
          375  +can't be selected and element nodes without prefix
          376  +will be seen by XPath expressions as if they haven't
          377  +any namespace (no matter if they in fact in a default
   395    378   namespace).
   396    379   .PP
   397    380   .RE
   398    381   .TP
   399    382   \&\fB\fBdom\fP \fBcreateDocument\fP \fIdocElemName\fB ?\fIobjVar\fB?
   400    383   \&\fRCreates a new DOM document object with one element node with
   401    384   node name \fIdocElemName\fR. The \fIobjVar\fR controls the
................................................................................
   404    387   \&\fB\fBdom\fP \fBcreateDocumentNS\fP \fIuri\fB \fIdocElemName\fB ?\fIobjVar\fB?
   405    388   \&\fRCreates a new DOM document object with one element node with
   406    389   node name \fIdocElemName\fR. \fIUri\fR gives the namespace of the
   407    390   document element to create. The \fIobjVar\fR controls the
   408    391   memory handling as explained above.
   409    392   .TP
   410    393   \&\fB\fBdom\fP \fBcreateDocumentNode\fP ?\fIobjVar\fB?
   411         -\&\fRCreates a new 'empty' DOM document object without any element
          394  +\&\fRCreates a new, 'empty' DOM document object without any element
   412    395   node. \fIobjVar\fR controls the memory handling as explained above.
   413    396   .TP
   414    397   \&\fB\fBdom\fP \fBsetResultEncoding\fP ?\fIencodingName\fB?
   415         -\&\fRThis option is for backward compatibility with Tcl
   416         -8.0. If tDOM is build with any newer Tcl version this option
   417         -does not has any effect. If \fIencodingName\fR is not given
   418         -the current global result encoding is returned. Otherwise
   419         -the global result encoding is set to \fIencodingName\fR.
   420         -All character data, attribute values etc. will then be
   421         -converted from UTF-8, which is delivered from the Expat XML
   422         -parser, to the given 8 bit encoding at XML/DOM parse time.
   423         -Valid values for \fIencodingName\fR are: utf-8, ascii,
   424         -cp1250, cp1251, cp1252, cp1253, cp1254, cp1255, cp1256,
   425         -cp437, cp850, en, iso8859-1, iso8859-2, iso8859-3,
   426         -iso8859-4, iso8859-5, iso8859-6, iso8859-7, iso8859-8,
   427         -iso8859-9, koi8-r.
          398  +\&\fRIf \fIencodingName\fR is not given the current global
          399  +result encoding is returned.  Otherwise the global result encoding is set to
          400  +\&\fIencodingName\fR.  All character data, attribute values, etc. will
          401  +then be converted from UTF-8, which is delivered from the Expat XML parser, to
          402  +the given 8 bit encoding at XML/DOM parse time.  Valid values for
          403  +\&\fIencodingName\fR are: utf-8, ascii, cp1250, cp1251, cp1252, cp1253,
          404  +cp1254, cp1255, cp1256, cp437, cp850, en, iso8859-1, iso8859-2, iso8859-3,
          405  +iso8859-4, iso8859-5, iso8859-6, iso8859-7, iso8859-8, iso8859-9, koi8-r.
   428    406   .TP
   429         -\&\fB\fBdom\fP \fBcreateNodeCmd\fP \fI?-returnNodeCmd?\fB \fI?-tagName name?\fB \fI?-jsonType jsonType?\fB \fI?-namespace URI?\fB \fI(element|comment|text|cdata|pi)Node\fB \fIcommandName\fB
          407  +\&\fB\fBdom\fP \fBcreateNodeCmd\fP \fI?-returnNodeCmd?\fB \fI?-tagName name?\fB \fI?-jsonType jsonType\fB \fI(element|comment|text|cdata|pi)Node\fB \fIcommandName\fB
   430    408   \&\fRThis method creates Tcl commands, which in turn create
   431    409   tDOM nodes. Tcl commands created by this command are only
   432    410   avaliable inside a script given to the domNode methods
   433    411   \&\fIappendFromScript\fR or \fIinsertBeforeFromScript\fR. If
   434    412   a command created with \fIcreateNodeCmd\fR is invoked in
   435    413   any other context, it will return error. The created command
   436    414   \&\fIcommandName\fR replaces any existing command or
................................................................................
   448    426   option \fI-returnNodeCmd\fR was given, the command returns the
   449    427   created node as Tcl command. If this option was omitted, the command
   450    428   returns nothing. Each command creates always the same type of node.
   451    429   Which type of node is created by the command is determined by the
   452    430   first argument to the \fIcreateNodeCmd\fR. The syntax of the created
   453    431   command depends on the type of the node it creates.
   454    432   .PP
   455         -If the command type to create is \fIelementNode\fR, the created
   456         -command will create an element node, if called. Without the
          433  +If the first argument of the method is \fIelementNode\fR, the
          434  +created command will create an element node. Without the
   457    435   \&\fI-tagName\fR option the tag name of the created node is
   458    436   \&\fIcommandName\fR without namespace qualifiers. If the
   459    437   \&\fI-tagName\fR option was given then the created command the created
   460    438   elements will have this tag name. If the \fI-jsonType\fR option was
   461         -given then the created node elements will have the given JSON type. If
   462         -the \fI-namespace\fR option is given the created element node will be
   463         -XML namespaced and in the namespace given by the option. The element
   464         -name will be literal as given either by the command name or the
   465         -\&\fI-tagname\fR option, if that was given. An appropriate XML
   466         -namespace declaration will be automatically added, to bind the prefix
   467         -(if the element name has one) or the default namespace (if the element
   468         -name hasn't a prefix) to the namespace if such a binding isn't in
   469         -scope.
   470         -.PP
          439  +given then the created node elements will have the given JSON type.
   471    440   The syntax of the created command is:
   472    441   
   473    442   
   474    443   
   475    444   .CS
   476    445   
   477    446   \&\fBelementNodeCmd\fP \fI?attributeName attributeValue ...? ?script?\fR
................................................................................
   535    504   
   536    505   .CE
   537    506   .RE
   538    507   .TP
   539    508   \&\fB\fBdom\fP \fBsetStoreLineColumn\fP \fI?boolean\fB?
   540    509   \&\fRIf switched on, the DOM nodes will contain line and column
   541    510   position information for the original XML document after parsing. The default
   542         -is not to store line and column position information.
          511  +is, not to store line and column position information.
   543    512   .TP
   544    513   \&\fB\fBdom\fP \fBsetNameCheck\fP \fI?boolean\fB?
   545    514   \&\fRIf NameCheck is true, every method which expects an XML Name,
   546    515   a full qualified name or a processing instructing target will check, if the
   547         -given string is valid according to its production rule. For commands created
          516  +given string is valid according to his production rule. For commands created
   548    517   with the \fIcreateNodeCmd\fR method to be used in the context of
   549    518   \&\fIappendFromScript\fR the status of the flag at creation time
   550    519   decides. If NameCheck is true at creation time, the command will
   551         -check its arguments, otherwise not. The \fIsetNameCheck\fR
          520  +check his arguments, otherwise not. The \fIsetNameCheck\fR
   552    521   set this flag. It returns the current NameCheck flag state. The
   553    522   default state for NameCheck is true.
   554    523   .TP
   555    524   \&\fB\fBdom\fP \fBsetTextCheck\fP \fI?boolean\fB?
   556    525   \&\fRIf TextCheck is true, every command which expects XML Chars,
   557    526   a comment, a CDATA section value or a processing instructing value will check,
   558         -if the given string is valid according to its production rule. For commands
          527  +if the given string is valid according to his production rule. For commands
   559    528   created with the \fIcreateNodeCmd\fR method to be used in the
   560    529   context of \fIappendFromScript\fR the status of the flag at
   561    530   creation time decides. If TextCheck is true at creation time, the
   562         -command will check its arguments, otherwise not.The
   563         -\&\fIsetTextCheck\fR method sets this flag. It returns the current
          531  +command will check his arguments, otherwise not.The
          532  +\&\fIsetTextCheck\fR method set this flag. It returns the current
   564    533   TextCheck flag state. The default state for TextCheck is true.
   565    534   .TP
   566    535   \&\fB\fBdom\fP \fBsetObjectCommands\fP ?\fI(automatic|token|command)\fB?
   567         -\&\fRControls if documents and nodes are created as tcl commands or
          536  +\&\fRControls, if documents and nodes are created as tcl commands or
   568    537   as token to be
   569    538   used with the domNode and domDoc commands. If the mode is
   570    539   \&'automatic', then methods used at tcl commands will create tcl
   571    540   commands and methods used at doc or node tokes will create tokens. If
   572    541   the mode is 'command' then always tcl commands will be created. If
   573    542   the mode is 'token', then always token will be created. The method
   574    543   returns the current mode. This method is an experimental interface.
   575    544   .TP
   576    545   \&\fB\fBdom\fP \fBisName\fP \fIname\fB
   577         -\&\fRReturns 1 if \fIname\fR is a valid XML Name according to
          546  +\&\fRReturns 1, if \fIname\fR is a valid XML Name according to
   578    547   production 5 of the XML
   579         -1.0 recommendation. This means that \fIname\fR is a valid
          548  +1.0 recommendation. This means, that \fIname\fR is a valid
   580    549   XML element or attribute name. Otherwise it returns 0.
   581    550   .TP
   582    551   \&\fB\fBdom\fP \fBisPIName\fP \fIname\fB
   583         -\&\fRReturns 1 if \fIname\fR is a valid XML processing instruction
          552  +\&\fRReturns 1, if \fIname\fR is a valid XML processing instruction
   584    553   target according to
   585    554   production 17 of the XML 1.0 recommendation. Otherwise it returns 0.
   586    555   .TP
   587    556   \&\fB\fBdom\fP \fBisNCName\fP \fIname\fB
   588         -\&\fRReturns 1 if \fIname\fR is a valid NCName according
          557  +\&\fRReturns 1, if \fIname\fR is a valid NCName according
   589    558   to production 4 of the of the Namespaces in XML recommendation. Otherwise it returns
   590    559   0.
   591    560   .TP
   592    561   \&\fB\fBdom\fP \fBisQName\fP \fIname\fB
   593         -\&\fRReturns 1 if \fIname\fR is a valid QName according
          562  +\&\fRReturns 1, if \fIname\fR is a valid QName according
   594    563   to production 6 of the of the Namespaces in XML recommendation. Otherwise it returns
   595    564   0.
   596    565   .TP
   597    566   \&\fB\fBdom\fP \fBisCharData\fP \fIstring\fB
   598         -\&\fRReturns 1 if every character in \fIstring\fR is
          567  +\&\fRReturns 1, if every character in \fIstring\fR is
   599    568   a valid XML Char according to production 2 of the XML 1.0
   600    569   recommendation. Otherwise it returns 0.
   601    570   .TP
   602    571   \&\fB\fBdom\fP \fBisBMPCharData\fP \fIstring\fB
   603         -\&\fRReturns 1 if every character in \fIstring\fR is
          572  +\&\fRReturns 1, if every character in \fIstring\fR is
   604    573   a valid XML Char with a Unicode code point within the Basic
   605    574   Multilingual Plane (that means, that every character within the string
   606    575   is at most 3 bytes long). Otherwise it returns 0.
   607    576   .TP
   608    577   \&\fB\fBdom\fP \fBisComment\fP \fIstring\fB
   609         -\&\fRReturns 1 if \fIstring\fR is
          578  +\&\fRReturns 1, if \fIstring\fR is
   610    579   a valid comment according to production 15 of the XML 1.0
   611    580   recommendation. Otherwise it returns 0.
   612    581   .TP
   613    582   \&\fB\fBdom\fP \fBisCDATA\fP \fIstring\fB
   614         -\&\fRReturns 1 if \fIstring\fR is
          583  +\&\fRReturns 1, if \fIstring\fR is
   615    584   valid according to production 20 of the XML 1.0
   616    585   recommendation. Otherwise it returns 0.
   617    586   .TP
   618    587   \&\fB\fBdom\fP \fBisPIValue\fP \fIstring\fB
   619         -\&\fRReturns 1 if \fIstring\fR is
          588  +\&\fRReturns 1, if \fIstring\fR is
   620    589   valid according to production 16 of the XML 1.0
   621    590   recommendation. Otherwise it returns 0.
   622    591   .TP
   623    592   \&\fB\fBdom\fP \fBfeatureinfo\fP \fIfeature\fB
   624    593   \&\fRThis method provides information about the used
   625    594   build options and the expat version. The valid values for
   626    595   the \fIfeature\fR argument are:
   627    596   .RS
   628    597   .IP "\fBexpatversion\fR"
   629    598   Returns the version of the underlyling expat
   630    599   version as string, something like
   631         -"exapt_2.1.0". This is what the expat API
          600  +"exapt_2.1.0". This is. what the expat API
   632    601   function XML_ExpatVersion() returns.
   633    602   .IP "\fBexpatmajorversion\fR"
   634    603   Returns the major version of the underlyling
   635    604   expat version as integer.
   636    605   .IP "\fBexpatminorversion\fR"
   637    606   Returns the minor version of the underlyling
   638    607   expat version as integer.
   639    608   .IP "\fBexpatmicroversion\fR"
   640    609   Returns the micro version of the underlyling
   641    610   expat version as integer.
   642    611   .IP "\fBdtd\fR"
   643         -Returns as boolean if build with
          612  +Returns as boolean, if build with
   644    613   \&\fI--enable-dtd\fR.
   645    614   .IP "\fBns\fR"
   646         -Returns as boolean if build with
          615  +Returns as boolean, if build with
   647    616   \&\fI--enable-ns\fR.
   648    617   .IP "\fBunknown\fR"
   649         -Returns as boolean if build with
          618  +Returns as boolean, if build with
   650    619   \&\fI--enable-unknown\fR.
   651    620   .IP "\fBtdomalloc\fR"
   652         -Returns as boolean if build with
          621  +Returns as boolean, if build with
   653    622   \&\fI--enable-tdomalloc\fR.
   654    623   .IP "\fBlessns\fR"
   655         -Returns as boolean if build with
          624  +Returns as boolean, if build with
   656    625   \&\fI--enable-lessns\fR.
   657    626   .IP "\fBTCL_UTF_MAX\fR"
   658    627   Returns the TCL_UTF_MAX value of the tcl
   659    628   core, tDOM was build with as integer
   660    629   .IP "\fBhtml5\fR"
   661    630   Returns as boolean, if build with
   662    631   \&\fI--enable-html5\fR.
   663    632   .RE
   664    633   .SH KEYWORDS
   665    634   XML, DOM, document, node, parsing

Changes to doc/dom.xml.

   329    329             cp437, cp850, en, iso8859-1, iso8859-2, iso8859-3,
   330    330             iso8859-4, iso8859-5, iso8859-6, iso8859-7, iso8859-8,
   331    331             iso8859-9, koi8-r.</desc>
   332    332           </commanddef>
   333    333   
   334    334           <commanddef>
   335    335             <command><cmd>dom</cmd> <method>createNodeCmd</method>
   336         -<m>?-returnNodeCmd?</m> <m>?-tagName name?</m> <m>?-jsonType jsonType?</m> <m>?-namespace URI?</m> <m>(element|comment|text|cdata|pi)Node</m> <m>commandName</m></command>
          336  +<m>?-returnNodeCmd?</m> <m>?-tagName name?</m> <m>?-jsonType jsonType</m> <m>(element|comment|text|cdata|pi)Node</m> <m>commandName</m></command>
   337    337             <desc>This method creates Tcl commands, which in turn create
   338    338             tDOM nodes. Tcl commands created by this command are only
   339    339             avaliable inside a script given to the domNode methods
   340    340             <m>appendFromScript</m> or <m>insertBeforeFromScript</m>. If
   341    341             a command created with <m>createNodeCmd</m> is invoked in
   342    342             any other context, it will return error. The created command
   343    343             <m>commandName</m> replaces any existing command or
................................................................................
   354    354   option <m>-returnNodeCmd</m> was given, the command returns the
   355    355   created node as Tcl command. If this option was omitted, the command
   356    356   returns nothing. Each command creates always the same type of node.
   357    357   Which type of node is created by the command is determined by the
   358    358   first argument to the <m>createNodeCmd</m>. The syntax of the created
   359    359   command depends on the type of the node it creates.</p>
   360    360   
   361         -<p>If the command type to create is <m>elementNode</m>, the created
   362         -command will create an element node, if called. Without the
          361  +<p>If the first argument of the method is <m>elementNode</m>, the
          362  +created command will create an element node, if called. Without the
   363    363   <m>-tagName</m> option the tag name of the created node is
   364    364   <m>commandName</m> without namespace qualifiers. If the
   365    365   <m>-tagName</m> option was given then the created command the created
   366    366   elements will have this tag name. If the <m>-jsonType</m> option was
   367         -given then the created node elements will have the given JSON type. If
   368         -the <m>-namespace</m> option is given the created element node will be
   369         -XML namespaced and in the namespace given by the option. The element
   370         -name will be literal as given either by the command name or the
   371         -<m>-tagname</m> option, if that was given. An appropriate XML
   372         -namespace declaration will be automatically added, to bind the prefix
   373         -(if the element name has one) or the default namespace (if the element
   374         -name hasn't a prefix) to the namespace if such a binding isn't in
   375         -scope.</p>
   376         -
   377         -<p>The syntax of the created command is:</p>
          367  +given then the created node elements will have the given JSON type.
          368  +The syntax of the created command is:</p>
   378    369   
   379    370   <syntax>
   380    371   <cmd>elementNodeCmd</cmd> <m>?attributeName attributeValue ...? ?script?</m>
   381    372   <cmd>elementNodeCmd</cmd> <m>?-attributeName attributeValue ...? ?script?</m>
   382    373   <cmd>elementNodeCmd</cmd> <m>name_value_list script</m>
   383    374   </syntax>
   384    375   

Changes to doc/domDoc.html.

     1      1   <html>
     2      2   <head>
     3         -<link rel="stylesheet" href="manpage.css"><title>tDOM manual: domDoc</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
            3  +<link rel="stylesheet" href="manpage.css"><title>tDOM manual: domDoc</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $">
     4      4   </head><body>
     5      5   <div class="header">
     6      6   <div class="navbar" align="center">
     7         -<a href="#SECTid0x1e30210">NAME</a> · <a href="#SECTid0x1f1d4f0">SYNOPSIS</a> · <a href="#SECTid0x1f1d9d0">DESCRIPTION </a> · <a href="#SECTid0x1f7ab90">SEE ALSO</a> · <a href="#SECTid0x1f7af20">KEYWORDS</a>
            7  +<a href="#SECTid0xa2ebe0">NAME</a> · <a href="#SECTid0xa4db80">SYNOPSIS</a> · <a href="#SECTid0xad8760">DESCRIPTION </a> · <a href="#SECTid0xb75940">SEE ALSO</a> · <a href="#SECTid0xb75cd0">KEYWORDS</a>
     8      8   </div><hr class="navsep">
     9      9   </div><div class="body">
    10         -  <h2><a name="SECTid0x1e30210">NAME</a></h2><p class="namesection">
           10  +  <h2><a name="SECTid0xa2ebe0">NAME</a></h2><p class="namesection">
    11     11   <b class="names">domDoc - </b><br>Manipulates an instance of a DOM document object</p>
    12     12     
    13         -  <h2><a name="SECTid0x1f1d4f0">SYNOPSIS</a></h2><pre class="syntax">domDocObjCmd <i class="m">method</i> ?<i class="m">arg arg ...</i>?</pre>
           13  +  <h2><a name="SECTid0xa4db80">SYNOPSIS</a></h2><pre class="syntax">domDocObjCmd <i class="m">method</i> ?<i class="m">arg arg ...</i>?</pre>
    14     14   
    15         -  <h2><a name="SECTid0x1f1d9d0">DESCRIPTION </a></h2><p>This command manipulates one particular instance of a document
           15  +  <h2><a name="SECTid0xad8760">DESCRIPTION </a></h2><p>This command manipulates one particular instance of a document
    16     16   object. <i class="m">method</i> indicates a specific method of the document class. These
    17     17   methods should closely conform to the W3C recommendation "Document Object Model
    18     18   (Core) Level 1" (<a href="http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html">http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html</a>). Look
    19     19   at these documents for a deeper understanding of the functionality.</p><p>The valid methods are:</p><dl class="commandlist">
    20     20           
    21     21             <dt>
    22     22   <b class="method">documentElement</b> ?<i class="m">objVar</i>?</dt>
................................................................................
   118    118           channelId.</p>
   119    119   
   120    120           <p>If the option <i class="m">-escapeNonASCII</i> is given,
   121    121           every non 7 bit ASCII character in attribute values or element
   122    122           PCDATA content will be escaped as character reference in
   123    123           decimal representation.</p>
   124    124   
   125         -        <p>The flag <i class="m">-doctypeDeclaration</i> determines whether
   126         -        there will be a DOCTYPE declaration emitted before the first
   127         -        node of the document. The default is not to emit it. The
   128         -        DOCTYPE name will always be the element name of the document
   129         -        element. An external entity declaration of the external subset
   130         -        is only emitted if the document has a system identifier.</p>
          125  +        <p>The flag <i class="m">-doctypeDeclaration</i>
          126  +        determines, whether there will be a DOCTYPE declaration
          127  +        emitted before the first node of the document. The default is,
          128  +        to do not. The DOCTYPE name will always be the element name of
          129  +        the document element. An external entity declaration of the
          130  +        external subset is only emitted, if the document has a system
          131  +        identifier.</p>
   131    132   
   132         -        <p>The flag <i class="m">-xmlDeclaration</i> determines whether there
          133  +        <p>The flag <i class="m">-xmlDeclaration</i> determines, whether there
   133    134           will be an XML Declaration and a newline emitted before
   134         -        anything else. The default is not to emit one. If this flag is
          135  +        anything else. The default is, to do not. If this flag is
   135    136           given with a true argument then</p>
   136    137   
   137    138           <p>
   138    139   <i class="m">-encString</i> sets the encoding value in the XML
   139         -        Declaration. Otherwise this option is ignored. Please note
   140         -        that this option just enhances the string representation of the
          140  +        Declaration. Otherwise, this option is ignored. Please note,
          141  +        that this option just enhance the string representation of the
   141    142           generated XML Declaration with an encoding information string,
   142    143           nothing more. It's up to the user to handle encoding in case
   143    144           of writing to a channel or reparsing.</p>
   144    145               
   145    146           <p>If the option <i class="m">-escapeAllQuot</i> is given,
   146    147           quotation marks will be escaped with &amp;quot; even in text
   147    148           content of elements.</p>
................................................................................
   155    156         
   156    157   
   157    158         
   158    159           <dt>
   159    160   <b class="method">asHTML</b> <b class="option">?-channel
   160    161   channelId?</b> <b class="option">?-escapeNonASCII?</b> <b class="option">?-htmlEntities?</b> <b class="option">?-doctypeDeclaration &lt;boolean&gt;?</b>
   161    162   </dt> 
   162         -        <dd>Returns the DOM tree serialized acording to HTML rules
   163         -        (HTML elements are recognized regardless of case, without end
   164         -        tags for emtpy HTML elements etc.) as string or sends the
   165         -        output directly to the given channelId. If the option
   166         -        <i class="m">-escapeNonASCII</i> is given, every non 7 bit ASCII
   167         -        character in attribute values or element PCDATA content will
   168         -        be escaped as character reference in decimal representation.
   169         -        If the option <i class="m">-htmlEntities</i> is given, a character is
   170         -        written using its HTML 4.01 character entity reference, if it
   171         -        has one. If the flag <i class="m">-doctypeDeclaration</i> is given there
   172         -        will be a DOCTYPE declaration emitted before the first node of
   173         -        the document. The default is, to do not. The DOCTYPE name will
   174         -        always be the element name of the document element without
   175         -        case normalization. An external entity declaration of the
   176         -        external subset is only emitted, if the document has a system
   177         -        identifier. The doctype declaration will be written from the
   178         -        avaliable information, without check, if this is a known
   179         -        (w3c) HTML version information or if the document confirms to
   180         -        the given HTML version.</dd>
          163  +        <dd>Returns the DOM tree serialized acording to HTML rules (HTML
          164  +elements are recognized regardless of case, without end tags for emtpy HTML
          165  +elements etc.), as string or sends the output directly to the given
          166  +channelId. If the option <i class="m">-escapeNonASCII</i> is given, every non 7 bit ASCII
          167  +character in attribute values or element PCDATA content will be escaped as
          168  +character reference in decimal representation. If the option
          169  +<i class="m">-htmlEntities</i> is given, a character is outputed using a HTML 4.01
          170  +character entity reference, if one is defined for it. The flag
          171  +<i class="m">-doctypeDeclaration</i> determines, whether there will be a DOCTYPE
          172  +declaration emitted before the first node of the document. The default is, to
          173  +do not. The DOCTYPE name will always be the element name of the document
          174  +element without case normalization. An external entity declaration of the
          175  +external subset is only emitted, if the document has a system identifier. The
          176  +doctype declaration will be written from the avaliable informations, without
          177  +check, if this is a known (w3c) HTML version information or if the document
          178  +confirms to the given HTML version.</dd>
   181    179         
   182    180   
   183    181         
   184    182           <dt><b class="method">asText</b></dt>
   185         -          <dd>The asText method returns the tree by serializing the
   186         -          string-value of every text node in document order without
   187         -          any escaping. In effect, this is what the xslt output method
   188         -          "text" (XSLT 1.0 recommendation, section 16.3) does.</dd>
          183  +          <dd>The asText method outputs the result tree by outputting
          184  +the string-value of every text node in the result tree in document
          185  +order without any escaping. In effect, this is what the xslt output method
          186  +"text" (XSLT 1.0 recommendation, section 16.3) does.</dd>
   189    187         
   190    188   
   191    189         
   192    190           <dt>
   193    191   <b class="method">asJSON</b> <b class="option">?-indent none/0..8?</b> <b class="option">?-channel channelId?</b>
   194    192   </dt>
   195    193             <dd>
   196    194   <p>The asJSON method serializes the tree into a valid
   197         -          JSON data string. In general, this may be a lossy
          195  +          JSON data string. In general this may be a lossy
   198    196             serialization. For this serialization all comment, character
   199    197             data sections and processing instruction nodes, all
   200    198             attributes and all XML namespaces are ignored. Only element
   201    199             and text nodes may be reflected in the generated JSON
   202    200             serialization. Appropriate JSON data type information of a
   203    201             node will be respected.</p>
   204    202   
   205         -          <p>If an element node has the JSON type OBJECT, then every
   206         -          element node child of this element will be serialized as
          203  +          <p>If an element node has the JSON type OBJECT then every
          204  +          element node child of this element will be serializend as
   207    205             member of that object, with the node name of the child as
   208         -          the member name and the relevant children of that child as
   209         -          the value. Every other child nodes will be ignored.</p>
          206  +          the member name and the relevant childs of that child as the
          207  +          value. Every other child nodes will be ignored.</p>
   210    208   
   211         -          <p>If an element node has the JSON type ARRAY, then the text
   212         -          and element node children of that element node are serialized
   213         -          as the consecutive values of the array. Element node children
          209  +          <p>If an element node has the JSON type ARRAY then the text
          210  +          and element node childs of that element node are serialized
          211  +          as the consecutive values of the array. Element node childs
   214    212             of an ARRAY element will be container nodes for nested ARRAY
   215    213             or OBJECT values.</p>
   216    214   
   217    215             <p>Text nodes with the JSON types TRUE, FALSE or NULL will
   218    216             be serialized to the corresponding JSON token without
   219    217             looking at the value of the text node. A text node without
   220    218             JSON type will always be serialized as a JSON string token.
   221    219             A text node with JSON type NUMBER will be serialized as JSON
   222    220             number token if the text node value is in fact a valid JSON
   223    221             number and as a JSON string if not.</p>
   224    222   
   225    223             <p>If an element node doesn't has a JSON type then the
   226         -          serialization of its children is determined by the following
          224  +          serialization of its childs is determined by the following
   227    225             rules:</p>
   228    226   
   229    227             <p>Only text and element node child are relevant. If the
   230    228             element node to serialize is the member of a JSON object and
   231    229             there is no relevant child node the value of that member
   232    230             will be an empty JSON string. If the only relevant child
   233    231             node of this element node is a text node then the JSON
   234    232             value of that text node will be the value of the object
   235    233             member. If the element has more than one relevant child
   236    234             nodes and the first one is a text node then the relevant
   237         -          children will be serialized as JSON array. If the only
          235  +          childs will be serialized as JSON array. If the only
   238    236             relevant child node is an element node or the first relevant
   239    237             child is an element node and the node name of that only or
   240    238             first relevant child isn't equal to the array container node
   241         -          name all element node children will be serialized as the
          239  +          name all element node childs will be serialized as the
   242    240             members of a JSON object (while ignoring any intermixed text
   243    241             nodes). If the only or first relevant child is an element
   244    242             node and the node name of this child is equal to the array
   245         -          container element name then all relevant children will be
          243  +          container element name then all relevant childs will be
   246    244             serialized as the values of a JSON array.</p>
   247    245   
   248    246             <p>If the element to serialize is a value of a JSON array
   249    247             and the node name of this element isn't equal to the array
   250         -          container node name that element will be seen as a container
   251         -          node for a JSON object and all element node children will be
   252         -          serialized as the members of that array while ignoring any
   253         -          text node children. If the element to serialize is a value of
   254         -          a JSON array and the node name of this element is equal to
   255         -          the array container node name, all relevant children will be
   256         -          serialized as JSON array.</p>
          248  +          container node name that element will be seen as a
          249  +          container node for a JSON object and all element node childs
          250  +          will be serialized as the members of that array while
          251  +          ignoring any text node childs. If the element to serialize
          252  +          is a value of a JSON array and the node name of this element
          253  +          is equal to the array container node name, all relevant
          254  +          childs will be serialized as JSON array.</p>
   257    255   
   258    256             <p>If the <i class="m">-channel</i> option is given the serialization
   259    257             isn't returned as string but send directly to the channel,
   260    258             given as argument to the option.</p>
   261    259   
   262    260             <p>If the <i class="m">-indent</i> option is given and the argument
   263    261             given to this option isn't "none" then the returned JSON
................................................................................
   291    289         
   292    290           <dt>
   293    291   <b class="method">internalSubset</b> <i class="m">?internalSubset?</i>
   294    292   </dt>
   295    293           <dd>Returns the internal subset of the doctype declaration of the
   296    294   document, if there is one, otherwise the empty string. If there is a value
   297    295   given to the method, the internal subset of the document is set to this
   298         -value. Note that none of the parsing methods preserve the internal subset
          296  +value. Note, that none of the parsing methods preserve the internal subset
   299    297   of a document; a freshly parsed document will always have an empty internal
   300    298   subset. Also note, that the method doesen't do any syntactical check on a
   301    299   given internal subset.</dd>
   302    300         
   303    301   
   304    302         
   305    303           <dt>
   306    304   <b class="method">cdataSectionElements</b> <i class="m">(?URI:?localname|*) ?&lt;boolean&gt;?</i>
   307    305   </dt>
   308         -        <dd>This method allows to control for which element nodes
   309         -the text node children will be serialized as CDATA sections (this affects only
          306  +        <dd>This method allows to control, for which element nodes
          307  +the text node childs will be serialized as CDATA sections (this affects only
   310    308   serialization with the asXML method, no text node is altered in any
   311    309   way by this method). IF the method is called with an element name as
   312    310   first argument and a boolean with value true as second argument, every
   313    311   text node child of every element node in the document with the same
   314    312   name as the first argument will be serialized as CDATA section. If the
   315    313   second argument is a boolean with value false, all text nodes of all
   316    314   elements with the same name as the first argument will be serialized
   317         -as usual. Namespaced element names have to be given in the form
          315  +as usual. Namespaced element names have to given in the form
   318    316   namespace_URI:localname, not in the otherwise usual prefix:localname
   319    317   form. With two arguments called, the method returns the used boolean
   320    318   value. If the method is called with only an element name, it will
   321         -return a boolean value, indicating that the text node children of all
          319  +return a boolean value, indicating, if the text nodes childs of all
   322    320   elements with that name in the document will be serialized as CDATA
   323    321   section elements (return value 1) or not (return value 0). If the
   324    322   method is called with only one argument and that argument is an
   325    323   asterisk ('*'), then the method returns an unordered list of all
   326         -element names of the document, for which the text node children will be
          324  +element names of the document, for which the text node childs will be
   327    325   serialized as CDATA section nodes.</dd>
   328    326         
   329    327   
   330    328         
   331    329           <dt>
   332    330   <b class="method">selectNodesNamespaces</b> <b class="option">?prefixUriList?</b>
   333    331   </dt>
   334    332           <dd>This method allows to control a document global prefix
   335         -        to namespace URI mapping, which will be used for selectNodes
   336         -        method calls (on document as well as on all nodes, which
   337         -        belongs to the document) if it is not overwritten by using
   338         -        the -namespaces option of the selectNodes method. Any
   339         -        namespace prefix within an xpath expression will be first
   340         -        resolved against this list. If the list binds the same prefix
   341         -        to different namespaces, then the first binding will win. If a
   342         -        prefix could not resolved against the document global prefix /
   343         -        namespaces list, then the namespace definitions in scope of
   344         -        the context node will be used to resolve the prefix, as usual.
   345         -        If the optional argument <i class="m">prefixUriList</i> is given, then
   346         -        the global prefix / namespace list is set to this list and
   347         -        returns it. Without the optional argument the method returns
   348         -        the current list. The default is the empty list.</dd>
          333  +to namespace URI mapping, which will be used for selectNodes method
          334  +calls (on document as well as on all nodes, which belongs to the
          335  +document), if it is not overwritten by using the -namespaces option of
          336  +the selectNodes method. Any namespace prefix within an xpath
          337  +expression will be first resolved against this list. If the list bind
          338  +the same prefix to different namespaces, then the first binding will
          339  +win. If a prefix could not resolved against the document global prefix
          340  +/ namespaces list, then the namespace definitions in scope of the
          341  +context node will be used to resolve the prefix, as usual. If the
          342  +optional argument <i class="m">prefixUriList</i> is given, then the global prefix /
          343  +namespace list is set to this list and returns it. Without
          344  +the optional argument the method returns the current list. The
          345  +default is the empty list.</dd>
   349    346         
   350    347   
   351    348         
   352    349           <dt>
   353    350   <b class="method">xslt</b> <b class="option">?-parameters
   354    351   parameterList?</b> <b class="option">?-ignoreUndeclaredParameters?</b>
   355    352   <b class="option">?-maxApplyDepth int?</b>
................................................................................
   363    360   <p>The optional <i class="m">-parameters</i> option sets top level
   364    361   &lt;xsl:param&gt; to string values. The <i class="m">parameterList</i> has to be a tcl
   365    362   list consisting of parameter name and value pairs.</p>
   366    363   
   367    364   <p>If the option <i class="m">-ignoreUndeclaredParameters</i> is given, then parameter
   368    365   names in the <i class="m">parameterList</i> given to the <i class="m">-parameters</i> options that
   369    366   are not declared as top-level parameters in the stylesheet are silently
   370         -ignored. Without this option, an error is raised if the user tries to set a
   371         -top-level parameter that is not declared in the stylesheet.</p>
          367  +ignored. Without this option, an error is raised, if the user tries to set a
          368  +top-level parameter, which is not declared in the stylesheet.</p>
   372    369   
   373    370   <p>The option <i class="m">-maxApplyDepth</i> expects a positiv integer as
   374    371   argument. By default, the xslt engine allows xslt templates to nest up
   375    372   to 3000 levels (and raises error if they nest deeper). This limit can
   376    373   be set by the <i class="m">-maxApplyDepth</i> option.</p>
   377    374   
   378    375   <p>The <i class="m">-xsltmessagecmd</i> option sets a callback for xslt:message elements
................................................................................
   424    421   <p>The optional <i class="m">-parameters</i> option sets top level
   425    422   &lt;xsl:param&gt; to string values. The <i class="m">parameterList</i> has to be a tcl
   426    423   list consisting of parameter name and value pairs.</p>
   427    424   
   428    425   <p>If the option <i class="m">-ignoreUndeclaredParameters</i> is given, then parameter
   429    426   names in the <i class="m">parameterList</i> given to the <i class="m">-parameters</i> options that
   430    427   are not declared as top-level parameters in the stylesheet are silently
   431         -ignored. Without this option, an error is raised if the user tries to set a
          428  +ignored. Without this option, an error is raised, if the user tries to set a
   432    429   top-level parameter, which is not declared in the stylesheet.</p>
   433    430   
   434    431   <p>The option <i class="m">-maxApplyDepth</i> expects a positiv integer as
   435    432   argument. By default, the xslt engine allows xslt templates to nest up
   436    433   to 3000 levels (and raises error if they nest deeper). This limit can
   437    434   be set by the <i class="m">-maxApplyDepth</i> option.</p>
   438    435   
................................................................................
   534    531         
   535    532   
   536    533         
   537    534           <dt>
   538    535   <b class="method">insertBefore</b> <i class="m">newChild</i>  <i class="m">refChild</i>
   539    536   </dt>
   540    537           <dd>Insert <i class="m">newChild</i> before the <i class="m">refChild</i> into the list of
   541         -top level nodes of the document. If <i class="m">refChild</i> is the empty string, inserts
          538  +top level nodes of the document. If <i class="m">refChild</i> is the empty string, insert
   542    539   <i class="m">newChild</i> at the end of the top level nodes.</dd>
   543    540         
   544    541   
   545    542         
   546    543           <dt>
   547    544   <b class="method">replaceChild</b> <i class="m">newChild</i>  <i class="m">oldChild</i>
   548    545   </dt>
   549         -        <dd>Replaces <i class="m">oldChild</i> with <i class="m">newChild</i> in the list of
          546  +        <dd>Replace <i class="m">oldChild</i> with <i class="m">newChild</i> in the list of
   550    547   children of that node. The <i class="m">oldChild</i> node will be part of the
   551    548   document fragment list after this operation.</dd>
   552    549         
   553    550   
   554    551         
   555    552           <dt>
   556    553   <b class="method">appendFromList</b> <i class="m">list</i>
................................................................................
   591    588   the xpath engine. Cast the value explicitly with the according xpath
   592    589   functions (number(), boolean()) to another data type, if needed.</p>
   593    590   
   594    591   <p>The option <i class="m">-namespaces</i> expects a tcl list with prefix /
   595    592   namespace pairs as argument. If this option is not given, then any
   596    593   namespace prefix within the xpath expression will be first resolved
   597    594   against the list of prefix / namespace pairs set with the
   598         -selectNodesNamespaces method for the document the node belongs to. If
          595  +selectNodesNamespaces method for the document, the node belongs to. If
   599    596   this fails, then the namespace definitions in scope of the context
   600    597   node will be used to resolve the prefix. If this option is given, any
   601    598   namespace prefix within the xpath expression will be first resolved
   602    599   against that given list (and ignoring the document global prefix /
   603         -namespace list). If the list binds the same prefix to different
          600  +namespace list). If the list bind the same prefix to different
   604    601   namespaces, then the first binding will win.  If this fails, then the
   605    602   namespace definitions in scope of the context node will be used to
   606    603   resolve the prefix, as usual.</p>
   607    604   
   608    605   <p>If the <i class="m">-cache</i> option is used with a true value, then the
   609    606   <i class="m">xpathQuery</i> will be looked up in a document specific cache. If
   610    607   the query is found, then the stored pre-compiled query will be used.
   611    608   If the query isn't found, it will be compiled and stored in the cache,
   612    609   for use in further calls. Please notice, that the <i class="m">xpathQuery</i> as
   613         -given as string is used as key for the cache. This means that equal
   614         -XPath expressions, which differ only in white space, are treated as
   615         -different cache entries. Special care is needed if the XPath
          610  +given as string is used as key for the cache. This means, that equal
          611  +XPath expressions, which differ only in white space are treated as
          612  +different cache entries. Special care is needed, if the XPath
   616    613   expression includes namespace prefixes or references to tcl variables.
   617    614   Both namespace prefixes and tcl variable references will be resolved
   618    615   according to the XML prefix namespace mappings and tcl variable values
   619    616   at expression compilation time. If the same XPath expression is used
   620    617   later on in a context with other XML prefix namespace mappings or
   621    618   values of the used tcl variables, make sure to first remove the
   622    619   compiled expression from the cache with the help of the
................................................................................
   675    672   from the cache, if it is there. The method always returns an
   676    673   empty string.</dd>
   677    674         
   678    675   
   679    676     </dl><p>Otherwise, if an unknown method name is given, the command with the
   680    677   same name as the given method within the namespace <tt class="samp">::dom::domDoc</tt> is
   681    678   tried to be executed. This allows quick method additions on Tcl level.</p><p>Newly created nodes are appended to a hidden fragment list. If they
   682         -are not moved into the tree they are automaticaly deleted as soon as the whole
          679  +are not moved into the tree they are automaticaly deleted, when the whole
   683    680   document gets deleted.</p>
   684    681   
   685         -    <h2><a name="SECTid0x1f7ab90">SEE ALSO</a></h2><p class="seealso">dom, domNode</p>
          682  +    <h2><a name="SECTid0xb75940">SEE ALSO</a></h2><p class="seealso">dom, domNode</p>
   686    683   
   687         -    <h2><a name="SECTid0x1f7af20">KEYWORDS</a></h2><p class="keywords">
          684  +    <h2><a name="SECTid0xb75cd0">KEYWORDS</a></h2><p class="keywords">
   688    685   <a class="keyword" href="keyword-index.html#KW-DOMnodecreation">DOM node creation</a>, <a class="keyword" href="keyword-index.html#KW-documentelement">document element</a>
   689    686   </p>
   690    687   
   691    688   </div><hr class="navsep"><div class="navbar" align="center">
   692         -<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
          689  +<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a>
   693    690   </div>
   694    691   </body>
   695    692   </html>

Changes to doc/domDoc.n.

   243    243   channelId.
   244    244   .PP
   245    245   If the option \fI-escapeNonASCII\fR is given,
   246    246   every non 7 bit ASCII character in attribute values or element
   247    247   PCDATA content will be escaped as character reference in
   248    248   decimal representation.
   249    249   .PP
   250         -The flag \fI-doctypeDeclaration\fR determines whether
   251         -there will be a DOCTYPE declaration emitted before the first
   252         -node of the document. The default is not to emit it. The
   253         -DOCTYPE name will always be the element name of the document
   254         -element. An external entity declaration of the external subset
   255         -is only emitted if the document has a system identifier.
          250  +The flag \fI-doctypeDeclaration\fR
          251  +determines, whether there will be a DOCTYPE declaration
          252  +emitted before the first node of the document. The default is,
          253  +to do not. The DOCTYPE name will always be the element name of
          254  +the document element. An external entity declaration of the
          255  +external subset is only emitted, if the document has a system
          256  +identifier.
   256    257   .PP
   257         -The flag \fI-xmlDeclaration\fR determines whether there
          258  +The flag \fI-xmlDeclaration\fR determines, whether there
   258    259   will be an XML Declaration and a newline emitted before
   259         -anything else. The default is not to emit one. If this flag is
          260  +anything else. The default is, to do not. If this flag is
   260    261   given with a true argument then
   261    262   .PP
   262    263   \&\fI-encString\fR sets the encoding value in the XML
   263         -Declaration. Otherwise this option is ignored. Please note
   264         -that this option just enhances the string representation of the
          264  +Declaration. Otherwise, this option is ignored. Please note,
          265  +that this option just enhance the string representation of the
   265    266   generated XML Declaration with an encoding information string,
   266    267   nothing more. It's up to the user to handle encoding in case
   267    268   of writing to a channel or reparsing.
   268    269   .PP
   269    270   If the option \fI-escapeAllQuot\fR is given,
   270    271   quotation marks will be escaped with &quot; even in text
   271    272   content of elements.
................................................................................
   273    274   If the option \fI-indentAttrs\fR is
   274    275   given, then attributes will each be separated with newlines
   275    276   and indented to the same level as the parent node plus the
   276    277   value given as argument to \fI-indentAttrs\fR (0..8).
   277    278   .RE
   278    279   .TP
   279    280   \&\fB\fBasHTML\fP \fB?-channel channelId?\fP \fB?-escapeNonASCII?\fP \fB?-htmlEntities?\fP \fB?-doctypeDeclaration <boolean>?\fP
   280         -\&\fRReturns the DOM tree serialized acording to HTML rules
   281         -(HTML elements are recognized regardless of case, without end
   282         -tags for emtpy HTML elements etc.) as string or sends the
   283         -output directly to the given channelId. If the option
   284         -\&\fI-escapeNonASCII\fR is given, every non 7 bit ASCII
   285         -character in attribute values or element PCDATA content will
   286         -be escaped as character reference in decimal representation.
   287         -If the option \fI-htmlEntities\fR is given, a character is
   288         -written using its HTML 4.01 character entity reference, if it
   289         -has one. If the flag \fI-doctypeDeclaration\fR is given there
   290         -will be a DOCTYPE declaration emitted before the first node of
   291         -the document. The default is, to do not. The DOCTYPE name will
   292         -always be the element name of the document element without
   293         -case normalization. An external entity declaration of the
   294         -external subset is only emitted, if the document has a system
   295         -identifier. The doctype declaration will be written from the
   296         -avaliable information, without check, if this is a known
   297         -(w3c) HTML version information or if the document confirms to
   298         -the given HTML version.
          281  +\&\fRReturns the DOM tree serialized acording to HTML rules (HTML
          282  +elements are recognized regardless of case, without end tags for emtpy HTML
          283  +elements etc.), as string or sends the output directly to the given
          284  +channelId. If the option \fI-escapeNonASCII\fR is given, every non 7 bit ASCII
          285  +character in attribute values or element PCDATA content will be escaped as
          286  +character reference in decimal representation. If the option
          287  +\&\fI-htmlEntities\fR is given, a character is outputed using a HTML 4.01
          288  +character entity reference, if one is defined for it. The flag
          289  +\&\fI-doctypeDeclaration\fR determines, whether there will be a DOCTYPE
          290  +declaration emitted before the first node of the document. The default is, to
          291  +do not. The DOCTYPE name will always be the element name of the document
          292  +element without case normalization. An external entity declaration of the
          293  +external subset is only emitted, if the document has a system identifier. The
          294  +doctype declaration will be written from the avaliable informations, without
          295  +check, if this is a known (w3c) HTML version information or if the document
          296  +confirms to the given HTML version.
   299    297   .TP
   300    298   \&\fB\fBasText\fP
   301         -\&\fRThe asText method returns the tree by serializing the
   302         -string-value of every text node in document order without
   303         -any escaping. In effect, this is what the xslt output method
          299  +\&\fRThe asText method outputs the result tree by outputting
          300  +the string-value of every text node in the result tree in document
          301  +order without any escaping. In effect, this is what the xslt output method
   304    302   "text" (XSLT 1.0 recommendation, section 16.3) does.
   305    303   .TP
   306    304   \&\fB\fBasJSON\fP \fB?-indent none/0..8?\fP \fB?-channel channelId?\fP
   307    305   \&\fR
   308    306   .RS
   309    307   .PP
   310    308   The asJSON method serializes the tree into a valid
   311         -JSON data string. In general, this may be a lossy
          309  +JSON data string. In general this may be a lossy
   312    310   serialization. For this serialization all comment, character
   313    311   data sections and processing instruction nodes, all
   314    312   attributes and all XML namespaces are ignored. Only element
   315    313   and text nodes may be reflected in the generated JSON
   316    314   serialization. Appropriate JSON data type information of a
   317    315   node will be respected.
   318    316   .PP
   319         -If an element node has the JSON type OBJECT, then every
   320         -element node child of this element will be serialized as
          317  +If an element node has the JSON type OBJECT then every
          318  +element node child of this element will be serializend as
   321    319   member of that object, with the node name of the child as
   322         -the member name and the relevant children of that child as
   323         -the value. Every other child nodes will be ignored.
          320  +the member name and the relevant childs of that child as the
          321  +value. Every other child nodes will be ignored.
   324    322   .PP
   325         -If an element node has the JSON type ARRAY, then the text
   326         -and element node children of that element node are serialized
   327         -as the consecutive values of the array. Element node children
          323  +If an element node has the JSON type ARRAY then the text
          324  +and element node childs of that element node are serialized
          325  +as the consecutive values of the array. Element node childs
   328    326   of an ARRAY element will be container nodes for nested ARRAY
   329    327   or OBJECT values.
   330    328   .PP
   331    329   Text nodes with the JSON types TRUE, FALSE or NULL will
   332    330   be serialized to the corresponding JSON token without
   333    331   looking at the value of the text node. A text node without
   334    332   JSON type will always be serialized as a JSON string token.
   335    333   A text node with JSON type NUMBER will be serialized as JSON
   336    334   number token if the text node value is in fact a valid JSON
   337    335   number and as a JSON string if not.
   338    336   .PP
   339    337   If an element node doesn't has a JSON type then the
   340         -serialization of its children is determined by the following
          338  +serialization of its childs is determined by the following
   341    339   rules:
   342    340   .PP
   343    341   Only text and element node child are relevant. If the
   344    342   element node to serialize is the member of a JSON object and
   345    343   there is no relevant child node the value of that member
   346    344   will be an empty JSON string. If the only relevant child
   347    345   node of this element node is a text node then the JSON
   348    346   value of that text node will be the value of the object
   349    347   member. If the element has more than one relevant child
   350    348   nodes and the first one is a text node then the relevant
   351         -children will be serialized as JSON array. If the only
          349  +childs will be serialized as JSON array. If the only
   352    350   relevant child node is an element node or the first relevant
   353    351   child is an element node and the node name of that only or
   354    352   first relevant child isn't equal to the array container node
   355         -name all element node children will be serialized as the
          353  +name all element node childs will be serialized as the
   356    354   members of a JSON object (while ignoring any intermixed text
   357    355   nodes). If the only or first relevant child is an element
   358    356   node and the node name of this child is equal to the array
   359         -container element name then all relevant children will be
          357  +container element name then all relevant childs will be
   360    358   serialized as the values of a JSON array.
   361    359   .PP
   362    360   If the element to serialize is a value of a JSON array
   363    361   and the node name of this element isn't equal to the array
   364         -container node name that element will be seen as a container
   365         -node for a JSON object and all element node children will be
   366         -serialized as the members of that array while ignoring any
   367         -text node children. If the element to serialize is a value of
   368         -a JSON array and the node name of this element is equal to
   369         -the array container node name, all relevant children will be
   370         -serialized as JSON array.
          362  +container node name that element will be seen as a
          363  +container node for a JSON object and all element node childs
          364  +will be serialized as the members of that array while
          365  +ignoring any text node childs. If the element to serialize
          366  +is a value of a JSON array and the node name of this element
          367  +is equal to the array container node name, all relevant
          368  +childs will be serialized as JSON array.
   371    369   .PP
   372    370   If the \fI-channel\fR option is given the serialization
   373    371   isn't returned as string but send directly to the channel,
   374    372   given as argument to the option.
   375    373   .PP
   376    374   If the \fI-indent\fR option is given and the argument
   377    375   given to this option isn't "none" then the returned JSON
................................................................................
   393    391   given to the method, the system identifier of the document is set to this
   394    392   value.
   395    393   .TP
   396    394   \&\fB\fBinternalSubset\fP \fI?internalSubset?\fB
   397    395   \&\fRReturns the internal subset of the doctype declaration of the
   398    396   document, if there is one, otherwise the empty string. If there is a value
   399    397   given to the method, the internal subset of the document is set to this
   400         -value. Note that none of the parsing methods preserve the internal subset
          398  +value. Note, that none of the parsing methods preserve the internal subset
   401    399   of a document; a freshly parsed document will always have an empty internal
   402    400   subset. Also note, that the method doesen't do any syntactical check on a
   403    401   given internal subset.
   404    402   .TP
   405    403   \&\fB\fBcdataSectionElements\fP \fI(?URI:?localname|*) ?<boolean>?\fB
   406         -\&\fRThis method allows to control for which element nodes
   407         -the text node children will be serialized as CDATA sections (this affects only
          404  +\&\fRThis method allows to control, for which element nodes
          405  +the text node childs will be serialized as CDATA sections (this affects only
   408    406   serialization with the asXML method, no text node is altered in any
   409    407   way by this method). IF the method is called with an element name as
   410    408   first argument and a boolean with value true as second argument, every
   411    409   text node child of every element node in the document with the same
   412    410   name as the first argument will be serialized as CDATA section. If the
   413    411   second argument is a boolean with value false, all text nodes of all
   414    412   elements with the same name as the first argument will be serialized
   415         -as usual. Namespaced element names have to be given in the form
          413  +as usual. Namespaced element names have to given in the form
   416    414   namespace_URI:localname, not in the otherwise usual prefix:localname
   417    415   form. With two arguments called, the method returns the used boolean
   418    416   value. If the method is called with only an element name, it will
   419         -return a boolean value, indicating that the text node children of all
          417  +return a boolean value, indicating, if the text nodes childs of all
   420    418   elements with that name in the document will be serialized as CDATA
   421    419   section elements (return value 1) or not (return value 0). If the
   422    420   method is called with only one argument and that argument is an
   423    421   asterisk ('*'), then the method returns an unordered list of all
   424         -element names of the document, for which the text node children will be
          422  +element names of the document, for which the text node childs will be
   425    423   serialized as CDATA section nodes.
   426    424   .TP
   427    425   \&\fB\fBselectNodesNamespaces\fP \fB?prefixUriList?\fP
   428    426   \&\fRThis method allows to control a document global prefix
   429         -to namespace URI mapping, which will be used for selectNodes
   430         -method calls (on document as well as on all nodes, which
   431         -belongs to the document) if it is not overwritten by using
   432         -the -namespaces option of the selectNodes method. Any
   433         -namespace prefix within an xpath expression will be first
   434         -resolved against this list. If the list binds the same prefix
   435         -to different namespaces, then the first binding will win. If a
   436         -prefix could not resolved against the document global prefix /
   437         -namespaces list, then the namespace definitions in scope of
   438         -the context node will be used to resolve the prefix, as usual.
   439         -If the optional argument \fIprefixUriList\fR is given, then
   440         -the global prefix / namespace list is set to this list and
   441         -returns it. Without the optional argument the method returns
   442         -the current list. The default is the empty list.
          427  +to namespace URI mapping, which will be used for selectNodes method
          428  +calls (on document as well as on all nodes, which belongs to the
          429  +document), if it is not overwritten by using the -namespaces option of
          430  +the selectNodes method. Any namespace prefix within an xpath
          431  +expression will be first resolved against this list. If the list bind
          432  +the same prefix to different namespaces, then the first binding will
          433  +win. If a prefix could not resolved against the document global prefix
          434  +/ namespaces list, then the namespace definitions in scope of the
          435  +context node will be used to resolve the prefix, as usual. If the
          436  +optional argument \fIprefixUriList\fR is given, then the global prefix /
          437  +namespace list is set to this list and returns it. Without
          438  +the optional argument the method returns the current list. The
          439  +default is the empty list.
   443    440   .TP
   444    441   \&\fB\fBxslt\fP \fB?-parameters parameterList?\fP \fB?-ignoreUndeclaredParameters?\fP \fB?-maxApplyDepth int?\fP \fB?-xsltmessagecmd script?\fP \fIstylesheet\fB \fI?outputVar?\fB
   445    442   \&\fRApplies an XSLT transformation on the whole document of the node
   446    443   object using the XSLT \fIstylesheet\fR (given as domDoc). Returns a document
   447    444   object containing the result document of the transformation and stores that
   448    445   document object in the optional \fIoutputVar\fR, if that was given.
   449    446   .RS
................................................................................
   451    448   The optional \fI-parameters\fR option sets top level
   452    449   <xsl:param> to string values. The \fIparameterList\fR has to be a tcl
   453    450   list consisting of parameter name and value pairs.
   454    451   .PP
   455    452   If the option \fI-ignoreUndeclaredParameters\fR is given, then parameter
   456    453   names in the \fIparameterList\fR given to the \fI-parameters\fR options that
   457    454   are not declared as top-level parameters in the stylesheet are silently
   458         -ignored. Without this option, an error is raised if the user tries to set a
   459         -top-level parameter that is not declared in the stylesheet.
          455  +ignored. Without this option, an error is raised, if the user tries to set a
          456  +top-level parameter, which is not declared in the stylesheet.
   460    457   .PP
   461    458   The option \fI-maxApplyDepth\fR expects a positiv integer as
   462    459   argument. By default, the xslt engine allows xslt templates to nest up
   463    460   to 3000 levels (and raises error if they nest deeper). This limit can
   464    461   be set by the \fI-maxApplyDepth\fR option.
   465    462   .PP
   466    463   The \fI-xsltmessagecmd\fR option sets a callback for xslt:message elements
................................................................................
   506    503   The optional \fI-parameters\fR option sets top level
   507    504   <xsl:param> to string values. The \fIparameterList\fR has to be a tcl
   508    505   list consisting of parameter name and value pairs.
   509    506   .PP
   510    507   If the option \fI-ignoreUndeclaredParameters\fR is given, then parameter
   511    508   names in the \fIparameterList\fR given to the \fI-parameters\fR options that
   512    509   are not declared as top-level parameters in the stylesheet are silently
   513         -ignored. Without this option, an error is raised if the user tries to set a
          510  +ignored. Without this option, an error is raised, if the user tries to set a
   514    511   top-level parameter, which is not declared in the stylesheet.
   515    512   .PP
   516    513   The option \fI-maxApplyDepth\fR expects a positiv integer as
   517    514   argument. By default, the xslt engine allows xslt templates to nest up
   518    515   to 3000 levels (and raises error if they nest deeper). This limit can
   519    516   be set by the \fI-maxApplyDepth\fR option.
   520    517   .PP
................................................................................
   574    571   \&\fRReturns a list of the top level nodes of the document.
   575    572   .TP
   576    573   \&\fB\fBownerDocument\fP \fB?domObjVar?\fP
   577    574   \&\fRReturns the document itself.
   578    575   .TP
   579    576   \&\fB\fBinsertBefore\fP \fInewChild\fB  \fIrefChild\fB
   580    577   \&\fRInsert \fInewChild\fR before the \fIrefChild\fR into the list of
   581         -top level nodes of the document. If \fIrefChild\fR is the empty string, inserts
          578  +top level nodes of the document. If \fIrefChild\fR is the empty string, insert
   582    579   \&\fInewChild\fR at the end of the top level nodes.
   583    580   .TP
   584    581   \&\fB\fBreplaceChild\fP \fInewChild\fB  \fIoldChild\fB
   585         -\&\fRReplaces \fIoldChild\fR with \fInewChild\fR in the list of
          582  +\&\fRReplace \fIoldChild\fR with \fInewChild\fR in the list of
   586    583   children of that node. The \fIoldChild\fR node will be part of the
   587    584   document fragment list after this operation.
   588    585   .TP
   589    586   \&\fB\fBappendFromList\fP \fIlist\fB
   590    587   \&\fRParses \fIlist\fR , creates an according DOM subtree and
   591    588   appends this subtree at the end of the current list of top level nodes of the document.
   592    589   .TP
................................................................................
   617    614   the xpath engine. Cast the value explicitly with the according xpath
   618    615   functions (number(), boolean()) to another data type, if needed.
   619    616   .PP
   620    617   The option \fI-namespaces\fR expects a tcl list with prefix /
   621    618   namespace pairs as argument. If this option is not given, then any
   622    619   namespace prefix within the xpath expression will be first resolved
   623    620   against the list of prefix / namespace pairs set with the
   624         -selectNodesNamespaces method for the document the node belongs to. If
          621  +selectNodesNamespaces method for the document, the node belongs to. If
   625    622   this fails, then the namespace definitions in scope of the context
   626    623   node will be used to resolve the prefix. If this option is given, any
   627    624   namespace prefix within the xpath expression will be first resolved
   628    625   against that given list (and ignoring the document global prefix /
   629         -namespace list). If the list binds the same prefix to different
          626  +namespace list). If the list bind the same prefix to different
   630    627   namespaces, then the first binding will win.  If this fails, then the
   631    628   namespace definitions in scope of the context node will be used to
   632    629   resolve the prefix, as usual.
   633    630   .PP
   634    631   If the \fI-cache\fR option is used with a true value, then the
   635    632   \&\fIxpathQuery\fR will be looked up in a document specific cache. If
   636    633   the query is found, then the stored pre-compiled query will be used.
   637    634   If the query isn't found, it will be compiled and stored in the cache,
   638    635   for use in further calls. Please notice, that the \fIxpathQuery\fR as
   639         -given as string is used as key for the cache. This means that equal
   640         -XPath expressions, which differ only in white space, are treated as
   641         -different cache entries. Special care is needed if the XPath
          636  +given as string is used as key for the cache. This means, that equal
          637  +XPath expressions, which differ only in white space are treated as
          638  +different cache entries. Special care is needed, if the XPath
   642    639   expression includes namespace prefixes or references to tcl variables.
   643    640   Both namespace prefixes and tcl variable references will be resolved
   644    641   according to the XML prefix namespace mappings and tcl variable values
   645    642   at expression compilation time. If the same XPath expression is used
   646    643   later on in a context with other XML prefix namespace mappings or
   647    644   values of the used tcl variables, make sure to first remove the
   648    645   compiled expression from the cache with the help of the
................................................................................
   689    686   empty string.
   690    687   .PP
   691    688   Otherwise, if an unknown method name is given, the command with the
   692    689   same name as the given method within the namespace \fB::dom::domDoc\fR is
   693    690   tried to be executed. This allows quick method additions on Tcl level.
   694    691   .PP
   695    692   Newly created nodes are appended to a hidden fragment list. If they
   696         -are not moved into the tree they are automaticaly deleted as soon as the whole
          693  +are not moved into the tree they are automaticaly deleted, when the whole
   697    694   document gets deleted.
   698    695   .SH "SEE ALSO"
   699    696   dom, domNode
   700    697   .SH KEYWORDS
   701    698   DOM node creation, document element

Changes to doc/domNode.html.

     1      1   <html>
     2      2   <head>
     3         -<link rel="stylesheet" href="manpage.css"><title>tDOM manual: domNode</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
            3  +<link rel="stylesheet" href="manpage.css"><title>tDOM manual: domNode</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $">
     4      4   </head><body>
     5      5   <div class="header">
     6      6   <div class="navbar" align="center">
     7         -<a href="#SECTid0x1fa3230">NAME</a> · <a href="#SECTid0x1e4dba0">SYNOPSIS</a> · <a href="#SECTid0x1f5bfd0"> DESCRIPTION </a> · <a href="#SECTid0x1f86500">SEE ALSO</a> · <a href="#SECTid0x1f86890">KEYWORDS</a>
            7  +<a href="#SECTid0xb275d0">NAME</a> · <a href="#SECTid0xb558b0">SYNOPSIS</a> · <a href="#SECTid0xad87e0"> DESCRIPTION </a> · <a href="#SECTid0xb81b10">SEE ALSO</a> · <a href="#SECTid0xb81ea0">KEYWORDS</a>
     8      8   </div><hr class="navsep">
     9      9   </div><div class="body">
    10         -  <h2><a name="SECTid0x1fa3230">NAME</a></h2><p class="namesection">
           10  +  <h2><a name="SECTid0xb275d0">NAME</a></h2><p class="namesection">
    11     11   <b class="names">domNode - </b><br>Manipulates an instance of a DOM node object</p>
    12     12   
    13     13   
    14     14   
    15         -  <h2><a name="SECTid0x1e4dba0">SYNOPSIS</a></h2><pre class="syntax"> $nodeObject <i class="m">method</i>  <i class="m">arg arg ...</i>
           15  +  <h2><a name="SECTid0xb558b0">SYNOPSIS</a></h2><pre class="syntax"> $nodeObject <i class="m">method</i>  <i class="m">arg arg ...</i>
    16     16   </pre>
    17         -  <h2><a name="SECTid0x1f5bfd0"> DESCRIPTION </a></h2><p>This command manipulates one particular instance of a DOM node object.
           17  +  <h2><a name="SECTid0xad87e0"> DESCRIPTION </a></h2><p>This command manipulates one particular instance of a DOM node object.
    18     18   <i class="m">method</i> indicates a specific method of the node class. These methods
    19     19   should closely conform to the W3C recommendation "Document Object Model
    20     20   (Core) Level 1" (<a href="http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html">http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html</a>)
    21     21   as well to parts of the W3C draft "XML Pointer Language (XPointer)"
    22     22   (<a href="http://www.w3.org/TR/1998/WD-xptr-19980303">http://www.w3.org/TR/1998/WD-xptr-19980303</a>).
    23     23   Please note, that the XPointer methods are deprecated. Use DOM methods
    24     24   or XPath expressions instead of them.</p><p>The selectNodes method implements the "XML Path
................................................................................
    51     51   optional argument <i class="m">newValue</i> is given, the node is set to that
    52     52   value.</dd>
    53     53   
    54     54         
    55     55   
    56     56         
    57     57           <dt><b class="method">hasChildNodes</b></dt>
    58         -        <dd>Returns 1 if the node has children. Otherwise 0 is returned.</dd>
           58  +        <dd>Returns 1 if the has children. Otherwise 0 is returned.</dd>
    59     59         
    60     60   
    61     61         
    62     62           <dt>
    63     63   <b class="method">parentNode</b> <b class="variable">?objVar?</b>
    64     64   </dt>
    65     65           <dd>Returns the parent node.</dd>
................................................................................
    73     73         
    74     74           <dt><b class="method">childNodesLive</b></dt>
    75     75           <dd>Returns a "live" nodeList object of the child nodes of
    76     76   the node in the sense of the DOM recommendation. This nodeList object is
    77     77   "live" in the sense that, for instance, changes to the children of
    78     78   the node object that it was created from are immediately reflected in the nodes
    79     79   returned by the NodeList accessors; it is not a static snapshot of the content
    80         -of the node. The two accessors known by the nodeList object are "item
           80  +of the node. The both accessors know by the nodeList object are "item
    81     81   &lt;index&gt;", which returns the indexth item in the collection, and
    82     82   "length", which returns the number of nodes in the list.</dd>
    83     83         
    84     84   
    85     85         
    86     86           <dt>
    87     87   <b class="method">firstChild</b> <b class="variable">?objVar?</b>
................................................................................
    96     96           <dd>Returns the last child as a node object.</dd>
    97     97         
    98     98         
    99     99         
   100    100           <dt>
   101    101   <b class="method">nextSibling</b>  <b class="variable">?objVar?</b>
   102    102   </dt>
   103         -        <dd>Returns the next sibling relative to the current node as a node
          103  +        <dd>Returns the next sibling relativ to the current node as a node
   104    104   object.</dd>
   105    105         
   106    106   
   107    107         
   108    108           <dt>
   109    109   <b class="method">previousSibling</b> <b class="variable">?objVar?</b>
   110    110   </dt>
   111         -        <dd>Returns the next sibling relative to the current node as a node
          111  +        <dd>Returns the next sibling relativ to the current node as a node
   112    112   object.</dd>
   113    113         
   114    114   
   115    115         
   116    116           <dt>
   117    117   <b class="method">getElementsByTagName</b> <i class="m">name</i>
   118    118   </dt>
................................................................................
   129    129   <i class="m">uri</i>.</dd>
   130    130         
   131    131   
   132    132         
   133    133           <dt>
   134    134   <b class="method">getElementById</b> <i class="m">id</i>
   135    135   </dt>
   136         -        <dd>Returns the node having an id attribute with value
   137         -<i class="m">id</i> or the emtpy string if no node has an id attribute with that value.</dd>
          136  +        <dd>Returns the node having a id attribute with value
          137  +<i class="m">id</i> or the emtpy string, if no node has an id attribute with that value.</dd>
   138    138         
   139    139   
   140    140         
   141    141           <dt>
   142    142   <b class="method">hasAttribute</b> <i class="m">attributeName</i>
   143    143   </dt>
   144    144           <dd>Returns 1 if the object node contains an attribute with name
................................................................................
   145    145   <i class="m">attributeName</i> . Otherwise 0 is returned.</dd>
   146    146         
   147    147   
   148    148         
   149    149           <dt>
   150    150   <b class="method">getAttribute</b> <i class="m">attributeName  ?defaultValue?</i>
   151    151   </dt>
   152         -        <dd>Returns the value of the attribute <i class="m">attributeName</i>. If the
          152  +        <dd>Returns the value of the attribute <i class="m">attributeName</i>. If
   153    153   attribute is not available <i class="m">defaultValue</i> is returned.</dd>
   154    154         
   155    155   
   156    156         
   157    157           <dt>
   158    158   <b class="method">setAttribute</b> <i class="m">attributeName newValue 
   159    159   ?attributeName newValue ...?</i>
   160    160   </dt>
   161    161           <dd>Sets the value for one or more attributes. Every
   162         -        <i class="m">attributeName</i> is set to the corresponding
   163         -        <i class="m">newValue</i>. If there isn't an attribute for one or more
   164         -        of the <i class="m">attributeName</i>, this will create that attribute.
   165         -        It is not recommended to set attributes that look like xml
   166         -        namespace declarations.</dd>
          162  +<i class="m">attributeName</i> is set to the corresponding <i class="m">newValue</i>. If there
          163  +isn't an attribute for one or more of the <i class="m">attributeName</i> this will
          164  +create that attribute.</dd>
          165  +
   167    166         
   168    167   
   169    168         
   170    169           <dt>
   171    170   <b class="method">removeAttribute</b> <i class="m">attributeName</i>
   172    171   </dt>
   173    172           <dd>Removes the attribute <i class="m">attributeName</i>.</dd>
................................................................................
   209    208           <pre class="example">$node setAttributeNS "http://some.uri.com/wow" prefix:attr1 attrValue</pre>
   210    209   
   211    210   <p>If the uri is the empty string and the attribute name hasn't a prefix, this
   212    211   method has the same effect as the method <b>setAttribute</b>.</p>
   213    212   
   214    213           <pre class="example">$node setAttributeNS "" attri "some Value"</pre>
   215    214   
   216         -<p>With the exceptions of the special prefixes "xmlns" and "xml" you
          215  +<p>XML namespace nodes are not in any namespace. Set them this way:</p>
          216  +
          217  +        <pre class="example">$node setAttributeNS "" xmlns:myprefix "myNamespaceURI"
          218  +$node setAttributeNS "" xmlns "newDefaultNamespace"</pre>
          219  +
          220  +<p>If your <i class="m">qualifiedName</i> has the prefix "xml" and you give the empty
          221  +string as <i class="m">uri</i>, the namespace of the attribute defaults to
          222  +"http://www.w3.org/XML/1998/namespace", as the DOM 2 recommendation
          223  +requests. With the exceptions of the special prefixes "xmlns" and "xml" you
   217    224   always must provide a non emtpy <i class="m">uri</i>, if your <i class="m">qualifiedName</i> has a
   218         -prefix. It is not recommended to set xml namespace declarations. The effects are complicated and not always obvious up to resulting a not well-formed serializations after further processing.</p>
   219         -</dd>
          225  +prefix.</p>
          226  +        </dd>
   220    227         
   221    228   
   222    229         
   223    230           <dt>
   224    231   <b class="method">removeAttributeNS</b> <i class="m">uri</i> <i class="m">localName</i>
   225    232   </dt>
   226    233           <dd>Removes the attribute with the local name <i class="m">localName</i> within
................................................................................
   228    235         
   229    236   
   230    237         
   231    238           <dt>
   232    239   <b class="method">attributes</b> <b class="option">?attributeNamePattern?</b>
   233    240   </dt>
   234    241           <dd>Returns all attributes matching the <i class="m">attributeNamePattern</i>.
   235         -If <i class="m">attributeNamePattern</i> isn't given, all attributes are returned as a Tcl
          242  +If <i class="m">attributeNamePattern</i> isn't given all attributes are returned as a Tcl
   236    243   list.</dd>
   237    244         
   238    245   
   239    246         
   240    247           <dt>
   241    248   <b class="method">appendChild</b> <i class="m">newChild</i>
   242    249   </dt>
   243         -        <dd>Appends <i class="m">newChild</i> to the end of the child list of the
          250  +        <dd>Append <i class="m">newChild</i> to the end of the child list of the
   244    251   node.</dd>
   245    252         
   246    253   
   247    254         
   248    255           <dt>
   249    256   <b class="method">insertBefore</b> <i class="m">newChild</i>  <i class="m">refChild</i>
   250    257   </dt>
   251         -        <dd>Inserts <i class="m">newChild</i> before the <i class="m">refChild</i> into the list of
          258  +        <dd>Insert <i class="m">newChild</i> before the <i class="m">refChild</i> into the list of
   252    259   children of node. If <i class="m">refChild</i> is the empty string, insert
   253    260   <i class="m">newChild</i> at the end of the child nodes list of that node.</dd>
   254    261         
   255    262   
   256    263         
   257    264           <dt>
   258    265   <b class="method">replaceChild</b> <i class="m">newChild</i>  <i class="m">oldChild</i>
   259    266   </dt>
   260         -        <dd>Replaces <i class="m">oldChild</i> with <i class="m">newChild</i> in the list of
          267  +        <dd>Replace <i class="m">oldChild</i> with <i class="m">newChild</i> in the list of
   261    268   children of that node. The <i class="m">oldChild</i> node will be part of the
   262    269   document fragment list after this operation.</dd>
   263    270         
   264    271   
   265    272         
   266    273           <dt>
   267    274   <b class="method">removeChild</b> <i class="m">child</i>
   268    275   </dt>
   269         -        <dd>Removes <i class="m">child</i> from the list of children of that node.
          276  +        <dd>Removes <i class="m">child</i> from the list of children of that node
   270    277   <i class="m">child</i> will be part of the document fragment list after this
   271         -operation.</dd>
          278  +operation. It is not physically deleted.</dd>
   272    279         
   273    280   
   274    281         
   275    282           <dt><b class="method">delete</b></dt>
   276    283           <dd>Deletes the given node and its complete child tree
   277    284   and frees the complete internal memory. The affected nodes are not accessible
   278    285   through the document fragment list.</dd>
................................................................................
   404    411   the XPath syntax to put an XPath variable. Ignoring the syntax rules of
   405    412   XPath the Tcl variable name may be any legal Tcl var name: local
   406    413   variables, global variables, array entries and so on. The value will
   407    414   always be seen as string literal by the xpath engine. Cast the value
   408    415   explicitly with the according xpath functions (number(), boolean()) to
   409    416   another data type, if needed.</p>
   410    417   
   411         -<p>Similar to the way described above to inject literals in a secure
          418  +<p>Simmilar to the above descibed way to inject literals in a secure
   412    419   way into the XPath expression using tcl variable references there is a
   413    420   syntax to inject element names from tcl variables. At every place
   414    421   where the XPath syntax allows a node test there could be a tcl
   415    422   variable reference (in any form), just the leading $ replaced with %.
   416    423   This allows to select nodes with 'strange' (invalid, according to the
   417    424   appropriate XML production rule) node names which may be needed in
   418    425   case of working with JSON data.</p>
................................................................................
   422    429   namespace prefix within the xpath expression will be first resolved
   423    430   against the list of prefix / namespace pairs set with the
   424    431   selectNodesNamespaces method for the document, the node belongs to. If
   425    432   this fails, then the namespace definitions in scope of the context
   426    433   node will be used to resolve the prefix. If this option is given, any
   427    434   namespace prefix within the xpath expression will be first resolved
   428    435   against that given list (and ignoring the document global prefix /
   429         -namespace list). If the list binds the same prefix to different
          436  +namespace list). If the list bind the same prefix to different
   430    437   namespaces, then the first binding will win.  If this fails, then the
   431    438   namespace definitions in scope of the context node will be used to
   432    439   resolve the prefix, as usual.</p>
   433    440   
   434    441   <p>If the <i class="m">-cache</i> option is used with a true value, then the
   435    442   <i class="m">xpathQuery</i> will be looked up in a document specific cache. If
   436    443   the query is found, then the stored pre-compiled query will be used.
   437    444   If the query isn't found, it will be compiled and stored in the cache,
   438         -for use in further calls. Please note that the <i class="m">xpathQuery</i> 
          445  +for use in further calls. Please notice, that the <i class="m">xpathQuery</i> as
   439    446   given as string is used as key for the cache. This means, that equal
   440    447   XPath expressions, which differ only in white space are treated as
   441    448   different cache entries. Special care is needed, if the XPath
   442    449   expression includes namespace prefixes or references to tcl variables.
   443    450   Both namespace prefixes and tcl variable references will be resolved
   444    451   according to the XML prefix namespace mappings and tcl variable values
   445    452   at expression compilation time. If the same XPath expression is used
................................................................................
   492    499           channelId.</p>
   493    500   
   494    501           <p>If the option <i class="m">-escapeNonASCII</i> is given,
   495    502           every non 7 bit ASCII character in attribute values or element
   496    503           PCDATA content will be escaped as character reference in
   497    504           decimal representation.</p>
   498    505   
   499         -        <p>The flag <i class="m">-xmlDeclaration</i> determines whether there
          506  +        <p>The flag <i class="m">-xmlDeclaration</i> determines, whether there
   500    507           will be an XML Declaration and a newline emitted before
   501    508           anything else. The default is, to do not. If this flag is
   502    509           given with a true argument then</p>
   503    510   
   504    511           <p>
   505    512   <i class="m">-encString</i> sets the encoding value in the XML
   506    513           Declaration. Otherwise, this option is ignored. Please note,
................................................................................
   529    536           <dd>Returns the DOM substree starting from the current node as the
   530    537   root node of the result serialized acording to HTML rules (HTML elements are
   531    538   recognized regardless of case, without end tags for emtpy HTML elements etc.),
   532    539   as string or sends the output directly to the given channelId. If the option
   533    540   <i class="m">-escapeNonASCII</i> is given, every non 7 bit ASCII character in attribute
   534    541   values or element PCDATA content will be escaped as character reference in
   535    542   decimal representation. If the option <i class="m">-htmlEntities</i> is given, a
   536         -character is written using its HTML 4.01 character entity reference, if one is
          543  +character is outputed using a HTML 4.01 character entity reference, if one is
   537    544   defined for it.</dd>
   538    545         
   539    546   
   540    547         
   541    548           <dt><b class="method">asText</b></dt>
   542    549             <dd>For ELEMENT_NODEs, the asText method outputs 
   543    550   the string-value of every text node descendant of node in document
................................................................................
   564    571   
   565    572         
   566    573           <dt>
   567    574   <b class="method">insertBeforeFromScript</b> <i class="m">tclScript</i> <i class="m">refChild</i>
   568    575   </dt>
   569    576           <dd>Inserts the nodes created in the <i class="m">tclScript</i> by
   570    577   Tcl functions, which have been built using <i class="m">dom createNodeCmd</i>, before the
   571         -<i class="m">refChild</i> into the list of children of node. If <i class="m">refChild</i> is
          578  +<i class="m">refChild</i> into to the list of children of node. If <i class="m">refChild</i> is
   572    579   the empty string, the new nodes will be appended.</dd>
   573    580         
   574    581   
   575    582         
   576    583           <dt>
   577    584   <b class="method">appendXML</b> <i class="m">XMLstring</i>
   578    585   </dt>
................................................................................
   581    588         
   582    589   
   583    590         
   584    591           <dt>
   585    592   <b class="method">simpleTranslate</b> <i class="m">outputVar</i>
   586    593   <i class="m">specifications</i>
   587    594   </dt>
   588         -        <dd>Translates the subtree starting at the object node according to
          595  +        <dd>Translate the subtree starting at the object node according to
   589    596   the specifications in <i class="m">specifications</i> and outputs the result in the
   590    597   variable <i class="m">outputVar</i> . The translation is very similar to Cost Simple
   591    598   mode.</dd>
   592    599         
   593    600   
   594    601         
   595    602           <dt>
................................................................................
   608    615         
   609    616   
   610    617         
   611    618           <dt>
   612    619   <b class="method">baseURI</b> <i class="m">?URI?</i>
   613    620   </dt>
   614    621           <dd>Returns the present baseURI of the node. If the optional 
   615         -argument URI is given, it sets the base URI of the node and of all of its child
          622  +argument URI is given, sets the base URI of the node and of all of its child
   616    623   nodes out of the same enitity as node to the given URI.</dd>
   617    624         
   618    625   
   619    626         
   620    627           <dt>
   621    628   <b class="method">disableOutputEscaping</b> <i class="m">?boolean?</i>
   622    629   </dt>
   623         -        <dd>This method works only for text nodes; for every other node it
          630  +        <dd>This method works only for text nodes; for every other nodes it
   624    631   returns error. Without the optional argument it returns, if disabling output
   625    632   escaping is on. The return value 0 means, the characters of the text node will
   626    633   be escaped, to generate valid XML, if serialized. This is the default for
   627    634   every parsed or created text node (with the exception of that text nodes in a
   628    635   result tree of an XSLT transformation, for which disabling output escaping was
   629    636   requested explicitely in the stylesheet). The return value 1 means, that output
   630    637   escaping is disabled for this text node. If such a text node is serialized
   631         -(with asXML or asHTML), it is literally written, without escaping of the
          638  +(with asXML or asHTML), it is literarily written, without escaping of the
   632    639   special XML characters. If the optional boolean value <i class="m">boolean</i> is given,
   633         -the flag is set accordingly. You should not set this flag to 1 until you
   634         -really know what you do.</dd>
          640  +the flag is set accordingly. You should not set this flag to 1, until you
          641  +really know, what you do.</dd>
   635    642         
   636    643   
   637    644         
   638    645           <dt>
   639    646   <b class="method">precedes</b> <i class="m">refnode</i>
   640    647   </dt>
   641    648           <dd>Compares the relative order of the node and <i class="m">refnode</i>. Both
   642    649   nodes must be part of the same documents and not out of the fragment list of
   643         -the document. Returns true if node is in document order (in the sense of the
   644         -XPath 1.0 recommendation) before <i class="m">refnode</i>, and false otherwise.</dd>
          650  +the document. Returns true, if node is in document order (in the sense of the
          651  +XPath 1.0 recommendation) before <i class="m">refnode</i> and false otherwise.</dd>
   645    652         
   646    653   
   647    654   
   648    655         
   649    656           <dt>
   650    657   <b class="method">normalize</b> <i class="m">?-forXPath?</i>
   651    658   </dt>
................................................................................
   674    681   <p>The optional <i class="m">-parameters</i> option sets top level
   675    682   &lt;xsl:param&gt; to string values. The <i class="m">parameterList</i> has to be a tcl
   676    683   list consisting of parameter name and value pairs.</p>
   677    684   
   678    685   <p>If the option <i class="m">-ignoreUndeclaredParameters</i> is given, then parameter
   679    686   names in the <i class="m">parameterList</i> given to the <i class="m">-parameters</i> options that
   680    687   are not declared as top-level parameters in the stylesheet are silently
   681         -ignored. Without this option, an error is raised if the user tries to set a
   682         -top-level parameter which is not declared in the stylesheet.</p>
          688  +ignored. Without this option, an error is raised, if the user tries to set a
          689  +top-level parameter, which is not declared in the stylesheet.</p>
   683    690   
   684         -<p>The option <i class="m">-maxApplyDepth</i> expects a positive integer as
          691  +<p>The option <i class="m">-maxApplyDepth</i> expects a positiv integer as
   685    692   argument. By default, the xslt engine allows xslt templates to nest up
   686    693   to 3000 levels (and raises error if they nest deeper). This limit can
   687    694   be set by the <i class="m">-maxApplyDepth</i> option.</p>
   688    695   
   689    696   <p>The <i class="m">-xsltmessagecmd</i> option sets a callback for xslt:message elements
   690    697   in the stylesheet. The actual command consists of the script, given as argument
   691    698   to the option, appended with the XML Fragment from instantiating the
   692    699   xsl:message element content as string (as if the XPath string() function would
   693         -have been applied to the XML Fragment) and a flag, which indicates wether the
          700  +have been applied to the XML Fragment) and a flag, which indicates, if the
   694    701   xsl:message has an attribute "terminate" with the value "yes". If the
   695    702   called script returns anything else then TCL_OK then the xslt
   696    703   transformation will be aborted, returning error. If the called script
   697         -returns -code break the error message is empty, otherwise the result
   698         -code is reported. In case of terminated transformation the outputVar,
          704  +returns -code break, the error message is empty, otherwise the result
          705  +code is reported. In case of terminated transformation, the outputVar,
   699    706   if given, is set to the empty string.</p>
   700    707   </dd>
   701    708         
   702    709   
   703    710         
   704    711           <dt><i class="m">@attrName</i></dt>
   705    712           <dd>Returns the value of the attribute <i class="m">attrName</i>.  Short cut
................................................................................
   721    728         
   722    729   
   723    730       </dl><p>Otherwise, if an unknown method name is given, the command with the same
   724    731   name as the given method within the namespace <tt class="l">::dom::domNode</tt> is tried to
   725    732   be executed. This allows quick method additions on Tcl level.</p>
   726    733   
   727    734   
   728         -  <h2><a name="SECTid0x1f86500">SEE ALSO</a></h2><p class="seealso">dom, domDoc</p>
          735  +  <h2><a name="SECTid0xb81b10">SEE ALSO</a></h2><p class="seealso">dom, domDoc</p>
   729    736     
   730         -  <h2><a name="SECTid0x1f86890">KEYWORDS</a></h2><p class="keywords">
          737  +  <h2><a name="SECTid0xb81ea0">KEYWORDS</a></h2><p class="keywords">
   731    738   <a class="keyword" href="keyword-index.html#KW-XML">XML</a>, <a class="keyword" href="keyword-index.html#KW-DOM">DOM</a>, <a class="keyword" href="keyword-index.html#KW-document">document</a>, <a class="keyword" href="keyword-index.html#KW-node">node</a>, <a class="keyword" href="keyword-index.html#KW-parsing">parsing</a>
   732    739   </p>
   733    740     
   734    741   </div><hr class="navsep"><div class="navbar" align="center">
   735         -<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
          742  +<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a>
   736    743   </div>
   737    744   </body>
   738    745   </html>

Changes to doc/domNode.n.

   200    200   the data for element nodes of type TEXT_NODE, COMMENT_NODE,
   201    201   PROCESSING_INSTRUCTION_NODE or CDATA_SECTION_NODE). Otherwise it is empty. If
   202    202   the node is a TEXT_NODE, COMMENT_NODE or PROCESSING_INSTRUCTION_NODE and the
   203    203   optional argument \fInewValue\fR is given, the node is set to that
   204    204   value.
   205    205   .TP
   206    206   \&\fB\fBhasChildNodes\fP
   207         -\&\fRReturns 1 if the node has children. Otherwise 0 is returned.
          207  +\&\fRReturns 1 if the has children. Otherwise 0 is returned.
   208    208   .TP
   209    209   \&\fB\fBparentNode\fP \fB?objVar?\fP
   210    210   \&\fRReturns the parent node.
   211    211   .TP
   212    212   \&\fB\fBchildNodes\fP
   213    213   \&\fRReturns a list of direct children node objects.
   214    214   .TP
   215    215   \&\fB\fBchildNodesLive\fP
   216    216   \&\fRReturns a "live" nodeList object of the child nodes of
   217    217   the node in the sense of the DOM recommendation. This nodeList object is
   218    218   "live" in the sense that, for instance, changes to the children of
   219    219   the node object that it was created from are immediately reflected in the nodes
   220    220   returned by the NodeList accessors; it is not a static snapshot of the content
   221         -of the node. The two accessors known by the nodeList object are "item
          221  +of the node. The both accessors know by the nodeList object are "item
   222    222   <index>", which returns the indexth item in the collection, and
   223    223   "length", which returns the number of nodes in the list.
   224    224   .TP
   225    225   \&\fB\fBfirstChild\fP \fB?objVar?\fP
   226    226   \&\fRReturns the first child as a node object.
   227    227   .TP
   228    228   \&\fB\fBlastChild\fP \fB?objVar?\fP
   229    229   \&\fRReturns the last child as a node object.
   230    230   .TP
   231    231   \&\fB\fBnextSibling\fP  \fB?objVar?\fP
   232         -\&\fRReturns the next sibling relative to the current node as a node
          232  +\&\fRReturns the next sibling relativ to the current node as a node
   233    233   object.
   234    234   .TP
   235    235   \&\fB\fBpreviousSibling\fP \fB?objVar?\fP
   236         -\&\fRReturns the next sibling relative to the current node as a node
          236  +\&\fRReturns the next sibling relativ to the current node as a node
   237    237   object.
   238    238   .TP
   239    239   \&\fB\fBgetElementsByTagName\fP \fIname\fB
   240    240   \&\fRReturns a list of all elements in the subtree matching (glob
   241    241   style) \fIname\fR.
   242    242   .TP
   243    243   \&\fB\fBgetElementsByTagNameNS\fP \fIuri\fB \fIlocalname\fB
   244    244   \&\fRReturns a list of all elements in the subtree
   245    245   matching (glob style) \fIlocalname\fR and having the given namespace
   246    246   \&\fIuri\fR.
   247    247   .TP
   248    248   \&\fB\fBgetElementById\fP \fIid\fB
   249         -\&\fRReturns the node having an id attribute with value
   250         -\&\fIid\fR or the emtpy string if no node has an id attribute with that value.
          249  +\&\fRReturns the node having a id attribute with value
          250  +\&\fIid\fR or the emtpy string, if no node has an id attribute with that value.
   251    251   .TP
   252    252   \&\fB\fBhasAttribute\fP \fIattributeName\fB
   253    253   \&\fRReturns 1 if the object node contains an attribute with name
   254    254   \&\fIattributeName\fR . Otherwise 0 is returned.
   255    255   .TP
   256    256   \&\fB\fBgetAttribute\fP \fIattributeName  ?defaultValue?\fB
   257         -\&\fRReturns the value of the attribute \fIattributeName\fR. If the
          257  +\&\fRReturns the value of the attribute \fIattributeName\fR. If
   258    258   attribute is not available \fIdefaultValue\fR is returned.
   259    259   .TP
   260    260   \&\fB\fBsetAttribute\fP \fIattributeName newValue  ?attributeName newValue ...?\fB
   261    261   \&\fRSets the value for one or more attributes. Every
   262         -\&\fIattributeName\fR is set to the corresponding
   263         -\&\fInewValue\fR. If there isn't an attribute for one or more
   264         -of the \fIattributeName\fR, this will create that attribute.
   265         -It is not recommended to set attributes that look like xml
   266         -namespace declarations.
          262  +\&\fIattributeName\fR is set to the corresponding \fInewValue\fR. If there
          263  +isn't an attribute for one or more of the \fIattributeName\fR this will
          264  +create that attribute.
   267    265   .TP
   268    266   \&\fB\fBremoveAttribute\fP \fIattributeName\fB
   269    267   \&\fRRemoves the attribute \fIattributeName\fR.
   270    268   .TP
   271    269   \&\fB\fBhasAttributeNS\fP \fIuri\fB \fIlocalName\fB
   272    270   \&\fRReturns 1 if the object node contains an attribute with the
   273    271   local name \fIlocalName\fR within the namespace \fIuri\fR.  Otherwise 0 is
................................................................................
   302    300   
   303    301   
   304    302           
   305    303   .CS
   306    304   $node setAttributeNS "" attri "some Value"
   307    305   .CE
   308    306   .PP
   309         -With the exceptions of the special prefixes "xmlns" and "xml" you
          307  +XML namespace nodes are not in any namespace. Set them this way:
          308  +
          309  +
          310  +        
          311  +.CS
          312  +$node setAttributeNS "" xmlns:myprefix "myNamespaceURI"
          313  +$node setAttributeNS "" xmlns "newDefaultNamespace"
          314  +.CE
          315  +.PP
          316  +If your \fIqualifiedName\fR has the prefix "xml" and you give the empty
          317  +string as \fIuri\fR, the namespace of the attribute defaults to
          318  +"http://www.w3.org/XML/1998/namespace", as the DOM 2 recommendation
          319  +requests. With the exceptions of the special prefixes "xmlns" and "xml" you
   310    320   always must provide a non emtpy \fIuri\fR, if your \fIqualifiedName\fR has a
   311         -prefix. It is not recommended to set xml namespace declarations. The effects are complicated and not always obvious up to resulting a not well-formed serializations after further processing.
          321  +prefix.
   312    322   .RE
   313    323   .TP
   314    324   \&\fB\fBremoveAttributeNS\fP \fIuri\fB \fIlocalName\fB
   315    325   \&\fRRemoves the attribute with the local name \fIlocalName\fR within
   316    326   the namespace \fIuri\fR.
   317    327   .TP
   318    328   \&\fB\fBattributes\fP \fB?attributeNamePattern?\fP
   319    329   \&\fRReturns all attributes matching the \fIattributeNamePattern\fR.
   320         -If \fIattributeNamePattern\fR isn't given, all attributes are returned as a Tcl
          330  +If \fIattributeNamePattern\fR isn't given all attributes are returned as a Tcl
   321    331   list.
   322    332   .TP
   323    333   \&\fB\fBappendChild\fP \fInewChild\fB
   324         -\&\fRAppends \fInewChild\fR to the end of the child list of the
          334  +\&\fRAppend \fInewChild\fR to the end of the child list of the
   325    335   node.
   326    336   .TP
   327    337   \&\fB\fBinsertBefore\fP \fInewChild\fB  \fIrefChild\fB
   328         -\&\fRInserts \fInewChild\fR before the \fIrefChild\fR into the list of
          338  +\&\fRInsert \fInewChild\fR before the \fIrefChild\fR into the list of
   329    339   children of node. If \fIrefChild\fR is the empty string, insert
   330    340   \&\fInewChild\fR at the end of the child nodes list of that node.
   331    341   .TP
   332    342   \&\fB\fBreplaceChild\fP \fInewChild\fB  \fIoldChild\fB
   333         -\&\fRReplaces \fIoldChild\fR with \fInewChild\fR in the list of
          343  +\&\fRReplace \fIoldChild\fR with \fInewChild\fR in the list of
   334    344   children of that node. The \fIoldChild\fR node will be part of the
   335    345   document fragment list after this operation.
   336    346   .TP
   337    347   \&\fB\fBremoveChild\fP \fIchild\fB
   338         -\&\fRRemoves \fIchild\fR from the list of children of that node.
          348  +\&\fRRemoves \fIchild\fR from the list of children of that node
   339    349   \&\fIchild\fR will be part of the document fragment list after this
   340         -operation.
          350  +operation. It is not physically deleted.
   341    351   .TP
   342    352   \&\fB\fBdelete\fP
   343    353   \&\fRDeletes the given node and its complete child tree
   344    354   and frees the complete internal memory. The affected nodes are not accessible
   345    355   through the document fragment list.
   346    356   .TP
   347    357   \&\fB\fBcloneNode\fP \fB?-deep?\fP
................................................................................
   415    425   the XPath syntax to put an XPath variable. Ignoring the syntax rules of
   416    426   XPath the Tcl variable name may be any legal Tcl var name: local
   417    427   variables, global variables, array entries and so on. The value will
   418    428   always be seen as string literal by the xpath engine. Cast the value
   419    429   explicitly with the according xpath functions (number(), boolean()) to
   420    430   another data type, if needed.
   421    431   .PP
   422         -Similar to the way described above to inject literals in a secure
          432  +Simmilar to the above descibed way to inject literals in a secure
   423    433   way into the XPath expression using tcl variable references there is a
   424    434   syntax to inject element names from tcl variables. At every place
   425    435   where the XPath syntax allows a node test there could be a tcl
   426    436   variable reference (in any form), just the leading $ replaced with %.
   427    437   This allows to select nodes with 'strange' (invalid, according to the
   428    438   appropriate XML production rule) node names which may be needed in
   429    439   case of working with JSON data.
................................................................................
   433    443   namespace prefix within the xpath expression will be first resolved
   434    444   against the list of prefix / namespace pairs set with the
   435    445   selectNodesNamespaces method for the document, the node belongs to. If
   436    446   this fails, then the namespace definitions in scope of the context
   437    447   node will be used to resolve the prefix. If this option is given, any
   438    448   namespace prefix within the xpath expression will be first resolved
   439    449   against that given list (and ignoring the document global prefix /
   440         -namespace list). If the list binds the same prefix to different
          450  +namespace list). If the list bind the same prefix to different
   441    451   namespaces, then the first binding will win.  If this fails, then the
   442    452   namespace definitions in scope of the context node will be used to
   443    453   resolve the prefix, as usual.
   444    454   .PP
   445    455   If the \fI-cache\fR option is used with a true value, then the
   446    456   \&\fIxpathQuery\fR will be looked up in a document specific cache. If
   447    457   the query is found, then the stored pre-compiled query will be used.
   448    458   If the query isn't found, it will be compiled and stored in the cache,
   449         -for use in further calls. Please note that the \fIxpathQuery\fR
          459  +for use in further calls. Please notice, that the \fIxpathQuery\fR as
   450    460   given as string is used as key for the cache. This means, that equal
   451    461   XPath expressions, which differ only in white space are treated as
   452    462   different cache entries. Special care is needed, if the XPath
   453    463   expression includes namespace prefixes or references to tcl variables.
   454    464   Both namespace prefixes and tcl variable references will be resolved
   455    465   according to the XML prefix namespace mappings and tcl variable values
   456    466   at expression compilation time. If the same XPath expression is used
................................................................................
   498    508   channelId.
   499    509   .PP
   500    510   If the option \fI-escapeNonASCII\fR is given,
   501    511   every non 7 bit ASCII character in attribute values or element
   502    512   PCDATA content will be escaped as character reference in
   503    513   decimal representation.
   504    514   .PP
   505         -The flag \fI-xmlDeclaration\fR determines whether there
          515  +The flag \fI-xmlDeclaration\fR determines, whether there
   506    516   will be an XML Declaration and a newline emitted before
   507    517   anything else. The default is, to do not. If this flag is
   508    518   given with a true argument then
   509    519   .PP
   510    520   \&\fI-encString\fR sets the encoding value in the XML
   511    521   Declaration. Otherwise, this option is ignored. Please note,
   512    522   that this option just enhance the string representation of the
................................................................................
   528    538   \&\fRReturns the DOM substree starting from the current node as the
   529    539   root node of the result serialized acording to HTML rules (HTML elements are
   530    540   recognized regardless of case, without end tags for emtpy HTML elements etc.),
   531    541   as string or sends the output directly to the given channelId. If the option
   532    542   \&\fI-escapeNonASCII\fR is given, every non 7 bit ASCII character in attribute
   533    543   values or element PCDATA content will be escaped as character reference in
   534    544   decimal representation. If the option \fI-htmlEntities\fR is given, a
   535         -character is written using its HTML 4.01 character entity reference, if one is
          545  +character is outputed using a HTML 4.01 character entity reference, if one is
   536    546   defined for it.
   537    547   .TP
   538    548   \&\fB\fBasText\fP
   539    549   \&\fRFor ELEMENT_NODEs, the asText method outputs
   540    550   the string-value of every text node descendant of node in document
   541    551   order without any escaping. For every other node type, this method outputs the
   542    552   the XPath string value of that node.
................................................................................
   549    559   \&\fRAppends the nodes created in the \fItclScript\fR by
   550    560   Tcl functions, which have been built using \fIdom createNodeCmd\fR, to the
   551    561   given node.
   552    562   .TP
   553    563   \&\fB\fBinsertBeforeFromScript\fP \fItclScript\fB \fIrefChild\fB
   554    564   \&\fRInserts the nodes created in the \fItclScript\fR by
   555    565   Tcl functions, which have been built using \fIdom createNodeCmd\fR, before the
   556         -\&\fIrefChild\fR into the list of children of node. If \fIrefChild\fR is
          566  +\&\fIrefChild\fR into to the list of children of node. If \fIrefChild\fR is
   557    567   the empty string, the new nodes will be appended.
   558    568   .TP
   559    569   \&\fB\fBappendXML\fP \fIXMLstring\fB
   560    570   \&\fRParses \fIXMLstring\fR, creates an according DOM subtree and
   561    571   appends this subtree to the current node.
   562    572   .TP
   563    573   \&\fB\fBsimpleTranslate\fP \fIoutputVar\fB \fIspecifications\fB
   564         -\&\fRTranslates the subtree starting at the object node according to
          574  +\&\fRTranslate the subtree starting at the object node according to
   565    575   the specifications in \fIspecifications\fR and outputs the result in the
   566    576   variable \fIoutputVar\fR . The translation is very similar to Cost Simple
   567    577   mode.
   568    578   .TP
   569    579   \&\fB\fBtoXPath\fP \fI?-legacy?\fB
   570    580   \&\fRReturns an XPath, which exactly addresses the given
   571    581   node in its document. This XPath is only valid as there are no changes to DOM
................................................................................
   574    584   .TP
   575    585   \&\fB\fBgetBaseURI\fP
   576    586   \&\fRReturns the baseURI of the node. This method is deprecated in
   577    587   favor of the \fIbaseURI\fR method.
   578    588   .TP
   579    589   \&\fB\fBbaseURI\fP \fI?URI?\fB
   580    590   \&\fRReturns the present baseURI of the node. If the optional
   581         -argument URI is given, it sets the base URI of the node and of all of its child
          591  +argument URI is given, sets the base URI of the node and of all of its child
   582    592   nodes out of the same enitity as node to the given URI.
   583    593   .TP
   584    594   \&\fB\fBdisableOutputEscaping\fP \fI?boolean?\fB
   585         -\&\fRThis method works only for text nodes; for every other node it
          595  +\&\fRThis method works only for text nodes; for every other nodes it
   586    596   returns error. Without the optional argument it returns, if disabling output
   587    597   escaping is on. The return value 0 means, the characters of the text node will
   588    598   be escaped, to generate valid XML, if serialized. This is the default for
   589    599   every parsed or created text node (with the exception of that text nodes in a
   590    600   result tree of an XSLT transformation, for which disabling output escaping was
   591    601   requested explicitely in the stylesheet). The return value 1 means, that output
   592    602   escaping is disabled for this text node. If such a text node is serialized
   593         -(with asXML or asHTML), it is literally written, without escaping of the
          603  +(with asXML or asHTML), it is literarily written, without escaping of the
   594    604   special XML characters. If the optional boolean value \fIboolean\fR is given,
   595         -the flag is set accordingly. You should not set this flag to 1 until you
   596         -really know what you do.
          605  +the flag is set accordingly. You should not set this flag to 1, until you
          606  +really know, what you do.
   597    607   .TP
   598    608   \&\fB\fBprecedes\fP \fIrefnode\fB
   599    609   \&\fRCompares the relative order of the node and \fIrefnode\fR. Both
   600    610   nodes must be part of the same documents and not out of the fragment list of
   601         -the document. Returns true if node is in document order (in the sense of the
   602         -XPath 1.0 recommendation) before \fIrefnode\fR, and false otherwise.
          611  +the document. Returns true, if node is in document order (in the sense of the
          612  +XPath 1.0 recommendation) before \fIrefnode\fR and false otherwise.
   603    613   .TP
   604    614   \&\fB\fBnormalize\fP \fI?-forXPath?\fB
   605    615   \&\fRPuts all Text nodes in the full depth of the sub-tree underneath
   606    616   this Node into a "normal" form where only structure (e.g., elements,
   607    617   comments, processing instructions and CDATA
   608    618   sections) separates Text nodes, i.e., there
   609    619   are neither adjacent Text nodes nor empty Text nodes. If the option
................................................................................
   621    631   The optional \fI-parameters\fR option sets top level
   622    632   <xsl:param> to string values. The \fIparameterList\fR has to be a tcl
   623    633   list consisting of parameter name and value pairs.
   624    634   .PP
   625    635   If the option \fI-ignoreUndeclaredParameters\fR is given, then parameter
   626    636   names in the \fIparameterList\fR given to the \fI-parameters\fR options that
   627    637   are not declared as top-level parameters in the stylesheet are silently
   628         -ignored. Without this option, an error is raised if the user tries to set a
   629         -top-level parameter which is not declared in the stylesheet.
          638  +ignored. Without this option, an error is raised, if the user tries to set a
          639  +top-level parameter, which is not declared in the stylesheet.
   630    640   .PP
   631         -The option \fI-maxApplyDepth\fR expects a positive integer as
          641  +The option \fI-maxApplyDepth\fR expects a positiv integer as
   632    642   argument. By default, the xslt engine allows xslt templates to nest up
   633    643   to 3000 levels (and raises error if they nest deeper). This limit can
   634    644   be set by the \fI-maxApplyDepth\fR option.
   635    645   .PP
   636    646   The \fI-xsltmessagecmd\fR option sets a callback for xslt:message elements
   637    647   in the stylesheet. The actual command consists of the script, given as argument
   638    648   to the option, appended with the XML Fragment from instantiating the
   639    649   xsl:message element content as string (as if the XPath string() function would
   640         -have been applied to the XML Fragment) and a flag, which indicates wether the
          650  +have been applied to the XML Fragment) and a flag, which indicates, if the
   641    651   xsl:message has an attribute "terminate" with the value "yes". If the
   642    652   called script returns anything else then TCL_OK then the xslt
   643    653   transformation will be aborted, returning error. If the called script
   644         -returns -code break the error message is empty, otherwise the result
   645         -code is reported. In case of terminated transformation the outputVar,
          654  +returns -code break, the error message is empty, otherwise the result
          655  +code is reported. In case of terminated transformation, the outputVar,
   646    656   if given, is set to the empty string.
   647    657   .RE
   648    658   .TP
   649    659   \&\fB\fI@attrName\fB
   650    660   \&\fRReturns the value of the attribute \fIattrName\fR.  Short cut
   651    661   for \fIgetAttribute\fR.
   652    662   .TP

Changes to doc/domNode.xml.

    64     64   optional argument <m>newValue</m> is given, the node is set to that
    65     65   value.</desc>
    66     66   
    67     67         </commanddef>
    68     68   
    69     69         <commanddef>
    70     70           <command><method>hasChildNodes</method></command>
    71         -        <desc>Returns 1 if the node has children. Otherwise 0 is returned.</desc>
           71  +        <desc>Returns 1 if the has children. Otherwise 0 is returned.</desc>
    72     72         </commanddef>
    73     73   
    74     74         <commanddef>
    75     75           <command><method>parentNode</method> <variable>?objVar?</variable></command>
    76     76           <desc>Returns the parent node.</desc>
    77     77         </commanddef>
    78     78   
................................................................................
    84     84         <commanddef>
    85     85           <command><method>childNodesLive</method></command>
    86     86           <desc>Returns a &quot;live&quot; nodeList object of the child nodes of
    87     87   the node in the sense of the DOM recommendation. This nodeList object is
    88     88   &quot;live&quot; in the sense that, for instance, changes to the children of
    89     89   the node object that it was created from are immediately reflected in the nodes
    90     90   returned by the NodeList accessors; it is not a static snapshot of the content
    91         -of the node. The two accessors known by the nodeList object are &quot;item
           91  +of the node. The both accessors know by the nodeList object are &quot;item
    92     92   &lt;index&gt;&quot;, which returns the indexth item in the collection, and
    93     93   &quot;length&quot;, which returns the number of nodes in the list.</desc>
    94     94         </commanddef>
    95     95   
    96     96         <commanddef>
    97     97           <command><method>firstChild</method> <variable>?objVar?</variable></command>
    98     98           <desc>Returns the first child as a node object.</desc>
................................................................................
   101    101         <commanddef>
   102    102           <command><method>lastChild</method> <variable>?objVar?</variable></command>
   103    103           <desc>Returns the last child as a node object.</desc>
   104    104         </commanddef>
   105    105         
   106    106         <commanddef>
   107    107           <command><method>nextSibling</method>  <variable>?objVar?</variable></command>
   108         -        <desc>Returns the next sibling relative to the current node as a node
          108  +        <desc>Returns the next sibling relativ to the current node as a node
   109    109   object.</desc>
   110    110         </commanddef>
   111    111   
   112    112         <commanddef>
   113    113           <command><method>previousSibling</method> <variable>?objVar?</variable></command>
   114         -        <desc>Returns the next sibling relative to the current node as a node
          114  +        <desc>Returns the next sibling relativ to the current node as a node
   115    115   object.</desc>
   116    116         </commanddef>
   117    117   
   118    118         <commanddef>
   119    119           <command><method>getElementsByTagName</method> <m>name</m></command>
   120    120           <desc>Returns a list of all elements in the subtree matching (glob
   121    121   style) <m>name</m>.</desc>
................................................................................
   126    126           <desc>Returns a list of all elements in the subtree
   127    127   matching (glob style) <m>localname</m> and having the given namespace
   128    128   <m>uri</m>.</desc>
   129    129         </commanddef>
   130    130   
   131    131         <commanddef>
   132    132           <command><method>getElementById</method> <m>id</m></command>
   133         -        <desc>Returns the node having an id attribute with value
   134         -<m>id</m> or the emtpy string if no node has an id attribute with that value.</desc>
          133  +        <desc>Returns the node having a id attribute with value
          134  +<m>id</m> or the emtpy string, if no node has an id attribute with that value.</desc>
   135    135         </commanddef>
   136    136   
   137    137         <commanddef>
   138    138           <command><method>hasAttribute</method> <m>attributeName</m></command>
   139    139           <desc>Returns 1 if the object node contains an attribute with name
   140    140   <m>attributeName</m> . Otherwise 0 is returned.</desc>
   141    141         </commanddef>
   142    142   
   143    143         <commanddef>
   144    144           <command><method>getAttribute</method> <m>attributeName  ?defaultValue?</m></command>
   145         -        <desc>Returns the value of the attribute <m>attributeName</m>. If the
          145  +        <desc>Returns the value of the attribute <m>attributeName</m>. If
   146    146   attribute is not available <m>defaultValue</m> is returned.</desc>
   147    147         </commanddef>
   148    148   
   149    149         <commanddef>
   150    150           <command><method>setAttribute</method> <m>attributeName newValue 
   151    151   ?attributeName newValue ...?</m></command>
   152    152           <desc>Sets the value for one or more attributes. Every
   153    153           <m>attributeName</m> is set to the corresponding
   154    154           <m>newValue</m>. If there isn't an attribute for one or more
   155         -        of the <m>attributeName</m>, this will create that attribute.
          155  +        of the <m>attributeName</m> this will create that attribute.
   156    156           It is not recommended to set attributes that look like xml
   157    157           namespace declarations.</desc>
          158  +
   158    159         </commanddef>
   159    160   
   160    161         <commanddef>
   161    162           <command><method>removeAttribute</method> <m>attributeName</m></command>
   162    163           <desc>Removes the attribute <m>attributeName</m>.</desc>
   163    164         </commanddef>
   164    165   
................................................................................
   206    207           <desc>Removes the attribute with the local name <m>localName</m> within
   207    208    the namespace <m>uri</m>.</desc>
   208    209         </commanddef>
   209    210   
   210    211         <commanddef>
   211    212           <command><method>attributes</method> <option>?attributeNamePattern?</option></command>
   212    213           <desc>Returns all attributes matching the <m>attributeNamePattern</m>.
   213         -If <m>attributeNamePattern</m> isn't given, all attributes are returned as a Tcl
          214  +If <m>attributeNamePattern</m> isn't given all attributes are returned as a Tcl
   214    215   list.</desc>
   215    216         </commanddef>
   216    217   
   217    218         <commanddef>
   218    219           <command><method>appendChild</method> <m>newChild</m></command>
   219         -        <desc>Appends <m>newChild</m> to the end of the child list of the
          220  +        <desc>Append <m>newChild</m> to the end of the child list of the
   220    221   node.</desc>
   221    222         </commanddef>
   222    223   
   223    224         <commanddef>
   224    225           <command><method>insertBefore</method> <m>newChild</m>  <m>refChild</m></command>
   225         -        <desc>Inserts <m>newChild</m> before the <m>refChild</m> into the list of
          226  +        <desc>Insert <m>newChild</m> before the <m>refChild</m> into the list of
   226    227   children of node. If <m>refChild</m> is the empty string, insert
   227    228   <m>newChild</m> at the end of the child nodes list of that node.</desc>
   228    229         </commanddef>
   229    230   
   230    231         <commanddef>
   231    232           <command><method>replaceChild</method> <m>newChild</m>  <m>oldChild</m></command>
   232         -        <desc>Replaces <m>oldChild</m> with <m>newChild</m> in the list of
          233  +        <desc>Replace <m>oldChild</m> with <m>newChild</m> in the list of
   233    234   children of that node. The <m>oldChild</m> node will be part of the
   234    235   document fragment list after this operation.</desc>
   235    236         </commanddef>
   236    237   
   237    238         <commanddef>
   238    239           <command><method>removeChild</method> <m>child</m></command>
   239         -        <desc>Removes <m>child</m> from the list of children of that node.
          240  +        <desc>Removes <m>child</m> from the list of children of that node
   240    241   <m>child</m> will be part of the document fragment list after this
   241         -operation.</desc>
          242  +operation. It is not physically deleted.</desc>
   242    243         </commanddef>
   243    244   
   244    245         <commanddef>
   245    246           <command><method>delete</method></command>
   246    247           <desc>Deletes the given node and its complete child tree
   247    248   and frees the complete internal memory. The affected nodes are not accessible
   248    249   through the document fragment list.</desc>
................................................................................
   353    354   the XPath syntax to put an XPath variable. Ignoring the syntax rules of
   354    355   XPath the Tcl variable name may be any legal Tcl var name: local
   355    356   variables, global variables, array entries and so on. The value will
   356    357   always be seen as string literal by the xpath engine. Cast the value
   357    358   explicitly with the according xpath functions (number(), boolean()) to
   358    359   another data type, if needed.</p>
   359    360   
   360         -<p>Similar to the way described above to inject literals in a secure
          361  +<p>Simmilar to the above descibed way to inject literals in a secure
   361    362   way into the XPath expression using tcl variable references there is a
   362    363   syntax to inject element names from tcl variables. At every place
   363    364   where the XPath syntax allows a node test there could be a tcl
   364    365   variable reference (in any form), just the leading $ replaced with %.
   365    366   This allows to select nodes with 'strange' (invalid, according to the
   366    367   appropriate XML production rule) node names which may be needed in
   367    368   case of working with JSON data.</p>
................................................................................
   371    372   namespace prefix within the xpath expression will be first resolved
   372    373   against the list of prefix / namespace pairs set with the
   373    374   selectNodesNamespaces method for the document, the node belongs to. If
   374    375   this fails, then the namespace definitions in scope of the context
   375    376   node will be used to resolve the prefix. If this option is given, any
   376    377   namespace prefix within the xpath expression will be first resolved
   377    378   against that given list (and ignoring the document global prefix /
   378         -namespace list). If the list binds the same prefix to different
          379  +namespace list). If the list bind the same prefix to different
   379    380   namespaces, then the first binding will win.  If this fails, then the
   380    381   namespace definitions in scope of the context node will be used to
   381    382   resolve the prefix, as usual.</p>
   382    383   
   383    384   <p>If the <m>-cache</m> option is used with a true value, then the
   384    385   <m>xpathQuery</m> will be looked up in a document specific cache. If
   385    386   the query is found, then the stored pre-compiled query will be used.
   386    387   If the query isn't found, it will be compiled and stored in the cache,
   387         -for use in further calls. Please note that the <m>xpathQuery</m> 
          388  +for use in further calls. Please notice, that the <m>xpathQuery</m> as
   388    389   given as string is used as key for the cache. This means, that equal
   389    390   XPath expressions, which differ only in white space are treated as
   390    391   different cache entries. Special care is needed, if the XPath
   391    392   expression includes namespace prefixes or references to tcl variables.
   392    393   Both namespace prefixes and tcl variable references will be resolved
   393    394   according to the XML prefix namespace mappings and tcl variable values
   394    395   at expression compilation time. If the same XPath expression is used
................................................................................
   438    439           channelId.</p>
   439    440   
   440    441           <p>If the option <m>-escapeNonASCII</m> is given,
   441    442           every non 7 bit ASCII character in attribute values or element
   442    443           PCDATA content will be escaped as character reference in
   443    444           decimal representation.</p>
   444    445   
   445         -        <p>The flag <m>-xmlDeclaration</m> determines whether there
          446  +        <p>The flag <m>-xmlDeclaration</m> determines, whether there
   446    447           will be an XML Declaration and a newline emitted before
   447    448           anything else. The default is, to do not. If this flag is
   448    449           given with a true argument then</p>
   449    450   
   450    451           <p><m>-encString</m> sets the encoding value in the XML
   451    452           Declaration. Otherwise, this option is ignored. Please note,
   452    453           that this option just enhance the string representation of the
................................................................................
   471    472           <desc>Returns the DOM substree starting from the current node as the
   472    473   root node of the result serialized acording to HTML rules (HTML elements are
   473    474   recognized regardless of case, without end tags for emtpy HTML elements etc.),
   474    475   as string or sends the output directly to the given channelId. If the option
   475    476   <m>-escapeNonASCII</m> is given, every non 7 bit ASCII character in attribute
   476    477   values or element PCDATA content will be escaped as character reference in
   477    478   decimal representation. If the option <m>-htmlEntities</m> is given, a
   478         -character is written using its HTML 4.01 character entity reference, if one is
          479  +character is outputed using a HTML 4.01 character entity reference, if one is
   479    480   defined for it.</desc>
   480    481         </commanddef>
   481    482   
   482    483         <commanddef>
   483    484           <command><method>asText</method></command>
   484    485             <desc>For ELEMENT_NODEs, the asText method outputs 
   485    486   the string-value of every text node descendant of node in document
................................................................................
   500    501   given node.</desc>
   501    502         </commanddef>
   502    503   
   503    504         <commanddef>
   504    505           <command><method>insertBeforeFromScript</method> <m>tclScript</m> <m>refChild</m></command>
   505    506           <desc>Inserts the nodes created in the <m>tclScript</m> by
   506    507   Tcl functions, which have been built using <m>dom createNodeCmd</m>, before the
   507         -<m>refChild</m> into the list of children of node. If <m>refChild</m> is
          508  +<m>refChild</m> into to the list of children of node. If <m>refChild</m> is
   508    509   the empty string, the new nodes will be appended.</desc>
   509    510         </commanddef>
   510    511   
   511    512         <commanddef>
   512    513           <command><method>appendXML</method> <m>XMLstring</m></command>
   513    514           <desc>Parses <m>XMLstring</m>, creates an according DOM subtree and
   514    515   appends this subtree to the current node.</desc>
   515    516         </commanddef>
   516    517   
   517    518         <commanddef>
   518    519           <command><method>simpleTranslate</method> <m>outputVar</m>
   519    520   <m>specifications</m></command>
   520         -        <desc>Translates the subtree starting at the object node according to
          521  +        <desc>Translate the subtree starting at the object node according to
   521    522   the specifications in <m>specifications</m> and outputs the result in the
   522    523   variable <m>outputVar</m> . The translation is very similar to Cost Simple
   523    524   mode.</desc>
   524    525         </commanddef>
   525    526   
   526    527         <commanddef>
   527    528           <command><method>toXPath</method> <m>?-legacy?</m></command>
................................................................................
   536    537           <desc>Returns the baseURI of the node. This method is deprecated in
   537    538             favor of the <m>baseURI</m> method.</desc>
   538    539         </commanddef>
   539    540   
   540    541         <commanddef>
   541    542           <command><method>baseURI</method> <m>?URI?</m></command>
   542    543           <desc>Returns the present baseURI of the node. If the optional 
   543         -argument URI is given, it sets the base URI of the node and of all of its child
          544  +argument URI is given, sets the base URI of the node and of all of its child
   544    545   nodes out of the same enitity as node to the given URI.</desc>
   545    546         </commanddef>
   546    547   
   547    548         <commanddef>
   548    549           <command><method>disableOutputEscaping</method> <m>?boolean?</m></command>
   549         -        <desc>This method works only for text nodes; for every other node it
          550  +        <desc>This method works only for text nodes; for every other nodes it
   550    551   returns error. Without the optional argument it returns, if disabling output
   551    552   escaping is on. The return value 0 means, the characters of the text node will
   552    553   be escaped, to generate valid XML, if serialized. This is the default for
   553    554   every parsed or created text node (with the exception of that text nodes in a
   554    555   result tree of an XSLT transformation, for which disabling output escaping was
   555    556   requested explicitely in the stylesheet). The return value 1 means, that output
   556    557   escaping is disabled for this text node. If such a text node is serialized
   557         -(with asXML or asHTML), it is literally written, without escaping of the
          558  +(with asXML or asHTML), it is literarily written, without escaping of the
   558    559   special XML characters. If the optional boolean value <m>boolean</m> is given,
   559         -the flag is set accordingly. You should not set this flag to 1 until you
   560         -really know what you do.</desc>
          560  +the flag is set accordingly. You should not set this flag to 1, until you
          561  +really know, what you do.</desc>
   561    562         </commanddef>
   562    563   
   563    564         <commanddef>
   564    565           <command><method>precedes</method> <m>refnode</m></command>
   565    566           <desc>Compares the relative order of the node and <m>refnode</m>. Both
   566    567   nodes must be part of the same documents and not out of the fragment list of
   567         -the document. Returns true if node is in document order (in the sense of the
   568         -XPath 1.0 recommendation) before <m>refnode</m>, and false otherwise.</desc>
          568  +the document. Returns true, if node is in document order (in the sense of the
          569  +XPath 1.0 recommendation) before <m>refnode</m> and false otherwise.</desc>
   569    570         </commanddef>
   570    571   
   571    572   
   572    573         <commanddef>
   573    574           <command><method>normalize</method> <m>?-forXPath?</m></command>
   574    575           <desc>Puts all Text nodes in the full depth of the sub-tree underneath
   575    576   this Node into a "normal" form where only structure (e.g., elements,
................................................................................
   594    595   <p>The optional <m>-parameters</m> option sets top level
   595    596   &lt;xsl:param&gt; to string values. The <m>parameterList</m> has to be a tcl
   596    597   list consisting of parameter name and value pairs.</p>
   597    598   
   598    599   <p>If the option <m>-ignoreUndeclaredParameters</m> is given, then parameter
   599    600   names in the <m>parameterList</m> given to the <m>-parameters</m> options that
   600    601   are not declared as top-level parameters in the stylesheet are silently
   601         -ignored. Without this option, an error is raised if the user tries to set a
   602         -top-level parameter which is not declared in the stylesheet.</p>
          602  +ignored. Without this option, an error is raised, if the user tries to set a
          603  +top-level parameter, which is not declared in the stylesheet.</p>
   603    604   
   604         -<p>The option <m>-maxApplyDepth</m> expects a positive integer as
          605  +<p>The option <m>-maxApplyDepth</m> expects a positiv integer as
   605    606   argument. By default, the xslt engine allows xslt templates to nest up
   606    607   to 3000 levels (and raises error if they nest deeper). This limit can
   607    608   be set by the <m>-maxApplyDepth</m> option.</p>
   608    609   
   609    610   <p>The <m>-xsltmessagecmd</m> option sets a callback for xslt:message elements
   610    611   in the stylesheet. The actual command consists of the script, given as argument
   611    612   to the option, appended with the XML Fragment from instantiating the
   612    613   xsl:message element content as string (as if the XPath string() function would
   613         -have been applied to the XML Fragment) and a flag, which indicates wether the
          614  +have been applied to the XML Fragment) and a flag, which indicates, if the
   614    615   xsl:message has an attribute "terminate" with the value "yes". If the
   615    616   called script returns anything else then TCL_OK then the xslt
   616    617   transformation will be aborted, returning error. If the called script
   617         -returns -code break the error message is empty, otherwise the result
   618         -code is reported. In case of terminated transformation the outputVar,
          618  +returns -code break, the error message is empty, otherwise the result
          619  +code is reported. In case of terminated transformation, the outputVar,
   619    620   if given, is set to the empty string.</p>
   620    621   </desc>
   621    622         </commanddef>
   622    623   
   623    624         <commanddef>
   624    625           <command><m>@attrName</m></command>
   625    626           <desc>Returns the value of the attribute <m>attrName</m>.  Short cut

Changes to doc/expat.html.

     1      1   <html>
     2      2   <head>
     3         -<link rel="stylesheet" href="manpage.css"><title>tDOM manual: expat</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
            3  +<link rel="stylesheet" href="manpage.css"><title>tDOM manual: expat</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $">
     4      4   </head><body>
     5      5   <div class="header">
     6      6   <div class="navbar" align="center">
     7         -<a href="#SECTid0x1f2bd90">NAME</a> · <a href="#SECTid0x1e4da40">SYNOPSIS</a> · <a href="#SECTid0x1f36860">DESCRIPTION</a> · <a href="#SECTid0x1f375a0">COMMAND OPTIONS</a> · <a href="#SECTid0x1f75430"> COMMAND METHODS </a> · <a href="#SECTid0x1f7f8a0">Callback Command Return Codes</a> · <a href="#SECTid0x1f80430">SEE ALSO</a> · <a href="#SECTid0x1f807f0">KEYWORDS</a>
            7  +<a href="#SECTid0x139ef10">NAME</a> · <a href="#SECTid0x13a60f0">SYNOPSIS</a> · <a href="#SECTid0x137dce0">DESCRIPTION</a> · <a href="#SECTid0x137ea20">COMMAND OPTIONS</a> · <a href="#SECTid0x13b9910"> COMMAND METHODS </a> · <a href="#SECTid0x13bfd70">Callback Command Return Codes</a> · <a href="#SECTid0x13c0900">SEE ALSO</a> · <a href="#SECTid0x13c0cc0">KEYWORDS</a>
     8      8   </div><hr class="navsep">
     9      9   </div><div class="body">
    10         -    <h2><a name="SECTid0x1f2bd90">NAME</a></h2><p class="namesection">
           10  +    <h2><a name="SECTid0x139ef10">NAME</a></h2><p class="namesection">
    11     11   <b class="names">expat - </b><br>Creates an instance of an expat parser object</p>
    12     12   
    13     13   
    14     14   
    15         -    <h2><a name="SECTid0x1e4da40">SYNOPSIS</a></h2><pre class="syntax">package require tdom
           15  +    <h2><a name="SECTid0x13a60f0">SYNOPSIS</a></h2><pre class="syntax">package require tdom
    16     16   
    17     17   <b class="cmd">expat</b> ?<i class="m">parsername</i>? ?<i class="m">-namespace</i>? ?<i class="m">arg arg ..</i>
    18     18   
    19     19   <b class="cmd">xml::parser</b> ?<i class="m">parsername</i>? ?<i class="m">-namespace</i>? ?<i class="m">arg arg ..</i>
    20     20   </pre>
    21         -    <h2><a name="SECTid0x1f36860">DESCRIPTION</a></h2><p>The parser created with <i class="m">expat</i> or <i class="m">xml::parser</i>
           21  +    <h2><a name="SECTid0x137dce0">DESCRIPTION</a></h2><p>The parser created with <i class="m">expat</i> or <i class="m">xml::parser</i>
    22     22   (which is just another name for the same command in an own namespace) are able
    23     23   to parse any kind of well-formed XML. The parsers are stream oriented XML
    24     24   parser. This means that you register handler scripts with the parser prior to
    25     25   starting the parse. These handler scripts are called when the parser discovers
    26     26   the associated structures in the document being parsed.  A start tag is an
    27     27   example of the kind of structures for which you may register a handler
    28     28   script.</p><p>The parsers do not validate the XML document. They do parse the internal DTD
................................................................................
    31     31   there).</p><p>Additionly, the Tcl extension code that implements this command provides an
    32     32   API for adding C level coded handlers. Up to now, there exists the parser
    33     33   extension command "tdom". The handler set installed by this extension build an
    34     34   in memory "tDOM" DOM tree, while the parser is parsing the input.</p><p>It is possible to register an arbitrary amount of different handler scripts
    35     35   and C level handlers for most of the events. If the event occurs, they are
    36     36   called in turn.</p>
    37     37   
    38         -    <h2><a name="SECTid0x1f375a0">COMMAND OPTIONS</a></h2><dl class="optlist">
           38  +    <h2><a name="SECTid0x137ea20">COMMAND OPTIONS</a></h2><dl class="optlist">
    39     39           
    40     40             <dt><b>-namespace</b></dt>
    41     41   
    42     42             <dd>
    43     43   <p>Enables namespace parsing. You must use this option while
    44     44   creating the parser with the <tt class="samp">expat</tt> or <tt class="samp">xml::parser</tt>
    45     45   command. You can't enable (nor disable) namespace parsing with
................................................................................
   611    611   -paramentityparsing value of "never" (which is the default) suppresses any call
   612    612   to the -externalentitycommand script. Pleace notice, that, if the document also
   613    613   doesn't have an internal subset, the -startdoctypedeclcommand and
   614    614   enddoctypedeclcommand scripts, if set, are not called.</dd>
   615    615           
   616    616   
   617    617         </dl>
   618         -    <h2><a name="SECTid0x1f75430"> COMMAND METHODS </a></h2><dl class="commandlist">
          618  +    <h2><a name="SECTid0x13b9910"> COMMAND METHODS </a></h2><dl class="commandlist">
   619    619           
   620    620             <dt>
   621    621   <b class="cmd">parser</b> <b class="method">configure</b> <i class="m">option value ?option value?</i>
   622    622   </dt>
   623    623   
   624    624             <dd><p>Sets configuration options for the parser. Every command
   625    625   option, except <i class="m">-namespace</i> can be set or modified with this method.</p></dd>
................................................................................
   762    762             <dd><p>Resets the parser in preparation for parsing another
   763    763   document. A parser cannot be reseted from within one of its handler callbacks
   764    764   (neither directly nor indirectly) and will raise a tcl error in this
   765    765   cases.</p></dd>
   766    766           
   767    767         </dl>
   768    768   
   769         -    <h2><a name="SECTid0x1f7f8a0">Callback Command Return Codes</a></h2><p>A script invoked for any of the parser callback commands, such as
          769  +    <h2><a name="SECTid0x13bfd70">Callback Command Return Codes</a></h2><p>A script invoked for any of the parser callback commands, such as
   770    770   -elementstartcommand, -elementendcommand, etc, may return an error code other
   771    771   than "ok" or "error". All callbacks may in addition return
   772    772   "break" or "continue".</p><p>If a callback script returns an "error" error code then
   773    773   processing of the document is terminated and the error is propagated in the
   774    774   usual fashion.</p><p>If a callback script returns a "break" error code then all
   775    775   further processing of every handler script out of this Tcl handler set is
   776    776   suppressed for the further parsing. This does not influence any other handler
   777    777   set.</p><p>If a callback script returns a "continue" error code then
   778    778   processing of the current element, and its children, ceases for every handler
   779    779   script out of this Tcl handler set and processing continues with the next
   780    780   (sibling) element. This does not influence any other handler set.</p><p>If a callback script returns a "return" error
   781    781   code then parsing is canceled altogether, but no error is raised.</p>
   782    782   
   783         -    <h2><a name="SECTid0x1f80430">SEE ALSO</a></h2><p class="seealso">
          783  +    <h2><a name="SECTid0x13c0900">SEE ALSO</a></h2><p class="seealso">
   784    784   <a href="expatapi.html">expatapi</a>, <a href="tdomcmd.html">tdom</a>
   785    785   </p>
   786    786   
   787         -    <h2><a name="SECTid0x1f807f0">KEYWORDS</a></h2><p class="keywords"><a class="keyword" href="keyword-index.html#KW-SAX">SAX</a></p>
          787  +    <h2><a name="SECTid0x13c0cc0">KEYWORDS</a></h2><p class="keywords"><a class="keyword" href="keyword-index.html#KW-SAX">SAX</a></p>
   788    788     </div><hr class="navsep"><div class="navbar" align="center">
   789         -<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
          789  +<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a>
   790    790   </div>
   791    791   </body>
   792    792   </html>

Changes to doc/expatapi.html.

     1      1   <html>
     2      2   <head>
     3         -<link rel="stylesheet" href="manpage.css"><title>tDOM manual: expatapi</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
            3  +<link rel="stylesheet" href="manpage.css"><title>tDOM manual: expatapi</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $">
     4      4   </head><body>
     5      5   <div class="header">
     6      6   <div class="navbar" align="center">
     7         -<a href="#SECTid0x1fa3230">NAME</a> · <a href="#SECTid0x1f5add0">SYNOPSIS</a> · <a href="#SECTid0x1f1ee50">ARGUMENTS</a> · <a href="#SECTid0x1f20f10">DESCRIPTION</a> · <a href="#SECTid0x1f2e6c0">SEE ALSO</a> · <a href="#SECTid0x1f2e960">KEYWORDS</a>
            7  +<a href="#SECTid0x139c8b0">NAME</a> · <a href="#SECTid0x13eb870">SYNOPSIS</a> · <a href="#SECTid0x137b620">ARGUMENTS</a> · <a href="#SECTid0x137d6e0">DESCRIPTION</a> · <a href="#SECTid0x13b1f40">SEE ALSO</a> · <a href="#SECTid0x13b21e0">KEYWORDS</a>
     8      8   </div><hr class="navsep">
     9      9   </div><div class="body">
    10         -    <h2><a name="SECTid0x1fa3230">NAME</a></h2><p class="namesection">
           10  +    <h2><a name="SECTid0x139c8b0">NAME</a></h2><p class="namesection">
    11     11   <b class="names">CheckExpatParserObj, CHandlerSetInstall, CHandlerSetRemove,
    12     12            CHandlerSetCreate, CHandlerSetGetUserData, GetExpatInfo - </b><br>Functions to create, install and remove expat parser object
    13     13   extensions.</p>
    14         -  <h2><a name="SECTid0x1f5add0">SYNOPSIS</a></h2><pre class="syntax">#include &lt;tclexpat.h&gt;
           14  +  <h2><a name="SECTid0x13eb870">SYNOPSIS</a></h2><pre class="syntax">#include &lt;tclexpat.h&gt;
    15     15   
    16     16   int 
    17     17   <b class="fun">CheckExpatParserObj</b> (<a href="#ARG-interp"><i>interp</i></a>, <a href="#ARG-nameObj"><i>nameObj</i></a>)  
    18     18   
    19     19   int
    20     20   <b class="fun">CHandlerSetInstall</b> (<a href="#ARG-interp"><i>interp</i></a>, <a href="#ARG-expatObj"><i>expatObj</i></a>, <a href="#ARG-handlerSet"><i>handlerSet</i></a>)
    21     21   
................................................................................
    31     31   void*
    32     32   <b class="fun">CHandlerSetGetUserData</b> (<a href="#ARG-interp"><i>interp</i></a>, <a href="#ARG-expatObj"><i>expatObj</i></a>, <a href="#ARG-handlerSetName"><i>handlerSetName</i></a>)
    33     33   
    34     34   TclGenExpatInfo*
    35     35   <b class="fun">GetExpatInfo</b> (<a href="#ARG-interp"><i>interp</i></a>, <a href="#ARG-expatObj"><i>expatObj</i></a>)
    36     36   </pre>
    37     37   
    38         -  <h2><a name="SECTid0x1f1ee50">ARGUMENTS</a></h2><div class="arglist"><table width="100%" rules="none" cellpadding="5%">
           38  +  <h2><a name="SECTid0x137b620">ARGUMENTS</a></h2><div class="arglist"><table width="100%" rules="none" cellpadding="5%">
    39     39   <thead><tr class="heading">
    40     40   <th width="20%">Type</th><th width="70%">Name</th><th width="10%">Mode</th>
    41     41   </tr></thead><tr class="syntax">
    42     42   <td class="type" width="20%" align="left">Tcl_Interp</td><td class="name" width="70%" align="left"><a name="ARG-interp">*interp</a></td><td class="mode" width="10%" align="center">in</td>
    43     43   </tr><tr class="desc">
    44     44   <td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">Interpreter with the expat parser object.</td>
    45     45   </tr><tr class="syntax">
................................................................................
    57     57   </tr><tr class="syntax">
    58     58   <td class="type" width="20%" align="left">Tcl_Obj</td><td class="name" width="70%" align="left"><a name="ARG-nameObj">*nameObj</a></td><td class="mode" width="10%" align="center"></td>
    59     59   </tr><tr class="desc">
    60     60   <td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">A Tcl Object containing the name of a expat parser object</td>
    61     61   </tr>
    62     62   </table></div>
    63     63   
    64         -  <h2><a name="SECTid0x1f20f10">DESCRIPTION</a></h2><p>The functions described in this manual allows to add C level coded event
           64  +  <h2><a name="SECTid0x137d6e0">DESCRIPTION</a></h2><p>The functions described in this manual allows to add C level coded event
    65     65   handler to an tDOM Tcl expat parser objects. A tDOM Tcl expat parser object is
    66     66   able to have several Tcl scripts and C functions associated with an specific
    67     67   event. If the event occurs, first the Tcl scripts then the C functions
    68     68   associated with the event are called in turn.</p><p>A tDOM Tcl expat parser extension is an ordinary Tcl extension and loaded
    69     69   like every other Tcl extension. It must install at least one new Tcl Level
    70     70   command, that manipulates a tDOM Tcl expat parser object.</p><p>A C level handler set is a data structure like this:</p><pre class="example">
    71     71   typedef struct CHandlerSet {
................................................................................
   195    195   TclGenExpatInfo structure of the tDOM Tcl expat parser object
   196    196   <i class="m">expatObj</i>. The <i class="m">expatObj</i> has to be a tDOM Tcl expat parser object
   197    197   in the interpreter <i class="m">interp</i>. This is most useful, to set the application
   198    198   status of the parser object.</p><p>See the simple but full functionally example in the extensions/example
   199    199   dir or the more complex example tnc in the extensions/tnc dir (a simple DTD
   200    200   validation extension).</p>
   201    201   
   202         -  <h2><a name="SECTid0x1f2e6c0">SEE ALSO</a></h2><p class="seealso">expat</p>
          202  +  <h2><a name="SECTid0x13b1f40">SEE ALSO</a></h2><p class="seealso">expat</p>
   203    203   
   204         -  <h2><a name="SECTid0x1f2e960">KEYWORDS</a></h2><p class="keywords"><a class="keyword" href="keyword-index.html#KW-Chandlerset">C handler set</a></p>
          204  +  <h2><a name="SECTid0x13b21e0">KEYWORDS</a></h2><p class="keywords"><a class="keyword" href="keyword-index.html#KW-Chandlerset">C handler set</a></p>
   205    205   </div><hr class="navsep"><div class="navbar" align="center">
   206         -<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
          206  +<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a>
   207    207   </div>
   208    208   </body>
   209    209   </html>

Changes to doc/index.html.

     1      1   <html>
     2      2   <head>
     3         -<title>tDOM manual</title><link rel="stylesheet" href="manpage.css"><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: master-index.xsl,v $ $Revision: 1.6 $"><meta charset="utf-8">
            3  +<title>tDOM manual</title><link rel="stylesheet" href="manpage.css"><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: master-index.xsl,v $ $Revision: 1.6 $">
     4      4   </head><body>
     5      5   <div class="header">
     6      6   <h1 class="title" align="center">tDOM manual: Contents</h1><p class="navaid" align="center">
     7         -<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
            7  +<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a>
     8      8   </p><hr class="navsep">
     9      9   </div><div class="body"><ul class="toc">
    10     10   <li class="tocentry"><a href="dom.html">dom - Create an in-memory DOM tree from XML</a></li><li class="tocentry"><a href="domDoc.html">domDoc - Manipulates an instance of a DOM document object</a></li><li class="tocentry"><a href="domNode.html">domNode - Manipulates an instance of a DOM node object</a></li><li class="tocentry"><a href="expat.html">expat - Creates an instance of an expat parser object</a></li><li class="tocentry"><a href="expatapi.html">expatapi - Functions to create, install and remove expat parser object
    11     11   extensions.</a></li><li class="tocentry"><a href="tdomcmd.html">tdom - tdom is an expat parser object extension to create an in-memory
    12     12   DOM tree from the input while parsing.</a></li><li class="tocentry"><a href="tnc.html">tnc - tnc is an expat parser object extension, that validates the XML
    13     13   stream against the document DTD while parsing.</a></li>
    14     14   </ul></div><div class="footer">
    15     15   <hr class="navsep"><div class="navbar" align="center">
    16         -<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
           16  +<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a>
    17     17   </div>
    18     18   </div>
    19     19   </body>
    20     20   </html>

Changes to doc/keyword-index.html.

     1      1   <html>
     2      2   <head>
     3         -<title>tDOM manual: Keyword Index</title><link rel="stylesheet" href="manpage.css"><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: make-keywords.xsl,v $ $Revision: 1.5 $"><meta charset="utf-8">
            3  +<title>tDOM manual: Keyword Index</title><link rel="stylesheet" href="manpage.css"><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: make-keywords.xsl,v $ $Revision: 1.5 $">
     4      4   </head><body>
     5      5   <div class="header">
     6      6   <h1 class="title" align="center">tDOM manual: Keywords</h1><p class="navaid" align="center">
     7         -<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
            7  +<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a>
     8      8   </p><hr class="navsep"><div class="navbar">
     9         -<a href="#KEYWORDS-C">C</a> · <a href="#KEYWORDS-D">D</a> · <a href="#KEYWORDS-E">E</a> · <a href="#KEYWORDS-N">N</a> · <a href="#KEYWORDS-P">P</a> · <a href="#KEYWORDS-S">S</a> · <a href="#KEYWORDS-T">T</a> · <a href="#KEYWORDS-V">V</a> · <a href="#KEYWORDS-X">X</a> · </div>
            9  +<a href="#KEYWORDS-C">C</a> · <a href="#KEYWORDS-D">D</a> · <a href="#KEYWORDS-E">E</a> · <a href="#KEYWORDS-N">N</a> · <a href="#KEYWORDS-P">P</a> · <a href="#KEYWORDS-S">S</a> · <a href="#KEYWORDS-T">T</a> · <a href="#KEYWORDS-V">V</a> · <a href="#KEYWORDS-X">X</a> · </div>
    10     10   </div><div class="body"><div class="table"><table width="100%">
    11     11   <tr class="header"><th colspan="2"><a name="KEYWORDS-C">Keywords: C</a></th></tr><tr class="row1">
    12     12   <td width="35%"><a name="KW-Chandlerset">C handler set</a></td><td width="65%">
    13         -<a href="expatapi.html">expatapi</a> · <a href="tdomcmd.html">tdom</a>
           13  +<a href="expatapi.html">expatapi</a> · <a href="tdomcmd.html">tdom</a>
    14     14   </td>
    15     15   </tr><tr class="row0">
    16     16   <td width="35%"><a name="KW-CheckExpatParserObj,CHandlerSetInstall,CHandlerSetRemove,CHandlerSetCreate,CHandlerSetGetUserData,GetExpatInfo">CheckExpatParserObj, CHandlerSetInstall, CHandlerSetRemove,
    17     17            CHandlerSetCreate, CHandlerSetGetUserData, GetExpatInfo</a></td><td width="65%"><a href="expatapi.html">expatapi</a></td>
    18     18   </tr><tr class="header"><th colspan="2"><a name="KEYWORDS-D">Keywords: D</a></th></tr><tr class="row1">
    19     19   <td width="35%"><a name="KW-document">document</a></td><td width="65%">
    20         -<a href="dom.html">dom</a> · <a href="domNode.html">domNode</a>
           20  +<a href="dom.html">dom</a> · <a href="domNode.html">domNode</a>
    21     21   </td>
    22     22   </tr><tr class="row0">
    23     23   <td width="35%"><a name="KW-documentelement">document element</a></td><td width="65%"><a href="domDoc.html">domDoc</a></td>
    24     24   </tr><tr class="row1">
    25     25   <td width="35%"><a name="KW-dom">dom</a></td><td width="65%">
    26         -<a href="dom.html">dom</a> · <a href="domNode.html">domNode</a> · <a href="tdomcmd.html">tdom</a>
           26  +<a href="dom.html">dom</a> · <a href="domNode.html">domNode</a> · <a href="tdomcmd.html">tdom</a>
    27     27   </td>
    28     28   </tr><tr class="row0">
    29     29   <td width="35%"><a name="KW-DOMnodecreation">DOM node creation</a></td><td width="65%"><a href="domDoc.html">domDoc</a></td>
    30     30   </tr><tr class="row1">
    31     31   <td width="35%"><a name="KW-domDoc">domDoc</a></td><td width="65%"><a href="domDoc.html">domDoc</a></td>
    32     32   </tr><tr class="row0">
    33     33   <td width="35%"><a name="KW-domNode">domNode</a></td><td width="65%"><a href="domNode.html">domNode</a></td>
................................................................................
    35     35   <td width="35%"><a name="KW-DTD">DTD</a></td><td width="65%"><a href="tnc.html">tnc</a></td>
    36     36   </tr><tr class="header"><th colspan="2"><a name="KEYWORDS-E">Keywords: E</a></th></tr><tr class="row0">
    37     37   <td width="35%"><a name="KW-expat">expat</a></td><td width="65%"><a href="expat.html">expat</a></td>
    38     38   </tr><tr class="row1">
    39     39   <td width="35%"><a name="KW-expatapi">expatapi</a></td><td width="65%"><a href="expatapi.html">expatapi</a></td>
    40     40   </tr><tr class="header"><th colspan="2"><a name="KEYWORDS-N">Keywords: N</a></th></tr><tr class="row0">
    41     41   <td width="35%"><a name="KW-node">node</a></td><td width="65%">
    42         -<a href="dom.html">dom</a> · <a href="domNode.html">domNode</a>
           42  +<a href="dom.html">dom</a> · <a href="domNode.html">domNode</a>
    43     43   </td>
    44     44   </tr><tr class="header"><th colspan="2"><a name="KEYWORDS-P">Keywords: P</a></th></tr><tr class="row1">
    45     45   <td width="35%"><a name="KW-parsing">parsing</a></td><td width="65%">
    46         -<a href="dom.html">dom</a> · <a href="domNode.html">domNode</a>
           46  +<a href="dom.html">dom</a> · <a href="domNode.html">domNode</a>
    47     47   </td>
    48     48   </tr><tr class="header"><th colspan="2"><a name="KEYWORDS-S">Keywords: S</a></th></tr><tr class="row0">
    49     49   <td width="35%"><a name="KW-SAX">SAX</a></td><td width="65%">
    50         -<a href="expat.html">expat</a> · <a href="tdomcmd.html">tdom</a>
           50  +<a href="expat.html">expat</a> · <a href="tdomcmd.html">tdom</a>
    51     51   </td>
    52     52   </tr><tr class="header"><th colspan="2"><a name="KEYWORDS-T">Keywords: T</a></th></tr><tr class="row1">
    53     53   <td width="35%"><a name="KW-tdom">tdom</a></td><td width="65%"><a href="tdomcmd.html">tdom</a></td>
    54     54   </tr><tr class="row0">
    55     55   <td width="35%"><a name="KW-tdomcmd">tdomcmd</a></td><td width="65%"><a href="tdomcmd.html">tdom</a></td>
    56     56   </tr><tr class="row1">
    57     57   <td width="35%"><a name="KW-tnc">tnc</a></td><td width="65%"><a href="tnc.html">tnc</a></td>
    58     58   </tr><tr class="header"><th colspan="2"><a name="KEYWORDS-V">Keywords: V</a></th></tr><tr class="row0">
    59     59   <td width="35%"><a name="KW-Validation">Validation</a></td><td width="65%"><a href="tnc.html">tnc</a></td>
    60     60   </tr><tr class="header"><th colspan="2"><a name="KEYWORDS-X">Keywords: X</a></th></tr><tr class="row1">
    61     61   <td width="35%"><a name="KW-XML">XML</a></td><td width="65%">
    62         -<a href="dom.html">dom</a> · <a href="domNode.html">domNode</a>
           62  +<a href="dom.html">dom</a> · <a href="domNode.html">domNode</a>
    63     63   </td>
    64     64   </tr><tr class="row0">
    65     65   <td width="35%"><a name="KW-xml::parser">xml::parser</a></td><td width="65%"><a href="expat.html">expat</a></td>
    66     66   </tr>
    67     67   </table></div></div><div class="footer">
    68     68   <hr class="navsep"><div class="navbar" align="center">
    69         -<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
           69  +<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a>
    70     70   </div>
    71     71   </div>
    72     72   </body>
    73     73   </html>

Changes to doc/tdomcmd.html.

     1      1   <html>
     2      2   <head>
     3         -<link rel="stylesheet" href="manpage.css"><title>tDOM manual: tdom</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
            3  +<link rel="stylesheet" href="manpage.css"><title>tDOM manual: tdom</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $">
     4      4   </head><body>
     5      5   <div class="header">
     6      6   <div class="navbar" align="center">
     7         -<a href="#SECTid0x1e30200">NAME</a> · <a href="#SECTid0x1f5add0">SYNOPSIS</a> · <a href="#SECTid0x1e4db90">DESCRIPTION</a> · <a href="#SECTid0x1f20b70">SEE ALSO</a> · <a href="#SECTid0x1f20f00">KEYWORDS</a>
            7  +<a href="#SECTid0x1402f70">NAME</a> · <a href="#SECTid0x12a9d60">SYNOPSIS</a> · <a href="#SECTid0x12d0010">DESCRIPTION</a> · <a href="#SECTid0x13bd260">SEE ALSO</a> · <a href="#SECTid0x13bd5c0">KEYWORDS</a>
     8      8   </div><hr class="navsep">
     9      9   </div><div class="body">
    10         -    <h2><a name="SECTid0x1e30200">NAME</a></h2><p class="namesection">
           10  +    <h2><a name="SECTid0x1402f70">NAME</a></h2><p class="namesection">
    11     11   <b class="names">tdom - </b><br>tdom is an expat parser object extension to create an in-memory
    12     12   DOM tree from the input while parsing.</p>
    13     13   
    14     14   
    15         -  <h2><a name="SECTid0x1f5add0">SYNOPSIS</a></h2><pre class="syntax">package require tdom
           15  +  <h2><a name="SECTid0x12a9d60">SYNOPSIS</a></h2><pre class="syntax">package require tdom
    16     16   
    17     17   set parser [expat]
    18     18   
    19     19   tdom $parser enable</pre>
    20     20   
    21         -  <h2><a name="SECTid0x1e4db90">DESCRIPTION</a></h2><p>
           21  +  <h2><a name="SECTid0x12d0010">DESCRIPTION</a></h2><p>
    22     22   <i class="m">tdom</i> adds the C handler set "tdom" to an tcl expat
    23     23   parser obj. This handler set builds an in-memory DOM tree out of the input,
    24     24   parsed by the parser. A DOM tree created this way behave exactly like a DOM
    25     25   tree created by the "dom" command (see there). In fact, tdom is only
    26     26   another interface to the same functionality; it uses the code behind the
    27     27   <tt class="samp">dom</tt> code for building the DOM tree.</p><dl class="commandlist">
    28     28         
................................................................................
    82     82   <b class="cmd">tdom</b> <i class="m">parserObj</i> <b class="method">setExternalEntityResolver</b> <i class="m">script</i>
    83     83   </dt>
    84     84           <dd></dd>
    85     85         
    86     86   
    87     87       </dl>
    88     88   
    89         -  <h2><a name="SECTid0x1f20b70">SEE ALSO</a></h2><p class="seealso">dom, expat</p>
           89  +  <h2><a name="SECTid0x13bd260">SEE ALSO</a></h2><p class="seealso">dom, expat</p>
    90     90   
    91         -  <h2><a name="SECTid0x1f20f00">KEYWORDS</a></h2><p class="keywords">
           91  +  <h2><a name="SECTid0x13bd5c0">KEYWORDS</a></h2><p class="keywords">
    92     92   <a class="keyword" href="keyword-index.html#KW-DOM">DOM</a>, <a class="keyword" href="keyword-index.html#KW-SAX">SAX</a>, <a class="keyword" href="keyword-index.html#KW-Chandlerset">C handler set</a>
    93     93   </p>
    94     94   
    95     95   </div><hr class="navsep"><div class="navbar" align="center">
    96         -<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
           96  +<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a>
    97     97   </div>
    98     98   </body>
    99     99   </html>

Changes to doc/tnc.html.

     1      1   <html>
     2      2   <head>
     3         -<link rel="stylesheet" href="manpage.css"><title>tDOM manual: tnc</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
            3  +<link rel="stylesheet" href="manpage.css"><title>tDOM manual: tnc</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $">
     4      4   </head><body>
     5      5   <div class="header">
     6      6   <div class="navbar" align="center">
     7         -<a href="#SECTid0x1f21840">NAME</a> · <a href="#SECTid0x1e300b0">SYNOPSIS</a> · <a href="#SECTid0x1f31680">DESCRIPTION</a> · <a href="#SECTid0x1f677e0">BUGS</a> · <a href="#SECTid0x1f2af70">KEYWORDS</a>
            7  +<a href="#SECTid0x1409a40">NAME</a> · <a href="#SECTid0x132e810">SYNOPSIS</a> · <a href="#SECTid0x132e670">DESCRIPTION</a> · <a href="#SECTid0x13bdd50">BUGS</a> · <a href="#SECTid0x13be6c0">KEYWORDS</a>
     8      8   </div><hr class="navsep">
     9      9   </div><div class="body">
    10         -  <h2><a name="SECTid0x1f21840">NAME</a></h2><p class="namesection">
           10  +  <h2><a name="SECTid0x1409a40">NAME</a></h2><p class="namesection">
    11     11   <b class="names">tnc - </b><br>tnc is an expat parser object extension, that validates the XML
    12     12   stream against the document DTD while parsing.</p>
    13     13     
    14         -  <h2><a name="SECTid0x1e300b0">SYNOPSIS</a></h2><pre class="syntax">package require tdom
           14  +  <h2><a name="SECTid0x132e810">SYNOPSIS</a></h2><pre class="syntax">package require tdom
    15     15   package require tnc
    16     16   
    17     17   set parser [expat]
    18     18   
    19     19   tnc $parser enable</pre>
    20     20   
    21         -  <h2><a name="SECTid0x1f31680">DESCRIPTION</a></h2><p>
           21  +  <h2><a name="SECTid0x132e670">DESCRIPTION</a></h2><p>
    22     22   <i class="m">tnc</i> adds the C handler set "tnc" to a tcl expat parser
    23     23   obj. This handler set is a simple DTD validator. If the validator detects a
    24     24   validation error, it sets the interp result, signals error and stops
    25     25   parsing. There isn't any validation error recovering. As a consequence, only
    26     26   valid documents are completely parsed.</p><p>This handler set has only three methods:</p><dl class="commandlist">
    27     27         
    28     28           <dt>
................................................................................
   116    116         
   117    117   
   118    118         </dl>
   119    119        </dd>
   120    120         
   121    121       </dl>
   122    122   
   123         -  <h2><a name="SECTid0x1f677e0">BUGS</a></h2><p>The validation error reports could be much more informative and
          123  +  <h2><a name="SECTid0x13bdd50">BUGS</a></h2><p>The validation error reports could be much more informative and
   124    124   user-friendly.</p><p>The validator doesn't detect ambiguous content models (see XML
   125    125   recomendation Section 3.2.1 and Appendix E). Most Java validators also doesn't,
   126    126   but handle such content models right anyhow. Tnc does not; if your DTD has
   127    127   such ambiguous content models, tnc can not used to validate documents against
   128    128   such (not completely XML spec compliant) DTDs.</p><p>It isn't possible to validate XML documents with standalone="yes" in the
   129    129   XML Declaration</p><p>Violations of the validity constraints Proper Group/PE Nesting and
   130    130   Proper Conditional Section/PE Nesting are not detected. They could only happen
   131    131   inside a invalid DTD, not in the content of a document.</p>
   132         -  <h2><a name="SECTid0x1f2af70">KEYWORDS</a></h2><p class="keywords">
          132  +  <h2><a name="SECTid0x13be6c0">KEYWORDS</a></h2><p class="keywords">
   133    133   <a class="keyword" href="keyword-index.html#KW-Validation">Validation</a>, <a class="keyword" href="keyword-index.html#KW-DTD">DTD</a>
   134    134   </p>
   135    135     
   136    136   </div><hr class="navsep"><div class="navbar" align="center">
   137         -<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
          137  +<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a>
   138    138   </div>
   139    139   </body>
   140    140   </html>

Changes to expat/winconfig.h.

    19     19   
    20     20   #define XML_NS 1
    21     21   #define XML_DTD 1
    22     22   #define XML_CONTEXT_BYTES 1024
    23     23   
    24     24   /* we will assume all Windows platforms are little endian */
    25     25   #define BYTEORDER 1234
           26  +
           27  +/* Windows has memmove() available. */
           28  +#define HAVE_MEMMOVE
    26     29   
    27     30   #endif /* ndef WINCONFIG_H */

Changes to extensions/example/configure.

   638    638   STLIB_LD
   639    639   CFLAGS_WARNING
   640    640   CFLAGS_OPTIMIZE
   641    641   CFLAGS_DEBUG
   642    642   RC
   643    643   CELIB_DIR
   644    644   AR
   645         -STUBS_BUILD
   646    645   SHARED_BUILD
   647    646   TCL_THREADS
   648    647   TCL_INCLUDES
   649    648   PKG_OBJECTS
   650    649   PKG_SOURCES
   651    650   TDOM_SRC_DIR
   652    651   TDOM_STUB_LIB_SPEC
   653    652   TDOM_VERSION
   654    653   MATH_LIBS
   655    654   EGREP
   656    655   GREP
   657    656   RANLIB
   658    657   SET_MAKE
   659         -INSTALL_LIBRARY
   660         -INSTALL_SCRIPT
   661         -INSTALL_PROGRAM
   662         -INSTALL_DATA
   663         -INSTALL_DATA_DIR
   664         -INSTALL
   665    658   CPP
   666    659   TCL_SHLIB_LD_LIBS
   667    660   TCL_LD_FLAGS
   668    661   TCL_EXTRA_CFLAGS
   669    662   TCL_DEFS
   670    663   TCL_LIBS
   671    664   CLEANFILES
................................................................................
   738    731   ac_user_opts='
   739    732   enable_option_checking
   740    733   with_tcl
   741    734   with_tdom
   742    735   with_tclinclude
   743    736   enable_threads
   744    737   enable_shared
   745         -enable_stubs
   746    738   enable_64bit
   747    739   enable_64bit_vis
   748    740   enable_rpath
   749    741   enable_wince
   750    742   with_celib
   751    743   enable_symbols
   752    744   '
................................................................................
  1366   1358   
  1367   1359   Optional Features:
  1368   1360     --disable-option-checking  ignore unrecognized --enable/--with options
  1369   1361     --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  1370   1362     --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  1371   1363     --enable-threads        build with threads
  1372   1364     --enable-shared         build and link with shared libraries (default: on)
  1373         -  --enable-stubs          build and link with stub libraries. Always true for
  1374         -                          shared builds (default: on)
  1375   1365     --enable-64bit          enable 64bit support (default: off)
  1376   1366     --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
  1377   1367     --disable-rpath         disable rpath support (default: on)
  1378   1368     --enable-wince          enable Win/CE support (where applicable)
  1379   1369     --enable-symbols        build with debugging symbols (default: off)
  1380   1370   
  1381   1371   Optional Packages:
................................................................................
  2183   2173   # This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
  2184   2174   # as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
  2185   2175   #--------------------------------------------------------------------
  2186   2176   
  2187   2177   
  2188   2178       # TEA extensions pass this us the version of TEA they think they
  2189   2179       # are compatible with.
  2190         -    TEA_VERSION="3.10"
         2180  +    TEA_VERSION="3.9"
  2191   2181   
  2192   2182       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct TEA configuration" >&5
  2193   2183   $as_echo_n "checking for correct TEA configuration... " >&6; }
  2194   2184       if test x"${PACKAGE_NAME}" = x ; then
  2195   2185   	as_fn_error $? "
  2196         -The PACKAGE_NAME variable must be defined by your TEA configure.ac" "$LINENO" 5
         2186  +The PACKAGE_NAME variable must be defined by your TEA configure.in" "$LINENO" 5
  2197   2187       fi
  2198         -    if test x"3.10" = x ; then
         2188  +    if test x"3.9" = x ; then
  2199   2189   	as_fn_error $? "
  2200   2190   TEA version not specified." "$LINENO" 5
  2201         -    elif test "3.10" != "${TEA_VERSION}" ; then
  2202         -	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: warning: requested TEA version \"3.10\", have \"${TEA_VERSION}\"" >&5
  2203         -$as_echo "warning: requested TEA version \"3.10\", have \"${TEA_VERSION}\"" >&6; }
         2191  +    elif test "3.9" != "${TEA_VERSION}" ; then
         2192  +	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&5
         2193  +$as_echo "warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&6; }
  2204   2194       else
  2205   2195   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (TEA ${TEA_VERSION})" >&5
  2206   2196   $as_echo "ok (TEA ${TEA_VERSION})" >&6; }
  2207   2197       fi
  2208   2198   
  2209   2199       # If the user did not set CFLAGS, set it now to keep macros
  2210   2200       # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
................................................................................
  2227   2217   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  2228   2218   for as_dir in $PATH
  2229   2219   do
  2230   2220     IFS=$as_save_IFS
  2231   2221     test -z "$as_dir" && as_dir=.
  2232   2222       for ac_exec_ext in '' $ac_executable_extensions; do
  2233   2223     if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  2234         -    ac_cv_prog_CYGPATH="cygpath -m"
         2224  +    ac_cv_prog_CYGPATH="cygpath -w"
  2235   2225       $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  2236   2226       break 2
  2237   2227     fi
  2238   2228   done
  2239   2229     done
  2240   2230   IFS=$as_save_IFS
  2241   2231   
................................................................................
  2252   2242   fi
  2253   2243   
  2254   2244   
  2255   2245   	    EXEEXT=".exe"
  2256   2246   	    TEA_PLATFORM="windows"
  2257   2247   	    ;;
  2258   2248   	*CYGWIN_*)
         2249  +	    CYGPATH=echo
  2259   2250   	    EXEEXT=".exe"
  2260         -	    # CYGPATH and TEA_PLATFORM are determined later in LOAD_TCLCONFIG
         2251  +	    # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
  2261   2252   	    ;;
  2262   2253   	*)
  2263   2254   	    CYGPATH=echo
  2264   2255   	    # Maybe we are cross-compiling....
  2265   2256   	    case ${host_alias} in
  2266   2257   		*mingw32*)
  2267   2258   		EXEEXT=".exe"
................................................................................
  2436   2427   	    fi
  2437   2428   
  2438   2429   	    # check in a few common install locations
  2439   2430   	    if test x"${ac_cv_c_tclconfig}" = x ; then
  2440   2431   		for i in `ls -d ${libdir} 2>/dev/null` \
  2441   2432   			`ls -d ${exec_prefix}/lib 2>/dev/null` \
  2442   2433   			`ls -d ${prefix}/lib 2>/dev/null` \
  2443         -			`ls -d /usr/contrib/lib 2>/dev/null` \
  2444   2434   			`ls -d /usr/local/lib 2>/dev/null` \
  2445         -			`ls -d /usr/pkg/lib 2>/dev/null` \
         2435  +			`ls -d /usr/contrib/lib 2>/dev/null` \
  2446   2436   			`ls -d /usr/lib 2>/dev/null` \
  2447   2437   			`ls -d /usr/lib64 2>/dev/null` \
  2448         -			`ls -d /usr/lib/tcl8.6 2>/dev/null` \
  2449         -			`ls -d /usr/lib/tcl8.5 2>/dev/null` \
  2450   2438   			; do
  2451   2439   		    if test -f "$i/tclConfig.sh" ; then
  2452   2440   			ac_cv_c_tclconfig="`(cd $i; pwd)`"
  2453   2441   			break
  2454   2442   		    fi
  2455   2443   		done
  2456   2444   	    fi
................................................................................
  3362   3350   	    #endif
  3363   3351   
  3364   3352     ;
  3365   3353     return 0;
  3366   3354   }
  3367   3355   _ACEOF
  3368   3356   if ac_fn_c_try_compile "$LINENO"; then :
  3369         -
  3370         -	    TEA_PLATFORM="unix"
  3371         -	    CYGPATH=echo
  3372         -
         3357  +  TEA_PLATFORM="unix"
  3373   3358   else
  3374         -
  3375         -	    TEA_PLATFORM="windows"
  3376         -	    # Extract the first word of "cygpath", so it can be a program name with args.
  3377         -set dummy cygpath; ac_word=$2
  3378         -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  3379         -$as_echo_n "checking for $ac_word... " >&6; }
  3380         -if ${ac_cv_prog_CYGPATH+:} false; then :
  3381         -  $as_echo_n "(cached) " >&6
  3382         -else
  3383         -  if test -n "$CYGPATH"; then
  3384         -  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
  3385         -else
  3386         -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  3387         -for as_dir in $PATH
  3388         -do
  3389         -  IFS=$as_save_IFS
  3390         -  test -z "$as_dir" && as_dir=.
  3391         -    for ac_exec_ext in '' $ac_executable_extensions; do
  3392         -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  3393         -    ac_cv_prog_CYGPATH="cygpath -m"
  3394         -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  3395         -    break 2
  3396         -  fi
  3397         -done
  3398         -  done
  3399         -IFS=$as_save_IFS
  3400         -
  3401         -  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
  3402         -fi
  3403         -fi
  3404         -CYGPATH=$ac_cv_prog_CYGPATH
  3405         -if test -n "$CYGPATH"; then
  3406         -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
  3407         -$as_echo "$CYGPATH" >&6; }
  3408         -else
  3409         -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  3410         -$as_echo "no" >&6; }
  3411         -fi
  3412         -
  3413         -
         3359  +  TEA_PLATFORM="windows"
  3414   3360   
  3415   3361   fi
  3416   3362   rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  3417   3363       CC=$hold_cc
  3418   3364       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEA_PLATFORM" >&5
  3419   3365   $as_echo "$TEA_PLATFORM" >&6; }
  3420   3366   
................................................................................
  4161   4107   fi
  4162   4108   
  4163   4109   ac_ext=c
  4164   4110   ac_cpp='$CPP $CPPFLAGS'
  4165   4111   ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  4166   4112   ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  4167   4113   ac_compiler_gnu=$ac_cv_c_compiler_gnu
  4168         -
  4169         -
  4170         -    INSTALL='$(SHELL) $(srcdir)/tclconfig/install-sh -c'
  4171         -    INSTALL_DATA_DIR='${INSTALL} -d -m 755'
  4172         -    INSTALL_DATA='${INSTALL} -m 644'
  4173         -    INSTALL_PROGRAM='${INSTALL}'
  4174         -    INSTALL_SCRIPT='${INSTALL}'
  4175         -    INSTALL_LIBRARY='${INSTALL_DATA}'
  4176         -
  4177         -
  4178         -
  4179         -
  4180         -
  4181         -
  4182   4114   
  4183   4115   
  4184   4116       #--------------------------------------------------------------------
  4185   4117       # Checks to see if the make program sets the $MAKE variable.
  4186   4118       #--------------------------------------------------------------------
  4187   4119   
  4188   4120       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
................................................................................
  6006   5938   #--------------------------------------------------------------------
  6007   5939   
  6008   5940   
  6009   5941       { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build libraries" >&5
  6010   5942   $as_echo_n "checking how to build libraries... " >&6; }
  6011   5943       # Check whether --enable-shared was given.
  6012   5944   if test "${enable_shared+set}" = set; then :
  6013         -  enableval=$enable_shared; shared_ok=$enableval
         5945  +  enableval=$enable_shared; tcl_ok=$enableval
  6014   5946   else
  6015         -  shared_ok=yes
         5947  +  tcl_ok=yes
  6016   5948   fi
  6017   5949   
  6018   5950   
  6019   5951       if test "${enable_shared+set}" = set; then
  6020   5952   	enableval="$enable_shared"
  6021         -	shared_ok=$enableval
         5953  +	tcl_ok=$enableval
  6022   5954       else
  6023         -	shared_ok=yes
         5955  +	tcl_ok=yes
  6024   5956       fi
  6025   5957   
  6026         -    # Check whether --enable-stubs was given.
  6027         -if test "${enable_stubs+set}" = set; then :
  6028         -  enableval=$enable_stubs; stubs_ok=$enableval
  6029         -else
  6030         -  stubs_ok=yes
  6031         -fi
  6032         -
  6033         -
  6034         -    if test "${enable_stubs+set}" = set; then
  6035         -	enableval="$enable_stubs"
  6036         -	stubs_ok=$enableval
  6037         -    else
  6038         -	stubs_ok=yes
  6039         -    fi
  6040         -
  6041         -    # Stubs are always enabled for shared builds
  6042         -    if test "$shared_ok" = "yes" ; then
         5958  +    if test "$tcl_ok" = "yes" ; then
  6043   5959   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5
  6044   5960   $as_echo "shared" >&6; }
  6045   5961   	SHARED_BUILD=1
  6046         -        STUBS_BUILD=1
  6047   5962       else
  6048   5963   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
  6049   5964   $as_echo "static" >&6; }
  6050   5965   	SHARED_BUILD=0
  6051   5966   
  6052   5967   $as_echo "#define STATIC_BUILD 1" >>confdefs.h
  6053   5968   
  6054         -        if test "$stubs_ok" = "yes" ; then
  6055         -          STUBS_BUILD=1
  6056         -        else
  6057         -          STUBS_BUILD=0
  6058         -        fi
  6059   5969       fi
  6060         -    if test "${STUBS_BUILD}" = "1" ; then
  6061         -
  6062         -$as_echo "#define USE_TCL_STUBS 1" >>confdefs.h
  6063         -
  6064         -
  6065         -$as_echo "#define USE_TCLOO_STUBS 1" >>confdefs.h
  6066         -
  6067         -      if test "${TEA_WINDOWINGSYSTEM}" != ""; then
  6068         -
  6069         -$as_echo "#define USE_TK_STUBS 1" >>confdefs.h
  6070         -
  6071         -      fi
  6072         -    fi
  6073         -
  6074         -
  6075   5970   
  6076   5971   
  6077   5972   
  6078   5973   #--------------------------------------------------------------------
  6079   5974   # This macro figures out what flags to use with the compiler/linker
  6080   5975   # when building shared/static debug/optimized objects.  This information
  6081   5976   # can be taken from the tclConfig.sh file, but this figures it all out.
................................................................................
  6243   6138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_visibility_hidden" >&5
  6244   6139   $as_echo "$tcl_cv_cc_visibility_hidden" >&6; }
  6245   6140       if test $tcl_cv_cc_visibility_hidden = yes; then :
  6246   6141   
  6247   6142   
  6248   6143   $as_echo "#define MODULE_SCOPE extern __attribute__((__visibility__(\"hidden\")))" >>confdefs.h
  6249   6144   
  6250         -
  6251         -$as_echo "#define HAVE_HIDDEN 1" >>confdefs.h
  6252         -
  6253   6145   
  6254   6146   fi
  6255   6147   
  6256   6148       # Step 0.d: Disable -rpath support?
  6257   6149   
  6258   6150       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if rpath support is requested" >&5
  6259   6151   $as_echo_n "checking if rpath support is requested... " >&6; }
................................................................................
  6440   6332   else
  6441   6333     AR="$ac_cv_prog_AR"
  6442   6334   fi
  6443   6335   
  6444   6336       STLIB_LD='${AR} cr'
  6445   6337       LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  6446   6338       if test "x$SHLIB_VERSION" = x; then :
  6447         -  SHLIB_VERSION=""
  6448         -else
  6449         -  SHLIB_VERSION=".$SHLIB_VERSION"
         6339  +  SHLIB_VERSION="1.0"
  6450   6340   fi
  6451   6341       case $system in
  6452   6342   	# TEA specific:
  6453   6343   	windows)
  6454   6344   	    # This is a 2-stage check to make sure we have the 64-bit SDK
  6455   6345   	    # We have to know where the SDK is installed.
  6456   6346   	    # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
................................................................................
  6606   6496   
  6607   6497   	    if test "$GCC" != "yes" ; then
  6608   6498   	        if test "${SHARED_BUILD}" = "0" ; then
  6609   6499   		    runtime=-MT
  6610   6500   	        else
  6611   6501   		    runtime=-MD
  6612   6502   	        fi
  6613         -	        case "x`echo \${VisualStudioVersion}`" in
  6614         -	            x1[4-9]*)
  6615         -		        lflags="${lflags} -nodefaultlib:libucrt.lib"
  6616         -
  6617         -    vars="ucrt.lib"
  6618         -    for i in $vars; do
  6619         -	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
  6620         -	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
  6621         -	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
  6622         -	fi
  6623         -	PKG_LIBS="$PKG_LIBS $i"
  6624         -    done
  6625         -
  6626         -
  6627         -	            ;;
  6628         -	            *)
  6629         -	            ;;
  6630         -	        esac
  6631   6503   
  6632   6504                   if test "$do64bit" != "no" ; then
  6633   6505   		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
  6634   6506   		    CC="\"${PATH64}/cl.exe\""
  6635   6507   		    CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
  6636   6508   		    RC="\"${MSSDK}/bin/rc.exe\""
  6637         -		    lflags="${lflags} -nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
         6509  +		    lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
  6638   6510   		    LINKBIN="\"${PATH64}/link.exe\""
  6639   6511   		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
  6640   6512   		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
  6641   6513   		    # Avoid 'unresolved external symbol __security_cookie'
  6642   6514   		    # errors, c.f. http://support.microsoft.com/?id=894573
  6643   6515   
  6644   6516       vars="bufferoverflowU.lib"
................................................................................
  6682   6554   cat >>confdefs.h <<_ACEOF
  6683   6555   #define UNDER_CE $CEVERSION
  6684   6556   _ACEOF
  6685   6557   
  6686   6558   		    CFLAGS_DEBUG="-nologo -Zi -Od"
  6687   6559   		    CFLAGS_OPTIMIZE="-nologo -Ox"
  6688   6560   		    lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
  6689         -		    lflags="${lflags} -MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
         6561  +		    lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
  6690   6562   		    LINKBIN="\"${CEBINROOT}/link.exe\""
  6691   6563   
  6692   6564   		else
  6693   6565   		    RC="rc"
  6694         -		    lflags="${lflags} -nologo"
  6695         -		    LINKBIN="link"
         6566  +		    lflags="-nologo"
         6567  +    		    LINKBIN="link"
  6696   6568   		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
  6697   6569   		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
  6698   6570   		fi
  6699   6571   	    fi
  6700   6572   
  6701   6573   	    if test "$GCC" = "yes"; then
  6702   6574   		# mingw gcc mode
................................................................................
  6803   6675   $as_echo_n "checking for cross-compile version of gcc... " >&6; }
  6804   6676   if ${ac_cv_cross+:} false; then :
  6805   6677     $as_echo_n "(cached) " >&6
  6806   6678   else
  6807   6679     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  6808   6680   /* end confdefs.h.  */
  6809   6681   
  6810         -			    #ifdef _WIN32
         6682  +			    #ifdef __WIN32__
  6811   6683   				#error cross-compiler
  6812   6684   			    #endif
  6813   6685   
  6814   6686   int
  6815   6687   main ()
  6816   6688   {
  6817   6689   
................................................................................
  7010   6882   	    LDFLAGS="$LDFLAGS -export-dynamic"
  7011   6883   	    CC_SEARCH_FLAGS=""
  7012   6884   	    LD_SEARCH_FLAGS=""
  7013   6885   	    ;;
  7014   6886   	CYGWIN_*)
  7015   6887   	    SHLIB_CFLAGS=""
  7016   6888   	    SHLIB_LD='${CC} -shared'
  7017         -	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$@.a"
  7018   6889   	    SHLIB_SUFFIX=".dll"
  7019   6890   	    EXEEXT=".exe"
  7020         -	    do64bit_ok=yes
  7021   6891   	    CC_SEARCH_FLAGS=""
  7022   6892   	    LD_SEARCH_FLAGS=""
  7023   6893   	    ;;
  7024   6894   	Haiku*)
  7025   6895   	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
  7026   6896   	    SHLIB_CFLAGS="-fPIC"
  7027   6897   	    SHLIB_SUFFIX=".so"
................................................................................
  7324   7194   		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  7325   7195   		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  7326   7196   fi
  7327   7197   	    ;;
  7328   7198   	OpenBSD-*)
  7329   7199   	    arch=`arch -s`
  7330   7200   	    case "$arch" in
  7331         -	    alpha|sparc64)
         7201  +	    m88k|vax)
         7202  +		SHLIB_SUFFIX=""
         7203  +		SHARED_LIB_SUFFIX=""
         7204  +		;;
         7205  +	    *)
  7332   7206   		SHLIB_CFLAGS="-fPIC"
         7207  +		SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
         7208  +		SHLIB_SUFFIX=".so"
         7209  +		if test $doRpath = yes; then :
         7210  +
         7211  +		    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
         7212  +fi
         7213  +		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
         7214  +		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
         7215  +		;;
         7216  +	    esac
         7217  +	    case "$arch" in
         7218  +	    m88k|vax)
         7219  +		CFLAGS_OPTIMIZE="-O1"
  7333   7220   		;;
  7334   7221   	    *)
  7335         -		SHLIB_CFLAGS="-fpic"
         7222  +		CFLAGS_OPTIMIZE="-O2"
  7336   7223   		;;
  7337   7224   	    esac
  7338         -	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
  7339         -	    SHLIB_SUFFIX=".so"
  7340         -	    if test $doRpath = yes; then :
         7225  +	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
         7226  +$as_echo_n "checking for ELF... " >&6; }
         7227  +if ${tcl_cv_ld_elf+:} false; then :
         7228  +  $as_echo_n "(cached) " >&6
         7229  +else
  7341   7230   
  7342         -		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
         7231  +		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
         7232  +/* end confdefs.h.  */
         7233  +
         7234  +#ifdef __ELF__
         7235  +	yes
         7236  +#endif
         7237  +
         7238  +_ACEOF
         7239  +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
         7240  +  $EGREP "yes" >/dev/null 2>&1; then :
         7241  +  tcl_cv_ld_elf=yes
         7242  +else
         7243  +  tcl_cv_ld_elf=no
  7343   7244   fi
  7344         -	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  7345         -	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}'
  7346         -	    LDFLAGS="-Wl,-export-dynamic"
  7347         -	    CFLAGS_OPTIMIZE="-O2"
         7245  +rm -f conftest*
         7246  +
         7247  +fi
         7248  +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_elf" >&5
         7249  +$as_echo "$tcl_cv_ld_elf" >&6; }
         7250  +	    if test $tcl_cv_ld_elf = yes; then :
         7251  +
         7252  +		LDFLAGS=-Wl,-export-dynamic
         7253  +
         7254  +else
         7255  +  LDFLAGS=""
         7256  +fi
  7348   7257   	    if test "${TCL_THREADS}" = "1"; then :
  7349   7258   
  7350   7259   		# On OpenBSD:	Compile with -pthread
  7351   7260   		#		Don't link with -lpthread
  7352   7261   		LIBS=`echo $LIBS | sed s/-lpthread//`
  7353   7262   		CFLAGS="$CFLAGS -pthread"
  7354   7263   
................................................................................
  7377   7286   
  7378   7287   fi
  7379   7288   	    ;;
  7380   7289   	FreeBSD-*)
  7381   7290   	    # This configuration from FreeBSD Ports.
  7382   7291   	    SHLIB_CFLAGS="-fPIC"
  7383   7292   	    SHLIB_LD="${CC} -shared"
  7384         -	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,-soname,\$@"
         7293  +	    TCL_SHLIB_LD_EXTRAS="-Wl,-soname \$@"
  7385   7294   	    SHLIB_SUFFIX=".so"
  7386   7295   	    LDFLAGS=""
  7387   7296   	    if test $doRpath = yes; then :
  7388   7297   
  7389   7298   		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  7390         -		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
         7299  +		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  7391   7300   fi
  7392   7301   	    if test "${TCL_THREADS}" = "1"; then :
  7393   7302   
  7394   7303   		# The -pthread needs to go in the LDFLAGS, not LIBS
  7395   7304   		LIBS=`echo $LIBS | sed s/-pthread//`
  7396   7305   		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
  7397   7306   		LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
  7398   7307   fi
  7399         -	    case $system in
  7400         -	    FreeBSD-3.*)
  7401         -		# Version numbers are dot-stripped by system policy.
  7402         -		TCL_TRIM_DOTS=`echo ${PACKAGE_VERSION} | tr -d .`
  7403         -		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
  7404         -		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
  7405         -		TCL_LIB_VERSIONS_OK=nodots
  7406         -		;;
  7407         -	    esac
         7308  +	    # Version numbers are dot-stripped by system policy.
         7309  +	    TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
         7310  +	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
         7311  +	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
         7312  +	    TCL_LIB_VERSIONS_OK=nodots
  7408   7313   	    ;;
  7409   7314   	Darwin-*)
  7410   7315   	    CFLAGS_OPTIMIZE="-Os"
  7411   7316   	    SHLIB_CFLAGS="-fno-common"
  7412   7317   	    # To avoid discrepancies between what headers configure sees during
  7413   7318   	    # preprocessing tests and compiling tests, move any -isysroot and
  7414   7319   	    # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
................................................................................
  7762   7667   	    if test "$GCC" = yes; then :
  7763   7668   
  7764   7669   		SHLIB_CFLAGS="-fPIC -melf"
  7765   7670   		LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
  7766   7671   
  7767   7672   else
  7768   7673   
  7769         -		SHLIB_CFLAGS="-Kpic -belf"
  7770         -		LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
         7674  +	       SHLIB_CFLAGS="-Kpic -belf"
         7675  +	       LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
  7771   7676   
  7772   7677   fi
  7773   7678   	    SHLIB_LD="ld -G"
  7774   7679   	    SHLIB_LD_LIBS=""
  7775   7680   	    SHLIB_SUFFIX=".so"
  7776   7681   	    CC_SEARCH_FLAGS=""
  7777   7682   	    LD_SEARCH_FLAGS=""
................................................................................
  8022   7927   fi
  8023   7928   
  8024   7929       if test "$tcl_cv_cc_visibility_hidden" != yes; then :
  8025   7930   
  8026   7931   
  8027   7932   $as_echo "#define MODULE_SCOPE extern" >>confdefs.h
  8028   7933   
         7934  +
         7935  +$as_echo "#define NO_VIZ /**/" >>confdefs.h
         7936  +
  8029   7937   
  8030   7938   fi
  8031   7939   
  8032   7940       if test "$SHARED_LIB_SUFFIX" = ""; then :
  8033   7941   
  8034   7942       # TEA specific: use PACKAGE_VERSION instead of VERSION
  8035   7943       SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
................................................................................
  8036   7944   fi
  8037   7945       if test "$UNSHARED_LIB_SUFFIX" = ""; then :
  8038   7946   
  8039   7947       # TEA specific: use PACKAGE_VERSION instead of VERSION
  8040   7948       UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
  8041   7949   fi
  8042   7950   
  8043         -    if test "${GCC}" = "yes" -a ${SHLIB_SUFFIX} = ".dll"; then
         7951  +    if test "${GCC}" = "yes" ; then
  8044   7952   	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SEH support in compiler" >&5
  8045   7953   $as_echo_n "checking for SEH support in compiler... " >&6; }
  8046   7954   if ${tcl_cv_seh+:} false; then :
  8047   7955     $as_echo_n "(cached) " >&6
  8048   7956   else
  8049   7957     if test "$cross_compiling" = yes; then :
  8050   7958     tcl_cv_seh=no
  8051   7959   else
  8052   7960     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  8053   7961   /* end confdefs.h.  */
  8054   7962   
  8055         -#define WIN32_LEAN_AND_MEAN
  8056         -#include <windows.h>
  8057         -#undef WIN32_LEAN_AND_MEAN
         7963  +	    #define WIN32_LEAN_AND_MEAN
         7964  +	    #include <windows.h>
         7965  +	    #undef WIN32_LEAN_AND_MEAN
  8058   7966   
  8059   7967   	    int main(int argc, char** argv) {
  8060   7968   		int a, b = 0;
  8061   7969   		__try {
  8062   7970   		    a = 666 / b;
  8063   7971   		}
  8064   7972   		__except (EXCEPTION_EXECUTE_HANDLER) {
................................................................................
  8139   8047   $as_echo_n "checking for winnt.h that ignores VOID define... " >&6; }
  8140   8048   if ${tcl_cv_winnt_ignore_void+:} false; then :
  8141   8049     $as_echo_n "(cached) " >&6
  8142   8050   else
  8143   8051     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  8144   8052   /* end confdefs.h.  */
  8145   8053   
  8146         -#define VOID void
  8147         -#define WIN32_LEAN_AND_MEAN
  8148         -#include <windows.h>
  8149         -#undef WIN32_LEAN_AND_MEAN
         8054  +		#define VOID void
         8055  +		#define WIN32_LEAN_AND_MEAN
         8056  +		#include <windows.h>
         8057  +		#undef WIN32_LEAN_AND_MEAN
  8150   8058   
  8151   8059   int
  8152   8060   main ()
  8153   8061   {
  8154   8062   
  8155   8063   		CHAR c;
  8156   8064   		SHORT s;
................................................................................
  8171   8079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_winnt_ignore_void" >&5
  8172   8080   $as_echo "$tcl_cv_winnt_ignore_void" >&6; }
  8173   8081   	if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
  8174   8082   
  8175   8083   $as_echo "#define HAVE_WINNT_IGNORE_VOID 1" >>confdefs.h
  8176   8084   
  8177   8085   	fi
  8178         -    fi
  8179   8086   
  8180   8087   	# See if the compiler supports casting to a union type.
  8181   8088   	# This is used to stop gcc from printing a compiler
  8182   8089   	# warning when initializing a union member.
  8183   8090   
  8184   8091   	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cast to union support" >&5
  8185   8092   $as_echo_n "checking for cast to union support... " >&6; }
................................................................................
  8211   8118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cast_to_union" >&5
  8212   8119   $as_echo "$tcl_cv_cast_to_union" >&6; }
  8213   8120   	if test "$tcl_cv_cast_to_union" = "yes"; then
  8214   8121   
  8215   8122   $as_echo "#define HAVE_CAST_TO_UNION 1" >>confdefs.h
  8216   8123   
  8217   8124   	fi
         8125  +    fi
  8218   8126   
  8219   8127   
  8220   8128   
  8221   8129   
  8222   8130   
  8223   8131   
  8224   8132   
................................................................................
  8458   8366   if ${tcl_cv_struct_dirent64+:} false; then :
  8459   8367     $as_echo_n "(cached) " >&6
  8460   8368   else
  8461   8369   
  8462   8370   	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  8463   8371   /* end confdefs.h.  */
  8464   8372   #include <sys/types.h>
  8465         -#include <dirent.h>
         8373  +#include <sys/dirent.h>
  8466   8374   int
  8467   8375   main ()
  8468   8376   {
  8469   8377   struct dirent64 p;
  8470   8378     ;
  8471   8379     return 0;
  8472   8380   }
................................................................................
  8667   8575   
  8668   8576       CLEANFILES="$CLEANFILES *.manifest"
  8669   8577   
  8670   8578   
  8671   8579   fi
  8672   8580   rm -f conftest*
  8673   8581   
  8674         -	MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -out:\$@ \$(PKG_STUB_OBJECTS)"
         8582  +	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(PKG_STUB_OBJECTS)"
  8675   8583       else
  8676   8584   	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
  8677   8585   	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
  8678   8586   	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
  8679   8587       fi
  8680   8588   
  8681   8589       if test "${SHARED_BUILD}" = "1" ; then
................................................................................
  8690   8598       # substituted. (@@@ Might not be necessary anymore)
  8691   8599       #--------------------------------------------------------------------
  8692   8600   
  8693   8601       if test "${TEA_PLATFORM}" = "windows" ; then
  8694   8602   	if test "${SHARED_BUILD}" = "1" ; then
  8695   8603   	    # We force the unresolved linking of symbols that are really in
  8696   8604   	    # the private libraries of Tcl and Tk.
         8605  +	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
  8697   8606   	    if test x"${TK_BIN_DIR}" != x ; then
  8698   8607   		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
  8699   8608   	    fi
  8700         -	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
  8701         -	    if test "$GCC" = "yes"; then
  8702         -		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
  8703         -	    fi
  8704         -	    eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
         8609  +	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
  8705   8610   	else
  8706         -	    eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
  8707         -	    if test "$GCC" = "yes"; then
  8708         -		PKG_LIB_FILE=lib${PKG_LIB_FILE}
  8709         -	    fi
         8611  +	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
  8710   8612   	fi
  8711   8613   	# Some packages build their own stubs libraries
  8712         -	eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
         8614  +	eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
  8713   8615   	if test "$GCC" = "yes"; then
  8714   8616   	    PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
  8715   8617   	fi
  8716   8618   	# These aren't needed on Windows (either MSVC or gcc)
  8717   8619   	RANLIB=:
  8718   8620   	RANLIB_STUB=:
  8719   8621       else
  8720   8622   	RANLIB_STUB="${RANLIB}"
  8721   8623   	if test "${SHARED_BUILD}" = "1" ; then
  8722   8624   	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
  8723   8625   	    if test x"${TK_BIN_DIR}" != x ; then
  8724   8626   		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
  8725   8627   	    fi
  8726         -	    eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
         8628  +	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
  8727   8629   	    RANLIB=:
  8728   8630   	else
  8729         -	    eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
         8631  +	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
  8730   8632   	fi
  8731   8633   	# Some packages build their own stubs libraries
  8732         -	eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
         8634  +	eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
  8733   8635       fi
  8734   8636   
  8735   8637       # These are escaped so that only CFLAGS is picked up at configure time.
  8736   8638       # The other values will be substituted at make time.
  8737   8639       CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
  8738   8640       if test "${SHARED_BUILD}" = "1" ; then
  8739   8641   	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
................................................................................
  8758   8660   
  8759   8661   
  8760   8662       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclsh" >&5
  8761   8663   $as_echo_n "checking for tclsh... " >&6; }
  8762   8664       if test -f "${TCL_BIN_DIR}/Makefile" ; then
  8763   8665           # tclConfig.sh is in Tcl build directory
  8764   8666           if test "${TEA_PLATFORM}" = "windows"; then
  8765         -          if test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" ; then
  8766   8667               TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
  8767         -          elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}s${EXEEXT}" ; then
  8768         -            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}s${EXEEXT}"
  8769         -          elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}t${EXEEXT}" ; then
  8770         -            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}t${EXEEXT}"
  8771         -          elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}st${EXEEXT}" ; then
  8772         -            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}st${EXEEXT}"
  8773         -          fi
  8774   8668           else
  8775   8669               TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
  8776   8670           fi
  8777   8671       else
  8778   8672           # tclConfig.sh is in install location
  8779   8673           if test "${TEA_PLATFORM}" = "windows"; then
  8780   8674               TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"

Changes to extensions/example/configure.in.

    23     23   
    24     24   #--------------------------------------------------------------------
    25     25   # Call TEA_INIT as the first TEA_ macro to set up initial vars.
    26     26   # This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
    27     27   # as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
    28     28   #--------------------------------------------------------------------
    29     29   
    30         -TEA_INIT([3.10])
           30  +TEA_INIT([3.9])
    31     31   
    32     32   AC_CONFIG_AUX_DIR(../../tclconfig)
    33     33   
    34     34   #--------------------------------------------------------------------
    35     35   # Load the tclConfig.sh file
    36     36   #--------------------------------------------------------------------
    37     37   

Deleted extensions/tdomhtml/win/makefile.vc.

     1         -# Simple makefile for pure Tcl package
     2         -
     3         -PROJECT    = tdomhtml
     4         -DOTVERSION = 0.1.0
     5         -VERSION    = $(DOTVERSION:.=)
     6         -
     7         -CPY	= echo y | xcopy /i >NUL
     8         -
     9         -!ifndef INSTALLDIR
    10         -### Assume the normal default.
    11         -_INSTALLDIR	= C:\Program Files\Tcl\lib
    12         -!else
    13         -### Fix the path separators.
    14         -_INSTALLDIR	= $(INSTALLDIR:/=\)\lib
    15         -!endif
    16         -
    17         -
    18         -PRJ_INSTALL_DIR         = $(_INSTALLDIR)\$(PROJECT)$(DOTVERSION)
    19         -DOC_INSTALL_DIR		= $(PRJ_INSTALL_DIR)
    20         -SCRIPT_INSTALL_DIR	= $(PRJ_INSTALL_DIR)
    21         -
    22         -all:
    23         -	@echo This is a pure Tcl package. Just run 'make /f makefile.vc install INSTALLDIR=path\to\tcl\root'
    24         -
    25         -install: install-libraries
    26         -
    27         -install-libraries:
    28         -	@if not exist $(SCRIPT_INSTALL_DIR)\nul mkdir $(SCRIPT_INSTALL_DIR)
    29         -	@echo Installing libraries to '$(SCRIPT_INSTALL_DIR)'
    30         -        $(CPY) ..\tdomhtml.tcl "$(SCRIPT_INSTALL_DIR)" >NUL
    31         -        @echo Installing package index in '$(SCRIPT_INSTALL_DIR)'
    32         -        @type << >"$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
    33         -    package ifneeded tdomhtml $(DOTVERSION) "set _V_ $(DOTVERSION); source [list [file join $$dir tdomhtml.tcl]]"
    34         -<<
    35         -
    36         -install-docs:
    37         -#	@echo Installing documentation files to '$(DOC_INSTALL_DIR)'
    38         -#	@if exist $(DOCDIR) $(CPY) $(DOCDIR)\*.n "$(DOC_INSTALL_DIR)"

Changes to extensions/tnc/Makefile.in.

    82     82   pkgdatadir	= $(datadir)/$(PKG_DIR)
    83     83   pkglibdir	= $(libdir)/$(PKG_DIR)
    84     84   pkgincludedir	= $(includedir)/$(PKG_DIR)
    85     85   
    86     86   top_builddir	= .
    87     87   
    88     88   INSTALL_OPTIONS =
    89         -INSTALL		= $(SHELL) $(srcdir)/../../tclconfig/install-sh -c ${INSTALL_OPTIONS}
           89  +INSTALL		= $(SHELL) $(srcdir)/tclconfig/install-sh -c ${INSTALL_OPTIONS}
    90     90   INSTALL_DATA_DIR = ${INSTALL} -d -m 755
    91     91   INSTALL_PROGRAM	= ${INSTALL} -m 555
    92     92   INSTALL_DATA	= ${INSTALL} -m 444
    93     93   INSTALL_SCRIPT	= ${INSTALL_PROGRAM}
    94     94   INSTALL_LIBRARY	= ${INSTALL_DATA}
    95     95   
    96     96   PACKAGE_NAME	= @PACKAGE_NAME@
................................................................................
   177    177   # TEA TARGETS.  Please note that the "libraries:" target refers to platform
   178    178   # independent files, and the "binaries:" target includes executable programs and
   179    179   # platform-dependent libraries.  Modify these targets so that they install
   180    180   # the various pieces of your package.  The make and install rules
   181    181   # for the BINARIES that you specified above have already been done.
   182    182   #========================================================================
   183    183   
   184         -all: binaries libraries
          184  +all: binaries libraries doc
   185    185   
   186    186   #========================================================================
   187    187   # The binaries target builds executable programs, Windows .dll's, unix
   188    188   # shared/static libraries, and any other platform-dependent files.
   189    189   # The list of targets to build for "binaries:" is specified at the top
   190    190   # of the Makefile, in the "BINARIES" variable.
   191    191   #========================================================================
   192    192   
   193         -binaries: $(BINARIES) pkgIndex.tcl-hand
          193  +binaries: $(BINARIES)
   194    194   
   195    195   libraries:
   196    196   
   197    197   #========================================================================
   198    198   # Your doc target should differentiate from doc builds (by the developer)
   199    199   # and doc installs (see install-doc), which just install the docs on the
   200    200   # end user machine when building from source.
   201    201   #========================================================================
   202    202   
   203    203   doc:
          204  +	@echo "If you have documentation to create, place the commands to"
          205  +	@echo "build the docs in the 'doc:' target.  For example:"
          206  +	@echo "        xml2nroff sample.xml > sample.n"
          207  +	@echo "        xml2html sample.xml > sample.html"
   204    208   
   205         -install: all install-binaries install-libraries
          209  +install: all install-binaries install-libraries install-doc
   206    210   
   207    211   install-binaries: binaries install-lib-binaries install-bin-binaries
   208    212   
   209    213   #========================================================================
   210    214   # This rule installs platform-independent files, such as header files.
   211    215   # The list=...; for p in $$list handles the empty list case x-platform.
   212    216   #========================================================================
   213    217   
   214    218   install-libraries: libraries
   215    219   	@$(INSTALL_DATA_DIR) $(DESTDIR)$(includedir)
          220  +	@echo "Installing header files in $(DESTDIR)$(includedir)"
          221  +	@list='$(PKG_HEADERS)'; for i in $$list; do \
          222  +	    echo "Installing $(srcdir)/$$i" ; \
          223  +	    $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \
          224  +	done;
   216    225   
   217    226   #========================================================================
   218    227   # Install documentation.  Unix manpages should go in the $(mandir)
   219    228   # directory.
   220    229   #========================================================================
   221    230   
   222    231   install-doc: doc
................................................................................
   284    293   #========================================================================
   285    294   
   286    295   VPATH = $(srcdir):$(srcdir)/generic:$(srcdir)/unix:$(srcdir)/win:$(srcdir)/macosx
   287    296   
   288    297   .c.@OBJEXT@:
   289    298   	$(COMPILE) -c `@CYGPATH@ $<` -o $@
   290    299   
   291         -#========================================================================
   292         -# Create the pkgIndex.tcl file.
   293         -#========================================================================
   294         -
   295         -pkgIndex.tcl-hand:
   296         -	@(echo 'package ifneeded $(PACKAGE_NAME) $(PACKAGE_VERSION) \
   297         -	"package require tdom;\
   298         -	 load [list [file join $$dir $(PKG_LIB_FILE)]];"'\
   299         -	) > pkgIndex.tcl
   300         -
   301    300   #========================================================================
   302    301   # Distribution creation
   303    302   # You may need to tweak this target to make it work correctly.
   304    303   #========================================================================
   305    304   
   306    305   #COMPRESS	= tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
   307    306   COMPRESS	= tar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)

Changes to extensions/tnc/configure.

   638    638   STLIB_LD
   639    639   CFLAGS_WARNING
   640    640   CFLAGS_OPTIMIZE
   641    641   CFLAGS_DEBUG
   642    642   RC
   643    643   CELIB_DIR
   644    644   AR
   645         -STUBS_BUILD
   646    645   SHARED_BUILD
   647    646   TCL_THREADS
   648    647   TCL_INCLUDES
   649    648   PKG_OBJECTS
   650    649   PKG_SOURCES
   651    650   TDOM_SRC_DIR
   652    651   TDOM_STUB_LIB_SPEC
   653    652   TDOM_VERSION
   654    653   MATH_LIBS
   655    654   EGREP
   656    655   GREP
   657    656   RANLIB
   658    657   SET_MAKE
   659         -INSTALL_LIBRARY
   660         -INSTALL_SCRIPT
   661         -INSTALL_PROGRAM
   662         -INSTALL_DATA
   663         -INSTALL_DATA_DIR
   664         -INSTALL
   665    658   CPP
   666    659   TCL_SHLIB_LD_LIBS
   667    660   TCL_LD_FLAGS
   668    661   TCL_EXTRA_CFLAGS
   669    662   TCL_DEFS
   670    663   TCL_LIBS
   671    664   CLEANFILES
................................................................................
   738    731   ac_user_opts='
   739    732   enable_option_checking
   740    733   with_tcl
   741    734   with_tdom
   742    735   with_tclinclude
   743    736   enable_threads
   744    737   enable_shared
   745         -enable_stubs
   746    738   enable_64bit
   747    739   enable_64bit_vis
   748    740   enable_rpath
   749    741   enable_wince
   750    742   with_celib
   751    743   enable_symbols
   752    744   '
................................................................................
  1366   1358   
  1367   1359   Optional Features:
  1368   1360     --disable-option-checking  ignore unrecognized --enable/--with options
  1369   1361     --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  1370   1362     --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  1371   1363     --enable-threads        build with threads
  1372   1364     --enable-shared         build and link with shared libraries (default: on)
  1373         -  --enable-stubs          build and link with stub libraries. Always true for
  1374         -                          shared builds (default: on)
  1375   1365     --enable-64bit          enable 64bit support (default: off)
  1376   1366     --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
  1377   1367     --disable-rpath         disable rpath support (default: on)
  1378   1368     --enable-wince          enable Win/CE support (where applicable)
  1379   1369     --enable-symbols        build with debugging symbols (default: off)
  1380   1370   
  1381   1371   Optional Packages:
................................................................................
  2183   2173   # This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
  2184   2174   # as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
  2185   2175   #--------------------------------------------------------------------
  2186   2176   
  2187   2177   
  2188   2178       # TEA extensions pass this us the version of TEA they think they
  2189   2179       # are compatible with.
  2190         -    TEA_VERSION="3.10"
         2180  +    TEA_VERSION="3.9"
  2191   2181   
  2192   2182       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct TEA configuration" >&5
  2193   2183   $as_echo_n "checking for correct TEA configuration... " >&6; }
  2194   2184       if test x"${PACKAGE_NAME}" = x ; then
  2195   2185   	as_fn_error $? "
  2196         -The PACKAGE_NAME variable must be defined by your TEA configure.ac" "$LINENO" 5
         2186  +The PACKAGE_NAME variable must be defined by your TEA configure.in" "$LINENO" 5
  2197   2187       fi
  2198         -    if test x"3.10" = x ; then
         2188  +    if test x"3.9" = x ; then
  2199   2189   	as_fn_error $? "
  2200   2190   TEA version not specified." "$LINENO" 5
  2201         -    elif test "3.10" != "${TEA_VERSION}" ; then
  2202         -	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: warning: requested TEA version \"3.10\", have \"${TEA_VERSION}\"" >&5
  2203         -$as_echo "warning: requested TEA version \"3.10\", have \"${TEA_VERSION}\"" >&6; }
         2191  +    elif test "3.9" != "${TEA_VERSION}" ; then
         2192  +	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&5
         2193  +$as_echo "warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&6; }
  2204   2194       else
  2205   2195   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (TEA ${TEA_VERSION})" >&5
  2206   2196   $as_echo "ok (TEA ${TEA_VERSION})" >&6; }
  2207   2197       fi
  2208   2198   
  2209   2199       # If the user did not set CFLAGS, set it now to keep macros
  2210   2200       # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
................................................................................
  2227   2217   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  2228   2218   for as_dir in $PATH
  2229   2219   do
  2230   2220     IFS=$as_save_IFS
  2231   2221     test -z "$as_dir" && as_dir=.
  2232   2222       for ac_exec_ext in '' $ac_executable_extensions; do
  2233   2223     if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  2234         -    ac_cv_prog_CYGPATH="cygpath -m"
         2224  +    ac_cv_prog_CYGPATH="cygpath -w"
  2235   2225       $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  2236   2226       break 2
  2237   2227     fi
  2238   2228   done
  2239   2229     done
  2240   2230   IFS=$as_save_IFS
  2241   2231   
................................................................................
  2252   2242   fi
  2253   2243   
  2254   2244   
  2255   2245   	    EXEEXT=".exe"
  2256   2246   	    TEA_PLATFORM="windows"
  2257   2247   	    ;;
  2258   2248   	*CYGWIN_*)
         2249  +	    CYGPATH=echo
  2259   2250   	    EXEEXT=".exe"
  2260         -	    # CYGPATH and TEA_PLATFORM are determined later in LOAD_TCLCONFIG
         2251  +	    # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
  2261   2252   	    ;;
  2262   2253   	*)
  2263   2254   	    CYGPATH=echo
  2264   2255   	    # Maybe we are cross-compiling....
  2265   2256   	    case ${host_alias} in
  2266   2257   		*mingw32*)
  2267   2258   		EXEEXT=".exe"
................................................................................
  2436   2427   	    fi
  2437   2428   
  2438   2429   	    # check in a few common install locations
  2439   2430   	    if test x"${ac_cv_c_tclconfig}" = x ; then
  2440   2431   		for i in `ls -d ${libdir} 2>/dev/null` \
  2441   2432   			`ls -d ${exec_prefix}/lib 2>/dev/null` \
  2442   2433   			`ls -d ${prefix}/lib 2>/dev/null` \
  2443         -			`ls -d /usr/contrib/lib 2>/dev/null` \
  2444   2434   			`ls -d /usr/local/lib 2>/dev/null` \
  2445         -			`ls -d /usr/pkg/lib 2>/dev/null` \
         2435  +			`ls -d /usr/contrib/lib 2>/dev/null` \
  2446   2436   			`ls -d /usr/lib 2>/dev/null` \
  2447   2437   			`ls -d /usr/lib64 2>/dev/null` \
  2448         -			`ls -d /usr/lib/tcl8.6 2>/dev/null` \
  2449         -			`ls -d /usr/lib/tcl8.5 2>/dev/null` \
  2450   2438   			; do
  2451   2439   		    if test -f "$i/tclConfig.sh" ; then
  2452   2440   			ac_cv_c_tclconfig="`(cd $i; pwd)`"
  2453   2441   			break
  2454   2442   		    fi
  2455   2443   		done
  2456   2444   	    fi
................................................................................
  3362   3350   	    #endif
  3363   3351   
  3364   3352     ;
  3365   3353     return 0;
  3366   3354   }
  3367   3355   _ACEOF
  3368   3356   if ac_fn_c_try_compile "$LINENO"; then :
  3369         -
  3370         -	    TEA_PLATFORM="unix"
  3371         -	    CYGPATH=echo
  3372         -
         3357  +  TEA_PLATFORM="unix"
  3373   3358   else
  3374         -
  3375         -	    TEA_PLATFORM="windows"
  3376         -	    # Extract the first word of "cygpath", so it can be a program name with args.
  3377         -set dummy cygpath; ac_word=$2
  3378         -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  3379         -$as_echo_n "checking for $ac_word... " >&6; }
  3380         -if ${ac_cv_prog_CYGPATH+:} false; then :
  3381         -  $as_echo_n "(cached) " >&6
  3382         -else
  3383         -  if test -n "$CYGPATH"; then
  3384         -  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
  3385         -else
  3386         -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  3387         -for as_dir in $PATH
  3388         -do
  3389         -  IFS=$as_save_IFS
  3390         -  test -z "$as_dir" && as_dir=.
  3391         -    for ac_exec_ext in '' $ac_executable_extensions; do
  3392         -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  3393         -    ac_cv_prog_CYGPATH="cygpath -m"
  3394         -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  3395         -    break 2
  3396         -  fi
  3397         -done
  3398         -  done
  3399         -IFS=$as_save_IFS
  3400         -
  3401         -  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
  3402         -fi
  3403         -fi
  3404         -CYGPATH=$ac_cv_prog_CYGPATH
  3405         -if test -n "$CYGPATH"; then
  3406         -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
  3407         -$as_echo "$CYGPATH" >&6; }
  3408         -else
  3409         -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  3410         -$as_echo "no" >&6; }
  3411         -fi
  3412         -
  3413         -
         3359  +  TEA_PLATFORM="windows"
  3414   3360   
  3415   3361   fi
  3416   3362   rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  3417   3363       CC=$hold_cc
  3418   3364       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEA_PLATFORM" >&5
  3419   3365   $as_echo "$TEA_PLATFORM" >&6; }
  3420   3366   
................................................................................
  4161   4107   fi
  4162   4108   
  4163   4109   ac_ext=c
  4164   4110   ac_cpp='$CPP $CPPFLAGS'
  4165   4111   ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  4166   4112   ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  4167   4113   ac_compiler_gnu=$ac_cv_c_compiler_gnu
  4168         -
  4169         -
  4170         -    INSTALL='$(SHELL) $(srcdir)/tclconfig/install-sh -c'
  4171         -    INSTALL_DATA_DIR='${INSTALL} -d -m 755'
  4172         -    INSTALL_DATA='${INSTALL} -m 644'
  4173         -    INSTALL_PROGRAM='${INSTALL}'
  4174         -    INSTALL_SCRIPT='${INSTALL}'
  4175         -    INSTALL_LIBRARY='${INSTALL_DATA}'
  4176         -
  4177         -
  4178         -
  4179         -
  4180         -
  4181         -
  4182   4114   
  4183   4115   
  4184   4116       #--------------------------------------------------------------------
  4185   4117       # Checks to see if the make program sets the $MAKE variable.
  4186   4118       #--------------------------------------------------------------------
  4187   4119   
  4188   4120       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
................................................................................
  5560   5492   # You can add more files to clean if your extension creates any extra
  5561   5493   # files.
  5562   5494   #
  5563   5495   # TEA_ADD_* any platform specific compiler/build info here.
  5564   5496   #--------------------------------------------------------------------
  5565   5497   
  5566   5498   if test "${TEA_PLATFORM}" = "windows" ; then
  5567         -    #AC_DEFINE(BUILD_tnc, 1, [Build windows export dll])
         5499  +
         5500  +$as_echo "#define BUILD_tnc 1" >>confdefs.h
         5501  +
  5568   5502       CLEANFILES="pkgIndex.tcl *.lib *.dll *.exp *.ilk *.pdb vc*.pch"
  5569   5503       #TEA_ADD_SOURCES([win/winFile.c])
  5570   5504       #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"])
  5571   5505   else
  5572   5506       CLEANFILES="pkgIndex.tcl"
  5573   5507       #TEA_ADD_SOURCES([unix/unixFile.c])
  5574   5508       #TEA_ADD_LIBS([-lsuperfly])
................................................................................
  6007   5941   #--------------------------------------------------------------------
  6008   5942   
  6009   5943   
  6010   5944       { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build libraries" >&5
  6011   5945   $as_echo_n "checking how to build libraries... " >&6; }
  6012   5946       # Check whether --enable-shared was given.
  6013   5947   if test "${enable_shared+set}" = set; then :
  6014         -  enableval=$enable_shared; shared_ok=$enableval
         5948  +  enableval=$enable_shared; tcl_ok=$enableval
  6015   5949   else
  6016         -  shared_ok=yes
         5950  +  tcl_ok=yes
  6017   5951   fi
  6018   5952   
  6019   5953   
  6020   5954       if test "${enable_shared+set}" = set; then
  6021   5955   	enableval="$enable_shared"
  6022         -	shared_ok=$enableval
         5956  +	tcl_ok=$enableval
  6023   5957       else
  6024         -	shared_ok=yes
         5958  +	tcl_ok=yes
  6025   5959       fi
  6026   5960   
  6027         -    # Check whether --enable-stubs was given.
  6028         -if test "${enable_stubs+set}" = set; then :
  6029         -  enableval=$enable_stubs; stubs_ok=$enableval
  6030         -else
  6031         -  stubs_ok=yes
  6032         -fi
  6033         -
  6034         -
  6035         -    if test "${enable_stubs+set}" = set; then
  6036         -	enableval="$enable_stubs"
  6037         -	stubs_ok=$enableval
  6038         -    else
  6039         -	stubs_ok=yes
  6040         -    fi
  6041         -
  6042         -    # Stubs are always enabled for shared builds
  6043         -    if test "$shared_ok" = "yes" ; then
         5961  +    if test "$tcl_ok" = "yes" ; then
  6044   5962   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5
  6045   5963   $as_echo "shared" >&6; }
  6046   5964   	SHARED_BUILD=1
  6047         -        STUBS_BUILD=1
  6048   5965       else
  6049   5966   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
  6050   5967   $as_echo "static" >&6; }
  6051   5968   	SHARED_BUILD=0
  6052   5969   
  6053   5970   $as_echo "#define STATIC_BUILD 1" >>confdefs.h
  6054   5971   
  6055         -        if test "$stubs_ok" = "yes" ; then
  6056         -          STUBS_BUILD=1
  6057         -        else
  6058         -          STUBS_BUILD=0
  6059         -        fi
  6060   5972       fi
  6061         -    if test "${STUBS_BUILD}" = "1" ; then
  6062         -
  6063         -$as_echo "#define USE_TCL_STUBS 1" >>confdefs.h
  6064         -
  6065         -
  6066         -$as_echo "#define USE_TCLOO_STUBS 1" >>confdefs.h
  6067         -
  6068         -      if test "${TEA_WINDOWINGSYSTEM}" != ""; then
  6069         -
  6070         -$as_echo "#define USE_TK_STUBS 1" >>confdefs.h
  6071         -
  6072         -      fi
  6073         -    fi
  6074         -
  6075         -
  6076   5973   
  6077   5974   
  6078   5975   
  6079   5976   #--------------------------------------------------------------------
  6080   5977   # This macro figures out what flags to use with the compiler/linker
  6081   5978   # when building shared/static debug/optimized objects.  This information
  6082   5979   # can be taken from the tclConfig.sh file, but this figures it all out.
................................................................................
  6244   6141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_visibility_hidden" >&5
  6245   6142   $as_echo "$tcl_cv_cc_visibility_hidden" >&6; }
  6246   6143       if test $tcl_cv_cc_visibility_hidden = yes; then :
  6247   6144   
  6248   6145   
  6249   6146   $as_echo "#define MODULE_SCOPE extern __attribute__((__visibility__(\"hidden\")))" >>confdefs.h
  6250   6147   
  6251         -
  6252         -$as_echo "#define HAVE_HIDDEN 1" >>confdefs.h
  6253         -
  6254   6148   
  6255   6149   fi
  6256   6150   
  6257   6151       # Step 0.d: Disable -rpath support?
  6258   6152   
  6259   6153       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if rpath support is requested" >&5
  6260   6154   $as_echo_n "checking if rpath support is requested... " >&6; }
................................................................................
  6441   6335   else
  6442   6336     AR="$ac_cv_prog_AR"
  6443   6337   fi
  6444   6338   
  6445   6339       STLIB_LD='${AR} cr'
  6446   6340       LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
  6447   6341       if test "x$SHLIB_VERSION" = x; then :
  6448         -  SHLIB_VERSION=""
  6449         -else
  6450         -  SHLIB_VERSION=".$SHLIB_VERSION"
         6342  +  SHLIB_VERSION="1.0"
  6451   6343   fi
  6452   6344       case $system in
  6453   6345   	# TEA specific:
  6454   6346   	windows)
  6455   6347   	    # This is a 2-stage check to make sure we have the 64-bit SDK
  6456   6348   	    # We have to know where the SDK is installed.
  6457   6349   	    # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
................................................................................
  6607   6499   
  6608   6500   	    if test "$GCC" != "yes" ; then
  6609   6501   	        if test "${SHARED_BUILD}" = "0" ; then
  6610   6502   		    runtime=-MT
  6611   6503   	        else
  6612   6504   		    runtime=-MD
  6613   6505   	        fi
  6614         -	        case "x`echo \${VisualStudioVersion}`" in
  6615         -	            x1[4-9]*)
  6616         -		        lflags="${lflags} -nodefaultlib:libucrt.lib"
  6617         -
  6618         -    vars="ucrt.lib"
  6619         -    for i in $vars; do
  6620         -	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
  6621         -	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
  6622         -	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
  6623         -	fi
  6624         -	PKG_LIBS="$PKG_LIBS $i"
  6625         -    done
  6626         -
  6627         -
  6628         -	            ;;
  6629         -	            *)
  6630         -	            ;;
  6631         -	        esac
  6632   6506   
  6633   6507                   if test "$do64bit" != "no" ; then
  6634   6508   		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
  6635   6509   		    CC="\"${PATH64}/cl.exe\""
  6636   6510   		    CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
  6637   6511   		    RC="\"${MSSDK}/bin/rc.exe\""
  6638         -		    lflags="${lflags} -nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
         6512  +		    lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
  6639   6513   		    LINKBIN="\"${PATH64}/link.exe\""
  6640   6514   		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
  6641   6515   		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
  6642   6516   		    # Avoid 'unresolved external symbol __security_cookie'
  6643   6517   		    # errors, c.f. http://support.microsoft.com/?id=894573
  6644   6518   
  6645   6519       vars="bufferoverflowU.lib"
................................................................................
  6683   6557   cat >>confdefs.h <<_ACEOF
  6684   6558   #define UNDER_CE $CEVERSION
  6685   6559   _ACEOF
  6686   6560   
  6687   6561   		    CFLAGS_DEBUG="-nologo -Zi -Od"
  6688   6562   		    CFLAGS_OPTIMIZE="-nologo -Ox"
  6689   6563   		    lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
  6690         -		    lflags="${lflags} -MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
         6564  +		    lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
  6691   6565   		    LINKBIN="\"${CEBINROOT}/link.exe\""
  6692   6566   
  6693   6567   		else
  6694   6568   		    RC="rc"
  6695         -		    lflags="${lflags} -nologo"
  6696         -		    LINKBIN="link"
         6569  +		    lflags="-nologo"
         6570  +    		    LINKBIN="link"
  6697   6571   		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
  6698   6572   		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
  6699   6573   		fi
  6700   6574   	    fi
  6701   6575   
  6702   6576   	    if test "$GCC" = "yes"; then
  6703   6577   		# mingw gcc mode
................................................................................
  6804   6678   $as_echo_n "checking for cross-compile version of gcc... " >&6; }
  6805   6679   if ${ac_cv_cross+:} false; then :
  6806   6680     $as_echo_n "(cached) " >&6
  6807   6681   else
  6808   6682     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  6809   6683   /* end confdefs.h.  */
  6810   6684   
  6811         -			    #ifdef _WIN32
         6685  +			    #ifdef __WIN32__
  6812   6686   				#error cross-compiler
  6813   6687   			    #endif
  6814   6688   
  6815   6689   int
  6816   6690   main ()
  6817   6691   {
  6818   6692   
................................................................................
  7011   6885   	    LDFLAGS="$LDFLAGS -export-dynamic"
  7012   6886   	    CC_SEARCH_FLAGS=""
  7013   6887   	    LD_SEARCH_FLAGS=""
  7014   6888   	    ;;
  7015   6889   	CYGWIN_*)
  7016   6890   	    SHLIB_CFLAGS=""
  7017   6891   	    SHLIB_LD='${CC} -shared'
  7018         -	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$@.a"
  7019   6892   	    SHLIB_SUFFIX=".dll"
  7020   6893   	    EXEEXT=".exe"
  7021         -	    do64bit_ok=yes
  7022   6894   	    CC_SEARCH_FLAGS=""
  7023   6895   	    LD_SEARCH_FLAGS=""
  7024   6896   	    ;;
  7025   6897   	Haiku*)
  7026   6898   	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
  7027   6899   	    SHLIB_CFLAGS="-fPIC"
  7028   6900   	    SHLIB_SUFFIX=".so"
................................................................................
  7325   7197   		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  7326   7198   		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  7327   7199   fi
  7328   7200   	    ;;
  7329   7201   	OpenBSD-*)
  7330   7202   	    arch=`arch -s`
  7331   7203   	    case "$arch" in
  7332         -	    alpha|sparc64)
         7204  +	    m88k|vax)
         7205  +		SHLIB_SUFFIX=""
         7206  +		SHARED_LIB_SUFFIX=""
         7207  +		;;
         7208  +	    *)
  7333   7209   		SHLIB_CFLAGS="-fPIC"
         7210  +		SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
         7211  +		SHLIB_SUFFIX=".so"
         7212  +		if test $doRpath = yes; then :
         7213  +
         7214  +		    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
         7215  +fi
         7216  +		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
         7217  +		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
         7218  +		;;
         7219  +	    esac
         7220  +	    case "$arch" in
         7221  +	    m88k|vax)
         7222  +		CFLAGS_OPTIMIZE="-O1"
  7334   7223   		;;
  7335   7224   	    *)
  7336         -		SHLIB_CFLAGS="-fpic"
         7225  +		CFLAGS_OPTIMIZE="-O2"
  7337   7226   		;;
  7338   7227   	    esac
  7339         -	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
  7340         -	    SHLIB_SUFFIX=".so"
  7341         -	    if test $doRpath = yes; then :
         7228  +	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
         7229  +$as_echo_n "checking for ELF... " >&6; }
         7230  +if ${tcl_cv_ld_elf+:} false; then :
         7231  +  $as_echo_n "(cached) " >&6
         7232  +else
  7342   7233   
  7343         -		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
         7234  +		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
         7235  +/* end confdefs.h.  */
         7236  +
         7237  +#ifdef __ELF__
         7238  +	yes
         7239  +#endif
         7240  +
         7241  +_ACEOF
         7242  +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
         7243  +  $EGREP "yes" >/dev/null 2>&1; then :
         7244  +  tcl_cv_ld_elf=yes
         7245  +else
         7246  +  tcl_cv_ld_elf=no
  7344   7247   fi
  7345         -	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
  7346         -	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}'
  7347         -	    LDFLAGS="-Wl,-export-dynamic"
  7348         -	    CFLAGS_OPTIMIZE="-O2"
         7248  +rm -f conftest*
         7249  +
         7250  +fi
         7251  +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_elf" >&5
         7252  +$as_echo "$tcl_cv_ld_elf" >&6; }
         7253  +	    if test $tcl_cv_ld_elf = yes; then :
         7254  +
         7255  +		LDFLAGS=-Wl,-export-dynamic
         7256  +
         7257  +else
         7258  +  LDFLAGS=""
         7259  +fi
  7349   7260   	    if test "${TCL_THREADS}" = "1"; then :
  7350   7261   
  7351   7262   		# On OpenBSD:	Compile with -pthread
  7352   7263   		#		Don't link with -lpthread
  7353   7264   		LIBS=`echo $LIBS | sed s/-lpthread//`
  7354   7265   		CFLAGS="$CFLAGS -pthread"
  7355   7266   
................................................................................
  7378   7289   
  7379   7290   fi
  7380   7291   	    ;;
  7381   7292   	FreeBSD-*)
  7382   7293   	    # This configuration from FreeBSD Ports.
  7383   7294   	    SHLIB_CFLAGS="-fPIC"
  7384   7295   	    SHLIB_LD="${CC} -shared"
  7385         -	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,-soname,\$@"
         7296  +	    TCL_SHLIB_LD_EXTRAS="-Wl,-soname \$@"
  7386   7297   	    SHLIB_SUFFIX=".so"
  7387   7298   	    LDFLAGS=""
  7388   7299   	    if test $doRpath = yes; then :
  7389   7300   
  7390   7301   		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  7391         -		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
         7302  +		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
  7392   7303   fi
  7393   7304   	    if test "${TCL_THREADS}" = "1"; then :
  7394   7305   
  7395   7306   		# The -pthread needs to go in the LDFLAGS, not LIBS
  7396   7307   		LIBS=`echo $LIBS | sed s/-pthread//`
  7397   7308   		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
  7398   7309   		LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
  7399   7310   fi
  7400         -	    case $system in
  7401         -	    FreeBSD-3.*)
  7402         -		# Version numbers are dot-stripped by system policy.
  7403         -		TCL_TRIM_DOTS=`echo ${PACKAGE_VERSION} | tr -d .`
  7404         -		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
  7405         -		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
  7406         -		TCL_LIB_VERSIONS_OK=nodots
  7407         -		;;
  7408         -	    esac
         7311  +	    # Version numbers are dot-stripped by system policy.
         7312  +	    TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
         7313  +	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
         7314  +	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
         7315  +	    TCL_LIB_VERSIONS_OK=nodots
  7409   7316   	    ;;
  7410   7317   	Darwin-*)
  7411   7318   	    CFLAGS_OPTIMIZE="-Os"
  7412   7319   	    SHLIB_CFLAGS="-fno-common"
  7413   7320   	    # To avoid discrepancies between what headers configure sees during
  7414   7321   	    # preprocessing tests and compiling tests, move any -isysroot and
  7415   7322   	    # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
................................................................................
  7763   7670   	    if test "$GCC" = yes; then :
  7764   7671   
  7765   7672   		SHLIB_CFLAGS="-fPIC -melf"
  7766   7673   		LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
  7767   7674   
  7768   7675   else
  7769   7676   
  7770         -		SHLIB_CFLAGS="-Kpic -belf"
  7771         -		LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
         7677  +	       SHLIB_CFLAGS="-Kpic -belf"
         7678  +	       LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
  7772   7679   
  7773   7680   fi
  7774   7681   	    SHLIB_LD="ld -G"
  7775   7682   	    SHLIB_LD_LIBS=""
  7776   7683   	    SHLIB_SUFFIX=".so"
  7777   7684   	    CC_SEARCH_FLAGS=""
  7778   7685   	    LD_SEARCH_FLAGS=""
................................................................................
  8023   7930   fi
  8024   7931   
  8025   7932       if test "$tcl_cv_cc_visibility_hidden" != yes; then :
  8026   7933   
  8027   7934   
  8028   7935   $as_echo "#define MODULE_SCOPE extern" >>confdefs.h
  8029   7936   
         7937  +
         7938  +$as_echo "#define NO_VIZ /**/" >>confdefs.h
         7939  +
  8030   7940   
  8031   7941   fi
  8032   7942   
  8033   7943       if test "$SHARED_LIB_SUFFIX" = ""; then :
  8034   7944   
  8035   7945       # TEA specific: use PACKAGE_VERSION instead of VERSION
  8036   7946       SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
................................................................................
  8037   7947   fi
  8038   7948       if test "$UNSHARED_LIB_SUFFIX" = ""; then :
  8039   7949   
  8040   7950       # TEA specific: use PACKAGE_VERSION instead of VERSION
  8041   7951       UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
  8042   7952   fi
  8043   7953   
  8044         -    if test "${GCC}" = "yes" -a ${SHLIB_SUFFIX} = ".dll"; then
         7954  +    if test "${GCC}" = "yes" ; then
  8045   7955   	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SEH support in compiler" >&5
  8046   7956   $as_echo_n "checking for SEH support in compiler... " >&6; }
  8047   7957   if ${tcl_cv_seh+:} false; then :
  8048   7958     $as_echo_n "(cached) " >&6
  8049   7959   else
  8050   7960     if test "$cross_compiling" = yes; then :
  8051   7961     tcl_cv_seh=no
  8052   7962   else
  8053   7963     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  8054   7964   /* end confdefs.h.  */
  8055   7965   
  8056         -#define WIN32_LEAN_AND_MEAN
  8057         -#include <windows.h>
  8058         -#undef WIN32_LEAN_AND_MEAN
         7966  +	    #define WIN32_LEAN_AND_MEAN
         7967  +	    #include <windows.h>
         7968  +	    #undef WIN32_LEAN_AND_MEAN
  8059   7969   
  8060   7970   	    int main(int argc, char** argv) {
  8061   7971   		int a, b = 0;
  8062   7972   		__try {
  8063   7973   		    a = 666 / b;
  8064   7974   		}
  8065   7975   		__except (EXCEPTION_EXECUTE_HANDLER) {
................................................................................
  8140   8050   $as_echo_n "checking for winnt.h that ignores VOID define... " >&6; }
  8141   8051   if ${tcl_cv_winnt_ignore_void+:} false; then :
  8142   8052     $as_echo_n "(cached) " >&6
  8143   8053   else
  8144   8054     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  8145   8055   /* end confdefs.h.  */
  8146   8056   
  8147         -#define VOID void
  8148         -#define WIN32_LEAN_AND_MEAN
  8149         -#include <windows.h>
  8150         -#undef WIN32_LEAN_AND_MEAN
         8057  +		#define VOID void
         8058  +		#define WIN32_LEAN_AND_MEAN
         8059  +		#include <windows.h>
         8060  +		#undef WIN32_LEAN_AND_MEAN
  8151   8061   
  8152   8062   int
  8153   8063   main ()
  8154   8064   {
  8155   8065   
  8156   8066   		CHAR c;
  8157   8067   		SHORT s;
................................................................................
  8172   8082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_winnt_ignore_void" >&5
  8173   8083   $as_echo "$tcl_cv_winnt_ignore_void" >&6; }
  8174   8084   	if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
  8175   8085   
  8176   8086   $as_echo "#define HAVE_WINNT_IGNORE_VOID 1" >>confdefs.h
  8177   8087   
  8178   8088   	fi
  8179         -    fi
  8180   8089   
  8181   8090   	# See if the compiler supports casting to a union type.
  8182   8091   	# This is used to stop gcc from printing a compiler
  8183   8092   	# warning when initializing a union member.
  8184   8093   
  8185   8094   	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cast to union support" >&5
  8186   8095   $as_echo_n "checking for cast to union support... " >&6; }
................................................................................
  8212   8121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cast_to_union" >&5
  8213   8122   $as_echo "$tcl_cv_cast_to_union" >&6; }
  8214   8123   	if test "$tcl_cv_cast_to_union" = "yes"; then
  8215   8124   
  8216   8125   $as_echo "#define HAVE_CAST_TO_UNION 1" >>confdefs.h
  8217   8126   
  8218   8127   	fi
         8128  +    fi
  8219   8129   
  8220   8130   
  8221   8131   
  8222   8132   
  8223   8133   
  8224   8134   
  8225   8135   
................................................................................
  8459   8369   if ${tcl_cv_struct_dirent64+:} false; then :
  8460   8370     $as_echo_n "(cached) " >&6
  8461   8371   else
  8462   8372   
  8463   8373   	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  8464   8374   /* end confdefs.h.  */
  8465   8375   #include <sys/types.h>
  8466         -#include <dirent.h>
         8376  +#include <sys/dirent.h>
  8467   8377   int
  8468   8378   main ()
  8469   8379   {
  8470   8380   struct dirent64 p;
  8471   8381     ;
  8472   8382     return 0;
  8473   8383   }
................................................................................
  8668   8578   
  8669   8579       CLEANFILES="$CLEANFILES *.manifest"
  8670   8580   
  8671   8581   
  8672   8582   fi
  8673   8583   rm -f conftest*
  8674   8584   
  8675         -	MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -out:\$@ \$(PKG_STUB_OBJECTS)"
         8585  +	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(PKG_STUB_OBJECTS)"
  8676   8586       else
  8677   8587   	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
  8678   8588   	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
  8679   8589   	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
  8680   8590       fi
  8681   8591   
  8682   8592       if test "${SHARED_BUILD}" = "1" ; then
................................................................................
  8691   8601       # substituted. (@@@ Might not be necessary anymore)
  8692   8602       #--------------------------------------------------------------------
  8693   8603   
  8694   8604       if test "${TEA_PLATFORM}" = "windows" ; then
  8695   8605   	if test "${SHARED_BUILD}" = "1" ; then
  8696   8606   	    # We force the unresolved linking of symbols that are really in
  8697   8607   	    # the private libraries of Tcl and Tk.
         8608  +	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
  8698   8609   	    if test x"${TK_BIN_DIR}" != x ; then
  8699   8610   		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
  8700   8611   	    fi
  8701         -	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
  8702         -	    if test "$GCC" = "yes"; then
  8703         -		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
  8704         -	    fi
  8705         -	    eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
         8612  +	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
  8706   8613   	else
  8707         -	    eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
  8708         -	    if test "$GCC" = "yes"; then
  8709         -		PKG_LIB_FILE=lib${PKG_LIB_FILE}
  8710         -	    fi
         8614  +	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
  8711   8615   	fi
  8712   8616   	# Some packages build their own stubs libraries
  8713         -	eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
         8617  +	eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
  8714   8618   	if test "$GCC" = "yes"; then
  8715   8619   	    PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
  8716   8620   	fi
  8717   8621   	# These aren't needed on Windows (either MSVC or gcc)
  8718   8622   	RANLIB=:
  8719   8623   	RANLIB_STUB=:
  8720   8624       else
  8721   8625   	RANLIB_STUB="${RANLIB}"
  8722   8626   	if test "${SHARED_BUILD}" = "1" ; then
  8723   8627   	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
  8724   8628   	    if test x"${TK_BIN_DIR}" != x ; then
  8725   8629   		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
  8726   8630   	    fi
  8727         -	    eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
         8631  +	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
  8728   8632   	    RANLIB=:
  8729   8633   	else
  8730         -	    eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
         8634  +	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
  8731   8635   	fi
  8732   8636   	# Some packages build their own stubs libraries
  8733         -	eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
         8637  +	eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
  8734   8638       fi
  8735   8639   
  8736   8640       # These are escaped so that only CFLAGS is picked up at configure time.
  8737   8641       # The other values will be substituted at make time.
  8738   8642       CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
  8739   8643       if test "${SHARED_BUILD}" = "1" ; then
  8740   8644   	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
................................................................................
  8759   8663   
  8760   8664   
  8761   8665       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclsh" >&5
  8762   8666   $as_echo_n "checking for tclsh... " >&6; }
  8763   8667       if test -f "${TCL_BIN_DIR}/Makefile" ; then
  8764   8668           # tclConfig.sh is in Tcl build directory
  8765   8669           if test "${TEA_PLATFORM}" = "windows"; then
  8766         -          if test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" ; then
  8767   8670               TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
  8768         -          elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}s${EXEEXT}" ; then
  8769         -            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}s${EXEEXT}"
  8770         -          elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}t${EXEEXT}" ; then
  8771         -            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}t${EXEEXT}"
  8772         -          elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}st${EXEEXT}" ; then
  8773         -            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}st${EXEEXT}"
  8774         -          fi
  8775   8671           else
  8776   8672               TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
  8777   8673           fi
  8778   8674       else
  8779   8675           # tclConfig.sh is in install location
  8780   8676           if test "${TEA_PLATFORM}" = "windows"; then
  8781   8677               TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"

Changes to extensions/tnc/configure.in.

    21     21   
    22     22   #--------------------------------------------------------------------
    23     23   # Call TEA_INIT as the first TEA_ macro to set up initial vars.
    24     24   # This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
    25     25   # as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
    26     26   #--------------------------------------------------------------------
    27     27   
    28         -TEA_INIT([3.10])
           28  +TEA_INIT([3.9])
    29     29   
    30     30   AC_CONFIG_AUX_DIR(../../tclconfig)
    31     31   
    32     32   #--------------------------------------------------------------------
    33     33   # Load the tclConfig.sh file
    34     34   #--------------------------------------------------------------------
    35     35   
................................................................................
    95     95   # You can add more files to clean if your extension creates any extra
    96     96   # files.
    97     97   #
    98     98   # TEA_ADD_* any platform specific compiler/build info here.
    99     99   #--------------------------------------------------------------------
   100    100   
   101    101   if test "${TEA_PLATFORM}" = "windows" ; then
   102         -    #AC_DEFINE(BUILD_tnc, 1, [Build windows export dll])
          102  +    AC_DEFINE(BUILD_tnc, 1, [Build windows export dll])
   103    103       CLEANFILES="pkgIndex.tcl *.lib *.dll *.exp *.ilk *.pdb vc*.pch"
   104    104       #TEA_ADD_SOURCES([win/winFile.c])
   105    105       #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"])
   106    106   else
   107    107       CLEANFILES="pkgIndex.tcl"
   108    108       #TEA_ADD_SOURCES([unix/unixFile.c])
   109    109       #TEA_ADD_LIBS([-lsuperfly])

Added extensions/tnc/makefile.vc.

            1  +#----------------------------------------------------------------------------
            2  +#   This is derivated from the tcl8.3 win makefile and surely not
            3  +#   perfect. It works for me. 
            4  +#   rolf ade, 2001 (rolf@pointsman.de)
            5  +#   
            6  +#
            7  +#
            8  +#   Project directories
            9  +#
           10  +#   ROOT   = top of source tree
           11  +#
           12  +#   TOOLS32 = location of VC++ 32-bit development tools.
           13  +#
           14  +#   INSTALLDIR = where the install- targets should copy the binaries and
           15  +#                support files
           16  +#
           17  +#----------------------------------------------------------------------------
           18  +
           19  +!if "$(MSVCDIR)" == ""
           20  +MSG = ^
           21  +You'll need to run vcvars32.bat from Developer Studio, first, to setup^
           22  +the environment.
           23  +!error $(MSG)
           24  +!endif
           25  +
           26  +
           27  +#          VC++ 2.0 header files are broken, so you need to use the
           28  +#          ones that come with the developer network CD's, or later
           29  +#          versions of VC++.
           30  +#
           31  +# INSTALLDIR = where the install- targets should copy the binaries and
           32  +#          support files
           33  +#
           34  +
           35  +# Set this to the appropriate value of /MACHINE: for your platform
           36  +MACHINE                = IX86
           37  +ROOT           = ..\..
           38  +INSTALLDIR     = c:\Progra~1\Tcl
           39  +
           40  +TOOLS32        = $(MSVCDIR)
           41  +TOOLS32_rc     = $(MSVCDIR)\..\common\MSDev98
           42  +
           43  +# Uncomment the following line to compile with thread support
           44  +#THREADDEFINES = -DTCL_THREADS=1
           45  +
           46  +# Set NODEBUG to 0 to compile with symbols
           47  +NODEBUG = 1
           48  +
           49  +# The following defines can be used to control the amount of debugging
           50  +# code that is added to the compilation.
           51  +#
           52  +#      -DTCL_MEM_DEBUG         Enables the debugging memory allocator.
           53  +#      -DTCL_COMPILE_DEBUG     Enables byte compilation logging.
           54  +#      -DTCL_COMPILE_STATS     Enables byte compilation statistics gathering.
           55  +#      -DUSE_TCLALLOC=0        Disables the Tcl memory allocator in favor
           56  +#                              of the native malloc implementation.  This is
           57  +#
           58  +# DEBUGDEFINES = -DTCL_MEM_DEBUG -DTCL_COMPILE_DEBUG -DTCL_COMPILE_STATS
           59  +# DEBUGDEFINES = -DUSE_TCLALLOC=0
           60  +
           61  +
           62  +#-------------------------------------------------------------------------
           63  +#
           64  +#   Do not modify below this line
           65  +#
           66  +#-------------------------------------------------------------------------
           67  +
           68  +NAMEPREFIX = libtnc
           69  +STUBPREFIX = $(NAMEPREFIX)stub
           70  +DOTVERSION = 0.3
           71  +PACKAGE_VERSION = \"0.3.0\"
           72  +VERSION = \"0.3\"
           73  +W32VERSION = 03
           74  +TDOMVER = 082
           75  +
           76  +BINROOT         = .
           77  +!IF "$(NODEBUG)" == "1"
           78  +TMPDIRNAME      =
           79  +DBGX            =
           80  +!ELSE
           81  +TMPDIRNAME      = Debug
           82  +DBGX            = d
           83  +!ENDIF
           84  +TMPDIR          = $(BINROOT)
           85  +OUTDIRNAME      = $(TMPDIRNAME)
           86  +OUTDIR          = $(TMPDIR)
           87  +TOP_DIR         = $(BINROOT)\..
           88  +
           89  +TNCLIB         = $(OUTDIR)\$(NAMEPREFIX)$(W32VERSION)$(DBGX).lib
           90  +TNCDLLNAME     = $(NAMEPREFIX)$(W32VERSION)$(DBGX).dll
           91  +TNCDLL         = $(OUTDIR)\$(TNCDLLNAME)
           92  +
           93  +# MKDIR           = .\mkd.bat
           94  +RM              = del
           95  +
           96  +LIB_INSTALL_DIR        = $(INSTALLDIR)\lib
           97  +BIN_INSTALL_DIR        = $(INSTALLDIR)\bin
           98  +SCRIPT_INSTALL_DIR     = $(INSTALLDIR)\lib\tcl$(DOTVERSION)
           99  +INCLUDE_INSTALL_DIR    = $(INSTALLDIR)\include
          100  +
          101  +
          102  +TNCOBJS = $(TMPDIR)\tnc.obj
          103  +
          104  +cc32           = "$(TOOLS32)\bin\cl.exe"
          105  +link32         = "$(TOOLS32)\bin\link.exe"
          106  +rc32           = "$(TOOLS32_rc)\bin\rc.exe"
          107  +include32      = -I"$(TOOLS32)\include"
          108  +libpath32      = /LIBPATH:"$(TOOLS32)\lib"
          109  +tcllibpath     = /LIBPATH:"$(INSTALLDIR)\lib"
          110  +tdomlibpath    = /LIBPATH:"$(ROOT)\win\Release"
          111  +lib32          = "$(TOOLS32)\bin\lib.exe"
          112  +
          113  +TNCDIR         = $(ROOT)\extensions\tnc
          114  +GENERICDIR     = $(ROOT)\generic
          115  +EXPATINCDIR    = $(ROOT)\expat
          116  +TCLINCDIR      = $(INSTALLDIR)\Include
          117  +
          118  +TCL_INCLUDES   = -I"$(TNCDIR)" -I"$(GENERICDIR)" -I"$(EXPATINCDIR)" -I"$(TCLINCDIR)"
          119  +TCL_DEFINES    = $(DEBUGDEFINES) $(THREADDEFINES)
          120  +
          121  +#-------------------------------------------------------------------------
          122  +#
          123  +#   Compile flags
          124  +#
          125  +#-------------------------------------------------------------------------
          126  +
          127  +!IF "$(NODEBUG)" == "1"
          128  +# This cranks the optimization level to maximize speed
          129  +cdebug = -O2 -Gs -GD
          130  +!ELSE
          131  +!IF "$(MACHINE)" == "IA64"
          132  +cdebug = -Od -Zi
          133  +!ELSE
          134  +cdebug = -Z7 -Od
          135  +!ENDIF
          136  +!ENDIF
          137  +
          138  +# declarations common to all compiler options
          139  +cflags = -c -nologo -Fp$(TMPDIR)\ -YX -DXML_DTD -DXML_NS -DUSE_TCL_STUBS -DUSE_TDOM_STUBS -DVERSION=$(VERSION) -DPACKAGE_VERSION=$(PACKAGE_VERSION)
          140  +cvarsdll = -MD$(DBGX)
          141  +
          142  +TCL_CFLAGS     = $(cdebug) $(cflags) $(cvarsdll) $(include32) \
          143  +                       $(TCL_INCLUDES) $(TCL_DEFINES)
          144  +CON_CFLAGS     = $(cdebug) $(cflags) $(include32) -DCONSOLE
          145  +
          146  +#-------------------------------------------------------------------------
          147  +#
          148  +#   Link flags
          149  +#
          150  +#-------------------------------------------------------------------------
          151  +
          152  +!IF "$(NODEBUG)" == "1"
          153  +ldebug = /RELEASE
          154  +!ELSE
          155  +ldebug = -debug:full -debugtype:cv
          156  +!ENDIF
          157  +
          158  +# declarations common to all linker options
          159  +lflags = /NODEFAULTLIB /NOLOGO /MACHINE:$(MACHINE) $(libpath32) $(tcllibpath) $(tdomlibpath) 
          160  +
          161  +# declarations for use on Intel i386, i486, and Pentium systems
          162  +DLLENTRY = @12
          163  +dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll
          164  +
          165  +
          166  +conlflags = $(lflags) -subsystem:console -entry:mainCRTStartup
          167  +guilflags = $(lflags) -subsystem:windows -entry:WinMainCRTStartup
          168  +
          169  +libc = libc$(DBGX).lib oldnames.lib
          170  +libcdll = msvcrt$(DBGX).lib oldnames.lib
          171  +
          172  +baselibs   = kernel32.lib $(optlibs) advapi32.lib user32.lib tclstub84$(DBGX).lib tdomstub$(TDOMVER).lib 
          173  +winlibs     = $(baselibs) gdi32.lib comdlg32.lib winspool.lib
          174  +
          175  +
          176  +guilibs     = $(libc) $(winlibs)
          177  +conlibs     = $(libc) $(baselibs)
          178  +guilibsdll  = $(libcdll) $(winlibs)
          179  +conlibsdll  = $(libcdll) $(baselibs)
          180  +
          181  +#-------------------------------------------------------------------------
          182  +#
          183  +#   Project specific targets
          184  +#
          185  +#-------------------------------------------------------------------------
          186  +
          187  +release:   setup dlls
          188  +dlls:      setup $(TNCDLL)
          189  +all:       setup dlls $(CAT32)
          190  +
          191  +setup:
          192  +#      @$(MKDIR) $(TMPDIR)
          193  +#      @$(MKDIR) $(OUTDIR)
          194  +
          195  +$(TNCLIB): $(TNCDLL)
          196  +
          197  +$(TNCDLL): $(TNCOBJS)
          198  +       $(link32) $(ldebug) $(dlllflags) \
          199  +               -out:$@ $(guilibsdll) @<<
          200  +$(TNCOBJS)
          201  +<<
          202  +
          203  +#-------------------------------------------------------------------------
          204  +#   Implicit rules
          205  +#-------------------------------------------------------------------------
          206  +
          207  +{$(TNCDIR)}.c{$(TMPDIR)}.obj:
          208  +    $(cc32) -DBUILD_tcl $(TCL_CFLAGS) -Fo$(TMPDIR)\ $<
          209  +
          210  +clean:
          211  +       -@$(RM) $(OUTDIR)\*.exp 2>nul
          212  +       -@$(RM) $(OUTDIR)\*.lib 2>nul
          213  +       -@$(RM) $(OUTDIR)\*.dll 2>nul
          214  +       -@$(RM) $(TMPDIR)\*.pch 2>nul
          215  +       -@$(RM) $(TMPDIR)\*.obj 2>nul
          216  +       -@$(RM) $(TMPDIR)\*.ilk 2>nul
          217  +       -@$(RM) $(TMPDIR)\*.pdb 2>nul

Changes to extensions/tnc/tests/loadtnc.tcl.

     1         -catch {load ../../../unix/libtdom0.9.0.so}
            1  +catch {load ../../../unix/libtdom0.8.4.so}
     2      2   catch {load ../libtnc0.3.0.so}
     3         -catch {load ../../unix/libtdom0.9.0.so}
            3  +catch {load ../../unix/libtdom0.8.4.so}
     4      4   catch {load libtnc0.3.0.so}
     5      5   # loadtnc.tcl --
     6      6   #
     7      7   # This file is [source]d by all.tcl and all test files, to ensure, that
     8      8   # the tcltest package and the lastest tnc build is present.
     9      9   
    10     10   if {[lsearch [namespace children] ::tcltest] == -1} {

Changes to extensions/tnc/tests/tnc.test.

   130    130       <!ELEMENT b EMPTY>
   131    131   ]>
   132    132   <!-- This not well-formed document doesn't have a root element -->}} errMsg]
   133    133       $parser free
   134    134       set result
   135    135   } {1}
   136    136   
   137         -test tnc-2.7 {not valid document} {
   138         -    set parser [expat]
   139         -    tnc $parser enable
   140         -    set result [catch {$parser parse {<!DOCTYPE root [
   141         -    <!ELEMENT root (a,b)>
   142         -    <!ELEMENT a (#PCDATA)>
   143         -    <!ELEMENT b EMPTY>
   144         -]>
   145         -<root><a>text</a></root>}} errMsg]
   146         -    $parser free
   147         -    set errMsg
   148         -} {Validation error at line 6, character 17: Element can not end here (required element(s) missing).}
   149         -
   150    137   test tnc-3.1 {validate cmd} {
   151    138       set parser [expat]
   152    139       tnc $parser enable
   153    140       set result [catch {$parser parse $xml}]
   154    141       set validator [tnc $parser getValidateCmd]
   155    142       rename $validator {}
   156    143       $parser free

Changes to extensions/tnc/tnc.c.

  2089   2089       Tcl_HashSearch search;
  2090   2090   
  2091   2091   #ifdef TNC_DEBUG
  2092   2092       printf ("TncElementEndCommand start\n");
  2093   2093       printContentStack (tncdata);
  2094   2094   #endif
  2095   2095       while (1) {
  2096         -        if (!TncProbeElementEnd (tncdata)) {
         2096  +        if (!TncProbeElementEnd (tncdata, 0)) {
  2097   2097               signalNotValid (userData, TNC_ERROR_ELEMENT_CAN_NOT_END_HERE);
  2098   2098               return;
  2099   2099           }
  2100   2100           if (tncdata->contentStack[tncdata->contentStackPtr - 1].deep == 0) {
  2101   2101               break;
  2102   2102           }
  2103   2103           tncdata->contentStackPtr--;
................................................................................
  2968   2968       }
  2969   2969   #endif
  2970   2970   #ifdef USE_TDOM_STUBS
  2971   2971       if (Tdom_InitStubs(interp, "0.8", 0) == NULL) {
  2972   2972           return TCL_ERROR;
  2973   2973       }
  2974   2974   #endif
  2975         -    Tcl_PkgRequire (interp, "tdom", NULL, 0);
         2975  +    Tcl_PkgRequire (interp, "tdom", "0.8.0", 0);
  2976   2976       Tcl_CreateObjCommand (interp, "tnc", TclTncObjCmd, NULL, NULL );
  2977   2977       Tcl_PkgProvide (interp, "tnc", PACKAGE_VERSION);
  2978   2978       return TCL_OK;
  2979   2979   }
  2980   2980   

Deleted extensions/tnc/win/makefile.vc.

     1         -# makefile.vc --                                               -*- Makefile -*-
     2         -#
     3         -# Microsoft Visual C++ makefile for use with nmake.exe v1.62+ (VC++ 5.0+)
     4         -#
     5         -# This makefile is based upon the Tcl 8.4 Makefile.vc and modified to 
     6         -# make it suitable as a general package makefile. Look for the word EDIT
     7         -# which marks sections that may need modification. As a minumum you will
     8         -# need to change the PROJECT, DOTVERSION and DLLOBJS variables to values
     9         -# relevant to your package.
    10         -#
    11         -# See the file "license.terms" for information on usage and redistribution
    12         -# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    13         -# 
    14         -# Copyright (c) 1995-1996 Sun Microsystems, Inc.
    15         -# Copyright (c) 1998-2000 Ajuba Solutions.
    16         -# Copyright (c) 2001 ActiveState Corporation.
    17         -# Copyright (c) 2001-2002 David Gravereaux.
    18         -# Copyright (c) 2003-2006 Pat Thoyts
    19         -#
    20         -#-------------------------------------------------------------------------
    21         -# RCS: @(#)$Id$
    22         -#-------------------------------------------------------------------------
    23         -
    24         -# Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR)
    25         -# or with the MS Platform SDK (MSSDK). Visual Studio .NET 2003 and 2005 define
    26         -# VCINSTALLDIR instead. The MSVC Toolkit release defines yet another.
    27         -!if !defined(MSDEVDIR) && !defined(MSVCDIR) && !defined(MSSDK) && !defined(VCINSTALLDIR) && !defined(VCToolkitInstallDir)
    28         -MSG = ^
    29         -You need to run vcvars32.bat from Developer Studio or setenv.bat from the^
    30         -Platform SDK first to setup the environment.  Jump to this line to read^
    31         -the build instructions.
    32         -!error $(MSG)
    33         -!endif
    34         -
    35         -#------------------------------------------------------------------------------
    36         -# HOW TO USE this makefile:
    37         -#
    38         -# 1)  It is now necessary to have %MSVCDir% set in the environment.  This is
    39         -#     used  as a check to see if vcvars32.bat had been run prior to running
    40         -#     nmake or during the installation of Microsoft Visual C++, MSVCDir had
    41         -#     been set globally and the PATH adjusted.  Either way is valid.
    42         -#
    43         -#     You'll need to run vcvars32.bat contained in the MsDev's vc(98)/bin
    44         -#     directory to setup the proper environment, if needed, for your current
    45         -#     setup.  This is a needed bootstrap requirement and allows the swapping of
    46         -#     different environments to be easier.
    47         -#
    48         -# 2)  To use the Platform SDK (not expressly needed), run setenv.bat after
    49         -#     vcvars32.bat according to the instructions for it.  This can also turn on
    50         -#     the 64-bit compiler, if your SDK has it.
    51         -#
    52         -# 3)  Targets are:
    53         -#	all       -- Builds everything.
    54         -#       <project> -- Builds the project (eg: nmake sample)
    55         -#	test      -- Builds and runs the test suite.
    56         -#	install   -- Installs the built binaries and libraries to $(INSTALLDIR)
    57         -#		     in an appropriate subdirectory.
    58         -#	clean/realclean/distclean -- varying levels of cleaning.
    59         -#
    60         -# 4)  Macros usable on the commandline:
    61         -#	INSTALLDIR=<path>
    62         -#		Sets where to install Tcl from the built binaries.
    63         -#		C:\Progra~1\Tcl is assumed when not specified.
    64         -#
    65         -#	OPTS=static,msvcrt,staticpkg,threads,symbols,profile,loimpact,none
    66         -#		Sets special options for the core.  The default is for none.
    67         -#		Any combination of the above may be used (comma separated).
    68         -#		'none' will over-ride everything to nothing.
    69         -#
    70         -#		static  =  Builds a static library of the core instead of a
    71         -#			   dll.  The shell will be static (and large), as well.
    72         -#		msvcrt  =  Effects the static option only to switch it from
    73         -#			   using libcmt(d) as the C runtime [by default] to
    74         -#			   msvcrt(d). This is useful for static embedding
    75         -#			   support.
    76         -#		staticpkg = Effects the static option only to switch
    77         -#			   tclshXX.exe to have the dde and reg extension linked
    78         -#			   inside it.
    79         -#		nothreads = Turns off multithreading support (not recommended)
    80         -#		thrdalloc = Use the thread allocator (shared global free pool).
    81         -#		symbols =  Adds symbols for step debugging.
    82         -#		profile =  Adds profiling hooks.  Map file is assumed.
    83         -#		loimpact =  Adds a flag for how NT treats the heap to keep memory
    84         -#			   in use, low.  This is said to impact alloc performance.
    85         -#
    86         -#	STATS=memdbg,compdbg,none
    87         -#		Sets optional memory and bytecode compiler debugging code added
    88         -#		to the core.  The default is for none.  Any combination of the
    89         -#		above may be used (comma separated).  'none' will over-ride
    90         -#		everything to nothing.
    91         -#
    92         -#		memdbg   = Enables the debugging memory allocator.
    93         -#		compdbg  = Enables byte compilation logging.
    94         -#
    95         -#	MACHINE=(IX86|IA64|ALPHA|AMD64)
    96         -#		Set the machine type used for the compiler, linker, and
    97         -#		resource compiler.  This hook is needed to tell the tools
    98         -#		when alternate platforms are requested.  IX86 is the default
    99         -#		when not specified. If the CPU environment variable has been
   100         -#		set (ie: recent Platform SDK) then MACHINE is set from CPU.
   101         -#
   102         -#	TMP_DIR=<path>
   103         -#	OUT_DIR=<path>
   104         -#		Hooks to allow the intermediate and output directories to be
   105         -#		changed.  $(OUT_DIR) is assumed to be 
   106         -#		$(BINROOT)\(Release|Debug) based on if symbols are requested.
   107         -#		$(TMP_DIR) will de $(OUT_DIR)\<buildtype> by default.
   108         -#
   109         -#	TESTPAT=<file>
   110         -#		Reads the tests requested to be run from this file.
   111         -#
   112         -#	CFG_ENCODING=encoding
   113         -#		name of encoding for configuration information. Defaults
   114         -#		to cp1252
   115         -#
   116         -# 5)  Examples:
   117         -#
   118         -#	Basic syntax of calling nmake looks like this:
   119         -#	nmake [-nologo] -f makefile.vc [target|macrodef [target|macrodef] [...]]
   120         -#
   121         -#                        Standard (no frills)
   122         -#       c:\tcl_src\win\>c:\progra~1\micros~1\vc98\bin\vcvars32.bat
   123         -#       Setting environment for using Microsoft Visual C++ tools.
   124         -#       c:\tcl_src\win\>nmake -f makefile.vc all
   125         -#       c:\tcl_src\win\>nmake -f makefile.vc install INSTALLDIR=c:\progra~1\tcl
   126         -#
   127         -#                         Building for Win64
   128         -#       c:\tcl_src\win\>c:\progra~1\micros~1\vc98\bin\vcvars32.bat
   129         -#       Setting environment for using Microsoft Visual C++ tools.
   130         -#       c:\tcl_src\win\>c:\progra~1\platfo~1\setenv.bat /pre64 /RETAIL
   131         -#       Targeting Windows pre64 RETAIL
   132         -#       c:\tcl_src\win\>nmake -f makefile.vc MACHINE=IA64
   133         -#
   134         -#------------------------------------------------------------------------------
   135         -#==============================================================================
   136         -###############################################################################
   137         -#------------------------------------------------------------------------------
   138         -
   139         -!if !exist("makefile.vc")
   140         -MSG = ^
   141         -You must run this makefile only from the directory it is in.^
   142         -Please `cd` to its location first.
   143         -!error $(MSG)
   144         -!endif
   145         -
   146         -#-------------------------------------------------------------------------
   147         -# Project specific information (EDIT)
   148         -#
   149         -# You should edit this with the name and version of your project. This
   150         -# information is used to generate the name of the package library and
   151         -# it's install location.
   152         -#
   153         -# For example, the sample extension is  going to build sample04.dll and
   154         -# would install it into $(INSTALLDIR)\lib\sample04
   155         -#
   156         -# You need to specify the object files that need to be linked into your
   157         -# binary here.
   158         -#
   159         -#-------------------------------------------------------------------------
   160         -
   161         -PROJECT = tnc
   162         -!include "..\..\..\win\rules.vc"
   163         -
   164         -DOTVERSION      = 0.3.0
   165         -VERSION         = $(DOTVERSION:.=)
   166         -STUBPREFIX      = $(PROJECT)stub
   167         -
   168         -DLLOBJS = $(TMP_DIR)\tnc.obj
   169         -
   170         -TDOM_DOTVERSION      = 0.8.3
   171         -TDOMVER             = $(TDOM_DOTVERSION:.=)
   172         -
   173         -BINROOT		= .
   174         -# tdom root
   175         -ROOT            = ..\..\..
   176         -
   177         -PRJIMPLIB	= $(OUT_DIR)\$(PROJECT)$(VERSION)$(SUFX).lib
   178         -PRJLIBNAME	= $(PROJECT)$(VERSION)$(SUFX).$(EXT)
   179         -PRJLIB		= $(OUT_DIR)\$(PRJLIBNAME)
   180         -
   181         -### Make sure we use backslash only.
   182         -PRJ_INSTALL_DIR         = $(_INSTALLDIR)\$(PROJECT)$(DOTVERSION)
   183         -LIB_INSTALL_DIR		= $(PRJ_INSTALL_DIR)
   184         -BIN_INSTALL_DIR		= $(PRJ_INSTALL_DIR)
   185         -DOC_INSTALL_DIR		= $(PRJ_INSTALL_DIR)
   186         -SCRIPT_INSTALL_DIR	= $(PRJ_INSTALL_DIR)
   187         -INCLUDE_INSTALL_DIR	= $(_TCLDIR)\include
   188         -
   189         -#---------------------------------------------------------------------
   190         -# Compile flags
   191         -#---------------------------------------------------------------------
   192         -
   193         -!if !$(DEBUG)
   194         -!if $(OPTIMIZING)
   195         -### This cranks the optimization level to maximize speed
   196         -cdebug	= $(OPTIMIZATIONS)
   197         -!else
   198         -cdebug	=
   199         -!endif
   200         -!else if "$(MACHINE)" == "IA64" || "$(MACHINE)" == "AMD64"
   201         -### Warnings are too many, can't support warnings into errors.
   202         -cdebug	= -Zi -Od $(DEBUGFLAGS)
   203         -!else
   204         -cdebug	= -Zi -WX $(DEBUGFLAGS)
   205         -!endif
   206         -
   207         -### Declarations common to all compiler options
   208         -cwarn = -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE
   209         -cflags = -nologo -c $(COMPILERFLAGS) $(cwarn) -Fp$(TMP_DIR)^\
   210         -
   211         -!if $(MSVCRT)
   212         -!if $(DEBUG) && !$(UNCHECKED)
   213         -crt = -MDd
   214         -!else
   215         -crt = -MD
   216         -!endif
   217         -!else
   218         -!if $(DEBUG) && !$(UNCHECKED)
   219         -crt = -MTd
   220         -!else
   221         -crt = -MT
   222         -!endif
   223         -!endif
   224         -
   225         -!if !$(STATIC_BUILD)
   226         -cflags = $(cflags) -DUSE_TCL_STUBS -DUSE_TDOM_STUBS
   227         -!if defined(TKSTUBLIB)
   228         -cflags = $(cflags) -DUSE_TK_STUBS
   229         -!endif
   230         -!endif
   231         -
   232         -TDOMLIBPATH    = "$(ROOT)\win\$(BUILDDIRTOP)"
   233         -
   234         -TNCDIR         = $(ROOT)\extensions\tnc
   235         -WINDIR		= $(TNCDIR)\win
   236         -GENERICDIR     = $(ROOT)\generic
   237         -EXPATDIR    = $(ROOT)\expat
   238         -TCLINCDIR      = $(INSTALLDIR)\Include
   239         -
   240         -DEFS            = -DHAVE_MEMMOVE=1 -DXML_DTD=1 -DXML_NS=1 -DTDOM_NO_UNKNOWN_CMD=1
   241         -INCLUDES	= -I"$(WINDIR)" -I"$(TNCDIR)" -I"$(GENERICDIR)" -I"$(EXPATDIR)" $(TCL_INCLUDES)
   242         -BASE_CFLAGS	= $(cflags) $(cdebug) $(crt) $(INCLUDES)
   243         -CON_CFLAGS	= $(cflags) $(cdebug) $(crt) -DCONSOLE
   244         -TCL_CFLAGS      = -DPACKAGE_NAME="\"$(PROJECT)\"" \
   245         -		  -DPACKAGE_VERSION="\"$(DOTVERSION)\"" \
   246         -		  -DTDOM_PACKAGE_VERSION="\"$(TDOM_DOTVERSION)\"" \
   247         -		  $(BASE_CFLAGS) $(OPTDEFINES) $(DEFS) $(DEFS_EXPAT)
   248         -
   249         -
   250         -#---------------------------------------------------------------------
   251         -# Link flags
   252         -#---------------------------------------------------------------------
   253         -
   254         -!if $(DEBUG)
   255         -ldebug	= -debug:full -debugtype:cv
   256         -!if $(MSVCRT)
   257         -ldebug = $(ldebug) -nodefaultlib:msvcrt
   258         -!endif
   259         -!else
   260         -ldebug	= -release -opt:ref -opt:icf,3
   261         -!endif
   262         -
   263         -### Declarations common to all linker options
   264         -lflags	= -nologo -machine:$(MACHINE) $(LINKERFLAGS) $(ldebug)
   265         -
   266         -!if $(PROFILE)
   267         -lflags	= $(lflags) -profile
   268         -!endif
   269         -
   270         -!if $(ALIGN98_HACK) && !$(STATIC_BUILD)
   271         -### Align sections for PE size savings.
   272         -lflags	= $(lflags) -opt:nowin98
   273         -!else if !$(ALIGN98_HACK) && $(STATIC_BUILD)
   274         -### Align sections for speed in loading by choosing the virtual page size.
   275         -lflags	= $(lflags) -align:4096
   276         -!endif
   277         -
   278         -!if $(LOIMPACT)
   279         -lflags	= $(lflags) -ws:aggressive
   280         -!endif
   281         -
   282         -dlllflags = $(lflags) -dll
   283         -conlflags = $(lflags) -subsystem:console
   284         -guilflags = $(lflags) -subsystem:windows
   285         -!if !$(STATIC_BUILD)
   286         -baselibs  = $(TCLSTUBLIB) $(TDOMLIBPATH)\tdomstub$(TDOMVER).lib
   287         -!if defined(TKSTUBLIB)
   288         -baselibs  = $(baselibs) $(TKSTUBLIB)
   289         -!endif
   290         -!endif
   291         -
   292         -# Avoid 'unresolved external symbol __security_cookie' errors.
   293         -# c.f. http://support.microsoft.com/?id=894573
   294         -!if "$(MACHINE)" == "IA64" || "$(MACHINE)" == "AMD64"
   295         -baselibs   = $(baselibs) bufferoverflowU.lib
   296         -!endif
   297         -
   298         -#---------------------------------------------------------------------
   299         -# TclTest flags
   300         -#---------------------------------------------------------------------
   301         -
   302         -!IF "$(TESTPAT)" != ""
   303         -TESTFLAGS = $(TESTFLAGS) -file $(TESTPAT)
   304         -!ENDIF
   305         -
   306         -#---------------------------------------------------------------------
   307         -# Project specific targets (EDIT)
   308         -#---------------------------------------------------------------------
   309         -
   310         -all:	    setup $(PROJECT)
   311         -$(PROJECT): setup $(PRJLIB)
   312         -install:    install-binaries install-libraries install-docs
   313         -
   314         -# Tests need to ensure we load the right dll file we
   315         -# have to handle the output differently on Win9x.
   316         -#
   317         -!if "$(OS)" == "Windows_NT"  || "$(MSVCDIR)" == "IDE"
   318         -test: setup $(PROJECT)
   319         -        set TCL_LIBRARY=$(ROOT)/library
   320         -        $(TCLSH) <<
   321         -load $(PRJLIB:\=/)
   322         -source [file join $(LIBDIR:\=/) tdom.tcl]
   323         -cd "$(ROOT)/tests"
   324         -set argv "$(TESTFLAGS)"
   325         -source all.tcl
   326         -<<
   327         -!else
   328         -test: setup $(PROJECT)
   329         -        echo Please wait while the test results are collected
   330         -        set TCL_LIBRARY=$(ROOT)/library
   331         -        $(TCLSH) << >tests.log
   332         -load $(PRJLIB:\=/)
   333         -source [file join $(LIBDIR:\=/) tdom.tcl]
   334         -cd "$(ROOT)/tests"
   335         -set argv "$(TESTFLAGS)"
   336         -source all.tcl
   337         -<<
   338         -        type tests.log | more
   339         -!endif
   340         -
   341         -setup:
   342         -	@if not exist $(OUT_DIR)\nul mkdir $(OUT_DIR)
   343         -	@if not exist $(TMP_DIR)\nul mkdir $(TMP_DIR)
   344         -
   345         -# See <tcl>/win/coffbase.txt for extension base addresses.
   346         -$(PRJLIB): $(DLLOBJS)
   347         -!if $(STATIC_BUILD)
   348         -	$(lib32) -nologo -out:$@ @<<
   349         -$**
   350         -<<
   351         -!else
   352         -	$(link32) $(dlllflags)  -out:$@ $(baselibs) @<<
   353         -$**
   354         -<<
   355         -	$(_VC_MANIFEST_EMBED_DLL)
   356         -	-@del $*.exp
   357         -!endif
   358         -
   359         -#---------------------------------------------------------------------
   360         -# Implicit rules
   361         -#---------------------------------------------------------------------
   362         -
   363         -{$(WINDIR)}.c{$(TMP_DIR)}.obj::
   364         -    $(cc32) $(TCL_CFLAGS) -DBUILD_$(PROJECT) -Fo$(TMP_DIR)\ @<<
   365         -$<
   366         -<<
   367         -
   368         -{$(TNCDIR)}.c{$(TMP_DIR)}.obj::
   369         -    $(cc32) $(TCL_CFLAGS) -DBUILD_$(PROJECT) -Fo$(TMP_DIR)\ @<<
   370         -$<
   371         -<<
   372         -
   373         -{$(WINDIR)}.rc{$(TMP_DIR)}.res:
   374         -	$(rc32) -fo $@ -r -i "$(GENERICDIR)" -D__WIN32__ \
   375         -                -DCOMMAVERSION=$(DOTVERSION:.=,),0 \
   376         -                -DDOTVERSION=\"$(DOTVERSION)\" \
   377         -                -DVERSION=\"$(VERSION)$(SUFX)\" \
   378         -!if $(DEBUG)
   379         -	-d DEBUG \
   380         -!endif
   381         -!if $(TCL_THREADS)
   382         -	-d TCL_THREADS \
   383         -!endif
   384         -!if $(STATIC_BUILD)
   385         -	-d STATIC_BUILD \
   386         -!endif
   387         -	$<
   388         -
   389         -.SUFFIXES:
   390         -.SUFFIXES:.c .rc
   391         -
   392         -#-------------------------------------------------------------------------
   393         -# Explicit dependency rules
   394         -#
   395         -#-------------------------------------------------------------------------
   396         -
   397         -
   398         -#---------------------------------------------------------------------
   399         -# Installation. (EDIT)
   400         -#
   401         -# You may need to modify this section to reflect the final distribution
   402         -# of your files and possibly to generate documentation.
   403         -#
   404         -#---------------------------------------------------------------------
   405         -
   406         -install-binaries:
   407         -	@echo Installing binaries to '$(SCRIPT_INSTALL_DIR)'
   408         -	@if not exist "$(SCRIPT_INSTALL_DIR)" mkdir "$(SCRIPT_INSTALL_DIR)"
   409         -	@$(CPY) $(PRJLIB) "$(SCRIPT_INSTALL_DIR)" >NUL
   410         -	@$(CPY) $(PRJSTUBLIB) "$(SCRIPT_INSTALL_DIR)" >NUL
   411         -
   412         -install-libraries:
   413         -        @echo Installing package index in '$(SCRIPT_INSTALL_DIR)'
   414         -        @type << >"$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
   415         -    package ifneeded $(PROJECT) $(DOTVERSION) "[list load [file join $$dir $(PROJECT)$(VERSION)$(SUFX).$(EXT)] $(PROJECT)]"
   416         -<<
   417         -
   418         -install-docs:
   419         -#	@echo Installing documentation files to '$(DOC_INSTALL_DIR)'
   420         -#	@if exist $(DOCDIR) $(CPY) $(DOCDIR)\*.n "$(DOC_INSTALL_DIR)"
   421         -
   422         -#---------------------------------------------------------------------
   423         -# Clean up
   424         -#---------------------------------------------------------------------
   425         -
   426         -clean:
   427         -	@if exist $(TMP_DIR)\nul $(RMDIR) $(TMP_DIR)
   428         -	@if exist $(WINDIR)\versions.vc del $(WINDIR)\versions.vc
   429         -	@if exist $(WINDIR)\vercl.i del $(WINDIR)\vercl.i
   430         -	@if exist $(WINDIR)\vercl.x del $(WINDIR)\vercl.x
   431         -	@if exist $(WINDIR)\_junk.pch del $(WINDIR)\_junk.pch
   432         -
   433         -realclean: clean
   434         -	@if exist $(OUT_DIR)\nul $(RMDIR) $(OUT_DIR)
   435         -
   436         -distclean: realclean
   437         -	@if exist $(WINDIR)\nmakehlp.exe del $(WINDIR)\nmakehlp.exe
   438         -	@if exist $(WINDIR)\nmakehlp.obj del $(WINDIR)\nmakehlp.obj

Deleted extensions/tnc/win/nmakehlp.c.

     1         -/*
     2         - * ----------------------------------------------------------------------------
     3         - * nmakehlp.c --
     4         - *
     5         - *	This is used to fix limitations within nmake and the environment.
     6         - *
     7         - * Copyright (c) 2002 by David Gravereaux.
     8         - * Copyright (c) 2006 by Pat Thoyts
     9         - *
    10         - * See the file "license.terms" for information on usage and redistribution of
    11         - * this file, and for a DISCLAIMER OF ALL WARRANTIES.
    12         - * ----------------------------------------------------------------------------
    13         - */
    14         -
    15         -#define _CRT_SECURE_NO_DEPRECATE
    16         -#include <windows.h>
    17         -#define NO_SHLWAPI_GDI
    18         -#define NO_SHLWAPI_STREAM
    19         -#define NO_SHLWAPI_REG
    20         -#include <shlwapi.h>
    21         -#pragma comment (lib, "user32.lib")
    22         -#pragma comment (lib, "kernel32.lib")
    23         -#pragma comment (lib, "shlwapi.lib")
    24         -#include <stdio.h>
    25         -#include <math.h>
    26         -
    27         -/*
    28         - * This library is required for x64 builds with _some_ versions of MSVC
    29         - */
    30         -#if defined(_M_IA64) || defined(_M_AMD64)
    31         -#if _MSC_VER >= 1400 && _MSC_VER < 1500
    32         -#pragma comment(lib, "bufferoverflowU")
    33         -#endif
    34         -#endif
    35         -
    36         -/* ISO hack for dumb VC++ */
    37         -#ifdef _MSC_VER
    38         -#define   snprintf	_snprintf
    39         -#endif
    40         -
    41         -
    42         -
    43         -/* protos */
    44         -
    45         -static int CheckForCompilerFeature(const char *option);
    46         -static int CheckForLinkerFeature(const char **options, int count);
    47         -static int IsIn(const char *string, const char *substring);
    48         -static int SubstituteFile(const char *substs, const char *filename);
    49         -static int QualifyPath(const char *path);
    50         -static const char *GetVersionFromFile(const char *filename, const char *match, int numdots);
    51         -static DWORD WINAPI ReadFromPipe(LPVOID args);
    52         -
    53         -/* globals */
    54         -
    55         -#define CHUNK	25
    56         -#define STATICBUFFERSIZE    1000
    57         -typedef struct {
    58         -    HANDLE pipe;
    59         -    char buffer[STATICBUFFERSIZE];
    60         -} pipeinfo;
    61         -
    62         -pipeinfo Out = {INVALID_HANDLE_VALUE, '\0'};
    63         -pipeinfo Err = {INVALID_HANDLE_VALUE, '\0'};
    64         -
    65         -/*
    66         - * exitcodes: 0 == no, 1 == yes, 2 == error
    67         - */
    68         -
    69         -int
    70         -main(
    71         -    int argc,
    72         -    char *argv[])
    73         -{
    74         -    char msg[300];
    75         -    DWORD dwWritten;
    76         -    int chars;
    77         -
    78         -    /*
    79         -     * Make sure children (cl.exe and link.exe) are kept quiet.
    80         -     */
    81         -
    82         -    SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
    83         -
    84         -    /*
    85         -     * Make sure the compiler and linker aren't effected by the outside world.
    86         -     */
    87         -
    88         -    SetEnvironmentVariable("CL", "");
    89         -    SetEnvironmentVariable("LINK", "");
    90         -
    91         -    if (argc > 1 && *argv[1] == '-') {
    92         -	switch (*(argv[1]+1)) {
    93         -	case 'c':
    94         -	    if (argc != 3) {
    95         -		chars = snprintf(msg, sizeof(msg) - 1,
    96         -		        "usage: %s -c <compiler option>\n"
    97         -			"Tests for whether cl.exe supports an option\n"
    98         -			"exitcodes: 0 == no, 1 == yes, 2 == error\n", argv[0]);
    99         -		WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars,
   100         -			&dwWritten, NULL);
   101         -		return 2;
   102         -	    }
   103         -	    return CheckForCompilerFeature(argv[2]);
   104         -	case 'l':
   105         -	    if (argc < 3) {
   106         -		chars = snprintf(msg, sizeof(msg) - 1,
   107         -	       		"usage: %s -l <linker option> ?<mandatory option> ...?\n"
   108         -			"Tests for whether link.exe supports an option\n"
   109         -			"exitcodes: 0 == no, 1 == yes, 2 == error\n", argv[0]);
   110         -		WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars,
   111         -			&dwWritten, NULL);
   112         -		return 2;
   113         -	    }
   114         -	    return CheckForLinkerFeature(&argv[2], argc-2);
   115         -	case 'f':
   116         -	    if (argc == 2) {
   117         -		chars = snprintf(msg, sizeof(msg) - 1,
   118         -			"usage: %s -f <string> <substring>\n"
   119         -			"Find a substring within another\n"
   120         -			"exitcodes: 0 == no, 1 == yes, 2 == error\n", argv[0]);
   121         -		WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars,
   122         -			&dwWritten, NULL);
   123         -		return 2;
   124         -	    } else if (argc == 3) {
   125         -		/*
   126         -		 * If the string is blank, there is no match.
   127         -		 */
   128         -
   129         -		return 0;
   130         -	    } else {
   131         -		return IsIn(argv[2], argv[3]);
   132         -	    }
   133         -	case 's':
   134         -	    if (argc == 2) {
   135         -		chars = snprintf(msg, sizeof(msg) - 1,
   136         -			"usage: %s -s <substitutions file> <file>\n"
   137         -			"Perform a set of string map type substutitions on a file\n"
   138         -			"exitcodes: 0\n",
   139         -			argv[0]);
   140         -		WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars,
   141         -			&dwWritten, NULL);
   142         -		return 2;
   143         -	    }
   144         -	    return SubstituteFile(argv[2], argv[3]);
   145         -	case 'V':
   146         -	    if (argc != 4) {
   147         -		chars = snprintf(msg, sizeof(msg) - 1,
   148         -		    "usage: %s -V filename matchstring\n"
   149         -		    "Extract a version from a file:\n"
   150         -		    "eg: pkgIndex.tcl \"package ifneeded http\"",
   151         -		    argv[0]);
   152         -		WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars,
   153         -		    &dwWritten, NULL);
   154         -		return 0;
   155         -	    }
   156         -	    printf("%s\n", GetVersionFromFile(argv[2], argv[3], *(argv[1]+2) - '0'));
   157         -	    return 0;
   158         -	case 'Q':
   159         -	    if (argc != 3) {
   160         -		chars = snprintf(msg, sizeof(msg) - 1,
   161         -		    "usage: %s -Q path\n"
   162         -		    "Emit the fully qualified path\n"
   163         -		    "exitcodes: 0 == no, 1 == yes, 2 == error\n", argv[0]);
   164         -		WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars,
   165         -		    &dwWritten, NULL);
   166         -		return 2;
   167         -	    }
   168         -	    return QualifyPath(argv[2]);
   169         -	}
   170         -    }
   171         -    chars = snprintf(msg, sizeof(msg) - 1,
   172         -	    "usage: %s -c|-f|-l|-Q|-s|-V ...\n"
   173         -	    "This is a little helper app to equalize shell differences between WinNT and\n"
   174         -	    "Win9x and get nmake.exe to accomplish its job.\n",
   175         -	    argv[0]);
   176         -    WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars, &dwWritten, NULL);
   177         -    return 2;
   178         -}
   179         -
   180         -static int
   181         -CheckForCompilerFeature(
   182         -    const char *option)
   183         -{
   184         -    STARTUPINFO si;
   185         -    PROCESS_INFORMATION pi;
   186         -    SECURITY_ATTRIBUTES sa;
   187         -    DWORD threadID;
   188         -    char msg[300];
   189         -    BOOL ok;
   190         -    HANDLE hProcess, h, pipeThreads[2];
   191         -    char cmdline[100];
   192         -
   193         -    hProcess = GetCurrentProcess();
   194         -
   195         -    ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
   196         -    ZeroMemory(&si, sizeof(STARTUPINFO));
   197         -    si.cb = sizeof(STARTUPINFO);
   198         -    si.dwFlags   = STARTF_USESTDHANDLES;
   199         -    si.hStdInput = INVALID_HANDLE_VALUE;
   200         -
   201         -    ZeroMemory(&sa, sizeof(SECURITY_ATTRIBUTES));
   202         -    sa.nLength = sizeof(SECURITY_ATTRIBUTES);
   203         -    sa.lpSecurityDescriptor = NULL;
   204         -    sa.bInheritHandle = FALSE;
   205         -
   206         -    /*
   207         -     * Create a non-inheritible pipe.
   208         -     */
   209         -
   210         -    CreatePipe(&Out.pipe, &h, &sa, 0);
   211         -
   212         -    /*
   213         -     * Dupe the write side, make it inheritible, and close the original.
   214         -     */
   215         -
   216         -    DuplicateHandle(hProcess, h, hProcess, &si.hStdOutput, 0, TRUE,
   217         -	    DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE);
   218         -
   219         -    /*
   220         -     * Same as above, but for the error side.
   221         -     */
   222         -
   223         -    CreatePipe(&Err.pipe, &h, &sa, 0);
   224         -    DuplicateHandle(hProcess, h, hProcess, &si.hStdError, 0, TRUE,
   225         -	    DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE);
   226         -
   227         -    /*
   228         -     * Base command line.
   229         -     */
   230         -
   231         -    lstrcpy(cmdline, "cl.exe -nologo -c -TC -Zs -X -Fp.\\_junk.pch ");
   232         -
   233         -    /*
   234         -     * Append our option for testing
   235         -     */
   236         -
   237         -    lstrcat(cmdline, option);
   238         -
   239         -    /*
   240         -     * Filename to compile, which exists, but is nothing and empty.
   241         -     */
   242         -
   243         -    lstrcat(cmdline, " .\\nul");
   244         -
   245         -    ok = CreateProcess(
   246         -	    NULL,	    /* Module name. */
   247         -	    cmdline,	    /* Command line. */
   248         -	    NULL,	    /* Process handle not inheritable. */
   249         -	    NULL,	    /* Thread handle not inheritable. */
   250         -	    TRUE,	    /* yes, inherit handles. */
   251         -	    DETACHED_PROCESS, /* No console for you. */
   252         -	    NULL,	    /* Use parent's environment block. */
   253         -	    NULL,	    /* Use parent's starting directory. */
   254         -	    &si,	    /* Pointer to STARTUPINFO structure. */
   255         -	    &pi);	    /* Pointer to PROCESS_INFORMATION structure. */
   256         -
   257         -    if (!ok) {
   258         -	DWORD err = GetLastError();
   259         -	int chars = snprintf(msg, sizeof(msg) - 1,
   260         -		"Tried to launch: \"%s\", but got error [%u]: ", cmdline, err);
   261         -
   262         -	FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS|
   263         -		FORMAT_MESSAGE_MAX_WIDTH_MASK, 0L, err, 0, (LPVOID)&msg[chars],
   264         -		(300-chars), 0);
   265         -	WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, lstrlen(msg), &err,NULL);
   266         -	return 2;
   267         -    }
   268         -
   269         -    /*
   270         -     * Close our references to the write handles that have now been inherited.
   271         -     */
   272         -
   273         -    CloseHandle(si.hStdOutput);
   274         -    CloseHandle(si.hStdError);
   275         -
   276         -    WaitForInputIdle(pi.hProcess, 5000);
   277         -    CloseHandle(pi.hThread);
   278         -
   279         -    /*
   280         -     * Start the pipe reader threads.
   281         -     */
   282         -
   283         -    pipeThreads[0] = CreateThread(NULL, 0, ReadFromPipe, &Out, 0, &threadID);
   284         -    pipeThreads[1] = CreateThread(NULL, 0, ReadFromPipe, &Err, 0, &threadID);
   285         -
   286         -    /*
   287         -     * Block waiting for the process to end.
   288         -     */
   289         -
   290         -    WaitForSingleObject(pi.hProcess, INFINITE);
   291         -    CloseHandle(pi.hProcess);
   292         -
   293         -    /*
   294         -     * Wait for our pipe to get done reading, should it be a little slow.
   295         -     */
   296         -
   297         -    WaitForMultipleObjects(2, pipeThreads, TRUE, 500);
   298         -    CloseHandle(pipeThreads[0]);
   299         -    CloseHandle(pipeThreads[1]);
   300         -
   301         -    /*
   302         -     * Look for the commandline warning code in both streams.
   303         -     *  - in MSVC 6 & 7 we get D4002, in MSVC 8 we get D9002.
   304         -     */
   305         -
   306         -    return !(strstr(Out.buffer, "D4002") != NULL
   307         -             || strstr(Err.buffer, "D4002") != NULL
   308         -             || strstr(Out.buffer, "D9002") != NULL
   309         -             || strstr(Err.buffer, "D9002") != NULL
   310         -             || strstr(Out.buffer, "D2021") != NULL
   311         -             || strstr(Err.buffer, "D2021") != NULL);
   312         -}
   313         -
   314         -static int
   315         -CheckForLinkerFeature(
   316         -    const char **options,
   317         -    int count)
   318         -{
   319         -    STARTUPINFO si;
   320         -    PROCESS_INFORMATION pi;
   321         -    SECURITY_ATTRIBUTES sa;
   322         -    DWORD threadID;
   323         -    char msg[300];
   324         -    BOOL ok;
   325         -    HANDLE hProcess, h, pipeThreads[2];
   326         -    int i;
   327         -    char cmdline[255];
   328         -
   329         -    hProcess = GetCurrentProcess();
   330         -
   331         -    ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
   332         -    ZeroMemory(&si, sizeof(STARTUPINFO));
   333         -    si.cb = sizeof(STARTUPINFO);
   334         -    si.dwFlags   = STARTF_USESTDHANDLES;
   335         -    si.hStdInput = INVALID_HANDLE_VALUE;
   336         -
   337         -    ZeroMemory(&sa, sizeof(SECURITY_ATTRIBUTES));
   338         -    sa.nLength = sizeof(SECURITY_ATTRIBUTES);
   339         -    sa.lpSecurityDescriptor = NULL;
   340         -    sa.bInheritHandle = TRUE;
   341         -
   342         -    /*
   343         -     * Create a non-inheritible pipe.
   344         -     */
   345         -
   346         -    CreatePipe(&Out.pipe, &h, &sa, 0);
   347         -
   348         -    /*
   349         -     * Dupe the write side, make it inheritible, and close the original.
   350         -     */
   351         -
   352         -    DuplicateHandle(hProcess, h, hProcess, &si.hStdOutput, 0, TRUE,
   353         -	    DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE);
   354         -
   355         -    /*
   356         -     * Same as above, but for the error side.
   357         -     */
   358         -
   359         -    CreatePipe(&Err.pipe, &h, &sa, 0);
   360         -    DuplicateHandle(hProcess, h, hProcess, &si.hStdError, 0, TRUE,
   361         -	    DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE);
   362         -
   363         -    /*
   364         -     * Base command line.
   365         -     */
   366         -
   367         -    lstrcpy(cmdline, "link.exe -nologo ");
   368         -
   369         -    /*
   370         -     * Append our option for testing.
   371         -     */
   372         -
   373         -    for (i = 0; i < count; i++) {
   374         -	lstrcat(cmdline, " \"");
   375         -	lstrcat(cmdline, options[i]);
   376         -	lstrcat(cmdline, "\"");
   377         -    }
   378         -
   379         -    ok = CreateProcess(
   380         -	    NULL,	    /* Module name. */
   381         -	    cmdline,	    /* Command line. */
   382         -	    NULL,	    /* Process handle not inheritable. */
   383         -	    NULL,	    /* Thread handle not inheritable. */
   384         -	    TRUE,	    /* yes, inherit handles. */
   385         -	    DETACHED_PROCESS, /* No console for you. */
   386         -	    NULL,	    /* Use parent's environment block. */
   387         -	    NULL,	    /* Use parent's starting directory. */
   388         -	    &si,	    /* Pointer to STARTUPINFO structure. */
   389         -	    &pi);	    /* Pointer to PROCESS_INFORMATION structure. */
   390         -
   391         -    if (!ok) {
   392         -	DWORD err = GetLastError();
   393         -	int chars = snprintf(msg, sizeof(msg) - 1,
   394         -		"Tried to launch: \"%s\", but got error [%u]: ", cmdline, err);
   395         -
   396         -	FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS|
   397         -		FORMAT_MESSAGE_MAX_WIDTH_MASK, 0L, err, 0, (LPVOID)&msg[chars],
   398         -		(300-chars), 0);
   399         -	WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, lstrlen(msg), &err,NULL);
   400         -	return 2;
   401         -    }
   402         -
   403         -    /*
   404         -     * Close our references to the write handles that have now been inherited.
   405         -     */
   406         -
   407         -    CloseHandle(si.hStdOutput);
   408         -    CloseHandle(si.hStdError);
   409         -
   410         -    WaitForInputIdle(pi.hProcess, 5000);
   411         -    CloseHandle(pi.hThread);
   412         -
   413         -    /*
   414         -     * Start the pipe reader threads.
   415         -     */
   416         -
   417         -    pipeThreads[0] = CreateThread(NULL, 0, ReadFromPipe, &Out, 0, &threadID);
   418         -    pipeThreads[1] = CreateThread(NULL, 0, ReadFromPipe, &Err, 0, &threadID);
   419         -
   420         -    /*
   421         -     * Block waiting for the process to end.
   422         -     */
   423         -
   424         -    WaitForSingleObject(pi.hProcess, INFINITE);
   425         -    CloseHandle(pi.hProcess);
   426         -
   427         -    /*
   428         -     * Wait for our pipe to get done reading, should it be a little slow.
   429         -     */
   430         -
   431         -    WaitForMultipleObjects(2, pipeThreads, TRUE, 500);
   432         -    CloseHandle(pipeThreads[0]);
   433         -    CloseHandle(pipeThreads[1]);
   434         -
   435         -    /*
   436         -     * Look for the commandline warning code in the stderr stream.
   437         -     */
   438         -
   439         -    return !(strstr(Out.buffer, "LNK1117") != NULL ||
   440         -	    strstr(Err.buffer, "LNK1117") != NULL ||
   441         -	    strstr(Out.buffer, "LNK4044") != NULL ||
   442         -	    strstr(Err.buffer, "LNK4044") != NULL ||
   443         -	    strstr(Out.buffer, "LNK4224") != NULL ||
   444         -	    strstr(Err.buffer, "LNK4224") != NULL);
   445         -}
   446         -
   447         -static DWORD WINAPI
   448         -ReadFromPipe(
   449         -    LPVOID args)
   450         -{
   451         -    pipeinfo *pi = (pipeinfo *) args;
   452         -    char *lastBuf = pi->buffer;
   453         -    DWORD dwRead;
   454         -    BOOL ok;
   455         -
   456         -  again:
   457         -    if (lastBuf - pi->buffer + CHUNK > STATICBUFFERSIZE) {
   458         -	CloseHandle(pi->pipe);
   459         -	return (DWORD)-1;
   460         -    }
   461         -    ok = ReadFile(pi->pipe, lastBuf, CHUNK, &dwRead, 0L);
   462         -    if (!ok || dwRead == 0) {
   463         -	CloseHandle(pi->pipe);
   464         -	return 0;
   465         -    }
   466         -    lastBuf += dwRead;
   467         -    goto again;
   468         -
   469         -    return 0;  /* makes the compiler happy */
   470         -}
   471         -
   472         -static int
   473         -IsIn(
   474         -    const char *string,
   475         -    const char *substring)
   476         -{
   477         -    return (strstr(string, substring) != NULL);
   478         -}
   479         -
   480         -/*
   481         - * GetVersionFromFile --
   482         - * 	Looks for a match string in a file and then returns the version
   483         - * 	following the match where a version is anything acceptable to
   484         - * 	package provide or package ifneeded.
   485         - */
   486         -
   487         -static const char *
   488         -GetVersionFromFile(
   489         -    const char *filename,
   490         -    const char *match,
   491         -    int numdots)
   492         -{
   493         -    size_t cbBuffer = 100;
   494         -    static char szBuffer[100];
   495         -    char *szResult = NULL;
   496         -    FILE *fp = fopen(filename, "rt");
   497         -
   498         -    if (fp != NULL) {
   499         -	/*
   500         -	 * Read data until we see our match string.
   501         -	 */
   502         -
   503         -	while (fgets(szBuffer, cbBuffer, fp) != NULL) {
   504         -	    LPSTR p, q;
   505         -
   506         -	    p = strstr(szBuffer, match);
   507         -	    if (p != NULL) {
   508         -		/*
   509         -		 * Skip to first digit after the match.
   510         -		 */
   511         -
   512         -		p += strlen(match);
   513         -		while (*p && !isdigit(*p)) {
   514         -		    ++p;
   515         -		}
   516         -
   517         -		/*
   518         -		 * Find ending whitespace.
   519         -		 */
   520         -
   521         -		q = p;
   522         -		while (*q && (strchr("0123456789.ab", *q)) && ((!strchr(".ab", *q)
   523         -			    && (!strchr("ab", q[-1])) || --numdots))) {
   524         -		    ++q;
   525         -		}
   526         -
   527         -		memcpy(szBuffer, p, q - p);
   528         -		szBuffer[q-p] = 0;
   529         -		szResult = szBuffer;
   530         -		break;
   531         -	    }
   532         -	}
   533         -	fclose(fp);
   534         -    }
   535         -    return szResult;
   536         -}
   537         -
   538         -/*
   539         - * List helpers for the SubstituteFile function
   540         - */
   541         -
   542         -typedef struct list_item_t {
   543         -    struct list_item_t *nextPtr;
   544         -    char * key;
   545         -    char * value;
   546         -} list_item_t;
   547         -
   548         -/* insert a list item into the list (list may be null) */
   549         -static list_item_t *
   550         -list_insert(list_item_t **listPtrPtr, const char *key, const char *value)
   551         -{
   552         -    list_item_t *itemPtr = malloc(sizeof(list_item_t));
   553         -    if (itemPtr) {
   554         -	itemPtr->key = strdup(key);
   555         -	itemPtr->value = strdup(value);
   556         -	itemPtr->nextPtr = NULL;
   557         -
   558         -	while(*listPtrPtr) {
   559         -	    listPtrPtr = &(*listPtrPtr)->nextPtr;
   560         -	}
   561         -	*listPtrPtr = itemPtr;
   562         -    }
   563         -    return itemPtr;
   564         -}
   565         -
   566         -static void
   567         -list_free(list_item_t **listPtrPtr)
   568         -{
   569         -    list_item_t *tmpPtr, *listPtr = *listPtrPtr;
   570         -    while (listPtr) {
   571         -	tmpPtr = listPtr;
   572         -	listPtr = listPtr->nextPtr;
   573         -	free(tmpPtr->key);
   574         -	free(tmpPtr->value);
   575         -	free(tmpPtr);
   576         -    }
   577         -}
   578         -
   579         -/*
   580         - * SubstituteFile --
   581         - *	As windows doesn't provide anything useful like sed and it's unreliable
   582         - *	to use the tclsh you are building against (consider x-platform builds -
   583         - *	eg compiling AMD64 target from IX86) we provide a simple substitution
   584         - *	option here to handle autoconf style substitutions.
   585         - *	The substitution file is whitespace and line delimited. The file should
   586         - *	consist of lines matching the regular expression:
   587         - *	  \s*\S+\s+\S*$
   588         - *
   589         - *	Usage is something like:
   590         - *	  nmakehlp -S << $** > $@
   591         - *        @PACKAGE_NAME@ $(PACKAGE_NAME)
   592         - *        @PACKAGE_VERSION@ $(PACKAGE_VERSION)
   593         - *        <<
   594         - */
   595         -
   596         -static int
   597         -SubstituteFile(
   598         -    const char *substitutions,
   599         -    const char *filename)
   600         -{
   601         -    size_t cbBuffer = 1024;
   602         -    static char szBuffer[1024], szCopy[1024];
   603         -    char *szResult = NULL;
   604         -    list_item_t *substPtr = NULL;
   605         -    FILE *fp, *sp;
   606         -
   607         -    fp = fopen(filename, "rt");
   608         -    if (fp != NULL) {
   609         -
   610         -	/*
   611         -	 * Build a list of substutitions from the first filename
   612         -	 */
   613         -
   614         -	sp = fopen(substitutions, "rt");
   615         -	if (sp != NULL) {
   616         -	    while (fgets(szBuffer, cbBuffer, sp) != NULL) {
   617         -		unsigned char *ks, *ke, *vs, *ve;
   618         -		ks = (unsigned char*)szBuffer;
   619         -		while (ks && *ks && isspace(*ks)) ++ks;
   620         -		ke = ks;
   621         -		while (ke && *ke && !isspace(*ke)) ++ke;
   622         -		vs = ke;
   623         -		while (vs && *vs && isspace(*vs)) ++vs;
   624         -		ve = vs;
   625         -		while (ve && *ve && !(*ve == '\r' || *ve == '\n')) ++ve;
   626         -		*ke = 0, *ve = 0;
   627         -		list_insert(&substPtr, (char*)ks, (char*)vs);
   628         -	    }
   629         -	    fclose(sp);
   630         -	}
   631         -
   632         -	/* debug: dump the list */
   633         -#ifdef _DEBUG
   634         -	{
   635         -	    int n = 0;
   636         -	    list_item_t *p = NULL;
   637         -	    for (p = substPtr; p != NULL; p = p->nextPtr, ++n) {
   638         -		fprintf(stderr, "% 3d '%s' => '%s'\n", n, p->key, p->value);
   639         -	    }
   640         -	}
   641         -#endif
   642         -
   643         -	/*
   644         -	 * Run the substitutions over each line of the input
   645         -	 */
   646         -
   647         -	while (fgets(szBuffer, cbBuffer, fp) != NULL) {
   648         -	    list_item_t *p = NULL;
   649         -	    for (p = substPtr; p != NULL; p = p->nextPtr) {
   650         -		char *m = strstr(szBuffer, p->key);
   651         -		if (m) {
   652         -		    char *cp, *op, *sp;
   653         -		    cp = szCopy;
   654         -		    op = szBuffer;
   655         -		    while (op != m) *cp++ = *op++;
   656         -		    sp = p->value;
   657         -		    while (sp && *sp) *cp++ = *sp++;
   658         -		    op += strlen(p->key);
   659         -		    while (*op) *cp++ = *op++;
   660         -		    *cp = 0;
   661         -		    memcpy(szBuffer, szCopy, sizeof(szCopy));
   662         -		}
   663         -	    }
   664         -	    printf(szBuffer);
   665         -	}
   666         -
   667         -	list_free(&substPtr);
   668         -    }
   669         -    fclose(fp);
   670         -    return 0;
   671         -}
   672         -
   673         -/*
   674         - * QualifyPath --
   675         - *
   676         - *	This composes the current working directory with a provided path
   677         - *	and returns the fully qualified and normalized path.
   678         - *	Mostly needed to setup paths for testing.
   679         - */
   680         -
   681         -static int
   682         -QualifyPath(
   683         -    const char *szPath)
   684         -{
   685         -    char szCwd[MAX_PATH + 1];
   686         -    char szTmp[MAX_PATH + 1];
   687         -    char *p;
   688         -    GetCurrentDirectory(MAX_PATH, szCwd);
   689         -    while ((p = strchr(szPath, '/')) && *p)
   690         -	*p = '\\';
   691         -    PathCombine(szTmp, szCwd, szPath);
   692         -    PathCanonicalize(szCwd, szTmp);
   693         -    printf("%s\n", szCwd);
   694         -    return 0;
   695         -}
   696         -
   697         -/*
   698         - * Local variables:
   699         - *   mode: c
   700         - *   c-basic-offset: 4
   701         - *   fill-column: 78
   702         - *   indent-tabs-mode: t
   703         - *   tab-width: 8
   704         - * End:
   705         - */

Changes to generic/dom.c.

  1198   1198       if (!info->ignorexmlns) {
  1199   1199           for (atPtr = atts; atPtr[0] && atPtr[1]; atPtr += 2) {
  1200   1200   
  1201   1201               if (strncmp(atPtr[0], "xmlns", 5) == 0) {
  1202   1202                   xmlns = atPtr[0];
  1203   1203                   newNS = 1;
  1204   1204                   if (xmlns[5] == ':') {
  1205         -                    if (atPtr[1][0] == '\0') {
  1206         -                        Tcl_SetResult (info->interp, "Missing URI in Namespace "
  1207         -                               "declaration", NULL);
  1208         -                        XML_StopParser(info->parser, 0);
  1209         -                        return;
  1210         -                    }
  1211   1205                       if (domIsNamespaceInScope (info->activeNS, info->activeNSpos,
  1212   1206                                                  &(xmlns[6]), atPtr[1])) {
  1213   1207                           ns = domLookupPrefix (info->currentNode, &(xmlns[6]));
  1214   1208                           newNS = 0;
  1215   1209                       }
  1216   1210                       else {
  1217   1211                           ns = domNewNamespace(info->document, &xmlns[6], atPtr[1]);
................................................................................
  2499   2493               if (!domIsNCNAME (prefix)) {
  2500   2494                   if (interp) {
  2501   2495                       Tcl_SetObjResult(interp, 
  2502   2496                                        Tcl_NewStringObj("invalid prefix name", -1));
  2503   2497                   }
  2504   2498                   return NULL;
  2505   2499               }
  2506         -            if (uri[0] == '\0') {
  2507         -                Tcl_SetObjResult(interp,
  2508         -                                 Tcl_NewStringObj("Missing URI in "
  2509         -                                                  "Namespace declaration", -1));
  2510         -                return NULL;
  2511         -            }
  2512   2500           }
  2513   2501           if (!domIsNCNAME (localName)) {
  2514   2502               if (interp) {
  2515   2503                   Tcl_SetObjResult(interp, 
  2516   2504                                    Tcl_NewStringObj("invalid local name", -1));
  2517   2505               }
  2518   2506               return NULL;
................................................................................
  4576   4564       node->nodeFlags     = 0;
  4577   4565       node->namespace     = 0;
  4578   4566       node->nodeNumber    = NODE_NO(doc);
  4579   4567       node->ownerDocument = doc;
  4580   4568       node->nodeName      = (char *)&(h->key);
  4581   4569   
  4582   4570       domSplitQName (tagName, prefix, &localname);
  4583         -    if (prefix[0] == '\0' && uri[0] == '\0') {
  4584         -        return NULL;
  4585         -    }
  4586   4571       ns = domNewNamespace(doc, prefix, uri);
  4587   4572       node->namespace = ns->index;
  4588   4573   
  4589   4574       if (doc->fragments) {
  4590   4575           node->nextSibling = doc->fragments;
  4591   4576           doc->fragments->previousSibling = node;
  4592   4577           doc->fragments = node;

Changes to generic/domjson.c.

   333    333               DBG(fprintf(stderr, "Next array value node '%s'\n", &json[i]););
   334    334               skipspace(i);
   335    335               i = jsonParseValue (node, json, i, jparse);
   336    336               rc(i);
   337    337               skipspace(i);
   338    338               if (json[i] == ']') {
   339    339                   jparse->within = savedWithin;
   340         -                jparse->nestingDepth--;
   341    340                   return i+1;
   342    341               }
   343    342               if (json[i] == ',') {
   344    343                   i++;
   345    344                   continue;
   346    345               }
   347    346               errReturn(i,JSON_SYNTAX_ERR);

Changes to generic/domxpath.c.

  2313   2313           newlen = strlen(xpath);
  2314   2314           *errMsg = (char*)REALLOC(*errMsg, len+newlen+10);
  2315   2315           memmove(*errMsg + len, " for '", 6);
  2316   2316           memmove(*errMsg + len+6, xpath, newlen);
  2317   2317           memmove(*errMsg + len+6+newlen, "' ", 3);
  2318   2318   
  2319   2319           for (i=0; tokens[i].token != EOS; i++) {
  2320         -            sprintf(tmp, "%s\n%3s%3d %-12s %5ld %09.3f %5d  ",
         2320  +            sprintf(tmp, "%s\n%3s%3d %-12s %5ld %.3e %5d  ",
  2321   2321                            (i==0) ? "\n\nParsed symbols:" : "",
  2322   2322                            (i==l) ? "-->" : "   ",
  2323   2323                             i,
  2324   2324                            token2str[tokens[i].token-LPAR],
  2325   2325                            tokens[i].intvalue,
  2326   2326                            tokens[i].realvalue,
  2327   2327                            tokens[i].pos
................................................................................
  2372   2372       if (!(step->child)) return 1;
  2373   2373       if (step->child->type == IsElement) {
  2374   2374           if (node->nodeType == ELEMENT_NODE) {
  2375   2375               if ((step->child->strvalue[0] == '*') &&
  2376   2376                   (step->child->strvalue[1] == '\0') &&
  2377   2377                   (node->ownerDocument->rootNode != node) &&
  2378   2378                   (step->child->intvalue == 0)) return 1;
  2379         -            if (node->namespace
  2380         -                && (node->ownerDocument->namespaces[node->namespace-1]->prefix[0] != '\0'
  2381         -                    || node->ownerDocument->namespaces[node->namespace-1]->uri[0] != '\0')
  2382         -                ) return 0;
         2379  +            if (node->namespace) return 0;
  2383   2380               return (strcmp(node->nodeName, step->child->strvalue)==0);
  2384   2381           }
  2385   2382           return 0;
  2386   2383       } else
  2387   2384       if (step->child->type == IsAttr) {
  2388   2385           if (node->nodeType == ATTRIBUTE_NODE) {
  2389   2386               if (node->nodeFlags & IS_NS_NODE) return 0;

Changes to generic/nodecmd.c.

   411    411                       break;
   412    412                   }
   413    413               }
   414    414           } else {
   415    415               tag = nodeInfo->tagName;
   416    416           }
   417    417   
   418         -        newNode = domAppendNewElementNode (parent, tag, nodeInfo->namespace);
          418  +        newNode = domAppendNewElementNode (parent, tag, NULL);
   419    419           newNode->info = nodeInfo->jsonType;
   420    420           
   421    421           /*
   422    422            * Allow for following syntax:
   423    423            *   cmd ?-option value ...? ?script?
   424    424            *   cmd ?opton value ...? ?script?
   425    425            *   cmd key_value_list script
................................................................................
   522    522       Tcl_Obj *CONST  objv[];             /* Argument objects. */
   523    523       int             checkName;          /* Flag: Name checks? */
   524    524       int             checkCharData;      /* Flag: Data checks? */
   525    525   {
   526    526       int index, ret, type, nodecmd = 0, jsonType = 0, haveJsonType = 0;
   527    527       int isElement = 0;
   528    528       char *nsName, buf[64];
   529         -    Tcl_Obj *tagName = NULL, *namespace = NULL;
          529  +    Tcl_Obj *tagName = NULL;
   530    530       Tcl_DString cmdName;
   531    531       NodeInfo *nodeInfo;
   532    532   
   533    533       /*
   534    534        * Syntax:  
   535    535        *
   536    536        *     dom createNodeCmd ?-returnNodeCmd? nodeType commandName
................................................................................
   542    542   
   543    543       static CONST84 char *subcmds[] = {
   544    544           "elementNode", "textNode", "cdataNode", "commentNode", "piNode",
   545    545           "parserNode", NULL
   546    546       };
   547    547   
   548    548       static CONST84 char *options[] = {
   549         -        "-returnNodeCmd", "-jsonType", "-tagName", "-namespace", NULL
          549  +        "-returnNodeCmd", "-jsonType", "-tagName", NULL
   550    550       };
   551    551   
   552    552       enum option {
   553         -        o_returnNodeCmd, o_jsonType, o_tagName, o_namespace
          553  +        o_returnNodeCmd, o_jsonType, o_tagName
   554    554       };
   555    555   
   556    556       static const char *jsonTypes[] = {
   557    557           "NONE",
   558    558           "ARRAY",
   559    559           "OBJECT",
   560    560           "NULL",
................................................................................
   589    589               objc -= 2;
   590    590               objv += 2;
   591    591               break;
   592    592               
   593    593           case o_tagName:
   594    594               tagName = objv[2];
   595    595               objc -= 2;
   596         -            objv += 2;
   597         -            break;
   598         -
   599         -        case o_namespace:
   600         -            namespace = objv[2];
   601         -            objc -= 2;
   602    596               objv += 2;
   603    597               break;
   604    598               
   605    599           }
   606    600       }
   607    601       if (objc != 3) {
   608    602           goto usage;
................................................................................
   670    664               }
   671    665           } else {
   672    666               if (jsonType < 3 && jsonType > 0) {
   673    667                   Tcl_SetResult(interp, "For a text node the jsonType "
   674    668                                 "argument must be one out of this list: "
   675    669                                 "TRUE FALSE NULL NUMBER STRING NONE",
   676    670                                 NULL);
   677         -                return TCL_ERROR;
   678    671               }
   679    672               type = TEXT_NODE;
   680    673           }
   681    674           break;
   682    675       case CDS_NODE: 
   683    676           if (checkCharData) {
   684    677               type = CDATA_SECTION_NODE_CHK;
................................................................................
   710    703       }
   711    704   
   712    705       if (tagName && !isElement) {
   713    706           Tcl_SetResult(interp, "The -tagName option is allowed only for "
   714    707                         "element node commands.", NULL);
   715    708           return TCL_ERROR;        
   716    709       }
   717         -
   718         -    if (namespace && !isElement) {
   719         -        Tcl_SetResult(interp, "The -namespace option is allowed only for "
   720         -                      "element node commands.", NULL);
   721         -        return TCL_ERROR;        
   722         -    }
   723    710       
   724    711       if (haveJsonType && type != ELEMENT_NODE && type != TEXT_NODE) {
   725    712           Tcl_SetResult(interp, "Only element and text nodes may have a "
   726    713                         "JSON type.", NULL);
   727    714           return TCL_ERROR;        
   728    715       }
   729    716       
................................................................................
   731    718       nodeInfo->namespace = NULL;
   732    719       nodeInfo->type = type;
   733    720       if (nodecmd) {
   734    721           nodeInfo->type *= -1; /* Signal this fact */
   735    722       }
   736    723       nodeInfo->jsonType = jsonType;
   737    724       nodeInfo->tagName = NULL;
   738         -    if (namespace) {
   739         -        nodeInfo->namespace = tdomstrdup (Tcl_GetString(namespace));
   740         -    }
   741    725       if (tagName) {
   742    726           nodeInfo->tagName = tdomstrdup (Tcl_GetString(tagName));
   743    727       }
   744    728       Tcl_CreateObjCommand(interp, Tcl_DStringValue(&cmdName), NodeObjCmd,
   745    729                            (ClientData)nodeInfo, NodeObjCmdDeleteProc);
   746    730       Tcl_DStringResult(interp, &cmdName);
   747    731       Tcl_DStringFree(&cmdName);

Changes to generic/tcldom.c.

   210    210       "    createDocument docElemName ?objVar?              \n"
   211    211       "    createDocumentNS uri docElemName ?objVar?        \n"
   212    212       "    createDocumentNode ?objVar?                      \n"
   213    213       TDomThreaded(
   214    214       "    attachDocument domDoc ?objVar?                   \n"
   215    215       "    detachDocument domDoc                            \n"
   216    216       )
   217         -    "    createNodeCmd ?-returnNodeCmd? ?-tagName name? ?-jsonType jsonType? ?-namespace URI? (element|comment|text|cdata|pi)Node cmdName \n"
          217  +    "    createNodeCmd ?-returnNodeCmd? (element|comment|text|cdata|pi)Node cmdName \n"
   218    218       "    setResultEncoding ?encodingName?                 \n"
   219    219       "    setStoreLineColumn ?boolean?                     \n"
   220    220       "    setNameCheck ?boolean?                           \n"
   221    221       "    setTextCheck ?boolean?                           \n"
   222    222       "    setObjectCommands ?(automatic|token|command)?    \n"
   223    223       "    isCharData string                                \n"
   224    224       "    isComment string                                 \n"
................................................................................
  1646   1646       int         objc,
  1647   1647       Tcl_Obj    *CONST objv[]
  1648   1648   )
  1649   1649   {
  1650   1650       char          *xpathQuery, *typeVar, *option;
  1651   1651       char          *errMsg = NULL, **mappings = NULL;
  1652   1652       int            rc, i, len, optionIndex, localmapping = 0, cache = 0;
  1653         -    int            mappingListObjLen = 0;
         1653  +    int            mappingListObjLen;
  1654   1654       xpathResultSet rs;
  1655         -    Tcl_Obj       *type, *objPtr, *objPtr1, *mappingListObj = NULL;
         1655  +    Tcl_Obj       *type, *objPtr, *objPtr1, *mappingListObj;
  1656   1656       xpathCBs       cbs;
  1657   1657       xpathParseVarCB parseVarCB;
  1658   1658   
  1659   1659       static CONST84 char *selectNodesOptions[] = {
  1660   1660           "-namespaces", "-cache", NULL
  1661   1661       };
  1662   1662       enum selectNodesOption {
................................................................................
  5586   5586   
  5587   5587           case m_createElementNS:
  5588   5588               CheckArgs(4,5,2,"elementName uri ?newObjVar?");
  5589   5589               uri = Tcl_GetString(objv[2]);
  5590   5590               tag = Tcl_GetString(objv[3]);
  5591   5591               CheckName (interp, tag, "full qualified tag", 1);
  5592   5592               n = domNewElementNodeNS(doc, tag, uri);
  5593         -            if (n == NULL) {
  5594         -                SetResult("Missing URI in Namespace declaration");
  5595         -                return TCL_ERROR;
  5596         -            }
  5597   5593               return tcldom_setInterpAndReturnVar(interp, n, (objc == 5),
  5598   5594                                           (objc == 5) ? objv[4] : NULL);
  5599   5595   
  5600   5596           case m_createTextNode:
  5601   5597               CheckArgs(3,4,2,"data ?newObjVar?");
  5602   5598               data = Tcl_GetStringFromObj(objv[2], &data_length);
  5603   5599               CheckText (interp, data, "text");

Changes to tdom.m4.

   239    239       fi
   240    240       HTML5_LIBS=""
   241    241       if test "$tcl_ok" = "yes" ; then
   242    242           HAVEGUMBO=`pkg-config --exists gumbo && echo "1"`
   243    243           if test "$HAVEGUMBO" = "1" ; then
   244    244               AC_MSG_RESULT([yes])
   245    245               AC_DEFINE(TDOM_HAVE_GUMBO)
   246         -            if test "${TEA_PLATFORM}" = "windows" ; then
   247         -                HTML5_LIBS="-Wl,-Bstatic `pkg-config --static --cflags --libs gumbo` -Wl,-Bdynamic"
   248         -            else
   249         -                HTML5_LIBS="`pkg-config --cflags --libs gumbo`"
   250         -            fi
          246  +            HTML5_LIBS="`pkg-config --cflags --libs gumbo`"
   251    247           else
   252    248               AC_MSG_ERROR([The required lib gumbo not found])
   253    249           fi
   254    250       else    
   255    251           AC_MSG_RESULT([no])
   256    252       fi
   257    253   ])

Changes to tests/all.tcl.

    16     16               ::tcltest::testConstraint] == -1} {
    17     17           set ::tcltest::testConfig(need_i18n) 1
    18     18           set ::tcltest::testConstraints(need_i18n) 1
    19     19           if {[info procs ::tDOM::extRefHandler] != ""} {
    20     20               set ::tcltest::testConfig(need_uri) 1
    21     21               set ::tcltest::testConstraints(need_uri) 1
    22     22           }
    23         -    } else {
           23  +   } else {
    24     24           ::tcltest::testConstraint need_i18n 1
    25         -        if {[info procs ::tDOM::extRefHandler] != ""} {
    26         -            ::tcltest::testConstraint need_uri 1
    27         -        }
           25  +       if {[info procs ::tDOM::extRefHandler] != ""} {
           26  +           ::tcltest::testConstraint need_uri 1
           27  +       }
    28     28       }
    29     29   }
    30     30   
    31     31   set timeCmd {clock format [clock seconds]}
    32     32   
    33     33   set ::tcltest::testSingleFile false
    34     34   

Changes to tests/dom.test.

   114    114       set nrOfCommands [llength [info commands]]
   115    115       set doc [dom createDocument root]
   116    116       rename $doc fooCmd
   117    117       fooCmd delete
   118    118       expr {[llength [info commands]] == $nrOfCommands}
   119    119   } {1}
   120    120   
   121         -test dom-1.16 {createDocumentNS - empty namespace, no prefix} {
   122         -    dom createDocumentNS "" doc doc
   123         -    set result [$doc asXML -indent none]
   124         -    $doc delete
   125         -    set result
   126         -} {<doc/>}
   127         -
   128         -test dom-1.17 {createDocumentNS -  namespace, no prefix} {
   129         -    dom createDocumentNS "uri" doc doc
   130         -    set result [$doc asXML -indent none]
   131         -    $doc delete
   132         -    set result
   133         -} {<doc xmlns="uri"/>}
   134         -
   135         -test dom-1.18 {createDocumentNS -  namespace, no prefix} {
   136         -    dom createDocumentNS "uri" doc doc
   137         -    set result [$doc selectNodes -namespaces {ns uri} count(/ns:doc)]
   138         -    $doc delete
   139         -    set result
   140         -} 1
   141         -
   142         -test dom-1.19 {createDocumentNS - namespace, prefix} {
   143         -    dom createDocumentNS "uri" n1:doc doc
   144         -    set result [$doc selectNodes -namespaces {ns uri} count(/ns:doc)]
   145         -    $doc delete
   146         -    set result
   147         -} 1
   148         -
   149         -test dom-1.20 {createDocumentNS - empty namespace, prefix} {
   150         -    catch {dom createDocumentNS "" n1:doc doc} errMsg
   151         -    set errMsg
   152         -} {Missing URI in Namespace declaration}
   153         -
   154    121   test dom-2.1 {Don't quash white space at start or end of non white space content} {
   155    122       set doc [dom parse {<root>
   156    123       some content
   157    124       </root>}]
   158    125       set root [$doc documentElement]
   159    126       $root text
   160    127   } {
................................................................................
   518    485   test dom-2.28 {parse document with undeclared xml prefix} {
   519    486       catch {dom parse {<doc><foo:e/></doc>}} errMsg
   520    487       string range $errMsg 0 30
   521    488   } {Namespace prefix is not defined}
   522    489   
   523    490   # This is an expat bug. If XML_StopParser is called in the
   524    491   # elementstarthandler function for the document element and there
   525         -# isn't anything else in the document than this document element, then
          492  +# isn't anything else in the document then this document element, then
   526    493   # the XML_Parse() return code doesn't reflects this. This is an edge
   527    494   # case, see the next test below.
   528    495   test dom-2.29 {parse not well-formed document with undeclared xml prefix} {knownBug} {
   529    496       catch {dom parse {<foo:e/>}} errMsg
   530    497       string range $errMsg 0 30
   531    498   } {Namespace prefix is not defined}
   532    499   
................................................................................
   565    532   test dom-2.33 {end of options option} {
   566    533       set doc [dom parse -json -- -0.123]
   567    534       set result [$doc asXML -indent none]
   568    535       $doc delete
   569    536       set result
   570    537   } -0.123
   571    538   
   572         -test dom-2.34 {XML prefix declaration with empty namespace} {
   573         -    catch {dom parse {<foo:doc xmlns:foo=""><e1/></foo:doc>}} errMsg
   574         -    set errMsg
   575         -} {Missing URI in Namespace declaration, referenced at line 1 character 22}
   576         -
   577    539   test dom-3.1 {isName} {
   578    540       dom isName ":foo"
   579    541   } {1}
   580    542   
   581    543   test dom-3.2 {isName} {
   582    544       dom isName "_foo"
   583    545   } {1}

Changes to tests/domDoc.test.

    27     27   #    domDoc-21.*: baseURI
    28     28   #    domDoc-22.*: appendFromScript
    29     29   #    domDoc-23.*: getElementsByTagNameNS
    30     30   #    domDoc-24.*: cdataSectionElements
    31     31   #    domDoc-25.*: selectNodesNamespaces
    32     32   #    domDoc-26.*: fragments list
    33     33   #    domDoc-27.*: deleteXPathCache
    34         -#    domDoc-28.*: createElementNS
    35     34   #
    36     35   # Copyright (c) 2004 - 2007 Rolf Ade.
    37     36   
    38     37   source [file join [file dir [info script]] loadtdom.tcl]
    39     38   
    40     39   test domDoc-1.1 {asXML -escapeNonASCII} {need_i18n} {
    41     40       set doc [dom parse [tDOM::xmlReadFile \
................................................................................
  1396   1395       set result [list [$node prefix] [$node localName]]
  1397   1396       set node [$doc selectNodes default1:root/default2:elem1/elem11]
  1398   1397       lappend result [$node nodeName] [$node namespaceURI]
  1399   1398       $doc delete
  1400   1399       set result
  1401   1400   } {{} elem1 elem11 {}}
  1402   1401   
  1403         -test domDoc-25.7.1 {selectNodesNamespaces} {
  1404         -    set doc [dom parse {<root xmlns="rootdefaultNS">
  1405         -        <elem1 xmlns="elem1NS"/>
  1406         -        <elem2 xmlns="elem2NS"/>
  1407         -        </root>}]
  1408         -    $doc documentElement root
  1409         -    $root firstChild elem1
  1410         -    $doc createElement elem11 elem11
  1411         -    $elem1 appendChild $elem11
  1412         -    $doc selectNodesNamespaces {default2 elem1NS default1 rootdefaultNS}
  1413         -    set node [$doc selectNodes default1:root/default2:elem1]
  1414         -    set result [list [$node prefix] [$node localName]]
  1415         -    set node [$doc selectNodes default1:root/default2:elem1/elem11]
  1416         -    lappend result [$node nodeName] [$node namespaceURI]
  1417         -    $doc delete
  1418         -    set result
  1419         -} {{} elem1 elem11 {}}
  1420         -
  1421   1402   test domDoc-25.8 {selectNodesNamespaces} {
  1422   1403       set doc [dom parse {<root xmlns="rootdefaultNS">
  1423   1404           <elem1 xmlns="elem1NS"><elem11 xmlns=""/></elem1>
  1424   1405           <elem2 xmlns="elem2NS"/>
  1425   1406           </root>}]
  1426   1407       $doc selectNodesNamespaces {default2 elem1NS default1 rootdefaultNS}
  1427   1408       set result [catch {set node [$doc selectNodes \
................................................................................
  1476   1457       lappend result [$doc deleteXPathCache foo/bar]
  1477   1458       lappend result [$doc deleteXPathCache 2+2]
  1478   1459       lappend result [$doc deleteXPathCache]
  1479   1460       $doc selectNodes -cache 1 2+2
  1480   1461       $doc delete
  1481   1462       set result
  1482   1463   } {{} {} {} {}}
  1483         -
  1484         -test domDoc-28.1 {createElementNS} {
  1485         -    set doc [dom createDocument doc]
  1486         -    set newElem [$doc createElementNS uri ns:e]
  1487         -    $doc documentElement root
  1488         -    $root appendChild $newElem
  1489         -    set result [$doc asXML -indent none]
  1490         -    $doc delete
  1491         -    set result
  1492         -} {<doc><ns:e xmlns:ns="uri"/></doc>}
  1493         -
  1494         -test domDoc-28.2 {createElementNS} {
  1495         -    set doc [dom createDocument doc]
  1496         -    set newElem [$doc createElementNS uri ns:e]
  1497         -    $newElem setAttributeNS uri ns:att value
  1498         -    $doc documentElement root
  1499         -    $root appendChild $newElem
  1500         -    set result [$doc selectNodes -namespaces {ns uri} string(/doc/ns:e/@ns:att)]
  1501         -    $doc delete
  1502         -    set result
  1503         -} {value}
  1504         -
  1505         -test domDoc-28.3 {createElementNS} {
  1506         -    set doc [dom createDocument doc]
  1507         -    catch {$doc createElementNS "" e} errMsg
  1508         -    $doc delete
  1509         -    set errMsg
  1510         -} {Missing URI in Namespace declaration}
  1511         -
  1512   1464   
  1513   1465   # cleanup
  1514   1466   ::tcltest::cleanupTests
  1515   1467   return

Changes to tests/domNode.test.

   393    393       $root setAttributeNS uri1 p1:a1 1 "" xmlns uri3 uri1 p1:a2 2 "" xmlns:p4 uri4 uri4 p4:a1 a1 uri2 p2:a3 3 "" a4 4
   394    394       set result [$root asXML]
   395    395       $doc delete
   396    396       set result
   397    397   } {<p1:root xmlns:p1="uri1" xmlns:p2="uri2" xmlns="uri3" xmlns:p4="uri4" p1:a1="1" p1:a2="2" p4:a1="a1" p2:a3="3" a4="4"/>
   398    398   }
   399    399   
   400         -test domNode-4.18 {setAttributeNS - prefixed attribute name with empty namespace} {
   401         -    set doc [dom createDocument "root"]
   402         -    set root [$doc documentElement]
   403         -    catch {$root setAttributeNS "" ns:att attvalue} errMsg
   404         -    $doc delete
   405         -    set errMsg
   406         -} {For all prefixed attributes with prefixes other than 'xml' or 'xmlns' you have to provide a namespace URI}
   407         -
   408    400   test domNode-5.1 {removeChild} {
   409    401       dom parse {<root><child/></root>} doc
   410    402       $doc documentElement root
   411    403       $root removeChild [$root firstChild]
   412    404       set result [$doc asXML -indent none]
   413    405       $doc delete
   414    406       set result

Deleted tests/domjson.test.

     1         -# Features covered: JSON parser
     2         -#
     3         -# This file contains a collection of tests for the JSON parser.
     4         -# Tested functionalities:
     5         -#    json-1.*: JSON syntax tests
     6         -#    json-2.*: Valid JSON, that could not parsed into DOM
     7         -#    json-3.*: JSON unescaping
     8         -#    json-4.*: Unicode
     9         -#    json-5.*: Max nesting
    10         -#    json-6.*: asJSON
    11         -#    json-7.*: jsonType
    12         -#    json-7.*: appendFromScript
    13         -# Copyright (c) 2017 Rolf Ade.
    14         -
    15         -source [file join [file dir [info script]] loadtdom.tcl]
    16         -
    17         -
    18         -namespace eval nodeCmds {
    19         -    dom createNodeCmd elementNode e1
    20         -    dom createNodeCmd -jsonType ARRAY elementNode jae1
    21         -    dom createNodeCmd elementNode e2
    22         -    dom createNodeCmd commentNode c
    23         -    dom createNodeCmd textNode    t
    24         -    dom createNodeCmd -jsonType TRUE textNode true
    25         -    dom createNodeCmd -jsonType FALSE textNode false
    26         -    dom createNodeCmd -jsonType NULL textNode null
    27         -    dom createNodeCmd -jsonType NUMBER textNode number
    28         -    dom createNodeCmd cdataNode   cdata
    29         -    dom createNodeCmd piNode      pi
    30         -}
    31         -
    32         -test json-1.1 {Parse JSON} {
    33         -    set doc [dom parse -json {{"a":"avalue","b":"bvalue","c":0.123}}]
    34         -    set result [$doc asXML -indent none]
    35         -    $doc delete
    36         -    set result
    37         -} "<a>avalue</a><b>bvalue</b><c>0.123</c>"
    38         -
    39         -test json-1.2 {Parse JSON} {
    40         -    set doc [dom parse -json { {"a" : [ "avalue" ] } }]
    41         -    set result [$doc asXML -indent none]
    42         -    $doc delete
    43         -    set result
    44         -} {<a>avalue</a>}
    45         -
    46         -test json-1.3 {Parse JSON} {
    47         -    set doc [dom parse -json {{"a":"a value","b":"1value"}}]
    48         -    set result [$doc asXML -indent none]
    49         -    $doc delete
    50         -    set result
    51         -} "<a>a value</a><b>1value</b>"
    52         -
    53         -test json-1.4 {Parse JSON - nested object} {
    54         -    set doc [dom parse -json {{"a":{"aa":"aavalue","bb":"bbvalue"},"b":"bvalue","c":0.123}}]
    55         -    set result [$doc asXML -indent none]
    56         -    $doc delete
    57         -    set result
    58         -} "<a><aa>aavalue</aa><bb>bbvalue</bb></a><b>bvalue</b><c>0.123</c>"
    59         -
    60         -test json-1.5 {Parse JSON - array} {
    61         -    set doc [dom parse -json {{"a": [1,2,3,4,"abc"]}}]
    62         -    set result [$doc asXML -indent none]
    63         -    $doc delete
    64         -    set result
    65         -} "<a>1234abc</a>"
    66         -
    67         -test json-1.6 {Parse JSON - true, false, null} {
    68         -    set doc [dom parse -json {{"a":true,"b":false,"c":null,"d":"true","e":""}}]
    69         -    set result [$doc asXML -indent none]
    70         -    $doc delete
    71         -    set result
    72         -} {<a>true</a><b>false</b><c>null</c><d>true</d><e></e>}
    73         -
    74         -test json-1.7 {Parse JSON - array in nested object} {
    75         -    set doc [dom parse -json {{"a":{"aa":[1,2,3,4,"abc"]},"b":"bvalue"}}]
    76         -    set result [$doc asXML -indent none]
    77         -    $doc delete
    78         -    set result
    79         -} "<a><aa>1234abc</aa></a><b>bvalue</b>"
    80         -
    81         -test json-1.8 {Parse JSON - true, false, null} {
    82         -    set doc [dom parse -json -jsonroot "JSONObject" {{"a":true,"b":false,"c":null,"d":"true","e":""}}]
    83         -    set result [$doc asXML -indent none]
    84         -    $doc delete
    85         -    set result
    86         -} {<JSONObject><a>true</a><b>false</b><c>null</c><d>true</d><e></e></JSONObject>}
    87         -
    88         -test json-1.9 {JSON syntax error} {
    89         -    set result [catch {dom parse -json {{"a" "a value"}}} errMsg]
    90         -    list $result $errMsg
    91         -} {1 {error "JSON syntax error" at position 5
    92         -"{"a" " <--Error-- a value"}"}}
    93         -
    94         -test json-1.10 {JSON syntax error} {
    95         -    set result [catch {dom parse -json {{"a":00.23}}} errMsg]
    96         -    list $result $errMsg
    97         -} {1 {error "JSON syntax error" at position 6
    98         -"{"a":00 <--Error-- .23}"}}
    99         -
   100         -test json-1.11 {JSON syntax error} {
   101         -    set result [catch {dom parse -json {{"a":-00.23}}} errMsg]
   102         -    list $result $errMsg
   103         -} {1 {error "JSON syntax error" at position 7
   104         -"{"a":-00 <--Error-- .23}"}}
   105         -
   106         -test json-1.12 {JSON syntax error} {
   107         -    set result [catch {dom parse -json {{"a":.23}}} errMsg]
   108         -    list $result $errMsg
   109         -} {1 {error "JSON syntax error" at position 5
   110         -"{"a":. <--Error-- 23}"}}
   111         -
   112         -test json-1.13 {JSON syntax error} {
   113         -    set result [catch {dom parse -json {{"a":-.23}}} errMsg]
   114         -    list $result $errMsg
   115         -} {1 {error "JSON syntax error" at position 6
   116         -"{"a":-. <--Error-- 23}"}}
   117         -
   118         -test json-1.14 {JSON syntax error} {
   119         -    set result [catch {dom parse -json {{"a":-}}} errMsg]
   120         -    list $result $errMsg
   121         -} {1 {error "JSON syntax error" at position 5
   122         -"{"a":- <--Error-- }"}}
   123         -
   124         -test json-1.15 {Parse JSON - nested object} {
   125         -    set doc [dom parse -json {["a",["aa","bb"],"b"]}]
   126         -    set result [$doc asXML -indent none]
   127         -    $doc delete
   128         -    set result
   129         -} "a<arraycontainer>aabb</arraycontainer>b"
   130         -
   131         -set notJsons {
   132         -    {{null}}
   133         -    {{1.23}}
   134         -    {{"string"}}
   135         -    {{"e":}}
   136         -}
   137         -test json-1.16 {Invalid input} {
   138         -    set result ""
   139         -    set ind 0
   140         -    foreach notJson $notJsons {
   141         -        if {![catch {dom parse -json $notJson docNode} errMsg]} {
   142         -            lappend result $errMsg
   143         -        }
   144         -    }
   145         -    set result
   146         -} ""
   147         -
   148         -test json-1.17 {Literal binary 0 (NUL, '\0') is not allowed in input} {
   149         -    catch {dom parse -json "\"a\u0000\""}
   150         -} 1
   151         -
   152         -test json-1.18 {Escaped binary 0 (NUL, '\0') is OK} {
   153         -    dom parse -json "\"a\\u0000\"" doc
   154         -    set result [$doc asJSON]
   155         -    $doc delete
   156         -    set result
   157         -} "\"a\\u0000\""
   158         -
   159         -test json-1.19 {Invalid input - uncompled \u escape} {
   160         -    catch {dom parse -json {"ab\u00"}}
   161         -} 1
   162         -
   163         -test json-1.20 {Escaped binary 0} {
   164         -    dom parse -json "\"a\\u0000\"" doc
   165         -    set textvalue [$doc selectNodes string(node())]
   166         -    set result [string length $textvalue]
   167         -    binary scan $textvalue c2 result2
   168         -    lappend result {*}$result2
   169         -    $doc delete
   170         -    set result
   171         -} {2 97 0}
   172         -
   173         -test json-2.1 {invalid xml name} {
   174         -    set doc [dom parse -json {{"a":"a value","1b":"1value", "a\nb":"a\nb", "":"empty string"}}]
   175         -    set result [$doc asXML -indent none]
   176         -    $doc delete
   177         -    set result
   178         -} {<a>a value</a><1b>1value</1b><a
   179         -b>a
   180         -b</a
   181         -b><>empty string</>}
   182         -
   183         -test json-3.1 {Unescaping} {
   184         -    set doc [dom parse -json {{"a":"a\nvalue","b":"value\tvalue"}}]
   185         -    set result [$doc asXML -indent none]
   186         -    $doc delete
   187         -    set result
   188         -} "<a>a
   189         -value</a><b>value\tvalue</b>"
   190         -
   191         -test json-3.2 {Unescaping} {
   192         -    set doc [dom parse -json {{"a":"a\nvalue", "b":"12\u0077\u2221ec"}}]
   193         -    set result [$doc asXML -indent none -escapeNonASCII]
   194         -    $doc delete
   195         -    set result
   196         -} "<a>a
   197         -value</a><b>12w&#8737;ec</b>"
   198         -
   199         -test json-3.3 {Unescaping} {
   200         -    set doc [dom parse -json {{"a":"\u0077\u2221"}}]
   201         -    set result [$doc asXML -indent none -escapeNonASCII]
   202         -    $doc delete
   203         -    set result
   204         -} "<a>w&#8737;</a>"
   205         -
   206         -test json-3.4 {unescaping} {
   207         -    set doc [dom parse -jsonroot json -json {["\\a"]}]
   208         -    set result [$doc asXML -indent none]
   209         -    $doc delete
   210         -    set result
   211         -} {<json>\a</json>}
   212         -
   213         -test json-3.4.1 {unescaping} {
   214         -    set doc [dom parse -jsonroot json -json {["\\a","\u0071"]}]
   215         -    set result [$doc asXML -indent none]
   216         -    $doc delete
   217         -    set result
   218         -} {<json>\aq</json>}
   219         -
   220         -test json-3.5 {unescaping} {
   221         -    set result [catch {dom parse -json {{"this":"a\lb"}}} errMsg]
   222         -    list $result $errMsg
   223         -} {1 {error "JSON syntax error" at position 11
   224         -"{"this":"a\l <--Error-- b"}"}}
   225         -
   226         -test json-3.6 {unescaping} {
   227         -    set doc [dom parse -json {{"this":"a\nbc"}}]
   228         -    set result [$doc asXML -indent none]
   229         -    $doc delete
   230         -    set result
   231         -} {<this>a
   232         -bc</this>} 
   233         -
   234         -test json-3.7 {unescaping} {
   235         -    set doc [dom parse -json {{"this":"a\u0077\t\u0078bc"}}]
   236         -    set result [$doc asXML -indent none]
   237         -    $doc delete
   238         -    set result
   239         -} "<this>aw\txbc</this>"
   240         -
   241         -test json-3.8 {unescaping} {
   242         -    set doc [dom parse -json {{"this":"a\u000b"}}]
   243         -    set result [$doc asXML -indent none]
   244         -    $doc delete
   245         -    set result
   246         -} "<this>a\u000b</this>"
   247         -
   248         -test json-3.9 {unescaping} {
   249         -    set doc [dom parse -json {{"this":"a\u0077","that":"\t\u0078bc"}}]
   250         -    set result [$doc asXML -indent none]
   251         -    $doc delete
   252         -    set result
   253         -} "<this>aw</this><that>\txbc</that>"
   254         -
   255         -test json-5.1 {-jsonmaxnesting 0} {
   256         -    set result [catch {dom parse -json -jsonmaxnesting 0 {{"this":"that"}}} errMsg]
   257         -    list $result $errMsg
   258         -} {1 {error "Maximum JSON object/array nesting depth exceeded" at position 0
   259         -"{ <--Error-- "this":"that"}"}}
   260         -
   261         -test json-5.2 {-jsonmaxnesting 0} {
   262         -    set result [catch {dom parse -json -jsonmaxnesting 0 {["this","that"]}} errMsg]
   263         -    list $result $errMsg
   264         -} {1 {error "Maximum JSON object/array nesting depth exceeded" at position 0
   265         -"[ <--Error-- "this","that"]"}}
   266         -
   267         -test json-5.3 {-jsonmaxnesting 0} {
   268         -    set result [catch {dom parse -jsonroot o -json -jsonmaxnesting 0 {["this","that"]}} errMsg]
   269         -    list $result $errMsg
   270         -} {1 {error "Maximum JSON object/array nesting depth exceeded" at position 0
   271         -"[ <--Error-- "this","that"]"}}
   272         -
   273         -test json-5.4 {-jsonmaxnesting} {
   274         -    set doc [dom parse -json -jsonmaxnesting 2 {{"this":{"foo":"that"}}}]
   275         -    set result [$doc asXML -indent none]
   276         -    $doc delete
   277         -    set result
   278         -} {<this><foo>that</foo></this>}
   279         -
   280         -test json-5.5 {-jsonmaxnesting} {
   281         -    set result [catch {dom parse -json -jsonmaxnesting 1 \
   282         -                           {{"this":{"foo":"that"}}}} errMsg]
   283         -    list $result $errMsg
   284         -} {1 {error "Maximum JSON object/array nesting depth exceeded" at position 8
   285         -"{"this":{ <--Error-- "foo":"that"}}"}}
   286         -
   287         -test json-5.6 {-jsonmaxnesting} {
   288         -    set doc [dom parse -json -jsonmaxnesting 2 {
   289         -        {
   290         -            "this": {
   291         -                "foo":"that",
   292         -                "bar":"grill"
   293         -            },
   294         -            "two": "value",
   295         -            "three": {
   296         -                "t1":"t1value",
   297         -                "t2":"t2value"
   298         -            },
   299         -            "four": ["a","b","c"]
   300         -        }}]
   301         -    set result [$doc asXML]
   302         -    $doc delete
   303         -    set result
   304         -} {<this>
   305         -    <foo>that</foo>
   306         -    <bar>grill</bar>
   307         -</this>
   308         -<two>value</two>
   309         -<three>
   310         -    <t1>t1value</t1>
   311         -    <t2>t2value</t2>
   312         -</three>
   313         -<four>abc</four>
   314         -}
   315         -
   316         -set jsons {
   317         -    {{"a":"avalue","b":"bvalue","c":0.123}}
   318         -    {{"a":["avalue"]}}
   319         -    {{"a":"a value","b":"1value"}}
   320         -    {{"a":{"aa":"aavalue","bb":"bbvalue"},"b":"bvalue","c":0.123}}
   321         -    {{"a":[1,2,3,4,"abc"]}}
   322         -    {{"a":true,"b":false,"c":null,"d":"true","e":""}}
   323         -    {{"a":{"aa":[1,2,3,4,"abc"]},"b":"bvalue"}}
   324         -    {{"a":true,"b":false,"c":null,"d":"true","e":""}}
   325         -    {["a",["aa","bb"],"b"]}
   326         -    {{"a":"a\nvalue","b":"value\tvalue"}}
   327         -    {["\\\\a"]}
   328         -    {["a\"b"]}
   329         -    {{"b":"a \"b c\" d","b":"a \"b c\" d"}}
   330         -    {{"this":"a\nbc"}}
   331         -    {{"this":{"foo":"that"}}}
   332         -    {{"this":{"foo":"that","bar":"grill"},"two":"value","three":{"t1":"t1value","t2":"t2value"},"four":["a","b","c"]}}
   333         -    {"only a string"}
   334         -    {null}
   335         -    {1.23}
   336         -    {true}
   337         -    {false}
   338         -    {{}}
   339         -    {[]}
   340         -    {[[]]}
   341         -    {[["x"]]}
   342         -    {""}
   343         -    {[[[[["a"]]]]]}
   344         -    {{"x":[{"id":"foo"}]}}
   345         -    {"http://foo.bar"}
   346         -}
   347         -test json-6.1 {asJSON} {
   348         -    set failedlist [list]
   349         -    set ind 0
   350         -    foreach json $jsons {
   351         -        set doc [dom parse -json $json]
   352         -        set out [$doc asJSON]
   353         -        if {$json ne $out} {
   354         -            lappend failedlist "$ind : '$json' : '$out'"
   355         -        }
   356         -        incr ind
   357         -    }
   358         -    set failedlist
   359         -} {}
   360         -
   361         -test json-6.2 {asJSON - slash will not be escaped while serializing} {
   362         -    set doc [dom parse -json {"http:\/\/foo.bar"}]
   363         -    set result [$doc asJSON]
   364         -    $doc delete
   365         -    set result
   366         -} {"http://foo.bar"}
   367         -
   368         -test json-6.3 {asJSON - docNode serialization} {
   369         -    dom createDocumentNode docNode
   370         -    set result [$docNode asJSON]
   371         -    $docNode delete
   372         -    set result
   373         -} {{}}
   374         -
   375         -test json-6.4 {asJSON - doc serialization} {
   376         -    dom createDocument root docNode
   377         -    set result [$docNode asJSON]
   378         -    $docNode delete
   379         -    set result
   380         -} {{"root":""}}
   381         -
   382         -test json-6.5 {asJSON - serialization of control characters} {
   383         -    set doc [dom parse -json "\"a\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\u0008\\u0009\\u000A\\u000B\\u000C\\u000D\\u000E\\u000F\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001A\\u001B\\u001C\\u001D\\u001E\\u001F\\u0020b\""]
   384         -    set result [$doc asJSON]
   385         -    $doc delete
   386         -    set result
   387         -} {"a\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f b"}
   388         -
   389         -test json-7.1 {jsonType} {
   390         -    set doc [dom parse {<j>foo</j>}]
   391         -    set root [$doc documentElement]
   392         -    set result [list]
   393         -    lappend result [$root asJSON]
   394         -    lappend result [$root jsonType]
   395         -    $root jsonType ARRAY
   396         -    lappend result [$root asJSON]
   397         -    $doc delete
   398         -    set result
   399         -} {{"foo"} NONE {["foo"]}}
   400         -
   401         -test json-7.2 {jsonType} {
   402         -    set doc [dom createDocumentNode]
   403         -    set result [$doc jsonType]
   404         -    lappend result [$doc asJSON]
   405         -    lappend result [catch {$doc jsonType foo}]
   406         -    $doc jsonType ARRAY
   407         -    lappend result [$doc asJSON]
   408         -    $doc jsonType OBJECT
   409         -    lappend result [$doc asJSON]
   410         -    $doc delete
   411         -    set result
   412         -} {NONE {{}} 1 {[]} {{}}}
   413         -
   414         -test json-8.1 {appendFromScript} {
   415         -    set doc [dom createDocumentNode]
   416         -    $doc appendFromScript {
   417         -        nodeCmds::e1
   418         -    }
   419         -    set result [list]
   420         -    lappend result [$doc asJSON]
   421         -    set root [$doc documentElement]
   422         -    lappend result [$root asJSON]
   423         -    $doc removeChild [$doc firstChild]
   424         -    $doc appendFromScript {
   425         -        nodeCmds::jae1
   426         -    }
   427         -    lappend result [$doc asJSON]
   428         -    set root [$doc documentElement]
   429         -    lappend result [$root asJSON]
   430         -    lappend result [$root jsonType]
   431         -    $doc delete
   432         -    set result
   433         -} {{{"e1":""}} {{}} {{"jae1":[]}} {[]} ARRAY}
   434         -
   435         -test json-8.2 {appendFromScript} {
   436         -    set doc [dom createDocumentNode]
   437         -    $doc appendFromScript {
   438         -        nodeCmds::t "some string"
   439         -    }
   440         -    set result [$doc asJSON]
   441         -    $doc delete
   442         -    set result
   443         -} {"some string"}
   444         -
   445         -test json-8.3 {appendFromScript} {
   446         -    set doc [dom createDocumentNode]
   447         -    $doc appendFromScript {
   448         -        nodeCmds::t ""
   449         -        nodeCmds::true ""
   450         -        nodeCmds::false ""
   451         -        nodeCmds::null ""
   452         -    }
   453         -    set result [$doc asJSON]
   454         -    $doc delete
   455         -    set result
   456         -} {["",true,false,null]}
   457         -
   458         -test json-8.4 {appendFromScript - text node with type NUMBER} {
   459         -    set doc [dom createDocumentNode]
   460         -    $doc appendFromScript {
   461         -        nodeCmds::number ""
   462         -        nodeCmds::number "0"
   463         -        nodeCmds::number "123456789012345678901234567890.12345679e-0003"
   464         -        nodeCmds::number "42 "
   465         -        nodeCmds::number " 42"
   466         -        nodeCmds::number "-"
   467         -    }
   468         -    set result [$doc asJSON]
   469         -    $doc delete
   470         -    set result
   471         -} {["",0,123456789012345678901234567890.12345679e-0003,"42 "," 42","-"]}
   472         -
   473         -test json-8.5 {createNodeCmd - wrong jsonType} {
   474         -    catch {dom createNodeCmd -jsonType OBJECT textNode textNodeWithJsonTypeObject}
   475         -} 1

Changes to tests/domnamespace.test.

     2      2   #
     3      3   # This file contains a collection of tests for some namespace related
     4      4   # actions.
     5      5   #
     6      6   #    domnamespace-1.*: misc tests
     7      7   #    domnamespace-2.*: moving namespaced nodes from one document to another
     8      8   #    domnamespace-3.*: moving namespaced nodes within a document
     9         -#    domnamespace-4.*: createNodeCmd and namespaces
    10      9   #
    11     10   # Copyright (c) 2002 Rolf Ade.
    12     11   #
    13     12   # RCS: @(#) $Id$
    14     13   
    15     14   source [file join [file dir [info script]] loadtdom.tcl]
    16     15   
................................................................................
   311    310       set newParent [$doc selectNodes {/doc/node()[2]}]
   312    311       $newParent appendChild $nodeToMove
   313    312       set result [$doc asXML -indent none]
   314    313       $doc delete
   315    314       set result
   316    315   } {<doc><e xmlns="foo"/><e xmlns="bar"><ee xmlns="foo"/></e></doc>}
   317    316   
   318         -
   319         -namespace eval nodeCmds {
   320         -    dom createNodeCmd -namespace foo.bar elementNode ns1:e1
   321         -    dom createNodeCmd -namespace foo.bar elementNode e1
   322         -    dom createNodeCmd textNode t
   323         -    dom createNodeCmd -tagName e1 elementNode e1NoNS
   324         -}
   325         -
   326         -test domnamespace-4.1 {createNodeCmd and namespace} {
   327         -    dom createDocument doc doc
   328         -    $doc documentElement root
   329         -    $root appendFromScript {
   330         -        nodeCmds::ns1:e1 {nodeCmds::t "this"}
   331         -    }
   332         -    set result [$doc asXML -indent none]
   333         -    $doc delete
   334         -    set result
   335         -} {<doc><ns1:e1 xmlns:ns1="foo.bar">this</ns1:e1></doc>}
   336         -
   337         -test domnamespace-4.2 {createNodeCmd and namespace} {
   338         -    dom createDocumentNS foo.bar ns1:doc doc
   339         -    $doc documentElement root
   340         -    $root appendFromScript {
   341         -        nodeCmds::ns1:e1 {nodeCmds::t "this"}
   342         -    }
   343         -    set result [$doc asXML -indent none]
   344         -    $doc delete
   345         -    set result
   346         -} {<ns1:doc xmlns:ns1="foo.bar"><ns1:e1>this</ns1:e1></ns1:doc>}
   347         -
   348         -test domnamespace-4.3 {createNodeCmd and namespace} {
   349         -    dom createDocumentNS foo.bar doc doc
   350         -    $doc documentElement root
   351         -    $root appendFromScript {
   352         -        nodeCmds::ns1:e1 {nodeCmds::t "this"}
   353         -    }
   354         -    set result [$doc asXML -indent none]
   355         -    $doc delete
   356         -    set result
   357         -} {<doc xmlns="foo.bar"><ns1:e1 xmlns:ns1="foo.bar">this</ns1:e1></doc>}
   358         -
   359         -test domnamespace-4.4 {createNodeCmd and namespace} {
   360         -    dom createDocumentNS foo.bar doc doc
   361         -    $doc documentElement root
   362         -    $root appendFromScript {
   363         -        nodeCmds::e1 {
   364         -            nodeCmds::e1NoNS att attValue {nodeCmds::t "this"}
   365         -        }
   366         -    }
   367         -    set result [$doc asXML -indent none]
   368         -    $doc delete
   369         -    set result
   370         -} {<doc xmlns="foo.bar"><e1><e1 xmlns="" att="attValue">this</e1></e1></doc>}
   371         -
   372         -test domnamespace-4.5 {createNodeCmd and namespace} {
   373         -    dom createDocumentNS foo.bar doc doc
   374         -    $doc documentElement root
   375         -    $root appendFromScript {
   376         -        nodeCmds::e1 {
   377         -            nodeCmds::e1NoNS att attValue {nodeCmds::t "this"}
   378         -        }
   379         -    }
   380         -    set result [$doc selectNodes -namespaces {fb foo.bar} string(/fb:doc/fb:e1/e1/@att)]
   381         -    $doc delete
   382         -    set result
   383         -} {attValue}
   384         -
   385         -    
   386    317   # cleanup
   387    318   ::tcltest::cleanupTests
   388    319   return

Added tests/jsonreader.test.

            1  +# Features covered: JSON parser
            2  +#
            3  +# This file contains a collection of tests for the JSON parser.
            4  +# Tested functionalities:
            5  +#    json-1.*: JSON syntax tests
            6  +#    json-2.*: Valid JSON, that could not parsed into DOM
            7  +#    json-3.*: JSON unescaping
            8  +#    json-4.*: Unicode
            9  +#    json-5.*: Max nesting
           10  +#    json-6.*: asJSON
           11  +#    json-7.*: jsonType
           12  +#    json-7.*: appendFromScript
           13  +# Copyright (c) 2017 Rolf Ade.
           14  +
           15  +source [file join [file dir [info script]] loadtdom.tcl]
           16  +
           17  +
           18  +namespace eval nodeCmds {
           19  +    dom createNodeCmd elementNode e1
           20  +    dom createNodeCmd -jsonType ARRAY elementNode jae1
           21  +    dom createNodeCmd elementNode e2
           22  +    dom createNodeCmd commentNode c
           23  +    dom createNodeCmd textNode    t
           24  +    dom createNodeCmd -jsonType TRUE textNode true
           25  +    dom createNodeCmd -jsonType FALSE textNode false
           26  +    dom createNodeCmd -jsonType NULL textNode null
           27  +    dom createNodeCmd -jsonType NUMBER textNode number
           28  +    dom createNodeCmd cdataNode   cdata
           29  +    dom createNodeCmd piNode      pi
           30  +}
           31  +
           32  +test json-1.1 {Parse JSON} {
           33  +    set doc [dom parse -json {{"a":"avalue","b":"bvalue","c":0.123}}]
           34  +    set result [$doc asXML -indent none]
           35  +    $doc delete
           36  +    set result
           37  +} "<a>avalue</a><b>bvalue</b><c>0.123</c>"
           38  +
           39  +test json-1.2 {Parse JSON} {
           40  +    set doc [dom parse -json { {"a" : [ "avalue" ] } }]
           41  +    set result [$doc asXML -indent none]
           42  +    $doc delete
           43  +    set result
           44  +} {<a>avalue</a>}
           45  +
           46  +test json-1.3 {Parse JSON} {
           47  +    set doc [dom parse -json {{"a":"a value","b":"1value"}}]
           48  +    set result [$doc asXML -indent none]
           49  +    $doc delete
           50  +    set result
           51  +} "<a>a value</a><b>1value</b>"
           52  +
           53  +test json-1.4 {Parse JSON - nested object} {
           54  +    set doc [dom parse -json {{"a":{"aa":"aavalue","bb":"bbvalue"},"b":"bvalue","c":0.123}}]
           55  +    set result [$doc asXML -indent none]
           56  +    $doc delete
           57  +    set result
           58  +} "<a><aa>aavalue</aa><bb>bbvalue</bb></a><b>bvalue</b><c>0.123</c>"
           59  +
           60  +test json-1.5 {Parse JSON - array} {
           61  +    set doc [dom parse -json {{"a": [1,2,3,4,"abc"]}}]
           62  +    set result [$doc asXML -indent none]
           63  +    $doc delete
           64  +    set result
           65  +} "<a>1234abc</a>"
           66  +
           67  +test json-1.6 {Parse JSON - true, false, null} {
           68  +    set doc [dom parse -json {{"a":true,"b":false,"c":null,"d":"true","e":""}}]
           69  +    set result [$doc asXML -indent none]
           70  +    $doc delete
           71  +    set result
           72  +} {<a>true</a><b>false</b><c>null</c><d>true</d><e></e>}
           73  +
           74  +test json-1.7 {Parse JSON - array in nested object} {
           75  +    set doc [dom parse -json {{"a":{"aa":[1,2,3,4,"abc"]},"b":"bvalue"}}]
           76  +    set result [$doc asXML -indent none]
           77  +    $doc delete
           78  +    set result
           79  +} "<a><aa>1234abc</aa></a><b>bvalue</b>"
           80  +
           81  +test json-1.8 {Parse JSON - true, false, null} {
           82  +    set doc [dom parse -json -jsonroot "JSONObject" {{"a":true,"b":false,"c":null,"d":"true","e":""}}]
           83  +    set result [$doc asXML -indent none]
           84  +    $doc delete
           85  +    set result
           86  +} {<JSONObject><a>true</a><b>false</b><c>null</c><d>true</d><e></e></JSONObject>}
           87  +
           88  +test json-1.9 {JSON syntax error} {
           89  +    set result [catch {dom parse -json {{"a" "a value"}}} errMsg]
           90  +    list $result $errMsg
           91  +} {1 {error "JSON syntax error" at position 5
           92  +"{"a" " <--Error-- a value"}"}}
           93  +
           94  +test json-1.10 {JSON syntax error} {
           95  +    set result [catch {dom parse -json {{"a":00.23}}} errMsg]
           96  +    list $result $errMsg
           97  +} {1 {error "JSON syntax error" at position 6
           98  +"{"a":00 <--Error-- .23}"}}
           99  +
          100  +test json-1.11 {JSON syntax error} {
          101  +    set result [catch {dom parse -json {{"a":-00.23}}} errMsg]
          102  +    list $result $errMsg
          103  +} {1 {error "JSON syntax error" at position 7
          104  +"{"a":-00 <--Error-- .23}"}}
          105  +
          106  +test json-1.12 {JSON syntax error} {
          107  +    set result [catch {dom parse -json {{"a":.23}}} errMsg]
          108  +    list $result $errMsg
          109  +} {1 {error "JSON syntax error" at position 5
          110  +"{"a":. <--Error-- 23}"}}
          111  +
          112  +test json-1.13 {JSON syntax error} {
          113  +    set result [catch {dom parse -json {{"a":-.23}}} errMsg]
          114  +    list $result $errMsg
          115  +} {1 {error "JSON syntax error" at position 6
          116  +"{"a":-. <--Error-- 23}"}}
          117  +
          118  +test json-1.14 {JSON syntax error} {
          119  +    set result [catch {dom parse -json {{"a":-}}} errMsg]
          120  +    list $result $errMsg
          121  +} {1 {error "JSON syntax error" at position 5
          122  +"{"a":- <--Error-- }"}}
          123  +
          124  +test json-1.15 {Parse JSON - nested object} {
          125  +    set doc [dom parse -json {["a",["aa","bb"],"b"]}]
          126  +    set result [$doc asXML -indent none]
          127  +    $doc delete
          128  +    set result
          129  +} "a<arraycontainer>aabb</arraycontainer>b"
          130  +
          131  +set notJsons {
          132  +    {{null}}
          133  +    {{1.23}}
          134  +    {{"string"}}
          135  +    {{"e":}}
          136  +}
          137  +test json-1.16 {Invalid input} {
          138  +    set result ""
          139  +    set ind 0
          140  +    foreach notJson $notJsons {
          141  +        if {![catch {dom parse -json $notJson docNode} errMsg]} {
          142  +            lappend result $errMsg
          143  +        }
          144  +    }
          145  +    set result
          146  +} ""
          147  +
          148  +test json-1.17 {Literal binary 0 (NUL, '\0') is not allowed in input} {
          149  +    catch {dom parse -json "\"a\u0000\""}
          150  +} 1
          151  +
          152  +test json-1.18 {Escaped binary 0 (NUL, '\0') is OK} {
          153  +    dom parse -json "\"a\\u0000\"" doc
          154  +    set result [$doc asJSON]
          155  +    $doc delete
          156  +    set result
          157  +} "\"a\\u0000\""
          158  +
          159  +test json-1.19 {Invalid input - uncompled \u escape} {
          160  +    catch {dom parse -json {"ab\u00"}}
          161  +} 1
          162  +
          163  +test json-1.20 {Escaped binary 0} {
          164  +    dom parse -json "\"a\\u0000\"" doc
          165  +    set textvalue [$doc selectNodes string(node())]
          166  +    set result [string length $textvalue]
          167  +    binary scan $textvalue c2 result2
          168  +    lappend result {*}$result2
          169  +    $doc delete
          170  +    set result
          171  +} {2 97 0}
          172  +
          173  +test json-2.1 {invalid xml name} {
          174  +    set doc [dom parse -json {{"a":"a value","1b":"1value", "a\nb":"a\nb", "":"empty string"}}]
          175  +    set result [$doc asXML -indent none]
          176  +    $doc delete
          177  +    set result
          178  +} {<a>a value</a><1b>1value</1b><a
          179  +b>a
          180  +b</a
          181  +b><>empty string</>}
          182  +
          183  +test json-3.1 {Unescaping} {
          184  +    set doc [dom parse -json {{"a":"a\nvalue","b":"value\tvalue"}}]
          185  +    set result [$doc asXML -indent none]
          186  +    $doc delete
          187  +    set result
          188  +} "<a>a
          189  +value</a><b>value\tvalue</b>"
          190  +
          191  +test json-3.2 {Unescaping} {
          192  +    set doc [dom parse -json {{"a":"a\nvalue", "b":"12\u0077\u2221ec"}}]
          193  +    set result [$doc asXML -indent none -escapeNonASCII]
          194  +    $doc delete
          195  +    set result
          196  +} "<a>a
          197  +value</a><b>12w&#8737;ec</b>"
          198  +
          199  +test json-3.3 {Unescaping} {
          200  +    set doc [dom parse -json {{"a":"\u0077\u2221"}}]
          201  +    set result [$doc asXML -indent none -escapeNonASCII]
          202  +    $doc delete
          203  +    set result
          204  +} "<a>w&#8737;</a>"
          205  +
          206  +test json-3.4 {unescaping} {
          207  +    set doc [dom parse -jsonroot json -json {["\\a"]}]
          208  +    set result [$doc asXML -indent none]
          209  +    $doc delete
          210  +    set result
          211  +} {<json>\a</json>}
          212  +
          213  +test json-3.4.1 {unescaping} {
          214  +    set doc [dom parse -jsonroot json -json {["\\a","\u0071"]}]
          215  +    set result [$doc asXML -indent none]
          216  +    $doc delete
          217  +    set result
          218  +} {<json>\aq</json>}
          219  +
          220  +test json-3.5 {unescaping} {
          221  +    set result [catch {dom parse -json {{"this":"a\lb"}}} errMsg]
          222  +    list $result $errMsg
          223  +} {1 {error "JSON syntax error" at position 11
          224  +"{"this":"a\l <--Error-- b"}"}}
          225  +
          226  +test json-3.6 {unescaping} {
          227  +    set doc [dom parse -json {{"this":"a\nbc"}}]
          228  +    set result [$doc asXML -indent none]
          229  +    $doc delete
          230  +    set result
          231  +} {<this>a
          232  +bc</this>} 
          233  +
          234  +test json-3.7 {unescaping} {
          235  +    set doc [dom parse -json {{"this":"a\u0077\t\u0078bc"}}]
          236  +    set result [$doc asXML -indent none]
          237  +    $doc delete
          238  +    set result
          239  +} "<this>aw\txbc</this>"
          240  +
          241  +test json-3.8 {unescaping} {
          242  +    set doc [dom parse -json {{"this":"a\u000b"}}]
          243  +    set result [$doc asXML -indent none]
          244  +    $doc delete
          245  +    set result
          246  +} "<this>a\u000b</this>"
          247  +
          248  +test json-3.9 {unescaping} {
          249  +    set doc [dom parse -json {{"this":"a\u0077","that":"\t\u0078bc"}}]
          250  +    set result [$doc asXML -indent none]
          251  +    $doc delete
          252  +    set result
          253  +} "<this>aw</this><that>\txbc</that>"
          254  +
          255  +test json-5.1 {-jsonmaxnesting 0} {
          256  +    set result [catch {dom parse -json -jsonmaxnesting 0 {{"this":"that"}}} errMsg]
          257  +    list $result $errMsg
          258  +} {1 {error "Maximum JSON object/array nesting depth exceeded" at position 0
          259  +"{ <--Error-- "this":"that"}"}}
          260  +
          261  +test json-5.2 {-jsonmaxnesting 0} {
          262  +    set result [catch {dom parse -json -jsonmaxnesting 0 {["this","that"]}} errMsg]
          263  +    list $result $errMsg
          264  +} {1 {error "Maximum JSON object/array nesting depth exceeded" at position 0
          265  +"[ <--Error-- "this","that"]"}}
          266  +
          267  +test json-5.3 {-jsonmaxnesting 0} {
          268  +    set result [catch {dom parse -jsonroot o -json -jsonmaxnesting 0 {["this","that"]}} errMsg]
          269  +    list $result $errMsg
          270  +} {1 {error "Maximum JSON object/array nesting depth exceeded" at position 0
          271  +"[ <--Error-- "this","that"]"}}
          272  +
          273  +test json-5.4 {-jsonmaxnesting} {
          274  +    set doc [dom parse -json -jsonmaxnesting 2 {{"this":{"foo":"that"}}}]
          275  +    set result [$doc asXML -indent none]
          276  +    $doc delete
          277  +    set result
          278  +} {<this><foo>that</foo></this>}
          279  +
          280  +test json-5.5 {-jsonmaxnesting} {
          281  +    set result [catch {dom parse -json -jsonmaxnesting 1 \
          282  +                           {{"this":{"foo":"that"}}}} errMsg]
          283  +    list $result $errMsg
          284  +} {1 {error "Maximum JSON object/array nesting depth exceeded" at position 8
          285  +"{"this":{ <--Error-- "foo":"that"}}"}}
          286  +
          287  +test json-5.6 {-jsonmaxnesting} {
          288  +    set doc [dom parse -json -jsonmaxnesting 2 {
          289  +        {
          290  +            "this": {
          291  +                "foo":"that",
          292  +                "bar":"grill"
          293  +            },
          294  +            "two": "value",
          295  +            "three": {
          296  +                "t1":"t1value",
          297  +                "t2":"t2value"
          298  +            },
          299  +            "four": ["a","b","c"]
          300  +        }}]
          301  +    set result [$doc asXML]
          302  +    $doc delete
          303  +    set result
          304  +} {<this>
          305  +    <foo>that</foo>
          306  +    <bar>grill</bar>
          307  +</this>
          308  +<two>value</two>
          309  +<three>
          310  +    <t1>t1value</t1>
          311  +    <t2>t2value</t2>
          312  +</three>
          313  +<four>abc</four>
          314  +}
          315  +
          316  +set jsons {
          317  +    {{"a":"avalue","b":"bvalue","c":0.123}}
          318  +    {{"a":["avalue"]}}
          319  +    {{"a":"a value","b":"1value"}}
          320  +    {{"a":{"aa":"aavalue","bb":"bbvalue"},"b":"bvalue","c":0.123}}
          321  +    {{"a":[1,2,3,4,"abc"]}}
          322  +    {{"a":true,"b":false,"c":null,"d":"true","e":""}}
          323  +    {{"a":{"aa":[1,2,3,4,"abc"]},"b":"bvalue"}}
          324  +    {{"a":true,"b":false,"c":null,"d":"true","e":""}}
          325  +    {["a",["aa","bb"],"b"]}
          326  +    {{"a":"a\nvalue","b":"value\tvalue"}}
          327  +    {["\\\\a"]}
          328  +    {["a\"b"]}
          329  +    {{"b":"a \"b c\" d","b":"a \"b c\" d"}}
          330  +    {{"this":"a\nbc"}}
          331  +    {{"this":{"foo":"that"}}}
          332  +    {{"this":{"foo":"that","bar":"grill"},"two":"value","three":{"t1":"t1value","t2":"t2value"},"four":["a","b","c"]}}
          333  +    {"only a string"}
          334  +    {null}
          335  +    {1.23}
          336  +    {true}
          337  +    {false}
          338  +    {{}}
          339  +    {[]}
          340  +    {[[]]}
          341  +    {[["x"]]}
          342  +    {""}
          343  +    {[[[[["a"]]]]]}
          344  +    {{"x":[{"id":"foo"}]}}
          345  +    {"http://foo.bar"}
          346  +}
          347  +test json-6.1 {asJSON} {
          348  +    set failedlist [list]
          349  +    set ind 0
          350  +    foreach json $jsons {
          351  +        set doc [dom parse -json $json]
          352  +        set out [$doc asJSON]
          353  +        if {$json ne $out} {
          354  +            lappend failedlist "$ind : '$json' : '$out'"
          355  +        }
          356  +        incr ind
          357  +    }
          358  +    set failedlist
          359  +} {}
          360  +
          361  +test json-6.2 {asJSON - slash will not be escaped while serializing} {
          362  +    set doc [dom parse -json {"http:\/\/foo.bar"}]
          363  +    set result [$doc asJSON]
          364  +    $doc delete
          365  +    set result
          366  +} {"http://foo.bar"}
          367  +
          368  +test json-6.3 {asJSON - docNode serialization} {
          369  +    dom createDocumentNode docNode
          370  +    set result [$docNode asJSON]
          371  +    $docNode delete
          372  +    set result
          373  +} {{}}
          374  +
          375  +test json-6.4 {asJSON - doc serialization} {
          376  +    dom createDocument root docNode
          377  +    set result [$docNode asJSON]
          378  +    $docNode delete
          379  +    set result
          380  +} {{"root":""}}
          381  +
          382  +test json-6.5 {asJSON - serialization of control characters} {
          383  +    set doc [dom parse -json "\"a\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\u0008\\u0009\\u000A\\u000B\\u000C\\u000D\\u000E\\u000F\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001A\\u001B\\u001C\\u001D\\u001E\\u001F\\u0020b\""]
          384  +    set result [$doc asJSON]
          385  +    $doc delete
          386  +    set result
          387  +} {"a\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f b"}
          388  +
          389  +test json-7.1 {jsonType} {
          390  +    set doc [dom parse {<j>foo</j>}]
          391  +    set root [$doc documentElement]
          392  +    set result [list]
          393  +    lappend result [$root asJSON]
          394  +    lappend result [$root jsonType]
          395  +    $root jsonType ARRAY
          396  +    lappend result [$root asJSON]
          397  +    $doc delete
          398  +    set result
          399  +} {{"foo"} NONE {["foo"]}}
          400  +
          401  +test json-7.2 {jsonType} {
          402  +    set doc [dom createDocumentNode]
          403  +    set result [$doc jsonType]
          404  +    lappend result [$doc asJSON]
          405  +    lappend result [catch {$doc jsonType foo}]
          406  +    $doc jsonType ARRAY
          407  +    lappend result [$doc asJSON]
          408  +    $doc jsonType OBJECT
          409  +    lappend result [$doc asJSON]
          410  +    $doc delete
          411  +    set result
          412  +} {NONE {{}} 1 {[]} {{}}}
          413  +
          414  +test json-8.1 {appendFromScript} {
          415  +    set doc [dom createDocumentNode]
          416  +    $doc appendFromScript {
          417  +        nodeCmds::e1
          418  +    }
          419  +    set result [list]
          420  +    lappend result [$doc asJSON]
          421  +    set root [$doc documentElement]
          422  +    lappend result [$root asJSON]
          423  +    $doc removeChild [$doc firstChild]
          424  +    $doc appendFromScript {
          425  +        nodeCmds::jae1
          426  +    }
          427  +    lappend result [$doc asJSON]
          428  +    set root [$doc documentElement]
          429  +    lappend result [$root asJSON]
          430  +    lappend result [$root jsonType]
          431  +    $doc delete
          432  +    set result
          433  +} {{{"e1":""}} {{}} {{"jae1":[]}} {[]} ARRAY}
          434  +
          435  +test json-8.2 {appendFromScript} {
          436  +    set doc [dom createDocumentNode]
          437  +    $doc appendFromScript {
          438  +        nodeCmds::t "some string"
          439  +    }
          440  +    set result [$doc asJSON]
          441  +    $doc delete
          442  +    set result
          443  +} {"some string"}
          444  +
          445  +test json-8.3 {appendFromScript} {
          446  +    set doc [dom createDocumentNode]
          447  +    $doc appendFromScript {
          448  +        nodeCmds::t ""
          449  +        nodeCmds::true ""
          450  +        nodeCmds::false ""
          451  +        nodeCmds::null ""
          452  +    }
          453  +    set result [$doc asJSON]
          454  +    $doc delete
          455  +    set result
          456  +} {["",true,false,null]}
          457  +
          458  +test json-8.4 {appendFromScript - text node with type NUMBER} {
          459  +    set doc [dom createDocumentNode]
          460  +    $doc appendFromScript {
          461  +        nodeCmds::number ""
          462  +        nodeCmds::number "0"
          463  +        nodeCmds::number "123456789012345678901234567890.12345679e-0003"
          464  +        nodeCmds::number "42 "
          465  +        nodeCmds::number " 42"
          466  +        nodeCmds::number "-"
          467  +    }
          468  +    set result [$doc asJSON]
          469  +    $doc delete
          470  +    set result
          471  +} {["",0,123456789012345678901234567890.12345679e-0003,"42 "," 42","-"]}

Changes to tests/loadtdom.tcl.

     4      4   # the tcltest package and the lastest tdom build is present.
     5      5   #
     6      6   # RCS: @(#) $Id$
     7      7   #
     8      8   
     9      9   package require tcltest
    10     10   namespace import ::tcltest::*
    11         -package require -exact tdom 0.9.0
           11  +package require -exact tdom 0.8.3
    12     12   if {[lsearch [namespace children] ::tDOM] == -1} {
    13     13       # tcldomsh without the script library. Source the lib.
    14     14       source [file join [file dir [info script]] ../lib tdom.tcl]
    15     15   }
    16     16   

Changes to tests/xpath.test.

   544    544   
   545    545   test xpath-5.1 {erroneous XPath expr: missing right brace in predicate} {
   546    546       set result [catch {$root selectNodes {*[1}} errMsg]
   547    547       list $result $errMsg
   548    548   } {1 {Predicate: Expected "RBRACKET" for '*[1' 
   549    549   
   550    550   Parsed symbols:
   551         -     0 WCARDNAME        0 00000.000     0  *
   552         -     1 LBRACKET         0 00000.000     1  
   553         -     2 INTNUMBER        1 00001.000     2  }}
          551  +     0 WCARDNAME        0 0.000e+00     0  *
          552  +     1 LBRACKET         0 0.000e+00     1  
          553  +     2 INTNUMBER        1 1.000e+00     2  }}
   554    554   
   555    555   test xpath-5.2 {erroneous XPath expr: missing right brace in predicate} {
   556    556       set result [catch {$root selectNodes {*[1][@attr}} errMsg]
   557    557       list $result $errMsg
   558    558   } {1 {Predicate: Expected "RBRACKET" for '*[1][@attr' 
   559    559   
   560    560   Parsed symbols:
   561         -     0 WCARDNAME        0 00000.000     0  *
   562         -     1 LBRACKET         0 00000.000     1  
   563         -     2 INTNUMBER        1 00001.000     2  
   564         -     3 RBRACKET         0 00000.000     3  
   565         -     4 LBRACKET         0 00000.000     4  
   566         -     5 ATTRIBUTE        0 00000.000     9  attr}}
          561  +     0 WCARDNAME        0 0.000e+00     0  *
          562  +     1 LBRACKET         0 0.000e+00     1  
          563  +     2 INTNUMBER        1 1.000e+00     2  
          564  +     3 RBRACKET         0 0.000e+00     3  
          565  +     4 LBRACKET         0 0.000e+00     4  
          566  +     5 ATTRIBUTE        0 0.000e+00     9  attr}}
   567    567   
   568    568   test xpath-5.3 {erroneous XPath expr: missing left brace in predicate} {
   569    569       catch {$root selectNodes {*1]}}
   570    570   } {1}
   571    571   
   572    572   test xpath-5.4 {erroneous XPath expr} {
   573    573       catch {$root selectNodes {myNS: bar}} errMsg
................................................................................
  1070   1070       set result [catch {$doc selectNodes {a[b %nodeName='another value']}} errMsg]
  1071   1071       lappend result $errMsg
  1072   1072       $doc delete
  1073   1073       set result
  1074   1074   } {1 {Predicate: Expected "RBRACKET" for 'a[b %nodeName='another value']' 
  1075   1075   
  1076   1076   Parsed symbols:
  1077         -     0 WCARDNAME        0 00000.000     0  a
  1078         -     1 LBRACKET         0 00000.000     1  
  1079         -     2 WCARDNAME        0 00000.000     2  b
  1080         --->  3 WCARDNAME        1 00000.000    12  with spaces
  1081         -     4 EQUAL            0 00000.000    13  
  1082         -     5 LITERAL          0 00000.000    28  another value
  1083         -     6 RBRACKET         0 00000.000    29  }}
         1077  +     0 WCARDNAME        0 0.000e+00     0  a
         1078  +     1 LBRACKET         0 0.000e+00     1  
         1079  +     2 WCARDNAME        0 0.000e+00     2  b
         1080  +-->  3 WCARDNAME        1 0.000e+00    12  with spaces
         1081  +     4 EQUAL            0 0.000e+00    13  
         1082  +     5 LITERAL          0 0.000e+00    28  another value
         1083  +     6 RBRACKET         0 0.000e+00    29  }}
  1084   1084   
  1085   1085   test xpath-5.47 {Element name injected with tcl variable} {
  1086   1086       set doc [dom parse -json {{"a":{"":"the value"},"a":{"":"another value"}}}]
  1087   1087       set nodeName ""
  1088   1088       set node [$doc selectNodes {a[%nodeName='another value']}]
  1089   1089       set result [list]
  1090   1090       lappend result [$node nodeName]

Changes to tests/xslt.test.

  1149   1149       catch {$xmldoc xslt $xsltdoc resultDoc} errMsg
  1150   1150       $xmldoc delete
  1151   1151       $xsltdoc delete
  1152   1152       set errMsg
  1153   1153   } {The 'current' function is not allowed in Pattern. for '*[current() != 'notthis']' 
  1154   1154   
  1155   1155   Parsed symbols:
  1156         -     0 WCARDNAME        0 00000.000     0  *
  1157         -     1 LBRACKET         0 00000.000     1  
  1158         -     2 FUNCTION         0 00000.000     8  current
  1159         -     3 LPAR             0 00000.000     9  
  1160         -     4 RPAR             0 00000.000    10  
  1161         -     5 NOTEQ            0 00000.000    13  
  1162         -     6 LITERAL          0 00000.000    23  notthis
  1163         -     7 RBRACKET         0 00000.000    24  }
         1156  +     0 WCARDNAME        0 0.000e+00     0  *
         1157  +     1 LBRACKET         0 0.000e+00     1  
         1158  +     2 FUNCTION         0 0.000e+00     8  current
         1159  +     3 LPAR             0 0.000e+00     9  
         1160  +     4 RPAR             0 0.000e+00    10  
         1161  +     5 NOTEQ            0 0.000e+00    13  
         1162  +     6 LITERAL          0 0.000e+00    23  notthis
         1163  +     7 RBRACKET         0 0.000e+00    24  }
  1164   1164   
  1165   1165   set xslt-8.2.xml {<?xml version="1.0"?>
  1166   1166   <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:html="http://www.w3.org/TR/REC-html40">
  1167   1167   	<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
  1168   1168   	</DocumentProperties>
  1169   1169   	<OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">
  1170   1170   	</OfficeDocumentSettings>

Deleted win/README.

     1         -This file contains instructions for building tdom on Windows platforms.
     2         -
     3         -Windows builds may be done with either the MingW-W64 tool chain
     4         -comprising of gcc and friends, or with the Microsoft Visual C++ and
     5         -nmake tools. Each is described below.
     6         -
     7         -IMPORTANT NOTE:
     8         -Building with either tool chain requires that the Tcl libraries that
     9         -are linked have also been built with the same tool chain. The resulting
    10         -binaries however can be loaded into a Tcl shell compiled with any
    11         -tool chain provided the requisite C runtimes are present on the system.
    12         -
    13         -Building With The Mingw-W64 Tool Chain
    14         -======================================
    15         -
    16         -Building with the MingW follows a similar process to the autoconf/TEA
    17         -based Unix builds.
    18         -
    19         -1. Start a shell using mingw32.exe or mingw64.exe for 32- and 64-bit
    20         -fields respectively. Do NOT use msys2.exe directly.
    21         -
    22         -2. Assuming you want to include HTML5 support using the Gumbo libraries,
    23         -build the Gumbo libraries by running these commands in the top level
    24         -directory where you extracted the Gumbo distribution. Note these
    25         -shell commands must be run in the mingw32.exe or mingw64.exe shells
    26         -as appropriate.
    27         -
    28         -    ./autogen.sh
    29         -    ./configure
    30         -    make
    31         -    make install
    32         -
    33         -This will install the Gumbo libraries in the mingw32/mingw64 system
    34         -directories as appropriate.
    35         -
    36         -3. Change to a build directory and run the configure at the top level
    37         -tdom directory. For example, if doing a 64-bit build in the win/build64
    38         -directory within a mingw64.exe shell,
    39         -
    40         -    mkdir win/build
    41         -    cd win/build
    42         -    ../../configure --enable-threads --enable-html5 --enable-64bit --prefix=/c/tcl/mingw/85/x64 --with-tcl=/c/tcl/mingw/85/x64/lib
    43         -    make
    44         -    make install
    45         -
    46         -In the above sequence, we are building against Tcl 8.5 installed under
    47         -c:\tcl\mingw\85\x64 on the system. The Gumbo libraries built in the
    48         -previous step are automatically picked up from the mingw64.exe directories.
    49         -Note that tdom on Windows binds against the static Gumbo library so
    50         -there is no additional DLL to distribute.
    51         -
    52         -The 32-bit build is similar except omitting the --enable-64bit option
    53         -(and of course pointing configure to a 32-bit installation of Tcl.
    54         -
    55         -4. Build the tnc and tdomhtml extensions in similar fashion to the above
    56         -except that the --enable-html5 option should be left out in both cases,
    57         -and an additional option --with-tdom=path/to/tdom/build needs to be
    58         -specified for the tnc configure step.
    59         -
    60         -IMPORTANT NOTE:
    61         -Because the MinGW-built binaries link to the msvcrt 6.0 runtimes that
    62         -is present on all Windows systems, the built tdom is usable on all
    63         -Windows systems with a Tcl built with any tool chain without needing
    64         -additional runtime libraries to be installed.
    65         -
    66         -
    67         -
    68         -
    69         -Building with Visual Studio 2017 Community Edition (free)
    70         -=========================================================
    71         -
    72         -1. Build the Gumbo libraries if HTML5 support is desired.
    73         -
    74         -1a. Check out the git repository from
    75         -https://github.com/apnadkarni/gumbo-parser.  Do NOT use the original
    76         -Gumbo repository as that does not contain a complete Visual Studio
    77         -project file required for tdom.
    78         -
    79         -1b. Switch to the tdom-libs branch.
    80         -Open the visualc/gumbo.sln solution file in Visual Studio. Click the
    81         -Batch Build... item under the Build menu. In the dialog box, select
    82         -the Win32|Release|x86 and x64|Release|x64 project configurations and
    83         -then click the Build or Rebuild button. This will build the 32-bit
    84         -and 64-bit gumbo.lib libraries under visualc/Win32/Release and
    85         -visualc/x64/Release respectively.
    86         -
    87         -2. Next start a Visual Studio build command shell for 64-bit builds,
    88         -usually from
    89         -    Windows Start menu->Visual Studio 2017 Folder->x64 Native Command shell
    90         -
    91         -3. Change to the tdom\win directory and type the command
    92         -
    93         -    nmake /s /nologo /f makefile.vc INSTALLDIR=c:\tcl\85-vs2017\x64 GUMBODIR=C:\src\gumbo
    94         -    nmake /s /nologo /f makefile.vc INSTALLDIR=c:\tcl\85-vs2017\x64 GUMBODIR=C:\src\gumbo install
    95         -
    96         -Here INSTALLDIR is the path to your Tcl installation and GUMBODIR is
    97         -the path to the top level of the Gumbo sources. If GUMBODIR is not
    98         -specified, tdom will build without HTML5 support.
    99         -
   100         -The 32-bit builds are similar except that
   101         -
   102         -- the commands need to be run from the Visual Studio x86 Native Tools
   103         -command shell, and
   104         -- the INSTALLDIR needs to point to a 32-bit Tcl installation
   105         -- (Note GUMBODIR need not change)
   106         -
   107         -4a. To build the tnc and tdomhtml extensions,
   108         -
   109         -    cd extensions/tnc/win
   110         -    nmake /s /nologo /f makefile.vc INSTALLDIR=c:\tcl\85-vs2017\x64
   111         -    nmake /s /nologo /f makefile.vc INSTALLDIR=c:\tcl\85-vs2017\x64 install
   112         -
   113         -    cd extensions/tdomhtml/win
   114         -    nmake /s /nologo /f makefile.vc INSTALLDIR=c:\tcl\85-vs2017\x64 install
   115         -
   116         -Note no build step necessary for tdomhtml as it is pure Tcl.
   117         -
   118         -Similar steps for 32-bit builds with appropriate changes.
   119         -
   120         -IMPORTANT NOTE:
   121         -The Visual Studio 2017 runtimes are not guaranteed to be installed on
   122         -all Windows systems. Thus the built tdom package should only be used
   123         -with a Tcl that is also built with Visual Studio 2017.
   124         -
   125         -
   126         -
   127         -# Building with Visual C++ 6 (32-bit) or Windows 2003 SDK (for 64-bit)
   128         -======================================================================
   129         -
   130         -Steps similar to above except that HTML5 support is not available due
   131         -to Gumbo needing C99 support. The GUMBODIR option should be left out
   132         -on the nmake build commands.
   133         -
   134         -IMPORTANT NOTE:
   135         -Because the VC++ 6 and 2003 SDK link to the msvcrt 6.0 runtimes that
   136         -is present on all Windows systems, the built tdom is usable on all
   137         -Windows systems with a Tcl built with any tool chain without needing
   138         -additional runtime libraries to be installed.
   139         -
   140         -
   141         -

Changes to win/makefile.vc.

   157    157   # binary here.
   158    158   #
   159    159   #-------------------------------------------------------------------------
   160    160   
   161    161   PROJECT = tdom
   162    162   !include "rules.vc"
   163    163   
   164         -DOTVERSION      = 0.9.0
          164  +DOTVERSION      = 0.8.4
   165    165   VERSION         = $(DOTVERSION:.=)
   166    166   STUBPREFIX      = $(PROJECT)stub
   167    167   
   168    168   DLLOBJS = \
   169    169   	$(TMP_DIR)\xmlrole.obj     \
   170    170   	$(TMP_DIR)\xmltok.obj      \
   171    171   	$(TMP_DIR)\xmlparse.obj    \
   172    172   	$(TMP_DIR)\xmlsimple.obj   \
   173    173   	$(TMP_DIR)\utf8conv.obj    \
   174    174   	$(TMP_DIR)\dom.obj         \
   175    175   	$(TMP_DIR)\domalloc.obj    \
   176    176   	$(TMP_DIR)\domhtml.obj     \
   177         -	$(TMP_DIR)\domhtml5.obj    \
   178    177   	$(TMP_DIR)\domxslt.obj     \
   179    178   	$(TMP_DIR)\nodecmd.obj     \
   180    179   	$(TMP_DIR)\domxpath.obj    \
   181    180   	$(TMP_DIR)\domlock.obj     \
   182    181   	$(TMP_DIR)\domjson.obj     \
   183    182   	$(TMP_DIR)\tclexpat.obj    \
   184    183   	$(TMP_DIR)\tcldom.obj      \
................................................................................
   219    218   WINDIR		= $(ROOT)\win
   220    219   LIBDIR          = $(ROOT)\lib
   221    220   DOCDIR		= $(ROOT)\doc
   222    221   TOOLSDIR	= $(ROOT)\tools
   223    222   COMPATDIR	= $(ROOT)\compat
   224    223   EXPATDIR        = $(ROOT)\expat
   225    224   
   226         -
   227    225   #---------------------------------------------------------------------
   228    226   # Compile flags
   229    227   #---------------------------------------------------------------------
   230    228   
   231    229   !if !$(DEBUG)
   232    230   !if $(OPTIMIZING)
   233    231   ### This cranks the optimization level to maximize speed
................................................................................
   239    237   ### Warnings are too many, can't support warnings into errors.
   240    238   cdebug	= -Zi -Od $(DEBUGFLAGS)
   241    239   !else
   242    240   cdebug	= -Zi -WX $(DEBUGFLAGS)
   243    241   !endif
   244    242   
   245    243   ### Declarations common to all compiler options
   246         -cwarn = $(WARNINGS) -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE
          244  +cwarn = -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE
   247    245   cflags = -nologo -c $(COMPILERFLAGS) $(cwarn) -Fp$(TMP_DIR)^\
   248    246   
   249         -# TBD - some of the code, like expat checks for Windows using the
   250         -# WIN32 macro. This should really be changed to check _WIN32. For now,
   251         -# define WIN32 ourselves
   252         -cflags = $(cflags) -DWIN32
          247  +# Warning level
          248  +!if $(FULLWARNINGS)
          249  +cflags = $(cflags) -W4
          250  +!else
          251  +cflags = $(cflags) -W3
          252  +!endif
   253    253   
   254    254   !if $(MSVCRT)
   255    255   !if $(DEBUG) && !$(UNCHECKED)
   256    256   crt = -MDd
   257    257   !else
   258    258   crt = -MD
   259    259   !endif
................................................................................
   268    268   !if !$(STATIC_BUILD)
   269    269   cflags = $(cflags) -DUSE_TCL_STUBS
   270    270   !if defined(TKSTUBLIB)
   271    271   cflags = $(cflags) -DUSE_TK_STUBS
   272    272   !endif
   273    273   !endif
   274    274   
   275         -DEFS            =-DHAVE_MEMMOVE=1 -DXML_DTD=1 -DXML_NS=1 -DTDOM_NO_UNKNOWN_CMD=1
          275  +DEFS            =-DHAVE_MEMMOVE -DXML_DTD -DXML_NS -DTDOM_NO_UNKNOWN_CMD
   276    276   DEFS_EXPAT	=-DXMLIMPORT=__declspec(dllexport)
   277         -INCLUDES	= -I"$(WINDIR)" -I"$(GENERICDIR)" -I"$(EXPATDIR)" $(TCL_INCLUDES)
   278         -!if "$(GUMBODIR)" != ""
   279         -DEFS     = $(DEFS) -DTDOM_HAVE_GUMBO=1
   280         -INCLUDES = $(INCLUDES) -I"$(GUMBODIR)\src"
   281         -!endif
          277  +INCLUDES	= -I"$(WINDIR)" -I"$(GENERICDIR)" -I"$(EXPATDIR)" $(TCL_INCLUDES) 
   282    278   BASE_CFLAGS	= $(cflags) $(cdebug) $(crt) $(INCLUDES)
   283    279   CON_CFLAGS	= $(cflags) $(cdebug) $(crt) -DCONSOLE
   284    280   TCL_CFLAGS      = -DPACKAGE_NAME="\"$(PROJECT)\"" \
   285    281   		  -DPACKAGE_VERSION="\"$(DOTVERSION)\"" \
   286    282   		  $(BASE_CFLAGS) $(OPTDEFINES) $(DEFS) $(DEFS_EXPAT)
   287    283   
   288    284   #---------------------------------------------------------------------
................................................................................
   296    292   !endif
   297    293   !else
   298    294   ldebug	= -release -opt:ref -opt:icf,3
   299    295   !endif
   300    296   
   301    297   ### Declarations common to all linker options
   302    298   lflags	= -nologo -machine:$(MACHINE) $(LINKERFLAGS) $(ldebug)
          299  +
          300  +!if $(FULLWARNINGS)
          301  +lflags = $(lflags) -warn:3
          302  +!endif
   303    303   
   304    304   !if $(PROFILE)
   305    305   lflags	= $(lflags) -profile
   306    306   !endif
   307    307   
   308    308   !if $(ALIGN98_HACK) && !$(STATIC_BUILD)
   309    309   ### Align sections for PE size savings.
................................................................................
   321    321   conlflags = $(lflags) -subsystem:console
   322    322   guilflags = $(lflags) -subsystem:windows
   323    323   !if !$(STATIC_BUILD)
   324    324   baselibs  = $(TCLSTUBLIB)
   325    325   !if defined(TKSTUBLIB)
   326    326   baselibs  = $(baselibs) $(TKSTUBLIB)
   327    327   !endif
   328         -!endif
   329         -
   330         -!if "$(GUMBODIR)" != ""
   331         -!if "$(MACHINE)" == "AMD64"
   332         -baselibs = $(baselibs) "$(GUMBODIR)\visualc\x64\Release\gumbo.lib"
   333         -!else
   334         -baselibs = $(baselibs) "$(GUMBODIR)\visualc\Win32\Release\gumbo.lib"
   335         -!endif
   336    328   !endif
   337    329   
   338    330   # Avoid 'unresolved external symbol __security_cookie' errors.
   339    331   # c.f. http://support.microsoft.com/?id=894573
   340    332   !if "$(MACHINE)" == "IA64" || "$(MACHINE)" == "AMD64"
   341    333   baselibs   = $(baselibs) bufferoverflowU.lib
   342    334   !endif
................................................................................
   399    391   $**
   400    392   <<
   401    393   	$(_VC_MANIFEST_EMBED_DLL)
   402    394   	-@del $*.exp
   403    395   !endif
   404    396   
   405    397   $(PRJSTUBLIB): $(PRJSTUBOBJS)
   406         -	$(lib32) -ltcg -nologo -out:$@ $(PRJSTUBOBJS)
          398  +	$(lib32) -nologo -out:$@ $(PRJSTUBOBJS)
   407    399   
   408    400   #---------------------------------------------------------------------
   409    401   # Implicit rules
   410    402   #---------------------------------------------------------------------
   411    403   
   412    404   {$(WINDIR)}.c{$(TMP_DIR)}.obj::
   413    405       $(cc32) $(TCL_CFLAGS) -DBUILD_$(PROJECT) -Fo$(TMP_DIR)\ @<<
................................................................................
   449    441   .SUFFIXES:.c .rc
   450    442   
   451    443   #-------------------------------------------------------------------------
   452    444   # Explicit dependency rules
   453    445   #
   454    446   #-------------------------------------------------------------------------
   455    447   
          448  +$(OUT_DIR)\pkgIndex.tcl: $(ROOT)\pkgIndex.tcl.in
          449  +	nmakehlp -s << $** > $@
          450  +@PACKAGE_VERSION@    $(DOTVERSION)
          451  +@PACKAGE_NAME@       $(PROJECT)
          452  +@PKG_LIB_FILE@       $(PRJLIBNAME)
          453  +<<
   456    454   
   457    455   #---------------------------------------------------------------------
   458    456   # Installation. (EDIT)
   459    457   #
   460    458   # You may need to modify this section to reflect the final distribution
   461    459   # of your files and possibly to generate documentation.
   462    460   #
................................................................................
   469    467   	@$(CPY) $(PRJSTUBLIB) "$(SCRIPT_INSTALL_DIR)" >NUL
   470    468   
   471    469   install-libraries:
   472    470           @echo Installing libraries to '$(SCRIPT_INSTALL_DIR)'
   473    471           @if exist $(LIBDIR)\NUL $(CPY) $(LIBDIR)\*.tcl "$(SCRIPT_INSTALL_DIR)" >NUL
   474    472           @echo Installing package index in '$(SCRIPT_INSTALL_DIR)'
   475    473           @type << >"$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl"
   476         -    package ifneeded $(PROJECT) $(DOTVERSION) "[list load [file join $$dir $(PROJECT)$(VERSION)$(SUFX).$(EXT)] tdom]; [list source [file join $$dir tdom.tcl]]"
          474  +if {[info exists ::tcl_platform(debug)]} {
          475  +    package ifneeded $(PROJECT) $(DOTVERSION) "[list load [file join $$dir $(PROJECT)$(VERSION)g.$(EXT)] tdom]; [list source [file join $$dir tdom.tcl]]"
          476  +} else {
          477  +    package ifneeded $(PROJECT) $(DOTVERSION) "[list load [file join $$dir $(PROJECT)$(VERSION).$(EXT)] tdom]; [list source [file join $$dir tdom.tcl]]"
          478  +}
   477    479   <<
   478    480   
   479    481   install-docs:
   480    482   #	@echo Installing documentation files to '$(DOC_INSTALL_DIR)'
   481    483   #	@if exist $(DOCDIR) $(CPY) $(DOCDIR)\*.n "$(DOC_INSTALL_DIR)"
   482    484   
   483    485   #---------------------------------------------------------------------
   484    486   # Clean up
   485    487   #---------------------------------------------------------------------
   486    488   
   487    489   clean:
   488    490   	@if exist $(TMP_DIR)\nul $(RMDIR) $(TMP_DIR)
   489         -	@if exist $(WINDIR)\versions.vc del $(WINDIR)\versions.vc
          491  +	@if exist $(WINDIR)\version.vc del $(WINDIR)\version.vc
   490    492   	@if exist $(WINDIR)\vercl.i del $(WINDIR)\vercl.i
   491    493   	@if exist $(WINDIR)\vercl.x del $(WINDIR)\vercl.x
   492    494   	@if exist $(WINDIR)\_junk.pch del $(WINDIR)\_junk.pch
   493    495   
   494    496   realclean: clean
   495    497   	@if exist $(OUT_DIR)\nul $(RMDIR) $(OUT_DIR)
   496    498   
   497    499   distclean: realclean
   498    500   	@if exist $(WINDIR)\nmakehlp.exe del $(WINDIR)\nmakehlp.exe
   499    501   	@if exist $(WINDIR)\nmakehlp.obj del $(WINDIR)\nmakehlp.obj

Changes to win/nmakehlp.c.

     5      5    *	This is used to fix limitations within nmake and the environment.
     6      6    *
     7      7    * Copyright (c) 2002 by David Gravereaux.
     8      8    * Copyright (c) 2006 by Pat Thoyts
     9      9    *
    10     10    * See the file "license.terms" for information on usage and redistribution of
    11     11    * this file, and for a DISCLAIMER OF ALL WARRANTIES.
           12  + *
           13  + * ----------------------------------------------------------------------------
           14  + * RCS: @(#) $Id$
    12     15    * ----------------------------------------------------------------------------
    13     16    */
    14     17   
    15     18   #define _CRT_SECURE_NO_DEPRECATE
    16     19   #include <windows.h>
    17         -#define NO_SHLWAPI_GDI
    18         -#define NO_SHLWAPI_STREAM
    19         -#define NO_SHLWAPI_REG
    20         -#include <shlwapi.h>
    21     20   #pragma comment (lib, "user32.lib")
    22     21   #pragma comment (lib, "kernel32.lib")
    23         -#pragma comment (lib, "shlwapi.lib")
    24     22   #include <stdio.h>
    25     23   #include <math.h>
    26         -
    27         -/*
    28         - * This library is required for x64 builds with _some_ versions of MSVC
    29         - */
    30     24   #if defined(_M_IA64) || defined(_M_AMD64)
    31         -#if _MSC_VER >= 1400 && _MSC_VER < 1500
    32     25   #pragma comment(lib, "bufferoverflowU")
    33         -#endif
    34     26   #endif
    35     27   
    36     28   /* ISO hack for dumb VC++ */
    37     29   #ifdef _MSC_VER
    38     30   #define   snprintf	_snprintf
    39     31   #endif
    40     32   
    41     33   
    42     34   
    43     35   /* protos */
    44     36   
    45         -static int CheckForCompilerFeature(const char *option);
    46         -static int CheckForLinkerFeature(const char **options, int count);
    47         -static int IsIn(const char *string, const char *substring);
    48         -static int SubstituteFile(const char *substs, const char *filename);
    49         -static int QualifyPath(const char *path);
    50         -static const char *GetVersionFromFile(const char *filename, const char *match, int numdots);
    51         -static DWORD WINAPI ReadFromPipe(LPVOID args);
           37  +int		CheckForCompilerFeature(const char *option);
           38  +int		CheckForLinkerFeature(const char *option);
           39  +int		IsIn(const char *string, const char *substring);
           40  +int		GrepForDefine(const char *file, const char *string);
           41  +int		SubstituteFile(const char *substs, const char *filename);
           42  +const char *    GetVersionFromFile(const char *filename, const char *match);
           43  +DWORD WINAPI	ReadFromPipe(LPVOID args);
    52     44   
    53     45   /* globals */
    54     46   
    55     47   #define CHUNK	25
    56     48   #define STATICBUFFERSIZE    1000
    57     49   typedef struct {
    58     50       HANDLE pipe;
................................................................................
    98     90   			"exitcodes: 0 == no, 1 == yes, 2 == error\n", argv[0]);
    99     91   		WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars,
   100     92   			&dwWritten, NULL);
   101     93   		return 2;
   102     94   	    }
   103     95   	    return CheckForCompilerFeature(argv[2]);
   104     96   	case 'l':
   105         -	    if (argc < 3) {
           97  +	    if (argc != 3) {
   106     98   		chars = snprintf(msg, sizeof(msg) - 1,
   107         -	       		"usage: %s -l <linker option> ?<mandatory option> ...?\n"
           99  +	       		"usage: %s -l <linker option>\n"
   108    100   			"Tests for whether link.exe supports an option\n"
   109    101   			"exitcodes: 0 == no, 1 == yes, 2 == error\n", argv[0]);
   110    102   		WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars,
   111    103   			&dwWritten, NULL);
   112    104   		return 2;
   113    105   	    }
   114         -	    return CheckForLinkerFeature(&argv[2], argc-2);
          106  +	    return CheckForLinkerFeature(argv[2]);
   115    107   	case 'f':
   116    108   	    if (argc == 2) {
   117    109   		chars = snprintf(msg, sizeof(msg) - 1,
   118    110   			"usage: %s -f <string> <substring>\n"
   119    111   			"Find a substring within another\n"
   120    112   			"exitcodes: 0 == no, 1 == yes, 2 == error\n", argv[0]);
   121    113   		WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars,
................................................................................
   126    118   		 * If the string is blank, there is no match.
   127    119   		 */
   128    120   
   129    121   		return 0;
   130    122   	    } else {
   131    123   		return IsIn(argv[2], argv[3]);
   132    124   	    }
          125  +	case 'g':
          126  +	    if (argc == 2) {
          127  +		chars = snprintf(msg, sizeof(msg) - 1,
          128  +			"usage: %s -g <file> <string>\n"
          129  +			"grep for a #define\n"
          130  +			"exitcodes: integer of the found string (no decimals)\n",
          131  +			argv[0]);
          132  +		WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars,
          133  +			&dwWritten, NULL);
          134  +		return 2;
          135  +	    }
          136  +	    return GrepForDefine(argv[2], argv[3]);
   133    137   	case 's':
   134    138   	    if (argc == 2) {
   135    139   		chars = snprintf(msg, sizeof(msg) - 1,
   136    140   			"usage: %s -s <substitutions file> <file>\n"
   137    141   			"Perform a set of string map type substutitions on a file\n"
   138    142   			"exitcodes: 0\n",
   139    143   			argv[0]);
................................................................................
   149    153   		    "Extract a version from a file:\n"
   150    154   		    "eg: pkgIndex.tcl \"package ifneeded http\"",
   151    155   		    argv[0]);
   152    156   		WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars,
   153    157   		    &dwWritten, NULL);
   154    158   		return 0;
   155    159   	    }
   156         -	    printf("%s\n", GetVersionFromFile(argv[2], argv[3], *(argv[1]+2) - '0'));
          160  +	    printf("%s\n", GetVersionFromFile(argv[2], argv[3]));
   157    161   	    return 0;
   158         -	case 'Q':
   159         -	    if (argc != 3) {
   160         -		chars = snprintf(msg, sizeof(msg) - 1,
   161         -		    "usage: %s -Q path\n"
   162         -		    "Emit the fully qualified path\n"
   163         -		    "exitcodes: 0 == no, 1 == yes, 2 == error\n", argv[0]);
   164         -		WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars,
   165         -		    &dwWritten, NULL);
   166         -		return 2;
   167         -	    }
   168         -	    return QualifyPath(argv[2]);
   169    162   	}
   170    163       }
   171    164       chars = snprintf(msg, sizeof(msg) - 1,
   172         -	    "usage: %s -c|-f|-l|-Q|-s|-V ...\n"
          165  +	    "usage: %s -c|-l|-f|-g|-V ...\n"
   173    166   	    "This is a little helper app to equalize shell differences between WinNT and\n"
   174    167   	    "Win9x and get nmake.exe to accomplish its job.\n",
   175    168   	    argv[0]);
   176    169       WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars, &dwWritten, NULL);
   177    170       return 2;
   178    171   }
   179    172   
   180         -static int
          173  +int
   181    174   CheckForCompilerFeature(
   182    175       const char *option)
   183    176   {
   184    177       STARTUPINFO si;
   185    178       PROCESS_INFORMATION pi;
   186    179       SECURITY_ATTRIBUTES sa;
   187    180       DWORD threadID;
................................................................................
   258    251   	DWORD err = GetLastError();
   259    252   	int chars = snprintf(msg, sizeof(msg) - 1,
   260    253   		"Tried to launch: \"%s\", but got error [%u]: ", cmdline, err);
   261    254   
   262    255   	FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS|
   263    256   		FORMAT_MESSAGE_MAX_WIDTH_MASK, 0L, err, 0, (LPVOID)&msg[chars],
   264    257   		(300-chars), 0);
   265         -	WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, lstrlen(msg), &err,NULL);
          258  +	WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg,lstrlen(msg), &err,NULL);
   266    259   	return 2;
   267    260       }
   268    261   
   269    262       /*
   270    263        * Close our references to the write handles that have now been inherited.
   271    264        */
   272    265   
................................................................................
   302    295        * Look for the commandline warning code in both streams.
   303    296        *  - in MSVC 6 & 7 we get D4002, in MSVC 8 we get D9002.
   304    297        */
   305    298   
   306    299       return !(strstr(Out.buffer, "D4002") != NULL
   307    300                || strstr(Err.buffer, "D4002") != NULL
   308    301                || strstr(Out.buffer, "D9002") != NULL
   309         -             || strstr(Err.buffer, "D9002") != NULL
   310         -             || strstr(Out.buffer, "D2021") != NULL
   311         -             || strstr(Err.buffer, "D2021") != NULL);
          302  +             || strstr(Err.buffer, "D9002") != NULL);
   312    303   }
   313    304   
   314         -static int
          305  +int
   315    306   CheckForLinkerFeature(
   316         -    const char **options,
   317         -    int count)
          307  +    const char *option)
   318    308   {
   319    309       STARTUPINFO si;
   320    310       PROCESS_INFORMATION pi;
   321    311       SECURITY_ATTRIBUTES sa;
   322    312       DWORD threadID;
   323    313       char msg[300];
   324    314       BOOL ok;
   325    315       HANDLE hProcess, h, pipeThreads[2];
   326         -    int i;
   327         -    char cmdline[255];
          316  +    char cmdline[100];
   328    317   
   329    318       hProcess = GetCurrentProcess();
   330    319   
   331    320       ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
   332    321       ZeroMemory(&si, sizeof(STARTUPINFO));
   333    322       si.cb = sizeof(STARTUPINFO);
   334    323       si.dwFlags   = STARTF_USESTDHANDLES;
................................................................................
   366    355   
   367    356       lstrcpy(cmdline, "link.exe -nologo ");
   368    357   
   369    358       /*
   370    359        * Append our option for testing.
   371    360        */
   372    361   
   373         -    for (i = 0; i < count; i++) {
   374         -	lstrcat(cmdline, " \"");
   375         -	lstrcat(cmdline, options[i]);
   376         -	lstrcat(cmdline, "\"");
   377         -    }
          362  +    lstrcat(cmdline, option);
   378    363   
   379    364       ok = CreateProcess(
   380    365   	    NULL,	    /* Module name. */
   381    366   	    cmdline,	    /* Command line. */
   382    367   	    NULL,	    /* Process handle not inheritable. */
   383    368   	    NULL,	    /* Thread handle not inheritable. */
   384    369   	    TRUE,	    /* yes, inherit handles. */
................................................................................
   392    377   	DWORD err = GetLastError();
   393    378   	int chars = snprintf(msg, sizeof(msg) - 1,
   394    379   		"Tried to launch: \"%s\", but got error [%u]: ", cmdline, err);
   395    380   
   396    381   	FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS|
   397    382   		FORMAT_MESSAGE_MAX_WIDTH_MASK, 0L, err, 0, (LPVOID)&msg[chars],
   398    383   		(300-chars), 0);
   399         -	WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, lstrlen(msg), &err,NULL);
          384  +	WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg,lstrlen(msg), &err,NULL);
   400    385   	return 2;
   401    386       }
   402    387   
   403    388       /*
   404    389        * Close our references to the write handles that have now been inherited.
   405    390        */
   406    391   
................................................................................
   435    420       /*
   436    421        * Look for the commandline warning code in the stderr stream.
   437    422        */
   438    423   
   439    424       return !(strstr(Out.buffer, "LNK1117") != NULL ||
   440    425   	    strstr(Err.buffer, "LNK1117") != NULL ||
   441    426   	    strstr(Out.buffer, "LNK4044") != NULL ||
   442         -	    strstr(Err.buffer, "LNK4044") != NULL ||
   443         -	    strstr(Out.buffer, "LNK4224") != NULL ||
   444         -	    strstr(Err.buffer, "LNK4224") != NULL);
          427  +	    strstr(Err.buffer, "LNK4044") != NULL);
   445    428   }
   446    429   
   447         -static DWORD WINAPI
          430  +DWORD WINAPI
   448    431   ReadFromPipe(
   449    432       LPVOID args)
   450    433   {
   451    434       pipeinfo *pi = (pipeinfo *) args;
   452    435       char *lastBuf = pi->buffer;
   453    436       DWORD dwRead;
   454    437       BOOL ok;
................................................................................
   465    448       }
   466    449       lastBuf += dwRead;
   467    450       goto again;
   468    451   
   469    452       return 0;  /* makes the compiler happy */
   470    453   }
   471    454   
   472         -static int
          455  +int
   473    456   IsIn(
   474    457       const char *string,
   475    458       const char *substring)
   476    459   {
   477    460       return (strstr(string, substring) != NULL);
   478    461   }
          462  +
          463  +/*
          464  + * Find a specified #define by name.
          465  + *
          466  + * If the line is '#define TCL_VERSION "8.5"', it returns 85 as the result.
          467  + */
          468  +
          469  +int
          470  +GrepForDefine(
          471  +    const char *file,
          472  +    const char *string)
          473  +{
          474  +    char s1[51], s2[51], s3[51];
          475  +    FILE *f = fopen(file, "rt");
          476  +
          477  +    if (f == NULL) {
          478  +	return 0;
          479  +    }
          480  +
          481  +    do {
          482  +	int r = fscanf(f, "%50s", s1);
          483  +
          484  +	if (r == 1 && !strcmp(s1, "#define")) {
          485  +	    /*
          486  +	     * Get next two words.
          487  +	     */
          488  +
          489  +	    r = fscanf(f, "%50s %50s", s2, s3);
          490  +	    if (r != 2) {
          491  +		continue;
          492  +	    }
          493  +
          494  +	    /*
          495  +	     * Is the first word what we're looking for?
          496  +	     */
          497  +
          498  +	    if (!strcmp(s2, string)) {
          499  +		double d1;
          500  +
          501  +		fclose(f);
          502  +
          503  +		/*
          504  +		 * Add 1 past first double quote char. "8.5"
          505  +		 */
          506  +
          507  +		d1 = atof(s3 + 1);		  /*    8.5  */
          508  +		while (floor(d1) != d1) {
          509  +		    d1 *= 10.0;
          510  +		}
          511  +		return ((int) d1);		  /*    85   */
          512  +	    }
          513  +	}
          514  +    } while (!feof(f));
          515  +
          516  +    fclose(f);
          517  +    return 0;
          518  +}
   479    519   
   480    520   /*
   481    521    * GetVersionFromFile --
   482    522    * 	Looks for a match string in a file and then returns the version
   483    523    * 	following the match where a version is anything acceptable to
   484    524    * 	package provide or package ifneeded.
   485    525    */
   486    526   
   487         -static const char *
          527  +const char *
   488    528   GetVersionFromFile(
   489    529       const char *filename,
   490         -    const char *match,
   491         -    int numdots)
          530  +    const char *match)
   492    531   {
   493    532       size_t cbBuffer = 100;
   494    533       static char szBuffer[100];
   495    534       char *szResult = NULL;
   496    535       FILE *fp = fopen(filename, "rt");
   497    536   
   498    537       if (fp != NULL) {
................................................................................
   502    541   
   503    542   	while (fgets(szBuffer, cbBuffer, fp) != NULL) {
   504    543   	    LPSTR p, q;
   505    544   
   506    545   	    p = strstr(szBuffer, match);
   507    546   	    if (p != NULL) {
   508    547   		/*
   509         -		 * Skip to first digit after the match.
          548  +		 * Skip to first digit.
   510    549   		 */
   511    550   
   512         -		p += strlen(match);
   513    551   		while (*p && !isdigit(*p)) {
   514    552   		    ++p;
   515    553   		}
   516    554   
   517    555   		/*
   518    556   		 * Find ending whitespace.
   519    557   		 */
   520    558   
   521    559   		q = p;
   522         -		while (*q && (strchr("0123456789.ab", *q)) && ((!strchr(".ab", *q)
   523         -			    && (!strchr("ab", q[-1])) || --numdots))) {
          560  +		while (*q && (isalnum(*q) || *q == '.')) {
   524    561   		    ++q;
   525    562   		}
   526    563   
   527    564   		memcpy(szBuffer, p, q - p);
   528    565   		szBuffer[q-p] = 0;
   529    566   		szResult = szBuffer;
   530    567   		break;
................................................................................
   589    626    *	Usage is something like:
   590    627    *	  nmakehlp -S << $** > $@
   591    628    *        @PACKAGE_NAME@ $(PACKAGE_NAME)
   592    629    *        @PACKAGE_VERSION@ $(PACKAGE_VERSION)
   593    630    *        <<
   594    631    */
   595    632   
   596         -static int
          633  +int
   597    634   SubstituteFile(
   598    635       const char *substitutions,
   599    636       const char *filename)
   600    637   {
   601    638       size_t cbBuffer = 1024;
   602    639       static char szBuffer[1024], szCopy[1024];
   603    640       char *szResult = NULL;
................................................................................
   610    647   	/*
   611    648   	 * Build a list of substutitions from the first filename
   612    649   	 */
   613    650   
   614    651   	sp = fopen(substitutions, "rt");
   615    652   	if (sp != NULL) {
   616    653   	    while (fgets(szBuffer, cbBuffer, sp) != NULL) {
   617         -		unsigned char *ks, *ke, *vs, *ve;
   618         -		ks = (unsigned char*)szBuffer;
          654  +		char *ks, *ke, *vs, *ve;
          655  +		ks = szBuffer;
   619    656   		while (ks && *ks && isspace(*ks)) ++ks;
   620    657   		ke = ks;
   621    658   		while (ke && *ke && !isspace(*ke)) ++ke;
   622    659   		vs = ke;
   623    660   		while (vs && *vs && isspace(*vs)) ++vs;
   624    661   		ve = vs;
   625    662   		while (ve && *ve && !(*ve == '\r' || *ve == '\n')) ++ve;
   626    663   		*ke = 0, *ve = 0;
   627         -		list_insert(&substPtr, (char*)ks, (char*)vs);
          664  +		list_insert(&substPtr, ks, vs);
   628    665   	    }
   629    666   	    fclose(sp);
   630    667   	}
   631    668   
   632    669   	/* debug: dump the list */
   633    670   #ifdef _DEBUG
   634    671   	{
................................................................................
   635    672   	    int n = 0;
   636    673   	    list_item_t *p = NULL;
   637    674   	    for (p = substPtr; p != NULL; p = p->nextPtr, ++n) {
   638    675   		fprintf(stderr, "% 3d '%s' => '%s'\n", n, p->key, p->value);
   639    676   	    }
   640    677   	}
   641    678   #endif
   642         -
          679  +	
   643    680   	/*
   644    681   	 * Run the substitutions over each line of the input
   645    682   	 */
   646         -
          683  +	
   647    684   	while (fgets(szBuffer, cbBuffer, fp) != NULL) {
   648    685   	    list_item_t *p = NULL;
   649    686   	    for (p = substPtr; p != NULL; p = p->nextPtr) {
   650    687   		char *m = strstr(szBuffer, p->key);
   651    688   		if (m) {
   652    689   		    char *cp, *op, *sp;
   653    690   		    cp = szCopy;
................................................................................
   659    696   		    while (*op) *cp++ = *op++;
   660    697   		    *cp = 0;
   661    698   		    memcpy(szBuffer, szCopy, sizeof(szCopy));
   662    699   		}
   663    700   	    }
   664    701   	    printf(szBuffer);
   665    702   	}
   666         -
          703  +	
   667    704   	list_free(&substPtr);
   668    705       }
   669    706       fclose(fp);
   670    707       return 0;
   671    708   }
   672         -
   673         -/*
   674         - * QualifyPath --
   675         - *
   676         - *	This composes the current working directory with a provided path
   677         - *	and returns the fully qualified and normalized path.
   678         - *	Mostly needed to setup paths for testing.
   679         - */
   680         -
   681         -static int
   682         -QualifyPath(
   683         -    const char *szPath)
   684         -{
   685         -    char szCwd[MAX_PATH + 1];
   686         -    char szTmp[MAX_PATH + 1];
   687         -    char *p;
   688         -    GetCurrentDirectory(MAX_PATH, szCwd);
   689         -    while ((p = strchr(szPath, '/')) && *p)
   690         -	*p = '\\';
   691         -    PathCombine(szTmp, szCwd, szPath);
   692         -    PathCanonicalize(szCwd, szTmp);
   693         -    printf("%s\n", szCwd);
   694         -    return 0;
   695         -}
   696    709   
   697    710   /*
   698    711    * Local variables:
   699    712    *   mode: c
   700    713    *   c-basic-offset: 4
   701    714    *   fill-column: 78
   702    715    *   indent-tabs-mode: t
   703    716    *   tab-width: 8
   704    717    * End:
   705    718    */

Changes to win/pkgIndex.tcl.

     1      1   # tDOM Tcl package index file
     2      2   
     3         -package ifneeded tdom 0.9.0 \
     4         -    "[list load   [file join $dir tdom090[info sharedlibextension] ] tdom];\
            3  +package ifneeded tdom 0.8.4 \
            4  +    "[list load   [file join $dir tdom084[info sharedlibextension] ] tdom];\
     5      5        [list source [file join $dir tdom.tcl]]"

Changes to win/rules.vc.

    28     28   !ifndef INSTALLDIR
    29     29   ### Assume the normal default.
    30     30   _INSTALLDIR	= C:\Program Files\Tcl
    31     31   !else
    32     32   ### Fix the path separators.
    33     33   _INSTALLDIR	= $(INSTALLDIR:/=\)
    34     34   !endif
           35  +
           36  +!ifndef MACHINE
           37  +!if "$(CPU)" == "" || "$(CPU)" == "i386"
           38  +MACHINE         = IX86
           39  +!else
           40  +MACHINE         = $(CPU)
           41  +!endif
           42  +!endif
           43  +
           44  +!ifndef CFG_ENCODING
           45  +CFG_ENCODING	= \"cp1252\"
           46  +!endif
    35     47   
    36     48   #----------------------------------------------------------
    37     49   # Set the proper copy method to avoid overwrite questions
    38     50   # to the user when copying files and selecting the right
    39     51   # "delete all" method.
    40     52   #----------------------------------------------------------
    41     53   
................................................................................
    54     66   COPY	= copy >_JUNK.OUT # On Win98 NUL does not work here.
    55     67   RMDIR	= deltree /Y
    56     68   NULL    = \NUL # Used in testing directory existence
    57     69   ERRNULL = >NUL # Win9x shell cannot redirect stderr
    58     70   !endif
    59     71   MKDIR   = mkdir
    60     72   
    61         -#------------------------------------------------------------------------------
    62         -# Determine the host and target architectures and compiler version.
    63         -#------------------------------------------------------------------------------
    64         -
    65         -_HASH=^#
    66         -_VC_MANIFEST_EMBED_EXE=
    67         -_VC_MANIFEST_EMBED_DLL=
    68         -VCVER=0
    69         -!if ![echo VCVERSION=_MSC_VER > vercl.x] \
    70         -    && ![echo $(_HASH)if defined(_M_IX86) >> vercl.x] \
    71         -    && ![echo ARCH=IX86 >> vercl.x] \
    72         -    && ![echo $(_HASH)elif defined(_M_AMD64) >> vercl.x] \
    73         -    && ![echo ARCH=AMD64 >> vercl.x] \
    74         -    && ![echo $(_HASH)endif >> vercl.x] \
    75         -    && ![cl -nologo -TC -P vercl.x $(ERRNULL)]
    76         -!include vercl.i
    77         -!if ![echo VCVER= ^\> vercl.vc] \
    78         -    && ![set /a $(VCVERSION) / 100 - 6 >> vercl.vc]
    79         -!include vercl.vc
    80         -!endif
    81         -!endif
    82         -!if ![del $(ERRNUL) /q/f vercl.x vercl.i vercl.vc]
    83         -!endif
    84         -
    85         -!if ![reg query HKLM\Hardware\Description\System\CentralProcessor\0 /v Identifier | findstr /i x86]
    86         -NATIVE_ARCH=IX86
    87         -!else
    88         -NATIVE_ARCH=AMD64
    89         -!endif
    90         -
    91         -# Since MSVC8 we must deal with manifest resources.
    92         -!if $(VCVERSION) >= 1400
    93         -_VC_MANIFEST_EMBED_EXE=if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1
    94         -_VC_MANIFEST_EMBED_DLL=if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2
    95         -!endif
    96         -
    97         -!ifndef MACHINE
    98         -MACHINE=$(ARCH)
    99         -!endif
   100         -
   101         -!ifndef CFG_ENCODING
   102         -CFG_ENCODING	= \"cp1252\"
   103         -!endif
   104         -
   105     73   !message ===============================================================================
   106     74   
   107     75   #----------------------------------------------------------
   108     76   # build the helper app we need to overcome nmake's limiting
   109     77   # environment.
   110     78   #----------------------------------------------------------
   111     79   
................................................................................
   161    129   
   162    130   !if [nmakehlp -c -RTC1]
   163    131   DEBUGFLAGS     = $(DEBUGFLAGS) -RTC1
   164    132   !elseif [nmakehlp -c -GZ]
   165    133   DEBUGFLAGS     = $(DEBUGFLAGS) -GZ
   166    134   !endif
   167    135   
   168         -COMPILERFLAGS  =-W3 /D_ATL_XP_TARGETING
          136  +COMPILERFLAGS  =-W3
   169    137   
   170    138   # In v13 -GL and -YX are incompatible.
   171    139   !if [nmakehlp -c -YX]
   172    140   !if ![nmakehlp -c -GL]
   173    141   OPTIMIZATIONS  = $(OPTIMIZATIONS) -YX
   174    142   !endif
   175    143   !endif
................................................................................
   190    158   !message *** Compiler has 'B-stepping errata workarounds'
   191    159   COMPILERFLAGS   = $(COMPILERFLAGS) -QIA64_Bx
   192    160   !else
   193    161   !message *** Compiler does not have 'B-stepping errata workarounds'
   194    162   !endif
   195    163   !endif
   196    164   
   197         -# Prevents "LNK1561: entry point must be defined" error compiling from VS-IDE:
   198         -!ifndef LINKER_TESTFLAGS
   199         -LINKER_TESTFLAGS = /DLL /NOENTRY /OUT:nmhlp-out.txt
   200         -!endif
   201         -
   202    165   !if "$(MACHINE)" == "IX86"
   203    166   ### test for -align:4096, when align:512 will do.
   204    167   !if [nmakehlp -l -opt:nowin98]
   205    168   !message *** Linker has 'Win98 alignment problem'
   206    169   ALIGN98_HACK	= 1
   207    170   !else
   208    171   !message *** Linker doesn't have 'Win98 alignment problem'
................................................................................
   210    173   !endif
   211    174   !else
   212    175   ALIGN98_HACK	= 0
   213    176   !endif
   214    177   
   215    178   LINKERFLAGS     =
   216    179   
   217         -!if [nmakehlp -l -ltcg $(LINKER_TESTFLAGS)]
          180  +!if [nmakehlp -l -ltcg]
   218    181   LINKERFLAGS     =-ltcg
   219    182   !endif
          183  +
          184  +#----------------------------------------------------------
          185  +# MSVC8 (ships with Visual Studio 2005) generates a manifest
          186  +# file that we should link into the binaries. This is how.
          187  +#----------------------------------------------------------
          188  +
          189  +_VC_MANIFEST_EMBED_EXE=
          190  +_VC_MANIFEST_EMBED_DLL=
          191  +VCVER=0
          192  +!if ![echo VCVERSION=_MSC_VER > vercl.x] \
          193  +    && ![cl -nologo -TC -P vercl.x $(ERRNULL)]
          194  +!include vercl.i
          195  +!if $(VCVERSION) >= 1400
          196  +VCVER=8
          197  +_VC_MANIFEST_EMBED_EXE=if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1
          198  +_VC_MANIFEST_EMBED_DLL=if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2
          199  +!elseif $(VCVERSION) >= 1300
          200  +VCVER=7
          201  +!elseif $(VCVERSION) >= 1200
          202  +VCVER=6
          203  +!endif
          204  +!endif
   220    205   
   221    206   #----------------------------------------------------------
   222    207   # Decode the options requested.
   223    208   #----------------------------------------------------------
   224    209   
   225    210   !if "$(OPTS)" == "" || [nmakehlp -f "$(OPTS)" "none"]
   226    211   STATIC_BUILD	= 0
   227    212   TCL_THREADS	= 1
   228    213   DEBUG		= 0
   229         -SYMBOLS		= 0
   230    214   PROFILE		= 0
   231         -PGO		= 0
   232         -MSVCRT		= 1
          215  +MSVCRT		= 0
   233    216   LOIMPACT	= 0
   234    217   TCL_USE_STATIC_PACKAGES	= 0
   235    218   USE_THREAD_ALLOC = 1
          219  +USE_THREAD_STORAGE = 1
   236    220   UNCHECKED       = 0
   237    221   !else
   238    222   !if [nmakehlp -f $(OPTS) "static"]
   239    223   !message *** Doing static
   240    224   STATIC_BUILD	= 1
   241    225   !else
   242    226   STATIC_BUILD	= 0
   243    227   !endif
   244         -!if [nmakehlp -f $(OPTS) "nomsvcrt"]
   245         -!message *** Doing nomsvcrt
   246         -MSVCRT		= 0
   247         -!else
   248    228   !if [nmakehlp -f $(OPTS) "msvcrt"]
   249    229   !message *** Doing msvcrt
   250    230   MSVCRT		= 1
   251    231   !else
   252         -!if !$(STATIC_BUILD)
   253         -MSVCRT		= 1
   254         -!else
   255    232   MSVCRT		= 0
   256    233   !endif
   257         -!endif
   258         -!endif
   259         -!if [nmakehlp -f $(OPTS) "staticpkg"] && $(STATIC_BUILD)
          234  +!if [nmakehlp -f $(OPTS) "staticpkg"]
   260    235   !message *** Doing staticpkg
   261    236   TCL_USE_STATIC_PACKAGES	= 1
   262    237   !else
   263    238   TCL_USE_STATIC_PACKAGES	= 0
   264    239   !endif
   265    240   !if [nmakehlp -f $(OPTS) "nothreads"]
   266    241   !message *** Compile explicitly for non-threaded tcl
   267    242   TCL_THREADS	= 0
   268         -USE_THREAD_ALLOC= 0
   269    243   !else
   270    244   TCL_THREADS     = 1
   271         -USE_THREAD_ALLOC= 1
   272    245   !endif
   273    246   !if [nmakehlp -f $(OPTS) "symbols"]
   274    247   !message *** Doing symbols
   275    248   DEBUG		= 1
   276    249   !else
   277    250   DEBUG		= 0
   278    251   !endif
   279         -!if [nmakehlp -f $(OPTS) "pdbs"]
   280         -!message *** Doing pdbs
   281         -SYMBOLS		= 1
   282         -!else
   283         -SYMBOLS		= 0
   284         -!endif
   285    252   !if [nmakehlp -f $(OPTS) "profile"]
   286    253   !message *** Doing profile
   287    254   PROFILE		= 1
   288    255   !else
   289    256   PROFILE		= 0
   290    257   !endif
   291         -!if [nmakehlp -f $(OPTS) "pgi"]
   292         -!message *** Doing profile guided optimization instrumentation
   293         -PGO		= 1
   294         -!elseif [nmakehlp -f $(OPTS) "pgo"]
   295         -!message *** Doing profile guided optimization
   296         -PGO		= 2
   297         -!else
   298         -PGO		= 0
   299         -!endif
   300    258   !if [nmakehlp -f $(OPTS) "loimpact"]
   301    259   !message *** Doing loimpact
   302    260   LOIMPACT	= 1
   303    261   !else
   304    262   LOIMPACT	= 0
   305    263   !endif
   306    264   !if [nmakehlp -f $(OPTS) "thrdalloc"]
   307    265   !message *** Doing thrdalloc
   308    266   USE_THREAD_ALLOC = 1
   309         -!endif
   310         -!if [nmakehlp -f $(OPTS) "tclalloc"]
   311         -!message *** Doing tclalloc
          267  +!else
   312    268   USE_THREAD_ALLOC = 0
          269  +!endif
          270  +!if [nmakehlp -f $(OPTS) "thrdstorage"]
          271  +!message *** Doing thrdstorage
          272  +USE_THREAD_STORAGE = 1
          273  +!else
          274  +USE_THREAD_STORAGE = 0
   313    275   !endif
   314    276   !if [nmakehlp -f $(OPTS) "unchecked"]
   315    277   !message *** Doing unchecked
   316    278   UNCHECKED = 1
   317    279   !else
   318    280   UNCHECKED = 0
   319    281   !endif
   320    282   !endif
          283  +
          284  +
          285  +!if !$(STATIC_BUILD)
          286  +# Make sure we don't build overly fat DLLs.
          287  +MSVCRT		= 1
          288  +# We shouldn't statically put the extensions inside the shell when dynamic.
          289  +TCL_USE_STATIC_PACKAGES = 0
          290  +!endif
          291  +
   321    292   
   322    293   #----------------------------------------------------------
   323    294   # Figure-out how to name our intermediate and output directories.
   324    295   # We wouldn't want different builds to use the same .obj files
   325    296   # by accident.
   326    297   #----------------------------------------------------------
   327    298   
................................................................................
   331    302   #   s = static library (as opposed to an
   332    303   #	import library)
   333    304   #   g = linked to the debug enabled C
   334    305   #	run-time.
   335    306   #   x = special static build when it
   336    307   #	links to the dynamic C run-time.
   337    308   #----------------------------------------
   338         -SUFX	    = tsgx
          309  +SUFX	    = sgx
   339    310   
   340    311   !if $(DEBUG)
   341    312   BUILDDIRTOP = Debug
   342    313   !else
   343    314   BUILDDIRTOP = Release
   344    315   !endif
   345    316   
................................................................................
   356    327   
   357    328   TMP_DIRFULL = .\$(BUILDDIRTOP)\$(PROJECT)_ThreadedDynamicStaticX
   358    329   
   359    330   !if !$(STATIC_BUILD)
   360    331   TMP_DIRFULL = $(TMP_DIRFULL:Static=)
   361    332   SUFX	    = $(SUFX:s=)
   362    333   EXT	    = dll
          334  +!if $(MSVCRT)
   363    335   TMP_DIRFULL = $(TMP_DIRFULL:X=)
   364    336   SUFX	    = $(SUFX:x=)
          337  +!endif
   365    338   !else
   366    339   TMP_DIRFULL = $(TMP_DIRFULL:Dynamic=)
   367    340   EXT	    = lib
   368    341   !if !$(MSVCRT)
   369    342   TMP_DIRFULL = $(TMP_DIRFULL:X=)
   370    343   SUFX	    = $(SUFX:x=)
   371    344   !endif
................................................................................
   413    386   
   414    387   #----------------------------------------------------------
   415    388   # Decode the checks requested.
   416    389   #----------------------------------------------------------
   417    390   
   418    391   !if "$(CHECKS)" == "" || [nmakehlp -f "$(CHECKS)" "none"]
   419    392   TCL_NO_DEPRECATED	    = 0
   420         -WARNINGS		    = -W3
          393  +FULLWARNINGS		    = 0
   421    394   !else
   422    395   !if [nmakehlp -f $(CHECKS) "nodep"]
   423    396   !message *** Doing nodep check
   424    397   TCL_NO_DEPRECATED	    = 1
   425    398   !else
   426    399   TCL_NO_DEPRECATED	    = 0
   427    400   !endif
   428    401   !if [nmakehlp -f $(CHECKS) "fullwarn"]
   429    402   !message *** Doing full warnings check
   430         -WARNINGS		    = -W4
   431         -!if [nmakehlp -l -warn:3 $(LINKER_TESTFLAGS)]
   432         -LINKERFLAGS		    = $(LINKERFLAGS) -warn:3
   433         -!endif
          403  +FULLWARNINGS		    = 1
   434    404   !else
   435         -WARNINGS		    = -W3
   436         -!endif
   437         -!if [nmakehlp -f $(CHECKS) "64bit"] && [nmakehlp -c -Wp64]
   438         -!message *** Doing 64bit portability warnings
   439         -WARNINGS		    = $(WARNINGS) -Wp64
          405  +FULLWARNINGS		    = 0
   440    406   !endif
   441    407   !endif
   442    408   
   443         -!if $(PGO) > 1
   444         -!if [nmakehlp -l -ltcg:pgoptimize $(LINKER_TESTFLAGS)]
   445         -LINKERFLAGS	= $(LINKERFLAGS:-ltcg=) -ltcg:pgoptimize
   446         -!else
   447         -MSG=^
   448         -This compiler does not support profile guided optimization.
   449         -!error $(MSG)
   450         -!endif
   451         -!elseif $(PGO) > 0
   452         -!if [nmakehlp -l -ltcg:pginstrument $(LINKER_TESTFLAGS)]
   453         -LINKERFLAGS	= $(LINKERFLAGS:-ltcg=) -ltcg:pginstrument
   454         -!else
   455         -MSG=^
   456         -This compiler does not support profile guided optimization.
   457         -!error $(MSG)
   458         -!endif
   459         -!endif
   460    409   
   461    410   #----------------------------------------------------------
   462    411   # Set our defines now armed with our options.
   463    412   #----------------------------------------------------------
   464    413   
   465         -OPTDEFINES	= -DTCL_CFGVAL_ENCODING=$(CFG_ENCODING) -DSTDC_HEADERS
          414  +OPTDEFINES	= -DTCL_CFGVAL_ENCODING=$(CFG_ENCODING)
   466    415   
   467    416   !if $(TCL_MEM_DEBUG)
   468    417   OPTDEFINES	= $(OPTDEFINES) -DTCL_MEM_DEBUG
   469    418   !endif
   470    419   !if $(TCL_COMPILE_DEBUG)
   471    420   OPTDEFINES	= $(OPTDEFINES) -DTCL_COMPILE_DEBUG -DTCL_COMPILE_STATS
   472    421   !endif
   473    422   !if $(TCL_THREADS)
   474    423   OPTDEFINES	= $(OPTDEFINES) -DTCL_THREADS=1
   475    424   !if $(USE_THREAD_ALLOC)
   476    425   OPTDEFINES	= $(OPTDEFINES) -DUSE_THREAD_ALLOC=1
   477    426   !endif
          427  +!if $(USE_THREAD_STORAGE)
          428  +OPTDEFINES	= $(OPTDEFINES) -DUSE_THREAD_STORAGE=1
          429  +!endif
   478    430   !endif
   479    431   !if $(STATIC_BUILD)
   480    432   OPTDEFINES	= $(OPTDEFINES) -DSTATIC_BUILD
   481    433   !endif
   482    434   !if $(TCL_NO_DEPRECATED)
   483    435   OPTDEFINES	= $(OPTDEFINES) -DTCL_NO_DEPRECATED
   484    436   !endif
   485    437   
   486         -!if !$(DEBUG)
   487         -OPTDEFINES	= $(OPTDEFINES) -DNDEBUG
   488         -!if $(OPTIMIZING)
          438  +!if $(DEBUG)
          439  +OPTDEFINES	= $(OPTDEFINES) -DTCL_CFG_DEBUG
          440  +!elseif $(OPTIMIZING)
   489    441   OPTDEFINES	= $(OPTDEFINES) -DTCL_CFG_OPTIMIZED
   490         -!endif
   491    442   !endif
   492    443   !if $(PROFILE)
   493    444   OPTDEFINES	= $(OPTDEFINES) -DTCL_CFG_PROFILED
   494    445   !endif
   495         -!if "$(MACHINE)" == "IA64" || "$(MACHINE)" == "AMD64"
          446  +!if "$(MACHINE)" == "IA64"
   496    447   OPTDEFINES	= $(OPTDEFINES) -DTCL_CFG_DO64BIT
   497    448   !endif
   498         -!if $(VCVERSION) < 1300
   499         -OPTDEFINES	= $(OPTDEFINES) -DNO_STRTOI64
   500         -!endif
   501    449   
   502    450   
   503    451   #----------------------------------------------------------
   504         -# Locate the Tcl headers to build against
          452  +# Get common info used when building extensions.
   505    453   #----------------------------------------------------------
   506    454   
   507         -!if "$(PROJECT)" == "tcl"
   508         -
   509         -_TCL_H          = ..\generic\tcl.h
   510         -
   511         -!else
          455  +!if "$(PROJECT)" != "tcl"
   512    456   
   513    457   # If INSTALLDIR set to tcl root dir then reset to the lib dir.
   514    458   !if exist("$(_INSTALLDIR)\include\tcl.h")
   515    459   _INSTALLDIR=$(_INSTALLDIR)\lib
   516    460   !endif
   517    461   
   518    462   !if !defined(TCLDIR)
................................................................................
   536    480   _TCL_H          = $(_TCLDIR)\generic\tcl.h
   537    481   !else
   538    482   MSG =^
   539    483   Failed to find tcl.h.  The TCLDIR macro does not appear correct.
   540    484   !error $(MSG)
   541    485   !endif
   542    486   !endif
   543         -!endif
   544         -
   545         -#--------------------------------------------------------------
   546         -# Extract various version numbers from tcl headers
   547         -# The generated file is then included in the makefile.
   548         -#--------------------------------------------------------------
   549    487   
   550    488   !if [echo REM = This file is generated from rules.vc > version.vc]
   551    489   !endif
   552         -!if [echo TCL_MAJOR_VERSION = \>> versions.vc] \
   553         -   && [nmakehlp -V "$(_TCL_H)" TCL_MAJOR_VERSION >> versions.vc]
          490  +!if exist("$(_TCL_H)")
          491  +!if [echo TCL_DOTVERSION = \>> version.vc] \
          492  +   && [nmakehlp -V "$(_TCL_H)" TCL_VERSION >> version.vc]
   554    493   !endif
   555         -!if [echo TCL_MINOR_VERSION = \>> versions.vc] \
   556         -   && [nmakehlp -V "$(_TCL_H)" TCL_MINOR_VERSION >> versions.vc]
   557    494   !endif
   558         -!if [echo TCL_PATCH_LEVEL = \>> versions.vc] \
   559         -   && [nmakehlp -V "$(_TCL_H)" TCL_PATCH_LEVEL >> versions.vc]
   560         -!endif
   561         -
   562         -!include versions.vc
   563         -
   564         -#--------------------------------------------------------------
   565         -# Setup tcl version dependent stuff headers
   566         -#--------------------------------------------------------------
   567         -
   568         -!if "$(PROJECT)" != "tcl"
   569         -
   570         -TCL_VERSION	= $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION)
          495  +!include version.vc
          496  +TCL_VERSION	= $(TCL_DOTVERSION:.=)
   571    497   
   572    498   !if $(TCLINSTALL)
   573    499   TCLSH		= "$(_TCLDIR)\bin\tclsh$(TCL_VERSION)$(SUFX).exe"
   574    500   !if !exist($(TCLSH)) && $(TCL_THREADS)
   575    501   TCLSH           = "$(_TCLDIR)\bin\tclsh$(TCL_VERSION)t$(SUFX).exe"
   576    502   !endif
   577    503   TCLSTUBLIB	= "$(_TCLDIR)\lib\tclstub$(TCL_VERSION).lib"
................................................................................
   586    512   TCLSTUBLIB	= "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclstub$(TCL_VERSION).lib"
   587    513   TCLIMPLIB	= "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcl$(TCL_VERSION)$(SUFX).lib"
   588    514   TCL_LIBRARY	= $(_TCLDIR)\library
   589    515   TCL_INCLUDES	= -I"$(_TCLDIR)\generic" -I"$(_TCLDIR)\win"
   590    516   !endif
   591    517   
   592    518   !endif
          519  +
          520  +#----------------------------------------------------------
          521  +# Optionally check for Tk info for building extensions.
          522  +#----------------------------------------------------------
          523  +
          524  +!ifdef PROJECT_REQUIRES_TK
          525  +!if "$(PROJECT)" != "tcl" && "$(PROJECT)" != "tk"
          526  +
          527  +!if !defined(TKDIR)
          528  +!if exist("$(_INSTALLDIR)\..\include\tk.h")
          529  +TKINSTALL      = 1
          530  +_TKDIR         = $(_INSTALLDIR)\..
          531  +_TK_H          = $(_TKDIR)\include\tk.h
          532  +TKDIR          = $(_TKDIR)
          533  +!elseif exist("$(_TCLDIR)\include\tk.h")
          534  +TKINSTALL      = 1
          535  +_TKDIR         = $(_TCLDIR)
          536  +_TK_H          = $(_TKDIR)\include\tk.h
          537  +TKDIR          = $(_TKDIR)
          538  +!endif
          539  +!else
          540  +_TKDIR = $(TKDIR:/=\)
          541  +!if exist("$(_TKDIR)\include\tk.h")
          542  +TKINSTALL      = 1
          543  +_TK_H          = $(_TKDIR)\include\tk.h
          544  +!elseif exist("$(_TKDIR)\generic\tk.h")
          545  +TKINSTALL      = 0
          546  +_TK_H          = $(_TKDIR)\generic\tk.h
          547  +!else
          548  +MSG =^
          549  +Failed to find tk.h. The TKDIR macro does not appear correct.
          550  +!error $(MSG)
          551  +!endif
          552  +!endif
          553  +
          554  +!if defined(TKDIR)
          555  +TK_DOTVERSION = 8.4
          556  +!if exist("$(_TK_H)")
          557  +!if [echo TK_DOTVERSION = \>> version.vc] \
          558  +   && [nmakehlp -V "$(_TK_H)" TK_VERSION >> version.vc]
          559  +!endif
          560  +!endif
          561  +!include version.vc
          562  +TK_VERSION = $(TK_DOTVERSION:.=)
          563  +
          564  +!if $(TKINSTALL)
          565  +WISH		= "$(_TKDIR)\bin\wish$(TK_VERSION)$(SUFX).exe"
          566  +TKSTUBLIB	= "$(_TKDIR)\lib\tkstub$(TK_VERSION).lib"
          567  +TKIMPLIB	= "$(_TKDIR)\lib\tk$(TK_VERSION)$(SUFX).lib"
          568  +TK_INCLUDES     = -I"$(_TKDIR)\include"
          569  +!else
          570  +WISH		= "$(_TKDIR)\win\$(BUILDDIRTOP)\wish$(TCL_VERSION)$(SUFX).exe"
          571  +TKSTUBLIB	= "$(_TKDIR)\win\$(BUILDDIRTOP)\tkstub$(TCL_VERSION).lib"
          572  +TKIMPLIB	= "$(_TKDIR)\win\$(BUILDDIRTOP)\tk$(TCL_VERSION)$(SUFX).lib"
          573  +TK_INCLUDES     = -I"$(_TKDIR)\generic" -I"$(_TKDIR)\win" -I"$(_TKDIR)\xlib"
          574  +!endif
          575  +
          576  +!endif
          577  +!endif
          578  +!endif
   593    579   
   594    580   #----------------------------------------------------------
   595    581   # Display stats being used.
   596    582   #----------------------------------------------------------
   597    583   
   598    584   !message *** Intermediate directory will be '$(TMP_DIR)'
   599    585   !message *** Output directory will be '$(OUT_DIR)'