Tcl Source Code

Check-in [277aaa0fb5]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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

Overview
Comment:Merge trunk
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dgp-properbytearray
Files: files | file ages | folders
SHA3-256: 277aaa0fb5b4057be7a6dc958563ae72fdefe66deac5e6dba591bd5e49bb4bf1
User & Date: jan.nijtmans 2019-04-02 07:53:52
Context
2019-05-03
15:58
merge trunk check-in: 61db2fb4ce user: dgp tags: dgp-properbytearray
2019-04-02
07:53
Merge trunk check-in: 277aaa0fb5 user: jan.nijtmans tags: dgp-properbytearray
2019-04-01
20:38
Merge 8.7 check-in: 1f68f143bc user: jan.nijtmans tags: trunk
2019-03-18
15:46
merge trunk check-in: 16657b8526 user: dgp tags: dgp-properbytearray
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to .fossil-settings/ignore-glob.

    22     22   */libtcl.vfs
    23     23   */libtcl_*.zip
    24     24   html
    25     25   libtommath/bn.ilg
    26     26   libtommath/bn.ind
    27     27   libtommath/pretty.build
    28     28   libtommath/tommath.src
           29  +libtommath/*.log
    29     30   libtommath/*.pdf
    30     31   libtommath/*.pl
    31     32   libtommath/*.sh
           33  +libtommath/doc/*
    32     34   libtommath/tombc/*
    33     35   libtommath/pre_gen/*
    34     36   libtommath/pics/*
    35     37   libtommath/mtest/*
    36     38   libtommath/logs/*
    37     39   libtommath/etc/*
    38     40   libtommath/demo/*

Changes to .travis.yml.

    86     86         compiler: gcc-7
    87     87         addons:
    88     88           apt:
    89     89             sources:
    90     90               - ubuntu-toolchain-r-test
    91     91             packages:
    92     92               - g++-7
           93  +      env:
           94  +        - BUILD_DIR=unix
           95  +        - CFGOPT=CFLAGS=-DTCL_UTF_MAX=3
           96  +    - os: linux
           97  +      dist: xenial
           98  +      compiler: gcc-7
           99  +      addons:
          100  +        apt:
          101  +          sources:
          102  +            - ubuntu-toolchain-r-test
          103  +          packages:
          104  +            - g++-7
    93    105         env:
    94    106           - BUILD_DIR=unix
    95    107           - CFGOPT=CFLAGS=-DTCL_NO_DEPRECATED=1
    96    108       - os: osx
    97    109         osx_image: xcode8
    98    110         env:
    99    111           - BUILD_DIR=unix
................................................................................
   158    170             packages:
   159    171               - gcc-mingw-w64-base
   160    172               - binutils-mingw-w64-i686
   161    173               - gcc-mingw-w64-i686
   162    174               - gcc-mingw-w64
   163    175               - gcc-multilib
   164    176               - wine
          177  +      env:
          178  +        - BUILD_DIR=win
          179  +        - CFGOPT="--host=i686-w64-mingw32 CFLAGS=-DTCL_UTF_MAX=3"
          180  +        - NO_DIRECT_TEST=1
          181  +    - os: linux
          182  +      dist: xenial
          183  +      compiler: i686-w64-mingw32-gcc
          184  +      addons:
          185  +        apt:
          186  +          packages:
          187  +            - gcc-mingw-w64-base
          188  +            - binutils-mingw-w64-i686
          189  +            - gcc-mingw-w64-i686
          190  +            - gcc-mingw-w64
          191  +            - gcc-multilib
          192  +            - wine
   165    193         env:
   166    194           - BUILD_DIR=win
   167    195           - CFGOPT="--host=i686-w64-mingw32 CFLAGS=-DTCL_NO_DEPRECATED=1"
   168    196           - NO_DIRECT_TEST=1
   169    197   # Test with mingw-w64 (64 bit)
   170    198       - os: linux
   171    199         dist: xenial
................................................................................
   194    222               - gcc-mingw-w64
   195    223               - wine
   196    224         env:
   197    225           - BUILD_DIR=win
   198    226           - CFGOPT="--host=x86_64-w64-mingw32 --enable-64bit CFLAGS=-DTCL_UTF_MAX=6"
   199    227           - NO_DIRECT_TEST=1
   200    228       - os: linux
          229  +      dist: xenial
          230  +      compiler: x86_64-w64-mingw32-gcc
          231  +      addons:
          232  +        apt:
          233  +          packages:
          234  +            - gcc-mingw-w64-base
          235  +            - binutils-mingw-w64-x86-64
          236  +            - gcc-mingw-w64-x86-64
          237  +            - gcc-mingw-w64
          238  +            - wine
          239  +      env:
          240  +        - BUILD_DIR=win
          241  +        - CFGOPT="--host=x86_64-w64-mingw32 --enable-64bit CFLAGS=-DTCL_UTF_MAX=3"
          242  +        - NO_DIRECT_TEST=1
          243  +    - os: linux
   201    244         dist: xenial
   202    245         compiler: x86_64-w64-mingw32-gcc
   203    246         addons:
   204    247           apt:
   205    248             packages:
   206    249               - gcc-mingw-w64-base
   207    250               - binutils-mingw-w64-x86-64

Changes to doc/Tcl.n.

    24     24   (see below) unless quoted.
    25     25   .IP "[2] \fBEvaluation.\fR"
    26     26   A command is evaluated in two steps.
    27     27   First, the Tcl interpreter breaks the command into \fIwords\fR
    28     28   and performs substitutions as described below.
    29     29   These substitutions are performed in the same way for all
    30     30   commands.
    31         -Secondly, the first word is used to locate a command procedure to
    32         -carry out the command, then all of the words of the command are
    33         -passed to the command procedure.
    34         -The command procedure is free to interpret each of its words
           31  +Secondly, the first word is used to locate a routine to
           32  +carry out the command, and the remaining words of the command are
           33  +passed to that routine.
           34  +The routine is free to interpret each of its words
    35     35   in any way it likes, such as an integer, variable name, list,
    36     36   or Tcl script.
    37     37   Different commands interpret their words differently.
    38     38   .IP "[3] \fBWords.\fR"
    39     39   Words of a command are separated by white space (except for
    40     40   newlines, which are command separators).
    41     41   .IP "[4] \fBDouble quotes.\fR"

Changes to doc/ToUpper.3.

    74     74   \fBTcl_UtfToLower\fR is the same as \fBTcl_UtfToUpper\fR except it
    75     75   turns each character in the string into its lower-case equivalent.
    76     76   .PP
    77     77   \fBTcl_UtfToTitle\fR is the same as \fBTcl_UtfToUpper\fR except it
    78     78   turns the first character in the string into its title-case equivalent
    79     79   and all following characters into their lower-case equivalents.
    80     80   
    81         -.SH BUGS
    82         -.PP
    83         -At this time, the case conversions are only defined for the ISO8859-1
    84         -characters.  Unicode characters above 0x00ff are not modified by these
    85         -routines.
    86         -
    87     81   .SH KEYWORDS
    88     82   utf, unicode, toupper, tolower, totitle, case

Changes to doc/Utf.3.

   126    126   .PP
   127    127   \fBTCL_UTF_MAX\fR is the maximum number of bytes that it takes to
   128    128   represent one Unicode character in the UTF-8 representation.
   129    129   .PP
   130    130   \fBTcl_UniCharToUtf\fR stores the character \fIch\fR as a UTF-8 string
   131    131   in starting at \fIbuf\fR.  The return value is the number of bytes stored
   132    132   in \fIbuf\fR. If ch is a high surrogate (range U+D800 - U+DBFF), then
   133         -the return value will be 0 and nothing will be stored. If you still
   134         -want to produce UTF-8 output for it (even though knowing it's an illegal
   135         -code-point on its own), just call \fBTcl_UniCharToUtf\fR again using ch = -1.
          133  +the return value will be 1 and a single byte in the range 0xF0 - 0xF4
          134  +will be stored. If you still want to produce UTF-8 output for it (even
          135  +though knowing it's an illegal code-point on its own), just call
          136  +\fBTcl_UniCharToUtf\fR again specifying ch = -1.
   136    137   .PP
   137    138   \fBTcl_UtfToUniChar\fR reads one UTF-8 character starting at \fIsrc\fR
   138    139   and stores it as a Tcl_UniChar in \fI*chPtr\fR.  The return value is the
   139    140   number of bytes read from \fIsrc\fR.  The caller must ensure that the
   140    141   source buffer is long enough such that this routine does not run off the
   141    142   end and dereference non-existent or random memory; if the source buffer
   142    143   is known to be null-terminated, this will not happen.  If the input is

Changes to doc/array.n.

    36     36   \fBarray nextelement\fR will not indicate whether the search
    37     37   has been completed.
    38     38   .TP
    39     39   \fBarray default \fIsubcommand arrayName args...\fR
    40     40   .VS TIP508
    41     41   Manages the default value of the array. Arrays initially have no default
    42     42   value, but this command allows you to set one; the default value will be
    43         -returned when reading from an element of the array \farrayName\fR if the read
           43  +returned when reading from an element of the array \fIarrayName\fR if the read
    44     44   would otherwise result in an error. Note that this may cause the \fBappend\fR,
    45     45   \fBdict\fR, \fBincr\fR and \fBlappend\fR commands to change their behavior in
    46     46   relation to non-existing array elements.
    47     47   .RS
    48     48   .PP
    49     49   The \fIsubcommand\fR argument controls what exact operation will be performed
    50     50   on the default value of \fIarrayName\fR. Supported \fIsubcommand\fRs are:

Changes to doc/cookiejar.n.

    92     92   \fB\-vacuumtrigger \fIdeletionCount\fR
    93     93   .
    94     94   A count of the number of persistent cookie deletions to go between vacuuming
    95     95   the database.
    96     96   .RE
    97     97   .PP
    98     98   Cookie jar instances may be made with any of the standard TclOO instance
    99         -creation methods (\fBcreate\fR or \fRnew\fR).
           99  +creation methods (\fBcreate\fR or \fBnew\fR).
   100    100   .TP
   101    101   \fB::http::cookiejar new\fR ?\fIfilename\fR?
   102    102   .
   103    103   If a \fIfilename\fR argument is provided, it is the name of a file containing
   104    104   an SQLite database that will contain the persistent cookies maintained by the
   105    105   cookie jar; the database will be created if the file does not already
   106    106   exist. If \fIfilename\fR is not supplied, the database will be held entirely within

Changes to doc/define.n.

    48     48   This creates a class method, or (if \fIargList\fR and \fIbodyScript\fR are
    49     49   omitted) promotes an existing method on the class object to be a class
    50     50   method. The \fIname\fR, \fIargList\fR and \fIbodyScript\fR arguments are as in
    51     51   the \fBmethod\fR definition, below.
    52     52   .RS
    53     53   .PP
    54     54   Class methods can be called on either the class itself or on the instances of
    55         -that class. When they are called, the current object (see the \fBself\R and
           55  +that class. When they are called, the current object (see the \fBsel\fR and
    56     56   \fBmy\fR commands) is the class on which they are called or the class of the
    57     57   instance on which they are called, depending on whether they are called on the
    58     58   class or an instance of the class, respectively. If called on a subclass or
    59     59   instance of the subclass, the current object is the subclass.
    60     60   .PP
    61     61   In a private definition context, the methods as invoked on classes are
    62     62   \fInot\fR private, but the methods as invoked on instances of classes are

Changes to doc/expr.n.

   120    120   .
   121    121   Unary minus, unary plus, bit-wise NOT, logical NOT.  These operators
   122    122   may only be applied to numeric operands, and bit-wise NOT may only be
   123    123   applied to integers.
   124    124   .TP 20
   125    125   \fB**\fR
   126    126   .
   127         -Exponentiation.  Valid for numeric operands.
          127  +Exponentiation.  Valid for numeric operands.  The maximum exponent value
          128  +that Tcl can handle if the first number is an integer > 1 is 268435455.
   128    129   .TP 20
   129    130   \fB*\0\0/\0\0%\fR
   130    131   .
   131    132   Multiply and divide, which are valid for numeric operands, and remainder, which
   132    133   is valid for integers.  The remainder, an absolute value smaller than the
   133    134   absolute value of the divisor, has the same sign as the divisor.
   134    135   .RS

Changes to doc/info.n.

     9      9   '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    10     10   '\"
    11     11   .TH info n 8.4 Tcl "Tcl Built-In Commands"
    12     12   .so man.macros
    13     13   .BS
    14     14   '\" Note:  do not modify the .SH NAME line immediately below!
    15     15   .SH NAME
    16         -info \- Return information about the state of the Tcl interpreter
           16  +info \- Information about the state of the Tcl interpreter
    17     17   .SH SYNOPSIS
    18     18   \fBinfo \fIoption \fR?\fIarg arg ...\fR?
    19     19   .BE
    20     20   .SH DESCRIPTION
    21     21   .PP
    22         -This command provides information about various internals of the Tcl
    23         -interpreter.
    24         -The legal \fIoption\fRs (which may be abbreviated) are:
           22  +Available commands:
    25     23   .TP
    26     24   \fBinfo args \fIprocname\fR
    27     25   .
    28         -Returns a list containing the names of the arguments to procedure
    29         -\fIprocname\fR, in order.  \fIProcname\fR must be the name of a
    30         -Tcl command procedure.
           26  +Returns the names of the parameters to the procedure named \fIprocname\fR.
    31     27   .TP
    32     28   \fBinfo body \fIprocname\fR
    33     29   .
    34         -Returns the body of procedure \fIprocname\fR.  \fIProcname\fR must be
    35         -the name of a Tcl command procedure.
           30  +Returns the body of the procedure named \fIprocname\fR.
    36     31   .TP
    37     32   \fBinfo class\fI subcommand class\fR ?\fIarg ...\fR
    38     33   .
    39         -Returns information about the class, \fIclass\fR. The \fIsubcommand\fRs are
    40         -described in \fBCLASS INTROSPECTION\fR below.
           34  +Returns information about the class named \fIclass\fR.
           35  +See \fBCLASS INTROSPECTION\fR below.
    41     36   .TP
    42     37   \fBinfo cmdcount\fR
    43     38   .
    44         -Returns a count of the total number of commands that have been invoked
    45         -in this interpreter.
           39  +Returns the total number of commands evaluated in this interpreter.
    46     40   .TP
    47     41   \fBinfo cmdtype \fIcommandName\fR
    48     42   .VS TIP426
    49         -Returns a description of the kind of command named by \fIcommandName\fR.  The
    50         -supported types are:
           43  +Returns a the type of the command named \fIcommandName\fR.
           44  +Built-in types are:
    51     45   .RS
    52     46   .IP \fBalias\fR
    53         -Indicates that \fIcommandName\fR was created by \fBinterp alias\fR. Note that
    54         -safe interpreters can only see a subset of aliases (specifically those between
    55         -two commands within themselves).
           47  +\fIcommandName\fR was created by \fBinterp alias\fR.
           48  +In a safe interpreter an alias is only visible if both the alias and the
           49  +target are visible.
    56     50   .IP \fBcoroutine\fR
    57         -Indicates that \fIcommandName\fR was created by \fBcoroutine\fR.
           51  +\fIcommandName\fR was created by \fBcoroutine\fR.
    58     52   .IP \fBensemble\fR
    59         -Indicates that \fIcommandName\fR was created by \fBnamespace ensemble\fR.
           53  +\fIcommandName\fR was created by \fBnamespace ensemble\fR.
    60     54   .IP \fBimport\fR
    61         -Indicates that \fIcommandName\fR was created by \fBnamespace import\fR.
           55  +\fIcommandName\fR was created by \fBnamespace import\fR.
    62     56   .IP \fBnative\fR
    63         -Indicates that \fIcommandName\fR was created by the \fBTcl_CreateObjProc\fR
           57  +\fIcommandName\fR was created by the \fBTcl_CreateObjProc\fR
    64     58   interface directly without further registration of the type of command.
    65     59   .IP \fBobject\fR
    66         -Indicates that \fIcommandName\fR is the public command that represents an
           60  +\fIcommandName\fR is the public command that represents an
    67     61   instance of \fBoo::object\fR or one of its subclasses.
    68     62   .IP \fBprivateObject\fR
    69         -Indicates that \fIcommandName\fR is the private command (\fBmy\fR by default)
           63  +\fIcommandName\fR is the private command, \fBmy\fR by default,
    70     64   that represents an instance of \fBoo::object\fR or one of its subclasses.
    71     65   .IP \fBproc\fR
    72         -Indicates that \fIcommandName\fR was created by \fBproc\fR.
           66  +\fIcommandName\fR was created by \fBproc\fR.
    73     67   .IP \fBslave\fR
    74         -Indicates that \fIcommandName\fR was created by \fBinterp create\fR.
           68  +\fIcommandName\fR was created by \fBinterp create\fR.
    75     69   .IP \fBzlibStream\fR
    76         -Indicates that \fIcommandName\fR was created by \fBzlib stream\fR.
           70  +\fIcommandName\fR was created by \fBzlib stream\fR.
    77     71   .PP
    78         -There may be other registered types as well; this is a set that is extensible
    79         -at the implementation level with \fBTcl_RegisterCommandTypeName\fR.
           72  +Other types may be also registered as well.  See \fBTcl_RegisterCommandTypeName\fR.
    80     73   .RE
    81     74   .VE TIP426
    82     75   .TP
    83     76   \fBinfo commands \fR?\fIpattern\fR?
    84     77   .
    85         -If \fIpattern\fR is not specified,
    86         -returns a list of names of all the Tcl commands visible
    87         -(i.e. executable without using a qualified name) to the current namespace,
    88         -including both the built-in commands written in C and
    89         -the command procedures defined using the \fBproc\fR command.
    90         -If \fIpattern\fR is specified,
    91         -only those names matching \fIpattern\fR are returned.
    92         -Matching is determined using the same rules as for \fBstring match\fR.
    93         -\fIpattern\fR can be a qualified name like \fBFoo::print*\fR.
    94         -That is, it may specify a particular namespace
    95         -using a sequence of namespace names separated by double colons (\fB::\fR),
    96         -and may have pattern matching special characters
    97         -at the end to specify a set of commands in that namespace.
    98         -If \fIpattern\fR is a qualified name,
    99         -the resulting list of command names has each one qualified with the name
   100         -of the specified namespace, and only the commands defined in the named
   101         -namespace are returned.
   102         -.\" Technically, most of this hasn't changed; that's mostly just the
   103         -.\" way it always worked. Hardly anyone knew that though.
           78  +Returns the names of all commands visible in the current namespace.  If
           79  +\fIpattern\fR is given, returns only those names that match according to
           80  +\fBstring match\fR.  Only the last component of \fIpattern\fR is a pattern.
           81  +Other components identify a namespace.  See \fBNAMESPACE RESOLUTION\fR in the
           82  +\fBnamespace\fR(n) documentation.
   104     83   .TP
   105     84   \fBinfo complete \fIcommand\fR
   106     85   .
   107         -Returns 1 if \fIcommand\fR is a complete Tcl command in the sense of
   108         -having no unclosed quotes, braces, brackets or array element names.
   109         -If the command does not appear to be complete then 0 is returned.
   110         -This command is typically used in line-oriented input environments
   111         -to allow users to type in commands that span multiple lines;  if the
   112         -command is not complete, the script can delay evaluating it until additional
   113         -lines have been typed to complete the command.
           86  +Returns 1 if \fIcommand\fR is a complete command, and \fB0\fR otherwise.
           87  +Typically used in line-oriented input environments
           88  +to allow users to type in commands that span multiple lines.
   114     89   .TP
   115     90   \fBinfo coroutine\fR
   116     91   .
   117         -Returns the name of the currently executing \fBcoroutine\fR, or the empty
   118         -string if either no coroutine is currently executing, or the current coroutine
   119         -has been deleted (but has not yet returned or yielded since deletion).
           92  +Returns the name of the current \fBcoroutine\fR, or the empty
           93  +string if there is no current coroutine or the current coroutine
           94  +has been deleted.
   120     95   .TP
   121         -\fBinfo default \fIprocname arg varname\fR
           96  +\fBinfo default \fIprocname parameter varname\fR
   122     97   .
   123         -\fIProcname\fR must be the name of a Tcl command procedure and \fIarg\fR
   124         -must be the name of an argument to that procedure.  If \fIarg\fR
   125         -does not have a default value then the command returns \fB0\fR.
   126         -Otherwise it returns \fB1\fR and places the default value of \fIarg\fR
   127         -into variable \fIvarname\fR.
           98  +If the parameter \fIparameter\fR for the procedure named \fIprocname\fR has a
           99  +default value, stores that value in \fIvarname\fR and returns \fB1\fR.
          100  +Otherwise, returns \fB0\fR.
   128    101   .TP
   129    102   \fBinfo errorstack \fR?\fIinterp\fR?
   130    103   .
   131         -Returns, in a form that is programmatically easy to parse, the function names
   132         -and arguments at each level from the call stack of the last error in the given
   133         -\fIinterp\fR, or in the current one if not specified.
          104  +Returns a description of the active command at each level for the
          105  +last error in the current interpreter, or in the interpreter named
          106  +\fIinterp\fR if given.
   134    107   .RS
   135    108   .PP
   136         -This form is an even-sized list alternating tokens and parameters. Tokens are
          109  +The description is a dictionary of tokens and parameters. Tokens are
   137    110   currently either \fBCALL\fR, \fBUP\fR, or \fBINNER\fR, but other values may be
   138         -introduced in the future. \fBCALL\fR indicates a procedure call, and its
          111  +introduced in the future. \fBCALL\fR indicates a command call, and its
   139    112   parameter is the corresponding \fBinfo level\fR \fB0\fR. \fBUP\fR indicates a
   140    113   shift in variable frames generated by \fBuplevel\fR or similar, and applies to
   141    114   the previous \fBCALL\fR item. Its parameter is the level offset. \fBINNER\fR
   142    115   identifies the
   143    116   .QW "inner context" ,
   144    117   which is the innermost atomic command or bytecode instruction that raised the
   145    118   error, along with its arguments when available. While \fBCALL\fR and \fBUP\fR
   146         -allow to follow complex call paths, \fBINNER\fR homes in on the offending
   147         -operation in the innermost procedure call, even going to sub-expression
          119  +provide a trail of the call path, \fBINNER\fR provides details of the offending
          120  +operation in the innermost procedure call, even to sub-expression
   148    121   granularity.
   149    122   .PP
   150    123   This information is also present in the \fB\-errorstack\fR entry of the
   151    124   options dictionary returned by 3-argument \fBcatch\fR; \fBinfo errorstack\fR
   152    125   is a convenient way of retrieving it for uncaught errors at top-level in an
   153         -interactive \fBtclsh\fR.
          126  +interactive \fBinterpreter\fR.
   154    127   .RE
   155    128   .TP
   156    129   \fBinfo exists \fIvarName\fR
   157    130   .
   158         -Returns \fB1\fR if the variable named \fIvarName\fR exists in the
   159         -current context (either as a global or local variable) and has been
   160         -defined by being given a value, returns \fB0\fR otherwise.
          131  +Returns \fB1\fR if a variable named \fIvarName\fR is visible and has been
          132  +defined, and \fB0\fR otherwise.
   161    133   .TP
   162         -\fBinfo frame\fR ?\fInumber\fR?
          134  +\fBinfo frame\fR ?\fIdepth\fR?
   163    135   .
   164         -This command provides access to all frames on the stack, even those
   165         -hidden from \fBinfo level\fR. If \fInumber\fR is not specified, this
   166         -command returns a number giving the frame level of the command. This
   167         -is 1 if the command is invoked at top-level. If \fInumber\fR is
   168         -specified, then the result is a dictionary containing the location
   169         -information for the command at the \fInumber\fRed level on the stack.
          136  +Returns the depth of the call to \fBinfo frame\fR itself.  Otherwise, returns a
          137  +dictionary describing the active command at the \fIdepth\fR, which counts all
          138  +commands visible to \fBinfo level\fR, plus commands that don't create a new
          139  +level, such as \fBeval\fR, \fBsource\fR, or \fIuplevel\fR. The frame depth is
          140  +always greater than the current level.
   170    141   .RS
   171    142   .PP
   172         -If \fInumber\fR is positive (> 0) then it selects a particular stack
   173         -level (1 refers to the outer-most active command, 2 to the command it
   174         -called, and so on, up to the current frame level which refers to
   175         -\fBinfo frame\fR itself); otherwise it gives a level relative to the
   176         -current command (0 refers to the current command, i.e., \fBinfo
   177         -frame\fR itself, -1 to its caller, and so on).
          143  +If \fIdepth\fR is greater than \fB0\fR it is the frame at that depth.  Otherwise
          144  +it is the number of frames up from the current frame.
   178    145   .PP
   179         -This is similar to how \fBinfo level\fR works, except that this
   180         -subcommand reports all frames, like \fBsource\fRd scripts,
   181         -\fBeval\fRs, \fBuplevel\fRs, etc.
   182         -.PP
   183         -Note that for nested commands, like
          146  +As with \fBinfo level\fR and error traces, for nested commands like
   184    147   .QW "foo [bar [x]]" ,
   185    148   only
   186    149   .QW x
   187         -will be seen by an \fBinfo frame\fR invoked within
          150  +is seen by \fBinfo frame\fR invoked within
   188    151   .QW x .
   189         -This is the same as for \fBinfo level\fR and error stack traces.
   190    152   .PP
   191         -The result dictionary may contain the keys listed below, with the
   192         -specified meanings for their values:
          153  +The dictionary may contain the following keys:
   193    154   .TP
   194    155   \fBtype\fR
   195    156   .
   196         -This entry is always present and describes the nature of the location
   197         -for the command. The recognized values are \fBsource\fR, \fBproc\fR,
          157  +Always present.  Possible values are \fBsource\fR, \fBproc\fR,
   198    158   \fBeval\fR, and \fBprecompiled\fR.
   199    159   .RS
   200    160   .TP
   201    161   \fBsource\fR\0\0\0\0\0\0\0\0
   202    162   .
   203         -means that the command is found in a script loaded by the \fBsource\fR
          163  +A script loaded via the \fBsource\fR
   204    164   command.
   205    165   .TP
   206    166   \fBproc\fR\0\0\0\0\0\0\0\0
   207    167   .
   208         -means that the command is found in dynamically created procedure body.
          168  +The body of a procedure that could not be traced back to a
          169  +line in a particular script.
   209    170   .TP
   210    171   \fBeval\fR\0\0\0\0\0\0\0\0
   211    172   .
   212         -means that the command is executed by \fBeval\fR or \fBuplevel\fR.
          173  +The body of a script provided to \fBeval\fR or \fBuplevel\fR.
   213    174   .TP
   214    175   \fBprecompiled\fR\0\0\0\0\0\0\0\0
   215    176   .
   216         -means that the command is found in a pre-compiled script (loadable by
   217         -the package \fBtbcload\fR), and no further information will be
   218         -available.
          177  +A pre-compiled script (loadable by the package
          178  +\fBtbcload\fR), and no further information is available.
   219    179   .RE
   220    180   .TP
   221    181   \fBline\fR
   222    182   .
   223         -This entry provides the number of the line the command is at inside of
   224         -the script it is a part of. This information is not present for type
   225         -\fBprecompiled\fR. For type \fBsource\fR this information is counted
   226         -relative to the beginning of the file, whereas for the last two types
   227         -the line is counted relative to the start of the script.
          183  +The line number of of the command inside its script.  Not available for
          184  +\fBprecompiled\fR commands.  When the type is \fBsource\fR, the line number is
          185  +relative to the beginning of the file, whereas for the last two types it is
          186  +relative to the start of the script.
   228    187   .TP
   229    188   \fBfile\fR
   230    189   .
   231         -This entry is present only for type \fBsource\fR. It provides the
   232         -normalized path of the file the command is in.
          190  +For type \fBsource\fR, provides the normalized path of the file that contains
          191  +the command.
   233    192   .TP
   234    193   \fBcmd\fR
   235    194   .
   236         -This entry provides the string representation of the command. This is
   237         -usually the unsubstituted form, however for commands which are a
   238         -canonically-constructed list (e.g., as produced by the \fBlist\fR command)
   239         -executed by \fBeval\fR it is the substituted form as they have no other
   240         -string representation. Care is taken that the canonicality property of
   241         -the latter is not spoiled.
          195  +The command before substitutions were performed.
   242    196   .TP
   243    197   \fBproc\fR
   244    198   .
   245         -This entry is present only if the command is found in the body of a
   246         -regular Tcl procedure. It then provides the name of that procedure.
          199  +For type \fBprod\fR, the name of the procedure containing the command.
   247    200   .TP
   248    201   \fBlambda\fR
   249    202   .
   250         -This entry is present only if the command is found in the body of an
   251         -anonymous Tcl procedure, i.e. a lambda. It then provides the entire
   252         -definition of the lambda in question.
          203  +For a command in a script evaluated as the body of an unnamed routine via the
          204  +\fBapply\fR command, the definition of that routine.
   253    205   .TP
   254    206   \fBlevel\fR
   255    207   .
   256         -This entry is present only if the queried frame has a corresponding
   257         -frame returned by \fBinfo level\fR. It provides the index of this
   258         -frame, relative to the current level (0 and negative numbers).
          208  +For a frame that corresponds to a level, (to be determined).
   259    209   .PP
   260         -A thing of note is that for procedures statically defined in files the
   261         -locations of commands in their bodies will be reported with type
   262         -\fBsource\fR and absolute line numbers, and not as type
   263         -\fBproc\fR. The same is true for procedures nested in statically
   264         -defined procedures, and literal eval scripts in files or statically
   265         -defined procedures.
          210  +When a command can be traced to its literal definition in some script, e.g.
          211  +procedures nested in statically defined procedures, and literal eval scripts in
          212  +files or statically defined procedures, its type is \fBsource\fR and its
          213  +location is the absolute line number in the script.  Otherwise, its type is
          214  +\fBproc\fR and its location is its line number within the body of the
          215  +procedure.
   266    216   .PP
   267    217   In contrast, procedure definitions and \fBeval\fR within a dynamically
   268    218   \fBeval\fRuated environment count line numbers relative to the start of
   269    219   their script, even if they would be able to count relative to the
   270    220   start of the outer dynamic script. That type of number usually makes
   271    221   more sense.
   272    222   .PP
   273         -A different way of describing this behaviour is that file based
          223  +A different way of describing this behaviour is that file-based
   274    224   locations are tracked as deeply as possible, and where this is not
   275    225   possible the lines are counted based on the smallest possible
   276    226   \fBeval\fR or procedure body, as that scope is usually easier to find
   277    227   than any dynamic outer scope.
   278    228   .PP
   279    229   The syntactic form \fB{*}\fR is handled like \fBeval\fR. I.e. if it
   280    230   is given a literal list argument the system tracks the line number
   281    231   within the list words as well, and otherwise all line numbers are
   282    232   counted relative to the start of each word (smallest scope)
   283    233   .RE
   284    234   .TP
   285    235   \fBinfo functions \fR?\fIpattern\fR?
   286    236   .
   287         -If \fIpattern\fR is not specified, returns a list of all the math
          237  +If \fIpattern\fR is not given, returns a list of all the math
   288    238   functions currently defined.
   289         -If \fIpattern\fR is specified, only those functions whose name matches
   290         -\fIpattern\fR are returned.  Matching is determined using the same
   291         -rules as for \fBstring match\fR.
          239  +If \fIpattern\fR is given, returns only those names that match
          240  +\fIpattern\fR according to \fBstring match\fR.
   292    241   .TP
   293    242   \fBinfo globals \fR?\fIpattern\fR?
   294    243   .
   295         -If \fIpattern\fR is not specified, returns a list of all the names
          244  +If \fIpattern\fR is not given, returns a list of all the names
   296    245   of currently-defined global variables.
   297    246   Global variables are variables in the global namespace.
   298         -If \fIpattern\fR is specified, only those names matching \fIpattern\fR
          247  +If \fIpattern\fR is given, only those names matching \fIpattern\fR
   299    248   are returned.  Matching is determined using the same rules as for
   300    249   \fBstring match\fR.
   301    250   .TP
   302    251   \fBinfo hostname\fR
   303    252   .
   304         -Returns the name of the computer on which this invocation is being
   305         -executed.
   306         -Note that this name is not guaranteed to be the fully qualified domain
   307         -name of the host.  Where machines have several different names (as is
          253  +Returns the name of the current host.
          254  +
          255  +This name is not guaranteed to be the fully-qualified domain
          256  +name of the host.  Where machines have several different names, as is
   308    257   common on systems with both TCP/IP (DNS) and NetBIOS-based networking
   309         -installed,) it is the name that is suitable for TCP/IP networking that
          258  +installed, it is the name that is suitable for TCP/IP networking that
   310    259   is returned.
   311    260   .TP
   312         -\fBinfo level\fR ?\fInumber\fR?
          261  +\fBinfo level\fR ?\fIlevel\fR?
   313    262   .
   314         -If \fInumber\fR is not specified, this command returns a number
   315         -giving the stack level of the invoking procedure, or 0 if the
   316         -command is invoked at top-level.  If \fInumber\fR is specified,
   317         -then the result is a list consisting of the name and arguments for the
   318         -procedure call at level \fInumber\fR on the stack.  If \fInumber\fR
   319         -is positive then it selects a particular stack level (1 refers
   320         -to the top-most active procedure, 2 to the procedure it called, and
   321         -so on); otherwise it gives a level relative to the current level
   322         -(0 refers to the current procedure, -1 to its caller, and so on).
   323         -See the \fBuplevel\fR command for more information on what stack
   324         -levels mean.
          263  +If \fInumber\fR is not given, the level this routine was called from.
          264  +Otherwise returns the complete command active at the given level.  If
          265  +\fInumber\fR is greater than \fB0\fR, it is the desired level.  Otherwise, it
          266  +is \fInumber\fR levels up from the current level.  A complete command is the
          267  +words in the command, with all subsitutions performed, meaning that it is a
          268  +list.  See \fBuplevel\fR for more information on levels.
   325    269   .TP
   326    270   \fBinfo library\fR
   327    271   .
   328         -Returns the name of the library directory in which standard Tcl
   329         -scripts are stored.
   330         -This is actually the value of the \fBtcl_library\fR
   331         -variable and may be changed by setting \fBtcl_library\fR.
          272  +Returns the value of \fBtcl_library\fR, which is the name of the library
          273  +directory in which the scripts distributed with Tcl scripts are stored.
   332    274   .TP
   333    275   \fBinfo loaded \fR?\fIinterp\fR? ?\fIpackage\fR?
   334    276   .
   335         -Returns the filename loaded as part of \fIpackage\fR. If \fIpackage\fR
   336         -is not specified, returns a list describing all of the packages
   337         -that have been loaded into \fIinterp\fR with the \fBload\fR command.
   338         -Each list element is a sub-list with two elements consisting of the
   339         -name of the file from which the package was loaded and the name of
   340         -the package.
   341         -For statically-loaded packages the file name will be an empty string.
   342         -If \fIinterp\fR is omitted then information is returned for all packages
   343         -loaded in any interpreter in the process.
   344         -To get a list of just the packages in the current interpreter, specify
   345         -an empty string for the \fIinterp\fR argument.
          277  +Returns the name of each file loaded in \fIinterp\fR va \fBload\fR as part of
          278  +\fIpackage\fR .  If \fIpackage\fR is not given, returns a list where each item
          279  +is the name of the loaded file and the name of the package for which the file
          280  +was loaded.  For a statically-loaded package the name of the file is the empty
          281  +string.  For \fInterp\fR, the empty string is the current interpreter.
   346    282   .TP
   347    283   \fBinfo locals \fR?\fIpattern\fR?
   348    284   .
   349         -If \fIpattern\fR is not specified, returns a list of all the names
   350         -of currently-defined local variables, including arguments to the
   351         -current procedure, if any.
   352         -Variables defined with the \fBglobal\fR, \fBupvar\fR  and
   353         -\fBvariable\fR commands will not be returned.
   354         -If \fIpattern\fR is specified, only those names matching \fIpattern\fR
   355         -are returned.  Matching is determined using the same rules as for
   356         -\fBstring match\fR.
          285  +If \fIpattern\fR is given, returns the name of each local variable matching
          286  +\fIpattern\fR according to \fBstring match\fR.  Otherwise, returns the name of
          287  +each local variable.  A variables defined with the \fBglobal\fR, \fBupvar\fR or
          288  +\fBvariable\fR is not local.
          289  +
   357    290   .TP
   358    291   \fBinfo nameofexecutable\fR
   359    292   .
   360         -Returns the full path name of the binary file from which the application
   361         -was invoked.  If Tcl was unable to identify the file, then an empty
   362         -string is returned.
          293  +Returns the absolute pathname of the program for the current interpreter.  If
          294  +such a file can not be identified an empty string is returned.
   363    295   .TP
   364    296   \fBinfo object\fI subcommand object\fR ?\fIarg ...\fR
   365    297   .
   366         -Returns information about the object, \fIobject\fR. The \fIsubcommand\fRs are
   367         -described in \fBOBJECT INTROSPECTION\fR below.
          298  +Returns information about the object named \fIobject\fR. \fIsubcommand\fR is
          299  +described \fBOBJECT INTROSPECTION\fR below.
   368    300   .TP
   369    301   \fBinfo patchlevel\fR
   370    302   .
   371         -Returns the value of the global variable \fBtcl_patchLevel\fR, which holds
   372         -the exact version of the Tcl library by default.
          303  +Returns the value of the global variable \fBtcl_patchLevel\fR, in which the
          304  +exact version of the Tcl library initially stored.
   373    305   .TP
   374    306   \fBinfo procs \fR?\fIpattern\fR?
   375    307   .
   376         -If \fIpattern\fR is not specified, returns a list of all the
   377         -names of Tcl command procedures in the current namespace.
   378         -If \fIpattern\fR is specified,
   379         -only those procedure names in the current namespace
   380         -matching \fIpattern\fR are returned.
   381         -Matching is determined using the same rules as for
   382         -\fBstring match\fR.
   383         -If \fIpattern\fR contains any namespace separators, they are used to
   384         -select a namespace relative to the current namespace (or relative to
   385         -the global namespace if \fIpattern\fR starts with \fB::\fR) to match
   386         -within; the matching pattern is taken to be the part after the last
   387         -namespace separator.
          308  +Returns the names of all visible procedures. If \fIpattern\fR is given, returns
          309  +only those names that match according to \fBstring match\fR.  Only the final
          310  +component in \fIpattern\fR is actually considered a pattern.  Any qualifying
          311  +components simply select a namespace.  See \fBNAMESPACE RESOLUTION\fR in the
          312  +\fBnamespace\fR(n) documentation.
   388    313   .TP
   389    314   \fBinfo script\fR ?\fIfilename\fR?
   390    315   .
   391         -If a Tcl script file is currently being evaluated (i.e. there is a
   392         -call to \fBTcl_EvalFile\fR active or there is an active invocation
   393         -of the \fBsource\fR command), then this command returns the name
   394         -of the innermost file being processed.  If \fIfilename\fR is specified,
   395         -then the return value of this command will be modified for the
   396         -duration of the active invocation to return that name.  This is
   397         -useful in virtual file system applications.
   398         -Otherwise the command returns an empty string.
          316  +Returns the pathname of the innermost script currently being evaluated, or the
          317  +empty string if no pathname can be determined.  If \fIfilename\fR is given,
          318  +sets the return value of any future calls to \fBinfo script\fR for the duration
          319  +of the innermost active script.  This is useful in virtual file system
          320  +applications.
   399    321   .TP
   400    322   \fBinfo sharedlibextension\fR
   401    323   .
   402         -Returns the extension used on this platform for the names of files
   403         -containing shared libraries (for example, \fB.so\fR under Solaris).
   404         -If shared libraries are not supported on this platform then an empty
   405         -string is returned.
          324  +Returns the extension used on this platform for names of shared libraries, e.g.
          325  +\fB.so\fR under Solaris.  Returns the empty string if shared libraries are not
          326  +supported on this platform.
   406    327   .TP
   407    328   \fBinfo tclversion\fR
   408    329   .
   409         -Returns the value of the global variable \fBtcl_version\fR, which holds the
   410         -major and minor version of the Tcl library by default.
          330  +Returns the value of the global variable \fBtcl_version\fR, in which the
          331  +major and minor version of the Tcl library are stored.
   411    332   .TP
   412    333   \fBinfo vars\fR ?\fIpattern\fR?
   413    334   .
   414         -If \fIpattern\fR is not specified,
   415         -returns a list of all the names of currently-visible variables.
   416         -This includes locals and currently-visible globals.
   417         -If \fIpattern\fR is specified, only those names matching \fIpattern\fR
   418         -are returned.  Matching is determined using the same rules as for
   419         -\fBstring match\fR.
   420         -\fIpattern\fR can be a qualified name like \fBFoo::option*\fR.
   421         -That is, it may specify a particular namespace
   422         -using a sequence of namespace names separated by double colons (\fB::\fR),
   423         -and may have pattern matching special characters
   424         -at the end to specify a set of variables in that namespace.
   425         -If \fIpattern\fR is a qualified name,
   426         -the resulting list of variable names
   427         -has each matching namespace variable qualified with the name
   428         -of its namespace.
   429         -Note that a currently-visible variable may not yet
   430         -.QW exist
   431         -if it has not
   432         -been set (e.g. a variable declared but not set by \fBvariable\fR).
          335  +If \fIpattern\fR is not given, returns the names of all visible variables.  If
          336  +\fIpattern\fR is given, returns only those names that match according to
          337  +\fBstring match\fR.  Only the last component of \fIpattern\fR is a pattern.
          338  +Other components identify a namespace.  See \fBNAMESPACE RESOLUTION\fR in the
          339  +\fBnamespace\fR(n) documentation.  When \fIpattern\fR is a qualified name,
          340  +results are fully qualified.
          341  +
          342  +A variable that has declared but not yet defined is included in the results.
   433    343   .SS "CLASS INTROSPECTION"
   434    344   .PP
   435    345   The following \fIsubcommand\fR values are supported by \fBinfo class\fR:
   436    346   .TP
   437    347   \fBinfo class call\fI class method\fR
   438    348   .
   439    349   Returns a description of the method implementations that are used to provide a
................................................................................
   488    398   \fIclass\fR, not \fIclass\fR itself. The \fIkind\fR can be either
   489    399   \fB\-class\fR to return the definition namespace used for \fBoo::define\fR, or
   490    400   \fB\-instance\fR to return the definition namespace used for
   491    401   \fBoo::objdefine\fR; the \fB\-class\fR kind is default (though this is only
   492    402   actually useful on classes that are subclasses of \fBoo::class\fR).
   493    403   .RS
   494    404   .PP
   495         -If \fIclass\fR does not provide a definition namespace of the specified kind,
          405  +If \fIclass\fR does not provide a definition namespace of the given kind,
   496    406   this command returns the empty string. In those circumstances, the
   497    407   \fBoo::define\fR and \fBoo::objdefine\fR commands look up which definition
   498    408   namespace to use using the class inheritance hierarchy.
   499    409   .RE
   500    410   .VE TIP524
   501    411   .TP
   502    412   \fBinfo class destructor\fI class\fR
................................................................................
   519    429   optional \fIpattern\fR argument is present, it constrains the list of returned
   520    430   instances to those that match it according to the rules of \fBstring match\fR.
   521    431   .TP
   522    432   \fBinfo class methods\fI class\fR ?\fIoptions...\fR?
   523    433   .
   524    434   This subcommand returns a list of all public (i.e. exported) methods of the
   525    435   class called \fIclass\fR. Any of the following \fIoption\fRs may be
   526         -specified, controlling exactly which method names are returned:
          436  +given, controlling exactly which method names are returned:
   527    437   .RS
   528    438   .TP
   529    439   \fB\-all\fR
   530    440   .
   531    441   If the \fB\-all\fR flag is given,
   532    442   .VS TIP500
   533    443   and the \fB\-scope\fR flag is not given,
................................................................................
   596    506   .TP
   597    507   \fBinfo class variables\fI class\fR ?\fB\-private\fR?
   598    508   .
   599    509   This subcommand returns a list of all variables that have been declared for
   600    510   the class named \fIclass\fR (i.e. that are automatically present in the
   601    511   class's methods, constructor and destructor).
   602    512   .VS TIP500
   603         -If the \fB\-private\fR option is specified, this lists the private variables
          513  +If the \fB\-private\fR option is given, this lists the private variables
   604    514   declared instead.
   605    515   .VE TIP500
   606    516   .SS "OBJECT INTROSPECTION"
   607    517   .PP
   608    518   The following \fIsubcommand\fR values are supported by \fBinfo object\fR:
   609    519   .TP
   610    520   \fBinfo object call\fI object method\fR
................................................................................
   634    544   and the call chains that this command files do not actually contain private
   635    545   methods.
   636    546   .VE TIP500
   637    547   .RE
   638    548   .TP
   639    549   \fBinfo object class\fI object\fR ?\fIclassName\fR?
   640    550   .
   641         -If \fIclassName\fR is unspecified, this subcommand returns class of the
          551  +If \fIclassName\fR is not given, this subcommand returns class of the
   642    552   \fIobject\fR object. If \fIclassName\fR is present, this subcommand returns a
   643    553   boolean value indicating whether the \fIobject\fR is of that class.
   644    554   .TP
   645    555   \fBinfo object creationid\fI object\fR
   646    556   .VS TIP500
   647    557   Returns the unique creation identifier for the \fIobject\fR object. This
   648    558   creation identifier is unique to the object (within a Tcl interpreter) and
................................................................................
   703    613   direct or indirect).
   704    614   .RE
   705    615   .TP
   706    616   \fBinfo object methods\fI object\fR ?\fIoption...\fR?
   707    617   .
   708    618   This subcommand returns a list of all public (i.e. exported) methods of the
   709    619   object called \fIobject\fR. Any of the following \fIoption\fRs may be
   710         -specified, controlling exactly which method names are returned:
          620  +given, controlling exactly which method names are returned:
   711    621   .RS
   712    622   .TP
   713    623   \fB\-all\fR
   714    624   .
   715    625   If the \fB\-all\fR flag is given,
   716    626   .VS TIP500
   717    627   and the \fB\-scope\fR flag is not given,
................................................................................
   773    683   .TP
   774    684   \fBinfo object variables\fI object\fRR ?\fB\-private\fR?
   775    685   .
   776    686   This subcommand returns a list of all variables that have been declared for
   777    687   the object named \fIobject\fR (i.e. that are automatically present in the
   778    688   object's methods).
   779    689   .VS TIP500
   780         -If the \fB\-private\fR option is specified, this lists the private variables
          690  +If the \fB\-private\fR option is given, this lists the private variables
   781    691   declared instead.
   782    692   .VE TIP500
   783    693   .TP
   784    694   \fBinfo object vars\fI object\fR ?\fIpattern\fR?
   785    695   .
   786    696   This subcommand returns a list of all variables in the private namespace of
   787    697   the object named \fIobject\fR. If the optional \fIpattern\fR argument is

Changes to doc/mathop.n.

   147    147   Returns the result of raising each value to the power of the result of
   148    148   recursively operating on the result of processing the following arguments, so
   149    149   .QW "\fB** 2 3 4\fR"
   150    150   is the same as
   151    151   .QW "\fB** 2 [** 3 4]\fR" .
   152    152   Each \fInumber\fR may be
   153    153   any numeric value, though the second number must not be fractional if the
   154         -first is negative. If no arguments are given, the result will be one, and if
   155         -only one argument is given, the result will be that argument. The
   156         -result will have an integral value only when all arguments are
   157         -integral values.
          154  +first is negative.  The maximum exponent value that Tcl can handle if the
          155  +first number is an integer > 1 is 268435455. If no arguments are given,
          156  +the result will be one, and if only one argument is given, the result will
          157  +be that argument. The result will have an integral value only when all
          158  +arguments are integral values.
   158    159   .SS "COMPARISON OPERATORS"
   159    160   .PP
   160    161   The behaviors of the comparison operator commands (most of which operate
   161    162   preferentially on numeric arguments) are as follows:
   162    163   .TP
   163    164   \fB==\fR ?\fIarg\fR ...?
   164    165   .

Changes to doc/zipfs.n.

   106    106   \fBzipfs root\fR
   107    107   .
   108    108   Returns a constant string which indicates the mount point for zipfs volumes
   109    109   for the current platform. On Windows, this value is
   110    110   .QW \fBzipfs:/\fR .
   111    111   On Unix, this value is
   112    112   .QW \fB//zipfs:/\fR .
   113         -.RE
   114    113   .TP
   115    114   \fBzipfs unmount \fImountpoint\fR
   116    115   .
   117    116   Unmounts a previously mounted ZIP archive mounted to \fImountpoint\fR.
   118    117   .SS "ZIP CREATION COMMANDS"
   119    118   This package also provides several commands to aid the creation of ZIP
   120    119   archives as Tcl applications.
................................................................................
   180    179   .SH "EXAMPLES"
   181    180   .PP
   182    181   Mounting an ZIP archive as an application directory and running code out of it
   183    182   before unmounting it again:
   184    183   .PP
   185    184   .CS
   186    185   set zip myApp.zip
   187         -set base [file join [\fbzipfs root\fR] myApp]
          186  +set base [file join [\fBzipfs root\fR] myApp]
   188    187   
   189    188   \fBzipfs mount\fR $base $zip
   190    189   # $base now has the contents of myApp.zip
   191    190   
   192    191   source [file join $base app.tcl]
   193    192   # use the contents, load libraries from it, etc...
   194    193   
................................................................................
   209    208   Encryption can be applied to ZIP archives by providing a password when
   210    209   building the ZIP and when mounting it.
   211    210   .PP
   212    211   .CS
   213    212   set zip myApp.zip
   214    213   set sourceDir [file normalize myApp]
   215    214   set password "hunter2"
   216         -set base [file join [\fbzipfs root\fR] myApp]
          215  +set base [file join [\fBzipfs root\fR] myApp]
   217    216   
   218    217   # Create with password
   219    218   \fBzipfs mkzip\fR $targetZip $sourceDir $sourceDir $password
   220    219   
   221    220   # Mount with password
   222    221   \fBzipfs mount\fR $base $zip $password
   223    222   .CE

Changes to generic/regc_locale.c.

   678    678       {0x2b76, 0x2b95}, {0x2b98, 0x2c2e}, {0x2c30, 0x2c5e}, {0x2c60, 0x2cf3},
   679    679       {0x2cf9, 0x2d25}, {0x2d30, 0x2d67}, {0x2d7f, 0x2d96}, {0x2da0, 0x2da6},
   680    680       {0x2da8, 0x2dae}, {0x2db0, 0x2db6}, {0x2db8, 0x2dbe}, {0x2dc0, 0x2dc6},
   681    681       {0x2dc8, 0x2dce}, {0x2dd0, 0x2dd6}, {0x2dd8, 0x2dde}, {0x2de0, 0x2e4f},
   682    682       {0x2e80, 0x2e99}, {0x2e9b, 0x2ef3}, {0x2f00, 0x2fd5}, {0x2ff0, 0x2ffb},
   683    683       {0x3001, 0x303f}, {0x3041, 0x3096}, {0x3099, 0x30ff}, {0x3105, 0x312f},
   684    684       {0x3131, 0x318e}, {0x3190, 0x31ba}, {0x31c0, 0x31e3}, {0x31f0, 0x321e},
   685         -    {0x3220, 0x32fe}, {0x3300, 0x4db5}, {0x4dc0, 0x9fef}, {0xa000, 0xa48c},
   686         -    {0xa490, 0xa4c6}, {0xa4d0, 0xa62b}, {0xa640, 0xa6f7}, {0xa700, 0xa7bf},
   687         -    {0xa7c2, 0xa7c6}, {0xa7f7, 0xa82b}, {0xa830, 0xa839}, {0xa840, 0xa877},
   688         -    {0xa880, 0xa8c5}, {0xa8ce, 0xa8d9}, {0xa8e0, 0xa953}, {0xa95f, 0xa97c},
   689         -    {0xa980, 0xa9cd}, {0xa9cf, 0xa9d9}, {0xa9de, 0xa9fe}, {0xaa00, 0xaa36},
   690         -    {0xaa40, 0xaa4d}, {0xaa50, 0xaa59}, {0xaa5c, 0xaac2}, {0xaadb, 0xaaf6},
   691         -    {0xab01, 0xab06}, {0xab09, 0xab0e}, {0xab11, 0xab16}, {0xab20, 0xab26},
   692         -    {0xab28, 0xab2e}, {0xab30, 0xab67}, {0xab70, 0xabed}, {0xabf0, 0xabf9},
   693         -    {0xac00, 0xd7a3}, {0xd7b0, 0xd7c6}, {0xd7cb, 0xd7fb}, {0xf900, 0xfa6d},
   694         -    {0xfa70, 0xfad9}, {0xfb00, 0xfb06}, {0xfb13, 0xfb17}, {0xfb1d, 0xfb36},
   695         -    {0xfb38, 0xfb3c}, {0xfb46, 0xfbc1}, {0xfbd3, 0xfd3f}, {0xfd50, 0xfd8f},
   696         -    {0xfd92, 0xfdc7}, {0xfdf0, 0xfdfd}, {0xfe00, 0xfe19}, {0xfe20, 0xfe52},
   697         -    {0xfe54, 0xfe66}, {0xfe68, 0xfe6b}, {0xfe70, 0xfe74}, {0xfe76, 0xfefc},
   698         -    {0xff01, 0xffbe}, {0xffc2, 0xffc7}, {0xffca, 0xffcf}, {0xffd2, 0xffd7},
   699         -    {0xffda, 0xffdc}, {0xffe0, 0xffe6}, {0xffe8, 0xffee}
          685  +    {0x3220, 0x4db5}, {0x4dc0, 0x9fef}, {0xa000, 0xa48c}, {0xa490, 0xa4c6},
          686  +    {0xa4d0, 0xa62b}, {0xa640, 0xa6f7}, {0xa700, 0xa7bf}, {0xa7c2, 0xa7c6},
          687  +    {0xa7f7, 0xa82b}, {0xa830, 0xa839}, {0xa840, 0xa877}, {0xa880, 0xa8c5},
          688  +    {0xa8ce, 0xa8d9}, {0xa8e0, 0xa953}, {0xa95f, 0xa97c}, {0xa980, 0xa9cd},
          689  +    {0xa9cf, 0xa9d9}, {0xa9de, 0xa9fe}, {0xaa00, 0xaa36}, {0xaa40, 0xaa4d},
          690  +    {0xaa50, 0xaa59}, {0xaa5c, 0xaac2}, {0xaadb, 0xaaf6}, {0xab01, 0xab06},
          691  +    {0xab09, 0xab0e}, {0xab11, 0xab16}, {0xab20, 0xab26}, {0xab28, 0xab2e},
          692  +    {0xab30, 0xab67}, {0xab70, 0xabed}, {0xabf0, 0xabf9}, {0xac00, 0xd7a3},
          693  +    {0xd7b0, 0xd7c6}, {0xd7cb, 0xd7fb}, {0xf900, 0xfa6d}, {0xfa70, 0xfad9},
          694  +    {0xfb00, 0xfb06}, {0xfb13, 0xfb17}, {0xfb1d, 0xfb36}, {0xfb38, 0xfb3c},
          695  +    {0xfb46, 0xfbc1}, {0xfbd3, 0xfd3f}, {0xfd50, 0xfd8f}, {0xfd92, 0xfdc7},
          696  +    {0xfdf0, 0xfdfd}, {0xfe00, 0xfe19}, {0xfe20, 0xfe52}, {0xfe54, 0xfe66},
          697  +    {0xfe68, 0xfe6b}, {0xfe70, 0xfe74}, {0xfe76, 0xfefc}, {0xff01, 0xffbe},
          698  +    {0xffc2, 0xffc7}, {0xffca, 0xffcf}, {0xffd2, 0xffd7}, {0xffda, 0xffdc},
          699  +    {0xffe0, 0xffe6}, {0xffe8, 0xffee}
   700    700   #if CHRBITS > 16
   701    701       ,{0x10000, 0x1000b}, {0x1000d, 0x10026}, {0x10028, 0x1003a}, {0x1003f, 0x1004d},
   702    702       {0x10050, 0x1005d}, {0x10080, 0x100fa}, {0x10100, 0x10102}, {0x10107, 0x10133},
   703    703       {0x10137, 0x1018e}, {0x10190, 0x1019b}, {0x101d0, 0x101fd}, {0x10280, 0x1029c},
   704    704       {0x102a0, 0x102d0}, {0x102e0, 0x102fb}, {0x10300, 0x10323}, {0x1032d, 0x1034a},
   705    705       {0x10350, 0x1037a}, {0x10380, 0x1039d}, {0x1039f, 0x103c3}, {0x103c8, 0x103d5},
   706    706       {0x10400, 0x1049d}, {0x104a0, 0x104a9}, {0x104b0, 0x104d3}, {0x104d8, 0x104fb},

Changes to generic/tcl.decls.

   885    885       void Tcl_SplitPath(const char *path, int *argcPtr, const char ***argvPtr)
   886    886   }
   887    887   # Removed in 9.0 (stub entry only)
   888    888   #declare 244  {
   889    889   #    void Tcl_StaticPackage(Tcl_Interp *interp, const char *pkgName,
   890    890   #	    Tcl_PackageInitProc *initProc, Tcl_PackageInitProc *safeInitProc)
   891    891   #}
   892         -declare 245 {
   893         -    int Tcl_StringMatch(const char *str, const char *pattern)
   894         -}
          892  +# Removed in 9.0 (stub entry only)
          893  +#declare 245 {
          894  +#    int Tcl_StringMatch(const char *str, const char *pattern)
          895  +#}
   895    896   # Removed in 9.0:
   896    897   #declare 246 {
   897    898   #    int Tcl_TellOld(Tcl_Channel chan)
   898    899   #}
   899    900   # Removed in 9.0, replaced by macro.
   900    901   #declare 247 {deprecated {No longer in use, changed to macro}} {
   901    902   #    int Tcl_TraceVar(Tcl_Interp *interp, const char *varName, int flags,

Changes to generic/tclAssembly.c.

  1061   1061   		parsePtr->commandStart - envPtr->source);
  1062   1062   
  1063   1063   	/*
  1064   1064   	 * Process the line of code.
  1065   1065   	 */
  1066   1066   
  1067   1067   	if (parsePtr->numWords > 0) {
  1068         -	    int instLen = parsePtr->commandSize;
         1068  +	    size_t instLen = parsePtr->commandSize;
  1069   1069   		    /* Length in bytes of the current command */
  1070   1070   
  1071   1071   	    if (parsePtr->term == parsePtr->commandStart + instLen - 1) {
  1072   1072   		--instLen;
  1073   1073   	    }
  1074   1074   
  1075   1075   	    /*

Changes to generic/tclBasic.c.

  2440   2440    * Results:
  2441   2441    *	The return value is a token for the command, which can be used in
  2442   2442    *	future calls to Tcl_GetCommandName.
  2443   2443    *
  2444   2444    * Side effects:
  2445   2445    *	If a command named "cmdName" already exists for interp, it is
  2446   2446    *	first deleted.  Then the new command is created from the arguments.
  2447         - *	[***] (See below for exception).
  2448   2447    *
  2449   2448    *	In the future, during bytecode evaluation when "cmdName" is seen as
  2450   2449    *	the name of a command by Tcl_EvalObj or Tcl_Eval, the object-based
  2451   2450    *	Tcl_ObjCmdProc proc will be called. When the command is deleted from
  2452   2451    *	the table, deleteProc will be called. See the manual entry for details
  2453   2452    *	on the calling sequence.
  2454   2453    *
................................................................................
  2549   2548   	/*
  2550   2549            * An existing command conflicts. Try to delete it.
  2551   2550            */
  2552   2551   
  2553   2552   	cmdPtr = Tcl_GetHashValue(hPtr);
  2554   2553   
  2555   2554   	/*
  2556         -	 * [***] This is wrong. See Tcl Bug a16752c252. However, this buggy
  2557         -	 * behavior is kept under particular circumstances to accommodate
  2558         -	 * deployed binaries of the "tclcompiler" program
  2559         -	 *     http://sourceforge.net/projects/tclpro/
  2560         -         * that crash if the bug is fixed.
  2561         -	 */
  2562         -
  2563         -	if (cmdPtr->objProc == TclInvokeStringCommand
  2564         -		&& cmdPtr->clientData == clientData
  2565         -		&& cmdPtr->deleteData == clientData
  2566         -		&& cmdPtr->deleteProc == deleteProc) {
  2567         -	    cmdPtr->objProc = proc;
  2568         -	    cmdPtr->objClientData = clientData;
  2569         -	    return (Tcl_Command) cmdPtr;
  2570         -	}
  2571         -
  2572         -	/*
  2573         -	 * Otherwise, we delete the old command. Be careful to preserve any
         2555  +	 * Command already exists; delete it. Be careful to preserve any
  2574   2556   	 * existing import links so we can restore them down below. That way,
  2575   2557   	 * you can redefine a command and its import status will remain
  2576   2558   	 * intact.
  2577   2559   	 */
  2578   2560   
  2579   2561   	cmdPtr->refCount++;
  2580   2562   	if (cmdPtr->importRefPtr) {
................................................................................
  4850   4832   {
  4851   4833       Interp *iPtr = (Interp *) interp;
  4852   4834       const char *p, *next;
  4853   4835       const unsigned int minObjs = 20;
  4854   4836       Tcl_Obj **objv, **objvSpace;
  4855   4837       int *expand, *lines, *lineSpace;
  4856   4838       Tcl_Token *tokenPtr;
  4857         -    int commandLength, bytesLeft, expandRequested, code = TCL_OK;
         4839  +    int bytesLeft, expandRequested, code = TCL_OK;
         4840  +    size_t commandLength;
  4858   4841       CallFrame *savedVarFramePtr;/* Saves old copy of iPtr->varFramePtr in case
  4859   4842   				 * TCL_EVAL_GLOBAL was set. */
  4860   4843       int allowExceptions = (iPtr->evalFlags & TCL_ALLOW_EXCEPTIONS);
  4861   4844       int gotParse = 0;
  4862   4845       unsigned int i, objectsUsed = 0;
  4863   4846   				/* These variables keep track of how much
  4864   4847   				 * state has been allocated while evaluating

Changes to generic/tclCmdAH.c.

   796    796   int
   797    797   Tcl_ExitObjCmd(
   798    798       ClientData dummy,		/* Not used. */
   799    799       Tcl_Interp *interp,		/* Current interpreter. */
   800    800       int objc,			/* Number of arguments. */
   801    801       Tcl_Obj *const objv[])	/* Argument objects. */
   802    802   {
   803         -    int value;
          803  +    Tcl_WideInt value;
   804    804   
   805    805       if ((objc != 1) && (objc != 2)) {
   806    806   	Tcl_WrongNumArgs(interp, 1, objv, "?returnCode?");
   807    807   	return TCL_ERROR;
   808    808       }
   809    809   
   810    810       if (objc == 1) {
   811    811   	value = 0;
   812         -    } else if (Tcl_GetIntFromObj(interp, objv[1], &value) != TCL_OK) {
          812  +    } else if (TclGetWideBitsFromObj(interp, objv[1], &value) != TCL_OK) {
   813    813   	return TCL_ERROR;
   814    814       }
   815         -    Tcl_Exit(value);
          815  +    Tcl_Exit((int)value);
   816    816       /*NOTREACHED*/
   817    817       return TCL_OK;		/* Better not ever reach this! */
   818    818   }
   819    819   
   820    820   /*
   821    821    *----------------------------------------------------------------------
   822    822    *

Changes to generic/tclCmdMZ.c.

  1443   1443   	 */
  1444   1444   
  1445   1445   	if (TclIsPureByteArray(objv[1])) {
  1446   1446   	    unsigned char uch = (unsigned char) ch;
  1447   1447   
  1448   1448   	    Tcl_SetObjResult(interp, Tcl_NewByteArrayObj(&uch, 1));
  1449   1449   	} else {
  1450         -	    char buf[TCL_UTF_MAX] = "";
         1450  +	    char buf[4] = "";
  1451   1451   
  1452   1452   	    end = Tcl_UniCharToUtf(ch, buf);
  1453   1453   	    if ((ch >= 0xD800) && (end < 3)) {
  1454   1454   		end += Tcl_UniCharToUtf(-1, buf + end);
  1455   1455   	    }
  1456   1456   	    Tcl_SetObjResult(interp, Tcl_NewStringObj(buf, end));
  1457   1457   	}
................................................................................
  4380   4380   
  4381   4381   	middle -= start;		     /* execution time in microsecs */
  4382   4382   
  4383   4383       #ifdef TCL_WIDE_CLICKS
  4384   4384   	/* convert execution time in wide clicks to microsecs */
  4385   4385   	middle *= TclpWideClickInMicrosec();
  4386   4386       #endif
         4387  +
         4388  +	if (!count) { /* no iterations - avoid divide by zero */
         4389  +	    objs[0] = objs[2] = objs[4] = Tcl_NewWideIntObj(0);
         4390  +	    goto retRes;
         4391  +	}
  4387   4392   
  4388   4393   	/* if not calibrate */
  4389   4394   	if (!calibrate) {
  4390   4395   	    /* minimize influence of measurement overhead */
  4391   4396   	    if (overhead > 0) {
  4392   4397   		/* estimate the time of overhead (microsecs) */
  4393   4398   		Tcl_WideUInt curOverhead = overhead * count;
................................................................................
  4433   4438   	    } else {
  4434   4439   		objs[4] = Tcl_NewWideIntObj(val);
  4435   4440   	    }
  4436   4441   	} else {
  4437   4442   	    objs[4] = Tcl_NewWideIntObj((count / middle) * 1000000);
  4438   4443   	}
  4439   4444   
         4445  +    retRes:
  4440   4446   	/* estimated net execution time (in millisecs) */
  4441   4447   	if (!calibrate) {
  4442         -	    objs[6] = Tcl_ObjPrintf("%.3f", (double)middle / 1000);
         4448  +	    if (middle >= 1) {
         4449  +		objs[6] = Tcl_ObjPrintf("%.3f", (double)middle / 1000);
         4450  +	    } else {
         4451  +		objs[6] = Tcl_NewWideIntObj(0);
         4452  +	    }
  4443   4453   	    TclNewLiteralStringObj(objs[7], "nett-ms");
  4444   4454   	}
  4445   4455   
  4446   4456   	/*
  4447   4457   	* Construct the result as a list because many programs have always parsed
  4448   4458   	* as such (extracting the first element, typically).
  4449   4459   	*/

Changes to generic/tclCompCmdsSZ.c.

  1501   1501   	count++;
  1502   1502       }
  1503   1503   
  1504   1504       for (endTokenPtr = tokenPtr + parse.numTokens;
  1505   1505   	    tokenPtr < endTokenPtr; tokenPtr = TokenAfter(tokenPtr)) {
  1506   1506   	size_t length;
  1507   1507   	int literal, catchRange, breakJump;
  1508         -	char buf[TCL_UTF_MAX] = "";
         1508  +	char buf[4] = "";
  1509   1509   	JumpFixup startFixup, okFixup, returnFixup, breakFixup;
  1510   1510   	JumpFixup continueFixup, otherFixup, endFixup;
  1511   1511   
  1512   1512   	switch (tokenPtr->type) {
  1513   1513   	case TCL_TOKEN_TEXT:
  1514   1514   	    literal = TclRegisterLiteral(envPtr,
  1515   1515   		    tokenPtr->start, tokenPtr->size, 0);

Changes to generic/tclCompExpr.c.

  2062   2062        */
  2063   2063   
  2064   2064       if (!TclIsBareword(*start) || *start == '_') {
  2065   2065   	size_t scanned;
  2066   2066   	if (Tcl_UtfCharComplete(start, numBytes)) {
  2067   2067   	    scanned = TclUtfToUniChar(start, &ch);
  2068   2068   	} else {
  2069         -	    char utfBytes[TCL_UTF_MAX];
         2069  +	    char utfBytes[4];
  2070   2070   
  2071   2071   	    memcpy(utfBytes, start, numBytes);
  2072   2072   	    utfBytes[numBytes] = '\0';
  2073   2073   	    scanned = TclUtfToUniChar(utfBytes, &ch);
  2074   2074   	}
  2075   2075   	*lexemePtr = INVALID;
  2076   2076   	Tcl_DecrRefCount(literal);

Changes to generic/tclCompile.c.

   673    673   static void		StartExpanding(CompileEnv *envPtr);
   674    674   
   675    675   /*
   676    676    * TIP #280: Helper for building the per-word line information of all compiled
   677    677    * commands.
   678    678    */
   679    679   static void		EnterCmdWordData(ExtCmdLoc *eclPtr, int srcOffset,
   680         -			    Tcl_Token *tokenPtr, const char *cmd, int len,
   681         -			    int numWords, int line, int *clNext, int **lines,
          680  +			    Tcl_Token *tokenPtr, const char *cmd,
          681  +			    size_t numWords, int line, int *clNext, int **lines,
   682    682   			    CompileEnv *envPtr);
   683    683   static void		ReleaseCmdWordData(ExtCmdLoc *eclPtr);
   684    684   
   685    685   /*
   686    686    * The structure below defines the bytecode Tcl object type by means of
   687    687    * procedures that can be invoked by generic object code.
   688    688    */
................................................................................
  1721   1721   	    if (tempPtr != NULL) {
  1722   1722   		Tcl_AppendToObj(tempPtr, tokenPtr->start, tokenPtr->size);
  1723   1723   	    }
  1724   1724   	    break;
  1725   1725   
  1726   1726   	case TCL_TOKEN_BS:
  1727   1727   	    if (tempPtr != NULL) {
  1728         -		char utfBuf[TCL_UTF_MAX] = "";
         1728  +		char utfBuf[4] = "";
  1729   1729   		size_t length = TclParseBackslash(tokenPtr->start,
  1730   1730   			tokenPtr->size, NULL, utfBuf);
  1731   1731   
  1732   1732   		Tcl_AppendToObj(tempPtr, utfBuf, length);
  1733   1733   	    }
  1734   1734   	    break;
  1735   1735   
................................................................................
  1765   1765    *
  1766   1766    *----------------------------------------------------------------------
  1767   1767    */
  1768   1768   
  1769   1769   static int
  1770   1770   ExpandRequested(
  1771   1771       Tcl_Token *tokenPtr,
  1772         -    int numWords)
         1772  +    size_t numWords)
  1773   1773   {
  1774   1774       /* Determine whether any words of the command require expansion */
  1775   1775       while (numWords--) {
  1776   1776   	if (tokenPtr->type == TCL_TOKEN_EXPAND_WORD) {
  1777   1777   	    return 1;
  1778   1778   	}
  1779   1779   	tokenPtr = TokenAfter(tokenPtr);
................................................................................
  1807   1807   }
  1808   1808   
  1809   1809   void
  1810   1810   TclCompileInvocation(
  1811   1811       Tcl_Interp *interp,
  1812   1812       Tcl_Token *tokenPtr,
  1813   1813       Tcl_Obj *cmdObj,
  1814         -    int numWords,
         1814  +    size_t numWords,
  1815   1815       CompileEnv *envPtr)
  1816   1816   {
  1817         -    int wordIdx = 0, depth = TclGetStackDepth(envPtr);
         1817  +    size_t wordIdx = 0;
         1818  +    int depth = TclGetStackDepth(envPtr);
  1818   1819       DefineLineInformation;
  1819   1820   
  1820   1821       if (cmdObj) {
  1821   1822   	CompileCmdLiteral(interp, cmdObj, envPtr);
  1822   1823   	wordIdx = 1;
  1823   1824   	tokenPtr = TokenAfter(tokenPtr);
  1824   1825       }
................................................................................
  2025   2026        * The map first contain full per-word line information for use by the
  2026   2027        * compiler. This is later replaced by a reduced form which signals
  2027   2028        * non-literal words, stored in 'wlines'.
  2028   2029        */
  2029   2030   
  2030   2031       EnterCmdWordData(eclPtr, parsePtr->commandStart - envPtr->source,
  2031   2032   	    parsePtr->tokenPtr, parsePtr->commandStart,
  2032         -	    parsePtr->commandSize, parsePtr->numWords, cmdLine,
         2033  +	    parsePtr->numWords, cmdLine,
  2033   2034   	    clNext, &wlines, envPtr);
  2034   2035       wlineat = eclPtr->nuloc - 1;
  2035   2036   
  2036   2037       envPtr->line = eclPtr->loc[wlineat].line[0];
  2037   2038       envPtr->clNext = eclPtr->loc[wlineat].next[0];
  2038   2039   
  2039   2040       /* Do we know the command word? */
................................................................................
  2335   2336   				 * compile. */
  2336   2337       int count,			/* Number of tokens to consider at tokenPtr.
  2337   2338   				 * Must be at least 1. */
  2338   2339       CompileEnv *envPtr)		/* Holds the resulting instructions. */
  2339   2340   {
  2340   2341       Tcl_DString textBuffer;	/* Holds concatenated chars from adjacent
  2341   2342   				 * TCL_TOKEN_TEXT, TCL_TOKEN_BS tokens. */
  2342         -    char buffer[TCL_UTF_MAX] = "";
         2343  +    char buffer[4] = "";
  2343   2344       int i, numObjsToConcat, adjust;
  2344   2345       size_t length;
  2345   2346       unsigned char *entryCodeNext = envPtr->codeNext;
  2346   2347   #define NUM_STATIC_POS 20
  2347   2348       int isLiteral, maxNumCL, numCL;
  2348   2349       int *clPosition = NULL;
  2349   2350       int depth = TclGetStackDepth(envPtr);
................................................................................
  3234   3235   EnterCmdWordData(
  3235   3236       ExtCmdLoc *eclPtr,		/* Points to the map environment structure in
  3236   3237   				 * which to enter command location
  3237   3238   				 * information. */
  3238   3239       int srcOffset,		/* Offset of first char of the command. */
  3239   3240       Tcl_Token *tokenPtr,
  3240   3241       const char *cmd,
  3241         -    int len,
  3242         -    int numWords,
         3242  +    size_t numWords,
  3243   3243       int line,
  3244   3244       int *clNext,
  3245   3245       int **wlines,
  3246   3246       CompileEnv *envPtr)
  3247   3247   {
  3248   3248       ECL *ePtr;
  3249   3249       const char *last;
  3250         -    int wordIdx, wordLine, *wwlines, *wordNext;
         3250  +    size_t wordIdx;
         3251  +    int wordLine, *wwlines, *wordNext;
  3251   3252   
  3252   3253       if (eclPtr->nuloc >= eclPtr->nloc) {
  3253   3254   	/*
  3254   3255   	 * Expand the ECL array by allocating more storage from the heap. The
  3255   3256   	 * currently allocated ECL entries are stored from eclPtr->loc[0] up
  3256   3257   	 * to eclPtr->loc[eclPtr->nuloc-1] (inclusive).
  3257   3258   	 */

Changes to generic/tclCompile.h.

  1073   1073   			    CompileEnv *envPtr);
  1074   1074   MODULE_SCOPE void	TclCompileExpr(Tcl_Interp *interp, const char *script,
  1075   1075   			    size_t numBytes, CompileEnv *envPtr, int optimize);
  1076   1076   MODULE_SCOPE void	TclCompileExprWords(Tcl_Interp *interp,
  1077   1077   			    Tcl_Token *tokenPtr, int numWords,
  1078   1078   			    CompileEnv *envPtr);
  1079   1079   MODULE_SCOPE void	TclCompileInvocation(Tcl_Interp *interp,
  1080         -			    Tcl_Token *tokenPtr, Tcl_Obj *cmdObj, int numWords,
         1080  +			    Tcl_Token *tokenPtr, Tcl_Obj *cmdObj, size_t numWords,
  1081   1081   			    CompileEnv *envPtr);
  1082   1082   MODULE_SCOPE void	TclCompileScript(Tcl_Interp *interp,
  1083   1083   			    const char *script, size_t numBytes,
  1084   1084   			    CompileEnv *envPtr);
  1085   1085   MODULE_SCOPE void	TclCompileSyntaxError(Tcl_Interp *interp,
  1086   1086   			    CompileEnv *envPtr);
  1087   1087   MODULE_SCOPE void	TclCompileTokens(Tcl_Interp *interp,

Changes to generic/tclDecls.h.

   685    685   EXTERN int		Tcl_SplitList(Tcl_Interp *interp,
   686    686   				const char *listStr, int *argcPtr,
   687    687   				const char ***argvPtr);
   688    688   /* 243 */
   689    689   EXTERN void		Tcl_SplitPath(const char *path, int *argcPtr,
   690    690   				const char ***argvPtr);
   691    691   /* Slot 244 is reserved */
   692         -/* 245 */
   693         -EXTERN int		Tcl_StringMatch(const char *str, const char *pattern);
          692  +/* Slot 245 is reserved */
   694    693   /* Slot 246 is reserved */
   695    694   /* Slot 247 is reserved */
   696    695   /* 248 */
   697    696   EXTERN int		Tcl_TraceVar2(Tcl_Interp *interp, const char *part1,
   698    697   				const char *part2, int flags,
   699    698   				Tcl_VarTraceProc *proc, void *clientData);
   700    699   /* 249 */
................................................................................
  2027   2026       const char * (*tcl_SetVar2) (Tcl_Interp *interp, const char *part1, const char *part2, const char *newValue, int flags); /* 238 */
  2028   2027       const char * (*tcl_SignalId) (int sig); /* 239 */
  2029   2028       const char * (*tcl_SignalMsg) (int sig); /* 240 */
  2030   2029       void (*tcl_SourceRCFile) (Tcl_Interp *interp); /* 241 */
  2031   2030       int (*tcl_SplitList) (Tcl_Interp *interp, const char *listStr, int *argcPtr, const char ***argvPtr); /* 242 */
  2032   2031       void (*tcl_SplitPath) (const char *path, int *argcPtr, const char ***argvPtr); /* 243 */
  2033   2032       void (*reserved244)(void);
  2034         -    int (*tcl_StringMatch) (const char *str, const char *pattern); /* 245 */
         2033  +    void (*reserved245)(void);
  2035   2034       void (*reserved246)(void);
  2036   2035       void (*reserved247)(void);
  2037   2036       int (*tcl_TraceVar2) (Tcl_Interp *interp, const char *part1, const char *part2, int flags, Tcl_VarTraceProc *proc, void *clientData); /* 248 */
  2038   2037       char * (*tcl_TranslateFileName) (Tcl_Interp *interp, const char *name, Tcl_DString *bufferPtr); /* 249 */
  2039   2038       size_t (*tcl_Ungets) (Tcl_Channel chan, const char *str, size_t len, int atHead); /* 250 */
  2040   2039       void (*tcl_UnlinkVar) (Tcl_Interp *interp, const char *varName); /* 251 */
  2041   2040       int (*tcl_UnregisterChannel) (Tcl_Interp *interp, Tcl_Channel chan); /* 252 */
................................................................................
  2921   2920   #define Tcl_SourceRCFile \
  2922   2921   	(tclStubsPtr->tcl_SourceRCFile) /* 241 */
  2923   2922   #define Tcl_SplitList \
  2924   2923   	(tclStubsPtr->tcl_SplitList) /* 242 */
  2925   2924   #define Tcl_SplitPath \
  2926   2925   	(tclStubsPtr->tcl_SplitPath) /* 243 */
  2927   2926   /* Slot 244 is reserved */
  2928         -#define Tcl_StringMatch \
  2929         -	(tclStubsPtr->tcl_StringMatch) /* 245 */
         2927  +/* Slot 245 is reserved */
  2930   2928   /* Slot 246 is reserved */
  2931   2929   /* Slot 247 is reserved */
  2932   2930   #define Tcl_TraceVar2 \
  2933   2931   	(tclStubsPtr->tcl_TraceVar2) /* 248 */
  2934   2932   #define Tcl_TranslateFileName \
  2935   2933   	(tclStubsPtr->tcl_TranslateFileName) /* 249 */
  2936   2934   #define Tcl_Ungets \
................................................................................
  3840   3838   #define Tcl_NewLongObj(value) Tcl_NewWideIntObj((long)(value))
  3841   3839   #define Tcl_NewIntObj(value) Tcl_NewWideIntObj((int)(value))
  3842   3840   #define Tcl_DbNewLongObj(value, file, line) Tcl_DbNewWideIntObj((long)(value), file, line)
  3843   3841   #define Tcl_SetIntObj(objPtr, value)	Tcl_SetWideIntObj((objPtr), (int)(value))
  3844   3842   #define Tcl_SetLongObj(objPtr, value)	Tcl_SetWideIntObj((objPtr), (long)(value))
  3845   3843   #define Tcl_GetUnicode(objPtr)	Tcl_GetUnicodeFromObj((objPtr), NULL)
  3846   3844   #define Tcl_BackgroundError(interp)	Tcl_BackgroundException((interp), TCL_ERROR)
         3845  +#define Tcl_StringMatch(str, pattern) Tcl_StringCaseMatch((str), (pattern), 0)
  3847   3846   
  3848   3847   /*
  3849   3848    * Deprecated Tcl procedures:
  3850   3849    */
  3851   3850   
  3852   3851   #define Tcl_EvalObj(interp, objPtr) \
  3853   3852       Tcl_EvalObjEx(interp, objPtr, 0)

Changes to generic/tclExecute.c.

  5002   5002   	} else if (TclIsPureByteArray(valuePtr)) {
  5003   5003   	    objResultPtr = Tcl_NewByteArrayObj(
  5004   5004   		    Tcl_GetByteArrayFromObj(valuePtr, NULL)+index, 1);
  5005   5005   	} else if (valuePtr->bytes && slength == valuePtr->length) {
  5006   5006   	    objResultPtr = Tcl_NewStringObj((const char *)
  5007   5007   		    valuePtr->bytes+index, 1);
  5008   5008   	} else {
  5009         -	    char buf[TCL_UTF_MAX] = "";
         5009  +	    char buf[4] = "";
  5010   5010   	    int ch = Tcl_GetUniChar(valuePtr, index);
  5011   5011   
  5012   5012   	    /*
  5013   5013   	     * This could be: Tcl_NewUnicodeObj((const Tcl_UniChar *)&ch, 1)
  5014   5014   	     * but creating the object as a string seems to be faster in
  5015   5015   	     * practical use.
  5016   5016   	     */
................................................................................
  8026   8026   		wResult = oddExponent ? -Exp64Value[base] : Exp64Value[base];
  8027   8027   		WIDE_RESULT(wResult);
  8028   8028   	    }
  8029   8029   	}
  8030   8030   
  8031   8031       overflowExpon:
  8032   8032   	Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2);
  8033         -	if (big2.used > 1) {
         8033  +	if ((big2.used > 1)
         8034  +#if DIGIT_BIT > 28
         8035  +		|| ((big2.used == 1) && (big2.dp[0] >= (1<<28)))
         8036  +#endif
         8037  +	) {
  8034   8038   	    mp_clear(&big2);
  8035   8039   	    Tcl_SetObjResult(interp, Tcl_NewStringObj(
  8036   8040   		    "exponent too large", -1));
  8037   8041   	    return GENERAL_ARITHMETIC_ERROR;
  8038   8042   	}
  8039   8043   	Tcl_TakeBignumFromObj(NULL, valuePtr, &big1);
  8040   8044   	mp_init(&bigResult);

Changes to generic/tclIO.c.

  6224   6224   		{
  6225   6225   		    /*
  6226   6226   		     * There are chars leading the buffer before the eof char.
  6227   6227   		     * Adjust the dstLimit so we go back and read only those
  6228   6228   		     * and do not encounter the eof char this time.
  6229   6229   		     */
  6230   6230   
  6231         -		    dstLimit = dstRead - 1 + TCL_UTF_MAX;
         6231  +		    dstLimit = dstRead + (TCL_UTF_MAX - 1);
  6232   6232   		    statePtr->flags = savedFlags;
  6233   6233   		    statePtr->inputEncodingFlags = savedIEFlags;
  6234   6234   		    statePtr->inputEncodingState = savedState;
  6235   6235   		    continue;
  6236   6236   		}
  6237   6237   	    }
  6238   6238   
................................................................................
  6249   6249   		/*
  6250   6250   		 * There are chars we can read before we hit the bare CR.  Go
  6251   6251   		 * back with a smaller dstLimit so we get them in the next
  6252   6252   		 * pass, compute a matching srcRead, and don't end up back
  6253   6253   		 * here in this call.
  6254   6254   		 */
  6255   6255   
  6256         -		dstLimit = dstRead - 1 + TCL_UTF_MAX;
         6256  +		dstLimit = dstRead + (TCL_UTF_MAX - 1);
  6257   6257   		statePtr->flags = savedFlags;
  6258   6258   		statePtr->inputEncodingFlags = savedIEFlags;
  6259   6259   		statePtr->inputEncodingState = savedState;
  6260   6260   		continue;
  6261   6261   	    }
  6262   6262   
  6263   6263   	    assert(dstWrote == 0);
................................................................................
  6342   6342   	     * TODO: This cannot happen anymore.
  6343   6343   	     *
  6344   6344   	     * We read more chars than allowed.  Reset limits to prevent that
  6345   6345   	     * and try again.  Don't forget the extra padding of TCL_UTF_MAX
  6346   6346   	     * bytes demanded by the Tcl_ExternalToUtf() call!
  6347   6347   	     */
  6348   6348   
  6349         -	    dstLimit = Tcl_UtfAtIndex(dst, charsToRead) - 1 + TCL_UTF_MAX - dst;
         6349  +	    dstLimit = Tcl_UtfAtIndex(dst, charsToRead) - dst + (TCL_UTF_MAX - 1);
  6350   6350   	    statePtr->flags = savedFlags;
  6351   6351   	    statePtr->inputEncodingFlags = savedIEFlags;
  6352   6352   	    statePtr->inputEncodingState = savedState;
  6353   6353   	    continue;
  6354   6354   	}
  6355   6355   
  6356   6356   	if (dstWrote == 0) {

Changes to generic/tclParse.c.

   788    788   				 * written. At most TCL_UTF_MAX bytes will be
   789    789   				 * written there. */
   790    790   {
   791    791       register const char *p = src+1;
   792    792       Tcl_UniChar unichar = 0;
   793    793       int result;
   794    794       size_t count;
   795         -    char buf[TCL_UTF_MAX] = "";
          795  +    char buf[4] = "";
   796    796   
   797    797       if (numBytes == 0) {
   798    798   	if (readPtr != NULL) {
   799    799   	    *readPtr = 0;
   800    800   	}
   801    801   	return 0;
   802    802       }
................................................................................
  2149   2149   
  2150   2150       adjust = 0;
  2151   2151       result = NULL;
  2152   2152       for (; count>0 && code==TCL_OK ; count--, tokenPtr++) {
  2153   2153   	Tcl_Obj *appendObj = NULL;
  2154   2154   	const char *append = NULL;
  2155   2155   	int appendByteLength = 0;
  2156         -	char utfCharBytes[TCL_UTF_MAX] = "";
         2156  +	char utfCharBytes[4] = "";
  2157   2157   
  2158   2158   	switch (tokenPtr->type) {
  2159   2159   	case TCL_TOKEN_TEXT:
  2160   2160   	    append = tokenPtr->start;
  2161   2161   	    appendByteLength = tokenPtr->size;
  2162   2162   	    break;
  2163   2163   

Changes to generic/tclPkg.c.

  2163   2163   
  2164   2164   const char *
  2165   2165   Tcl_PkgInitStubsCheck(
  2166   2166       Tcl_Interp *interp,
  2167   2167       const char * version,
  2168   2168       int exact)
  2169   2169   {
  2170         -    const char *actualVersion = Tcl_PkgPresent(interp, "Tcl", version, 0);
         2170  +    const char *actualVersion = Tcl_PkgPresentEx(interp, "Tcl", version, 0, NULL);
  2171   2171   
  2172   2172       if ((exact&1) && actualVersion) {
  2173   2173   	const char *p = version;
  2174   2174   	int count = 0;
  2175   2175   
  2176   2176   	while (*p) {
  2177   2177   	    count += !isdigit(UCHAR(*p++));
  2178   2178   	}
  2179   2179   	if (count == 1) {
  2180   2180   	    if (0 != strncmp(version, actualVersion, strlen(version))) {
  2181   2181   		/* Construct error message */
  2182         -		Tcl_PkgPresent(interp, "Tcl", version, 1);
         2182  +		Tcl_PkgPresentEx(interp, "Tcl", version, 1, NULL);
  2183   2183   		return NULL;
  2184   2184   	    }
  2185   2185   	} else {
  2186         -	    return Tcl_PkgPresent(interp, "Tcl", version, 1);
         2186  +	    return Tcl_PkgPresentEx(interp, "Tcl", version, 1, NULL);
  2187   2187   	}
  2188   2188       }
  2189   2189       return actualVersion;
  2190   2190   }
  2191   2191   /*
  2192   2192    * Local Variables:
  2193   2193    * mode: c
  2194   2194    * c-basic-offset: 4
  2195   2195    * fill-column: 78
  2196   2196    * End:
  2197   2197    */

Changes to generic/tclProcess.c.

   536    536   	result = Tcl_ListObjGetElements(interp, objv[1], &numPids, &pidObjs);
   537    537   	if (result != TCL_OK) {
   538    538   	    return result;
   539    539   	}
   540    540   	dict = Tcl_NewDictObj();
   541    541   	Tcl_MutexLock(&infoTablesMutex);
   542    542   	for (i = 0; i < numPids; i++) {
   543         -	    result = Tcl_GetIntFromObj(interp, pidObjs[i], (int *) &pid);
          543  +	    result = Tcl_GetIntFromObj(interp, pidObjs[i], &pid);
   544    544   	    if (result != TCL_OK) {
   545    545   		Tcl_MutexUnlock(&infoTablesMutex);
   546    546   		Tcl_DecrRefCount(dict);
   547    547   		return result;
   548    548   	    }
   549    549   
   550    550   	    entry = Tcl_FindHashEntry(&infoTablePerResolvedPid, INT2PTR(pid));
................................................................................
   650    650   
   651    651   	result = Tcl_ListObjGetElements(interp, objv[1], &numPids, &pidObjs);
   652    652   	if (result != TCL_OK) {
   653    653   	    return result;
   654    654   	}
   655    655   	Tcl_MutexLock(&infoTablesMutex);
   656    656   	for (i = 0; i < numPids; i++) {
   657         -	    result = Tcl_GetIntFromObj(interp, pidObjs[i], (int *) &pid);
          657  +	    result = Tcl_GetIntFromObj(interp, pidObjs[i], &pid);
   658    658   	    if (result != TCL_OK) {
   659    659   		Tcl_MutexUnlock(&infoTablesMutex);
   660    660   		return result;
   661    661   	    }
   662    662   
   663    663   	    entry = Tcl_FindHashEntry(&infoTablePerResolvedPid, INT2PTR(pid));
   664    664   	    if (!entry) {

Changes to generic/tclResult.c.

   611    611    * Tcl_GetErrorLine --
   612    612    *
   613    613    *      Returns the line number associated with the current error.
   614    614    *
   615    615    *----------------------------------------------------------------------
   616    616    */
   617    617   
   618         -#undef Tcl_GetErrorLine
   619    618   int
   620    619   Tcl_GetErrorLine(
   621    620       Tcl_Interp *interp)
   622    621   {
   623    622       return ((Interp *) interp)->errorLine;
   624    623   }
   625    624   
................................................................................
   629    628    * Tcl_SetErrorLine --
   630    629    *
   631    630    *      Sets the line number associated with the current error.
   632    631    *
   633    632    *----------------------------------------------------------------------
   634    633    */
   635    634   
   636         -#undef Tcl_SetErrorLine
   637    635   void
   638    636   Tcl_SetErrorLine(
   639    637       Tcl_Interp *interp,
   640    638       int value)
   641    639   {
   642    640       ((Interp *) interp)->errorLine = value;
   643    641   }

Changes to generic/tclScan.c.

   257    257   				 * required. */
   258    258   {
   259    259       int gotXpg, gotSequential, value, i, flags;
   260    260       char *end;
   261    261       Tcl_UniChar ch = 0;
   262    262       int objIndex, xpgSize, nspace = numVars;
   263    263       int *nassign = TclStackAlloc(interp, nspace * sizeof(int));
   264         -    char buf[TCL_UTF_MAX+1] = "";
          264  +    char buf[TCL_UTF_MAX + 1] = "";
   265    265       Tcl_Obj *errorMsg;		/* Place to build an error messages. Note that
   266    266   				 * these are messy operations because we do
   267    267   				 * not want to use the formatting engine;
   268    268   				 * we're inside there! */
   269    269   
   270    270       /*
   271    271        * Initialize an array that records the number of times a variable is

Changes to generic/tclStringObj.c.

  1940   1940   		    numChars = precision;
  1941   1941   		    Tcl_IncrRefCount(segment);
  1942   1942   		    allocSegment = 1;
  1943   1943   		}
  1944   1944   	    }
  1945   1945   	    break;
  1946   1946   	case 'c': {
  1947         -	    char buf[TCL_UTF_MAX] = "";
         1947  +	    char buf[4] = "";
  1948   1948   	    int code, length;
  1949   1949   
  1950   1950   	    if (TclGetIntFromObj(interp, segment, &code) != TCL_OK) {
  1951   1951   		goto error;
  1952   1952   	    }
  1953   1953   	    length = Tcl_UniCharToUtf(code, buf);
  1954   1954   	    if ((code >= 0xD800) && (length < 3)) {

Changes to generic/tclStubInit.c.

    25     25   /*
    26     26    * Remove macros that will interfere with the definitions below.
    27     27    */
    28     28   
    29     29   #undef Tcl_Alloc
    30     30   #undef Tcl_Free
    31     31   #undef Tcl_Realloc
    32         -#undef Tcl_NewBooleanObj
    33     32   #undef Tcl_NewByteArrayObj
    34     33   #undef Tcl_NewDoubleObj
    35         -#undef Tcl_NewIntObj
    36     34   #undef Tcl_NewListObj
    37     35   #undef Tcl_NewLongObj
    38     36   #undef Tcl_DbNewLongObj
    39     37   #undef Tcl_NewObj
    40     38   #undef Tcl_NewStringObj
    41     39   #undef Tcl_GetUnicode
    42     40   #undef Tcl_DumpActiveMemory
    43     41   #undef Tcl_ValidateAllMemory
    44         -#undef Tcl_FindHashEntry
    45         -#undef Tcl_CreateHashEntry
    46         -#undef Tcl_Panic
    47         -#undef Tcl_FindExecutable
    48     42   #undef Tcl_SetExitProc
    49     43   #undef Tcl_SetPanicProc
    50     44   #undef TclpGetPid
    51         -#undef TclSockMinimumBuffers
    52         -#undef Tcl_SetIntObj
    53     45   #undef TclStaticPackage
    54     46   #undef Tcl_BackgroundError
    55     47   #define TclStaticPackage Tcl_StaticPackage
    56     48   
    57     49   #ifdef TCL_MEM_DEBUG
    58     50   #   define Tcl_Alloc TclpAlloc
    59     51   #   define Tcl_Free TclpFree
................................................................................
   942    934       Tcl_SetVar2, /* 238 */
   943    935       Tcl_SignalId, /* 239 */
   944    936       Tcl_SignalMsg, /* 240 */
   945    937       Tcl_SourceRCFile, /* 241 */
   946    938       Tcl_SplitList, /* 242 */
   947    939       Tcl_SplitPath, /* 243 */
   948    940       0, /* 244 */
   949         -    Tcl_StringMatch, /* 245 */
          941  +    0, /* 245 */
   950    942       0, /* 246 */
   951    943       0, /* 247 */
   952    944       Tcl_TraceVar2, /* 248 */
   953    945       Tcl_TranslateFileName, /* 249 */
   954    946       Tcl_Ungets, /* 250 */
   955    947       Tcl_UnlinkVar, /* 251 */
   956    948       Tcl_UnregisterChannel, /* 252 */

Changes to generic/tclTest.c.

   548    548    *----------------------------------------------------------------------
   549    549    */
   550    550   
   551    551   int
   552    552   Tcltest_Init(
   553    553       Tcl_Interp *interp)		/* Interpreter for application. */
   554    554   {
   555         -    Tcl_Obj *listPtr;
   556         -    Tcl_Obj **objv;
          555  +    Tcl_Obj **objv, *objPtr;
   557    556       int objc, index;
   558    557       static const char *const specialOptions[] = {
   559    558   	"-appinitprocerror", "-appinitprocdeleteinterp",
   560    559   	"-appinitprocclosestderr", "-appinitprocsetrcfile", NULL
   561    560       };
   562    561   
   563    562       if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
................................................................................
   736    735       }
   737    736   #endif
   738    737   
   739    738       /*
   740    739        * Check for special options used in ../tests/main.test
   741    740        */
   742    741   
   743         -    listPtr = Tcl_GetVar2Ex(interp, "argv", NULL, TCL_GLOBAL_ONLY);
   744         -    if (listPtr != NULL) {
   745         -	if (Tcl_ListObjGetElements(interp, listPtr, &objc, &objv) != TCL_OK) {
          742  +    objPtr = Tcl_GetVar2Ex(interp, "argv", NULL, TCL_GLOBAL_ONLY);
          743  +    if (objPtr != NULL) {
          744  +	if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
   746    745   	    return TCL_ERROR;
   747    746   	}
   748    747   	if (objc && (Tcl_GetIndexFromObj(NULL, objv[0], specialOptions, NULL,
   749    748   		TCL_EXACT, &index) == TCL_OK)) {
   750    749   	    switch (index) {
   751    750   	    case 0:
   752    751   		return TCL_ERROR;
................................................................................
  3761   3760   static int
  3762   3761   TestregexpObjCmd(
  3763   3762       void *dummy,		/* Not used. */
  3764   3763       Tcl_Interp *interp,		/* Current interpreter. */
  3765   3764       int objc,			/* Number of arguments. */
  3766   3765       Tcl_Obj *const objv[])	/* Argument objects. */
  3767   3766   {
  3768         -    int i, ii, indices, stringLength, match, about;
         3767  +    int i, indices, stringLength, match, about;
         3768  +    size_t ii;
  3769   3769       int hasxflags, cflags, eflags;
  3770   3770       Tcl_RegExp regExpr;
  3771   3771       const char *string;
  3772   3772       Tcl_Obj *objPtr;
  3773   3773       Tcl_RegExpInfo info;
  3774   3774       static const char *const options[] = {
  3775   3775   	"-indices",	"-nocase",	"-about",	"-expanded",
................................................................................
  3918   3918   
  3919   3919       Tcl_RegExpGetInfo(regExpr, &info);
  3920   3920       for (i = 0; i < objc; i++) {
  3921   3921   	int start, end;
  3922   3922   	Tcl_Obj *newPtr, *varPtr, *valuePtr;
  3923   3923   
  3924   3924   	varPtr = objv[i];
  3925         -	ii = ((cflags&REG_EXPECT) && i == objc-1) ? -1 : i;
         3925  +	ii = ((cflags&REG_EXPECT) && i == objc-1) ? TCL_INDEX_NONE : (size_t)i;
  3926   3926   	if (indices) {
  3927   3927   	    Tcl_Obj *objs[2];
  3928   3928   
  3929         -	    if (ii == -1) {
         3929  +	    if (ii == TCL_INDEX_NONE) {
  3930   3930   		TclRegExpRangeUniChar(regExpr, ii, &start, &end);
  3931         -	    } else if (ii > info.nsubs) {
         3931  +	    } else if (ii > (size_t)info.nsubs) {
  3932   3932   		start = -1;
  3933   3933   		end = -1;
  3934   3934   	    } else {
  3935   3935   		start = info.matches[ii].start;
  3936   3936   		end = info.matches[ii].end;
  3937   3937   	    }
  3938   3938   
................................................................................
  3946   3946   	    }
  3947   3947   
  3948   3948   	    objs[0] = Tcl_NewWideIntObj(start);
  3949   3949   	    objs[1] = Tcl_NewWideIntObj(end);
  3950   3950   
  3951   3951   	    newPtr = Tcl_NewListObj(2, objs);
  3952   3952   	} else {
  3953         -	    if (ii == -1) {
         3953  +	    if (ii == TCL_INDEX_NONE) {
  3954   3954   		TclRegExpRangeUniChar(regExpr, ii, &start, &end);
  3955   3955   		newPtr = Tcl_GetRange(objPtr, start, end);
  3956         -	    } else if (ii > info.nsubs) {
         3956  +	    } else if (ii > (size_t)info.nsubs) {
  3957   3957   		newPtr = Tcl_NewObj();
  3958   3958   	    } else {
  3959   3959   		newPtr = Tcl_GetRange(objPtr, info.matches[ii].start,
  3960   3960   			info.matches[ii].end - 1);
  3961   3961   	    }
  3962   3962   	}
  3963   3963   	valuePtr = Tcl_ObjSetVar2(interp, varPtr, NULL, newPtr, TCL_LEAVE_ERR_MSG);
................................................................................
  5008   5008   static int
  5009   5009   TestbytestringObjCmd(
  5010   5010       void *unused,		/* Not used. */
  5011   5011       Tcl_Interp *interp,		/* Current interpreter. */
  5012   5012       int objc,			/* Number of arguments. */
  5013   5013       Tcl_Obj *const objv[])	/* The argument objects. */
  5014   5014   {
  5015         -    int n;
         5015  +    int n = 0;
  5016   5016       const char *p;
  5017   5017   
  5018   5018       if (objc != 2) {
  5019   5019   	Tcl_WrongNumArgs(interp, 1, objv, "bytearray");
  5020   5020   	return TCL_ERROR;
  5021   5021       }
  5022   5022       p = (const char *)Tcl_GetByteArrayFromObj(objv[1], &n);

Changes to generic/tclTestObj.c.

   381    381   	 * has ref count 1 (i.e. the object is unshared) we can modify that
   382    382   	 * object directly. Otherwise, if RC>1 (i.e. the object is shared),
   383    383   	 * we must create a new object to modify/set and decrement the old
   384    384   	 * formerly-shared object's ref count. This is "copy on write".
   385    385   	 */
   386    386   
   387    387   	if ((varPtr[varIndex] != NULL) && !Tcl_IsShared(varPtr[varIndex])) {
   388         -	    Tcl_SetBooleanObj(varPtr[varIndex], boolValue);
          388  +	    Tcl_SetWideIntObj(varPtr[varIndex], boolValue != 0);
   389    389   	} else {
   390         -	    SetVarToObj(varPtr, varIndex, Tcl_NewBooleanObj(boolValue));
          390  +	    SetVarToObj(varPtr, varIndex, Tcl_NewWideIntObj(boolValue != 0));
   391    391   	}
   392    392   	Tcl_SetObjResult(interp, varPtr[varIndex]);
   393    393       } else if (strcmp(subCmd, "get") == 0) {
   394    394   	if (objc != 3) {
   395    395   	    goto wrongNumArgs;
   396    396   	}
   397    397   	if (CheckIfVarUnset(interp, varPtr,varIndex)) {
................................................................................
   406    406   	    return TCL_ERROR;
   407    407   	}
   408    408   	if (Tcl_GetBooleanFromObj(interp, varPtr[varIndex],
   409    409   				  &boolValue) != TCL_OK) {
   410    410   	    return TCL_ERROR;
   411    411   	}
   412    412   	if (!Tcl_IsShared(varPtr[varIndex])) {
   413         -	    Tcl_SetBooleanObj(varPtr[varIndex], !boolValue);
          413  +	    Tcl_SetWideIntObj(varPtr[varIndex], boolValue == 0);
   414    414   	} else {
   415         -	    SetVarToObj(varPtr, varIndex, Tcl_NewBooleanObj(!boolValue));
          415  +	    SetVarToObj(varPtr, varIndex, Tcl_NewWideIntObj(boolValue == 0));
   416    416   	}
   417    417   	Tcl_SetObjResult(interp, varPtr[varIndex]);
   418    418       } else {
   419    419   	Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
   420    420   		"bad option \"", Tcl_GetString(objv[1]),
   421    421   		"\": must be set, get, or not", NULL);
   422    422   	return TCL_ERROR;
................................................................................
   654    654   TestintobjCmd(
   655    655       ClientData clientData,	/* Not used. */
   656    656       Tcl_Interp *interp,		/* Current interpreter. */
   657    657       int objc,			/* Number of arguments. */
   658    658       Tcl_Obj *const objv[])	/* Argument objects. */
   659    659   {
   660    660       int intValue, varIndex, i;
   661         -    long longValue;
          661  +    Tcl_WideInt wideValue;
   662    662       const char *index, *subCmd, *string;
   663    663       Tcl_Obj **varPtr;
   664    664   
   665    665       if (objc < 3) {
   666    666   	wrongNumArgs:
   667    667   	Tcl_WrongNumArgs(interp, 1, objv, "option arg ?arg ...?");
   668    668   	return TCL_ERROR;
................................................................................
   709    709   	}
   710    710   	intValue = i;
   711    711   	if ((varPtr[varIndex] != NULL) && !Tcl_IsShared(varPtr[varIndex])) {
   712    712   	    Tcl_SetIntObj(varPtr[varIndex], intValue);
   713    713   	} else {
   714    714   	    SetVarToObj(varPtr, varIndex, Tcl_NewIntObj(intValue));
   715    715   	}
   716         -    } else if (strcmp(subCmd, "setlong") == 0) {
          716  +    } else if (strcmp(subCmd, "setint") == 0) {
   717    717   	if (objc != 4) {
   718    718   	    goto wrongNumArgs;
   719    719   	}
   720    720   	string = Tcl_GetString(objv[3]);
   721    721   	if (Tcl_GetInt(interp, string, &i) != TCL_OK) {
   722    722   	    return TCL_ERROR;
   723    723   	}
................................................................................
   724    724   	intValue = i;
   725    725   	if ((varPtr[varIndex] != NULL) && !Tcl_IsShared(varPtr[varIndex])) {
   726    726   	    Tcl_SetWideIntObj(varPtr[varIndex], intValue);
   727    727   	} else {
   728    728   	    SetVarToObj(varPtr, varIndex, Tcl_NewWideIntObj(intValue));
   729    729   	}
   730    730   	Tcl_SetObjResult(interp, varPtr[varIndex]);
   731         -    } else if (strcmp(subCmd, "setmaxlong") == 0) {
   732         -	long maxLong = LONG_MAX;
          731  +    } else if (strcmp(subCmd, "setmax") == 0) {
          732  +	Tcl_WideInt maxWide = WIDE_MAX;
   733    733   	if (objc != 3) {
   734    734   	    goto wrongNumArgs;
   735    735   	}
   736    736   	if ((varPtr[varIndex] != NULL) && !Tcl_IsShared(varPtr[varIndex])) {
   737         -	    Tcl_SetWideIntObj(varPtr[varIndex], maxLong);
          737  +	    Tcl_SetWideIntObj(varPtr[varIndex], maxWide);
   738    738   	} else {
   739         -	    SetVarToObj(varPtr, varIndex, Tcl_NewWideIntObj(maxLong));
          739  +	    SetVarToObj(varPtr, varIndex, Tcl_NewWideIntObj(maxWide));
   740    740   	}
   741         -    } else if (strcmp(subCmd, "ismaxlong") == 0) {
          741  +    } else if (strcmp(subCmd, "ismax") == 0) {
   742    742   	if (objc != 3) {
   743    743   	    goto wrongNumArgs;
   744    744   	}
   745    745   	if (CheckIfVarUnset(interp, varPtr,varIndex)) {
   746    746   	    return TCL_ERROR;
   747    747   	}
   748         -	if (Tcl_GetLongFromObj(interp, varPtr[varIndex], &longValue) != TCL_OK) {
          748  +	if (Tcl_GetWideIntFromObj(interp, varPtr[varIndex], &wideValue) != TCL_OK) {
   749    749   	    return TCL_ERROR;
   750    750   	}
   751    751   	Tcl_AppendToObj(Tcl_GetObjResult(interp),
   752         -		((longValue == LONG_MAX)? "1" : "0"), -1);
          752  +		((wideValue == WIDE_MAX)? "1" : "0"), -1);
   753    753       } else if (strcmp(subCmd, "get") == 0) {
   754    754   	if (objc != 3) {
   755    755   	    goto wrongNumArgs;
   756    756   	}
   757    757   	if (CheckIfVarUnset(interp, varPtr,varIndex)) {
   758    758   	    return TCL_ERROR;
   759    759   	}

Changes to generic/tclTestProcBodyObj.c.

   186    186       cmdTablePtr = (isSafe) ? &safeCommands[0] : &commands[0];
   187    187       for ( ; cmdTablePtr->cmdName ; cmdTablePtr++) {
   188    188   	if (RegisterCommand(interp, packageName, cmdTablePtr) != TCL_OK) {
   189    189   	    return TCL_ERROR;
   190    190   	}
   191    191       }
   192    192   
   193         -    return Tcl_PkgProvide(interp, packageName, packageVersion);
          193  +    return Tcl_PkgProvideEx(interp, packageName, packageVersion, NULL);
   194    194   }
   195    195   
   196    196   /*
   197    197    *----------------------------------------------------------------------
   198    198    *
   199    199    * ProcBodyTestProcObjCmd --
   200    200    *
................................................................................
   335    335       const char *version;
   336    336   
   337    337       if (objc != 1) {
   338    338   	Tcl_WrongNumArgs(interp, 1, objv, "");
   339    339   	return TCL_ERROR;
   340    340       }
   341    341   
   342         -    version = Tcl_PkgPresent(interp, packageName, packageVersion, 1);
   343         -    Tcl_SetObjResult(interp, Tcl_NewBooleanObj(
          342  +    version = Tcl_PkgPresentEx(interp, packageName, packageVersion, 1, NULL);
          343  +    Tcl_SetObjResult(interp, Tcl_NewWideIntObj(
   344    344   	    strcmp(version, packageVersion) == 0));
   345    345       return TCL_OK;
   346    346   }
   347    347   
   348    348   /*
   349    349    * Local Variables:
   350    350    * mode: c
   351    351    * c-basic-offset: 4
   352    352    * fill-column: 78
   353    353    * End:
   354    354    */

Changes to generic/tclThreadAlloc.c.

   304    304       size_t reqSize)
   305    305   {
   306    306       Cache *cachePtr;
   307    307       Block *blockPtr;
   308    308       register int bucket;
   309    309       size_t size;
   310    310   
   311         -#ifndef __LP64__
   312         -    if (sizeof(int) >= sizeof(size_t)) {
   313         -	/* An unsigned int overflow can also be a size_t overflow */
   314         -	const size_t zero = 0;
   315         -	const size_t max = ~zero;
   316         -
   317         -	if (reqSize > max - sizeof(Block) - RCHECK) {
   318         -	    /* Requested allocation exceeds memory */
   319         -	    return NULL;
   320         -	}
   321         -    }
   322         -#endif
   323         -
   324    311       GETCACHE(cachePtr);
   325    312   
   326    313       /*
   327    314        * Increment the requested size to include room for the Block structure.
   328    315        * Call TclpSysAlloc() directly if the required amount is greater than the
   329    316        * largest block, otherwise pop the smallest block large enough,
   330    317        * allocating more blocks if necessary.
................................................................................
   446    433       size_t size, min;
   447    434       int bucket;
   448    435   
   449    436       if (ptr == NULL) {
   450    437   	return TclpAlloc(reqSize);
   451    438       }
   452    439   
   453         -#ifndef __LP64__
   454         -    if (sizeof(int) >= sizeof(size_t)) {
   455         -	/* An unsigned int overflow can also be a size_t overflow */
   456         -	const size_t zero = 0;
   457         -	const size_t max = ~zero;
   458         -
   459         -	if ((reqSize) > max - sizeof(Block) - RCHECK) {
   460         -	    /* Requested allocation exceeds memory */
   461         -	    return NULL;
   462         -	}
   463         -    }
   464         -#endif
   465         -
   466    440       GETCACHE(cachePtr);
   467    441   
   468    442       /*
   469    443        * If the block is not a system block and fits in place, simply return the
   470    444        * existing pointer. Otherwise, if the block is a system block and the new
   471    445        * size would also require a system block, call TclpSysRealloc() directly.
   472    446        */

Changes to generic/tclTomMath.h.

    21     21   
    22     22   
    23     23   #ifdef __cplusplus
    24     24   extern "C" {
    25     25   #endif
    26     26   
    27     27   /* MS Visual C++ doesn't have a 128bit type for words, so fall back to 32bit MPI's (where words are 64bit) */
    28         -#if defined(_MSC_VER) || defined(__LLP64__) || defined(__e2k__) || defined(__LCC__)
           28  +#if defined(_WIN32) || defined(__LLP64__) || defined(__e2k__) || defined(__LCC__)
    29     29   #   define MP_32BIT
    30     30   #endif
    31     31   
    32     32   /* detect 64-bit mode if possible */
    33     33   #if defined(NEVER)
    34     34   #   if !(defined(MP_32BIT) || defined(MP_16BIT) || defined(MP_8BIT))
    35     35   #      if defined(__GNUC__)
................................................................................
   106    106   #      define MP_28BIT
   107    107   #   endif
   108    108   #endif
   109    109   
   110    110   /* otherwise the bits per digit is calculated automatically from the size of a mp_digit */
   111    111   #ifndef DIGIT_BIT
   112    112   #   define DIGIT_BIT (((CHAR_BIT * MP_SIZEOF_MP_DIGIT) - 1))  /* bits per digit */
   113         -typedef unsigned long mp_min_u32;
   114         -#else
   115         -typedef mp_digit mp_min_u32;
   116    113   #endif
   117    114   
   118    115   #define MP_DIGIT_BIT     DIGIT_BIT
   119    116   #define MP_MASK          ((((mp_digit)1)<<((mp_digit)DIGIT_BIT))-((mp_digit)1))
   120    117   #define MP_DIGIT_MAX     MP_MASK
   121    118   
   122    119   /* equalities */
................................................................................
   138    135   /* Primality generation flags */
   139    136   #define LTM_PRIME_BBS      0x0001 /* BBS style prime */
   140    137   #define LTM_PRIME_SAFE     0x0002 /* Safe prime (p-1)/2 == prime */
   141    138   #define LTM_PRIME_2MSB_ON  0x0008 /* force 2nd MSB to 1 */
   142    139   
   143    140   typedef int           mp_err;
   144    141   
   145         -/* you'll have to tune these... */
   146         -#if defined(BUILD_tcl) || !defined(_WIN32)
   147         -MODULE_SCOPE int KARATSUBA_MUL_CUTOFF,
   148         -       KARATSUBA_SQR_CUTOFF,
   149         -       TOOM_MUL_CUTOFF,
   150         -       TOOM_SQR_CUTOFF;
   151         -#endif
   152         -
   153    142   /* define this to use lower memory usage routines (exptmods mostly) */
   154    143   /* #define MP_LOW_MEM */
   155    144   
   156    145   /* default precision */
   157    146   #ifndef MP_PREC
   158    147   #   ifndef MP_LOW_MEM
   159    148   #      define MP_PREC 32        /* default digits of precision */
................................................................................
   225    214   /* init to a given number of digits */
   226    215   /*
   227    216   int mp_init_size(mp_int *a, int size);
   228    217   */
   229    218   
   230    219   /* ---> Basic Manipulations <--- */
   231    220   #define mp_iszero(a) (((a)->used == 0) ? MP_YES : MP_NO)
   232         -#define mp_iseven(a) ((((a)->used == 0) || (((a)->dp[0] & 1u) == 0u)) ? MP_YES : MP_NO)
   233         -#define mp_isodd(a)  ((((a)->used > 0) && (((a)->dp[0] & 1u) == 1u)) ? MP_YES : MP_NO)
          221  +#define mp_iseven(a) (!mp_get_bit((a),0))
          222  +#define mp_isodd(a)  mp_get_bit((a),0)
   234    223   #define mp_isneg(a)  (((a)->sign != MP_ZPOS) ? MP_YES : MP_NO)
   235    224   
   236    225   /* set to zero */
   237    226   /*
   238    227   void mp_zero(mp_int *a);
   239    228   */
   240    229   

Changes to generic/tclTomMathDecls.h.

    42     42   #define XMALLOC(x) TclBNAlloc(x)
    43     43   #define XFREE(x) TclBNFree(x)
    44     44   #define XREALLOC(x,n) TclBNRealloc(x,n)
    45     45   #define XCALLOC(n,x) TclBNCalloc(n,x)
    46     46   
    47     47   /* Rename the global symbols in libtommath to avoid linkage conflicts */
    48     48   
    49         -#define KARATSUBA_MUL_CUTOFF TclBNKaratsubaMulCutoff
    50         -#define KARATSUBA_SQR_CUTOFF TclBNKaratsubaSqrCutoff
    51         -#define TOOM_MUL_CUTOFF TclBNToomMulCutoff
    52         -#define TOOM_SQR_CUTOFF TclBNToomSqrCutoff
    53         -
    54     49   #define bn_reverse TclBN_reverse
    55     50   #define fast_s_mp_mul_digs TclBN_fast_s_mp_mul_digs
    56     51   #define fast_s_mp_sqr TclBN_fast_s_mp_sqr
    57     52   #define mp_add TclBN_mp_add
    58     53   #define mp_add_d TclBN_mp_add_d
    59     54   #define mp_and TclBN_mp_and
    60     55   #define mp_clamp TclBN_mp_clamp

Changes to generic/tclTrace.c.

   464    464   		break;
   465    465   	    case TRACE_EXEC_LEAVE_STEP:
   466    466   		flags |= TCL_TRACE_LEAVE_DURING_EXEC;
   467    467   		break;
   468    468   	    }
   469    469   	}
   470    470   	command = TclGetStringFromObj(objv[5], &commandLength);
   471         -	length = (size_t) commandLength;
          471  +	length = commandLength;
   472    472   	if ((enum traceOptions) optionIndex == TRACE_ADD) {
   473    473   	    TraceCommandInfo *tcmdPtr = Tcl_Alloc(
   474    474   		    TclOffset(TraceCommandInfo, command) + 1 + length);
   475    475   
   476    476   	    tcmdPtr->flags = flags;
   477    477   	    tcmdPtr->stepTrace = NULL;
   478    478   	    tcmdPtr->startLevel = 0;
................................................................................
   518    518   		 * pieces of the trace mechanism.
   519    519   		 */
   520    520   
   521    521   		if ((tcmdPtr->length == length)
   522    522   			&& ((tcmdPtr->flags & (TCL_TRACE_ANY_EXEC |
   523    523   				TCL_TRACE_RENAME | TCL_TRACE_DELETE)) == flags)
   524    524   			&& (strncmp(command, tcmdPtr->command,
   525         -				(size_t) length) == 0)) {
          525  +				length) == 0)) {
   526    526   		    flags |= TCL_TRACE_DELETE;
   527    527   		    if (flags & (TCL_TRACE_ENTER_DURING_EXEC |
   528    528   			    TCL_TRACE_LEAVE_DURING_EXEC)) {
   529    529   			flags |= (TCL_TRACE_ENTER_EXEC | TCL_TRACE_LEAVE_EXEC);
   530    530   		    }
   531    531   		    Tcl_UntraceCommand(interp, name, flags,
   532    532   			    TraceCommandProc, clientData);
................................................................................
   701    701   	    case TRACE_CMD_DELETE:
   702    702   		flags |= TCL_TRACE_DELETE;
   703    703   		break;
   704    704   	    }
   705    705   	}
   706    706   
   707    707   	command = TclGetStringFromObj(objv[5], &commandLength);
   708         -	length = (size_t) commandLength;
          708  +	length = commandLength;
   709    709   	if ((enum traceOptions) optionIndex == TRACE_ADD) {
   710    710   	    TraceCommandInfo *tcmdPtr = Tcl_Alloc(
   711    711   		    TclOffset(TraceCommandInfo, command) + 1 + length);
   712    712   
   713    713   	    tcmdPtr->flags = flags;
   714    714   	    tcmdPtr->stepTrace = NULL;
   715    715   	    tcmdPtr->startLevel = 0;
................................................................................
   743    743   	    }
   744    744   
   745    745   	    FOREACH_COMMAND_TRACE(interp, name, clientData) {
   746    746   		TraceCommandInfo *tcmdPtr = clientData;
   747    747   
   748    748   		if ((tcmdPtr->length == length) && (tcmdPtr->flags == flags)
   749    749   			&& (strncmp(command, tcmdPtr->command,
   750         -				(size_t) length) == 0)) {
          750  +				length) == 0)) {
   751    751   		    Tcl_UntraceCommand(interp, name, flags | TCL_TRACE_DELETE,
   752    752   			    TraceCommandProc, clientData);
   753    753   		    tcmdPtr->flags |= TCL_TRACE_DESTROYED;
   754    754   		    if (tcmdPtr->refCount-- <= 1) {
   755    755   			Tcl_Free(tcmdPtr);
   756    756   		    }
   757    757   		    break;
................................................................................
   904    904   		break;
   905    905   	    case TRACE_VAR_WRITE:
   906    906   		flags |= TCL_TRACE_WRITES;
   907    907   		break;
   908    908   	    }
   909    909   	}
   910    910   	command = TclGetStringFromObj(objv[5], &commandLength);
   911         -	length = (size_t) commandLength;
          911  +	length = commandLength;
   912    912   	if ((enum traceOptions) optionIndex == TRACE_ADD) {
   913    913   	    CombinedTraceVarInfo *ctvarPtr = Tcl_Alloc(
   914    914   		    TclOffset(CombinedTraceVarInfo, traceCmdInfo.command)
   915    915   		    + 1 + length);
   916    916   
   917    917   	    ctvarPtr->traceCmdInfo.flags = flags;
   918    918   #ifndef TCL_REMOVE_OBSOLETE_TRACES
................................................................................
   946    946   		if ((tvarPtr->length == length)
   947    947   			&& ((tvarPtr->flags
   948    948   #ifndef TCL_REMOVE_OBSOLETE_TRACES
   949    949   & ~TCL_TRACE_OLD_STYLE
   950    950   #endif
   951    951   						)==flags)
   952    952   			&& (strncmp(command, tvarPtr->command,
   953         -				(size_t) length) == 0)) {
          953  +				length) == 0)) {
   954    954   		    Tcl_UntraceVar2(interp, name, NULL,
   955    955   			    flags | TCL_TRACE_UNSETS | TCL_TRACE_RESULT_OBJECT,
   956    956   			    TraceVarProc, clientData);
   957    957   		    break;
   958    958   		}
   959    959   	    }
   960    960   	}

Changes to generic/tclUniData.c.

    53     53       7264, 4928, 4928, 4928, 4928, 4928, 4928, 4928, 4928, 6560, 6560, 6560,
    54     54       6560, 7296, 6560, 7328, 7360, 6560, 6560, 6560, 6560, 6560, 6560, 6560,
    55     55       6560, 4928, 7392, 7424, 7456, 7488, 4928, 4928, 4928, 7520, 7552, 7584,
    56     56       7616, 224, 224, 224, 7648, 7680, 7712, 1344, 7744, 7776, 7808, 7808,
    57     57       704, 7840, 7872, 7904, 1824, 7936, 4928, 4928, 7968, 4928, 4928, 4928,
    58     58       4928, 4928, 4928, 8000, 8032, 8064, 8096, 3232, 1344, 8128, 4192, 1344,
    59     59       8160, 8192, 8224, 1344, 1344, 8256, 8288, 4928, 8320, 8352, 8384, 8416,
    60         -    4928, 8384, 8448, 4928, 8352, 4928, 4928, 4928, 4928, 4928, 4928, 4928,
           60  +    4928, 8384, 8448, 4928, 4928, 4928, 4928, 4928, 4928, 4928, 4928, 4928,
    61     61       4928, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
    62     62       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
    63     63       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
    64     64       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
    65     65       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
    66     66       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
    67     67       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,

Changes to generic/tclUtf.c.

    63     63       1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
    64     64       1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
    65     65       1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
    66     66       1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
    67     67       1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
    68     68       1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
    69     69       2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
    70         -    3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
    71         -    4,4,4,4,4,4,4,4,
    72         -    1,1,1,1,1,1,1,1
           70  +    3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1
    73     71   };
    74     72   
    75     73   /*
    76     74    *---------------------------------------------------------------------------
    77     75    *
    78     76    * TclUtfCount --
    79     77    *
................................................................................
   443    441   		/* produce high surrogate, advance source pointer */
   444    442   		*chPtr = 0xD800 + high;
   445    443   		return 1;
   446    444   	    }
   447    445   #else
   448    446   	    *chPtr = (((byte & 0x07) << 18) | ((src[1] & 0x3F) << 12)
   449    447   		    | ((src[2] & 0x3F) << 6) | (src[3] & 0x3F));
   450         -	    if ((*chPtr - 0x10000) <= 0xFFFFF) {
          448  +	    if ((unsigned)(*chPtr - 0x10000) <= 0xFFFFF) {
   451    449   		return 4;
   452    450   	    }
   453    451   #endif
   454    452   	}
   455    453   
   456    454   	/*
   457         -	 * A four-byte-character lead-byte not followed by two trail-bytes
          455  +	 * A four-byte-character lead-byte not followed by three trail-bytes
   458    456   	 * represents itself.
   459    457   	 */
   460    458       }
   461    459   
   462    460       *chPtr = byte;
   463    461       return 1;
   464    462   }
................................................................................
   618    616   	p += TclUtfToUniChar(p, &ch);
   619    617   	*w++ = ch;
   620    618       }
   621    619       end += 4;
   622    620       while (p < end) {
   623    621   	if (Tcl_UtfCharComplete(p, end-p)) {
   624    622   	    p += TclUtfToUniChar(p, &ch);
   625         -	} else if (((UCHAR(*p)-0x80)) < 0x20) {
   626         -	    ch = cp1252[UCHAR(*p++)-0x80];
   627    623   	} else {
   628    624   	    ch = UCHAR(*p++);
   629    625   	}
   630    626   	*w++ = ch;
   631    627       }
   632    628       *w = '\0';
   633    629       Tcl_DStringSetLength(dsPtr,
................................................................................
   672    668   	p += TclUtfToWChar(p, &ch);
   673    669   	*w++ = ch;
   674    670       }
   675    671       end += 4;
   676    672       while (p < end) {
   677    673   	if (Tcl_UtfCharComplete(p, end-p)) {
   678    674   	    p += TclUtfToWChar(p, &ch);
   679         -	} else if (((UCHAR(*p)-0x80)) < 0x20) {
   680         -	    ch = cp1252[UCHAR(*p++)-0x80];
   681    675   	} else {
   682    676   	    ch = UCHAR(*p++);
   683    677   	}
   684    678   	*w++ = ch;
   685    679       }
   686    680       *w = '\0';
   687    681       Tcl_DStringSetLength(dsPtr,

Changes to generic/tclUtil.c.

  2117   2117   	    Tcl_AppendToObj(resPtr, " ", 1);
  2118   2118   	}
  2119   2119   	Tcl_AppendToObj(resPtr, element, elemLength);
  2120   2120   	needSpace = 1;
  2121   2121       }
  2122   2122       return resPtr;
  2123   2123   }
  2124         -
  2125         -/*
  2126         - *----------------------------------------------------------------------
  2127         - *
  2128         - * Tcl_StringMatch --
  2129         - *
  2130         - *	See if a particular string matches a particular pattern.
  2131         - *
  2132         - * Results:
  2133         - *	The return value is 1 if string matches pattern, and 0 otherwise. The
  2134         - *	matching operation permits the following special characters in the
  2135         - *	pattern: *?\[] (see the manual entry for details on what these mean).
  2136         - *
  2137         - * Side effects:
  2138         - *	None.
  2139         - *
  2140         - *----------------------------------------------------------------------
  2141         - */
  2142         -
  2143         -int
  2144         -Tcl_StringMatch(
  2145         -    const char *str,		/* String. */
  2146         -    const char *pattern)	/* Pattern, which may contain special
  2147         -				 * characters. */
  2148         -{
  2149         -    return Tcl_StringCaseMatch(str, pattern, 0);
  2150         -}
  2151   2124   
  2152   2125   /*
  2153   2126    *----------------------------------------------------------------------
  2154   2127    *
  2155   2128    * Tcl_StringCaseMatch --
  2156   2129    *
  2157   2130    *	See if a particular string matches a particular pattern. Allows case

Changes to generic/tclZipfs.c.

  4768   4768   	 */
  4769   4769   
  4770   4770   	Tcl_GetEnsembleMappingDict(NULL, ensemble, &mapObj);
  4771   4771   	Tcl_DictObjPut(NULL, mapObj, Tcl_NewStringObj("find", -1),
  4772   4772   		Tcl_NewStringObj("::tcl::zipfs::find", -1));
  4773   4773   	Tcl_CreateObjCommand(interp, "::tcl::zipfs::tcl_library_init",
  4774   4774   		ZipFSTclLibraryObjCmd, NULL, NULL);
  4775         -	Tcl_PkgProvide(interp, "zipfs", "2.0");
         4775  +	Tcl_PkgProvideEx(interp, "zipfs", "2.0", NULL);
  4776   4776       }
  4777   4777       return TCL_OK;
  4778   4778   #else /* !HAVE_ZLIB */
  4779   4779       ZIPFS_ERROR(interp, "no zlib available");
  4780   4780       Tcl_SetErrorCode(interp, "TCL", "ZIPFS", "NO_ZLIB", NULL);
  4781   4781       return TCL_ERROR;
  4782   4782   #endif /* HAVE_ZLIB */

Changes to generic/tclZlib.c.

   419    419       GzipHeader *headerPtr,	/* Where to store the parsed-out values. */
   420    420       int *extraSizePtr)		/* Variable to add the length of header
   421    421   				 * strings (filename, comment) to. */
   422    422   {
   423    423       Tcl_Obj *value;
   424    424       int len, result = TCL_ERROR;
   425    425       size_t length;
          426  +    Tcl_WideInt wideValue;
   426    427       const char *valueStr;
   427    428       Tcl_Encoding latin1enc;
   428    429       static const char *const types[] = {
   429    430   	"binary", "text"
   430    431       };
   431    432   
   432    433       /*
................................................................................
   482    483       /*
   483    484        * Ignore the 'size' field, since that is controlled by the size of the
   484    485        * input data.
   485    486        */
   486    487   
   487    488       if (GetValue(interp, dictObj, "time", &value) != TCL_OK) {
   488    489   	goto error;
   489         -    } else if (value != NULL && Tcl_GetLongFromObj(interp, value,
   490         -	    (long *) &headerPtr->header.time) != TCL_OK) {
          490  +    } else if (value != NULL && Tcl_GetWideIntFromObj(interp, value,
          491  +	    &wideValue) != TCL_OK) {
   491    492   	goto error;
   492    493       }
          494  +    headerPtr->header.time = wideValue;
   493    495   
   494    496       if (GetValue(interp, dictObj, "type", &value) != TCL_OK) {
   495    497   	goto error;
   496    498       } else if (value != NULL && Tcl_GetIndexFromObj(interp, value, types,
   497    499   	    "type", TCL_EXACT, &headerPtr->header.text) != TCL_OK) {
   498    500   	goto error;
   499    501       }
................................................................................
  1513   1515   	    /*
  1514   1516   	     * Get the next chunk off our list of chunks and grab the data out
  1515   1517   	     * of it.
  1516   1518   	     */
  1517   1519   
  1518   1520   	    Tcl_ListObjIndex(NULL, zshPtr->outData, 0, &itemObj);
  1519   1521   	    itemPtr = TclGetByteArrayFromObj(itemObj, &itemLen);
  1520         -	    if (itemLen-zshPtr->outPos >= (size_t)(count-dataPos)) {
         1522  +	    if (itemLen-zshPtr->outPos + dataPos >= count) {
  1521   1523   		size_t len = count - dataPos;
  1522   1524   
  1523   1525   		memcpy(dataPtr + dataPos, itemPtr + zshPtr->outPos, len);
  1524   1526   		zshPtr->outPos += len;
  1525   1527   		dataPos += len;
  1526   1528   		if (zshPtr->outPos == itemLen) {
  1527   1529   		    zshPtr->outPos = 0;
................................................................................
  3926   3928   
  3927   3929       TclRegisterCommandTypeName(ZlibStreamCmd, "zlibStream");
  3928   3930   
  3929   3931       /*
  3930   3932        * Formally provide the package as a Tcl built-in.
  3931   3933        */
  3932   3934   
  3933         -    return Tcl_PkgProvide(interp, "zlib", TCL_ZLIB_VERSION);
         3935  +    return Tcl_PkgProvideEx(interp, "zlib", TCL_ZLIB_VERSION, NULL);
  3934   3936   }
  3935   3937   
  3936   3938   /*
  3937   3939    *----------------------------------------------------------------------
  3938   3940    *	Stubs used when a suitable zlib installation was not found during
  3939   3941    *	configure.
  3940   3942    *----------------------------------------------------------------------

Changes to library/tzdata/America/Metlakatla.

    43     43       {1446372000 -32400 0 AKST}
    44     44       {1457866800 -28800 1 AKDT}
    45     45       {1478426400 -32400 0 AKST}
    46     46       {1489316400 -28800 1 AKDT}
    47     47       {1509876000 -32400 0 AKST}
    48     48       {1520766000 -28800 1 AKDT}
    49     49       {1541329200 -28800 0 PST}
    50         -    {1552215600 -28800 0 AKDT}
           50  +    {1547978400 -32400 0 AKST}
           51  +    {1552215600 -28800 1 AKDT}
    51     52       {1572775200 -32400 0 AKST}
    52     53       {1583665200 -28800 1 AKDT}
    53     54       {1604224800 -32400 0 AKST}
    54     55       {1615719600 -28800 1 AKDT}
    55     56       {1636279200 -32400 0 AKST}
    56     57       {1647169200 -28800 1 AKDT}
    57     58       {1667728800 -32400 0 AKST}

Changes to library/tzdata/Asia/Gaza.

    36     36       {-102643200 7200 0 EET}
    37     37       {-84330000 10800 1 EEST}
    38     38       {-81313200 10800 0 IST}
    39     39       {142376400 10800 1 IDT}
    40     40       {150843600 7200 0 IST}
    41     41       {167176800 10800 1 IDT}
    42     42       {178664400 7200 0 IST}
           43  +    {334015200 10800 1 IDT}
           44  +    {337644000 7200 0 IST}
           45  +    {452556000 10800 1 IDT}
           46  +    {462232800 7200 0 IST}
    43     47       {482277600 10800 1 IDT}
    44     48       {495579600 7200 0 IST}
    45     49       {516751200 10800 1 IDT}
    46     50       {526424400 7200 0 IST}
    47     51       {545436000 10800 1 IDT}
    48     52       {558478800 7200 0 IST}
    49     53       {576626400 10800 1 IDT}
................................................................................
   109    113       {1445547600 7200 0 EET}
   110    114       {1458946800 10800 1 EEST}
   111    115       {1477692000 7200 0 EET}
   112    116       {1490396400 10800 1 EEST}
   113    117       {1509141600 7200 0 EET}
   114    118       {1521846000 10800 1 EEST}
   115    119       {1540591200 7200 0 EET}
   116         -    {1553295600 10800 1 EEST}
          120  +    {1553900400 10800 1 EEST}
   117    121       {1572040800 7200 0 EET}
   118    122       {1585350000 10800 1 EEST}
   119    123       {1604095200 7200 0 EET}
   120    124       {1616799600 10800 1 EEST}
   121    125       {1635544800 7200 0 EET}
   122    126       {1648249200 10800 1 EEST}
   123    127       {1666994400 7200 0 EET}
   124    128       {1679698800 10800 1 EEST}
   125    129       {1698444000 7200 0 EET}
   126         -    {1711148400 10800 1 EEST}
          130  +    {1711753200 10800 1 EEST}
   127    131       {1729893600 7200 0 EET}
   128         -    {1742598000 10800 1 EEST}
          132  +    {1743202800 10800 1 EEST}
   129    133       {1761343200 7200 0 EET}
   130    134       {1774652400 10800 1 EEST}
   131    135       {1793397600 7200 0 EET}
   132    136       {1806102000 10800 1 EEST}
   133    137       {1824847200 7200 0 EET}
   134    138       {1837551600 10800 1 EEST}
   135    139       {1856296800 7200 0 EET}
   136    140       {1869001200 10800 1 EEST}
   137    141       {1887746400 7200 0 EET}
   138         -    {1900450800 10800 1 EEST}
          142  +    {1901055600 10800 1 EEST}
   139    143       {1919196000 7200 0 EET}
   140         -    {1931900400 10800 1 EEST}
          144  +    {1932505200 10800 1 EEST}
   141    145       {1950645600 7200 0 EET}
   142    146       {1963954800 10800 1 EEST}
   143    147       {1982700000 7200 0 EET}
   144    148       {1995404400 10800 1 EEST}
   145    149       {2014149600 7200 0 EET}
   146    150       {2026854000 10800 1 EEST}
   147    151       {2045599200 7200 0 EET}
   148    152       {2058303600 10800 1 EEST}
   149    153       {2077048800 7200 0 EET}
   150         -    {2089753200 10800 1 EEST}
          154  +    {2090358000 10800 1 EEST}
   151    155       {2108498400 7200 0 EET}
   152    156       {2121807600 10800 1 EEST}
   153    157       {2140552800 7200 0 EET}
   154    158       {2153257200 10800 1 EEST}
   155    159       {2172002400 7200 0 EET}
   156    160       {2184706800 10800 1 EEST}
   157    161       {2203452000 7200 0 EET}
   158    162       {2216156400 10800 1 EEST}
   159    163       {2234901600 7200 0 EET}
   160         -    {2247606000 10800 1 EEST}
          164  +    {2248210800 10800 1 EEST}
   161    165       {2266351200 7200 0 EET}
   162         -    {2279055600 10800 1 EEST}
          166  +    {2279660400 10800 1 EEST}
   163    167       {2297800800 7200 0 EET}
   164    168       {2311110000 10800 1 EEST}
   165    169       {2329855200 7200 0 EET}
   166    170       {2342559600 10800 1 EEST}
   167    171       {2361304800 7200 0 EET}
   168    172       {2374009200 10800 1 EEST}
   169    173       {2392754400 7200 0 EET}
   170    174       {2405458800 10800 1 EEST}
   171    175       {2424204000 7200 0 EET}
   172         -    {2436908400 10800 1 EEST}
          176  +    {2437513200 10800 1 EEST}
   173    177       {2455653600 7200 0 EET}
   174    178       {2468962800 10800 1 EEST}
   175    179       {2487708000 7200 0 EET}
   176    180       {2500412400 10800 1 EEST}
   177    181       {2519157600 7200 0 EET}
   178    182       {2531862000 10800 1 EEST}
   179    183       {2550607200 7200 0 EET}
   180    184       {2563311600 10800 1 EEST}
   181    185       {2582056800 7200 0 EET}
   182         -    {2594761200 10800 1 EEST}
          186  +    {2595366000 10800 1 EEST}
   183    187       {2613506400 7200 0 EET}
   184         -    {2626210800 10800 1 EEST}
          188  +    {2626815600 10800 1 EEST}
   185    189       {2644956000 7200 0 EET}
   186    190       {2658265200 10800 1 EEST}
   187    191       {2677010400 7200 0 EET}
   188    192       {2689714800 10800 1 EEST}
   189    193       {2708460000 7200 0 EET}
   190    194       {2721164400 10800 1 EEST}
   191    195       {2739909600 7200 0 EET}
   192    196       {2752614000 10800 1 EEST}
   193    197       {2771359200 7200 0 EET}
   194         -    {2784063600 10800 1 EEST}
          198  +    {2784668400 10800 1 EEST}
   195    199       {2802808800 7200 0 EET}
   196         -    {2815513200 10800 1 EEST}
          200  +    {2816118000 10800 1 EEST}
   197    201       {2834258400 7200 0 EET}
   198    202       {2847567600 10800 1 EEST}
   199    203       {2866312800 7200 0 EET}
   200    204       {2879017200 10800 1 EEST}
   201    205       {2897762400 7200 0 EET}
   202    206       {2910466800 10800 1 EEST}
   203    207       {2929212000 7200 0 EET}
   204    208       {2941916400 10800 1 EEST}
   205    209       {2960661600 7200 0 EET}
   206         -    {2973366000 10800 1 EEST}
          210  +    {2973970800 10800 1 EEST}
   207    211       {2992111200 7200 0 EET}
   208    212       {3005420400 10800 1 EEST}
   209    213       {3024165600 7200 0 EET}
   210    214       {3036870000 10800 1 EEST}
   211    215       {3055615200 7200 0 EET}
   212    216       {3068319600 10800 1 EEST}
   213    217       {3087064800 7200 0 EET}
   214    218       {3099769200 10800 1 EEST}
   215    219       {3118514400 7200 0 EET}
   216         -    {3131218800 10800 1 EEST}
          220  +    {3131823600 10800 1 EEST}
   217    221       {3149964000 7200 0 EET}
   218         -    {3162668400 10800 1 EEST}
          222  +    {3163273200 10800 1 EEST}
   219    223       {3181413600 7200 0 EET}
   220    224       {3194722800 10800 1 EEST}
   221    225       {3213468000 7200 0 EET}
   222    226       {3226172400 10800 1 EEST}
   223    227       {3244917600 7200 0 EET}
   224    228       {3257622000 10800 1 EEST}
   225    229       {3276367200 7200 0 EET}
   226    230       {3289071600 10800 1 EEST}
   227    231       {3307816800 7200 0 EET}
   228         -    {3320521200 10800 1 EEST}
          232  +    {3321126000 10800 1 EEST}
   229    233       {3339266400 7200 0 EET}
   230    234       {3352575600 10800 1 EEST}
   231    235       {3371320800 7200 0 EET}
   232    236       {3384025200 10800 1 EEST}
   233    237       {3402770400 7200 0 EET}
   234    238       {3415474800 10800 1 EEST}
   235    239       {3434220000 7200 0 EET}
   236    240       {3446924400 10800 1 EEST}
   237    241       {3465669600 7200 0 EET}
   238         -    {3478374000 10800 1 EEST}
          242  +    {3478978800 10800 1 EEST}
   239    243       {3497119200 7200 0 EET}
   240         -    {3509823600 10800 1 EEST}
          244  +    {3510428400 10800 1 EEST}
   241    245       {3528568800 7200 0 EET}
   242    246       {3541878000 10800 1 EEST}
   243    247       {3560623200 7200 0 EET}
   244    248       {3573327600 10800 1 EEST}
   245    249       {3592072800 7200 0 EET}
   246    250       {3604777200 10800 1 EEST}
   247    251       {3623522400 7200 0 EET}
   248    252       {3636226800 10800 1 EEST}
   249    253       {3654972000 7200 0 EET}
   250         -    {3667676400 10800 1 EEST}
          254  +    {3668281200 10800 1 EEST}
   251    255       {3686421600 7200 0 EET}
   252         -    {3699126000 10800 1 EEST}
          256  +    {3699730800 10800 1 EEST}
   253    257       {3717871200 7200 0 EET}
   254    258       {3731180400 10800 1 EEST}
   255    259       {3749925600 7200 0 EET}
   256    260       {3762630000 10800 1 EEST}
   257    261       {3781375200 7200 0 EET}
   258    262       {3794079600 10800 1 EEST}
   259    263       {3812824800 7200 0 EET}
   260    264       {3825529200 10800 1 EEST}
   261    265       {3844274400 7200 0 EET}
   262         -    {3856978800 10800 1 EEST}
          266  +    {3857583600 10800 1 EEST}
   263    267       {3875724000 7200 0 EET}
   264    268       {3889033200 10800 1 EEST}
   265    269       {3907778400 7200 0 EET}
   266    270       {3920482800 10800 1 EEST}
   267    271       {3939228000 7200 0 EET}
   268    272       {3951932400 10800 1 EEST}
   269    273       {3970677600 7200 0 EET}
   270    274       {3983382000 10800 1 EEST}
   271    275       {4002127200 7200 0 EET}
   272         -    {4014831600 10800 1 EEST}
          276  +    {4015436400 10800 1 EEST}
   273    277       {4033576800 7200 0 EET}
   274         -    {4046281200 10800 1 EEST}
          278  +    {4046886000 10800 1 EEST}
   275    279       {4065026400 7200 0 EET}
   276    280       {4078335600 10800 1 EEST}
   277    281       {4097080800 7200 0 EET}
   278    282   }

Changes to library/tzdata/Asia/Hebron.

    36     36       {-102643200 7200 0 EET}
    37     37       {-84330000 10800 1 EEST}
    38     38       {-81313200 10800 0 IST}
    39     39       {142376400 10800 1 IDT}
    40     40       {150843600 7200 0 IST}
    41     41       {167176800 10800 1 IDT}
    42     42       {178664400 7200 0 IST}
           43  +    {334015200 10800 1 IDT}
           44  +    {337644000 7200 0 IST}
           45  +    {452556000 10800 1 IDT}
           46  +    {462232800 7200 0 IST}
    43     47       {482277600 10800 1 IDT}
    44     48       {495579600 7200 0 IST}
    45     49       {516751200 10800 1 IDT}
    46     50       {526424400 7200 0 IST}
    47     51       {545436000 10800 1 IDT}
    48     52       {558478800 7200 0 IST}
    49     53       {576626400 10800 1 IDT}
................................................................................
   108    112       {1445547600 7200 0 EET}
   109    113       {1458946800 10800 1 EEST}
   110    114       {1477692000 7200 0 EET}
   111    115       {1490396400 10800 1 EEST}
   112    116       {1509141600 7200 0 EET}
   113    117       {1521846000 10800 1 EEST}
   114    118       {1540591200 7200 0 EET}
   115         -    {1553295600 10800 1 EEST}
          119  +    {1553900400 10800 1 EEST}
   116    120       {1572040800 7200 0 EET}
   117    121       {1585350000 10800 1 EEST}
   118    122       {1604095200 7200 0 EET}
   119    123       {1616799600 10800 1 EEST}
   120    124       {1635544800 7200 0 EET}
   121    125       {1648249200 10800 1 EEST}
   122    126       {1666994400 7200 0 EET}
   123    127       {1679698800 10800 1 EEST}
   124    128       {1698444000 7200 0 EET}
   125         -    {1711148400 10800 1 EEST}
          129  +    {1711753200 10800 1 EEST}
   126    130       {1729893600 7200 0 EET}
   127         -    {1742598000 10800 1 EEST}
          131  +    {1743202800 10800 1 EEST}
   128    132       {1761343200 7200 0 EET}
   129    133       {1774652400 10800 1 EEST}
   130    134       {1793397600 7200 0 EET}
   131    135       {1806102000 10800 1 EEST}
   132    136       {1824847200 7200 0 EET}
   133    137       {1837551600 10800 1 EEST}
   134    138       {1856296800 7200 0 EET}
   135    139       {1869001200 10800 1 EEST}
   136    140       {1887746400 7200 0 EET}
   137         -    {1900450800 10800 1 EEST}
          141  +    {1901055600 10800 1 EEST}
   138    142       {1919196000 7200 0 EET}
   139         -    {1931900400 10800 1 EEST}
          143  +    {1932505200 10800 1 EEST}
   140    144       {1950645600 7200 0 EET}
   141    145       {1963954800 10800 1 EEST}
   142    146       {1982700000 7200 0 EET}
   143    147       {1995404400 10800 1 EEST}
   144    148       {2014149600 7200 0 EET}
   145    149       {2026854000 10800 1 EEST}
   146    150       {2045599200 7200 0 EET}
   147    151       {2058303600 10800 1 EEST}
   148    152       {2077048800 7200 0 EET}
   149         -    {2089753200 10800 1 EEST}
          153  +    {2090358000 10800 1 EEST}
   150    154       {2108498400 7200 0 EET}
   151    155       {2121807600 10800 1 EEST}
   152    156       {2140552800 7200 0 EET}
   153    157       {2153257200 10800 1 EEST}
   154    158       {2172002400 7200 0 EET}
   155    159       {2184706800 10800 1 EEST}
   156    160       {2203452000 7200 0 EET}
   157    161       {2216156400 10800 1 EEST}
   158    162       {2234901600 7200 0 EET}
   159         -    {2247606000 10800 1 EEST}
          163  +    {2248210800 10800 1 EEST}
   160    164       {2266351200 7200 0 EET}
   161         -    {2279055600 10800 1 EEST}
          165  +    {2279660400 10800 1 EEST}
   162    166       {2297800800 7200 0 EET}
   163    167       {2311110000 10800 1 EEST}
   164    168       {2329855200 7200 0 EET}
   165    169       {2342559600 10800 1 EEST}
   166    170       {2361304800 7200 0 EET}
   167    171       {2374009200 10800 1 EEST}
   168    172       {2392754400 7200 0 EET}
   169    173       {2405458800 10800 1 EEST}
   170    174       {2424204000 7200 0 EET}
   171         -    {2436908400 10800 1 EEST}
          175  +    {2437513200 10800 1 EEST}
   172    176       {2455653600 7200 0 EET}
   173    177       {2468962800 10800 1 EEST}
   174    178       {2487708000 7200 0 EET}
   175    179       {2500412400 10800 1 EEST}
   176    180       {2519157600 7200 0 EET}
   177    181       {2531862000 10800 1 EEST}
   178    182       {2550607200 7200 0 EET}
   179    183       {2563311600 10800 1 EEST}
   180    184       {2582056800 7200 0 EET}
   181         -    {2594761200 10800 1 EEST}
          185  +    {2595366000 10800 1 EEST}
   182    186       {2613506400 7200 0 EET}
   183         -    {2626210800 10800 1 EEST}
          187  +    {2626815600 10800 1 EEST}
   184    188       {2644956000 7200 0 EET}
   185    189       {2658265200 10800 1 EEST}
   186    190       {2677010400 7200 0 EET}
   187    191       {2689714800 10800 1 EEST}
   188    192       {2708460000 7200 0 EET}
   189    193       {2721164400 10800 1 EEST}
   190    194       {2739909600 7200 0 EET}
   191    195       {2752614000 10800 1 EEST}
   192    196       {2771359200 7200 0 EET}
   193         -    {2784063600 10800 1 EEST}
          197  +    {2784668400 10800 1 EEST}
   194    198       {2802808800 7200 0 EET}
   195         -    {2815513200 10800 1 EEST}
          199  +    {2816118000 10800 1 EEST}
   196    200       {2834258400 7200 0 EET}
   197    201       {2847567600 10800 1 EEST}
   198    202       {2866312800 7200 0 EET}
   199    203       {2879017200 10800 1 EEST}
   200    204       {2897762400 7200 0 EET}
   201    205       {2910466800 10800 1 EEST}
   202    206       {2929212000 7200 0 EET}
   203    207       {2941916400 10800 1 EEST}
   204    208       {2960661600 7200 0 EET}
   205         -    {2973366000 10800 1 EEST}
          209  +    {2973970800 10800 1 EEST}
   206    210       {2992111200 7200 0 EET}
   207    211       {3005420400 10800 1 EEST}
   208    212       {3024165600 7200 0 EET}
   209    213       {3036870000 10800 1 EEST}
   210    214       {3055615200 7200 0 EET}
   211    215       {3068319600 10800 1 EEST}
   212    216       {3087064800 7200 0 EET}
   213    217       {3099769200 10800 1 EEST}
   214    218       {3118514400 7200 0 EET}
   215         -    {3131218800 10800 1 EEST}
          219  +    {3131823600 10800 1 EEST}
   216    220       {3149964000 7200 0 EET}
   217         -    {3162668400 10800 1 EEST}
          221  +    {3163273200 10800 1 EEST}
   218    222       {3181413600 7200 0 EET}
   219    223       {3194722800 10800 1 EEST}
   220    224       {3213468000 7200 0 EET}
   221    225       {3226172400 10800 1 EEST}
   222    226       {3244917600 7200 0 EET}
   223    227       {3257622000 10800 1 EEST}
   224    228       {3276367200 7200 0 EET}
   225    229       {3289071600 10800 1 EEST}
   226    230       {3307816800 7200 0 EET}
   227         -    {3320521200 10800 1 EEST}
          231  +    {3321126000 10800 1 EEST}
   228    232       {3339266400 7200 0 EET}
   229    233       {3352575600 10800 1 EEST}
   230    234       {3371320800 7200 0 EET}
   231    235       {3384025200 10800 1 EEST}
   232    236       {3402770400 7200 0 EET}
   233    237       {3415474800 10800 1 EEST}
   234    238       {3434220000 7200 0 EET}
   235    239       {3446924400 10800 1 EEST}
   236    240       {3465669600 7200 0 EET}
   237         -    {3478374000 10800 1 EEST}
          241  +    {3478978800 10800 1 EEST}
   238    242       {3497119200 7200 0 EET}
   239         -    {3509823600 10800 1 EEST}
          243  +    {3510428400 10800 1 EEST}
   240    244       {3528568800 7200 0 EET}
   241    245       {3541878000 10800 1 EEST}
   242    246       {3560623200 7200 0 EET}
   243    247       {3573327600 10800 1 EEST}
   244    248       {3592072800 7200 0 EET}
   245    249       {3604777200 10800 1 EEST}
   246    250       {3623522400 7200 0 EET}
   247    251       {3636226800 10800 1 EEST}
   248    252       {3654972000 7200 0 EET}
   249         -    {3667676400 10800 1 EEST}
          253  +    {3668281200 10800 1 EEST}
   250    254       {3686421600 7200 0 EET}
   251         -    {3699126000 10800 1 EEST}
          255  +    {3699730800 10800 1 EEST}
   252    256       {3717871200 7200 0 EET}
   253    257       {3731180400 10800 1 EEST}
   254    258       {3749925600 7200 0 EET}
   255    259       {3762630000 10800 1 EEST}
   256    260       {3781375200 7200 0 EET}
   257    261       {3794079600 10800 1 EEST}
   258    262       {3812824800 7200 0 EET}
   259    263       {3825529200 10800 1 EEST}
   260    264       {3844274400 7200 0 EET}
   261         -    {3856978800 10800 1 EEST}
          265  +    {3857583600 10800 1 EEST}
   262    266       {3875724000 7200 0 EET}
   263    267       {3889033200 10800 1 EEST}
   264    268       {3907778400 7200 0 EET}
   265    269       {3920482800 10800 1 EEST}
   266    270       {3939228000 7200 0 EET}
   267    271       {3951932400 10800 1 EEST}
   268    272       {3970677600 7200 0 EET}
   269    273       {3983382000 10800 1 EEST}
   270    274       {4002127200 7200 0 EET}
   271         -    {4014831600 10800 1 EEST}
          275  +    {4015436400 10800 1 EEST}
   272    276       {4033576800 7200 0 EET}
   273         -    {4046281200 10800 1 EEST}
          277  +    {4046886000 10800 1 EEST}
   274    278       {4065026400 7200 0 EET}
   275    279       {4078335600 10800 1 EEST}
   276    280       {4097080800 7200 0 EET}
   277    281   }

Changes to library/tzdata/Asia/Jerusalem.

    35     35       {-418262400 7200 0 IST}
    36     36       {-400032000 10800 1 IDT}
    37     37       {-387428400 7200 0 IST}
    38     38       {142380000 10800 1 IDT}
    39     39       {150843600 7200 0 IST}
    40     40       {167176800 10800 1 IDT}
    41     41       {178664400 7200 0 IST}
           42  +    {334015200 10800 1 IDT}
           43  +    {337644000 7200 0 IST}
           44  +    {452556000 10800 1 IDT}
           45  +    {462232800 7200 0 IST}
    42     46       {482277600 10800 1 IDT}
    43     47       {495579600 7200 0 IST}
    44     48       {516751200 10800 1 IDT}
    45     49       {526424400 7200 0 IST}
    46     50       {545436000 10800 1 IDT}
    47     51       {558478800 7200 0 IST}
    48     52       {576626400 10800 1 IDT}

Changes to library/tzdata/Etc/UCT.

     1      1   # created by tools/tclZIC.tcl - do not edit
     2         -
     3         -set TZData(:Etc/UCT) {
     4         -    {-9223372036854775808 0 0 UCT}
            2  +if {![info exists TZData(Etc/UTC)]} {
            3  +    LoadTimeZoneFile Etc/UTC
     5      4   }
            5  +set TZData(:Etc/UCT) $TZData(:Etc/UTC)

Changes to library/tzdata/UCT.

     1      1   # created by tools/tclZIC.tcl - do not edit
     2         -if {![info exists TZData(Etc/UCT)]} {
     3         -    LoadTimeZoneFile Etc/UCT
            2  +if {![info exists TZData(Etc/UTC)]} {
            3  +    LoadTimeZoneFile Etc/UTC
     4      4   }
     5         -set TZData(:UCT) $TZData(:Etc/UCT)
            5  +set TZData(:UCT) $TZData(:Etc/UTC)

Changes to libtommath/bn_mp_get_bit.c.

    23     23   
    24     24      if (b < 0) {
    25     25         return MP_VAL;
    26     26      }
    27     27   
    28     28      limb = b / DIGIT_BIT;
    29     29   
    30         -   /*
    31         -    * Zero is a special value with the member "used" set to zero.
    32         -    * Needs to be tested before the check for the upper boundary
    33         -    * otherwise (limb >= a->used) would be true for a = 0
    34         -    */
    35         -
    36         -   if (mp_iszero(a) != MP_NO) {
    37         -      return MP_NO;
    38         -   }
    39         -
    40     30      if (limb >= a->used) {
    41         -      return MP_VAL;
           31  +      return MP_NO;
    42     32      }
    43     33   
    44     34      bit = (mp_digit)(1) << (b % DIGIT_BIT);
    45     35   
    46     36      isset = a->dp[limb] & bit;
    47     37      return (isset != 0u) ? MP_YES : MP_NO;
    48     38   }
    49     39   
    50     40   #endif
    51     41   
    52     42   /* ref:         $Format:%D$ */
    53     43   /* git commit:  $Format:%H$ */
    54     44   /* commit time: $Format:%ai$ */

Changes to libtommath/bn_mp_get_int.c.

    11     11    *
    12     12    * SPDX-License-Identifier: Unlicense
    13     13    */
    14     14   
    15     15   /* get the lower 32-bits of an mp_int */
    16     16   unsigned long mp_get_int(const mp_int *a)
    17     17   {
    18         -   int i;
    19         -   mp_min_u32 res;
    20         -
    21         -   if (a->used == 0) {
    22         -      return 0;
    23         -   }
    24         -
    25         -   /* get number of digits of the lsb we have to read */
    26         -   i = MIN(a->used, ((((int)sizeof(unsigned long) * CHAR_BIT) + DIGIT_BIT - 1) / DIGIT_BIT)) - 1;
    27         -
    28         -   /* get most significant digit of result */
    29         -   res = DIGIT(a, i);
    30         -
    31         -   while (--i >= 0) {
    32         -      res = (res << DIGIT_BIT) | DIGIT(a, i);
    33         -   }
    34         -
    35     18      /* force result to 32-bits always so it is consistent on non 32-bit platforms */
    36         -   return res & 0xFFFFFFFFUL;
           19  +   return mp_get_long(a) & 0xFFFFFFFFUL;
    37     20   }
    38     21   #endif
    39     22   
    40     23   /* ref:         $Format:%D$ */
    41     24   /* git commit:  $Format:%H$ */
    42     25   /* commit time: $Format:%ai$ */

Changes to libtommath/tommath.h.

    19     19   #include "tommath_class.h"
    20     20   
    21     21   #ifdef __cplusplus
    22     22   extern "C" {
    23     23   #endif
    24     24   
    25     25   /* MS Visual C++ doesn't have a 128bit type for words, so fall back to 32bit MPI's (where words are 64bit) */
    26         -#if defined(_MSC_VER) || defined(__LLP64__) || defined(__e2k__) || defined(__LCC__)
           26  +#if defined(_WIN32) || defined(__LLP64__) || defined(__e2k__) || defined(__LCC__)
    27     27   #   define MP_32BIT
    28     28   #endif
    29     29   
    30     30   /* detect 64-bit mode if possible */
    31     31   #if defined(__x86_64__) || defined(_M_X64) || defined(_M_AMD64) || \
    32     32       defined(__powerpc64__) || defined(__ppc64__) || defined(__PPC64__) || \
    33     33       defined(__s390x__) || defined(__arch64__) || defined(__aarch64__) || \
................................................................................
    87     87   #   else
    88     88   /* default case is 28-bit digits, defines MP_28BIT as a handy macro to test */
    89     89   #      define DIGIT_BIT 28
    90     90   #      define MP_28BIT
    91     91   #   endif
    92     92   #endif
    93     93   
    94         -/* otherwise the bits per digit is calculated automatically from the size of a mp_digit */
    95         -#ifndef DIGIT_BIT
    96         -#   define DIGIT_BIT (((CHAR_BIT * MP_SIZEOF_MP_DIGIT) - 1))  /* bits per digit */
    97         -typedef unsigned long mp_min_u32;
    98         -#else
    99         -typedef mp_digit mp_min_u32;
   100         -#endif
   101         -
   102         -#define MP_DIGIT_BIT     DIGIT_BIT
   103     94   #define MP_MASK          ((((mp_digit)1)<<((mp_digit)DIGIT_BIT))-((mp_digit)1))
   104         -#define MP_DIGIT_MAX     MP_MASK
   105     95   
   106     96   /* equalities */
   107     97   #define MP_LT        -1   /* less than */
   108     98   #define MP_EQ         0   /* equal to */
   109     99   #define MP_GT         1   /* greater than */
   110    100   
   111    101   #define MP_ZPOS       0   /* positive integer */
................................................................................
   123    113   /* Primality generation flags */
   124    114   #define LTM_PRIME_BBS      0x0001 /* BBS style prime */
   125    115   #define LTM_PRIME_SAFE     0x0002 /* Safe prime (p-1)/2 == prime */
   126    116   #define LTM_PRIME_2MSB_ON  0x0008 /* force 2nd MSB to 1 */
   127    117   
   128    118   typedef int           mp_err;
   129    119   
   130         -/* you'll have to tune these... */
   131         -extern int KARATSUBA_MUL_CUTOFF,
   132         -       KARATSUBA_SQR_CUTOFF,
   133         -       TOOM_MUL_CUTOFF,
   134         -       TOOM_SQR_CUTOFF;
   135         -
   136    120   /* define this to use lower memory usage routines (exptmods mostly) */
   137    121   /* #define MP_LOW_MEM */
   138    122   
   139    123   /* default precision */
   140    124   #ifndef MP_PREC
   141    125   #   ifndef MP_LOW_MEM
   142    126   #      define MP_PREC 32        /* default digits of precision */
   143    127   #   else
   144    128   #      define MP_PREC 8         /* default digits of precision */
   145    129   #   endif
   146    130   #endif
   147    131   
   148         -/* size of comba arrays, should be at least 2 * 2**(BITS_PER_WORD - BITS_PER_DIGIT*2) */
   149         -#define MP_WARRAY               (1u << (((sizeof(mp_word) * CHAR_BIT) - (2 * DIGIT_BIT)) + 1))
   150         -
   151    132   /* the infamous mp_int structure */
   152    133   typedef struct  {
   153    134      int used, alloc, sign;
   154    135      mp_digit *dp;
   155    136   } mp_int;
   156    137   
   157    138   /* callback for mp_prime_random, should fill dst with random bytes and return how many read [upto len] */
   158    139   typedef int ltm_prime_callback(unsigned char *dst, int len, void *dat);
   159    140   
   160    141   
   161         -#define USED(m)     ((m)->used)
   162         -#define DIGIT(m, k) ((m)->dp[(k)])
   163         -#define SIGN(m)     ((m)->sign)
   164         -
   165    142   /* error code to char* string */
   166    143   const char *mp_error_to_string(int code);
   167    144   
   168    145   /* ---> init and deinit bignum functions <--- */
   169    146   /* init a bignum */
   170    147   int mp_init(mp_int *a);
   171    148   
................................................................................
   188    165   int mp_grow(mp_int *a, int size);
   189    166   
   190    167   /* init to a given number of digits */
   191    168   int mp_init_size(mp_int *a, int size);
   192    169   
   193    170   /* ---> Basic Manipulations <--- */
   194    171   #define mp_iszero(a) (((a)->used == 0) ? MP_YES : MP_NO)
   195         -#define mp_iseven(a) ((((a)->used == 0) || (((a)->dp[0] & 1u) == 0u)) ? MP_YES : MP_NO)
   196         -#define mp_isodd(a)  ((((a)->used > 0) && (((a)->dp[0] & 1u) == 1u)) ? MP_YES : MP_NO)
          172  +#define mp_iseven(a) (!mp_get_bit((a),0))
          173  +#define mp_isodd(a)  mp_get_bit((a),0)
   197    174   #define mp_isneg(a)  (((a)->sign != MP_ZPOS) ? MP_YES : MP_NO)
   198    175   
   199    176   /* set to zero */
   200    177   void mp_zero(mp_int *a);
   201    178   
   202    179   /* set to a digit */
   203    180   void mp_set(mp_int *a, mp_digit b);

Changes to libtommath/tommath_private.h.

    38     38   
    39     39   /* define heap macros */
    40     40   #ifndef XMALLOC
    41     41   /* default to libc stuff */
    42     42   #   define XMALLOC   malloc
    43     43   #   define XFREE     free
    44     44   #   define XREALLOC  realloc
    45         -#   define XCALLOC   calloc
    46     45   #elif 0
    47     46   /* prototypes for our heap functions */
    48     47   extern void *XMALLOC(size_t n);
    49     48   extern void *XREALLOC(void *p, size_t n);
    50         -extern void *XCALLOC(size_t n, size_t s);
    51     49   extern void XFREE(void *p);
    52     50   #endif
    53     51   
           52  +/* you'll have to tune these... */
           53  +#define KARATSUBA_MUL_CUTOFF 80      /* Min. number of digits before Karatsuba multiplication is used. */
           54  +#define KARATSUBA_SQR_CUTOFF 120     /* Min. number of digits before Karatsuba squaring is used. */
           55  +#define TOOM_MUL_CUTOFF      350     /* no optimal values of these are known yet so set em high */
           56  +#define TOOM_SQR_CUTOFF      400
           57  +
           58  +/* size of comba arrays, should be at least 2 * 2**(BITS_PER_WORD - BITS_PER_DIGIT*2) */
           59  +#define MP_WARRAY               (1u << (((sizeof(mp_word) * CHAR_BIT) - (2 * DIGIT_BIT)) + 1))
           60  +
    54     61   /* lowlevel functions, do not call! */
    55     62   int s_mp_add(const mp_int *a, const mp_int *b, mp_int *c);
    56     63   int s_mp_sub(const mp_int *a, const mp_int *b, mp_int *c);
    57     64   #define s_mp_mul(a, b, c) s_mp_mul_digs(a, b, c, (a)->used + (b)->used + 1)
    58     65   int fast_s_mp_mul_digs(const mp_int *a, const mp_int *b, mp_int *c, int digs);
    59     66   int s_mp_mul_digs(const mp_int *a, const mp_int *b, mp_int *c, int digs);
    60     67   int fast_s_mp_mul_high_digs(const mp_int *a, const mp_int *b, mp_int *c, int digs);

Changes to macosx/Tcl.xcode/project.pbxproj.

   141    141   		F96D494908F272C3004A47F5 /* bn_mp_toradix_n.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42CB08F272B3004A47F5 /* bn_mp_toradix_n.c */; };
   142    142   		F96D494C08F272C3004A47F5 /* bn_mp_zero.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42CE08F272B3004A47F5 /* bn_mp_zero.c */; };
   143    143   		F96D494E08F272C3004A47F5 /* bn_reverse.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D008F272B3004A47F5 /* bn_reverse.c */; };
   144    144   		F96D494F08F272C3004A47F5 /* bn_s_mp_add.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D108F272B3004A47F5 /* bn_s_mp_add.c */; };
   145    145   		F96D495108F272C3004A47F5 /* bn_s_mp_mul_digs.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D308F272B3004A47F5 /* bn_s_mp_mul_digs.c */; };
   146    146   		F96D495308F272C3004A47F5 /* bn_s_mp_sqr.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D508F272B3004A47F5 /* bn_s_mp_sqr.c */; };
   147    147   		F96D495408F272C3004A47F5 /* bn_s_mp_sub.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D608F272B3004A47F5 /* bn_s_mp_sub.c */; };
   148         -		F96D495508F272C3004A47F5 /* bncore.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D708F272B3004A47F5 /* bncore.c */; };
   149    148   		F96D49A908F272C4004A47F5 /* tclMacOSXBundle.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D433908F272B5004A47F5 /* tclMacOSXBundle.c */; };
   150    149   		F96D49AD08F272C4004A47F5 /* tclMacOSXFCmd.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D433D08F272B5004A47F5 /* tclMacOSXFCmd.c */; };
   151    150   		F96D49AE08F272C4004A47F5 /* tclMacOSXNotify.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D433E08F272B5004A47F5 /* tclMacOSXNotify.c */; };
   152    151   		F96D4AC608F272C9004A47F5 /* tclLoadDyld.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D445B08F272B9004A47F5 /* tclLoadDyld.c */; settings = {COMPILER_FLAGS = "-Wno-deprecated-declarations"; }; };
   153    152   		F96D4ACA08F272C9004A47F5 /* tclUnixChan.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D445F08F272B9004A47F5 /* tclUnixChan.c */; };
   154    153   		F96D4ACB08F272C9004A47F5 /* tclUnixEvent.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D446008F272B9004A47F5 /* tclUnixEvent.c */; };
   155    154   		F96D4ACC08F272C9004A47F5 /* tclUnixFCmd.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D446108F272B9004A47F5 /* tclUnixFCmd.c */; };
................................................................................
   616    615   		F96D42CD08F272B3004A47F5 /* bn_mp_xor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_xor.c; sourceTree = "<group>"; };
   617    616   		F96D42CE08F272B3004A47F5 /* bn_mp_zero.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_zero.c; sourceTree = "<group>"; };
   618    617   		F96D42D008F272B3004A47F5 /* bn_reverse.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_reverse.c; sourceTree = "<group>"; };
   619    618   		F96D42D108F272B3004A47F5 /* bn_s_mp_add.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_add.c; sourceTree = "<group>"; };
   620    619   		F96D42D308F272B3004A47F5 /* bn_s_mp_mul_digs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_mul_digs.c; sourceTree = "<group>"; };
   621    620   		F96D42D508F272B3004A47F5 /* bn_s_mp_sqr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_sqr.c; sourceTree = "<group>"; };
   622    621   		F96D42D608F272B3004A47F5 /* bn_s_mp_sub.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_sub.c; sourceTree = "<group>"; };
   623         -		F96D42D708F272B3004A47F5 /* bncore.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bncore.c; sourceTree = "<group>"; };
   624    622   		F96D432908F272B4004A47F5 /* tommath_class.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tommath_class.h; sourceTree = "<group>"; };
   625    623   		F96D432A08F272B4004A47F5 /* tommath_superclass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tommath_superclass.h; sourceTree = "<group>"; };
   626    624   		F96D432B08F272B4004A47F5 /* license.terms */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; path = license.terms; sourceTree = "<group>"; };
   627    625   		F96D432E08F272B5004A47F5 /* configure.ac */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure.ac; sourceTree = "<group>"; };
   628    626   		F96D432F08F272B5004A47F5 /* GNUmakefile */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = GNUmakefile; sourceTree = "<group>"; };
   629    627   		F96D433108F272B5004A47F5 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
   630    628   		F96D433208F272B5004A47F5 /* Tcl-Info.plist.in */ = {isa = PBXFileReference; explicitFileType = text.plist; fileEncoding = 4; path = "Tcl-Info.plist.in"; sourceTree = "<group>"; };
................................................................................
  1468   1466   				F96D42CD08F272B3004A47F5 /* bn_mp_xor.c */,
  1469   1467   				F96D42CE08F272B3004A47F5 /* bn_mp_zero.c */,
  1470   1468   				F96D42D008F272B3004A47F5 /* bn_reverse.c */,
  1471   1469   				F96D42D108F272B3004A47F5 /* bn_s_mp_add.c */,
  1472   1470   				F96D42D308F272B3004A47F5 /* bn_s_mp_mul_digs.c */,
  1473   1471   				F96D42D508F272B3004A47F5 /* bn_s_mp_sqr.c */,
  1474   1472   				F96D42D608F272B3004A47F5 /* bn_s_mp_sub.c */,
  1475         -				F96D42D708F272B3004A47F5 /* bncore.c */,
  1476   1473   				F96D432908F272B4004A47F5 /* tommath_class.h */,
  1477   1474   				F96D432A08F272B4004A47F5 /* tommath_superclass.h */,
  1478   1475   			);
  1479   1476   			path = libtommath;
  1480   1477   			sourceTree = "<group>";
  1481   1478   		};
  1482   1479   		F96D432C08F272B4004A47F5 /* macosx */ = {
................................................................................
  2100   2097   				F9E61D2D090A48BB002B3151 /* bn_mp_xor.c in Sources */,
  2101   2098   				F96D494C08F272C3004A47F5 /* bn_mp_zero.c in Sources */,
  2102   2099   				F96D494E08F272C3004A47F5 /* bn_reverse.c in Sources */,
  2103   2100   				F96D494F08F272C3004A47F5 /* bn_s_mp_add.c in Sources */,
  2104   2101   				F96D495108F272C3004A47F5 /* bn_s_mp_mul_digs.c in Sources */,
  2105   2102   				F96D495308F272C3004A47F5 /* bn_s_mp_sqr.c in Sources */,
  2106   2103   				F96D495408F272C3004A47F5 /* bn_s_mp_sub.c in Sources */,
  2107         -				F96D495508F272C3004A47F5 /* bncore.c in Sources */,
  2108   2104   				F96D49A908F272C4004A47F5 /* tclMacOSXBundle.c in Sources */,
  2109   2105   				F96D49AD08F272C4004A47F5 /* tclMacOSXFCmd.c in Sources */,
  2110   2106   				F96D49AE08F272C4004A47F5 /* tclMacOSXNotify.c in Sources */,
  2111   2107   				F90509300913A72400327603 /* tclAppInit.c in Sources */,
  2112   2108   				F96D4AC608F272C9004A47F5 /* tclLoadDyld.c in Sources */,
  2113   2109   				F96D4ACA08F272C9004A47F5 /* tclUnixChan.c in Sources */,
  2114   2110   				F9FC77B80AB29E9100B7077D /* tclUnixCompat.c in Sources */,

Changes to macosx/Tcl.xcodeproj/project.pbxproj.

   141    141   		F96D494908F272C3004A47F5 /* bn_mp_toradix_n.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42CB08F272B3004A47F5 /* bn_mp_toradix_n.c */; };
   142    142   		F96D494C08F272C3004A47F5 /* bn_mp_zero.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42CE08F272B3004A47F5 /* bn_mp_zero.c */; };
   143    143   		F96D494E08F272C3004A47F5 /* bn_reverse.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D008F272B3004A47F5 /* bn_reverse.c */; };
   144    144   		F96D494F08F272C3004A47F5 /* bn_s_mp_add.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D108F272B3004A47F5 /* bn_s_mp_add.c */; };
   145    145   		F96D495108F272C3004A47F5 /* bn_s_mp_mul_digs.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D308F272B3004A47F5 /* bn_s_mp_mul_digs.c */; };
   146    146   		F96D495308F272C3004A47F5 /* bn_s_mp_sqr.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D508F272B3004A47F5 /* bn_s_mp_sqr.c */; };
   147    147   		F96D495408F272C3004A47F5 /* bn_s_mp_sub.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D608F272B3004A47F5 /* bn_s_mp_sub.c */; };
   148         -		F96D495508F272C3004A47F5 /* bncore.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D708F272B3004A47F5 /* bncore.c */; };
   149    148   		F96D49A908F272C4004A47F5 /* tclMacOSXBundle.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D433908F272B5004A47F5 /* tclMacOSXBundle.c */; };
   150    149   		F96D49AD08F272C4004A47F5 /* tclMacOSXFCmd.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D433D08F272B5004A47F5 /* tclMacOSXFCmd.c */; };
   151    150   		F96D49AE08F272C4004A47F5 /* tclMacOSXNotify.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D433E08F272B5004A47F5 /* tclMacOSXNotify.c */; };
   152    151   		F96D4AC608F272C9004A47F5 /* tclLoadDyld.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D445B08F272B9004A47F5 /* tclLoadDyld.c */; settings = {COMPILER_FLAGS = "-Wno-deprecated-declarations"; }; };
   153    152   		F96D4ACA08F272C9004A47F5 /* tclUnixChan.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D445F08F272B9004A47F5 /* tclUnixChan.c */; };
   154    153   		F96D4ACB08F272C9004A47F5 /* tclUnixEvent.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D446008F272B9004A47F5 /* tclUnixEvent.c */; };
   155    154   		F96D4ACC08F272C9004A47F5 /* tclUnixFCmd.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D446108F272B9004A47F5 /* tclUnixFCmd.c */; };
................................................................................
   617    616   		F96D42CD08F272B3004A47F5 /* bn_mp_xor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_xor.c; sourceTree = "<group>"; };
   618    617   		F96D42CE08F272B3004A47F5 /* bn_mp_zero.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_zero.c; sourceTree = "<group>"; };
   619    618   		F96D42D008F272B3004A47F5 /* bn_reverse.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_reverse.c; sourceTree = "<group>"; };
   620    619   		F96D42D108F272B3004A47F5 /* bn_s_mp_add.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_add.c; sourceTree = "<group>"; };
   621    620   		F96D42D308F272B3004A47F5 /* bn_s_mp_mul_digs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_mul_digs.c; sourceTree = "<group>"; };
   622    621   		F96D42D508F272B3004A47F5 /* bn_s_mp_sqr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_sqr.c; sourceTree = "<group>"; };
   623    622   		F96D42D608F272B3004A47F5 /* bn_s_mp_sub.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_sub.c; sourceTree = "<group>"; };
   624         -		F96D42D708F272B3004A47F5 /* bncore.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bncore.c; sourceTree = "<group>"; };
   625    623   		F96D432908F272B4004A47F5 /* tommath_class.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tommath_class.h; sourceTree = "<group>"; };
   626    624   		F96D432A08F272B4004A47F5 /* tommath_superclass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tommath_superclass.h; sourceTree = "<group>"; };
   627    625   		F96D432B08F272B4004A47F5 /* license.terms */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; path = license.terms; sourceTree = "<group>"; };
   628    626   		F96D432E08F272B5004A47F5 /* configure.ac */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure.ac; sourceTree = "<group>"; };
   629    627   		F96D432F08F272B5004A47F5 /* GNUmakefile */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = GNUmakefile; sourceTree = "<group>"; };
   630    628   		F96D433108F272B5004A47F5 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
   631    629   		F96D433208F272B5004A47F5 /* Tcl-Info.plist.in */ = {isa = PBXFileReference; explicitFileType = text.plist; fileEncoding = 4; path = "Tcl-Info.plist.in"; sourceTree = "<group>"; };
................................................................................
  1469   1467   				F96D42CD08F272B3004A47F5 /* bn_mp_xor.c */,
  1470   1468   				F96D42CE08F272B3004A47F5 /* bn_mp_zero.c */,
  1471   1469   				F96D42D008F272B3004A47F5 /* bn_reverse.c */,
  1472   1470   				F96D42D108F272B3004A47F5 /* bn_s_mp_add.c */,
  1473   1471   				F96D42D308F272B3004A47F5 /* bn_s_mp_mul_digs.c */,
  1474   1472   				F96D42D508F272B3004A47F5 /* bn_s_mp_sqr.c */,
  1475   1473   				F96D42D608F272B3004A47F5 /* bn_s_mp_sub.c */,
  1476         -				F96D42D708F272B3004A47F5 /* bncore.c */,
  1477   1474   				F96D432908F272B4004A47F5 /* tommath_class.h */,
  1478   1475   				F96D432A08F272B4004A47F5 /* tommath_superclass.h */,
  1479   1476   			);
  1480   1477   			path = libtommath;
  1481   1478   			sourceTree = "<group>";
  1482   1479   		};
  1483   1480   		F96D432C08F272B4004A47F5 /* macosx */ = {
................................................................................
  2101   2098   				F9E61D2D090A48BB002B3151 /* bn_mp_xor.c in Sources */,
  2102   2099   				F96D494C08F272C3004A47F5 /* bn_mp_zero.c in Sources */,
  2103   2100   				F96D494E08F272C3004A47F5 /* bn_reverse.c in Sources */,
  2104   2101   				F96D494F08F272C3004A47F5 /* bn_s_mp_add.c in Sources */,
  2105   2102   				F96D495108F272C3004A47F5 /* bn_s_mp_mul_digs.c in Sources */,
  2106   2103   				F96D495308F272C3004A47F5 /* bn_s_mp_sqr.c in Sources */,
  2107   2104   				F96D495408F272C3004A47F5 /* bn_s_mp_sub.c in Sources */,
  2108         -				F96D495508F272C3004A47F5 /* bncore.c in Sources */,
  2109   2105   				F96D49A908F272C4004A47F5 /* tclMacOSXBundle.c in Sources */,
  2110   2106   				F96D49AD08F272C4004A47F5 /* tclMacOSXFCmd.c in Sources */,
  2111   2107   				F96D49AE08F272C4004A47F5 /* tclMacOSXNotify.c in Sources */,
  2112   2108   				F90509300913A72400327603 /* tclAppInit.c in Sources */,
  2113   2109   				F96D4AC608F272C9004A47F5 /* tclLoadDyld.c in Sources */,
  2114   2110   				F96D4ACA08F272C9004A47F5 /* tclUnixChan.c in Sources */,
  2115   2111   				F9FC77B80AB29E9100B7077D /* tclUnixCompat.c in Sources */,

Changes to macosx/tclMacOSXFCmd.c.

   188    188   		OSSwapBigToHostInt32(finder->creator));
   189    189   	break;
   190    190       case MACOSX_TYPE_ATTRIBUTE:
   191    191   	*attributePtrPtr = NewOSTypeObj(
   192    192   		OSSwapBigToHostInt32(finder->type));
   193    193   	break;
   194    194       case MACOSX_HIDDEN_ATTRIBUTE:
   195         -	*attributePtrPtr = Tcl_NewBooleanObj(
          195  +	*attributePtrPtr = Tcl_NewWideIntObj(
   196    196   		(finder->fdFlags & kFinfoIsInvisible) != 0);
   197    197   	break;
   198    198       case MACOSX_RSRCLENGTH_ATTRIBUTE:
   199    199   	*attributePtrPtr = Tcl_NewWideIntObj(*rsrcForkSize);
   200    200   	break;
   201    201       }
   202    202       return TCL_OK;
................................................................................
   576    576       OSType *osTypePtr)		/* Place to store resulting OSType. */
   577    577   {
   578    578       int result = TCL_OK;
   579    579   
   580    580       if (!TclHasIntRep(objPtr, &tclOSTypeType)) {
   581    581   	result = SetOSTypeFromAny(interp, objPtr);
   582    582       }
   583         -    *osTypePtr = (OSType) objPtr->internalRep.longValue;
          583  +    *osTypePtr = (OSType) objPtr->internalRep.wideValue;
   584    584       return result;
   585    585   }
   586    586   
   587    587   /*
   588    588    *----------------------------------------------------------------------
   589    589    *
   590    590    * NewOSTypeObj --
................................................................................
   605    605       const OSType osType)	/* OSType used to initialize the new
   606    606   				 * object. */
   607    607   {
   608    608       Tcl_Obj *objPtr;
   609    609   
   610    610       TclNewObj(objPtr);
   611    611       TclInvalidateStringRep(objPtr);
   612         -    objPtr->internalRep.longValue = (long) osType;
          612  +    objPtr->internalRep.wideValue = (Tcl_WideInt) osType;
   613    613       objPtr->typePtr = &tclOSTypeType;
   614    614       return objPtr;
   615    615   }
   616    616   
   617    617   /*
   618    618    *----------------------------------------------------------------------
   619    619    *
................................................................................
   657    657   
   658    658   	memcpy(bytes, Tcl_DStringValue(&ds), Tcl_DStringLength(&ds));
   659    659   	osType = (OSType) bytes[0] << 24 |
   660    660   		 (OSType) bytes[1] << 16 |
   661    661   		 (OSType) bytes[2] <<  8 |
   662    662   		 (OSType) bytes[3];
   663    663   	TclFreeIntRep(objPtr);
   664         -	objPtr->internalRep.longValue = (long) osType;
          664  +	objPtr->internalRep.wideValue = (Tcl_WideInt) osType;
   665    665   	objPtr->typePtr = &tclOSTypeType;
   666    666       }
   667    667       Tcl_DStringFree(&ds);
   668    668       Tcl_FreeEncoding(encoding);
   669    669       return result;
   670    670   }
   671    671   
................................................................................
   691    691   static void
   692    692   UpdateStringOfOSType(
   693    693       register Tcl_Obj *objPtr)	/* OSType object whose string rep to
   694    694   				 * update. */
   695    695   {
   696    696       const int size = TCL_UTF_MAX * 4;
   697    697       char *dst = Tcl_InitStringRep(objPtr, NULL, size);
   698         -    OSType osType = (OSType) objPtr->internalRep.longValue;
          698  +    OSType osType = (OSType) objPtr->internalRep.wideValue;
   699    699       int written = 0;
   700    700       Tcl_Encoding encoding;
   701    701       char src[5];
   702    702   
   703    703       TclOOM(dst, size);
   704    704   
   705    705       src[0] = (char) (osType >> 24);

Changes to tests-perf/clock.perf.tcl.

     1      1   #!/usr/bin/tclsh
     2      2   # ------------------------------------------------------------------------
     3      3   #
     4      4   # test-performance.tcl --
     5         -# 
            5  +#
     6      6   #  This file provides common performance tests for comparison of tcl-speed
     7      7   #  degradation by switching between branches.
     8      8   #  (currently for clock ensemble only)
     9      9   #
    10     10   # ------------------------------------------------------------------------
    11         -# 
           11  +#
    12     12   # Copyright (c) 2014 Serg G. Brester (aka sebres)
    13         -# 
           13  +#
    14     14   # See the file "license.terms" for information on usage and redistribution
    15     15   # of this file.
    16         -# 
           16  +#
    17     17   
    18     18   array set in {-time 500}
    19     19   if {[info exists ::argv0] && [file tail $::argv0] eq [file tail [info script]]} {
    20     20     array set in $argv
    21     21   }
    22     22   
    23     23   ## common test performance framework:
................................................................................
   211    211       {clock scan "5 years 18 months 385 days next 1 January" -base 0 -gmt 1}
   212    212       # FreeScan : relative date with ordinal month and relative weekday
   213    213       {clock scan "5 years 18 months 385 days next January Fri" -base 0 -gmt 1}
   214    214       # FreeScan : ordinal month
   215    215       {clock scan "next January" -base 0 -gmt 1}
   216    216       # FreeScan : relative week
   217    217       {clock scan "next Fri" -base 0 -gmt 1}
   218         -    # FreeScan : relative weekday and week offset 
          218  +    # FreeScan : relative weekday and week offset
   219    219       {clock scan "next January + 2 week" -base 0 -gmt 1}
   220    220       # FreeScan : time only with base
   221    221       {clock scan "19:18:30" -base 148863600 -gmt 1}
   222    222       # FreeScan : time only without base, gmt
   223    223       {clock scan "19:18:30" -gmt 1}
   224    224       # FreeScan : time only without base, system
   225    225       {clock scan "19:18:30"}
................................................................................
   296    296       {clock format [clock scan "19:18:30" -base 148863600 -timezone EST] -timezone MST}
   297    297       {clock format [clock scan "19:18:30" -base 148863600 -timezone MST] -timezone EST}
   298    298       # Convert TZ: included in scan string & format
   299    299       {clock format [clock scan "19:18:30 EST" -base 148863600] -format "%H:%M:%S %z" -timezone MST}
   300    300       {clock format [clock scan "19:18:30 EST" -base 148863600] -format "%H:%M:%S %z" -timezone EST}
   301    301   
   302    302       # Format locale 1x: comparison values
   303         -    {clock format 0 -gmt 1 -locale en} 
          303  +    {clock format 0 -gmt 1 -locale en}
   304    304       {clock format 0 -gmt 1 -locale de}
   305    305       {clock format 0 -gmt 1 -locale fr}
   306    306       # Format locale 2x: without switching locale (en, en)
   307    307       {clock format 0 -gmt 1 -locale en; clock format 0 -gmt 1 -locale en}
   308    308       # Format locale 2x: with switching locale (en, de)
   309    309       {clock format 0 -gmt 1 -locale en; clock format 0 -gmt 1 -locale de}
   310    310       # Format locale 3x: without switching locale (en, en, en)
................................................................................
   336    336       # FreeScan TZ 2x (+1 system-default): without switching TZ
   337    337       {clock scan "19:18:30 MST" -base 148863600; clock scan "19:18:30 MST" -base 148863600}
   338    338       {clock scan "19:18:30 EST" -base 148863600; clock scan "19:18:30 EST" -base 148863600}
   339    339       # FreeScan TZ 2x (+1 system-default): with switching TZ
   340    340       {clock scan "19:18:30 MST" -base 148863600; clock scan "19:18:30 EST" -base 148863600}
   341    341       # FreeScan TZ 2x (+1 gmt, +1 system-default)
   342    342       {clock scan "19:18:30 MST" -base 148863600 -gmt 1; clock scan "19:18:30 EST" -base 148863600}
   343         -    
          343  +
   344    344       # Scan TZ: comparison included in scan string vs. given
   345    345       {clock scan "2009-06-30T18:30:00 CEST" -format "%Y-%m-%dT%H:%M:%S %z"}
   346    346       {clock scan "2009-06-30T18:30:00 CET" -format "%Y-%m-%dT%H:%M:%S %z"}
   347    347       {clock scan "2009-06-30T18:30:00" -timezone CET -format "%Y-%m-%dT%H:%M:%S"}
   348    348     }
   349    349   }
   350    350   

Changes to tests-perf/test-performance.tcl.

     1      1   # ------------------------------------------------------------------------
     2      2   #
     3      3   # test-performance.tcl --
     4         -# 
            4  +#
     5      5   #  This file provides common performance tests for comparison of tcl-speed
     6      6   #  degradation or regression by switching between branches.
     7      7   #
     8      8   #  To execute test case evaluate direct corresponding file "tests-perf\*.perf.tcl".
     9      9   #
    10     10   # ------------------------------------------------------------------------
    11         -# 
           11  +#
    12     12   # Copyright (c) 2014 Serg G. Brester (aka sebres)
    13         -# 
           13  +#
    14     14   # See the file "license.terms" for information on usage and redistribution
    15     15   # of this file.
    16         -# 
           16  +#
    17     17   
    18     18   namespace eval ::tclTestPerf {
    19     19   # warm-up interpeter compiler env, calibrate timerate measurement functionality:
    20     20   
    21     21   # if no timerate here - import from unsupported:
    22     22   if {[namespace which -command timerate] eq {}} {
    23     23     namespace inscope ::tcl::unsupported {namespace export timerate}
................................................................................
    29     29     puts -nonewline "Calibration ... "; flush stdout
    30     30     puts "done: [lrange \
    31     31       [timerate -calibrate {}] \
    32     32     0 1]"
    33     33   }
    34     34   
    35     35   proc {**STOP**} {args} {
    36         -  return -code error -level 4 "**STOP** in [info level [expr {[info level]-2}]] [join $args { }]" 
           36  +  return -code error -level 4 "**STOP** in [info level [expr {[info level]-2}]] [join $args { }]"
    37     37   }
    38     38   
    39     39   proc _test_get_commands {lst} {
    40     40     regsub -all {(?:^|\n)[ \t]*(\#[^\n]*|\msetup\M[^\n]*|\mcleanup\M[^\n]*)(?=\n\s*(?:[\{\#]|setup|cleanup|$))} $lst "\n{\\1}"
    41     41   }
    42     42   
    43     43   proc _test_out_total {} {

Changes to tests-perf/timer-event.perf.tcl.

     1      1   #!/usr/bin/tclsh
     2      2   
     3      3   # ------------------------------------------------------------------------
     4      4   #
     5      5   # timer-event.perf.tcl --
     6         -# 
            6  +#
     7      7   #  This file provides performance tests for comparison of tcl-speed
     8      8   #  of timer events (event-driven tcl-handling).
     9      9   #
    10     10   # ------------------------------------------------------------------------
    11         -# 
           11  +#
    12     12   # Copyright (c) 2014 Serg G. Brester (aka sebres)
    13         -# 
           13  +#
    14     14   # See the file "license.terms" for information on usage and redistribution
    15     15   # of this file.
    16         -# 
           16  +#
    17     17   
    18     18   
    19     19   if {![namespace exists ::tclTestPerf]} {
    20     20     source [file join [file dirname [info script]] test-performance.tcl]
    21     21   }
    22     22   
    23     23   
................................................................................
    36     36     puts "*** up to $howmuch events ***"
    37     37     # single iteration by update, so using -no-result (measure only):
    38     38     _test_run -no-result $reptime [string map [list \{*\}\$reptime $reptime \$howmuch $howmuch \\# \#] {
    39     39       # generate up to $howmuch idle-events:
    40     40       {after idle {set foo bar}}
    41     41       # update / after idle:
    42     42       {update; if {![llength [after info]]} break}
    43         -    
           43  +
    44     44       # generate up to $howmuch idle-events:
    45     45       {after idle {set foo bar}}
    46     46       # update idletasks / after idle:
    47     47       {update idletasks; if {![llength [after info]]} break}
    48     48   
    49     49       # generate up to $howmuch immediate events:
    50     50       {after 0 {set foo bar}}
    51     51       # update / after 0:
    52     52       {update; if {![llength [after info]]} break}
    53         -    
           53  +
    54     54       # generate up to $howmuch 1-ms events:
    55     55       {after 1 {set foo bar}}
    56     56       setup {after 1}
    57     57       # update / after 1:
    58     58       {update; if {![llength [after info]]} break}
    59     59   
    60     60       # generate up to $howmuch immediate events (+ 1 event of the second generation):
................................................................................
    79     79       {after cancel $ev([incr i]); if {$i >= $le} break}
    80     80       cleanup {update; unset -nocomplain ev}
    81     81       # cancel backwards "after 0" / $howmuch timer-events in queue:
    82     82       setup {set i 0; timerate {set ev([incr i]) [after 0 {set foo bar}]} {*}$reptime}
    83     83       setup {set le $i; incr i; list $le .. 1; # cancel up to $howmuch events}
    84     84       {after cancel $ev([incr i -1]); if {$i <= 1} break}
    85     85       cleanup {update; unset -nocomplain ev}
    86         -    
           86  +
    87     87       # end $howmuch events.
    88     88       cleanup {if [llength [after info]] {error "unexpected: [llength [after info]] events are still there."}}
    89     89     }]
    90     90   }
    91     91   
    92     92   proc test-access {{reptime {1000 5000}}} {
    93     93     set howmuch [lindex $reptime 1]
................................................................................
   145    145   
   146    146   proc test-long {{reptime 1000}} {
   147    147     _test_run $reptime {
   148    148       # in-between important event by amount of idle events:
   149    149       {time {after idle {after 30}} 10; after 1 {set important 1}; vwait important;}
   150    150       cleanup {foreach i [after info] {after cancel $i}}
   151    151       # in-between important event (of new generation) by amount of idle events:
   152         -    {time {after idle {after 30}} 10; after 1 {after 0 {set important 1}}; vwait important;} 
          152  +    {time {after idle {after 30}} 10; after 1 {after 0 {set important 1}}; vwait important;}
   153    153       cleanup {foreach i [after info] {after cancel $i}}
   154    154     }
   155    155   }
   156    156   
   157    157   proc test {{reptime 1000}} {
   158    158     test-exec $reptime
   159    159     foreach howmuch {5000 50000} {

Changes to tests/cmdMZ.test.

   356    356   } {1 {expected integer but got "b"}}
   357    357   test cmdMZ-6.3 {Tcl_TimeRateObjCmd: basic format of command} {
   358    358       list [catch {timerate -overhead b {} a b} msg] $msg
   359    359   } {1 {expected floating-point number but got "b"}}
   360    360   test cmdMZ-6.4 {Tcl_TimeRateObjCmd: compile of script happens even with negative iteration counts} {
   361    361       list [catch {timerate "foreach a {c d e} \{" -12456} msg] $msg
   362    362   } {1 {missing close-brace}}
   363         -test cmdMZ-6.5 {Tcl_TimeRateObjCmd: result format and one iteration} {
   364         -    regexp {^\d+.\d+ \ws/# 1 # \d+ #/sec \d+.\d+ nett-ms$} [timerate {} 0]
          363  +test cmdMZ-6.5a {Tcl_TimeRateObjCmd: result format and one iteration} {
          364  +    regexp {^\d+(?:\.\d+)? \ws/# 1 # \d+(?:\.\d+)? #/sec \d+(?:\.\d+)? nett-ms$} [timerate {} 0]
          365  +} 1
          366  +test cmdMZ-6.5b {Tcl_TimeRateObjCmd: result format without iterations} {
          367  +    regexp {^0 \ws/# 0 # 0 #/sec 0 nett-ms$} [timerate {} 0 0]
   365    368   } 1
   366    369   test cmdMZ-6.6 {Tcl_TimeRateObjCmd: slower commands take longer, but it remains almost the same time of measument} {
   367    370       set m1 [timerate {after 0} 20]
   368    371       set m2 [timerate {after 1} 20]
   369    372       list \
   370    373   	[expr {[lindex $m1 0] < [lindex $m2 0]}] \
   371    374   	[expr {[lindex $m1 0] < 100}] \

Changes to tests/compExpr-old.test.

   584    584       set ::errorInfo
   585    585   } -match glob -result {too few arguments for math function*
   586    586       while *ing
   587    587   "expr pow(1)"}
   588    588   test compExpr-old-15.6 {CompileMathFuncCall: missing ')'} -body {
   589    589       expr sin(1
   590    590   } -returnCodes error -match glob -result *
          591  +
   591    592   test compExpr-old-16.1 {GetToken: checks whether integer token starting with "0x" (e.g., "0x$") is invalid} {
   592    593       catch {unset a}
   593    594       set a(VALUE) ff15
   594    595       set i 123
   595    596       if {[expr 0x$a(VALUE)] & 16} {
   596    597           set i {}
   597    598       }

Changes to tests/expr-old.test.

   937    937   } -5076964154930102272
   938    938   test expr-old-34.15 {errors in math functions} {
   939    939       expr round(1.0e30)
   940    940   } 1000000000000000019884624838656
   941    941   test expr-old-34.16 {errors in math functions} {
   942    942       expr round(-1.0e30)
   943    943   } -1000000000000000019884624838656
          944  +
   944    945   test expr-old-36.1 {ExprLooksLikeInt procedure} -body {
   945    946       expr 0o289
   946    947   } -returnCodes error -match glob -result {*invalid octal number*}
   947    948   test expr-old-36.2 {ExprLooksLikeInt procedure} {
   948    949       set x 0o289
   949    950       list [catch {expr {$x+1}} msg] $msg
   950    951   } {1 {can't use non-numeric string "0o289" as operand of "+"}}

Changes to tests/expr.test.

    12     12   
    13     13   if {[lsearch [namespace children] ::tcltest] == -1} {
    14     14       package require tcltest 2.1
    15     15       namespace import -force ::tcltest::*
    16     16   }
    17     17   
    18     18   ::tcltest::loadTestedCommands
    19         -catch [list package require -exact Tcltest [info patchlevel]]
    20     19   
    21     20   # Determine if "long int" type is a 32 bit number and if the wide
    22     21   # type is a 64 bit number on this machine.
    23     22   
    24     23   testConstraint longIs32bit [expr {$tcl_platform(wordSize) == 4}]
    25     24   testConstraint longIs64bit [expr {$tcl_platform(wordSize) == 8}]
    26     25   testConstraint wideIs64bit [expr {wide(0x8000000000000000) < 0}]
................................................................................
  1103   1102   test expr-23.54.10 {INST_EXPON: Bug 2798543} {
  1104   1103       expr {3**19 == 3**65555}
  1105   1104   } 0
  1106   1105   test expr-23.54.11 {INST_EXPON: Bug 2798543} {
  1107   1106       expr {3**9 == 3**131081}
  1108   1107   } 0
  1109   1108   test expr-23.54.12 {INST_EXPON: Bug 2798543} -body {
  1110         -    expr {3**9 == 3**268435465}
         1109  +    expr {3**268435456}
  1111   1110   } -returnCodes error -result {exponent too large}
  1112   1111   test expr-23.54.13 {INST_EXPON: Bug 2798543} {
  1113   1112       expr {(-3)**9 == (-3)**65545}
  1114   1113   } 0
  1115   1114   test expr-23.55.0 {INST_EXPON: Bug 2798543} {
  1116   1115       expr {4**9 == 4**65545}
  1117   1116   } 0
................................................................................
  1118   1117   test expr-23.55.1 {INST_EXPON: Bug 2798543} {
  1119   1118       expr {4**15 == 4**65551}
  1120   1119   } 0
  1121   1120   test expr-23.55.2 {INST_EXPON: Bug 2798543} {
  1122   1121       expr {4**9 == 4**131081}
  1123   1122   } 0
  1124   1123   test expr-23.55.3 {INST_EXPON: Bug 2798543} -body {
  1125         -    expr {4**9 == 4**268435465}
         1124  +    expr {4**268435456}
  1126   1125   } -returnCodes error -result {exponent too large}
  1127   1126   test expr-23.55.4 {INST_EXPON: Bug 2798543} {
  1128   1127       expr {(-4)**9 == (-4)**65545}
  1129   1128   } 0
  1130   1129   test expr-23.56.0 {INST_EXPON: Bug 2798543} {
  1131   1130       expr {5**9 == 5**65545}
  1132   1131   } 0
................................................................................
  1133   1132   test expr-23.56.1 {INST_EXPON: Bug 2798543} {
  1134   1133       expr {5**13 == 5**65549}
  1135   1134   } 0
  1136   1135   test expr-23.56.2 {INST_EXPON: Bug 2798543} {
  1137   1136       expr {5**9 == 5**131081}
  1138   1137   } 0
  1139   1138   test expr-23.56.3 {INST_EXPON: Bug 2798543} -body {
  1140         -    expr {5**9 == 5**268435465}
         1139  +    expr {5**268435456}
  1141   1140   } -returnCodes error -result {exponent too large}
  1142   1141   test expr-23.56.4 {INST_EXPON: Bug 2798543} {
  1143   1142       expr {(-5)**9 == (-5)**65545}
  1144   1143   } 0
  1145   1144   test expr-23.57.0 {INST_EXPON: Bug 2798543} {
  1146   1145       expr {6**9 == 6**65545}
  1147   1146   } 0
................................................................................
  1148   1147   test expr-23.57.1 {INST_EXPON: Bug 2798543} {
  1149   1148       expr {6**11 == 6**65547}
  1150   1149   } 0
  1151   1150   test expr-23.57.2 {INST_EXPON: Bug 2798543} {
  1152   1151       expr {6**9 == 6**131081}
  1153   1152   } 0
  1154   1153   test expr-23.57.3 {INST_EXPON: Bug 2798543} -body {
  1155         -    expr {6**9 == 6**268435465}
         1154  +    expr {6**268435456}
  1156   1155   } -returnCodes error -result {exponent too large}
  1157   1156   test expr-23.57.4 {INST_EXPON: Bug 2798543} {
  1158   1157       expr {(-6)**9 == (-6)**65545}
  1159   1158   } 0
  1160   1159   test expr-23.58.0 {INST_EXPON: Bug 2798543} {
  1161   1160       expr {7**9 == 7**65545}
  1162   1161   } 0
................................................................................
  1163   1162   test expr-23.58.1 {INST_EXPON: Bug 2798543} {
  1164   1163       expr {7**11 == 7**65547}
  1165   1164   } 0
  1166   1165   test expr-23.58.2 {INST_EXPON: Bug 2798543} {
  1167   1166       expr {7**9 == 7**131081}
  1168   1167   } 0
  1169   1168   test expr-23.58.3 {INST_EXPON: Bug 2798543} -body {
  1170         -    expr {7**9 == 7**268435465}
         1169  +    expr {7**268435456}
  1171   1170   } -returnCodes error -result {exponent too large}
  1172   1171   test expr-23.58.4 {INST_EXPON: Bug 2798543} {
  1173   1172       expr {(-7)**9 == (-7)**65545}
  1174   1173   } 0
  1175   1174   test expr-23.59.0 {INST_EXPON: Bug 2798543} {
  1176   1175       expr {8**9 == 8**65545}
  1177   1176   } 0
................................................................................
  1178   1177   test expr-23.59.1 {INST_EXPON: Bug 2798543} {
  1179   1178       expr {8**10 == 8**65546}
  1180   1179   } 0
  1181   1180   test expr-23.59.2 {INST_EXPON: Bug 2798543} {
  1182   1181       expr {8**9 == 8**131081}
  1183   1182   } 0
  1184   1183   test expr-23.59.3 {INST_EXPON: Bug 2798543} -body {
  1185         -    expr {8**9 == 8**268435465}
         1184  +    expr {8**268435456}
  1186   1185   } -returnCodes error -result {exponent too large}
  1187   1186   test expr-23.59.4 {INST_EXPON: Bug 2798543} {
  1188   1187       expr {(-8)**9 == (-8)**65545}
  1189   1188   } 0
  1190   1189   test expr-23.60.0 {INST_EXPON: Bug 2798543} {
  1191   1190       expr {9**9 == 9**65545}
  1192   1191   } 0
  1193   1192   test expr-23.60.1 {INST_EXPON: Bug 2798543} {
  1194   1193       expr {9**9 == 9**131081}
  1195   1194   } 0
  1196   1195   test expr-23.60.2 {INST_EXPON: Bug 2798543} -body {
  1197         -    expr {9**9 == 9**268435465}
         1196  +    expr {9**268435456}
  1198   1197   } -returnCodes error -result {exponent too large}
  1199   1198   test expr-23.60.3 {INST_EXPON: Bug 2798543} {
  1200   1199       expr {(-9)**9 == (-9)**65545}
  1201   1200   } 0
  1202   1201   test expr-23.61.0 {INST_EXPON: Bug 2798543} {
  1203   1202       expr {10**9 == 10**65545}
  1204   1203   } 0
  1205   1204   test expr-23.61.1 {INST_EXPON: Bug 2798543} {
  1206   1205       expr {10**9 == 10**131081}
  1207   1206   } 0
  1208   1207   test expr-23.61.2 {INST_EXPON: Bug 2798543} -body {
  1209         -    expr {10**9 == 10**268435465}
         1208  +    expr {10**268435456}
  1210   1209   } -returnCodes error -result {exponent too large}
  1211   1210   test expr-23.61.3 {INST_EXPON: Bug 2798543} {
  1212   1211       expr {(-10)**9 == (-10)**65545}
  1213   1212   } 0
  1214   1213   test expr-23.62.0 {INST_EXPON: Bug 2798543} {
  1215   1214       expr {11**9 == 11**65545}
  1216   1215   } 0
  1217   1216   test expr-23.62.1 {INST_EXPON: Bug 2798543} {
  1218   1217       expr {11**9 == 11**131081}
  1219   1218   } 0
  1220   1219   test expr-23.62.2 {INST_EXPON: Bug 2798543} -body {
  1221         -    expr {11**9 == 11**268435465}
         1220  +    expr {11**268435456}
  1222   1221   } -returnCodes error -result {exponent too large}
  1223   1222   test expr-23.62.3 {INST_EXPON: Bug 2798543} {
  1224   1223       expr {(-11)**9 == (-11)**65545}
  1225   1224   } 0
  1226   1225   test expr-23.63.0 {INST_EXPON: Bug 2798543} {
  1227   1226       expr {3**20 == 3**65556}
  1228   1227   } 0
................................................................................
  1229   1228   test expr-23.63.1 {INST_EXPON: Bug 2798543} {
  1230   1229       expr {3**39 == 3**65575}
  1231   1230   } 0
  1232   1231   test expr-23.63.2 {INST_EXPON: Bug 2798543} {
  1233   1232       expr {3**20 == 3**131092}
  1234   1233   } 0
  1235   1234   test expr-23.63.3 {INST_EXPON: Bug 2798543} -body {
  1236         -    expr {3**20 == 3**268435476}
         1235  +    expr {3**268435456}
  1237   1236   } -returnCodes error -result {exponent too large}
  1238   1237   test expr-23.63.4 {INST_EXPON: Bug 2798543} {
  1239   1238       expr {(-3)**20 == (-3)**65556}
  1240   1239   } 0
  1241   1240   test expr-23.64.0 {INST_EXPON: Bug 2798543} {
  1242   1241       expr {4**17 == 4**65553}
  1243   1242   } 0
................................................................................
  1244   1243   test expr-23.64.1 {INST_EXPON: Bug 2798543} {
  1245   1244       expr {4**31 == 4**65567}
  1246   1245   } 0
  1247   1246   test expr-23.64.2 {INST_EXPON: Bug 2798543} {
  1248   1247       expr {4**17 == 4**131089}
  1249   1248   } 0
  1250   1249   test expr-23.64.3 {INST_EXPON: Bug 2798543} -body {
  1251         -    expr {4**17 == 4**268435473}
         1250  +    expr {4**268435456}
  1252   1251   } -returnCodes error -result {exponent too large}
  1253   1252   test expr-23.64.4 {INST_EXPON: Bug 2798543} {
  1254   1253       expr {(-4)**17 == (-4)**65553}
  1255   1254   } 0
  1256   1255   test expr-23.65.0 {INST_EXPON: Bug 2798543} {
  1257   1256       expr {5**17 == 5**65553}
  1258   1257   } 0
................................................................................
  1259   1258   test expr-23.65.1 {INST_EXPON: Bug 2798543} {
  1260   1259       expr {5**27 == 5**65563}
  1261   1260   } 0
  1262   1261   test expr-23.65.2 {INST_EXPON: Bug 2798543} {
  1263   1262       expr {5**17 == 5**131089}
  1264   1263   } 0
  1265   1264   test expr-23.65.3 {INST_EXPON: Bug 2798543} -body {
  1266         -    expr {5**17 == 5**268435473}
         1265  +    expr {5**268435456}
  1267   1266   } -returnCodes error -result {exponent too large}
  1268   1267   test expr-23.65.4 {INST_EXPON: Bug 2798543} {
  1269   1268       expr {(-5)**17 == (-5)**65553}
  1270   1269   } 0
  1271   1270   test expr-23.66.0 {INST_EXPON: Bug 2798543} {
  1272   1271       expr {6**17 == 6**65553}
  1273   1272   } 0
................................................................................
  1274   1273   test expr-23.66.1 {INST_EXPON: Bug 2798543} {
  1275   1274       expr {6**24 == 6**65560}
  1276   1275   } 0
  1277   1276   test expr-23.66.2 {INST_EXPON: Bug 2798543} {
  1278   1277       expr {6**17 == 6**131089}
  1279   1278   } 0
  1280   1279   test expr-23.66.3 {INST_EXPON: Bug 2798543} -body {
  1281         -    expr {6**17 == 6**268435473}
         1280  +    expr {6**268435456}
  1282   1281   } -returnCodes error -result {exponent too large}
  1283   1282   test expr-23.66.4 {INST_EXPON: Bug 2798543} {
  1284   1283       expr {(-6)**17 == (-6)**65553}
  1285   1284   } 0
  1286   1285   test expr-23.67.0 {INST_EXPON: Bug 2798543} {
  1287   1286       expr {7**17 == 7**65553}
  1288   1287   } 0
................................................................................
  1289   1288   test expr-23.67.1 {INST_EXPON: Bug 2798543} {
  1290   1289       expr {7**22 == 7**65558}
  1291   1290   } 0
  1292   1291   test expr-23.67.2 {INST_EXPON: Bug 2798543} {
  1293   1292       expr {7**17 == 7**131089}
  1294   1293   } 0
  1295   1294   test expr-23.67.3 {INST_EXPON: Bug 2798543} -body {
  1296         -    expr {7**17 == 7**268435473}
         1295  +    expr {7**268435456}
  1297   1296   } -returnCodes error -result {exponent too large}
  1298   1297   test expr-23.67.4 {INST_EXPON: Bug 2798543} {
  1299   1298       expr {(-7)**17 == (-7)**65553}
  1300   1299   } 0
  1301   1300   test expr-23.68.0 {INST_EXPON: Bug 2798543} {
  1302   1301       expr {8**17 == 8**65553}
  1303   1302   } 0
................................................................................
  1304   1303   test expr-23.68.1 {INST_EXPON: Bug 2798543} {
  1305   1304       expr {8**20 == 8**65556}
  1306   1305   } 0
  1307   1306   test expr-23.68.2 {INST_EXPON: Bug 2798543} {
  1308   1307       expr {8**17 == 8**131089}
  1309   1308   } 0
  1310   1309   test expr-23.68.3 {INST_EXPON: Bug 2798543} -body {
  1311         -    expr {8**17 == 8**268435473}
         1310  +    expr {8**268435456}
  1312   1311   } -returnCodes error -result {exponent too large}
  1313   1312   test expr-23.68.4 {INST_EXPON: Bug 2798543} {
  1314   1313       expr {(-8)**17 == (-8)**65553}
  1315   1314   } 0
  1316   1315   test expr-23.69.0 {INST_EXPON: Bug 2798543} {
  1317   1316       expr {9**17 == 9**65553}
  1318   1317   } 0
................................................................................
  1319   1318   test expr-23.69.1 {INST_EXPON: Bug 2798543} {
  1320   1319       expr {9**19 == 9**65555}
  1321   1320   } 0
  1322   1321   test expr-23.69.2 {INST_EXPON: Bug 2798543} {
  1323   1322       expr {9**17 == 9**131089}
  1324   1323   } 0
  1325   1324   test expr-23.69.3 {INST_EXPON: Bug 2798543} -body {
  1326         -    expr {9**17 == 9**268435473}
         1325  +    expr {9**268435456}
  1327   1326   } -returnCodes error -result {exponent too large}
  1328   1327   test expr-23.69.4 {INST_EXPON: Bug 2798543} {
  1329   1328       expr {(-9)**17 == (-9)**65553}
  1330   1329   } 0
  1331   1330   test expr-23.70.0 {INST_EXPON: Bug 2798543} {
  1332   1331       expr {10**17 == 10**65553}
  1333   1332   } 0
................................................................................
  1334   1333   test expr-23.70.1 {INST_EXPON: Bug 2798543} {
  1335   1334       expr {10**18 == 10**65554}
  1336   1335   } 0
  1337   1336   test expr-23.70.2 {INST_EXPON: Bug 2798543} {
  1338   1337       expr {10**17 == 10**131089}
  1339   1338   } 0
  1340   1339   test expr-23.70.3 {INST_EXPON: Bug 2798543} -body {
  1341         -    expr {10**17 == 10**268435473}
         1340  +    expr {10**268435456}
  1342   1341   } -returnCodes error -result {exponent too large}
  1343   1342   test expr-23.70.4 {INST_EXPON: Bug 2798543} {
  1344   1343       expr {(-10)**17 == (-10)**65553}
  1345   1344   } 0
  1346   1345   test expr-23.71.0 {INST_EXPON: Bug 2798543} {
  1347   1346       expr {11**17 == 11**65553}
  1348   1347   } 0
................................................................................
  1349   1348   test expr-23.71.1 {INST_EXPON: Bug 2798543} {
  1350   1349       expr {11**18 == 11**65554}
  1351   1350   } 0
  1352   1351   test expr-23.71.2 {INST_EXPON: Bug 2798543} {
  1353   1352       expr {11**17 == 11**131089}
  1354   1353   } 0
  1355   1354   test expr-23.71.3 {INST_EXPON: Bug 2798543} -body {
  1356         -    expr {11**17 == 11**268435473}
         1355  +    expr {11**268435456}
  1357   1356   } -returnCodes error -result {exponent too large}
  1358   1357   test expr-23.71.4 {INST_EXPON: Bug 2798543} {
  1359   1358       expr {(-11)**17 == (-11)**65553}
  1360   1359   } 0
  1361   1360   test expr-23.72.0 {INST_EXPON: Bug 2798543} {
  1362   1361       expr {12**17 == 12**65553}
  1363   1362   } 0
  1364   1363   test expr-23.72.1 {INST_EXPON: Bug 2798543} {
  1365   1364       expr {12**17 == 12**131089}
  1366   1365   } 0
  1367   1366   test expr-23.72.2 {INST_EXPON: Bug 2798543} -body {
  1368         -    expr {12**17 == 12**268435473}
         1367  +    expr {12**268435456}
  1369   1368   } -returnCodes error -result {exponent too large}
  1370   1369   test expr-23.72.3 {INST_EXPON: Bug 2798543} {
  1371   1370       expr {(-12)**17 == (-12)**65553}
  1372   1371   } 0
  1373   1372   test expr-23.73.0 {INST_EXPON: Bug 2798543} {
  1374   1373       expr {13**17 == 13**65553}
  1375   1374   } 0
  1376   1375   test expr-23.73.1 {INST_EXPON: Bug 2798543} {
  1377   1376       expr {13**17 == 13**131089}
  1378   1377   } 0
  1379   1378   test expr-23.73.2 {INST_EXPON: Bug 2798543} -body {
  1380         -    expr {13**17 == 13**268435473}
         1379  +    expr {13**268435456}
  1381   1380   } -returnCodes error -result {exponent too large}
  1382   1381   test expr-23.73.3 {INST_EXPON: Bug 2798543} {
  1383   1382       expr {(-13)**17 == (-13)**65553}
  1384   1383   } 0
  1385   1384   test expr-23.74.0 {INST_EXPON: Bug 2798543} {
  1386   1385       expr {14**17 == 14**65553}
  1387   1386   } 0
  1388   1387   test expr-23.74.1 {INST_EXPON: Bug 2798543} {
  1389   1388       expr {14**17 == 14**131089}
  1390   1389   } 0
  1391   1390   test expr-23.74.2 {INST_EXPON: Bug 2798543} -body {
  1392         -    expr {14**17 == 14**268435473}
         1391  +    expr {14**268435456}
  1393   1392   } -returnCodes error -result {exponent too large}
  1394   1393   test expr-23.74.3 {INST_EXPON: Bug 2798543} {
  1395   1394       expr {(-14)**17 == (-14)**65553}
  1396   1395   } 0
  1397   1396   
  1398   1397   
  1399   1398   # Some compilers get this wrong; ensure that we work around it correctly

Changes to tests/obj.test.

   471    471   test obj-26.1 {UpdateStringOfInt} testobj {
   472    472       set result ""
   473    473       lappend result [testintobj set 1 512]
   474    474       lappend result [testintobj mult10 1]
   475    475       lappend result [testintobj get 1]       ;# must update string rep
   476    476   } {512 5120 5120}
   477    477   
   478         -test obj-27.1 {Tcl_NewLongObj} testobj {
          478  +test obj-27.1 {Tcl_NewWideObj} testobj {
   479    479       set result ""
   480    480       lappend result [testobj freeallvars]
   481         -    testintobj setmaxlong 1
   482         -    lappend result [testintobj ismaxlong 1]
          481  +    testintobj setmax 1
          482  +    lappend result [testintobj ismax 1]
   483    483       lappend result [testobj type 1]
   484    484       lappend result [testobj refcount 1]
   485    485   } {{} 1 int 1}
   486    486   
   487    487   test obj-28.1 {Tcl_SetLongObj, existing "empty string" object} testobj {
   488    488       set result ""
   489    489       lappend result [testobj freeallvars]
   490    490       lappend result [testobj newobj 1]
   491         -    lappend result [testintobj setlong 1 77]  ;# makes existing obj long int
          491  +    lappend result [testintobj setint 1 77]  ;# makes existing obj int
   492    492       lappend result [testobj type 1]
   493    493       lappend result [testobj refcount 1]
   494    494   } {{} {} 77 int 2}
   495    495   test obj-28.2 {Tcl_SetLongObj, existing non-"empty string" object} testobj {
   496    496       set result ""
   497    497       lappend result [testobj freeallvars]
   498    498       lappend result [testdoubleobj set 1 12.34]
   499         -    lappend result [testintobj setlong 1 77]  ;# makes existing obj long int
          499  +    lappend result [testintobj setint 1 77]  ;# makes existing obj int
   500    500       lappend result [testobj type 1]
   501    501       lappend result [testobj refcount 1]
   502    502   } {{} 12.34 77 int 2}
   503    503   
   504         -test obj-29.1 {Tcl_GetLongFromObj, existing long integer object} testobj {
          504  +test obj-29.1 {Tcl_GetWideIntFromObj, existing int object} testobj {
   505    505       set result ""
   506         -    lappend result [testintobj setlong 1 22]
   507         -    lappend result [testintobj mult10 1]   ;# gets existing long int rep
          506  +    lappend result [testintobj setint 1 22]
          507  +    lappend result [testintobj mult10 1]   ;# gets existingint rep
   508    508   } {22 220}
   509         -test obj-29.2 {Tcl_GetLongFromObj, convert to long} testobj {
          509  +test obj-29.2 {Tcl_GetWideIntFromObj, convert to int} testobj {
   510    510       set result ""
   511         -    lappend result [testintobj setlong 1 477]
          511  +    lappend result [testintobj setint 1 477]
   512    512       lappend result [testintobj div10 1]    ;# must convert to bool
   513    513       lappend result [testobj type 1]
   514    514   } {477 47 int}
   515         -test obj-29.3 {Tcl_GetLongFromObj, error converting to long integer} testobj {
          515  +test obj-29.3 {Tcl_GetWideIntFromObj, error converting to int} testobj {
   516    516       set result ""
   517    517       lappend result [teststringobj set 1 abc]
   518         -    lappend result [catch {testintobj ismaxlong 1} msg] ;# cvts to long int
          518  +    lappend result [catch {testintobj ismax 1} msg] ;# cvts to long int
   519    519       lappend result $msg
   520    520   } {abc 1 {expected integer but got "abc"}}
   521         -test obj-29.4 {Tcl_GetLongFromObj, error converting from "empty string"} testobj {
          521  +test obj-29.4 {Tcl_GetWideIntFromObj, error converting from "empty string"} testobj {
   522    522       set result ""
   523    523       lappend result [testobj newobj 1]
   524         -    lappend result [catch {testintobj ismaxlong 1} msg] ;# cvts to long int
          524  +    lappend result [catch {testintobj ismax 1} msg] ;# cvts to long int
   525    525       lappend result $msg
   526    526   } {{} 1 {expected integer but got ""}}
   527    527   
   528    528   test obj-30.1 {Ref counting and object deletion, simple types} testobj {
   529    529       set result ""
   530    530       lappend result [testobj freeallvars]
   531    531       lappend result [testintobj set 1 1024]

Changes to tests/utf.test.

   184    184       expr {"\u4e21" eq [testbytestring "\xe4\xb8\xa1"]}
   185    185   } 1
   186    186   test utf-10.4 {Tcl_UtfBackslash: stops at first non-hex} testbytestring {
   187    187       expr {"\u4e2k" eq "[testbytestring \xd3\xa2]k"}
   188    188   } 1
   189    189   test utf-10.5 {Tcl_UtfBackslash: stops after 4 hex chars} testbytestring {
   190    190       expr {"\u4e216" eq "[testbytestring \xe4\xb8\xa1]6"}
          191  +} 1
          192  +test utf-10.6 {Tcl_UtfBackslash: stops after 5 hex chars} testbytestring {
          193  +    expr {"\U1e2165" eq "[testbytestring \xf0\x9e\x88\x96]5"}
          194  +} 1
          195  +test utf-10.6 {Tcl_UtfBackslash: stops after 6 hex chars} testbytestring {
          196  +    expr {"\U10e2165" eq "[testbytestring \xf4\x8e\x88\x96]5"}
   191    197   } 1
   192    198   proc bsCheck {char num} {
   193    199       global errNum
   194    200       test utf-10.$errNum {backslash substitution} {
   195    201   	scan $char %c value
   196    202   	set value
   197    203       } $num

Changes to tools/tcltk-man2html.tcl.

    27     27   
    28     28   ##
    29     29   ## Source the utility functions that provide most of the
    30     30   ## implementation of the transformation from nroff to html.
    31     31   ##
    32     32   source [file join [file dirname [info script]] tcltk-man2html-utils.tcl]
    33     33   
           34  +proc findversion {top name useversion} {
           35  +    set upper [string toupper $name]
           36  +    foreach top1 [list $top $top/..] sub {{} generic} {
           37  +	foreach dirname [
           38  +	    glob -nocomplain -tails -type d -directory $top1 *] {
           39  +
           40  +	    set tclh [join [list $top1 $dirname {*}$sub $name.h] /]
           41  +	    if {[file exists $tclh]} {
           42  +		set chan [open $tclh]
           43  +		set data [read $chan]
           44  +		close $chan
           45  +		# backslash isn't required in front of quote, but it keeps syntax
           46  +		# highlighting straight in some editors
           47  +		if {[regexp -lineanchor \
           48  +		    [string map [list @[email protected] $upper] \
           49  +			{^#define\[email protected]@_VERSION\s+\"([^.])+\.([^.\"]+)}] \
           50  +		    $data -> major minor]} {
           51  +			# to do
           52  +			#     use glob matching instead of string matching or add
           53  +			#     brace handling to [string matcch]
           54  +			if {$useversion eq {} || [string match $useversion $major.$minor]} {
           55  +			    set top [file dirname [file dirname $tclh]]
           56  +			    set prefix [file dirname $top]
           57  +			    return [list $prefix [file tail $top] $major $minor]
           58  +			}
           59  +		}
           60  +	    }
           61  +	}
           62  +    }
           63  +    return
           64  +}
           65  +
    34     66   proc parse_command_line {} {
    35     67       global argv Version
    36     68   
    37     69       # These variables determine where the man pages come from and where
    38     70       # the converted pages go to.
    39     71       global tcltkdir tkdir tcldir webdir build_tcl build_tk verbose
    40     72   
    41     73       # Set defaults based on original code.
    42     74       set tcltkdir ../..
    43     75       set tkdir {}
    44     76       set tcldir {}
    45     77       set webdir ../html
    46     78       set build_tcl 0
           79  +    set opt_build_tcl 0
    47     80       set build_tk 0
           81  +    set opt_build_tk 0
    48     82       set verbose 0
    49     83       # Default search version is a glob pattern
    50     84       set useversion {{,[8-9].[0-9]{,[.ab][0-9]{,[0-9]}}}}
    51     85   
    52     86       # Handle arguments a la GNU:
    53     87       #   --version
    54     88       #   --useversion=<version>
................................................................................
    89    123   	    --useversion=* {
    90    124   		# length of "--useversion=" is 13
    91    125   		set useversion [string range $option 13 end]
    92    126   	    }
    93    127   
    94    128   	    --tcl {
    95    129   		set build_tcl 1
          130  +		set opt_build_tcl 1
    96    131   	    }
    97    132   
    98    133   	    --tk {
    99    134   		set build_tk 1
          135  +		set opt_build_tk 1
   100    136   	    }
   101    137   
   102    138   	    --verbose=* {
   103    139   		set verbose [string range $option \
   104    140   				 [string length --verbose=] end]
   105    141   	    }
   106    142   	    default {
................................................................................
   113    149       if {!$build_tcl && !$build_tk} {
   114    150   	set build_tcl 1;
   115    151   	set build_tk 1
   116    152       }
   117    153   
   118    154       if {$build_tcl} {
   119    155   	# Find Tcl.
   120         -	set tcldir [lindex [lsort [glob -nocomplain -tails -type d \
   121         -		-directory $tcltkdir tcl$useversion]] end]
   122         -	if {$tcldir eq ""} {
          156  +	lassign [findversion $tcltkdir tcl $useversion] tcltkdir tcldir major minor
          157  +	if {$tcldir eq {} && $opt_build_tcl} {
   123    158   	    puts stderr "tcltk-man-html: couldn't find Tcl below $tcltkdir"
   124    159   	    exit 1
   125    160   	}
   126         -	puts "using Tcl source directory $tcldir"
          161  +	puts "using Tcl source directory $tcltkdir $tcldir"
   127    162       }
          163  +
   128    164   
   129    165       if {$build_tk} {
   130    166   	# Find Tk.
   131         -	set tkdir [lindex [lsort [glob -nocomplain -tails -type d \
   132         -		-directory $tcltkdir tk$useversion]] end]
   133         -	if {$tkdir eq ""} {
          167  +	lassign [findversion $tcltkdir tk $useversion] tcltkdir tkdir major minor
          168  +	if {$tkdir eq {} && $opt_build_tk} {
   134    169   	    puts stderr "tcltk-man-html: couldn't find Tk below $tcltkdir"
   135    170   	    exit 1
   136    171   	}
   137    172   	puts "using Tk source directory $tkdir"
   138    173       }
   139    174   
   140    175       puts "verbose messages are [expr {$verbose ? {on} : {off}}]"
   141    176   
   142    177       # the title for the man pages overall
   143    178       global overall_title
   144    179       set overall_title ""
   145    180       if {$build_tcl} {
   146         -	append overall_title "[capitalize $tcldir]"
          181  +	append overall_title "Tcl $major.$minor"
   147    182       }
   148    183       if {$build_tcl && $build_tk} {
   149    184   	append overall_title "/"
   150    185       }
   151    186       if {$build_tk} {
   152    187   	append overall_title "[capitalize $tkdir]"
   153    188       }

Changes to unix/Makefile.in.

   315    315   	tclThreadAlloc.o tclThreadJoin.o tclThreadStorage.o tclStubInit.o \
   316    316   	tclTimer.o tclTrace.o tclUtf.o tclUtil.o tclVar.o tclZlib.o \
   317    317   	tclTomMathInterface.o tclZipfs.o
   318    318   
   319    319   OO_OBJS = tclOO.o tclOOBasic.o tclOOCall.o tclOODefineCmds.o tclOOInfo.o \
   320    320   	tclOOMethod.o tclOOStubInit.o
   321    321   
   322         -TOMMATH_OBJS = bncore.o bn_reverse.o bn_fast_s_mp_mul_digs.o \
          322  +TOMMATH_OBJS = bn_reverse.o bn_fast_s_mp_mul_digs.o \
   323    323   	bn_fast_s_mp_sqr.o bn_mp_add.o bn_mp_and.o \
   324    324   	bn_mp_add_d.o bn_mp_clamp.o bn_mp_clear.o bn_mp_clear_multi.o \
   325    325   	bn_mp_cmp.o bn_mp_cmp_d.o bn_mp_cmp_mag.o \
   326    326   	bn_mp_cnt_lsb.o bn_mp_copy.o \
   327    327   	bn_mp_count_bits.o bn_mp_div.o bn_mp_div_d.o bn_mp_div_2.o \
   328    328   	bn_mp_div_2d.o bn_mp_div_3.o bn_mp_exch.o \
   329    329   	bn_mp_expt_d.o bn_mp_expt_d_ex.o bn_mp_get_bit.o bn_mp_get_int.o \
................................................................................
   486    486   
   487    487   STUB_SRCS = \
   488    488   	$(GENERIC_DIR)/tclStubLib.c \
   489    489   	$(GENERIC_DIR)/tclTomMathStubLib.c \
   490    490   	$(GENERIC_DIR)/tclOOStubLib.c
   491    491   
   492    492   TOMMATH_SRCS = \
   493         -	$(TOMMATH_DIR)/bncore.c \
   494    493   	$(TOMMATH_DIR)/bn_reverse.c \
   495    494   	$(TOMMATH_DIR)/bn_fast_s_mp_mul_digs.c \
   496    495   	$(TOMMATH_DIR)/bn_fast_s_mp_sqr.c \
   497    496   	$(TOMMATH_DIR)/bn_mp_add.c \
   498    497   	$(TOMMATH_DIR)/bn_mp_add_d.c \
   499    498   	$(TOMMATH_DIR)/bn_mp_and.c \
   500    499   	$(TOMMATH_DIR)/bn_mp_clamp.c \
................................................................................
  1456   1455   
  1457   1456   tclThreadTest.o: $(GENERIC_DIR)/tclThreadTest.c
  1458   1457   	$(CC) -c $(APP_CC_SWITCHES) $(GENERIC_DIR)/tclThreadTest.c
  1459   1458   
  1460   1459   tclTomMathInterface.o: $(GENERIC_DIR)/tclTomMathInterface.c $(MATHHDRS)
  1461   1460   	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclTomMathInterface.c
  1462   1461   
  1463         -bncore.o: $(TOMMATH_DIR)/bncore.c $(MATHHDRS)
  1464         -	$(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bncore.c
  1465         -
  1466   1462   bn_reverse.o: $(TOMMATH_DIR)/bn_reverse.c $(MATHHDRS)
  1467   1463   	$(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_reverse.c
  1468   1464   
  1469   1465   bn_fast_s_mp_mul_digs.o: $(TOMMATH_DIR)/bn_fast_s_mp_mul_digs.c $(MATHHDRS)
  1470   1466   	$(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_fast_s_mp_mul_digs.c
  1471   1467   
  1472   1468   bn_fast_s_mp_sqr.o: $(TOMMATH_DIR)/bn_fast_s_mp_sqr.c $(MATHHDRS)
................................................................................
  2298   2294   	$(BUILD_HTML) --tcl
  2299   2295   	@[email protected]
  2300   2296   
  2301   2297   html-tk: ${NATIVE_TCLSH}
  2302   2298   	$(BUILD_HTML) --tk
  2303   2299   	@[email protected]
  2304   2300   
  2305         -# You'd better have these programs or you will have problems creating Makefile
  2306         -# from Makefile.in in the first place...
  2307         -HTML_VERSION = `basename $(TOP_DIR) | sed s/tcl//`
  2308   2301   BUILD_HTML = \
  2309   2302   	@${NATIVE_TCLSH} $(TOOL_DIR)/tcltk-man2html.tcl \
  2310         -		--useversion=$(HTML_VERSION) --htmldir="$(HTML_INSTALL_DIR)" \
  2311         -		--srcdir=$(TOP_DIR)/.. $(BUILD_HTML_FLAGS)
         2303  +		--tcl --useversion=$(MAJOR_VERSION).$(MINOR_VERSION) --htmldir="$(HTML_INSTALL_DIR)" \
         2304  +		--srcdir=$(TOP_DIR) $(BUILD_HTML_FLAGS)
  2312   2305   
  2313   2306   #--------------------------------------------------------------------------
  2314   2307   # The list of all the targets that do not correspond to real files. This stops
  2315   2308   # 'make' from getting confused when someone makes an error in a rule.
  2316   2309   #--------------------------------------------------------------------------
  2317   2310   
  2318   2311   .PHONY: all binaries libraries objs doc html html-tcl html-tk test runtest

Changes to unix/tclUnixCompat.c.

     4      4    * Written by: Zoran Vasiljevic ([email protected]).
     5      5    *
     6      6    * See the file "license.terms" for information on usage and redistribution of
     7      7    * this file, and for a DISCLAIMER OF ALL WARRANTIES.
     8      8    */
     9      9   
    10     10   #include "tclInt.h"
    11         -#include <pwd.h>
    12         -#include <grp.h>
    13     11   #include <errno.h>
    14     12   #include <string.h>
    15     13   
    16     14   /*
    17     15    * See also: SC_BLOCKING_STYLE in unix/tcl.m4
    18     16    */
    19     17   

Changes to unix/tclUnixFCmd.c.

    37     37    * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    38     38    * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    39     39    * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
    40     40    * DAMAGE.
    41     41    */
    42     42   
    43     43   #include "tclInt.h"
    44         -#include <utime.h>
    45         -#include <grp.h>
    46     44   #ifndef HAVE_STRUCT_STAT_ST_BLKSIZE
    47     45   #ifndef NO_FSTATFS
    48     46   #include <sys/statfs.h>
    49     47   #endif
    50     48   #endif /* !HAVE_STRUCT_STAT_ST_BLKSIZE */
    51     49   #ifdef HAVE_FTS
    52     50   #include <fts.h>
................................................................................
  1495   1493   static int
  1496   1494   SetGroupAttribute(
  1497   1495       Tcl_Interp *interp,		/* The interp for error reporting. */
  1498   1496       int objIndex,		/* The index of the attribute. */
  1499   1497       Tcl_Obj *fileName,		/* The name of the file (UTF-8). */
  1500   1498       Tcl_Obj *attributePtr)	/* New group for file. */
  1501   1499   {
  1502         -    long gid;
         1500  +    Tcl_WideInt gid;
  1503   1501       int result;
  1504   1502       const char *native;
  1505   1503   
  1506         -    if (Tcl_GetLongFromObj(NULL, attributePtr, &gid) != TCL_OK) {
         1504  +    if (Tcl_GetWideIntFromObj(NULL, attributePtr, &gid) != TCL_OK) {
  1507   1505   	Tcl_DString ds;
  1508   1506   	struct group *groupPtr = NULL;
  1509   1507   	const char *string;
  1510   1508   	size_t length;
  1511   1509   
  1512   1510   	string = TclGetStringFromObj(attributePtr, &length);
  1513   1511   
................................................................................
  1562   1560   static int
  1563   1561   SetOwnerAttribute(
  1564   1562       Tcl_Interp *interp,		/* The interp for error reporting. */
  1565   1563       int objIndex,		/* The index of the attribute. */
  1566   1564       Tcl_Obj *fileName,		/* The name of the file (UTF-8). */
  1567   1565       Tcl_Obj *attributePtr)	/* New owner for file. */
  1568   1566   {
  1569         -    long uid;
         1567  +    Tcl_WideInt uid;
  1570   1568       int result;
  1571   1569       const char *native;
  1572   1570   
  1573         -    if (Tcl_GetLongFromObj(NULL, attributePtr, &uid) != TCL_OK) {
         1571  +    if (Tcl_GetWideIntFromObj(NULL, attributePtr, &uid) != TCL_OK) {
  1574   1572   	Tcl_DString ds;
  1575   1573   	struct passwd *pwPtr = NULL;
  1576   1574   	const char *string;
  1577   1575   	size_t length;
  1578   1576   
  1579   1577   	string = TclGetStringFromObj(attributePtr, &length);
  1580   1578   
................................................................................
  1629   1627   static int
  1630   1628   SetPermissionsAttribute(
  1631   1629       Tcl_Interp *interp,		/* The interp we are using for errors. */
  1632   1630       int objIndex,		/* The index of the attribute. */
  1633   1631       Tcl_Obj *fileName,		/* The name of the file (UTF-8). */
  1634   1632       Tcl_Obj *attributePtr)	/* The attribute to set. */
  1635   1633   {
  1636         -    long mode;
         1634  +    Tcl_WideInt mode;
  1637   1635       mode_t newMode;
  1638   1636       int result = TCL_ERROR;
  1639   1637       const char *native;
  1640   1638       const char *modeStringPtr = TclGetString(attributePtr);
  1641   1639       int scanned = TclParseAllWhiteSpace(modeStringPtr, -1);
  1642   1640   
  1643   1641       /*
................................................................................
  1648   1646   	    && (modeStringPtr[scanned+1] >= '0')
  1649   1647   	    && (modeStringPtr[scanned+1] <= '7')) {
  1650   1648   	/* Leading zero - attempt octal interpretation */
  1651   1649   	Tcl_Obj *modeObj;
  1652   1650   
  1653   1651   	TclNewLiteralStringObj(modeObj, "0o");
  1654   1652   	Tcl_AppendToObj(modeObj, modeStringPtr+scanned+1, -1);
  1655         -	result = Tcl_GetLongFromObj(NULL, modeObj, &mode);
         1653  +	result = Tcl_GetWideIntFromObj(NULL, modeObj, &mode);
  1656   1654   	Tcl_DecrRefCount(modeObj);
  1657   1655       }
  1658   1656       if (result == TCL_OK
  1659         -	    || Tcl_GetLongFromObj(NULL, attributePtr, &mode) == TCL_OK) {
         1657  +	    || Tcl_GetWideIntFromObj(NULL, attributePtr, &mode) == TCL_OK) {
  1660   1658   	newMode = (mode_t) (mode & 0x00007FFF);
  1661   1659       } else {
  1662   1660   	Tcl_StatBuf buf;
  1663   1661   
  1664   1662   	/*
  1665   1663   	 * Try the forms "rwxrwxrwx" and "ugo=rwx"
  1666   1664   	 *
................................................................................
  2339   2337       Tcl_Free(winPath);
  2340   2338   
  2341   2339       if (fileAttributes == -1) {
  2342   2340   	StatError(interp, fileName);
  2343   2341   	return TCL_ERROR;
  2344   2342       }
  2345   2343   
  2346         -    *attributePtrPtr = Tcl_NewBooleanObj(
  2347         -	    fileAttributes & attributeArray[objIndex]);
         2344  +    *attributePtrPtr = Tcl_NewWideIntObj(
         2345  +	    (fileAttributes & attributeArray[objIndex]) != 0);
  2348   2346       return TCL_OK;
  2349   2347   }
  2350   2348   
  2351   2349   /*
  2352   2350    *---------------------------------------------------------------------------
  2353   2351    *
  2354   2352    * SetUnixFileAttributes
................................................................................
  2439   2437   	    Tcl_SetObjResult(interp, Tcl_ObjPrintf(
  2440   2438   		    "could not read \"%s\": %s",
  2441   2439   		    TclGetString(fileName), Tcl_PosixError(interp)));
  2442   2440   	}
  2443   2441   	return TCL_ERROR;
  2444   2442       }
  2445   2443   
  2446         -    *attributePtrPtr = Tcl_NewBooleanObj(statBuf.st_flags & UF_IMMUTABLE);
         2444  +    *attributePtrPtr = Tcl_NewWideIntObj((statBuf.st_flags & UF_IMMUTABLE) != 0);
  2447   2445       return TCL_OK;
  2448   2446   }
  2449   2447   
  2450   2448   /*
  2451   2449    *---------------------------------------------------------------------------
  2452   2450    *
  2453   2451    * SetUnixFileAttributes

Changes to win/Makefile.in.

   356    356   	tclUtf.$(OBJEXT) \
   357    357   	tclUtil.$(OBJEXT) \
   358    358   	tclVar.$(OBJEXT) \
   359    359   	tclZipfs.$(OBJEXT) \
   360    360   	tclZlib.$(OBJEXT)
   361    361   
   362    362   TOMMATH_OBJS = \
   363         -	bncore.${OBJEXT} \
   364    363   	bn_reverse.${OBJEXT} \
   365    364   	bn_fast_s_mp_mul_digs.${OBJEXT} \
   366    365   	bn_fast_s_mp_sqr.${OBJEXT} \
   367    366   	bn_mp_add.${OBJEXT} \
   368    367   	bn_mp_add_d.${OBJEXT} \
   369    368   	bn_mp_and.${OBJEXT} \
   370    369   	bn_mp_clamp.${OBJEXT} \

Changes to win/makefile.vc.

   248    248   	$(TMP_DIR)\inflate.obj \
   249    249   	$(TMP_DIR)\inftrees.obj \
   250    250   	$(TMP_DIR)\trees.obj \
   251    251   	$(TMP_DIR)\uncompr.obj \
   252    252   	$(TMP_DIR)\zutil.obj
   253    253   
   254    254   TOMMATHOBJS = \
   255         -	$(TMP_DIR)\bncore.obj \
   256    255   	$(TMP_DIR)\bn_reverse.obj \
   257    256   	$(TMP_DIR)\bn_fast_s_mp_mul_digs.obj \
   258    257   	$(TMP_DIR)\bn_fast_s_mp_sqr.obj \
   259    258   	$(TMP_DIR)\bn_mp_add.obj \
   260    259   	$(TMP_DIR)\bn_mp_add_d.obj \
   261    260   	$(TMP_DIR)\bn_mp_and.obj \
   262    261   	$(TMP_DIR)\bn_mp_clamp.obj \

Changes to win/tclWinFCmd.c.

  1545   1545   		 */
  1546   1546   
  1547   1547   		attr = 0;
  1548   1548   	    }
  1549   1549   	}
  1550   1550       }
  1551   1551   
  1552         -    *attributePtrPtr = Tcl_NewBooleanObj(attr);
         1552  +    *attributePtrPtr = Tcl_NewWideIntObj(attr != 0);
  1553   1553       return TCL_OK;
  1554   1554   }
  1555   1555   
  1556   1556   /*
  1557   1557    *----------------------------------------------------------------------
  1558   1558    *
  1559   1559    * ConvertFileNameFormat --