Tcl Source Code

Check-in [5b54e4c576]
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 8.7, and fix build problem on Windows
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tip-160
Files: files | file ages | folders
SHA3-256: 5b54e4c576e2b847f42f2a1f50a1a77319e6293028b31c78b3ba1c3755530df5
User & Date: jan.nijtmans 2019-04-07 14:39:45
Context
2019-04-14
14:15
Implement TIP 160 check-in: 42f24469aa user: dkf tags: core-8-branch
2019-04-07
14:39
Merge 8.7, and fix build problem on Windows Closed-Leaf check-in: 5b54e4c576 user: jan.nijtmans tags: tip-160
2019-04-05
21:15
Merge 8.6 check-in: 67062d71c0 user: jan.nijtmans tags: core-8-branch
2019-04-01
16:15
typos check-in: 43e01869e4 user: dgp tags: tip-160
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to .fossil-settings/ignore-glob.

    15     15   */config.log
    16     16   */config.status
    17     17   */tclConfig.sh
    18     18   */tclsh*
    19     19   */tcltest*
    20     20   */versions.vc
    21     21   */version.vc
           22  +*/libtcl.vfs
           23  +*/libtcl_*.zip
    22     24   html
    23     25   libtommath/bn.ilg
    24     26   libtommath/bn.ind
    25     27   libtommath/pretty.build
    26     28   libtommath/tommath.src
           29  +libtommath/*.log
    27     30   libtommath/*.pdf
    28     31   libtommath/*.pl
    29     32   libtommath/*.sh
           33  +libtommath/doc/*
    30     34   libtommath/tombc/*
    31     35   libtommath/pre_gen/*
    32     36   libtommath/pics/*
    33     37   libtommath/mtest/*
    34     38   libtommath/logs/*
    35     39   libtommath/etc/*
    36     40   libtommath/demo/*

Changes to .travis.yml.

     1      1   sudo: false
     2      2   language: c
     3      3   
     4      4   matrix:
     5      5     include:
     6      6       - os: linux
     7         -      dist: trusty
            7  +      dist: xenial
     8      8         compiler: clang
     9      9         env:
    10     10           - BUILD_DIR=unix
    11     11       - os: linux
    12         -      dist: trusty
           12  +      dist: xenial
    13     13         compiler: clang
    14     14         env:
    15     15           - CFGOPT=--disable-shared
    16     16           - BUILD_DIR=unix
    17     17       - os: linux
    18         -      dist: trusty
           18  +      dist: xenial
    19     19         compiler: gcc
    20     20         env:
    21     21           - BUILD_DIR=unix
    22     22       - os: linux
    23         -      dist: trusty
           23  +      dist: xenial
    24     24         compiler: gcc
    25     25         env:
    26     26           - CFGOPT=--disable-shared
    27     27           - BUILD_DIR=unix
    28     28       - os: linux
    29         -      dist: trusty
           29  +      dist: xenial
    30     30         compiler: gcc-4.9
    31     31         addons:
    32     32           apt:
    33     33             sources:
    34     34               - ubuntu-toolchain-r-test
    35     35             packages:
    36     36               - g++-4.9
    37     37         env:
    38     38           - BUILD_DIR=unix
    39     39       - os: linux
    40         -      dist: trusty
           40  +      dist: xenial
    41     41         compiler: gcc-5
    42     42         addons:
    43     43           apt:
    44     44             sources:
    45     45               - ubuntu-toolchain-r-test
    46     46             packages:
    47     47               - g++-5
    48     48         env:
    49     49           - BUILD_DIR=unix
    50     50       - os: linux
    51         -      dist: trusty
           51  +      dist: xenial
    52     52         compiler: gcc-6
    53     53         addons:
    54     54           apt:
    55     55             sources:
    56     56               - ubuntu-toolchain-r-test
    57     57             packages:
    58     58               - g++-6
    59     59         env:
    60     60           - BUILD_DIR=unix
    61     61       - os: linux
    62         -      dist: trusty
           62  +      dist: xenial
           63  +      compiler: gcc-7
           64  +      addons:
           65  +        apt:
           66  +          sources:
           67  +            - ubuntu-toolchain-r-test
           68  +          packages:
           69  +            - g++-7
           70  +      env:
           71  +        - BUILD_DIR=unix
           72  +    - os: linux
           73  +      dist: xenial
           74  +      compiler: gcc-7
           75  +      addons:
           76  +        apt:
           77  +          sources:
           78  +            - ubuntu-toolchain-r-test
           79  +          packages:
           80  +            - g++-7
           81  +      env:
           82  +        - BUILD_DIR=unix
           83  +        - CFGOPT=CFLAGS=-DTCL_UTF_MAX=6
           84  +    - os: linux
           85  +      dist: xenial
           86  +      compiler: gcc-7
           87  +      addons:
           88  +        apt:
           89  +          sources:
           90  +            - ubuntu-toolchain-r-test
           91  +          packages:
           92  +            - g++-7
           93  +      env:
           94  +        - BUILD_DIR=unix
           95  +        - CFGOPT=CFLAGS=-DTCL_UTF_MAX=3
           96  +    - os: linux
           97  +      dist: xenial
    63     98         compiler: gcc-7
    64     99         addons:
    65    100           apt:
    66    101             sources:
    67    102               - ubuntu-toolchain-r-test
    68    103             packages:
    69    104               - g++-7
    70    105         env:
    71    106           - BUILD_DIR=unix
          107  +        - CFGOPT=CFLAGS=-DTCL_NO_DEPRECATED=1
    72    108       - os: osx
    73    109         osx_image: xcode8
    74    110         env:
    75    111           - BUILD_DIR=unix
    76    112       - os: osx
    77    113         osx_image: xcode8
    78    114         env:
................................................................................
    80    116           - NO_DIRECT_CONFIGURE=1
    81    117       - os: osx
    82    118         osx_image: xcode9
    83    119         env:
    84    120           - BUILD_DIR=macosx
    85    121           - NO_DIRECT_CONFIGURE=1
    86    122       - os: osx
    87         -      osx_image: xcode10
          123  +      osx_image: xcode10.2
    88    124         env:
    89    125           - BUILD_DIR=macosx
    90    126           - NO_DIRECT_CONFIGURE=1
    91    127   ### C builds not currently supported on Windows instances
    92    128   #    - os: windows
    93    129   #      env:
    94    130   #        - BUILD_DIR=win
    95    131   ### ... so proxy with a Mingw cross-compile
    96    132   # Test with mingw-w64 (32 bit)
    97    133       - os: linux
    98         -      dist: trusty
          134  +      dist: xenial
    99    135         compiler: i686-w64-mingw32-gcc
   100    136         addons:
   101    137           apt:
   102    138             packages:
   103    139               - gcc-mingw-w64-base
   104    140               - binutils-mingw-w64-i686
   105    141               - gcc-mingw-w64-i686
................................................................................
   106    142               - gcc-mingw-w64
   107    143               - gcc-multilib
   108    144               - wine
   109    145         env:
   110    146           - BUILD_DIR=win
   111    147           - CFGOPT=--host=i686-w64-mingw32
   112    148           - NO_DIRECT_TEST=1
          149  +    - os: linux
          150  +      dist: xenial
          151  +      compiler: i686-w64-mingw32-gcc
          152  +      addons:
          153  +        apt:
          154  +          packages:
          155  +            - gcc-mingw-w64-base
          156  +            - binutils-mingw-w64-i686
          157  +            - gcc-mingw-w64-i686
          158  +            - gcc-mingw-w64
          159  +            - gcc-multilib
          160  +            - wine
          161  +      env:
          162  +        - BUILD_DIR=win
          163  +        - CFGOPT="--host=i686-w64-mingw32 CFLAGS=-DTCL_UTF_MAX=6"
          164  +        - NO_DIRECT_TEST=1
          165  +    - os: linux
          166  +      dist: xenial
          167  +      compiler: i686-w64-mingw32-gcc
          168  +      addons:
          169  +        apt:
          170  +          packages:
          171  +            - gcc-mingw-w64-base
          172  +            - binutils-mingw-w64-i686
          173  +            - gcc-mingw-w64-i686
          174  +            - gcc-mingw-w64
          175  +            - gcc-multilib
          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
          193  +      env:
          194  +        - BUILD_DIR=win
          195  +        - CFGOPT="--host=i686-w64-mingw32 CFLAGS=-DTCL_NO_DEPRECATED=1"
          196  +        - NO_DIRECT_TEST=1
   113    197   # Test with mingw-w64 (64 bit)
   114    198       - os: linux
   115         -      dist: trusty
          199  +      dist: xenial
   116    200         compiler: x86_64-w64-mingw32-gcc
   117    201         addons:
   118    202           apt:
   119    203             packages:
   120    204               - gcc-mingw-w64-base
   121    205               - binutils-mingw-w64-x86-64
   122    206               - gcc-mingw-w64-x86-64
   123    207               - gcc-mingw-w64
   124    208               - wine
   125    209         env:
   126    210           - BUILD_DIR=win
   127    211           - CFGOPT="--host=x86_64-w64-mingw32 --enable-64bit"
   128    212           - NO_DIRECT_TEST=1
   129         -
          213  +    - os: linux
          214  +      dist: xenial
          215  +      compiler: x86_64-w64-mingw32-gcc
          216  +      addons:
          217  +        apt:
          218  +          packages:
          219  +            - gcc-mingw-w64-base
          220  +            - binutils-mingw-w64-x86-64
          221  +            - gcc-mingw-w64-x86-64
          222  +            - gcc-mingw-w64
          223  +            - wine
          224  +      env:
          225  +        - BUILD_DIR=win
          226  +        - CFGOPT="--host=x86_64-w64-mingw32 --enable-64bit CFLAGS=-DTCL_UTF_MAX=6"
          227  +        - NO_DIRECT_TEST=1
          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
          244  +      dist: xenial
          245  +      compiler: x86_64-w64-mingw32-gcc
          246  +      addons:
          247  +        apt:
          248  +          packages:
          249  +            - gcc-mingw-w64-base
          250  +            - binutils-mingw-w64-x86-64
          251  +            - gcc-mingw-w64-x86-64
          252  +            - gcc-mingw-w64
          253  +            - wine
          254  +      env:
          255  +        - BUILD_DIR=win
          256  +        - CFGOPT="--host=x86_64-w64-mingw32 --enable-64bit CFLAGS=-DTCL_NO_DEPRECATED=1"
          257  +        - NO_DIRECT_TEST=1
   130    258   before_install:
   131    259     - export ERROR_ON_FAILURES=1
   132    260     - cd ${BUILD_DIR}
   133    261   install:
   134    262     - test -n "$NO_DIRECT_CONFIGURE" || ./configure ${CFGOPT}
   135    263   script:
   136    264     - make
   137    265     # The styles=develop avoids some weird problems on OSX
   138    266     - test -n "$NO_DIRECT_TEST" || make test styles=develop

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.

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

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

Added doc/timerate.n.

            1  +'\"
            2  +'\" Copyright (c) 2005 Sergey Brester aka sebres.
            3  +'\"
            4  +'\" See the file "license.terms" for information on usage and redistribution
            5  +'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
            6  +'\"
            7  +.TH timerate n "" Tcl "Tcl Built-In Commands"
            8  +.so man.macros
            9  +.BS
           10  +'\" Note:  do not modify the .SH NAME line immediately below!
           11  +.SH NAME
           12  +timerate \- Time-related execution resp. performance measurement of a script
           13  +.SH SYNOPSIS
           14  +\fBtimerate \fIscript\fR \fI?time ?max-count??\fR
           15  +.sp
           16  +\fBtimerate \fI?-direct?\fR \fI?-overhead double?\fR \fIscript\fR \fI?time ?max-count??\fR
           17  +.sp
           18  +\fBtimerate \fI?-calibrate?\fR \fI?-direct?\fR \fIscript\fR \fI?time ?max-count??\fR
           19  +.BE
           20  +.SH DESCRIPTION
           21  +.PP
           22  +The first and second form will evaluate \fIscript\fR until the interval
           23  +\fItime\fR given in milliseconds elapses, or for 1000 milliseconds (1 second)
           24  +if \fItime\fR is not specified.
           25  +.sp
           26  +The parameter \fImax-count\fR could additionally impose a further restriction
           27  +by the maximal number of iterations to evaluate the script.
           28  +If \fImax-count\fR is specified, the evalution will stop either this count of
           29  +iterations is reached or the time is exceeded.
           30  +.sp
           31  +It will then return a canonical tcl-list of the form
           32  +.PP
           33  +.CS
           34  +\fB0.095977 \(mcs/# 52095836 # 10419167 #/sec 5000.000 nett-ms\fR
           35  +.CE
           36  +.PP
           37  +which indicates:
           38  +.IP \(bu
           39  +the average amount of time required per iteration, in microseconds ([\fBlindex\fR $result 0])
           40  +.IP \(bu
           41  +the count how many times it was executed ([\fBlindex\fR $result 2])
           42  +.IP \(bu
           43  +the estimated rate per second ([\fBlindex\fR $result 4])
           44  +.IP \(bu
           45  +the estimated real execution time without measurement overhead ([\fBlindex\fR $result 6])
           46  +.PP
           47  +Time is measured in elapsed time using the finest timer resolution as possible,
           48  +not CPU time.
           49  +This command may be used to provide information as to how well the script or a
           50  +tcl-command is performing and can help determine bottlenecks and fine-tune
           51  +application performance.
           52  +.TP
           53  +\fI-calibrate\fR
           54  +.
           55  +To measure very fast scripts as exact as posible the calibration process
           56  +may be required.
           57  +
           58  +The \fI-calibrate\fR option is used to calibrate timerate, calculating the
           59  +estimated overhead of the given script as the default overhead for future
           60  +invocations of the \fBtimerate\fR command. If the \fItime\fR parameter is not
           61  +specified, the calibrate procedure runs for up to 10 seconds.
           62  +.TP
           63  +\fI-overhead double\fR
           64  +.
           65  +The \fI-overhead\fR parameter supplies an estimate (in microseconds) of the
           66  +measurement overhead of each iteration of the tested script. This quantity
           67  +will be subtracted from the measured time prior to reporting results.
           68  +.TP
           69  +\fI-direct\fR
           70  +.
           71  +The \fI-direct\fR option causes direct execution of the supplied script,
           72  +without compilation, in a manner similar to the \fBtime\fR command. It can be
           73  +used to measure the cost of \fBTcl_EvalObjEx\fR, of the invocation of canonical
           74  +lists, and of the uncompiled versions of bytecoded commands.
           75  +.PP
           76  +As opposed to the \fBtime\fR commmand, which runs the tested script for a fixed
           77  +number of iterations, the timerate command runs it for a fixed time.
           78  +Additionally, the compiled variant of the script will be used during the entire
           79  +measurement, as if the script were part of a compiled procedure, if the \fI-direct\fR
           80  +option is not specified. The fixed time period and possibility of compilation allow
           81  +for more precise results and prevent very long execution times by slow scripts, making
           82  +it practical for measuring scripts with highly uncertain execution times.
           83  +
           84  +.SH EXAMPLE
           85  +Estimate how fast it takes for a simple Tcl \fBfor\fR loop (including
           86  +operations on variable \fIi\fR) to count to a ten:
           87  +.PP
           88  +.CS
           89  +# calibrate:
           90  +timerate -calibrate {}
           91  +# measure:
           92  +timerate { for {set i 0} {$i<10} {incr i} {} } 5000
           93  +.CE
           94  +.PP
           95  +Estimate how fast it takes for a simple Tcl \fBfor\fR loop, ignoring the
           96  +overhead for to perform ten iterations, ignoring the overhead of the management
           97  +of the variable that controls the loop:
           98  +.PP
           99  +.CS
          100  +# calibrate for overhead of variable operations:
          101  +set i 0; timerate -calibrate {expr {$i<10}; incr i} 1000
          102  +# measure:
          103  +timerate { for {set i 0} {$i<10} {incr i} {} } 5000
          104  +.CE
          105  +.PP
          106  +Estimate the speed of calculating the hour of the day using \fBclock format\fR only,
          107  +ignoring overhead of the portion of the script that prepares the time for it to
          108  +calculate:
          109  +.PP
          110  +.CS
          111  +# calibrate:
          112  +timerate -calibrate {}
          113  +# estimate overhead:
          114  +set tm 0
          115  +set ovh [lindex [timerate { incr tm [expr {24*60*60}] }] 0]
          116  +# measure using esimated overhead:
          117  +set tm 0
          118  +timerate -overhead $ovh {
          119  +    clock format $tm -format %H
          120  +    incr tm [expr {24*60*60}]; # overhead for this is ignored
          121  +} 5000
          122  +.CE
          123  +.SH "SEE ALSO"
          124  +time(n)
          125  +.SH KEYWORDS
          126  +script, timerate, time
          127  +.\" Local Variables:
          128  +.\" mode: nroff
          129  +.\" End:

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.

   149    149       {0xb13, 0xb28}, {0xb2a, 0xb30}, {0xb35, 0xb39}, {0xb5f, 0xb61},
   150    150       {0xb85, 0xb8a}, {0xb8e, 0xb90}, {0xb92, 0xb95}, {0xba8, 0xbaa},
   151    151       {0xbae, 0xbb9}, {0xc05, 0xc0c}, {0xc0e, 0xc10}, {0xc12, 0xc28},
   152    152       {0xc2a, 0xc39}, {0xc58, 0xc5a}, {0xc85, 0xc8c}, {0xc8e, 0xc90},
   153    153       {0xc92, 0xca8}, {0xcaa, 0xcb3}, {0xcb5, 0xcb9}, {0xd05, 0xd0c},
   154    154       {0xd0e, 0xd10}, {0xd12, 0xd3a}, {0xd54, 0xd56}, {0xd5f, 0xd61},
   155    155       {0xd7a, 0xd7f}, {0xd85, 0xd96}, {0xd9a, 0xdb1}, {0xdb3, 0xdbb},
   156         -    {0xdc0, 0xdc6}, {0xe01, 0xe30}, {0xe40, 0xe46}, {0xe94, 0xe97},
   157         -    {0xe99, 0xe9f}, {0xea1, 0xea3}, {0xead, 0xeb0}, {0xec0, 0xec4},
   158         -    {0xedc, 0xedf}, {0xf40, 0xf47}, {0xf49, 0xf6c}, {0xf88, 0xf8c},
   159         -    {0x1000, 0x102a}, {0x1050, 0x1055}, {0x105a, 0x105d}, {0x106e, 0x1070},
   160         -    {0x1075, 0x1081}, {0x10a0, 0x10c5}, {0x10d0, 0x10fa}, {0x10fc, 0x1248},
   161         -    {0x124a, 0x124d}, {0x1250, 0x1256}, {0x125a, 0x125d}, {0x1260, 0x1288},
   162         -    {0x128a, 0x128d}, {0x1290, 0x12b0}, {0x12b2, 0x12b5}, {0x12b8, 0x12be},
   163         -    {0x12c2, 0x12c5}, {0x12c8, 0x12d6}, {0x12d8, 0x1310}, {0x1312, 0x1315},
   164         -    {0x1318, 0x135a}, {0x1380, 0x138f}, {0x13a0, 0x13f5}, {0x13f8, 0x13fd},
   165         -    {0x1401, 0x166c}, {0x166f, 0x167f}, {0x1681, 0x169a}, {0x16a0, 0x16ea},
   166         -    {0x16f1, 0x16f8}, {0x1700, 0x170c}, {0x170e, 0x1711}, {0x1720, 0x1731},
   167         -    {0x1740, 0x1751}, {0x1760, 0x176c}, {0x176e, 0x1770}, {0x1780, 0x17b3},
   168         -    {0x1820, 0x1878}, {0x1880, 0x1884}, {0x1887, 0x18a8}, {0x18b0, 0x18f5},
   169         -    {0x1900, 0x191e}, {0x1950, 0x196d}, {0x1970, 0x1974}, {0x1980, 0x19ab},
   170         -    {0x19b0, 0x19c9}, {0x1a00, 0x1a16}, {0x1a20, 0x1a54}, {0x1b05, 0x1b33},
   171         -    {0x1b45, 0x1b4b}, {0x1b83, 0x1ba0}, {0x1bba, 0x1be5}, {0x1c00, 0x1c23},
   172         -    {0x1c4d, 0x1c4f}, {0x1c5a, 0x1c7d}, {0x1c80, 0x1c88}, {0x1c90, 0x1cba},
   173         -    {0x1cbd, 0x1cbf}, {0x1ce9, 0x1cec}, {0x1cee, 0x1cf1}, {0x1d00, 0x1dbf},
   174         -    {0x1e00, 0x1f15}, {0x1f18, 0x1f1d}, {0x1f20, 0x1f45}, {0x1f48, 0x1f4d},
   175         -    {0x1f50, 0x1f57}, {0x1f5f, 0x1f7d}, {0x1f80, 0x1fb4}, {0x1fb6, 0x1fbc},
   176         -    {0x1fc2, 0x1fc4}, {0x1fc6, 0x1fcc}, {0x1fd0, 0x1fd3}, {0x1fd6, 0x1fdb},
   177         -    {0x1fe0, 0x1fec}, {0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffc}, {0x2090, 0x209c},
   178         -    {0x210a, 0x2113}, {0x2119, 0x211d}, {0x212a, 0x212d}, {0x212f, 0x2139},
   179         -    {0x213c, 0x213f}, {0x2145, 0x2149}, {0x2c00, 0x2c2e}, {0x2c30, 0x2c5e},
   180         -    {0x2c60, 0x2ce4}, {0x2ceb, 0x2cee}, {0x2d00, 0x2d25}, {0x2d30, 0x2d67},
   181         -    {0x2d80, 0x2d96}, {0x2da0, 0x2da6}, {0x2da8, 0x2dae}, {0x2db0, 0x2db6},
   182         -    {0x2db8, 0x2dbe}, {0x2dc0, 0x2dc6}, {0x2dc8, 0x2dce}, {0x2dd0, 0x2dd6},
   183         -    {0x2dd8, 0x2dde}, {0x3031, 0x3035}, {0x3041, 0x3096}, {0x309d, 0x309f},
   184         -    {0x30a1, 0x30fa}, {0x30fc, 0x30ff}, {0x3105, 0x312f}, {0x3131, 0x318e},
   185         -    {0x31a0, 0x31ba}, {0x31f0, 0x31ff}, {0x3400, 0x4db5}, {0x4e00, 0x9fef},
   186         -    {0xa000, 0xa48c}, {0xa4d0, 0xa4fd}, {0xa500, 0xa60c}, {0xa610, 0xa61f},
   187         -    {0xa640, 0xa66e}, {0xa67f, 0xa69d}, {0xa6a0, 0xa6e5}, {0xa717, 0xa71f},
   188         -    {0xa722, 0xa788}, {0xa78b, 0xa7b9}, {0xa7f7, 0xa801}, {0xa803, 0xa805},
          156  +    {0xdc0, 0xdc6}, {0xe01, 0xe30}, {0xe40, 0xe46}, {0xe86, 0xe8a},
          157  +    {0xe8c, 0xea3}, {0xea7, 0xeb0}, {0xec0, 0xec4}, {0xedc, 0xedf},
          158  +    {0xf40, 0xf47}, {0xf49, 0xf6c}, {0xf88, 0xf8c}, {0x1000, 0x102a},
          159  +    {0x1050, 0x1055}, {0x105a, 0x105d}, {0x106e, 0x1070}, {0x1075, 0x1081},
          160  +    {0x10a0, 0x10c5}, {0x10d0, 0x10fa}, {0x10fc, 0x1248}, {0x124a, 0x124d},
          161  +    {0x1250, 0x1256}, {0x125a, 0x125d}, {0x1260, 0x1288}, {0x128a, 0x128d},
          162  +    {0x1290, 0x12b0}, {0x12b2, 0x12b5}, {0x12b8, 0x12be}, {0x12c2, 0x12c5},
          163  +    {0x12c8, 0x12d6}, {0x12d8, 0x1310}, {0x1312, 0x1315}, {0x1318, 0x135a},
          164  +    {0x1380, 0x138f}, {0x13a0, 0x13f5}, {0x13f8, 0x13fd}, {0x1401, 0x166c},
          165  +    {0x166f, 0x167f}, {0x1681, 0x169a}, {0x16a0, 0x16ea}, {0x16f1, 0x16f8},
          166  +    {0x1700, 0x170c}, {0x170e, 0x1711}, {0x1720, 0x1731}, {0x1740, 0x1751},
          167  +    {0x1760, 0x176c}, {0x176e, 0x1770}, {0x1780, 0x17b3}, {0x1820, 0x1878},
          168  +    {0x1880, 0x1884}, {0x1887, 0x18a8}, {0x18b0, 0x18f5}, {0x1900, 0x191e},
          169  +    {0x1950, 0x196d}, {0x1970, 0x1974}, {0x1980, 0x19ab}, {0x19b0, 0x19c9},
          170  +    {0x1a00, 0x1a16}, {0x1a20, 0x1a54}, {0x1b05, 0x1b33}, {0x1b45, 0x1b4b},
          171  +    {0x1b83, 0x1ba0}, {0x1bba, 0x1be5}, {0x1c00, 0x1c23}, {0x1c4d, 0x1c4f},
          172  +    {0x1c5a, 0x1c7d}, {0x1c80, 0x1c88}, {0x1c90, 0x1cba}, {0x1cbd, 0x1cbf},
          173  +    {0x1ce9, 0x1cec}, {0x1cee, 0x1cf3}, {0x1d00, 0x1dbf}, {0x1e00, 0x1f15},
          174  +    {0x1f18, 0x1f1d}, {0x1f20, 0x1f45}, {0x1f48, 0x1f4d}, {0x1f50, 0x1f57},
          175  +    {0x1f5f, 0x1f7d}, {0x1f80, 0x1fb4}, {0x1fb6, 0x1fbc}, {0x1fc2, 0x1fc4},
          176  +    {0x1fc6, 0x1fcc}, {0x1fd0, 0x1fd3}, {0x1fd6, 0x1fdb}, {0x1fe0, 0x1fec},
          177  +    {0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffc}, {0x2090, 0x209c}, {0x210a, 0x2113},
          178  +    {0x2119, 0x211d}, {0x212a, 0x212d}, {0x212f, 0x2139}, {0x213c, 0x213f},
          179  +    {0x2145, 0x2149}, {0x2c00, 0x2c2e}, {0x2c30, 0x2c5e}, {0x2c60, 0x2ce4},
          180  +    {0x2ceb, 0x2cee}, {0x2d00, 0x2d25}, {0x2d30, 0x2d67}, {0x2d80, 0x2d96},
          181  +    {0x2da0, 0x2da6}, {0x2da8, 0x2dae}, {0x2db0, 0x2db6}, {0x2db8, 0x2dbe},
          182  +    {0x2dc0, 0x2dc6}, {0x2dc8, 0x2dce}, {0x2dd0, 0x2dd6}, {0x2dd8, 0x2dde},
          183  +    {0x3031, 0x3035}, {0x3041, 0x3096}, {0x309d, 0x309f}, {0x30a1, 0x30fa},
          184  +    {0x30fc, 0x30ff}, {0x3105, 0x312f}, {0x3131, 0x318e}, {0x31a0, 0x31ba},
          185  +    {0x31f0, 0x31ff}, {0x3400, 0x4db5}, {0x4e00, 0x9fef}, {0xa000, 0xa48c},
          186  +    {0xa4d0, 0xa4fd}, {0xa500, 0xa60c}, {0xa610, 0xa61f}, {0xa640, 0xa66e},
          187  +    {0xa67f, 0xa69d}, {0xa6a0, 0xa6e5}, {0xa717, 0xa71f}, {0xa722, 0xa788},
          188  +    {0xa78b, 0xa7bf}, {0xa7c2, 0xa7c6}, {0xa7f7, 0xa801}, {0xa803, 0xa805},
   189    189       {0xa807, 0xa80a}, {0xa80c, 0xa822}, {0xa840, 0xa873}, {0xa882, 0xa8b3},
   190    190       {0xa8f2, 0xa8f7}, {0xa90a, 0xa925}, {0xa930, 0xa946}, {0xa960, 0xa97c},
   191    191       {0xa984, 0xa9b2}, {0xa9e0, 0xa9e4}, {0xa9e6, 0xa9ef}, {0xa9fa, 0xa9fe},
   192    192       {0xaa00, 0xaa28}, {0xaa40, 0xaa42}, {0xaa44, 0xaa4b}, {0xaa60, 0xaa76},
   193    193       {0xaa7e, 0xaaaf}, {0xaab9, 0xaabd}, {0xaadb, 0xaadd}, {0xaae0, 0xaaea},
   194    194       {0xaaf2, 0xaaf4}, {0xab01, 0xab06}, {0xab09, 0xab0e}, {0xab11, 0xab16},
   195         -    {0xab20, 0xab26}, {0xab28, 0xab2e}, {0xab30, 0xab5a}, {0xab5c, 0xab65},
          195  +    {0xab20, 0xab26}, {0xab28, 0xab2e}, {0xab30, 0xab5a}, {0xab5c, 0xab67},
   196    196       {0xab70, 0xabe2}, {0xac00, 0xd7a3}, {0xd7b0, 0xd7c6}, {0xd7cb, 0xd7fb},
   197    197       {0xf900, 0xfa6d}, {0xfa70, 0xfad9}, {0xfb00, 0xfb06}, {0xfb13, 0xfb17},
   198    198       {0xfb1f, 0xfb28}, {0xfb2a, 0xfb36}, {0xfb38, 0xfb3c}, {0xfb46, 0xfbb1},
   199    199       {0xfbd3, 0xfd3d}, {0xfd50, 0xfd8f}, {0xfd92, 0xfdc7}, {0xfdf0, 0xfdfb},
   200    200       {0xfe70, 0xfe74}, {0xfe76, 0xfefc}, {0xff21, 0xff3a}, {0xff41, 0xff5a},
   201    201       {0xff66, 0xffbe}, {0xffc2, 0xffc7}, {0xffca, 0xffcf}, {0xffd2, 0xffd7},
   202    202       {0xffda, 0xffdc}
................................................................................
   209    209       {0x10600, 0x10736}, {0x10740, 0x10755}, {0x10760, 0x10767}, {0x10800, 0x10805},
   210    210       {0x1080a, 0x10835}, {0x1083f, 0x10855}, {0x10860, 0x10876}, {0x10880, 0x1089e},
   211    211       {0x108e0, 0x108f2}, {0x10900, 0x10915}, {0x10920, 0x10939}, {0x10980, 0x109b7},
   212    212       {0x10a10, 0x10a13}, {0x10a15, 0x10a17}, {0x10a19, 0x10a35}, {0x10a60, 0x10a7c},
   213    213       {0x10a80, 0x10a9c}, {0x10ac0, 0x10ac7}, {0x10ac9, 0x10ae4}, {0x10b00, 0x10b35},
   214    214       {0x10b40, 0x10b55}, {0x10b60, 0x10b72}, {0x10b80, 0x10b91}, {0x10c00, 0x10c48},
   215    215       {0x10c80, 0x10cb2}, {0x10cc0, 0x10cf2}, {0x10d00, 0x10d23}, {0x10f00, 0x10f1c},
   216         -    {0x10f30, 0x10f45}, {0x11003, 0x11037}, {0x11083, 0x110af}, {0x110d0, 0x110e8},
   217         -    {0x11103, 0x11126}, {0x11150, 0x11172}, {0x11183, 0x111b2}, {0x111c1, 0x111c4},
   218         -    {0x11200, 0x11211}, {0x11213, 0x1122b}, {0x11280, 0x11286}, {0x1128a, 0x1128d},
   219         -    {0x1128f, 0x1129d}, {0x1129f, 0x112a8}, {0x112b0, 0x112de}, {0x11305, 0x1130c},
   220         -    {0x11313, 0x11328}, {0x1132a, 0x11330}, {0x11335, 0x11339}, {0x1135d, 0x11361},
   221         -    {0x11400, 0x11434}, {0x11447, 0x1144a}, {0x11480, 0x114af}, {0x11580, 0x115ae},
   222         -    {0x115d8, 0x115db}, {0x11600, 0x1162f}, {0x11680, 0x116aa}, {0x11700, 0x1171a},
   223         -    {0x11800, 0x1182b}, {0x118a0, 0x118df}, {0x11a0b, 0x11a32}, {0x11a5c, 0x11a83},
   224         -    {0x11a86, 0x11a89}, {0x11ac0, 0x11af8}, {0x11c00, 0x11c08}, {0x11c0a, 0x11c2e},
   225         -    {0x11c72, 0x11c8f}, {0x11d00, 0x11d06}, {0x11d0b, 0x11d30}, {0x11d60, 0x11d65},
   226         -    {0x11d6a, 0x11d89}, {0x11ee0, 0x11ef2}, {0x12000, 0x12399}, {0x12480, 0x12543},
   227         -    {0x13000, 0x1342e}, {0x14400, 0x14646}, {0x16800, 0x16a38}, {0x16a40, 0x16a5e},
   228         -    {0x16ad0, 0x16aed}, {0x16b00, 0x16b2f}, {0x16b40, 0x16b43}, {0x16b63, 0x16b77},
   229         -    {0x16b7d, 0x16b8f}, {0x16e40, 0x16e7f}, {0x16f00, 0x16f44}, {0x16f93, 0x16f9f},
   230         -    {0x17000, 0x187f1}, {0x18800, 0x18af2}, {0x1b000, 0x1b11e}, {0x1b170, 0x1b2fb},
          216  +    {0x10f30, 0x10f45}, {0x10fe0, 0x10ff6}, {0x11003, 0x11037}, {0x11083, 0x110af},
          217  +    {0x110d0, 0x110e8}, {0x11103, 0x11126}, {0x11150, 0x11172}, {0x11183, 0x111b2},
          218  +    {0x111c1, 0x111c4}, {0x11200, 0x11211}, {0x11213, 0x1122b}, {0x11280, 0x11286},
          219  +    {0x1128a, 0x1128d}, {0x1128f, 0x1129d}, {0x1129f, 0x112a8}, {0x112b0, 0x112de},
          220  +    {0x11305, 0x1130c}, {0x11313, 0x11328}, {0x1132a, 0x11330}, {0x11335, 0x11339},
          221  +    {0x1135d, 0x11361}, {0x11400, 0x11434}, {0x11447, 0x1144a}, {0x11480, 0x114af},
          222  +    {0x11580, 0x115ae}, {0x115d8, 0x115db}, {0x11600, 0x1162f}, {0x11680, 0x116aa},
          223  +    {0x11700, 0x1171a}, {0x11800, 0x1182b}, {0x118a0, 0x118df}, {0x119a0, 0x119a7},
          224  +    {0x119aa, 0x119d0}, {0x11a0b, 0x11a32}, {0x11a5c, 0x11a89}, {0x11ac0, 0x11af8},
          225  +    {0x11c00, 0x11c08}, {0x11c0a, 0x11c2e}, {0x11c72, 0x11c8f}, {0x11d00, 0x11d06},
          226  +    {0x11d0b, 0x11d30}, {0x11d60, 0x11d65}, {0x11d6a, 0x11d89}, {0x11ee0, 0x11ef2},
          227  +    {0x12000, 0x12399}, {0x12480, 0x12543}, {0x13000, 0x1342e}, {0x14400, 0x14646},
          228  +    {0x16800, 0x16a38}, {0x16a40, 0x16a5e}, {0x16ad0, 0x16aed}, {0x16b00, 0x16b2f},
          229  +    {0x16b40, 0x16b43}, {0x16b63, 0x16b77}, {0x16b7d, 0x16b8f}, {0x16e40, 0x16e7f},
          230  +    {0x16f00, 0x16f4a}, {0x16f93, 0x16f9f}, {0x17000, 0x187f7}, {0x18800, 0x18af2},
          231  +    {0x1b000, 0x1b11e}, {0x1b150, 0x1b152}, {0x1b164, 0x1b167}, {0x1b170, 0x1b2fb},
   231    232       {0x1bc00, 0x1bc6a}, {0x1bc70, 0x1bc7c}, {0x1bc80, 0x1bc88}, {0x1bc90, 0x1bc99},
   232    233       {0x1d400, 0x1d454}, {0x1d456, 0x1d49c}, {0x1d4a9, 0x1d4ac}, {0x1d4ae, 0x1d4b9},
   233    234       {0x1d4bd, 0x1d4c3}, {0x1d4c5, 0x1d505}, {0x1d507, 0x1d50a}, {0x1d50d, 0x1d514},
   234    235       {0x1d516, 0x1d51c}, {0x1d51e, 0x1d539}, {0x1d53b, 0x1d53e}, {0x1d540, 0x1d544},
   235    236       {0x1d54a, 0x1d550}, {0x1d552, 0x1d6a5}, {0x1d6a8, 0x1d6c0}, {0x1d6c2, 0x1d6da},
   236    237       {0x1d6dc, 0x1d6fa}, {0x1d6fc, 0x1d714}, {0x1d716, 0x1d734}, {0x1d736, 0x1d74e},
   237    238       {0x1d750, 0x1d76e}, {0x1d770, 0x1d788}, {0x1d78a, 0x1d7a8}, {0x1d7aa, 0x1d7c2},
   238         -    {0x1d7c4, 0x1d7cb}, {0x1e800, 0x1e8c4}, {0x1e900, 0x1e943}, {0x1ee00, 0x1ee03},
   239         -    {0x1ee05, 0x1ee1f}, {0x1ee29, 0x1ee32}, {0x1ee34, 0x1ee37}, {0x1ee4d, 0x1ee4f},
   240         -    {0x1ee67, 0x1ee6a}, {0x1ee6c, 0x1ee72}, {0x1ee74, 0x1ee77}, {0x1ee79, 0x1ee7c},
   241         -    {0x1ee80, 0x1ee89}, {0x1ee8b, 0x1ee9b}, {0x1eea1, 0x1eea3}, {0x1eea5, 0x1eea9},
   242         -    {0x1eeab, 0x1eebb}, {0x20000, 0x2a6d6}, {0x2a700, 0x2b734}, {0x2b740, 0x2b81d},
   243         -    {0x2b820, 0x2cea1}, {0x2ceb0, 0x2ebe0}, {0x2f800, 0x2fa1d}
          239  +    {0x1d7c4, 0x1d7cb}, {0x1e100, 0x1e12c}, {0x1e137, 0x1e13d}, {0x1e2c0, 0x1e2eb},
          240  +    {0x1e800, 0x1e8c4}, {0x1e900, 0x1e943}, {0x1ee00, 0x1ee03}, {0x1ee05, 0x1ee1f},
          241  +    {0x1ee29, 0x1ee32}, {0x1ee34, 0x1ee37}, {0x1ee4d, 0x1ee4f}, {0x1ee67, 0x1ee6a},
          242  +    {0x1ee6c, 0x1ee72}, {0x1ee74, 0x1ee77}, {0x1ee79, 0x1ee7c}, {0x1ee80, 0x1ee89},
          243  +    {0x1ee8b, 0x1ee9b}, {0x1eea1, 0x1eea3}, {0x1eea5, 0x1eea9}, {0x1eeab, 0x1eebb},
          244  +    {0x20000, 0x2a6d6}, {0x2a700, 0x2b734}, {0x2b740, 0x2b81d}, {0x2b820, 0x2cea1},
          245  +    {0x2ceb0, 0x2ebe0}, {0x2f800, 0x2fa1d}
   244    246   #endif
   245    247   };
   246    248   
   247    249   #define NUM_ALPHA_RANGE (sizeof(alphaRangeTable)/sizeof(crange))
   248    250   
   249    251   static const chr alphaCharTable[] = {
   250    252       0xaa, 0xb5, 0xba, 0x2ec, 0x2ee, 0x376, 0x377, 0x37f, 0x386,
................................................................................
   253    255       0x93d, 0x950, 0x98f, 0x990, 0x9b2, 0x9bd, 0x9ce, 0x9dc, 0x9dd,
   254    256       0x9f0, 0x9f1, 0x9fc, 0xa0f, 0xa10, 0xa32, 0xa33, 0xa35, 0xa36,
   255    257       0xa38, 0xa39, 0xa5e, 0xab2, 0xab3, 0xabd, 0xad0, 0xae0, 0xae1,
   256    258       0xaf9, 0xb0f, 0xb10, 0xb32, 0xb33, 0xb3d, 0xb5c, 0xb5d, 0xb71,
   257    259       0xb83, 0xb99, 0xb9a, 0xb9c, 0xb9e, 0xb9f, 0xba3, 0xba4, 0xbd0,
   258    260       0xc3d, 0xc60, 0xc61, 0xc80, 0xcbd, 0xcde, 0xce0, 0xce1, 0xcf1,
   259    261       0xcf2, 0xd3d, 0xd4e, 0xdbd, 0xe32, 0xe33, 0xe81, 0xe82, 0xe84,
   260         -    0xe87, 0xe88, 0xe8a, 0xe8d, 0xea5, 0xea7, 0xeaa, 0xeab, 0xeb2,
   261         -    0xeb3, 0xebd, 0xec6, 0xf00, 0x103f, 0x1061, 0x1065, 0x1066, 0x108e,
   262         -    0x10c7, 0x10cd, 0x1258, 0x12c0, 0x17d7, 0x17dc, 0x18aa, 0x1aa7, 0x1bae,
   263         -    0x1baf, 0x1cf5, 0x1cf6, 0x1f59, 0x1f5b, 0x1f5d, 0x1fbe, 0x2071, 0x207f,
   264         -    0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214e, 0x2183, 0x2184,
   265         -    0x2cf2, 0x2cf3, 0x2d27, 0x2d2d, 0x2d6f, 0x2e2f, 0x3005, 0x3006, 0x303b,
   266         -    0x303c, 0xa62a, 0xa62b, 0xa8fb, 0xa8fd, 0xa8fe, 0xa9cf, 0xaa7a, 0xaab1,
   267         -    0xaab5, 0xaab6, 0xaac0, 0xaac2, 0xfb1d, 0xfb3e, 0xfb40, 0xfb41, 0xfb43,
   268         -    0xfb44
          262  +    0xea5, 0xeb2, 0xeb3, 0xebd, 0xec6, 0xf00, 0x103f, 0x1061, 0x1065,
          263  +    0x1066, 0x108e, 0x10c7, 0x10cd, 0x1258, 0x12c0, 0x17d7, 0x17dc, 0x18aa,
          264  +    0x1aa7, 0x1bae, 0x1baf, 0x1cf5, 0x1cf6, 0x1cfa, 0x1f59, 0x1f5b, 0x1f5d,
          265  +    0x1fbe, 0x2071, 0x207f, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128,
          266  +    0x214e, 0x2183, 0x2184, 0x2cf2, 0x2cf3, 0x2d27, 0x2d2d, 0x2d6f, 0x2e2f,
          267  +    0x3005, 0x3006, 0x303b, 0x303c, 0xa62a, 0xa62b, 0xa8fb, 0xa8fd, 0xa8fe,
          268  +    0xa9cf, 0xaa7a, 0xaab1, 0xaab5, 0xaab6, 0xaac0, 0xaac2, 0xfb1d, 0xfb3e,
          269  +    0xfb40, 0xfb41, 0xfb43, 0xfb44
   269    270   #if CHRBITS > 16
   270    271       ,0x1003c, 0x1003d, 0x10808, 0x10837, 0x10838, 0x1083c, 0x108f4, 0x108f5, 0x109be,
   271    272       0x109bf, 0x10a00, 0x10f27, 0x11144, 0x11176, 0x111da, 0x111dc, 0x11288, 0x1130f,
   272         -    0x11310, 0x11332, 0x11333, 0x1133d, 0x11350, 0x114c4, 0x114c5, 0x114c7, 0x11644,
   273         -    0x118ff, 0x11a00, 0x11a3a, 0x11a50, 0x11a9d, 0x11c40, 0x11d08, 0x11d09, 0x11d46,
   274         -    0x11d67, 0x11d68, 0x11d98, 0x16f50, 0x16fe0, 0x16fe1, 0x1d49e, 0x1d49f, 0x1d4a2,
   275         -    0x1d4a5, 0x1d4a6, 0x1d4bb, 0x1d546, 0x1ee21, 0x1ee22, 0x1ee24, 0x1ee27, 0x1ee39,
   276         -    0x1ee3b, 0x1ee42, 0x1ee47, 0x1ee49, 0x1ee4b, 0x1ee51, 0x1ee52, 0x1ee54, 0x1ee57,
   277         -    0x1ee59, 0x1ee5b, 0x1ee5d, 0x1ee5f, 0x1ee61, 0x1ee62, 0x1ee64, 0x1ee7e
          273  +    0x11310, 0x11332, 0x11333, 0x1133d, 0x11350, 0x1145f, 0x114c4, 0x114c5, 0x114c7,
          274  +    0x11644, 0x116b8, 0x118ff, 0x119e1, 0x119e3, 0x11a00, 0x11a3a, 0x11a50, 0x11a9d,
          275  +    0x11c40, 0x11d08, 0x11d09, 0x11d46, 0x11d67, 0x11d68, 0x11d98, 0x16f50, 0x16fe0,
          276  +    0x16fe1, 0x16fe3, 0x1d49e, 0x1d49f, 0x1d4a2, 0x1d4a5, 0x1d4a6, 0x1d4bb, 0x1d546,
          277  +    0x1e14e, 0x1e94b, 0x1ee21, 0x1ee22, 0x1ee24, 0x1ee27, 0x1ee39, 0x1ee3b, 0x1ee42,
          278  +    0x1ee47, 0x1ee49, 0x1ee4b, 0x1ee51, 0x1ee52, 0x1ee54, 0x1ee57, 0x1ee59, 0x1ee5b,
          279  +    0x1ee5d, 0x1ee5f, 0x1ee61, 0x1ee62, 0x1ee64, 0x1ee7e
   278    280   #endif
   279    281   };
   280    282   
   281    283   #define NUM_ALPHA_CHAR (sizeof(alphaCharTable)/sizeof(chr))
   282    284   
   283    285   /*
   284    286    * Unicode: control characters.
................................................................................
   285    287    */
   286    288   
   287    289   static const crange controlRangeTable[] = {
   288    290       {0x0, 0x1f}, {0x7f, 0x9f}, {0x600, 0x605}, {0x200b, 0x200f},
   289    291       {0x202a, 0x202e}, {0x2060, 0x2064}, {0x2066, 0x206f}, {0xe000, 0xf8ff},
   290    292       {0xfff9, 0xfffb}
   291    293   #if CHRBITS > 16
   292         -    ,{0x1bca0, 0x1bca3}, {0x1d173, 0x1d17a}, {0xe0020, 0xe007f}, {0xf0000, 0xffffd},
   293         -    {0x100000, 0x10fffd}
          294  +    ,{0x13430, 0x13438}, {0x1bca0, 0x1bca3}, {0x1d173, 0x1d17a}, {0xe0020, 0xe007f},
          295  +    {0xf0000, 0xffffd}, {0x100000, 0x10fffd}
   294    296   #endif
   295    297   };
   296    298   
   297    299   #define NUM_CONTROL_RANGE (sizeof(controlRangeTable)/sizeof(crange))
   298    300   
   299    301   static const chr controlCharTable[] = {
   300    302       0xad, 0x61c, 0x6dd, 0x70f, 0x8e2, 0x180e, 0xfeff
................................................................................
   321    323       {0xa9d0, 0xa9d9}, {0xa9f0, 0xa9f9}, {0xaa50, 0xaa59}, {0xabf0, 0xabf9},
   322    324       {0xff10, 0xff19}
   323    325   #if CHRBITS > 16
   324    326       ,{0x104a0, 0x104a9}, {0x10d30, 0x10d39}, {0x11066, 0x1106f}, {0x110f0, 0x110f9},
   325    327       {0x11136, 0x1113f}, {0x111d0, 0x111d9}, {0x112f0, 0x112f9}, {0x11450, 0x11459},
   326    328       {0x114d0, 0x114d9}, {0x11650, 0x11659}, {0x116c0, 0x116c9}, {0x11730, 0x11739},
   327    329       {0x118e0, 0x118e9}, {0x11c50, 0x11c59}, {0x11d50, 0x11d59}, {0x11da0, 0x11da9},
   328         -    {0x16a60, 0x16a69}, {0x16b50, 0x16b59}, {0x1d7ce, 0x1d7ff}, {0x1e950, 0x1e959}
          330  +    {0x16a60, 0x16a69}, {0x16b50, 0x16b59}, {0x1d7ce, 0x1d7ff}, {0x1e140, 0x1e149},
          331  +    {0x1e2f0, 0x1e2f9}, {0x1e950, 0x1e959}
   329    332   #endif
   330    333   };
   331    334   
   332    335   #define NUM_DIGIT_RANGE (sizeof(digitRangeTable)/sizeof(crange))
   333    336   
   334    337   /*
   335    338    * no singletons of digit characters.
................................................................................
   344    347       {0x55a, 0x55f}, {0x66a, 0x66d}, {0x700, 0x70d}, {0x7f7, 0x7f9},
   345    348       {0x830, 0x83e}, {0xf04, 0xf12}, {0xf3a, 0xf3d}, {0xfd0, 0xfd4},
   346    349       {0x104a, 0x104f}, {0x1360, 0x1368}, {0x16eb, 0x16ed}, {0x17d4, 0x17d6},
   347    350       {0x17d8, 0x17da}, {0x1800, 0x180a}, {0x1aa0, 0x1aa6}, {0x1aa8, 0x1aad},
   348    351       {0x1b5a, 0x1b60}, {0x1bfc, 0x1bff}, {0x1c3b, 0x1c3f}, {0x1cc0, 0x1cc7},
   349    352       {0x2010, 0x2027}, {0x2030, 0x2043}, {0x2045, 0x2051}, {0x2053, 0x205e},
   350    353       {0x2308, 0x230b}, {0x2768, 0x2775}, {0x27e6, 0x27ef}, {0x2983, 0x2998},
   351         -    {0x29d8, 0x29db}, {0x2cf9, 0x2cfc}, {0x2e00, 0x2e2e}, {0x2e30, 0x2e4e},
          354  +    {0x29d8, 0x29db}, {0x2cf9, 0x2cfc}, {0x2e00, 0x2e2e}, {0x2e30, 0x2e4f},
   352    355       {0x3001, 0x3003}, {0x3008, 0x3011}, {0x3014, 0x301f}, {0xa60d, 0xa60f},
   353    356       {0xa6f2, 0xa6f7}, {0xa874, 0xa877}, {0xa8f8, 0xa8fa}, {0xa9c1, 0xa9cd},
   354    357       {0xaa5c, 0xaa5f}, {0xfe10, 0xfe19}, {0xfe30, 0xfe52}, {0xfe54, 0xfe61},
   355    358       {0xff01, 0xff03}, {0xff05, 0xff0a}, {0xff0c, 0xff0f}, {0xff3b, 0xff3d},
   356    359       {0xff5f, 0xff65}
   357    360   #if CHRBITS > 16
   358    361       ,{0x10100, 0x10102}, {0x10a50, 0x10a58}, {0x10af0, 0x10af6}, {0x10b39, 0x10b3f},
................................................................................
   368    371   #define NUM_PUNCT_RANGE (sizeof(punctRangeTable)/sizeof(crange))
   369    372   
   370    373   static const chr punctCharTable[] = {
   371    374       0x3a, 0x3b, 0x3f, 0x40, 0x5f, 0x7b, 0x7d, 0xa1, 0xa7,
   372    375       0xab, 0xb6, 0xb7, 0xbb, 0xbf, 0x37e, 0x387, 0x589, 0x58a,
   373    376       0x5be, 0x5c0, 0x5c3, 0x5c6, 0x5f3, 0x5f4, 0x609, 0x60a, 0x60c,
   374    377       0x60d, 0x61b, 0x61e, 0x61f, 0x6d4, 0x85e, 0x964, 0x965, 0x970,
   375         -    0x9fd, 0xa76, 0xaf0, 0xc84, 0xdf4, 0xe4f, 0xe5a, 0xe5b, 0xf14,
   376         -    0xf85, 0xfd9, 0xfda, 0x10fb, 0x1400, 0x166d, 0x166e, 0x169b, 0x169c,
          378  +    0x9fd, 0xa76, 0xaf0, 0xc77, 0xc84, 0xdf4, 0xe4f, 0xe5a, 0xe5b,
          379  +    0xf14, 0xf85, 0xfd9, 0xfda, 0x10fb, 0x1400, 0x166e, 0x169b, 0x169c,
   377    380       0x1735, 0x1736, 0x1944, 0x1945, 0x1a1e, 0x1a1f, 0x1c7e, 0x1c7f, 0x1cd3,
   378    381       0x207d, 0x207e, 0x208d, 0x208e, 0x2329, 0x232a, 0x27c5, 0x27c6, 0x29fc,
   379    382       0x29fd, 0x2cfe, 0x2cff, 0x2d70, 0x3030, 0x303d, 0x30a0, 0x30fb, 0xa4fe,
   380    383       0xa4ff, 0xa673, 0xa67e, 0xa8ce, 0xa8cf, 0xa8fc, 0xa92e, 0xa92f, 0xa95f,
   381    384       0xa9de, 0xa9df, 0xaade, 0xaadf, 0xaaf0, 0xaaf1, 0xabeb, 0xfd3e, 0xfd3f,
   382    385       0xfe63, 0xfe68, 0xfe6a, 0xfe6b, 0xff1a, 0xff1b, 0xff1f, 0xff20, 0xff3f,
   383    386       0xff5b, 0xff5d
   384    387   #if CHRBITS > 16
   385    388       ,0x1039f, 0x103d0, 0x1056f, 0x10857, 0x1091f, 0x1093f, 0x10a7f, 0x110bb, 0x110bc,
   386    389       0x11174, 0x11175, 0x111cd, 0x111db, 0x112a9, 0x1145b, 0x1145d, 0x114c6, 0x1183b,
   387         -    0x11c70, 0x11c71, 0x11ef7, 0x11ef8, 0x16a6e, 0x16a6f, 0x16af5, 0x16b44, 0x1bc9f,
   388         -    0x1e95e, 0x1e95f
          390  +    0x119e2, 0x11c70, 0x11c71, 0x11ef7, 0x11ef8, 0x11fff, 0x16a6e, 0x16a6f, 0x16af5,
          391  +    0x16b44, 0x16fe2, 0x1bc9f, 0x1e95e, 0x1e95f
   389    392   #endif
   390    393   };
   391    394   
   392    395   #define NUM_PUNCT_CHAR (sizeof(punctCharTable)/sizeof(chr))
   393    396   
   394    397   /*
   395    398    * Unicode: white space characters.
................................................................................
   420    423       {0x10fd, 0x10ff}, {0x13f8, 0x13fd}, {0x1c80, 0x1c88}, {0x1d00, 0x1d2b},
   421    424       {0x1d6b, 0x1d77}, {0x1d79, 0x1d9a}, {0x1e95, 0x1e9d}, {0x1eff, 0x1f07},
   422    425       {0x1f10, 0x1f15}, {0x1f20, 0x1f27}, {0x1f30, 0x1f37}, {0x1f40, 0x1f45},
   423    426       {0x1f50, 0x1f57}, {0x1f60, 0x1f67}, {0x1f70, 0x1f7d}, {0x1f80, 0x1f87},
   424    427       {0x1f90, 0x1f97}, {0x1fa0, 0x1fa7}, {0x1fb0, 0x1fb4}, {0x1fc2, 0x1fc4},
   425    428       {0x1fd0, 0x1fd3}, {0x1fe0, 0x1fe7}, {0x1ff2, 0x1ff4}, {0x2146, 0x2149},
   426    429       {0x2c30, 0x2c5e}, {0x2c76, 0x2c7b}, {0x2d00, 0x2d25}, {0xa72f, 0xa731},
   427         -    {0xa771, 0xa778}, {0xa793, 0xa795}, {0xab30, 0xab5a}, {0xab60, 0xab65},
          430  +    {0xa771, 0xa778}, {0xa793, 0xa795}, {0xab30, 0xab5a}, {0xab60, 0xab67},
   428    431       {0xab70, 0xabbf}, {0xfb00, 0xfb06}, {0xfb13, 0xfb17}, {0xff41, 0xff5a}
   429    432   #if CHRBITS > 16
   430    433       ,{0x10428, 0x1044f}, {0x104d8, 0x104fb}, {0x10cc0, 0x10cf2}, {0x118c0, 0x118df},
   431    434       {0x16e60, 0x16e7f}, {0x1d41a, 0x1d433}, {0x1d44e, 0x1d454}, {0x1d456, 0x1d467},
   432    435       {0x1d482, 0x1d49b}, {0x1d4b6, 0x1d4b9}, {0x1d4bd, 0x1d4c3}, {0x1d4c5, 0x1d4cf},
   433    436       {0x1d4ea, 0x1d503}, {0x1d51e, 0x1d537}, {0x1d552, 0x1d56b}, {0x1d586, 0x1d59f},
   434    437       {0x1d5ba, 0x1d5d3}, {0x1d5ee, 0x1d607}, {0x1d622, 0x1d63b}, {0x1d656, 0x1d66f},
................................................................................
   500    503       0xa691, 0xa693, 0xa695, 0xa697, 0xa699, 0xa69b, 0xa723, 0xa725, 0xa727,
   501    504       0xa729, 0xa72b, 0xa72d, 0xa733, 0xa735, 0xa737, 0xa739, 0xa73b, 0xa73d,
   502    505       0xa73f, 0xa741, 0xa743, 0xa745, 0xa747, 0xa749, 0xa74b, 0xa74d, 0xa74f,
   503    506       0xa751, 0xa753, 0xa755, 0xa757, 0xa759, 0xa75b, 0xa75d, 0xa75f, 0xa761,
   504    507       0xa763, 0xa765, 0xa767, 0xa769, 0xa76b, 0xa76d, 0xa76f, 0xa77a, 0xa77c,
   505    508       0xa77f, 0xa781, 0xa783, 0xa785, 0xa787, 0xa78c, 0xa78e, 0xa791, 0xa797,
   506    509       0xa799, 0xa79b, 0xa79d, 0xa79f, 0xa7a1, 0xa7a3, 0xa7a5, 0xa7a7, 0xa7a9,
   507         -    0xa7af, 0xa7b5, 0xa7b7, 0xa7b9, 0xa7fa
          510  +    0xa7af, 0xa7b5, 0xa7b7, 0xa7b9, 0xa7bb, 0xa7bd, 0xa7bf, 0xa7c3, 0xa7fa
   508    511   #if CHRBITS > 16
   509    512       ,0x1d4bb, 0x1d7cb
   510    513   #endif
   511    514   };
   512    515   
   513    516   #define NUM_LOWER_CHAR (sizeof(lowerCharTable)/sizeof(chr))
   514    517   
................................................................................
   523    526       {0x3d2, 0x3d4}, {0x3fd, 0x42f}, {0x531, 0x556}, {0x10a0, 0x10c5},
   524    527       {0x13a0, 0x13f5}, {0x1c90, 0x1cba}, {0x1cbd, 0x1cbf}, {0x1f08, 0x1f0f},
   525    528       {0x1f18, 0x1f1d}, {0x1f28, 0x1f2f}, {0x1f38, 0x1f3f}, {0x1f48, 0x1f4d},
   526    529       {0x1f68, 0x1f6f}, {0x1fb8, 0x1fbb}, {0x1fc8, 0x1fcb}, {0x1fd8, 0x1fdb},
   527    530       {0x1fe8, 0x1fec}, {0x1ff8, 0x1ffb}, {0x210b, 0x210d}, {0x2110, 0x2112},
   528    531       {0x2119, 0x211d}, {0x212a, 0x212d}, {0x2130, 0x2133}, {0x2c00, 0x2c2e},
   529    532       {0x2c62, 0x2c64}, {0x2c6d, 0x2c70}, {0x2c7e, 0x2c80}, {0xa7aa, 0xa7ae},
   530         -    {0xa7b0, 0xa7b4}, {0xff21, 0xff3a}
          533  +    {0xa7b0, 0xa7b4}, {0xa7c4, 0xa7c6}, {0xff21, 0xff3a}
   531    534   #if CHRBITS > 16
   532    535       ,{0x10400, 0x10427}, {0x104b0, 0x104d3}, {0x10c80, 0x10cb2}, {0x118a0, 0x118bf},
   533    536       {0x16e40, 0x16e5f}, {0x1d400, 0x1d419}, {0x1d434, 0x1d44d}, {0x1d468, 0x1d481},
   534    537       {0x1d4a9, 0x1d4ac}, {0x1d4ae, 0x1d4b5}, {0x1d4d0, 0x1d4e9}, {0x1d507, 0x1d50a},
   535    538       {0x1d50d, 0x1d514}, {0x1d516, 0x1d51c}, {0x1d53b, 0x1d53e}, {0x1d540, 0x1d544},
   536    539       {0x1d54a, 0x1d550}, {0x1d56c, 0x1d585}, {0x1d5a0, 0x1d5b9}, {0x1d5d4, 0x1d5ed},
   537    540       {0x1d608, 0x1d621}, {0x1d63c, 0x1d655}, {0x1d670, 0x1d689}, {0x1d6a8, 0x1d6c0},
................................................................................
   602    605       0xa698, 0xa69a, 0xa722, 0xa724, 0xa726, 0xa728, 0xa72a, 0xa72c, 0xa72e,
   603    606       0xa732, 0xa734, 0xa736, 0xa738, 0xa73a, 0xa73c, 0xa73e, 0xa740, 0xa742,
   604    607       0xa744, 0xa746, 0xa748, 0xa74a, 0xa74c, 0xa74e, 0xa750, 0xa752, 0xa754,
   605    608       0xa756, 0xa758, 0xa75a, 0xa75c, 0xa75e, 0xa760, 0xa762, 0xa764, 0xa766,
   606    609       0xa768, 0xa76a, 0xa76c, 0xa76e, 0xa779, 0xa77b, 0xa77d, 0xa77e, 0xa780,
   607    610       0xa782, 0xa784, 0xa786, 0xa78b, 0xa78d, 0xa790, 0xa792, 0xa796, 0xa798,
   608    611       0xa79a, 0xa79c, 0xa79e, 0xa7a0, 0xa7a2, 0xa7a4, 0xa7a6, 0xa7a8, 0xa7b6,
   609         -    0xa7b8
          612  +    0xa7b8, 0xa7ba, 0xa7bc, 0xa7be, 0xa7c2
   610    613   #if CHRBITS > 16
   611    614       ,0x1d49c, 0x1d49e, 0x1d49f, 0x1d4a2, 0x1d4a5, 0x1d4a6, 0x1d504, 0x1d505, 0x1d538,
   612    615       0x1d539, 0x1d546, 0x1d7ca
   613    616   #endif
   614    617   };
   615    618   
   616    619   #define NUM_UPPER_CHAR (sizeof(upperCharTable)/sizeof(chr))
................................................................................
   636    639       {0xae0, 0xae3}, {0xae6, 0xaf1}, {0xaf9, 0xaff}, {0xb01, 0xb03},
   637    640       {0xb05, 0xb0c}, {0xb13, 0xb28}, {0xb2a, 0xb30}, {0xb35, 0xb39},
   638    641       {0xb3c, 0xb44}, {0xb4b, 0xb4d}, {0xb5f, 0xb63}, {0xb66, 0xb77},
   639    642       {0xb85, 0xb8a}, {0xb8e, 0xb90}, {0xb92, 0xb95}, {0xba8, 0xbaa},
   640    643       {0xbae, 0xbb9}, {0xbbe, 0xbc2}, {0xbc6, 0xbc8}, {0xbca, 0xbcd},
   641    644       {0xbe6, 0xbfa}, {0xc00, 0xc0c}, {0xc0e, 0xc10}, {0xc12, 0xc28},
   642    645       {0xc2a, 0xc39}, {0xc3d, 0xc44}, {0xc46, 0xc48}, {0xc4a, 0xc4d},
   643         -    {0xc58, 0xc5a}, {0xc60, 0xc63}, {0xc66, 0xc6f}, {0xc78, 0xc8c},
          646  +    {0xc58, 0xc5a}, {0xc60, 0xc63}, {0xc66, 0xc6f}, {0xc77, 0xc8c},
   644    647       {0xc8e, 0xc90}, {0xc92, 0xca8}, {0xcaa, 0xcb3}, {0xcb5, 0xcb9},
   645    648       {0xcbc, 0xcc4}, {0xcc6, 0xcc8}, {0xcca, 0xccd}, {0xce0, 0xce3},
   646    649       {0xce6, 0xcef}, {0xd00, 0xd03}, {0xd05, 0xd0c}, {0xd0e, 0xd10},
   647    650       {0xd12, 0xd44}, {0xd46, 0xd48}, {0xd4a, 0xd4f}, {0xd54, 0xd63},
   648    651       {0xd66, 0xd7f}, {0xd85, 0xd96}, {0xd9a, 0xdb1}, {0xdb3, 0xdbb},
   649    652       {0xdc0, 0xdc6}, {0xdcf, 0xdd4}, {0xdd8, 0xddf}, {0xde6, 0xdef},
   650         -    {0xdf2, 0xdf4}, {0xe01, 0xe3a}, {0xe3f, 0xe5b}, {0xe94, 0xe97},
   651         -    {0xe99, 0xe9f}, {0xea1, 0xea3}, {0xead, 0xeb9}, {0xebb, 0xebd},
   652         -    {0xec0, 0xec4}, {0xec8, 0xecd}, {0xed0, 0xed9}, {0xedc, 0xedf},
   653         -    {0xf00, 0xf47}, {0xf49, 0xf6c}, {0xf71, 0xf97}, {0xf99, 0xfbc},
   654         -    {0xfbe, 0xfcc}, {0xfce, 0xfda}, {0x1000, 0x10c5}, {0x10d0, 0x1248},
   655         -    {0x124a, 0x124d}, {0x1250, 0x1256}, {0x125a, 0x125d}, {0x1260, 0x1288},
   656         -    {0x128a, 0x128d}, {0x1290, 0x12b0}, {0x12b2, 0x12b5}, {0x12b8, 0x12be},
   657         -    {0x12c2, 0x12c5}, {0x12c8, 0x12d6}, {0x12d8, 0x1310}, {0x1312, 0x1315},
   658         -    {0x1318, 0x135a}, {0x135d, 0x137c}, {0x1380, 0x1399}, {0x13a0, 0x13f5},
   659         -    {0x13f8, 0x13fd}, {0x1400, 0x167f}, {0x1681, 0x169c}, {0x16a0, 0x16f8},
   660         -    {0x1700, 0x170c}, {0x170e, 0x1714}, {0x1720, 0x1736}, {0x1740, 0x1753},
   661         -    {0x1760, 0x176c}, {0x176e, 0x1770}, {0x1780, 0x17dd}, {0x17e0, 0x17e9},
   662         -    {0x17f0, 0x17f9}, {0x1800, 0x180d}, {0x1810, 0x1819}, {0x1820, 0x1878},
   663         -    {0x1880, 0x18aa}, {0x18b0, 0x18f5}, {0x1900, 0x191e}, {0x1920, 0x192b},
   664         -    {0x1930, 0x193b}, {0x1944, 0x196d}, {0x1970, 0x1974}, {0x1980, 0x19ab},
   665         -    {0x19b0, 0x19c9}, {0x19d0, 0x19da}, {0x19de, 0x1a1b}, {0x1a1e, 0x1a5e},
   666         -    {0x1a60, 0x1a7c}, {0x1a7f, 0x1a89}, {0x1a90, 0x1a99}, {0x1aa0, 0x1aad},
   667         -    {0x1ab0, 0x1abe}, {0x1b00, 0x1b4b}, {0x1b50, 0x1b7c}, {0x1b80, 0x1bf3},
   668         -    {0x1bfc, 0x1c37}, {0x1c3b, 0x1c49}, {0x1c4d, 0x1c88}, {0x1c90, 0x1cba},
   669         -    {0x1cbd, 0x1cc7}, {0x1cd0, 0x1cf9}, {0x1d00, 0x1df9}, {0x1dfb, 0x1f15},
   670         -    {0x1f18, 0x1f1d}, {0x1f20, 0x1f45}, {0x1f48, 0x1f4d}, {0x1f50, 0x1f57},
   671         -    {0x1f5f, 0x1f7d}, {0x1f80, 0x1fb4}, {0x1fb6, 0x1fc4}, {0x1fc6, 0x1fd3},
   672         -    {0x1fd6, 0x1fdb}, {0x1fdd, 0x1fef}, {0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffe},
   673         -    {0x2010, 0x2027}, {0x2030, 0x205e}, {0x2074, 0x208e}, {0x2090, 0x209c},
   674         -    {0x20a0, 0x20bf}, {0x20d0, 0x20f0}, {0x2100, 0x218b}, {0x2190, 0x2426},
   675         -    {0x2440, 0x244a}, {0x2460, 0x2b73}, {0x2b76, 0x2b95}, {0x2b98, 0x2bc8},
   676         -    {0x2bca, 0x2bfe}, {0x2c00, 0x2c2e}, {0x2c30, 0x2c5e}, {0x2c60, 0x2cf3},
          653  +    {0xdf2, 0xdf4}, {0xe01, 0xe3a}, {0xe3f, 0xe5b}, {0xe86, 0xe8a},
          654  +    {0xe8c, 0xea3}, {0xea7, 0xebd}, {0xec0, 0xec4}, {0xec8, 0xecd},
          655  +    {0xed0, 0xed9}, {0xedc, 0xedf}, {0xf00, 0xf47}, {0xf49, 0xf6c},
          656  +    {0xf71, 0xf97}, {0xf99, 0xfbc}, {0xfbe, 0xfcc}, {0xfce, 0xfda},
          657  +    {0x1000, 0x10c5}, {0x10d0, 0x1248}, {0x124a, 0x124d}, {0x1250, 0x1256},
          658  +    {0x125a, 0x125d}, {0x1260, 0x1288}, {0x128a, 0x128d}, {0x1290, 0x12b0},
          659  +    {0x12b2, 0x12b5}, {0x12b8, 0x12be}, {0x12c2, 0x12c5}, {0x12c8, 0x12d6},
          660  +    {0x12d8, 0x1310}, {0x1312, 0x1315}, {0x1318, 0x135a}, {0x135d, 0x137c},
          661  +    {0x1380, 0x1399}, {0x13a0, 0x13f5}, {0x13f8, 0x13fd}, {0x1400, 0x167f},
          662  +    {0x1681, 0x169c}, {0x16a0, 0x16f8}, {0x1700, 0x170c}, {0x170e, 0x1714},
          663  +    {0x1720, 0x1736}, {0x1740, 0x1753}, {0x1760, 0x176c}, {0x176e, 0x1770},
          664  +    {0x1780, 0x17dd}, {0x17e0, 0x17e9}, {0x17f0, 0x17f9}, {0x1800, 0x180d},
          665  +    {0x1810, 0x1819}, {0x1820, 0x1878}, {0x1880, 0x18aa}, {0x18b0, 0x18f5},
          666  +    {0x1900, 0x191e}, {0x1920, 0x192b}, {0x1930, 0x193b}, {0x1944, 0x196d},
          667  +    {0x1970, 0x1974}, {0x1980, 0x19ab}, {0x19b0, 0x19c9}, {0x19d0, 0x19da},
          668  +    {0x19de, 0x1a1b}, {0x1a1e, 0x1a5e}, {0x1a60, 0x1a7c}, {0x1a7f, 0x1a89},
          669  +    {0x1a90, 0x1a99}, {0x1aa0, 0x1aad}, {0x1ab0, 0x1abe}, {0x1b00, 0x1b4b},
          670  +    {0x1b50, 0x1b7c}, {0x1b80, 0x1bf3}, {0x1bfc, 0x1c37}, {0x1c3b, 0x1c49},
          671  +    {0x1c4d, 0x1c88}, {0x1c90, 0x1cba}, {0x1cbd, 0x1cc7}, {0x1cd0, 0x1cfa},
          672  +    {0x1d00, 0x1df9}, {0x1dfb, 0x1f15}, {0x1f18, 0x1f1d}, {0x1f20, 0x1f45},
          673  +    {0x1f48, 0x1f4d}, {0x1f50, 0x1f57}, {0x1f5f, 0x1f7d}, {0x1f80, 0x1fb4},
          674  +    {0x1fb6, 0x1fc4}, {0x1fc6, 0x1fd3}, {0x1fd6, 0x1fdb}, {0x1fdd, 0x1fef},
          675  +    {0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffe}, {0x2010, 0x2027}, {0x2030, 0x205e},
          676  +    {0x2074, 0x208e}, {0x2090, 0x209c}, {0x20a0, 0x20bf}, {0x20d0, 0x20f0},
          677  +    {0x2100, 0x218b}, {0x2190, 0x2426}, {0x2440, 0x244a}, {0x2460, 0x2b73},
          678  +    {0x2b76, 0x2b95}, {0x2b98, 0x2c2e}, {0x2c30, 0x2c5e}, {0x2c60, 0x2cf3},
   677    679       {0x2cf9, 0x2d25}, {0x2d30, 0x2d67}, {0x2d7f, 0x2d96}, {0x2da0, 0x2da6},
   678    680       {0x2da8, 0x2dae}, {0x2db0, 0x2db6}, {0x2db8, 0x2dbe}, {0x2dc0, 0x2dc6},
   679         -    {0x2dc8, 0x2dce}, {0x2dd0, 0x2dd6}, {0x2dd8, 0x2dde}, {0x2de0, 0x2e4e},
          681  +    {0x2dc8, 0x2dce}, {0x2dd0, 0x2dd6}, {0x2dd8, 0x2dde}, {0x2de0, 0x2e4f},
   680    682       {0x2e80, 0x2e99}, {0x2e9b, 0x2ef3}, {0x2f00, 0x2fd5}, {0x2ff0, 0x2ffb},
   681    683       {0x3001, 0x303f}, {0x3041, 0x3096}, {0x3099, 0x30ff}, {0x3105, 0x312f},
   682    684       {0x3131, 0x318e}, {0x3190, 0x31ba}, {0x31c0, 0x31e3}, {0x31f0, 0x321e},
   683         -    {0x3220, 0x32fe}, {0x3300, 0x4db5}, {0x4dc0, 0x9fef}, {0xa000, 0xa48c},
   684         -    {0xa490, 0xa4c6}, {0xa4d0, 0xa62b}, {0xa640, 0xa6f7}, {0xa700, 0xa7b9},
          685  +    {0x3220, 0x4db5}, {0x4dc0, 0x9fef}, {0xa000, 0xa48c}, {0xa490, 0xa4c6},
          686  +    {0xa4d0, 0xa62b}, {0xa640, 0xa6f7}, {0xa700, 0xa7bf}, {0xa7c2, 0xa7c6},
   685    687       {0xa7f7, 0xa82b}, {0xa830, 0xa839}, {0xa840, 0xa877}, {0xa880, 0xa8c5},
   686    688       {0xa8ce, 0xa8d9}, {0xa8e0, 0xa953}, {0xa95f, 0xa97c}, {0xa980, 0xa9cd},
   687    689       {0xa9cf, 0xa9d9}, {0xa9de, 0xa9fe}, {0xaa00, 0xaa36}, {0xaa40, 0xaa4d},
   688    690       {0xaa50, 0xaa59}, {0xaa5c, 0xaac2}, {0xaadb, 0xaaf6}, {0xab01, 0xab06},
   689    691       {0xab09, 0xab0e}, {0xab11, 0xab16}, {0xab20, 0xab26}, {0xab28, 0xab2e},
   690         -    {0xab30, 0xab65}, {0xab70, 0xabed}, {0xabf0, 0xabf9}, {0xac00, 0xd7a3},
          692  +    {0xab30, 0xab67}, {0xab70, 0xabed}, {0xabf0, 0xabf9}, {0xac00, 0xd7a3},
   691    693       {0xd7b0, 0xd7c6}, {0xd7cb, 0xd7fb}, {0xf900, 0xfa6d}, {0xfa70, 0xfad9},
   692    694       {0xfb00, 0xfb06}, {0xfb13, 0xfb17}, {0xfb1d, 0xfb36}, {0xfb38, 0xfb3c},
   693    695       {0xfb46, 0xfbc1}, {0xfbd3, 0xfd3f}, {0xfd50, 0xfd8f}, {0xfd92, 0xfdc7},
   694    696       {0xfdf0, 0xfdfd}, {0xfe00, 0xfe19}, {0xfe20, 0xfe52}, {0xfe54, 0xfe66},
   695    697       {0xfe68, 0xfe6b}, {0xfe70, 0xfe74}, {0xfe76, 0xfefc}, {0xff01, 0xffbe},
   696    698       {0xffc2, 0xffc7}, {0xffca, 0xffcf}, {0xffd2, 0xffd7}, {0xffda, 0xffdc},
   697    699       {0xffe0, 0xffe6}, {0xffe8, 0xffee}
................................................................................
   707    709       {0x10857, 0x1089e}, {0x108a7, 0x108af}, {0x108e0, 0x108f2}, {0x108fb, 0x1091b},
   708    710       {0x1091f, 0x10939}, {0x10980, 0x109b7}, {0x109bc, 0x109cf}, {0x109d2, 0x10a03},
   709    711       {0x10a0c, 0x10a13}, {0x10a15, 0x10a17}, {0x10a19, 0x10a35}, {0x10a38, 0x10a3a},
   710    712       {0x10a3f, 0x10a48}, {0x10a50, 0x10a58}, {0x10a60, 0x10a9f}, {0x10ac0, 0x10ae6},
   711    713       {0x10aeb, 0x10af6}, {0x10b00, 0x10b35}, {0x10b39, 0x10b55}, {0x10b58, 0x10b72},
   712    714       {0x10b78, 0x10b91}, {0x10b99, 0x10b9c}, {0x10ba9, 0x10baf}, {0x10c00, 0x10c48},
   713    715       {0x10c80, 0x10cb2}, {0x10cc0, 0x10cf2}, {0x10cfa, 0x10d27}, {0x10d30, 0x10d39},
   714         -    {0x10e60, 0x10e7e}, {0x10f00, 0x10f27}, {0x10f30, 0x10f59}, {0x11000, 0x1104d},
   715         -    {0x11052, 0x1106f}, {0x1107f, 0x110bc}, {0x110be, 0x110c1}, {0x110d0, 0x110e8},
   716         -    {0x110f0, 0x110f9}, {0x11100, 0x11134}, {0x11136, 0x11146}, {0x11150, 0x11176},
   717         -    {0x11180, 0x111cd}, {0x111d0, 0x111df}, {0x111e1, 0x111f4}, {0x11200, 0x11211},
   718         -    {0x11213, 0x1123e}, {0x11280, 0x11286}, {0x1128a, 0x1128d}, {0x1128f, 0x1129d},
   719         -    {0x1129f, 0x112a9}, {0x112b0, 0x112ea}, {0x112f0, 0x112f9}, {0x11300, 0x11303},
   720         -    {0x11305, 0x1130c}, {0x11313, 0x11328}, {0x1132a, 0x11330}, {0x11335, 0x11339},
   721         -    {0x1133b, 0x11344}, {0x1134b, 0x1134d}, {0x1135d, 0x11363}, {0x11366, 0x1136c},
   722         -    {0x11370, 0x11374}, {0x11400, 0x11459}, {0x11480, 0x114c7}, {0x114d0, 0x114d9},
   723         -    {0x11580, 0x115b5}, {0x115b8, 0x115dd}, {0x11600, 0x11644}, {0x11650, 0x11659},
   724         -    {0x11660, 0x1166c}, {0x11680, 0x116b7}, {0x116c0, 0x116c9}, {0x11700, 0x1171a},
   725         -    {0x1171d, 0x1172b}, {0x11730, 0x1173f}, {0x11800, 0x1183b}, {0x118a0, 0x118f2},
   726         -    {0x11a00, 0x11a47}, {0x11a50, 0x11a83}, {0x11a86, 0x11aa2}, {0x11ac0, 0x11af8},
          716  +    {0x10e60, 0x10e7e}, {0x10f00, 0x10f27}, {0x10f30, 0x10f59}, {0x10fe0, 0x10ff6},
          717  +    {0x11000, 0x1104d}, {0x11052, 0x1106f}, {0x1107f, 0x110bc}, {0x110be, 0x110c1},
          718  +    {0x110d0, 0x110e8}, {0x110f0, 0x110f9}, {0x11100, 0x11134}, {0x11136, 0x11146},
          719  +    {0x11150, 0x11176}, {0x11180, 0x111cd}, {0x111d0, 0x111df}, {0x111e1, 0x111f4},
          720  +    {0x11200, 0x11211}, {0x11213, 0x1123e}, {0x11280, 0x11286}, {0x1128a, 0x1128d},
          721  +    {0x1128f, 0x1129d}, {0x1129f, 0x112a9}, {0x112b0, 0x112ea}, {0x112f0, 0x112f9},
          722  +    {0x11300, 0x11303}, {0x11305, 0x1130c}, {0x11313, 0x11328}, {0x1132a, 0x11330},
          723  +    {0x11335, 0x11339}, {0x1133b, 0x11344}, {0x1134b, 0x1134d}, {0x1135d, 0x11363},
          724  +    {0x11366, 0x1136c}, {0x11370, 0x11374}, {0x11400, 0x11459}, {0x1145d, 0x1145f},
          725  +    {0x11480, 0x114c7}, {0x114d0, 0x114d9}, {0x11580, 0x115b5}, {0x115b8, 0x115dd},
          726  +    {0x11600, 0x11644}, {0x11650, 0x11659}, {0x11660, 0x1166c}, {0x11680, 0x116b8},
          727  +    {0x116c0, 0x116c9}, {0x11700, 0x1171a}, {0x1171d, 0x1172b}, {0x11730, 0x1173f},
          728  +    {0x11800, 0x1183b}, {0x118a0, 0x118f2}, {0x119a0, 0x119a7}, {0x119aa, 0x119d7},
          729  +    {0x119da, 0x119e4}, {0x11a00, 0x11a47}, {0x11a50, 0x11aa2}, {0x11ac0, 0x11af8},
   727    730       {0x11c00, 0x11c08}, {0x11c0a, 0x11c36}, {0x11c38, 0x11c45}, {0x11c50, 0x11c6c},
   728    731       {0x11c70, 0x11c8f}, {0x11c92, 0x11ca7}, {0x11ca9, 0x11cb6}, {0x11d00, 0x11d06},
   729    732       {0x11d0b, 0x11d36}, {0x11d3f, 0x11d47}, {0x11d50, 0x11d59}, {0x11d60, 0x11d65},
   730    733       {0x11d6a, 0x11d8e}, {0x11d93, 0x11d98}, {0x11da0, 0x11da9}, {0x11ee0, 0x11ef8},
   731         -    {0x12000, 0x12399}, {0x12400, 0x1246e}, {0x12470, 0x12474}, {0x12480, 0x12543},
   732         -    {0x13000, 0x1342e}, {0x14400, 0x14646}, {0x16800, 0x16a38}, {0x16a40, 0x16a5e},
   733         -    {0x16a60, 0x16a69}, {0x16ad0, 0x16aed}, {0x16af0, 0x16af5}, {0x16b00, 0x16b45},
   734         -    {0x16b50, 0x16b59}, {0x16b5b, 0x16b61}, {0x16b63, 0x16b77}, {0x16b7d, 0x16b8f},
   735         -    {0x16e40, 0x16e9a}, {0x16f00, 0x16f44}, {0x16f50, 0x16f7e}, {0x16f8f, 0x16f9f},
   736         -    {0x17000, 0x187f1}, {0x18800, 0x18af2}, {0x1b000, 0x1b11e}, {0x1b170, 0x1b2fb},
          734  +    {0x11fc0, 0x11ff1}, {0x11fff, 0x12399}, {0x12400, 0x1246e}, {0x12470, 0x12474},
          735  +    {0x12480, 0x12543}, {0x13000, 0x1342e}, {0x14400, 0x14646}, {0x16800, 0x16a38},
          736  +    {0x16a40, 0x16a5e}, {0x16a60, 0x16a69}, {0x16ad0, 0x16aed}, {0x16af0, 0x16af5},
          737  +    {0x16b00, 0x16b45}, {0x16b50, 0x16b59}, {0x16b5b, 0x16b61}, {0x16b63, 0x16b77},
          738  +    {0x16b7d, 0x16b8f}, {0x16e40, 0x16e9a}, {0x16f00, 0x16f4a}, {0x16f4f, 0x16f87},
          739  +    {0x16f8f, 0x16f9f}, {0x16fe0, 0x16fe3}, {0x17000, 0x187f7}, {0x18800, 0x18af2},
          740  +    {0x1b000, 0x1b11e}, {0x1b150, 0x1b152}, {0x1b164, 0x1b167}, {0x1b170, 0x1b2fb},
   737    741       {0x1bc00, 0x1bc6a}, {0x1bc70, 0x1bc7c}, {0x1bc80, 0x1bc88}, {0x1bc90, 0x1bc99},
   738    742       {0x1bc9c, 0x1bc9f}, {0x1d000, 0x1d0f5}, {0x1d100, 0x1d126}, {0x1d129, 0x1d172},
   739    743       {0x1d17b, 0x1d1e8}, {0x1d200, 0x1d245}, {0x1d2e0, 0x1d2f3}, {0x1d300, 0x1d356},
   740    744       {0x1d360, 0x1d378}, {0x1d400, 0x1d454}, {0x1d456, 0x1d49c}, {0x1d4a9, 0x1d4ac},
   741    745       {0x1d4ae, 0x1d4b9}, {0x1d4bd, 0x1d4c3}, {0x1d4c5, 0x1d505}, {0x1d507, 0x1d50a},
   742    746       {0x1d50d, 0x1d514}, {0x1d516, 0x1d51c}, {0x1d51e, 0x1d539}, {0x1d53b, 0x1d53e},
   743    747       {0x1d540, 0x1d544}, {0x1d54a, 0x1d550}, {0x1d552, 0x1d6a5}, {0x1d6a8, 0x1d7cb},
   744    748       {0x1d7ce, 0x1da8b}, {0x1da9b, 0x1da9f}, {0x1daa1, 0x1daaf}, {0x1e000, 0x1e006},
   745         -    {0x1e008, 0x1e018}, {0x1e01b, 0x1e021}, {0x1e026, 0x1e02a}, {0x1e800, 0x1e8c4},
   746         -    {0x1e8c7, 0x1e8d6}, {0x1e900, 0x1e94a}, {0x1e950, 0x1e959}, {0x1ec71, 0x1ecb4},
   747         -    {0x1ee00, 0x1ee03}, {0x1ee05, 0x1ee1f}, {0x1ee29, 0x1ee32}, {0x1ee34, 0x1ee37},
   748         -    {0x1ee4d, 0x1ee4f}, {0x1ee67, 0x1ee6a}, {0x1ee6c, 0x1ee72}, {0x1ee74, 0x1ee77},
   749         -    {0x1ee79, 0x1ee7c}, {0x1ee80, 0x1ee89}, {0x1ee8b, 0x1ee9b}, {0x1eea1, 0x1eea3},
   750         -    {0x1eea5, 0x1eea9}, {0x1eeab, 0x1eebb}, {0x1f000, 0x1f02b}, {0x1f030, 0x1f093},
   751         -    {0x1f0a0, 0x1f0ae}, {0x1f0b1, 0x1f0bf}, {0x1f0c1, 0x1f0cf}, {0x1f0d1, 0x1f0f5},
   752         -    {0x1f100, 0x1f10c}, {0x1f110, 0x1f16b}, {0x1f170, 0x1f1ac}, {0x1f1e6, 0x1f202},
   753         -    {0x1f210, 0x1f23b}, {0x1f240, 0x1f248}, {0x1f260, 0x1f265}, {0x1f300, 0x1f6d4},
   754         -    {0x1f6e0, 0x1f6ec}, {0x1f6f0, 0x1f6f9}, {0x1f700, 0x1f773}, {0x1f780, 0x1f7d8},
   755         -    {0x1f800, 0x1f80b}, {0x1f810, 0x1f847}, {0x1f850, 0x1f859}, {0x1f860, 0x1f887},
   756         -    {0x1f890, 0x1f8ad}, {0x1f900, 0x1f90b}, {0x1f910, 0x1f93e}, {0x1f940, 0x1f970},
   757         -    {0x1f973, 0x1f976}, {0x1f97c, 0x1f9a2}, {0x1f9b0, 0x1f9b9}, {0x1f9c0, 0x1f9c2},
   758         -    {0x1f9d0, 0x1f9ff}, {0x1fa60, 0x1fa6d}, {0x20000, 0x2a6d6}, {0x2a700, 0x2b734},
   759         -    {0x2b740, 0x2b81d}, {0x2b820, 0x2cea1}, {0x2ceb0, 0x2ebe0}, {0x2f800, 0x2fa1d},
   760         -    {0xe0100, 0xe01ef}
          749  +    {0x1e008, 0x1e018}, {0x1e01b, 0x1e021}, {0x1e026, 0x1e02a}, {0x1e100, 0x1e12c},
          750  +    {0x1e130, 0x1e13d}, {0x1e140, 0x1e149}, {0x1e2c0, 0x1e2f9}, {0x1e800, 0x1e8c4},
          751  +    {0x1e8c7, 0x1e8d6}, {0x1e900, 0x1e94b}, {0x1e950, 0x1e959}, {0x1ec71, 0x1ecb4},
          752  +    {0x1ed01, 0x1ed3d}, {0x1ee00, 0x1ee03}, {0x1ee05, 0x1ee1f}, {0x1ee29, 0x1ee32},
          753  +    {0x1ee34, 0x1ee37}, {0x1ee4d, 0x1ee4f}, {0x1ee67, 0x1ee6a}, {0x1ee6c, 0x1ee72},
          754  +    {0x1ee74, 0x1ee77}, {0x1ee79, 0x1ee7c}, {0x1ee80, 0x1ee89}, {0x1ee8b, 0x1ee9b},
          755  +    {0x1eea1, 0x1eea3}, {0x1eea5, 0x1eea9}, {0x1eeab, 0x1eebb}, {0x1f000, 0x1f02b},
          756  +    {0x1f030, 0x1f093}, {0x1f0a0, 0x1f0ae}, {0x1f0b1, 0x1f0bf}, {0x1f0c1, 0x1f0cf},
          757  +    {0x1f0d1, 0x1f0f5}, {0x1f100, 0x1f10c}, {0x1f110, 0x1f16c}, {0x1f170, 0x1f1ac},
          758  +    {0x1f1e6, 0x1f202}, {0x1f210, 0x1f23b}, {0x1f240, 0x1f248}, {0x1f260, 0x1f265},
          759  +    {0x1f300, 0x1f6d5}, {0x1f6e0, 0x1f6ec}, {0x1f6f0, 0x1f6fa}, {0x1f700, 0x1f773},
          760  +    {0x1f780, 0x1f7d8}, {0x1f7e0, 0x1f7eb}, {0x1f800, 0x1f80b}, {0x1f810, 0x1f847},
          761  +    {0x1f850, 0x1f859}, {0x1f860, 0x1f887}, {0x1f890, 0x1f8ad}, {0x1f900, 0x1f90b},
          762  +    {0x1f90d, 0x1f971}, {0x1f973, 0x1f976}, {0x1f97a, 0x1f9a2}, {0x1f9a5, 0x1f9aa},
          763  +    {0x1f9ae, 0x1f9ca}, {0x1f9cd, 0x1fa53}, {0x1fa60, 0x1fa6d}, {0x1fa70, 0x1fa73},
          764  +    {0x1fa78, 0x1fa7a}, {0x1fa80, 0x1fa82}, {0x1fa90, 0x1fa95}, {0x20000, 0x2a6d6},
          765  +    {0x2a700, 0x2b734}, {0x2b740, 0x2b81d}, {0x2b820, 0x2cea1}, {0x2ceb0, 0x2ebe0},
          766  +    {0x2f800, 0x2fa1d}, {0xe0100, 0xe01ef}
   761    767   #endif
   762    768   };
   763    769   
   764    770   #define NUM_GRAPH_RANGE (sizeof(graphRangeTable)/sizeof(crange))
   765    771   
   766    772   static const chr graphCharTable[] = {
   767    773       0x38c, 0x85e, 0x98f, 0x990, 0x9b2, 0x9c7, 0x9c8, 0x9d7, 0x9dc,
   768    774       0x9dd, 0xa0f, 0xa10, 0xa32, 0xa33, 0xa35, 0xa36, 0xa38, 0xa39,
   769    775       0xa3c, 0xa47, 0xa48, 0xa51, 0xa5e, 0xab2, 0xab3, 0xad0, 0xb0f,
   770    776       0xb10, 0xb32, 0xb33, 0xb47, 0xb48, 0xb56, 0xb57, 0xb5c, 0xb5d,
   771    777       0xb82, 0xb83, 0xb99, 0xb9a, 0xb9c, 0xb9e, 0xb9f, 0xba3, 0xba4,
   772    778       0xbd0, 0xbd7, 0xc55, 0xc56, 0xcd5, 0xcd6, 0xcde, 0xcf1, 0xcf2,
   773         -    0xd82, 0xd83, 0xdbd, 0xdca, 0xdd6, 0xe81, 0xe82, 0xe84, 0xe87,
   774         -    0xe88, 0xe8a, 0xe8d, 0xea5, 0xea7, 0xeaa, 0xeab, 0xec6, 0x10c7,
   775         -    0x10cd, 0x1258, 0x12c0, 0x1772, 0x1773, 0x1940, 0x1f59, 0x1f5b, 0x1f5d,
   776         -    0x2070, 0x2071, 0x2d27, 0x2d2d, 0x2d6f, 0x2d70, 0xfb3e, 0xfb40, 0xfb41,
   777         -    0xfb43, 0xfb44, 0xfffc, 0xfffd
          779  +    0xd82, 0xd83, 0xdbd, 0xdca, 0xdd6, 0xe81, 0xe82, 0xe84, 0xea5,
          780  +    0xec6, 0x10c7, 0x10cd, 0x1258, 0x12c0, 0x1772, 0x1773, 0x1940, 0x1f59,
          781  +    0x1f5b, 0x1f5d, 0x2070, 0x2071, 0x2d27, 0x2d2d, 0x2d6f, 0x2d70, 0xfb3e,
          782  +    0xfb40, 0xfb41, 0xfb43, 0xfb44, 0xfffc, 0xfffd
   778    783   #if CHRBITS > 16
   779    784       ,0x1003c, 0x1003d, 0x101a0, 0x1056f, 0x10808, 0x10837, 0x10838, 0x1083c, 0x108f4,
   780    785       0x108f5, 0x1093f, 0x10a05, 0x10a06, 0x11288, 0x1130f, 0x11310, 0x11332, 0x11333,
   781         -    0x11347, 0x11348, 0x11350, 0x11357, 0x1145b, 0x1145d, 0x1145e, 0x118ff, 0x11d08,
   782         -    0x11d09, 0x11d3a, 0x11d3c, 0x11d3d, 0x11d67, 0x11d68, 0x11d90, 0x11d91, 0x16a6e,
   783         -    0x16a6f, 0x16fe0, 0x16fe1, 0x1d49e, 0x1d49f, 0x1d4a2, 0x1d4a5, 0x1d4a6, 0x1d4bb,
   784         -    0x1d546, 0x1e023, 0x1e024, 0x1e95e, 0x1e95f, 0x1ee21, 0x1ee22, 0x1ee24, 0x1ee27,
   785         -    0x1ee39, 0x1ee3b, 0x1ee42, 0x1ee47, 0x1ee49, 0x1ee4b, 0x1ee51, 0x1ee52, 0x1ee54,
   786         -    0x1ee57, 0x1ee59, 0x1ee5b, 0x1ee5d, 0x1ee5f, 0x1ee61, 0x1ee62, 0x1ee64, 0x1ee7e,
   787         -    0x1eef0, 0x1eef1, 0x1f250, 0x1f251, 0x1f97a
          786  +    0x11347, 0x11348, 0x11350, 0x11357, 0x1145b, 0x118ff, 0x11d08, 0x11d09, 0x11d3a,
          787  +    0x11d3c, 0x11d3d, 0x11d67, 0x11d68, 0x11d90, 0x11d91, 0x16a6e, 0x16a6f, 0x1d49e,
          788  +    0x1d49f, 0x1d4a2, 0x1d4a5, 0x1d4a6, 0x1d4bb, 0x1d546, 0x1e023, 0x1e024, 0x1e14e,
          789  +    0x1e14f, 0x1e2ff, 0x1e95e, 0x1e95f, 0x1ee21, 0x1ee22, 0x1ee24, 0x1ee27, 0x1ee39,
          790  +    0x1ee3b, 0x1ee42, 0x1ee47, 0x1ee49, 0x1ee4b, 0x1ee51, 0x1ee52, 0x1ee54, 0x1ee57,
          791  +    0x1ee59, 0x1ee5b, 0x1ee5d, 0x1ee5f, 0x1ee61, 0x1ee62, 0x1ee64, 0x1ee7e, 0x1eef0,
          792  +    0x1eef1, 0x1f250, 0x1f251
   788    793   #endif
   789    794   };
   790    795   
   791    796   #define NUM_GRAPH_CHAR (sizeof(graphCharTable)/sizeof(chr))
   792    797   
   793    798   /*
   794    799    *	End of auto-generated Unicode character ranges declarations.
................................................................................
   824    829       NOTE(REG_ULOCALE);
   825    830   
   826    831       /*
   827    832        * Search table.
   828    833        */
   829    834   
   830    835       Tcl_DStringInit(&ds);
   831         -    np = Tcl_UniCharToUtfDString(startp, (int)len, &ds);
          836  +    np = Tcl_UniCharToUtfDString(startp, len, &ds);
   832    837       for (cn=cnames; cn->name!=NULL; cn++) {
   833    838   	if (strlen(cn->name)==len && strncmp(cn->name, np, len)==0) {
   834    839   	    break;			/* NOTE BREAK OUT */
   835    840   	}
   836    841       }
   837    842       Tcl_DStringFree(&ds);
   838    843       if (cn->name != NULL) {

Changes to generic/regcomp.c.

   202    202       const chr *stop;		/* end of string */
   203    203       const chr *savenow;		/* saved now and stop for "subroutine call" */
   204    204       const chr *savestop;
   205    205       int err;			/* error code (0 if none) */
   206    206       int cflags;			/* copy of compile flags */
   207    207       int lasttype;		/* type of previous token */
   208    208       int nexttype;		/* type of next token */
   209         -    chr nextvalue;		/* value (if any) of next token */
          209  +    int nextvalue;		/* value (if any) of next token */
   210    210       int lexcon;			/* lexical context type (see lex.c) */
   211    211       int nsubexp;		/* subexpression count */
   212    212       struct subre **subs;	/* subRE pointer vector */
   213         -    size_t nsubs;		/* length of vector */
          213  +    int nsubs;			/* length of vector */
   214    214       struct subre *sub10[10];	/* initial vector, enough for most */
   215    215       struct nfa *nfa;		/* the NFA */
   216    216       struct colormap *cm;	/* character color map */
   217    217       color nlcolor;		/* color of newline */
   218    218       struct state *wordchrs;	/* state in nfa holding word-char outarcs */
   219    219       struct subre *tree;		/* subexpression tree */
   220    220       struct subre *treechain;	/* all tree nodes allocated */
................................................................................
   283    283       regex_t *re,
   284    284       const chr *string,
   285    285       size_t len,
   286    286       int flags)
   287    287   {
   288    288       AllocVars(v);
   289    289       struct guts *g;
   290         -    int i;
   291         -    size_t j;
          290  +    int i, j;
   292    291       FILE *debug = (flags&REG_PROGRESS) ? stdout : NULL;
   293    292   #define	CNOERR()	{ if (ISERR()) return freev(v, v->err); }
   294    293   
   295    294       /*
   296    295        * Sanity checks.
   297    296        */
   298    297   
................................................................................
   473    472    */
   474    473   static void
   475    474   moresubs(
   476    475       struct vars *v,
   477    476       int wanted)			/* want enough room for this one */
   478    477   {
   479    478       struct subre **p;
   480         -    size_t n;
          479  +    int n;
   481    480   
   482         -    assert(wanted > 0 && (size_t)wanted >= v->nsubs);
   483         -    n = (size_t)wanted * 3 / 2 + 1;
          481  +    assert(wanted > 0 && wanted >= v->nsubs);
          482  +    n = wanted * 3 / 2 + 1;
   484    483       if (v->subs == v->sub10) {
   485    484   	p = (struct subre **) MALLOC(n * sizeof(struct subre *));
   486    485   	if (p != NULL) {
   487    486   	    memcpy(p, v->subs, v->nsubs * sizeof(struct subre *));
   488    487   	}
   489    488       } else {
   490    489   	p = (struct subre **) REALLOC(v->subs, n*sizeof(struct subre *));
................................................................................
   495    494       }
   496    495   
   497    496       v->subs = p;
   498    497       for (p = &v->subs[v->nsubs]; v->nsubs < n; p++, v->nsubs++) {
   499    498   	*p = NULL;
   500    499       }
   501    500       assert(v->nsubs == n);
   502         -    assert((size_t)wanted < v->nsubs);
          501  +    assert(wanted < v->nsubs);
   503    502   }
   504    503   
   505    504   /*
   506    505    - freev - free vars struct's substructures where necessary
   507    506    * Optionally does error-number setting, and always returns error code (if
   508    507    * any), to make error-handling code terser.
   509    508    ^ static int freev(struct vars *, int);
................................................................................
   950    949   	 */
   951    950   
   952    951       case '(':			/* value flags as capturing or non */
   953    952   	cap = (type == LACON) ? 0 : v->nextvalue;
   954    953   	if (cap) {
   955    954   	    v->nsubexp++;
   956    955   	    subno = v->nsubexp;
   957         -	    if ((size_t)subno >= v->nsubs) {
          956  +	    if (subno >= v->nsubs) {
   958    957   		moresubs(v, subno);
   959    958   	    }
   960         -	    assert((size_t)subno < v->nsubs);
          959  +	    assert(subno < v->nsubs);
   961    960   	} else {
   962    961   	    atomtype = PLAIN;	/* something that's not '(' */
   963    962   	}
   964    963   	NEXT();
   965    964   
   966    965   	/*
   967    966   	 * Need new endpoints because tree will contain pointers.

Changes to generic/regexec.c.

   168    168       rm_detail_t *details,
   169    169       size_t nmatch,
   170    170       regmatch_t pmatch[],
   171    171       int flags)
   172    172   {
   173    173       AllocVars(v);
   174    174       int st, backref;
   175         -    size_t n;
   176         -    size_t i;
          175  +    int n;
          176  +    int i;
   177    177   #define	LOCALMAT	20
   178    178       regmatch_t mat[LOCALMAT];
   179    179   #define LOCALDFAS	40
   180    180       struct dfa *subdfas[LOCALDFAS];
   181    181   
   182    182       /*
   183    183        * Sanity checks.
................................................................................
   232    232   	v->pmatch = pmatch;
   233    233       }
   234    234       v->details = details;
   235    235       v->start = (chr *)string;
   236    236       v->stop = (chr *)string + len;
   237    237       v->err = 0;
   238    238       assert(v->g->ntree >= 0);
   239         -    n = (size_t) v->g->ntree;
          239  +    n = v->g->ntree;
   240    240       if (n <= LOCALDFAS)
   241    241   	v->subdfas = subdfas;
   242    242       else
   243    243   	v->subdfas = (struct dfa **) MALLOC(n * sizeof(struct dfa *));
   244    244       if (v->subdfas == NULL) {
   245    245   	if (v->pmatch != pmatch && v->pmatch != mat)
   246    246   	    FREE(v->pmatch);
................................................................................
   274    274       /*
   275    275        * Clean up.
   276    276        */
   277    277   
   278    278       if (v->pmatch != pmatch && v->pmatch != mat) {
   279    279   	FREE(v->pmatch);
   280    280       }
   281         -    n = (size_t) v->g->ntree;
          281  +    n = v->g->ntree;
   282    282       for (i = 0; i < n; i++) {
   283    283   	if (v->subdfas[i] != NULL)
   284    284   	    freeDFA(v->subdfas[i]);
   285    285       }
   286    286       if (v->subdfas != subdfas)
   287    287   	FREE(v->subdfas);
   288    288       FreeVars(v);

Changes to generic/tcl.decls.

   860    860   declare 243 {
   861    861       void Tcl_SplitPath(const char *path, int *argcPtr, const char ***argvPtr)
   862    862   }
   863    863   declare 244 {nostub {Don't use this function in a stub-enabled extension}} {
   864    864       void Tcl_StaticPackage(Tcl_Interp *interp, const char *pkgName,
   865    865   	    Tcl_PackageInitProc *initProc, Tcl_PackageInitProc *safeInitProc)
   866    866   }
   867         -declare 245 {
          867  +declare 245 {deprecated {No longer in use, changed to macro}} {
   868    868       int Tcl_StringMatch(const char *str, const char *pattern)
   869    869   }
   870    870   declare 246 {deprecated {}} {
   871    871       int Tcl_TellOld(Tcl_Channel chan)
   872    872   }
   873    873   declare 247 {deprecated {No longer in use, changed to macro}} {
   874    874       int Tcl_TraceVar(Tcl_Interp *interp, const char *varName, int flags,

Changes to generic/tclAlloc.c.

   270    270   
   271    271       /*
   272    272        * First the simple case: we simple allocate big blocks directly.
   273    273        */
   274    274   
   275    275       if (numBytes >= MAXMALLOC - OVERHEAD) {
   276    276   	if (numBytes <= UINT_MAX - OVERHEAD -sizeof(struct block)) {
   277         -	    bigBlockPtr = (struct block *) TclpSysAlloc((unsigned)
   278         -		    (sizeof(struct block) + OVERHEAD + numBytes), 0);
          277  +	    bigBlockPtr = (struct block *) TclpSysAlloc(
          278  +		    sizeof(struct block) + OVERHEAD + numBytes, 0);
   279    279   	}
   280    280   	if (bigBlockPtr == NULL) {
   281    281   	    Tcl_MutexUnlock(allocMutexPtr);
   282    282   	    return NULL;
   283    283   	}
   284    284   	bigBlockPtr->nextPtr = bigBlocks.nextPtr;
   285    285   	bigBlocks.nextPtr = bigBlockPtr;
................................................................................
   600    600   	if (newPtr == NULL) {
   601    601   	    return NULL;
   602    602   	}
   603    603   	maxSize -= OVERHEAD;
   604    604   	if (maxSize < numBytes) {
   605    605   	    numBytes = maxSize;
   606    606   	}
   607         -	memcpy(newPtr, oldPtr, (size_t) numBytes);
          607  +	memcpy(newPtr, oldPtr, numBytes);
   608    608   	TclpFree(oldPtr);
   609    609   	return newPtr;
   610    610       }
   611    611   
   612    612       /*
   613    613        * Ok, we don't have to copy, it fits as-is
   614    614        */

Changes to generic/tclBasic.c.

   315    315       {"pwd",		Tcl_PwdObjCmd,		NULL,			NULL,	0},
   316    316       {"read",		Tcl_ReadObjCmd,		NULL,			NULL,	CMD_IS_SAFE},
   317    317       {"seek",		Tcl_SeekObjCmd,		NULL,			NULL,	CMD_IS_SAFE},
   318    318       {"socket",		Tcl_SocketObjCmd,	NULL,			NULL,	0},
   319    319       {"source",		Tcl_SourceObjCmd,	NULL,			TclNRSourceObjCmd,	0},
   320    320       {"tell",		Tcl_TellObjCmd,		NULL,			NULL,	CMD_IS_SAFE},
   321    321       {"time",		Tcl_TimeObjCmd,		NULL,			NULL,	CMD_IS_SAFE},
          322  +    {"timerate",	Tcl_TimeRateObjCmd,	NULL,			NULL,	CMD_IS_SAFE},
   322    323       {"unload",		Tcl_UnloadObjCmd,	NULL,			NULL,	0},
   323    324       {"update",		Tcl_UpdateObjCmd,	NULL,			NULL,	CMD_IS_SAFE},
   324    325       {"vwait",		Tcl_VwaitObjCmd,	NULL,			NULL,	CMD_IS_SAFE},
   325    326       {NULL,		NULL,			NULL,			NULL,	0}
   326    327   };
   327    328   
   328    329   /*
................................................................................
   555    556   {
   556    557       Interp *iPtr;
   557    558       Tcl_Interp *interp;
   558    559       Command *cmdPtr;
   559    560       const BuiltinFuncDef *builtinFuncPtr;
   560    561       const OpCmdInfo *opcmdInfoPtr;
   561    562       const CmdInfo *cmdInfoPtr;
   562         -    Tcl_Namespace *mathfuncNSPtr, *mathopNSPtr;
          563  +    Tcl_Namespace *nsPtr;
   563    564       Tcl_HashEntry *hPtr;
   564    565       int isNew;
   565    566       CancelInfo *cancelInfo;
   566    567       union {
   567    568   	char c[sizeof(short)];
   568    569   	short s;
   569    570       } order;
................................................................................
   969    970       cmdPtr = (Command *) Tcl_NRCreateCommand(interp,
   970    971               "::tcl::unsupported::assemble", Tcl_AssembleObjCmd,
   971    972               TclNRAssembleObjCmd, NULL, NULL);
   972    973       cmdPtr->compileProc = &TclCompileAssembleCmd;
   973    974   
   974    975       Tcl_NRCreateCommand(interp, "::tcl::unsupported::inject", NULL,
   975    976   	    NRCoroInjectObjCmd, NULL, NULL);
          977  +
          978  +    /* Export unsupported commands */
          979  +    nsPtr = Tcl_FindNamespace(interp, "::tcl::unsupported", NULL, 0);
          980  +    if (nsPtr) {
          981  +	Tcl_Export(interp, nsPtr, "*", 1);
          982  +    }
          983  +
   976    984   
   977    985   #ifdef USE_DTRACE
   978    986       /*
   979    987        * Register the tcl::dtrace command.
   980    988        */
   981    989   
   982    990       Tcl_CreateObjCommand(interp, "::tcl::dtrace", DTraceObjCmd, NULL, NULL);
   983    991   #endif /* USE_DTRACE */
   984    992   
   985    993       /*
   986    994        * Register the builtin math functions.
   987    995        */
   988    996   
   989         -    mathfuncNSPtr = Tcl_CreateNamespace(interp, "::tcl::mathfunc", NULL,NULL);
   990         -    if (mathfuncNSPtr == NULL) {
          997  +    nsPtr = Tcl_CreateNamespace(interp, "::tcl::mathfunc", NULL,NULL);
          998  +    if (nsPtr == NULL) {
   991    999   	Tcl_Panic("Can't create math function namespace");
   992   1000       }
   993   1001   #define MATH_FUNC_PREFIX_LEN 17 /* == strlen("::tcl::mathfunc::") */
   994   1002       memcpy(mathFuncName, "::tcl::mathfunc::", MATH_FUNC_PREFIX_LEN);
   995   1003       for (builtinFuncPtr = BuiltinFuncTable; builtinFuncPtr->name != NULL;
   996   1004   	    builtinFuncPtr++) {
   997   1005   	strcpy(mathFuncName+MATH_FUNC_PREFIX_LEN, builtinFuncPtr->name);
   998   1006   	Tcl_CreateObjCommand(interp, mathFuncName,
   999   1007   		builtinFuncPtr->objCmdProc, builtinFuncPtr->clientData, NULL);
  1000         -	Tcl_Export(interp, mathfuncNSPtr, builtinFuncPtr->name, 0);
         1008  +	Tcl_Export(interp, nsPtr, builtinFuncPtr->name, 0);
  1001   1009       }
  1002   1010   
  1003   1011       /*
  1004   1012        * Register the mathematical "operator" commands. [TIP #174]
  1005   1013        */
  1006   1014   
  1007         -    mathopNSPtr = Tcl_CreateNamespace(interp, "::tcl::mathop", NULL, NULL);
  1008         -    if (mathopNSPtr == NULL) {
         1015  +    nsPtr = Tcl_CreateNamespace(interp, "::tcl::mathop", NULL, NULL);
         1016  +    if (nsPtr == NULL) {
  1009   1017   	Tcl_Panic("can't create math operator namespace");
  1010   1018       }
  1011         -    Tcl_Export(interp, mathopNSPtr, "*", 1);
         1019  +    Tcl_Export(interp, nsPtr, "*", 1);
  1012   1020   #define MATH_OP_PREFIX_LEN 15 /* == strlen("::tcl::mathop::") */
  1013   1021       memcpy(mathFuncName, "::tcl::mathop::", MATH_OP_PREFIX_LEN);
  1014   1022       for (opcmdInfoPtr=mathOpCmds ; opcmdInfoPtr->name!=NULL ; opcmdInfoPtr++){
  1015   1023   	TclOpCmdClientData *occdPtr = ckalloc(sizeof(TclOpCmdClientData));
  1016   1024   
  1017   1025   	occdPtr->op = opcmdInfoPtr->name;
  1018   1026   	occdPtr->i.numArgs = opcmdInfoPtr->i.numArgs;
................................................................................
  4404   4412        * allowed to catch the script cancellation because the evaluation stack
  4405   4413        * for the interp is completely unwound.
  4406   4414        */
  4407   4415   
  4408   4416       if (resultObjPtr != NULL) {
  4409   4417   	result = TclGetStringFromObj(resultObjPtr, &cancelInfo->length);
  4410   4418   	cancelInfo->result = ckrealloc(cancelInfo->result,cancelInfo->length);
  4411         -	memcpy(cancelInfo->result, result, (size_t) cancelInfo->length);
         4419  +	memcpy(cancelInfo->result, result, cancelInfo->length);
  4412   4420   	TclDecrRefCount(resultObjPtr);	/* Discard their result object. */
  4413   4421       } else {
  4414   4422   	cancelInfo->result = NULL;
  4415   4423   	cancelInfo->length = 0;
  4416   4424       }
  4417   4425       cancelInfo->clientData = clientData;
  4418   4426       cancelInfo->flags = flags;
................................................................................
  7548   7556   	    }
  7549   7557   	}
  7550   7558   	break;
  7551   7559       case TCL_NUMBER_BIG:
  7552   7560   	if (Tcl_GetBignumFromObj(interp, objv[1], &big) != TCL_OK) {
  7553   7561   	    return TCL_ERROR;
  7554   7562   	}
  7555         -	if (SIGN(&big) == MP_NEG) {
         7563  +	if (big.sign != MP_ZPOS) {
  7556   7564   	    mp_clear(&big);
  7557   7565   	    goto negarg;
  7558   7566   	}
  7559   7567   	break;
  7560   7568       default:
  7561   7569   	if (TclGetWideIntFromObj(interp, objv[1], &w) != TCL_OK) {
  7562   7570   	    return TCL_ERROR;
................................................................................
  7777   7785       if (TclGetNumberFromObj(interp, objv[1], &ptr, &type) != TCL_OK) {
  7778   7786   	return TCL_ERROR;
  7779   7787       }
  7780   7788   
  7781   7789       if (type == TCL_NUMBER_INT) {
  7782   7790   	Tcl_WideInt l = *((const Tcl_WideInt *) ptr);
  7783   7791   
  7784         -	if (l > (Tcl_WideInt)0) {
         7792  +	if (l > 0) {
  7785   7793   	    goto unChanged;
  7786         -	} else if (l == (Tcl_WideInt)0) {
         7794  +	} else if (l == 0) {
  7787   7795   	    if (TclHasStringRep(objv[1])) {
  7788   7796   		int numBytes;
  7789   7797   		const char *bytes = TclGetStringFromObj(objv[1], &numBytes);
  7790   7798   
  7791   7799   		while (numBytes) {
  7792   7800   		    if (*bytes == '-') {
  7793   7801   			Tcl_SetObjResult(interp, Tcl_NewWideIntObj(0));
................................................................................
  7822   7830   	    goto unChanged;
  7823   7831   	}
  7824   7832   	Tcl_SetObjResult(interp, Tcl_NewDoubleObj(-d));
  7825   7833   	return TCL_OK;
  7826   7834       }
  7827   7835   
  7828   7836       if (type == TCL_NUMBER_BIG) {
  7829         -	if (mp_isneg((const mp_int *) ptr)) {
         7837  +	if (((const mp_int *) ptr)->sign != MP_ZPOS) {
  7830   7838   	    Tcl_GetBignumFromObj(NULL, objv[1], &big);
  7831   7839   	tooLarge:
  7832   7840   	    mp_neg(&big, &big);
  7833   7841   	    Tcl_SetObjResult(interp, Tcl_NewBignumObj(&big));
  7834   7842   	} else {
  7835   7843   	unChanged:
  7836   7844   	    Tcl_SetObjResult(interp, objv[1]);
................................................................................
  7885   7893   
  7886   7894       if (objc != 2) {
  7887   7895   	MathFuncWrongNumArgs(interp, 2, objc, objv);
  7888   7896   	return TCL_ERROR;
  7889   7897       }
  7890   7898       if (Tcl_GetDoubleFromObj(interp, objv[1], &dResult) != TCL_OK) {
  7891   7899   #ifdef ACCEPT_NAN
  7892         -	if (objv[1]->typePtr == &tclDoubleType) {
         7900  +	if (TclHasIntRep(objv[1], &tclDoubleType)) {
  7893   7901   	    Tcl_SetObjResult(interp, objv[1]);
  7894   7902   	    return TCL_OK;
  7895   7903   	}
  7896   7904   #endif
  7897   7905   	return TCL_ERROR;
  7898   7906       }
  7899   7907       Tcl_SetObjResult(interp, Tcl_NewDoubleObj(dResult));

Changes to generic/tclBinary.c.

    53     53   
    54     54   /*
    55     55    * Prototypes for local procedures defined in this file:
    56     56    */
    57     57   
    58     58   static void		DupByteArrayInternalRep(Tcl_Obj *srcPtr,
    59     59   			    Tcl_Obj *copyPtr);
           60  +static void		DupProperByteArrayInternalRep(Tcl_Obj *srcPtr,
           61  +			    Tcl_Obj *copyPtr);
    60     62   static int		FormatNumber(Tcl_Interp *interp, int type,
    61     63   			    Tcl_Obj *src, unsigned char **cursorPtr);
    62     64   static void		FreeByteArrayInternalRep(Tcl_Obj *objPtr);
           65  +static void		FreeProperByteArrayInternalRep(Tcl_Obj *objPtr);
    63     66   static int		GetFormatSpec(const char **formatPtr, char *cmdPtr,
    64     67   			    int *countPtr, int *flagsPtr);
    65     68   static Tcl_Obj *	ScanNumber(unsigned char *buffer, int type,
    66     69   			    int flags, Tcl_HashTable **numberCachePtr);
    67     70   static int		SetByteArrayFromAny(Tcl_Interp *interp,
    68     71   			    Tcl_Obj *objPtr);
    69     72   static void		UpdateStringOfByteArray(Tcl_Obj *listPtr);
................................................................................
   241    244    * so that Tcl 9 will no longer have any trace of it.  Prescribing a
   242    245    * migration path will be the key element of that work.  The internal
   243    246    * changes now in place are the limit of what can be done short of
   244    247    * interface repair.  They provide a great expansion of the histories
   245    248    * over which bytearray values can be useful in the meanwhile.
   246    249    */
   247    250   
   248         -const Tcl_ObjType tclPureByteArrayType = {
          251  +static const Tcl_ObjType properByteArrayType = {
   249    252       "bytearray",
   250         -    FreeByteArrayInternalRep,
   251         -    DupByteArrayInternalRep,
          253  +    FreeProperByteArrayInternalRep,
          254  +    DupProperByteArrayInternalRep,
   252    255       UpdateStringOfByteArray,
   253    256       NULL
   254    257   };
   255    258   
   256    259   const Tcl_ObjType tclByteArrayType = {
   257    260       "bytearray",
   258    261       FreeByteArrayInternalRep,
................................................................................
   280    283   
   281    284   #define BYTEARRAY_SIZE(len) \
   282    285   		((unsigned) (TclOffset(ByteArray, bytes) + (len)))
   283    286   #define GET_BYTEARRAY(irPtr) ((ByteArray *) (irPtr)->twoPtrValue.ptr1)
   284    287   #define SET_BYTEARRAY(irPtr, baPtr) \
   285    288   		(irPtr)->twoPtrValue.ptr1 = (void *) (baPtr)
   286    289   
          290  +int
          291  +TclIsPureByteArray(
          292  +    Tcl_Obj * objPtr)
          293  +{
          294  +    return TclHasIntRep(objPtr, &properByteArrayType);
          295  +}
          296  +
   287    297   /*
   288    298    *----------------------------------------------------------------------
   289    299    *
   290    300    * Tcl_NewByteArrayObj --
   291    301    *
   292    302    *	This procedure is creates a new ByteArray object and initializes it
   293    303    *	from the given array of bytes.
................................................................................
   407    417   	length = 0;
   408    418       }
   409    419       byteArrayPtr = ckalloc(BYTEARRAY_SIZE(length));
   410    420       byteArrayPtr->used = length;
   411    421       byteArrayPtr->allocated = length;
   412    422   
   413    423       if ((bytes != NULL) && (length > 0)) {
   414         -	memcpy(byteArrayPtr->bytes, bytes, (size_t) length);
          424  +	memcpy(byteArrayPtr->bytes, bytes, length);
   415    425       }
   416    426       SET_BYTEARRAY(&ir, byteArrayPtr);
   417    427   
   418         -    Tcl_StoreIntRep(objPtr, &tclPureByteArrayType, &ir);
          428  +    Tcl_StoreIntRep(objPtr, &properByteArrayType, &ir);
   419    429   }
   420    430   
   421    431   /*
   422    432    *----------------------------------------------------------------------
   423    433    *
   424    434    * Tcl_GetByteArrayFromObj --
   425    435    *
................................................................................
   439    449   unsigned char *
   440    450   Tcl_GetByteArrayFromObj(
   441    451       Tcl_Obj *objPtr,		/* The ByteArray object. */
   442    452       int *lengthPtr)		/* If non-NULL, filled with length of the
   443    453   				 * array of bytes in the ByteArray object. */
   444    454   {
   445    455       ByteArray *baPtr;
   446         -    const Tcl_ObjIntRep *irPtr = TclFetchIntRep(objPtr, &tclPureByteArrayType);
          456  +    const Tcl_ObjIntRep *irPtr = TclFetchIntRep(objPtr, &properByteArrayType);
   447    457   
   448    458       if (irPtr == NULL) {
   449    459   	irPtr = TclFetchIntRep(objPtr, &tclByteArrayType);
   450    460   	if (irPtr == NULL) {
   451    461   	    SetByteArrayFromAny(NULL, objPtr);
   452         -	    irPtr = TclFetchIntRep(objPtr, &tclPureByteArrayType);
          462  +	    irPtr = TclFetchIntRep(objPtr, &properByteArrayType);
   453    463   	    if (irPtr == NULL) {
   454    464   		irPtr = TclFetchIntRep(objPtr, &tclByteArrayType);
   455    465   	    }
   456    466   	}
   457    467       }
   458    468       baPtr = GET_BYTEARRAY(irPtr);
   459    469   
................................................................................
   497    507       assert(length >= 0);
   498    508       newLength = (unsigned int)length;
   499    509   
   500    510       if (Tcl_IsShared(objPtr)) {
   501    511   	Tcl_Panic("%s called with shared object", "Tcl_SetByteArrayLength");
   502    512       }
   503    513   
   504         -    irPtr = TclFetchIntRep(objPtr, &tclPureByteArrayType);
          514  +    irPtr = TclFetchIntRep(objPtr, &properByteArrayType);
   505    515       if (irPtr == NULL) {
   506    516   	irPtr = TclFetchIntRep(objPtr, &tclByteArrayType);
   507    517   	if (irPtr == NULL) {
   508    518   	    SetByteArrayFromAny(NULL, objPtr);
   509         -	    irPtr = TclFetchIntRep(objPtr, &tclPureByteArrayType);
          519  +	    irPtr = TclFetchIntRep(objPtr, &properByteArrayType);
   510    520   	    if (irPtr == NULL) {
   511    521   		irPtr = TclFetchIntRep(objPtr, &tclByteArrayType);
   512    522   	    }
   513    523   	}
   514    524       }
   515    525   
   516    526       byteArrayPtr = GET_BYTEARRAY(irPtr);
................................................................................
   549    559       int improper = 0;
   550    560       const char *src, *srcEnd;
   551    561       unsigned char *dst;
   552    562       Tcl_UniChar ch = 0;
   553    563       ByteArray *byteArrayPtr;
   554    564       Tcl_ObjIntRep ir;
   555    565   
   556         -    if (objPtr->typePtr == &tclPureByteArrayType) {
          566  +    if (TclHasIntRep(objPtr, &properByteArrayType)) {
   557    567   	return TCL_OK;
   558    568       }
   559         -    if (objPtr->typePtr == &tclByteArrayType) {
          569  +    if (TclHasIntRep(objPtr, &tclByteArrayType)) {
   560    570   	return TCL_OK;
   561    571       }
   562    572   
   563    573       src = TclGetString(objPtr);
   564    574       length = objPtr->length;
   565    575       srcEnd = src + length;
   566    576   
................................................................................
   572    582       }
   573    583   
   574    584       byteArrayPtr->used = dst - byteArrayPtr->bytes;
   575    585       byteArrayPtr->allocated = length;
   576    586   
   577    587       SET_BYTEARRAY(&ir, byteArrayPtr);
   578    588       Tcl_StoreIntRep(objPtr,
   579         -	    improper ? &tclByteArrayType : &tclPureByteArrayType, &ir);
          589  +	    improper ? &tclByteArrayType : &properByteArrayType, &ir);
   580    590       return TCL_OK;
   581    591   }
   582    592   
   583    593   /*
   584    594    *----------------------------------------------------------------------
   585    595    *
   586    596    * FreeByteArrayInternalRep --
................................................................................
   597    607    *----------------------------------------------------------------------
   598    608    */
   599    609   
   600    610   static void
   601    611   FreeByteArrayInternalRep(
   602    612       Tcl_Obj *objPtr)		/* Object with internal rep to free. */
   603    613   {
   604         -    ckfree(GET_BYTEARRAY(&(objPtr->internalRep)));
          614  +    ckfree(GET_BYTEARRAY(TclFetchIntRep(objPtr, &tclByteArrayType)));
          615  +}
          616  +
          617  +static void
          618  +FreeProperByteArrayInternalRep(
          619  +    Tcl_Obj *objPtr)		/* Object with internal rep to free. */
          620  +{
          621  +    ckfree(GET_BYTEARRAY(TclFetchIntRep(objPtr, &properByteArrayType)));
   605    622   }
   606    623   
   607    624   /*
   608    625    *----------------------------------------------------------------------
   609    626    *
   610    627    * DupByteArrayInternalRep --
   611    628    *
................................................................................
   626    643       Tcl_Obj *srcPtr,		/* Object with internal rep to copy. */
   627    644       Tcl_Obj *copyPtr)		/* Object with internal rep to set. */
   628    645   {
   629    646       unsigned int length;
   630    647       ByteArray *srcArrayPtr, *copyArrayPtr;
   631    648       Tcl_ObjIntRep ir;
   632    649   
   633         -    srcArrayPtr = GET_BYTEARRAY(&(srcPtr->internalRep));
          650  +    srcArrayPtr = GET_BYTEARRAY(TclFetchIntRep(srcPtr, &tclByteArrayType));
          651  +    length = srcArrayPtr->used;
          652  +
          653  +    copyArrayPtr = ckalloc(BYTEARRAY_SIZE(length));
          654  +    copyArrayPtr->used = length;
          655  +    copyArrayPtr->allocated = length;
          656  +    memcpy(copyArrayPtr->bytes, srcArrayPtr->bytes, length);
          657  +
          658  +    SET_BYTEARRAY(&ir, copyArrayPtr);
          659  +    Tcl_StoreIntRep(copyPtr, &tclByteArrayType, &ir);
          660  +}
          661  +
          662  +static void
          663  +DupProperByteArrayInternalRep(
          664  +    Tcl_Obj *srcPtr,		/* Object with internal rep to copy. */
          665  +    Tcl_Obj *copyPtr)		/* Object with internal rep to set. */
          666  +{
          667  +    unsigned int length;
          668  +    ByteArray *srcArrayPtr, *copyArrayPtr;
          669  +    Tcl_ObjIntRep ir;
          670  +
          671  +    srcArrayPtr = GET_BYTEARRAY(TclFetchIntRep(srcPtr, &properByteArrayType));
   634    672       length = srcArrayPtr->used;
   635    673   
   636    674       copyArrayPtr = ckalloc(BYTEARRAY_SIZE(length));
   637    675       copyArrayPtr->used = length;
   638    676       copyArrayPtr->allocated = length;
   639    677       memcpy(copyArrayPtr->bytes, srcArrayPtr->bytes, length);
   640    678   
   641    679       SET_BYTEARRAY(&ir, copyArrayPtr);
   642         -    Tcl_StoreIntRep(copyPtr, srcPtr->typePtr, &ir);
          680  +    Tcl_StoreIntRep(copyPtr, &properByteArrayType, &ir);
   643    681   }
   644    682   
   645    683   /*
   646    684    *----------------------------------------------------------------------
   647    685    *
   648    686    * UpdateStringOfByteArray --
   649    687    *
................................................................................
   660    698    */
   661    699   
   662    700   static void
   663    701   UpdateStringOfByteArray(
   664    702       Tcl_Obj *objPtr)		/* ByteArray object whose string rep to
   665    703   				 * update. */
   666    704   {
   667         -    const Tcl_ObjIntRep *irPtr = TclFetchIntRep(objPtr, &tclPureByteArrayType);
          705  +    const Tcl_ObjIntRep *irPtr = TclFetchIntRep(objPtr, &properByteArrayType);
   668    706       ByteArray *byteArrayPtr = GET_BYTEARRAY(irPtr);
   669    707       unsigned char *src = byteArrayPtr->bytes;
   670    708       unsigned int i, length = byteArrayPtr->used;
   671    709       unsigned int size = length;
   672    710   
   673    711       /*
   674    712        * How much space will string rep need?
................................................................................
   735    773       if (len == 0) {
   736    774   	/* Append zero bytes is a no-op. */
   737    775   	return;
   738    776       }
   739    777   
   740    778       length = (unsigned int)len;
   741    779   
   742         -    irPtr = TclFetchIntRep(objPtr, &tclPureByteArrayType);
          780  +    irPtr = TclFetchIntRep(objPtr, &properByteArrayType);
   743    781       if (irPtr == NULL) {
   744    782   	irPtr = TclFetchIntRep(objPtr, &tclByteArrayType);
   745    783   	if (irPtr == NULL) {
   746    784   	    SetByteArrayFromAny(NULL, objPtr);
   747         -	    irPtr = TclFetchIntRep(objPtr, &tclPureByteArrayType);
          785  +	    irPtr = TclFetchIntRep(objPtr, &properByteArrayType);
   748    786   	    if (irPtr == NULL) {
   749    787   		irPtr = TclFetchIntRep(objPtr, &tclByteArrayType);
   750    788   	    }
   751    789   	}
   752    790       }
   753    791       byteArrayPtr = GET_BYTEARRAY(irPtr);
   754    792   
................................................................................
  1034   1072       /*
  1035   1073        * Prepare the result object by preallocating the caclulated number of
  1036   1074        * bytes and filling with nulls.
  1037   1075        */
  1038   1076   
  1039   1077       resultPtr = Tcl_NewObj();
  1040   1078       buffer = Tcl_SetByteArrayLength(resultPtr, length);
  1041         -    memset(buffer, 0, (size_t) length);
         1079  +    memset(buffer, 0, length);
  1042   1080   
  1043   1081       /*
  1044   1082        * Pack the data into the result object. Note that we can skip the
  1045   1083        * error checking during this pass, since we have already parsed the
  1046   1084        * string once.
  1047   1085        */
  1048   1086   
................................................................................
  1071   1109   
  1072   1110   	    if (count == BINARY_ALL) {
  1073   1111   		count = length;
  1074   1112   	    } else if (count == BINARY_NOCOUNT) {
  1075   1113   		count = 1;
  1076   1114   	    }
  1077   1115   	    if (length >= count) {
  1078         -		memcpy(cursor, bytes, (size_t) count);
         1116  +		memcpy(cursor, bytes, count);
  1079   1117   	    } else {
  1080         -		memcpy(cursor, bytes, (size_t) length);
  1081         -		memset(cursor + length, pad, (size_t) (count - length));
         1118  +		memcpy(cursor, bytes, length);
         1119  +		memset(cursor + length, pad, count - length);
  1082   1120   	    }
  1083   1121   	    cursor += count;
  1084   1122   	    break;
  1085   1123   	}
  1086   1124   	case 'b':
  1087   1125   	case 'B': {
  1088   1126   	    unsigned char *last;
................................................................................
  1263   1301   	    }
  1264   1302   	    break;
  1265   1303   	}
  1266   1304   	case 'x':
  1267   1305   	    if (count == BINARY_NOCOUNT) {
  1268   1306   		count = 1;
  1269   1307   	    }
  1270         -	    memset(cursor, 0, (size_t) count);
         1308  +	    memset(cursor, 0, count);
  1271   1309   	    cursor += count;
  1272   1310   	    break;
  1273   1311   	case 'X':
  1274   1312   	    if (cursor > maxPos) {
  1275   1313   		maxPos = cursor;
  1276   1314   	    }
  1277   1315   	    if (count == BINARY_NOCOUNT) {
................................................................................
  1312   1350    badIndex:
  1313   1351       errorString = "not enough arguments for all format specifiers";
  1314   1352       goto error;
  1315   1353   
  1316   1354    badField:
  1317   1355       {
  1318   1356   	Tcl_UniChar ch = 0;
  1319         -	char buf[TCL_UTF_MAX + 1];
         1357  +	char buf[TCL_UTF_MAX + 1] = "";
  1320   1358   
  1321   1359   	TclUtfToUniChar(errorString, &ch);
  1322   1360   	buf[Tcl_UniCharToUtf(ch, buf)] = '\0';
  1323   1361   	Tcl_SetObjResult(interp, Tcl_ObjPrintf(
  1324   1362   		"bad field specifier \"%s\"", buf));
  1325   1363   	return TCL_ERROR;
  1326   1364       }
................................................................................
  1682   1720    badIndex:
  1683   1721       errorString = "not enough arguments for all format specifiers";
  1684   1722       goto error;
  1685   1723   
  1686   1724    badField:
  1687   1725       {
  1688   1726   	Tcl_UniChar ch = 0;
  1689         -	char buf[TCL_UTF_MAX + 1];
         1727  +	char buf[TCL_UTF_MAX + 1] = "";
  1690   1728   
  1691   1729   	TclUtfToUniChar(errorString, &ch);
  1692   1730   	buf[Tcl_UniCharToUtf(ch, buf)] = '\0';
  1693   1731   	Tcl_SetObjResult(interp, Tcl_ObjPrintf(
  1694   1732   		"bad field specifier \"%s\"", buf));
  1695   1733   	return TCL_ERROR;
  1696   1734       }

Changes to generic/tclCkalloc.c.

   401    401   
   402    402       if (validate_memory) {
   403    403   	Tcl_ValidateAllMemory(file, line);
   404    404       }
   405    405   
   406    406       /* Don't let size argument to TclpAlloc overflow */
   407    407       if (size <= UINT_MAX - HIGH_GUARD_SIZE -sizeof(struct mem_header)) {
   408         -	result = (struct mem_header *) TclpAlloc((unsigned)size +
          408  +	result = (struct mem_header *) TclpAlloc(size +
   409    409   		sizeof(struct mem_header) + HIGH_GUARD_SIZE);
   410    410       }
   411    411       if (result == NULL) {
   412    412   	fflush(stdout);
   413    413   	TclDumpMemoryInfo((ClientData) stderr, 0);
   414    414   	Tcl_Panic("unable to alloc %u bytes, %s line %d", size, file, line);
   415    415       }
................................................................................
   491    491   
   492    492       if (validate_memory) {
   493    493   	Tcl_ValidateAllMemory(file, line);
   494    494       }
   495    495   
   496    496       /* Don't let size argument to TclpAlloc overflow */
   497    497       if (size <= UINT_MAX - HIGH_GUARD_SIZE - sizeof(struct mem_header)) {
   498         -	result = (struct mem_header *) TclpAlloc((unsigned)size +
          498  +	result = (struct mem_header *) TclpAlloc(size +
   499    499   		sizeof(struct mem_header) + HIGH_GUARD_SIZE);
   500    500       }
   501    501       if (result == NULL) {
   502    502   	fflush(stdout);
   503    503   	TclDumpMemoryInfo((ClientData) stderr, 0);
   504    504   	return NULL;
   505    505       }
................................................................................
   687    687       memp = (struct mem_header *) (((size_t) ptr) - BODY_OFFSET);
   688    688   
   689    689       copySize = size;
   690    690       if (copySize > memp->length) {
   691    691   	copySize = memp->length;
   692    692       }
   693    693       newPtr = Tcl_DbCkalloc(size, file, line);
   694         -    memcpy(newPtr, ptr, (size_t) copySize);
          694  +    memcpy(newPtr, ptr, copySize);
   695    695       Tcl_DbCkfree(ptr, file, line);
   696    696       return newPtr;
   697    697   }
   698    698   
   699    699   char *
   700    700   Tcl_AttemptDbCkrealloc(
   701    701       char *ptr,
................................................................................
   721    721       if (copySize > memp->length) {
   722    722   	copySize = memp->length;
   723    723       }
   724    724       newPtr = Tcl_AttemptDbCkalloc(size, file, line);
   725    725       if (newPtr == NULL) {
   726    726   	return NULL;
   727    727       }
   728         -    memcpy(newPtr, ptr, (size_t) copySize);
          728  +    memcpy(newPtr, ptr, copySize);
   729    729       Tcl_DbCkfree(ptr, file, line);
   730    730       return newPtr;
   731    731   }
   732    732   
   733    733   
   734    734   /*
   735    735    *----------------------------------------------------------------------

Changes to generic/tclClock.c.

   448    448       }
   449    449   
   450    450       /*
   451    451        * fields.seconds could be an unsigned number that overflowed. Make sure
   452    452        * that it isn't.
   453    453        */
   454    454   
   455         -    if (objv[1]->typePtr == &tclBignumType) {
          455  +    if (TclHasIntRep(objv[1], &tclBignumType)) {
   456    456   	Tcl_SetObjResult(interp, literals[LIT_INTEGER_VALUE_TOO_LARGE]);
   457    457   	return TCL_ERROR;
   458    458       }
   459    459   
   460    460       /*
   461    461        * Convert UTC time to local.
   462    462        */
................................................................................
  1768   1768   #ifdef TCL_WIDE_CLICKS
  1769   1769   	clicks = TclpGetWideClicks();
  1770   1770   #else
  1771   1771   	clicks = (Tcl_WideInt) TclpGetClicks();
  1772   1772   #endif
  1773   1773   	break;
  1774   1774       case CLICKS_MICROS:
  1775         -	Tcl_GetTime(&now);
  1776         -	clicks = ((Tcl_WideInt) now.sec * 1000000) + now.usec;
         1775  +	clicks = TclpGetMicroseconds();
  1777   1776   	break;
  1778   1777       }
  1779   1778   
  1780   1779       Tcl_SetObjResult(interp, Tcl_NewWideIntObj(clicks));
  1781   1780       return TCL_OK;
  1782   1781   }
  1783   1782   
................................................................................
  1839   1838   int
  1840   1839   ClockMicrosecondsObjCmd(
  1841   1840       ClientData clientData,	/* Client data is unused */
  1842   1841       Tcl_Interp *interp,		/* Tcl interpreter */
  1843   1842       int objc,			/* Parameter count */
  1844   1843       Tcl_Obj *const *objv)	/* Parameter values */
  1845   1844   {
  1846         -    Tcl_Time now;
  1847         -
  1848   1845       if (objc != 1) {
  1849   1846   	Tcl_WrongNumArgs(interp, 1, objv, NULL);
  1850   1847   	return TCL_ERROR;
  1851   1848       }
  1852         -    Tcl_GetTime(&now);
  1853         -    Tcl_SetObjResult(interp, Tcl_NewWideIntObj(
  1854         -	    ((Tcl_WideInt) now.sec * 1000000) + now.usec));
         1849  +    Tcl_SetObjResult(interp, Tcl_NewWideIntObj(TclpGetMicroseconds()));
  1855   1850       return TCL_OK;
  1856   1851   }
  1857   1852   
  1858   1853   /*
  1859   1854    *-----------------------------------------------------------------------------
  1860   1855    *
  1861   1856    * ClockParseformatargsObjCmd --

Changes to generic/tclCmdAH.c.

   928    928   int
   929    929   Tcl_ExitObjCmd(
   930    930       ClientData dummy,		/* Not used. */
   931    931       Tcl_Interp *interp,		/* Current interpreter. */
   932    932       int objc,			/* Number of arguments. */
   933    933       Tcl_Obj *const objv[])	/* Argument objects. */
   934    934   {
   935         -    int value;
          935  +    Tcl_WideInt value;
   936    936   
   937    937       if ((objc != 1) && (objc != 2)) {
   938    938   	Tcl_WrongNumArgs(interp, 1, objv, "?returnCode?");
   939    939   	return TCL_ERROR;
   940    940       }
   941    941   
   942    942       if (objc == 1) {
   943    943   	value = 0;
   944         -    } else if (Tcl_GetIntFromObj(interp, objv[1], &value) != TCL_OK) {
          944  +    } else if (TclGetWideBitsFromObj(interp, objv[1], &value) != TCL_OK) {
   945    945   	return TCL_ERROR;
   946    946       }
   947         -    Tcl_Exit(value);
          947  +    Tcl_Exit((int)value);
   948    948       /*NOTREACHED*/
   949    949       return TCL_OK;		/* Better not ever reach this! */
   950    950   }
   951    951   
   952    952   /*
   953    953    *----------------------------------------------------------------------
   954    954    *

Changes to generic/tclCmdMZ.c.

    13     13    * Copyright (c) 2003-2009 Donal K. Fellows.
    14     14    *
    15     15    * See the file "license.terms" for information on usage and redistribution of
    16     16    * this file, and for a DISCLAIMER OF ALL WARRANTIES.
    17     17    */
    18     18   
    19     19   #include "tclInt.h"
           20  +#include "tclCompile.h"
    20     21   #include "tclRegexp.h"
    21     22   #include "tclStringTrim.h"
    22     23   
    23     24   static inline Tcl_Obj *	During(Tcl_Interp *interp, int resultCode,
    24     25   			    Tcl_Obj *oldOptions, Tcl_Obj *errorInfo);
    25     26   static Tcl_NRPostProc	SwitchPostProc;
    26     27   static Tcl_NRPostProc	TryPostBody;
................................................................................
  1217   1218   
  1218   1219   	for ( ; stringPtr < end; stringPtr += len) {
  1219   1220   	    int fullchar;
  1220   1221   	    len = TclUtfToUniChar(stringPtr, &ch);
  1221   1222   	    fullchar = ch;
  1222   1223   
  1223   1224   #if TCL_UTF_MAX <= 4
  1224         -	    if (!len) {
  1225         -		len += TclUtfToUniChar(stringPtr, &ch);
         1225  +	    if ((ch >= 0xD800) && (len < 3)) {
         1226  +		len += TclUtfToUniChar(stringPtr + len, &ch);
  1226   1227   		fullchar = (((fullchar & 0x3ff) << 10) | (ch & 0x3ff)) + 0x10000;
  1227   1228   	    }
  1228   1229   #endif
  1229   1230   
  1230   1231   	    /*
  1231   1232   	     * Assume Tcl_UniChar is an integral type...
  1232   1233   	     */
................................................................................
  1440   1441   	 */
  1441   1442   
  1442   1443   	if (TclIsPureByteArray(objv[1])) {
  1443   1444   	    unsigned char uch = (unsigned char) ch;
  1444   1445   
  1445   1446   	    Tcl_SetObjResult(interp, Tcl_NewByteArrayObj(&uch, 1));
  1446   1447   	} else {
  1447         -	    char buf[4];
         1448  +	    char buf[4] = "";
  1448   1449   
  1449   1450   	    length = Tcl_UniCharToUtf(ch, buf);
  1450         -	    if (!length) {
  1451         -		length = Tcl_UniCharToUtf(-1, buf);
         1451  +	    if ((ch >= 0xD800) && (length < 3)) {
         1452  +		length += Tcl_UniCharToUtf(-1, buf + length);
  1452   1453   	    }
  1453   1454   	    Tcl_SetObjResult(interp, Tcl_NewStringObj(buf, length));
  1454   1455   	}
  1455   1456       }
  1456   1457       return TCL_OK;
  1457   1458   }
  1458   1459   
................................................................................
  1567   1568   	break;
  1568   1569       case STR_IS_ASCII:
  1569   1570   	chcomp = UniCharIsAscii;
  1570   1571   	break;
  1571   1572       case STR_IS_BOOL:
  1572   1573       case STR_IS_TRUE:
  1573   1574       case STR_IS_FALSE:
  1574         -	if ((objPtr->typePtr != &tclBooleanType)
         1575  +	if (!TclHasIntRep(objPtr, &tclBooleanType)
  1575   1576   		&& (TCL_OK != TclSetBooleanFromAny(NULL, objPtr))) {
  1576   1577   	    if (strict) {
  1577   1578   		result = 0;
  1578   1579   	    } else {
  1579   1580   		string1 = TclGetStringFromObj(objPtr, &length1);
  1580   1581   		result = length1 == 0;
  1581   1582   	    }
................................................................................
  1637   1638   	}
  1638   1639   	break;
  1639   1640       }
  1640   1641       case STR_IS_DIGIT:
  1641   1642   	chcomp = Tcl_UniCharIsDigit;
  1642   1643   	break;
  1643   1644       case STR_IS_DOUBLE: {
  1644         -	if ((objPtr->typePtr == &tclDoubleType) ||
  1645         -		(objPtr->typePtr == &tclIntType) ||
  1646         -		(objPtr->typePtr == &tclBignumType)) {
         1645  +	if (TclHasIntRep(objPtr, &tclDoubleType) ||
         1646  +		TclHasIntRep(objPtr, &tclIntType) ||
         1647  +		TclHasIntRep(objPtr, &tclBignumType)) {
  1647   1648   	    break;
  1648   1649   	}
  1649   1650   	string1 = TclGetStringFromObj(objPtr, &length1);
  1650   1651   	if (length1 == 0) {
  1651   1652   	    if (strict) {
  1652   1653   		result = 0;
  1653   1654   	    }
................................................................................
  1668   1669   	break;
  1669   1670       }
  1670   1671       case STR_IS_GRAPH:
  1671   1672   	chcomp = Tcl_UniCharIsGraph;
  1672   1673   	break;
  1673   1674       case STR_IS_INT:
  1674   1675       case STR_IS_ENTIER:
  1675         -	if ((objPtr->typePtr == &tclIntType) ||
  1676         -		(objPtr->typePtr == &tclBignumType)) {
         1676  +	if (TclHasIntRep(objPtr, &tclIntType) ||
         1677  +		TclHasIntRep(objPtr, &tclBignumType)) {
  1677   1678   	    break;
  1678   1679   	}
  1679   1680   	string1 = TclGetStringFromObj(objPtr, &length1);
  1680   1681   	if (length1 == 0) {
  1681   1682   	    if (strict) {
  1682   1683   		result = 0;
  1683   1684   	    }
................................................................................
  1850   1851   	}
  1851   1852   	end = string1 + length1;
  1852   1853   	for (; string1 < end; string1 += length2, failat++) {
  1853   1854   	    int fullchar;
  1854   1855   	    length2 = TclUtfToUniChar(string1, &ch);
  1855   1856   	    fullchar = ch;
  1856   1857   #if TCL_UTF_MAX <= 4
  1857         -	    if (!length2) {
  1858         -	    	length2 = TclUtfToUniChar(string1, &ch);
         1858  +	    if ((ch >= 0xD800) && (length2 < 3)) {
         1859  +	    	length2 += TclUtfToUniChar(string1 + length2, &ch);
  1859   1860   	    	fullchar = (((fullchar & 0x3ff) << 10) | (ch & 0x3ff)) + 0x10000;
  1860   1861   	    }
  1861   1862   #endif
  1862   1863   	    if (!chcomp(fullchar)) {
  1863   1864   		result = 0;
  1864   1865   		break;
  1865   1866   	    }
................................................................................
  1931   1932   	return TCL_ERROR;
  1932   1933       }
  1933   1934   
  1934   1935       if (objc == 4) {
  1935   1936   	const char *string = TclGetStringFromObj(objv[1], &length2);
  1936   1937   
  1937   1938   	if ((length2 > 1) &&
  1938         -		strncmp(string, "-nocase", (size_t) length2) == 0) {
         1939  +		strncmp(string, "-nocase", length2) == 0) {
  1939   1940   	    nocase = 1;
  1940   1941   	} else {
  1941   1942   	    Tcl_SetObjResult(interp, Tcl_ObjPrintf(
  1942   1943   		    "bad option \"%s\": must be -nocase", string));
  1943   1944   	    Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "INDEX", "option",
  1944   1945   		    string, NULL);
  1945   1946   	    return TCL_ERROR;
................................................................................
  1948   1949   
  1949   1950       /*
  1950   1951        * This test is tricky, but has to be that way or you get other strange
  1951   1952        * inconsistencies (see test string-10.20.1 for illustration why!)
  1952   1953        */
  1953   1954   
  1954   1955       if (!TclHasStringRep(objv[objc-2])
  1955         -	    && (objv[objc-2]->typePtr == &tclDictType)){
         1956  +	    && TclHasIntRep(objv[objc-2], &tclDictType)){
  1956   1957   	int i, done;
  1957   1958   	Tcl_DictSearch search;
  1958   1959   
  1959   1960   	/*
  1960   1961   	 * We know the type exactly, so all dict operations will succeed for
  1961   1962   	 * sure. This shortens this code quite a bit.
  1962   1963   	 */
................................................................................
  2110   2111   
  2111   2112   		ustring2 = mapStrings[index];
  2112   2113   		length2 = mapLens[index];
  2113   2114   		if ((length2 > 0) && ((*ustring1 == *ustring2) || (nocase &&
  2114   2115   			(Tcl_UniCharToLower(*ustring1) == u2lc[index/2]))) &&
  2115   2116   			/* Restrict max compare length. */
  2116   2117   			(end-ustring1 >= length2) && ((length2 == 1) ||
  2117         -			!strCmpFn(ustring2, ustring1, (unsigned) length2))) {
         2118  +			!strCmpFn(ustring2, ustring1, length2))) {
  2118   2119   		    if (p != ustring1) {
  2119   2120   			/*
  2120   2121   			 * Put the skipped chars onto the result first.
  2121   2122   			 */
  2122   2123   
  2123   2124   			Tcl_AppendUnicodeToObj(resultPtr, p, ustring1-p);
  2124   2125   			p = ustring1 + length2;
................................................................................
  2199   2200       }
  2200   2201   
  2201   2202       if (objc == 4) {
  2202   2203   	int length;
  2203   2204   	const char *string = TclGetStringFromObj(objv[1], &length);
  2204   2205   
  2205   2206   	if ((length > 1) &&
  2206         -	    strncmp(string, "-nocase", (size_t) length) == 0) {
         2207  +	    strncmp(string, "-nocase", length) == 0) {
  2207   2208   	    nocase = TCL_MATCH_NOCASE;
  2208   2209   	} else {
  2209   2210   	    Tcl_SetObjResult(interp, Tcl_ObjPrintf(
  2210   2211   		    "bad option \"%s\": must be -nocase", string));
  2211   2212   	    Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "INDEX", "option",
  2212   2213   		    string, NULL);
  2213   2214   	    return TCL_ERROR;
................................................................................
  2601   2602   	Tcl_WrongNumArgs(interp, 1, objv,
  2602   2603   		"?-nocase? ?-length int? string1 string2");
  2603   2604   	return TCL_ERROR;
  2604   2605       }
  2605   2606   
  2606   2607       for (i = 1; i < objc-2; i++) {
  2607   2608   	string2 = TclGetStringFromObj(objv[i], &length);
  2608         -	if ((length > 1) && !strncmp(string2, "-nocase", (size_t)length)) {
         2609  +	if ((length > 1) && !strncmp(string2, "-nocase", length)) {
  2609   2610   	    nocase = 1;
  2610   2611   	} else if ((length > 1)
  2611         -		&& !strncmp(string2, "-length", (size_t)length)) {
         2612  +		&& !strncmp(string2, "-length", length)) {
  2612   2613   	    if (i+1 >= objc-2) {
  2613   2614   		goto str_cmp_args;
  2614   2615   	    }
  2615   2616   	    i++;
  2616   2617   	    if (TclGetIntFromObj(interp, objv[i], &reqlength) != TCL_OK) {
  2617   2618   		return TCL_ERROR;
  2618   2619   	    }
................................................................................
  2699   2700   	Tcl_WrongNumArgs(interp, 1, objv,
  2700   2701   		"?-nocase? ?-length int? string1 string2");
  2701   2702   	return TCL_ERROR;
  2702   2703       }
  2703   2704   
  2704   2705       for (i = 1; i < objc-2; i++) {
  2705   2706   	string = TclGetStringFromObj(objv[i], &length);
  2706         -	if ((length > 1) && !strncmp(string, "-nocase", (size_t)length)) {
         2707  +	if ((length > 1) && !strncmp(string, "-nocase", length)) {
  2707   2708   	    *nocase = 1;
  2708   2709   	} else if ((length > 1)
  2709         -		&& !strncmp(string, "-length", (size_t)length)) {
         2710  +		&& !strncmp(string, "-length", length)) {
  2710   2711   	    if (i+1 >= objc-2) {
  2711   2712   		goto str_cmp_args;
  2712   2713   	    }
  2713   2714   	    i++;
  2714   2715   	    if (TclGetIntFromObj(interp, objv[i], reqlength) != TCL_OK) {
  2715   2716   		return TCL_ERROR;
  2716   2717   	    }
................................................................................
  4026   4027       i = count;
  4027   4028   #ifndef TCL_WIDE_CLICKS
  4028   4029       Tcl_GetTime(&start);
  4029   4030   #else
  4030   4031       start = TclpGetWideClicks();
  4031   4032   #endif
  4032   4033       while (i-- > 0) {
  4033         -	result = Tcl_EvalObjEx(interp, objPtr, 0);
         4034  +	result = TclEvalObjEx(interp, objPtr, 0, NULL, 0);
  4034   4035   	if (result != TCL_OK) {
  4035   4036   	    return result;
  4036   4037   	}
  4037   4038       }
  4038   4039   #ifndef TCL_WIDE_CLICKS
  4039   4040       Tcl_GetTime(&stop);
  4040   4041       totalMicroSec = ((double) (stop.sec - start.sec)) * 1.0e6
................................................................................
  4062   4063       TclNewLiteralStringObj(objs[1], "microseconds");
  4063   4064       TclNewLiteralStringObj(objs[2], "per");
  4064   4065       TclNewLiteralStringObj(objs[3], "iteration");
  4065   4066       Tcl_SetObjResult(interp, Tcl_NewListObj(4, objs));
  4066   4067   
  4067   4068       return TCL_OK;
  4068   4069   }
         4070  +
         4071  +/*
         4072  + *----------------------------------------------------------------------
         4073  + *
         4074  + * Tcl_TimeRateObjCmd --
         4075  + *
         4076  + *	This object-based procedure is invoked to process the "timerate" Tcl
         4077  + *	command.
         4078  + *	This is similar to command "time", except the execution limited by
         4079  + *	given time (in milliseconds) instead of repetition count.
         4080  + *
         4081  + * Example:
         4082  + *	timerate {after 5} 1000 ; # equivalent for `time {after 5} [expr 1000/5]`
         4083  + *
         4084  + * Results:
         4085  + *	A standard Tcl object result.
         4086  + *
         4087  + * Side effects:
         4088  + *	See the user documentation.
         4089  + *
         4090  + *----------------------------------------------------------------------
         4091  + */
         4092  +
         4093  +int
         4094  +Tcl_TimeRateObjCmd(
         4095  +    ClientData dummy,		/* Not used. */
         4096  +    Tcl_Interp *interp,		/* Current interpreter. */
         4097  +    int objc,			/* Number of arguments. */
         4098  +    Tcl_Obj *const objv[])	/* Argument objects. */
         4099  +{
         4100  +    static double measureOverhead = 0; /* global measure-overhead */
         4101  +    double overhead = -1;	/* given measure-overhead */
         4102  +    register Tcl_Obj *objPtr;
         4103  +    register int result, i;
         4104  +    Tcl_Obj *calibrate = NULL, *direct = NULL;
         4105  +    Tcl_WideUInt count = 0;	/* Holds repetition count */
         4106  +    Tcl_WideInt  maxms  = WIDE_MIN;
         4107  +				/* Maximal running time (in milliseconds) */
         4108  +    Tcl_WideUInt maxcnt = WIDE_MAX;
         4109  +				/* Maximal count of iterations. */
         4110  +    Tcl_WideUInt threshold = 1;	/* Current threshold for check time (faster
         4111  +				 * repeat count without time check) */
         4112  +    Tcl_WideUInt maxIterTm = 1;	/* Max time of some iteration as max threshold
         4113  +				 * additionally avoid divide to zero (never < 1) */
         4114  +    unsigned short factor = 50;	/* Factor (4..50) limiting threshold to avoid
         4115  +				 * growth of execution time. */
         4116  +    register Tcl_WideInt start, middle, stop;
         4117  +#ifndef TCL_WIDE_CLICKS
         4118  +    Tcl_Time now;
         4119  +#endif
         4120  +
         4121  +    static const char *const options[] = {
         4122  +	"-direct",	"-overhead",	"-calibrate",	"--",	NULL
         4123  +    };
         4124  +    enum options {
         4125  +	TMRT_EV_DIRECT,	TMRT_OVERHEAD,	TMRT_CALIBRATE,	TMRT_LAST
         4126  +    };
         4127  +
         4128  +    NRE_callback *rootPtr;
         4129  +    ByteCode	 *codePtr = NULL;
         4130  +
         4131  +    for (i = 1; i < objc - 1; i++) {
         4132  +    	int index;
         4133  +	if (Tcl_GetIndexFromObj(NULL, objv[i], options, "option", TCL_EXACT,
         4134  +		&index) != TCL_OK) {
         4135  +	    break;
         4136  +	}
         4137  +	if (index == TMRT_LAST) {
         4138  +	    i++;
         4139  +	    break;
         4140  +	}
         4141  +	switch (index) {
         4142  +	case TMRT_EV_DIRECT:
         4143  +	    direct = objv[i];
         4144  +	    break;
         4145  +	case TMRT_OVERHEAD:
         4146  +	    if (++i >= objc - 1) {
         4147  +		goto usage;
         4148  +	    }
         4149  +	    if (Tcl_GetDoubleFromObj(interp, objv[i], &overhead) != TCL_OK) {
         4150  +		return TCL_ERROR;
         4151  +	    }
         4152  +	    break;
         4153  +	case TMRT_CALIBRATE:
         4154  +	    calibrate = objv[i];
         4155  +	    break;
         4156  +	}
         4157  +    }
         4158  +
         4159  +    if (i >= objc || i < objc-3) {
         4160  +usage:
         4161  +	Tcl_WrongNumArgs(interp, 1, objv, "?-direct? ?-calibrate? ?-overhead double? command ?time ?max-count??");
         4162  +	return TCL_ERROR;
         4163  +    }
         4164  +    objPtr = objv[i++];
         4165  +    if (i < objc) {	/* max-time */
         4166  +	result = Tcl_GetWideIntFromObj(interp, objv[i++], &maxms);
         4167  +	if (result != TCL_OK) {
         4168  +	    return result;
         4169  +	}
         4170  +	if (i < objc) {	/* max-count*/
         4171  +	    Tcl_WideInt v;
         4172  +	    result = Tcl_GetWideIntFromObj(interp, objv[i], &v);
         4173  +	    if (result != TCL_OK) {
         4174  +		return result;
         4175  +	    }
         4176  +	    maxcnt = (v > 0) ? v : 0;
         4177  +	}
         4178  +    }
         4179  +
         4180  +    /* if calibrate */
         4181  +    if (calibrate) {
         4182  +
         4183  +	/* if no time specified for the calibration */
         4184  +	if (maxms == WIDE_MIN) {
         4185  +	    Tcl_Obj *clobjv[6];
         4186  +	    Tcl_WideInt maxCalTime = 5000;
         4187  +	    double lastMeasureOverhead = measureOverhead;
         4188  +
         4189  +	    clobjv[0] = objv[0];
         4190  +	    i = 1;
         4191  +	    if (direct) {
         4192  +	    	clobjv[i++] = direct;
         4193  +	    }
         4194  +	    clobjv[i++] = objPtr;
         4195  +
         4196  +	    /* reset last measurement overhead */
         4197  +	    measureOverhead = (double)0;
         4198  +
         4199  +	    /* self-call with 100 milliseconds to warm-up,
         4200  +	     * before entering the calibration cycle */
         4201  +	    TclNewIntObj(clobjv[i], 100);
         4202  +	    Tcl_IncrRefCount(clobjv[i]);
         4203  +	    result = Tcl_TimeRateObjCmd(dummy, interp, i+1, clobjv);
         4204  +	    Tcl_DecrRefCount(clobjv[i]);
         4205  +	    if (result != TCL_OK) {
         4206  +		return result;
         4207  +	    }
         4208  +
         4209  +	    i--;
         4210  +	    clobjv[i++] = calibrate;
         4211  +	    clobjv[i++] = objPtr;
         4212  +
         4213  +	    /* set last measurement overhead to max */
         4214  +	    measureOverhead = (double)UWIDE_MAX;
         4215  +
         4216  +	    /* calibration cycle until it'll be preciser */
         4217  +	    maxms = -1000;
         4218  +	    do {
         4219  +		lastMeasureOverhead = measureOverhead;
         4220  +		TclNewIntObj(clobjv[i], (int)maxms);
         4221  +		Tcl_IncrRefCount(clobjv[i]);
         4222  +		result = Tcl_TimeRateObjCmd(dummy, interp, i+1, clobjv);
         4223  +		Tcl_DecrRefCount(clobjv[i]);
         4224  +		if (result != TCL_OK) {
         4225  +		    return result;
         4226  +		}
         4227  +		maxCalTime += maxms;
         4228  +		/* increase maxms for preciser calibration */
         4229  +		maxms -= (-maxms / 4);
         4230  +		/* as long as new value more as 0.05% better */
         4231  +	    } while ( (measureOverhead >= lastMeasureOverhead
         4232  +		    || measureOverhead / lastMeasureOverhead <= 0.9995)
         4233  +		    && maxCalTime > 0
         4234  +	    );
         4235  +
         4236  +	    return result;
         4237  +	}
         4238  +	if (maxms == 0) {
         4239  +	    /* reset last measurement overhead */
         4240  +	    measureOverhead = 0;
         4241  +	    Tcl_SetObjResult(interp, Tcl_NewLongObj(0));
         4242  +	    return TCL_OK;
         4243  +	}
         4244  +
         4245  +	/* if time is negative - make current overhead more precise */
         4246  +	if (maxms > 0) {
         4247  +	    /* set last measurement overhead to max */
         4248  +	    measureOverhead = (double)UWIDE_MAX;
         4249  +	} else {
         4250  +	    maxms = -maxms;
         4251  +	}
         4252  +
         4253  +    }
         4254  +
         4255  +    if (maxms == WIDE_MIN) {
         4256  +    	maxms = 1000;
         4257  +    }
         4258  +    if (overhead == -1) {
         4259  +	overhead = measureOverhead;
         4260  +    }
         4261  +
         4262  +    /* be sure that resetting of result will not smudge the further measurement */
         4263  +    Tcl_ResetResult(interp);
         4264  +
         4265  +    /* compile object */
         4266  +    if (!direct) {
         4267  +	if (TclInterpReady(interp) != TCL_OK) {
         4268  +	    return TCL_ERROR;
         4269  +	}
         4270  +	codePtr = TclCompileObj(interp, objPtr, NULL, 0);
         4271  +	TclPreserveByteCode(codePtr);
         4272  +    }
         4273  +
         4274  +    /* get start and stop time */
         4275  +#ifdef TCL_WIDE_CLICKS
         4276  +    start = middle = TclpGetWideClicks();
         4277  +    /* time to stop execution (in wide clicks) */
         4278  +    stop = start + (maxms * 1000 / TclpWideClickInMicrosec());
         4279  +#else
         4280  +    Tcl_GetTime(&now);
         4281  +    start = now.sec; start *= 1000000; start += now.usec;
         4282  +    middle = start;
         4283  +    /* time to stop execution (in microsecs) */
         4284  +    stop = start + maxms * 1000;
         4285  +#endif
         4286  +
         4287  +    /* start measurement */
         4288  +    if (maxcnt > 0)
         4289  +    while (1) {
         4290  +    	/* eval single iteration */
         4291  +    	count++;
         4292  +
         4293  +	if (!direct) {
         4294  +	    /* precompiled */
         4295  +	    rootPtr = TOP_CB(interp);
         4296  +	    result = TclNRExecuteByteCode(interp, codePtr);
         4297  +	    result = TclNRRunCallbacks(interp, result, rootPtr);
         4298  +	} else {
         4299  +	    /* eval */
         4300  +	    result = TclEvalObjEx(interp, objPtr, 0, NULL, 0);
         4301  +	}
         4302  +	if (result != TCL_OK) {
         4303  +	    /* allow break from measurement cycle (used for conditional stop) */
         4304  +	    if (result != TCL_BREAK) {
         4305  +		goto done;
         4306  +	    }
         4307  +	    /* force stop immediately */
         4308  +	    threshold = 1;
         4309  +	    maxcnt = 0;
         4310  +	    result = TCL_OK;
         4311  +	}
         4312  +
         4313  +	/* don't check time up to threshold */
         4314  +	if (--threshold > 0) continue;
         4315  +
         4316  +	/* check stop time reached, estimate new threshold */
         4317  +    #ifdef TCL_WIDE_CLICKS
         4318  +	middle = TclpGetWideClicks();
         4319  +    #else
         4320  +	Tcl_GetTime(&now);
         4321  +	middle = now.sec; middle *= 1000000; middle += now.usec;
         4322  +    #endif
         4323  +	if (middle >= stop || count >= maxcnt) {
         4324  +	    break;
         4325  +	}
         4326  +
         4327  +	/* don't calculate threshold by few iterations, because sometimes first
         4328  +	 * iteration(s) can be too fast or slow (cached, delayed clean up, etc) */
         4329  +	if (count < 10) {
         4330  +	   threshold = 1; continue;
         4331  +	}
         4332  +
         4333  +	/* average iteration time in microsecs */
         4334  +	threshold = (middle - start) / count;
         4335  +	if (threshold > maxIterTm) {
         4336  +	    maxIterTm = threshold;
         4337  +	    /* interations seems to be longer */
         4338  +	    if (threshold > (maxIterTm * 2)) {
         4339  +		if ((factor *= 2) > 50) factor = 50;
         4340  +	    } else {
         4341  +		if (factor < 50) factor++;
         4342  +	    }
         4343  +	} else if (factor > 4) {
         4344  +	    /* interations seems to be shorter */
         4345  +	    if (threshold < (maxIterTm / 2)) {
         4346  +		if ((factor /= 2) < 4) factor = 4;
         4347  +	    } else {
         4348  +		factor--;
         4349  +	    }
         4350  +	}
         4351  +	/* as relation between remaining time and time since last check,
         4352  +	 * maximal some % of time (by factor), so avoid growing of the execution time
         4353  +	 * if iterations are not consistent, e. g. wax continuously on time) */
         4354  +	threshold = ((stop - middle) / maxIterTm) / factor + 1;
         4355  +	if (threshold > 100000) {	    /* fix for too large threshold */
         4356  +	    threshold = 100000;
         4357  +	}
         4358  +	/* consider max-count */
         4359  +	if (threshold > maxcnt - count) {
         4360  +	    threshold = maxcnt - count;
         4361  +	}
         4362  +    }
         4363  +
         4364  +    {
         4365  +	Tcl_Obj *objarr[8], **objs = objarr;
         4366  +	Tcl_WideInt val;
         4367  +	const char *fmt;
         4368  +
         4369  +	middle -= start;		     /* execution time in microsecs */
         4370  +
         4371  +    #ifdef TCL_WIDE_CLICKS
         4372  +	/* convert execution time in wide clicks to microsecs */
         4373  +	middle *= TclpWideClickInMicrosec();
         4374  +    #endif
         4375  +
         4376  +	if (!count) { /* no iterations - avoid divide by zero */
         4377  +	    objs[0] = objs[2] = objs[4] = Tcl_NewWideIntObj(0);
         4378  +	    goto retRes;
         4379  +	}
         4380  +
         4381  +	/* if not calibrate */
         4382  +	if (!calibrate) {
         4383  +	    /* minimize influence of measurement overhead */
         4384  +	    if (overhead > 0) {
         4385  +		/* estimate the time of overhead (microsecs) */
         4386  +		Tcl_WideUInt curOverhead = overhead * count;
         4387  +		if (middle > (Tcl_WideInt)curOverhead) {
         4388  +		    middle -= curOverhead;
         4389  +		} else {
         4390  +		    middle = 0;
         4391  +		}
         4392  +	    }
         4393  +	} else {
         4394  +	    /* calibration - obtaining new measurement overhead */
         4395  +	    if (measureOverhead > (double)middle / count) {
         4396  +		measureOverhead = (double)middle / count;
         4397  +	    }
         4398  +	    objs[0] = Tcl_NewDoubleObj(measureOverhead);
         4399  +	    TclNewLiteralStringObj(objs[1], "\xC2\xB5s/#-overhead"); /* mics */
         4400  +	    objs += 2;
         4401  +	}
         4402  +
         4403  +	val = middle / count;		     /* microsecs per iteration */
         4404  +	if (val >= 1000000) {
         4405  +	    objs[0] = Tcl_NewWideIntObj(val);
         4406  +	} else {
         4407  +	    if (val < 10)    { fmt = "%.6f"; } else
         4408  +	    if (val < 100)   { fmt = "%.4f"; } else
         4409  +	    if (val < 1000)  { fmt = "%.3f"; } else
         4410  +	    if (val < 10000) { fmt = "%.2f"; } else
         4411  +			     { fmt = "%.1f"; };
         4412  +	    objs[0] = Tcl_ObjPrintf(fmt, ((double)middle)/count);
         4413  +	}
         4414  +
         4415  +	objs[2] = Tcl_NewWideIntObj(count); /* iterations */
         4416  +
         4417  +	/* calculate speed as rate (count) per sec */
         4418  +	if (!middle) middle++; /* +1 ms, just to avoid divide by zero */
         4419  +	if (count < (WIDE_MAX / 1000000)) {
         4420  +	    val = (count * 1000000) / middle;
         4421  +	    if (val < 100000) {
         4422  +		if (val < 100)	{ fmt = "%.3f"; } else
         4423  +		if (val < 1000) { fmt = "%.2f"; } else
         4424  +				{ fmt = "%.1f"; };
         4425  +		objs[4] = Tcl_ObjPrintf(fmt, ((double)(count * 1000000)) / middle);
         4426  +	    } else {
         4427  +		objs[4] = Tcl_NewWideIntObj(val);
         4428  +	    }
         4429  +	} else {
         4430  +	    objs[4] = Tcl_NewWideIntObj((count / middle) * 1000000);
         4431  +	}
         4432  +
         4433  +    retRes:
         4434  +	/* estimated net execution time (in millisecs) */
         4435  +	if (!calibrate) {
         4436  +	    if (middle >= 1) {
         4437  +		objs[6] = Tcl_ObjPrintf("%.3f", (double)middle / 1000);
         4438  +	    } else {
         4439  +		objs[6] = Tcl_NewWideIntObj(0);
         4440  +	    }
         4441  +	    TclNewLiteralStringObj(objs[7], "nett-ms");
         4442  +	}
         4443  +
         4444  +	/*
         4445  +	* Construct the result as a list because many programs have always parsed
         4446  +	* as such (extracting the first element, typically).
         4447  +	*/
         4448  +
         4449  +	TclNewLiteralStringObj(objs[1], "\xC2\xB5s/#"); /* mics/# */
         4450  +	TclNewLiteralStringObj(objs[3], "#");
         4451  +	TclNewLiteralStringObj(objs[5], "#/sec");
         4452  +	Tcl_SetObjResult(interp, Tcl_NewListObj(8, objarr));
         4453  +    }
         4454  +
         4455  +done:
         4456  +
         4457  +    if (codePtr != NULL) {
         4458  +	TclReleaseByteCode(codePtr);
         4459  +    }
         4460  +
         4461  +    return result;
         4462  +}
  4069   4463   
  4070   4464   /*
  4071   4465    *----------------------------------------------------------------------
  4072   4466    *
  4073   4467    * Tcl_TryObjCmd, TclNRTryObjCmd --
  4074   4468    *
  4075   4469    *	This procedure is invoked to process the "try" Tcl command. See the

Changes to generic/tclCompCmdsGR.c.

  2117   2117   	}
  2118   2118   	str = varTokenPtr[1].start;
  2119   2119   	len = varTokenPtr[1].size;
  2120   2120   	if ((len == 2) && (str[0] == '-') && (str[1] == '-')) {
  2121   2121   	    sawLast++;
  2122   2122   	    i++;
  2123   2123   	    break;
  2124         -	} else if ((len > 1) && (strncmp(str,"-nocase",(unsigned)len) == 0)) {
         2124  +	} else if ((len > 1) && (strncmp(str, "-nocase", len) == 0)) {
  2125   2125   	    nocase = 1;
  2126   2126   	} else {
  2127   2127   	    /*
  2128   2128   	     * Not an option we recognize.
  2129   2129   	     */
  2130   2130   
  2131   2131   	    return TCL_ERROR;

Changes to generic/tclCompCmdsSZ.c.

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

Changes to generic/tclCompExpr.c.

  2023   2023   	    /*
  2024   2024   	     * We have a number followed directly by bareword characters
  2025   2025   	     * (alpha, digit, underscore).  Is this a number followed by
  2026   2026   	     * bareword syntax error?  Or should we join into one bareword?
  2027   2027   	     * Example: Inf + luence + () becomes a valid function call.
  2028   2028   	     * [Bug 3401704]
  2029   2029   	     */
  2030         -	    if (literal->typePtr == &tclDoubleType) {
         2030  +	    if (TclHasIntRep(literal, &tclDoubleType)) {
  2031   2031   		const char *p = start;
  2032   2032   
  2033   2033   		while (p < end) {
  2034   2034   		    if (!TclIsBareword(*p++)) {
  2035   2035   			/*
  2036   2036   			 * The number has non-bareword characters, so we
  2037   2037   			 * must treat it as a number.
................................................................................
  2062   2062        * have no direct relevance here.
  2063   2063        */
  2064   2064   
  2065   2065       if (!TclIsBareword(*start) || *start == '_') {
  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         -	    memcpy(utfBytes, start, (size_t) numBytes);
         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);
  2077   2077   	return scanned;
  2078   2078       }

Changes to generic/tclCompile.c.

  1740   1740   	    if (tempPtr != NULL) {
  1741   1741   		Tcl_AppendToObj(tempPtr, tokenPtr->start, tokenPtr->size);
  1742   1742   	    }
  1743   1743   	    break;
  1744   1744   
  1745   1745   	case TCL_TOKEN_BS:
  1746   1746   	    if (tempPtr != NULL) {
  1747         -		char utfBuf[TCL_UTF_MAX];
         1747  +		char utfBuf[4] = "";
  1748   1748   		int length = TclParseBackslash(tokenPtr->start,
  1749   1749   			tokenPtr->size, NULL, utfBuf);
  1750   1750   
  1751   1751   		Tcl_AppendToObj(tempPtr, utfBuf, length);
  1752   1752   	    }
  1753   1753   	    break;
  1754   1754   
................................................................................
  2354   2354   				 * compile. */
  2355   2355       int count,			/* Number of tokens to consider at tokenPtr.
  2356   2356   				 * Must be at least 1. */
  2357   2357       CompileEnv *envPtr)		/* Holds the resulting instructions. */
  2358   2358   {
  2359   2359       Tcl_DString textBuffer;	/* Holds concatenated chars from adjacent
  2360   2360   				 * TCL_TOKEN_TEXT, TCL_TOKEN_BS tokens. */
  2361         -    char buffer[TCL_UTF_MAX];
         2361  +    char buffer[4] = "";
  2362   2362       int i, numObjsToConcat, length, adjust;
  2363   2363       unsigned char *entryCodeNext = envPtr->codeNext;
  2364   2364   #define NUM_STATIC_POS 20
  2365   2365       int isLiteral, maxNumCL, numCL;
  2366   2366       int *clPosition = NULL;
  2367   2367       int depth = TclGetStackDepth(envPtr);
  2368   2368   
................................................................................
  2833   2833       codePtr->numAuxDataItems = envPtr->auxDataArrayNext;
  2834   2834       codePtr->numCmdLocBytes = cmdLocBytes;
  2835   2835       codePtr->maxExceptDepth = envPtr->maxExceptDepth;
  2836   2836       codePtr->maxStackDepth = envPtr->maxStackDepth;
  2837   2837   
  2838   2838       p += sizeof(ByteCode);
  2839   2839       codePtr->codeStart = p;
  2840         -    memcpy(p, envPtr->codeStart, (size_t) codeBytes);
         2840  +    memcpy(p, envPtr->codeStart, codeBytes);
  2841   2841   
  2842   2842       p += TCL_ALIGN(codeBytes);		/* align object array */
  2843   2843       codePtr->objArrayPtr = (Tcl_Obj **) p;
  2844   2844       for (i = 0;  i < numLitObjects;  i++) {
  2845   2845   	codePtr->objArrayPtr[i] = TclFetchLiteral(envPtr, i);
  2846   2846       }
  2847   2847   
  2848   2848       p += TCL_ALIGN(objArrayBytes);	/* align exception range array */
  2849   2849       if (exceptArrayBytes > 0) {
  2850   2850   	codePtr->exceptArrayPtr = (ExceptionRange *) p;
  2851         -	memcpy(p, envPtr->exceptArrayPtr, (size_t) exceptArrayBytes);
         2851  +	memcpy(p, envPtr->exceptArrayPtr, exceptArrayBytes);
  2852   2852       } else {
  2853   2853   	codePtr->exceptArrayPtr = NULL;
  2854   2854       }
  2855   2855   
  2856   2856       p += TCL_ALIGN(exceptArrayBytes);	/* align AuxData array */
  2857   2857       if (auxDataArrayBytes > 0) {
  2858   2858   	codePtr->auxDataArrayPtr = (AuxData *) p;
  2859         -	memcpy(p, envPtr->auxDataArrayPtr, (size_t) auxDataArrayBytes);
         2859  +	memcpy(p, envPtr->auxDataArrayPtr, auxDataArrayBytes);
  2860   2860       } else {
  2861   2861   	codePtr->auxDataArrayPtr = NULL;
  2862   2862       }
  2863   2863   
  2864   2864       p += auxDataArrayBytes;
  2865   2865   #ifndef TCL_COMPILE_DEBUG
  2866   2866       EncodeCmdLocMap(envPtr, codePtr, (unsigned char *) p);
................................................................................
  3004   3004   
  3005   3005   	localPtr = procPtr->firstLocalPtr;
  3006   3006   	for (i = 0;  i < localCt;  i++) {
  3007   3007   	    if (!TclIsVarTemporary(localPtr)) {
  3008   3008   		char *localName = localPtr->name;
  3009   3009   
  3010   3010   		if ((nameBytes == localPtr->nameLength) &&
  3011         -			(strncmp(name,localName,(unsigned)nameBytes) == 0)) {
         3011  +			(strncmp(name, localName, nameBytes) == 0)) {
  3012   3012   		    return i;
  3013   3013   		}
  3014   3014   	    }
  3015   3015   	    localPtr = localPtr->nextPtr;
  3016   3016   	}
  3017   3017       }
  3018   3018   
................................................................................
  3036   3036   	if (name == NULL) {
  3037   3037   	    localPtr->flags |= VAR_TEMPORARY;
  3038   3038   	}
  3039   3039   	localPtr->defValuePtr = NULL;
  3040   3040   	localPtr->resolveInfo = NULL;
  3041   3041   
  3042   3042   	if (name != NULL) {
  3043         -	    memcpy(localPtr->name, name, (size_t) nameBytes);
         3043  +	    memcpy(localPtr->name, name, nameBytes);
  3044   3044   	}
  3045   3045   	localPtr->name[nameBytes] = '\0';
  3046   3046   	procPtr->numCompiledLocals++;
  3047   3047       }
  3048   3048       return localVar;
  3049   3049   }
  3050   3050   

Changes to generic/tclDecls.h.

   750    750   				const char ***argvPtr);
   751    751   /* 244 */
   752    752   EXTERN void		Tcl_StaticPackage(Tcl_Interp *interp,
   753    753   				const char *pkgName,
   754    754   				Tcl_PackageInitProc *initProc,
   755    755   				Tcl_PackageInitProc *safeInitProc);
   756    756   /* 245 */
   757         -EXTERN int		Tcl_StringMatch(const char *str, const char *pattern);
          757  +TCL_DEPRECATED("No longer in use, changed to macro")
          758  +int			Tcl_StringMatch(const char *str, const char *pattern);
   758    759   /* 246 */
   759    760   TCL_DEPRECATED("")
   760    761   int			Tcl_TellOld(Tcl_Channel chan);
   761    762   /* 247 */
   762    763   TCL_DEPRECATED("No longer in use, changed to macro")
   763    764   int			Tcl_TraceVar(Tcl_Interp *interp, const char *varName,
   764    765   				int flags, Tcl_VarTraceProc *proc,
................................................................................
  2172   2173       const char * (*tcl_SetVar2) (Tcl_Interp *interp, const char *part1, const char *part2, const char *newValue, int flags); /* 238 */
  2173   2174       const char * (*tcl_SignalId) (int sig); /* 239 */
  2174   2175       const char * (*tcl_SignalMsg) (int sig); /* 240 */
  2175   2176       void (*tcl_SourceRCFile) (Tcl_Interp *interp); /* 241 */
  2176   2177       int (*tcl_SplitList) (Tcl_Interp *interp, const char *listStr, int *argcPtr, const char ***argvPtr); /* 242 */
  2177   2178       void (*tcl_SplitPath) (const char *path, int *argcPtr, const char ***argvPtr); /* 243 */
  2178   2179       TCL_DEPRECATED_API("Don't use this function in a stub-enabled extension") void (*tcl_StaticPackage) (Tcl_Interp *interp, const char *pkgName, Tcl_PackageInitProc *initProc, Tcl_PackageInitProc *safeInitProc); /* 244 */
  2179         -    int (*tcl_StringMatch) (const char *str, const char *pattern); /* 245 */
         2180  +    TCL_DEPRECATED_API("No longer in use, changed to macro") int (*tcl_StringMatch) (const char *str, const char *pattern); /* 245 */
  2180   2181       TCL_DEPRECATED_API("") int (*tcl_TellOld) (Tcl_Channel chan); /* 246 */
  2181   2182       TCL_DEPRECATED_API("No longer in use, changed to macro") int (*tcl_TraceVar) (Tcl_Interp *interp, const char *varName, int flags, Tcl_VarTraceProc *proc, ClientData clientData); /* 247 */
  2182   2183       int (*tcl_TraceVar2) (Tcl_Interp *interp, const char *part1, const char *part2, int flags, Tcl_VarTraceProc *proc, ClientData clientData); /* 248 */
  2183   2184       char * (*tcl_TranslateFileName) (Tcl_Interp *interp, const char *name, Tcl_DString *bufferPtr); /* 249 */
  2184   2185       int (*tcl_Ungets) (Tcl_Channel chan, const char *str, int len, int atHead); /* 250 */
  2185   2186       void (*tcl_UnlinkVar) (Tcl_Interp *interp, const char *varName); /* 251 */
  2186   2187       int (*tcl_UnregisterChannel) (Tcl_Interp *interp, Tcl_Channel chan); /* 252 */
................................................................................
  4069   4070   #define Tcl_SetIntObj(objPtr, value)	Tcl_SetWideIntObj((objPtr), (int)(value))
  4070   4071   #undef Tcl_SetLongObj
  4071   4072   #define Tcl_SetLongObj(objPtr, value)	Tcl_SetWideIntObj((objPtr), (long)(value))
  4072   4073   #undef Tcl_GetUnicode
  4073   4074   #define Tcl_GetUnicode(objPtr)	Tcl_GetUnicodeFromObj((objPtr), NULL)
  4074   4075   #undef Tcl_BackgroundError
  4075   4076   #define Tcl_BackgroundError(interp)	Tcl_BackgroundException((interp), TCL_ERROR)
         4077  +#undef Tcl_StringMatch
         4078  +#define Tcl_StringMatch(str, pattern) Tcl_StringCaseMatch((str), (pattern), 0)
  4076   4079   
  4077   4080   /*
  4078   4081    * Deprecated Tcl procedures:
  4079   4082    */
  4080   4083   
  4081   4084   #undef Tcl_EvalObj
  4082   4085   #define Tcl_EvalObj(interp, objPtr) \
  4083   4086       Tcl_EvalObjEx(interp, objPtr, 0)
  4084   4087   #undef Tcl_GlobalEvalObj
  4085   4088   #define Tcl_GlobalEvalObj(interp, objPtr) \
  4086   4089       Tcl_EvalObjEx(interp, objPtr, TCL_EVAL_GLOBAL)
  4087   4090   
  4088   4091   #endif /* _TCLDECLS */

Changes to generic/tclDictObj.c.

   619    619   
   620    620       /*
   621    621        * Since lists and dictionaries have very closely-related string
   622    622        * representations (i.e. the same parsing code) we can safely special-case
   623    623        * the conversion from lists to dictionaries.
   624    624        */
   625    625   
   626         -    if (objPtr->typePtr == &tclListType) {
          626  +    if (TclHasIntRep(objPtr, &tclListType)) {
   627    627   	int objc, i;
   628    628   	Tcl_Obj **objv;
   629    629   
   630    630   	/* Cannot fail, we already know the Tcl_ObjType is "list". */
   631    631   	TclListObjGetElements(NULL, objPtr, &objc, &objv);
   632    632   	if (objc & 1) {
   633    633   	    goto missingValue;

Changes to generic/tclDisassemble.c.

  1380   1380   	 */
  1381   1381   
  1382   1382   	if (objc != 3) {
  1383   1383   	    Tcl_WrongNumArgs(interp, 2, objv, "script");
  1384   1384   	    return TCL_ERROR;
  1385   1385   	}
  1386   1386   
  1387         -	if ((objv[2]->typePtr != &tclByteCodeType) && (TCL_OK
         1387  +	if (!TclHasIntRep(objv[2], &tclByteCodeType) && (TCL_OK
  1388   1388   		!= TclSetByteCodeFromAny(interp, objv[2], NULL, NULL))) {
  1389   1389   	    return TCL_ERROR;
  1390   1390   	}
  1391   1391   	codeObjPtr = objv[2];
  1392   1392   	break;
  1393   1393   
  1394   1394       case DISAS_CLASS_CONSTRUCTOR:
................................................................................
  1431   1431   	    return TCL_ERROR;
  1432   1432   	}
  1433   1433   
  1434   1434   	/*
  1435   1435   	 * Compile if necessary.
  1436   1436   	 */
  1437   1437   
  1438         -	if (procPtr->bodyPtr->typePtr != &tclByteCodeType) {
         1438  +	if (!TclHasIntRep(procPtr->bodyPtr, &tclByteCodeType)) {
  1439   1439   	    Command cmd;
  1440   1440   
  1441   1441   	    /*
  1442   1442   	     * Yes, this is ugly, but we need to pass the namespace in to the
  1443   1443   	     * compiler in two places.
  1444   1444   	     */
  1445   1445   
................................................................................
  1496   1496   	    return TCL_ERROR;
  1497   1497   	}
  1498   1498   
  1499   1499   	/*
  1500   1500   	 * Compile if necessary.
  1501   1501   	 */
  1502   1502   
  1503         -	if (procPtr->bodyPtr->typePtr != &tclByteCodeType) {
         1503  +	if (!TclHasIntRep(procPtr->bodyPtr, &tclByteCodeType)) {
  1504   1504   	    Command cmd;
  1505   1505   
  1506   1506   	    /*
  1507   1507   	     * Yes, this is ugly, but we need to pass the namespace in to the
  1508   1508   	     * compiler in two places.
  1509   1509   	     */
  1510   1510   
................................................................................
  1581   1581   	if (procPtr == NULL) {
  1582   1582   	    Tcl_SetObjResult(interp, Tcl_NewStringObj(
  1583   1583   		    "body not available for this kind of method", -1));
  1584   1584   	    Tcl_SetErrorCode(interp, "TCL", "OPERATION", "DISASSEMBLE",
  1585   1585   		    "METHODTYPE", NULL);
  1586   1586   	    return TCL_ERROR;
  1587   1587   	}
  1588         -	if (procPtr->bodyPtr->typePtr != &tclByteCodeType) {
         1588  +	if (!TclHasIntRep(procPtr->bodyPtr, &tclByteCodeType)) {
  1589   1589   	    Command cmd;
  1590   1590   
  1591   1591   	    /*
  1592   1592   	     * Yes, this is ugly, but we need to pass the namespace in to the
  1593   1593   	     * compiler in two places.
  1594   1594   	     */
  1595   1595   

Changes to generic/tclEncoding.c.

   230    230   			    int *srcReadPtr, int *dstWrotePtr,
   231    231   			    int *dstCharsPtr);
   232    232   static int		TableToUtfProc(ClientData clientData, const char *src,
   233    233   			    int srcLen, int flags, Tcl_EncodingState *statePtr,
   234    234   			    char *dst, int dstLen, int *srcReadPtr,
   235    235   			    int *dstWrotePtr, int *dstCharsPtr);
   236    236   static size_t		unilen(const char *src);
   237         -static int		UnicodeToUtfProc(ClientData clientData,
          237  +static int		UniCharToUtfProc(ClientData clientData,
   238    238   			    const char *src, int srcLen, int flags,
   239    239   			    Tcl_EncodingState *statePtr, char *dst, int dstLen,
   240    240   			    int *srcReadPtr, int *dstWrotePtr,
   241    241   			    int *dstCharsPtr);
   242         -static int		UtfToUnicodeProc(ClientData clientData,
          242  +static int		UtfToUniCharProc(ClientData clientData,
   243    243   			    const char *src, int srcLen, int flags,
   244    244   			    Tcl_EncodingState *statePtr, char *dst, int dstLen,
   245    245   			    int *srcReadPtr, int *dstWrotePtr,
   246    246   			    int *dstCharsPtr);
   247    247   static int		UtfToUtfProc(ClientData clientData,
   248    248   			    const char *src, int srcLen, int flags,
   249    249   			    Tcl_EncodingState *statePtr, char *dst, int dstLen,
................................................................................
   592    592       type.fromUtfProc	= UtfIntToUtfExtProc;
   593    593       type.freeProc	= NULL;
   594    594       type.nullSize	= 1;
   595    595       type.clientData	= NULL;
   596    596       Tcl_CreateEncoding(&type);
   597    597   
   598    598       type.encodingName   = "unicode";
   599         -    type.toUtfProc	= UnicodeToUtfProc;
   600         -    type.fromUtfProc    = UtfToUnicodeProc;
          599  +    type.toUtfProc	= UniCharToUtfProc;
          600  +    type.fromUtfProc    = UtfToUniCharProc;
   601    601       type.freeProc	= NULL;
   602    602       type.nullSize	= 2;
   603    603       type.clientData	= NULL;
   604    604       Tcl_CreateEncoding(&type);
   605    605   
   606    606       /*
   607    607        * Need the iso8859-1 encoding in order to process binary data, so force
................................................................................
  2069   2069   	Tcl_DStringFree(&lineString);
  2070   2070       }
  2071   2071   
  2072   2072       size = sizeof(EscapeEncodingData) - sizeof(EscapeSubTable)
  2073   2073   	    + Tcl_DStringLength(&escapeData);
  2074   2074       dataPtr = ckalloc(size);
  2075   2075       dataPtr->initLen = strlen(init);
  2076         -    memcpy(dataPtr->init, init, (unsigned) dataPtr->initLen + 1);
         2076  +    memcpy(dataPtr->init, init, dataPtr->initLen + 1);
  2077   2077       dataPtr->finalLen = strlen(final);
  2078         -    memcpy(dataPtr->final, final, (unsigned) dataPtr->finalLen + 1);
         2078  +    memcpy(dataPtr->final, final, dataPtr->finalLen + 1);
  2079   2079       dataPtr->numSubTables =
  2080   2080   	    Tcl_DStringLength(&escapeData) / sizeof(EscapeSubTable);
  2081   2081       memcpy(dataPtr->subTables, Tcl_DStringValue(&escapeData),
  2082   2082   	    Tcl_DStringLength(&escapeData));
  2083   2083       Tcl_DStringFree(&escapeData);
  2084   2084   
  2085   2085       memset(dataPtr->prefixBytes, 0, sizeof(dataPtr->prefixBytes));
................................................................................
  2163   2163   	srcLen = dstLen;
  2164   2164   	result = TCL_CONVERT_NOSPACE;
  2165   2165       }
  2166   2166   
  2167   2167       *srcReadPtr = srcLen;
  2168   2168       *dstWrotePtr = srcLen;
  2169   2169       *dstCharsPtr = srcLen;
  2170         -    memcpy(dst, src, (size_t) srcLen);
         2170  +    memcpy(dst, src, srcLen);
  2171   2171       return result;
  2172   2172   }
  2173   2173   
  2174   2174   /*
  2175   2175    *-------------------------------------------------------------------------
  2176   2176    *
  2177   2177    * UtfExtToUtfIntProc --
................................................................................
  2380   2380   	    src += 1;
  2381   2381   	    dst += Tcl_UniCharToUtf(*chPtr, dst);
  2382   2382   	} else {
  2383   2383   	    int len = TclUtfToUniChar(src, chPtr);
  2384   2384   	    src += len;
  2385   2385   	    dst += Tcl_UniCharToUtf(*chPtr, dst);
  2386   2386   #if TCL_UTF_MAX <= 4
  2387         -	    if (!len) {
  2388         -		src += TclUtfToUniChar(src, chPtr);
         2387  +	    if ((*chPtr >= 0xD800) && (len < 3)) {
         2388  +		src += TclUtfToUniChar(src + len, chPtr);
  2389   2389   		dst += Tcl_UniCharToUtf(*chPtr, dst);
  2390   2390   	    }
  2391   2391   #endif
  2392   2392   	}
  2393   2393       }
  2394   2394   
  2395   2395       *srcReadPtr = src - srcStart;
................................................................................
  2397   2397       *dstCharsPtr = numChars;
  2398   2398       return result;
  2399   2399   }
  2400   2400   
  2401   2401   /*
  2402   2402    *-------------------------------------------------------------------------
  2403   2403    *
  2404         - * UnicodeToUtfProc --
         2404  + * UniCharToUtfProc --
  2405   2405    *
  2406   2406    *	Convert from Unicode to UTF-8.
  2407   2407    *
  2408   2408    * Results:
  2409   2409    *	Returns TCL_OK if conversion was successful.
  2410   2410    *
  2411   2411    * Side effects:
  2412   2412    *	None.
  2413   2413    *
  2414   2414    *-------------------------------------------------------------------------
  2415   2415    */
  2416   2416   
  2417   2417   static int
  2418         -UnicodeToUtfProc(
         2418  +UniCharToUtfProc(
  2419   2419       ClientData clientData,	/* Not used. */
  2420   2420       const char *src,		/* Source string in Unicode. */
  2421   2421       int srcLen,			/* Source string length in bytes. */
  2422   2422       int flags,			/* Conversion control flags. */
  2423   2423       Tcl_EncodingState *statePtr,/* Place for conversion routine to store state
  2424   2424   				 * information used during a piecewise
  2425   2425   				 * conversion. Contents of statePtr are
................................................................................
  2440   2440       int *dstCharsPtr)		/* Filled with the number of characters that
  2441   2441   				 * correspond to the bytes stored in the
  2442   2442   				 * output buffer. */
  2443   2443   {
  2444   2444       const char *srcStart, *srcEnd;
  2445   2445       const char *dstEnd, *dstStart;
  2446   2446       int result, numChars, charLimit = INT_MAX;
  2447         -    Tcl_UniChar *chPtr = (Tcl_UniChar *) statePtr;
         2447  +    unsigned short ch;
  2448   2448   
  2449         -    if (flags & TCL_ENCODING_START) {
  2450         -    	*statePtr = 0;
  2451         -    }
  2452   2449       if (flags & TCL_ENCODING_CHAR_LIMIT) {
  2453   2450   	charLimit = *dstCharsPtr;
  2454   2451       }
  2455   2452       result = TCL_OK;
  2456         -    if ((srcLen % sizeof(Tcl_UniChar)) != 0) {
         2453  +    if ((srcLen % sizeof(unsigned short)) != 0) {
  2457   2454   	result = TCL_CONVERT_MULTIBYTE;
  2458         -	srcLen /= sizeof(Tcl_UniChar);
  2459         -	srcLen *= sizeof(Tcl_UniChar);
         2455  +	srcLen /= sizeof(unsigned short);
         2456  +	srcLen *= sizeof(unsigned short);
  2460   2457       }
  2461   2458   
  2462   2459       srcStart = src;
  2463   2460       srcEnd = src + srcLen;
  2464   2461   
  2465   2462       dstStart = dst;
  2466   2463       dstEnd = dst + dstLen - TCL_UTF_MAX;
................................................................................
  2469   2466   	if (dst > dstEnd) {
  2470   2467   	    result = TCL_CONVERT_NOSPACE;
  2471   2468   	    break;
  2472   2469   	}
  2473   2470   
  2474   2471   	/*
  2475   2472   	 * Special case for 1-byte utf chars for speed. Make sure we work with
  2476         -	 * Tcl_UniChar-size data.
         2473  +	 * unsigned short-size data.
  2477   2474   	 */
  2478   2475   
  2479         -	*chPtr = *(Tcl_UniChar *)src;
  2480         -	if (*chPtr && *chPtr < 0x80) {
  2481         -	    *dst++ = (*chPtr & 0xFF);
         2476  +	ch = *(unsigned short *)src;
         2477  +	if (ch && ch < 0x80) {
         2478  +	    *dst++ = (ch & 0xFF);
  2482   2479   	} else {
  2483         -	    dst += Tcl_UniCharToUtf(*chPtr, dst);
         2480  +	    dst += Tcl_UniCharToUtf(ch, dst);
  2484   2481   	}
  2485         -	src += sizeof(Tcl_UniChar);
         2482  +	src += sizeof(unsigned short);
  2486   2483       }
  2487   2484   
  2488   2485       *srcReadPtr = src - srcStart;
  2489   2486       *dstWrotePtr = dst - dstStart;
  2490   2487       *dstCharsPtr = numChars;
  2491   2488       return result;
  2492   2489   }
  2493   2490   
  2494   2491   /*
  2495   2492    *-------------------------------------------------------------------------
  2496   2493    *
  2497         - * UtfToUnicodeProc --
         2494  + * UtfToUniCharProc --
  2498   2495    *
  2499   2496    *	Convert from UTF-8 to Unicode.
  2500   2497    *
  2501   2498    * Results:
  2502   2499    *	Returns TCL_OK if conversion was successful.
  2503   2500    *
  2504   2501    * Side effects:
  2505   2502    *	None.
  2506   2503    *
  2507   2504    *-------------------------------------------------------------------------
  2508   2505    */
  2509   2506   
  2510   2507   static int
  2511         -UtfToUnicodeProc(
         2508  +UtfToUniCharProc(
  2512   2509       ClientData clientData,	/* TableEncodingData that specifies
  2513   2510   				 * encoding. */
  2514   2511       const char *src,		/* Source string in UTF-8. */
  2515   2512       int srcLen,			/* Source string length in bytes. */
  2516   2513       int flags,			/* Conversion control flags. */
  2517   2514       Tcl_EncodingState *statePtr,/* Place for conversion routine to store state
  2518   2515   				 * information used during a piecewise
................................................................................
  2572   2569   	/*
  2573   2570   	 * Need to handle this in a way that won't cause misalignment by
  2574   2571   	 * casting dst to a Tcl_UniChar. [Bug 1122671]
  2575   2572   	 */
  2576   2573   
  2577   2574   #ifdef WORDS_BIGENDIAN
  2578   2575   #if TCL_UTF_MAX > 4
  2579         -	*dst++ = (*chPtr >> 24);
  2580         -	*dst++ = ((*chPtr >> 16) & 0xFF);
  2581         -	*dst++ = ((*chPtr >> 8) & 0xFF);
  2582         -	*dst++ = (*chPtr & 0xFF);
         2576  +	if (*chPtr <= 0xFFFF) {
         2577  +	    *dst++ = (*chPtr >> 8);
         2578  +	    *dst++ = (*chPtr & 0xFF);
         2579  +	} else {
         2580  +	    *dst++ = ((*chPtr & 0x3) >> 8) | 0xDC;
         2581  +	    *dst++ = (*chPtr & 0xFF);
         2582  +	    *dst++ = (((*chPtr - 0x10000) >> 18) & 0x3) | 0xD8;
         2583  +	    *dst++ = (((*chPtr - 0x10000) >> 10) & 0xFF);
         2584  +	}
  2583   2585   #else
  2584   2586   	*dst++ = (*chPtr >> 8);
  2585   2587   	*dst++ = (*chPtr & 0xFF);
  2586   2588   #endif
  2587   2589   #else
  2588   2590   #if TCL_UTF_MAX > 4
  2589         -	*dst++ = (*chPtr & 0xFF);
  2590         -	*dst++ = ((*chPtr >> 8) & 0xFF);
  2591         -	*dst++ = ((*chPtr >> 16) & 0xFF);
  2592         -	*dst++ = (*chPtr >> 24);
         2591  +	if (*chPtr <= 0xFFFF) {
         2592  +	    *dst++ = (*chPtr & 0xFF);
         2593  +	    *dst++ = (*chPtr >> 8);
         2594  +	} else {
         2595  +	    *dst++ = (((*chPtr - 0x10000) >> 10) & 0xFF);
         2596  +	    *dst++ = (((*chPtr - 0x10000) >> 18) & 0x3) | 0xD8;
         2597  +	    *dst++ = (*chPtr & 0xFF);
         2598  +	    *dst++ = ((*chPtr & 0x3) >> 8) | 0xDC;
         2599  +	}
  2593   2600   #else
  2594   2601   	*dst++ = (*chPtr & 0xFF);
  2595   2602   	*dst++ = (*chPtr >> 8);
  2596   2603   #endif
  2597   2604   #endif
  2598   2605       }
  2599   2606       *srcReadPtr = src - srcStart;
................................................................................
  3002   3009   
  3003   3010   	/*
  3004   3011   	 * Check for illegal characters.
  3005   3012   	 */
  3006   3013   
  3007   3014   	if (ch > 0xff
  3008   3015   #if TCL_UTF_MAX <= 4
  3009         -		|| !len
         3016  +		|| ((ch >= 0xD800) && (len < 3))
  3010   3017   #endif
  3011   3018   		) {
  3012   3019   	    if (flags & TCL_ENCODING_STOPONERROR) {
  3013   3020   		result = TCL_CONVERT_UNKNOWN;
  3014   3021   		break;
  3015   3022   	    }
  3016   3023   #if TCL_UTF_MAX <= 4
  3017         -	    if (!len) len = 4;
         3024  +	    if ((ch >= 0xD800) && (len < 3)) len = 4;
  3018   3025   #endif
  3019   3026   	    /*
  3020   3027   	     * Plunge on, using '?' as a fallback character.
  3021   3028   	     */
  3022   3029   
  3023   3030   	    ch = (Tcl_UniChar) '?';
  3024   3031   	}
................................................................................
  3360   3367       if (flags & TCL_ENCODING_START) {
  3361   3368   	state = 0;
  3362   3369   	if ((dst + dataPtr->initLen) > dstEnd) {
  3363   3370   	    *srcReadPtr = 0;
  3364   3371   	    *dstWrotePtr = 0;
  3365   3372   	    return TCL_CONVERT_NOSPACE;
  3366   3373   	}
  3367         -	memcpy(dst, dataPtr->init, (size_t)dataPtr->initLen);
         3374  +	memcpy(dst, dataPtr->init, dataPtr->initLen);
  3368   3375   	dst += dataPtr->initLen;
  3369   3376       } else {
  3370   3377   	state = PTR2INT(*statePtr);
  3371   3378       }
  3372   3379   
  3373   3380       encodingPtr = GetTableEncoding(dataPtr, state);
  3374   3381       tableDataPtr = encodingPtr->clientData;
................................................................................
  3439   3446   		     */
  3440   3447   
  3441   3448   		    state = oldState;
  3442   3449   		    result = TCL_CONVERT_NOSPACE;
  3443   3450   		    break;
  3444   3451   		}
  3445   3452   		memcpy(dst, subTablePtr->sequence,
  3446         -			(size_t) subTablePtr->sequenceLen);
         3453  +			subTablePtr->sequenceLen);
  3447   3454   		dst += subTablePtr->sequenceLen;
  3448   3455   	    }
  3449   3456   	}
  3450   3457   
  3451   3458   	if (tablePrefixBytes[(word >> 8)] != 0) {
  3452   3459   	    if (dst + 1 > dstEnd) {
  3453   3460   		result = TCL_CONVERT_NOSPACE;
................................................................................
  3482   3489   	if ((dst + dataPtr->finalLen + (state?len:0)) > dstEnd) {
  3483   3490   	    result = TCL_CONVERT_NOSPACE;
  3484   3491   	} else {
  3485   3492   	    if (state) {
  3486   3493   		memcpy(dst, dataPtr->subTables[0].sequence, len);
  3487   3494   		dst += len;
  3488   3495   	    }
  3489         -	    memcpy(dst, dataPtr->final, (size_t) dataPtr->finalLen);
         3496  +	    memcpy(dst, dataPtr->final, dataPtr->finalLen);
  3490   3497   	    dst += dataPtr->finalLen;
  3491   3498   	    state &= ~TCL_ENCODING_END;
  3492   3499   	}
  3493   3500       }
  3494   3501   
  3495   3502       *statePtr = (Tcl_EncodingState) INT2PTR(state);
  3496   3503       *srcReadPtr = src - srcStart;

Changes to generic/tclEnsemble.c.

  1811   1811   	int tableLength = ensemblePtr->subcommandTable.numEntries;
  1812   1812   	Tcl_Obj *fix;
  1813   1813   
  1814   1814   	subcmdName = TclGetStringFromObj(subObj, &stringLength);
  1815   1815   	for (i=0 ; i<tableLength ; i++) {
  1816   1816   	    register int cmp = strncmp(subcmdName,
  1817   1817   		    ensemblePtr->subcommandArrayPtr[i],
  1818         -		    (unsigned) stringLength);
         1818  +		    stringLength);
  1819   1819   
  1820   1820   	    if (cmp == 0) {
  1821   1821   		if (fullName != NULL) {
  1822   1822   		    /*
  1823   1823   		     * Since there's never the exact-match case to worry about
  1824   1824   		     * (hash search filters this), getting here indicates that
  1825   1825   		     * our subcommand is an ambiguous prefix of (at least) two
................................................................................
  2765   2765   	if (hPtr == NULL) {
  2766   2766   	    break;
  2767   2767   	}
  2768   2768   	ensemblePtr->subcommandArrayPtr[--j] = Tcl_GetHashKey(hash, hPtr);
  2769   2769   	hPtr = Tcl_NextHashEntry(&search);
  2770   2770       }
  2771   2771       if (hash->numEntries > 1) {
  2772         -	qsort(ensemblePtr->subcommandArrayPtr, (unsigned) hash->numEntries,
         2772  +	qsort(ensemblePtr->subcommandArrayPtr, hash->numEntries,
  2773   2773   		sizeof(char *), NsEnsembleStringOrder);
  2774   2774       }
  2775   2775   }
  2776   2776   
  2777   2777   /*
  2778   2778    *----------------------------------------------------------------------
  2779   2779    *

Changes to generic/tclEnv.c.

   115    115   
   116    116       if (environ[0] != NULL) {
   117    117   	int i;
   118    118   
   119    119   	Tcl_MutexLock(&envMutex);
   120    120   	for (i = 0; environ[i] != NULL; i++) {
   121    121   	    Tcl_Obj *obj1, *obj2;
   122         -	    char *p1, *p2;
          122  +	    const char *p1;
          123  +	    char *p2;
   123    124   
   124    125   	    p1 = Tcl_ExternalToUtfDString(NULL, environ[i], -1, &envString);
   125    126   	    p2 = strchr(p1, '=');
   126    127   	    if (p2 == NULL) {
   127    128   		/*
   128    129   		 * This condition seem to happen occasionally under some
   129    130   		 * versions of Solaris, or when encoding accidents swallow the
................................................................................
   131    132   		 */
   132    133   
   133    134   		Tcl_DStringFree(&envString);
   134    135   		continue;
   135    136   	    }
   136    137   	    p2++;
   137    138   	    p2[-1] = '\0';
          139  +#if defined(_WIN32)
          140  +	    /*
          141  +	     * Enforce PATH and COMSPEC to be all uppercase. This eliminates
          142  +	     * additional trace logic otherwise required in init.tcl.
          143  +	     */
          144  +
          145  +	    if (strcasecmp(p1, "PATH") == 0) {
          146  +		p1 = "PATH";
          147  +	    } else if (strcasecmp(p1, "COMSPEC") == 0) {
          148  +		p1 = "COMSPEC";
          149  +	    }
          150  +#endif
   138    151   	    obj1 = Tcl_NewStringObj(p1, -1);
   139    152   	    obj2 = Tcl_NewStringObj(p2, -1);
   140    153   	    Tcl_DStringFree(&envString);
   141    154   
   142    155   	    Tcl_IncrRefCount(obj1);
   143    156   	    Tcl_IncrRefCount(obj2);
   144    157   	    Tcl_ObjSetVar2(interp, varNamePtr, obj1, obj2, TCL_GLOBAL_ONLY);
................................................................................
   256    269   	    Tcl_DStringFree(&envString);
   257    270   	    Tcl_MutexUnlock(&envMutex);
   258    271   	    return;
   259    272   	}
   260    273   	Tcl_DStringFree(&envString);
   261    274   
   262    275   	oldValue = environ[index];
   263         -	nameLength = (unsigned) length;
          276  +	nameLength = length;
   264    277       }
   265    278   
   266    279       /*
   267    280        * Create a new entry. Build a complete UTF string that contains a
   268    281        * "name=value" pattern. Then convert the string to the native encoding,
   269    282        * and set the environ array value.
   270    283        */
................................................................................
   277    290       p2 = Tcl_UtfToExternalDString(NULL, p, -1, &envString);
   278    291   
   279    292       /*
   280    293        * Copy the native string to heap memory.
   281    294        */
   282    295   
   283    296       p = ckrealloc(p, Tcl_DStringLength(&envString) + 1);
   284         -    memcpy(p, p2, (unsigned) Tcl_DStringLength(&envString) + 1);
          297  +    memcpy(p, p2, Tcl_DStringLength(&envString) + 1);
   285    298       Tcl_DStringFree(&envString);
   286    299   
   287    300   #ifdef USE_PUTENV
   288    301       /*
   289    302        * Update the system environment.
   290    303        */
   291    304   
................................................................................
   438    451       /*
   439    452        * For those platforms that support putenv to unset, Linux indicates
   440    453        * that no = should be included, and Windows requires it.
   441    454        */
   442    455   
   443    456   #if defined(_WIN32)
   444    457       string = ckalloc(length + 2);
   445         -    memcpy(string, name, (size_t) length);
          458  +    memcpy(string, name, length);
   446    459       string[length] = '=';
   447    460       string[length+1] = '\0';
   448    461   #else
   449    462       string = ckalloc(length + 1);
   450         -    memcpy(string, name, (size_t) length);
          463  +    memcpy(string, name, length);
   451    464       string[length] = '\0';
   452    465   #endif /* _WIN32 */
   453    466   
   454    467       Tcl_UtfToExternalDString(NULL, string, -1, &envString);
   455    468       string = ckrealloc(string, Tcl_DStringLength(&envString) + 1);
   456    469       memcpy(string, Tcl_DStringValue(&envString),
   457         -	    (unsigned) Tcl_DStringLength(&envString)+1);
          470  +	    Tcl_DStringLength(&envString)+1);
   458    471       Tcl_DStringFree(&envString);
   459    472   
   460    473       putenv(string);
   461    474   
   462    475       /*
   463    476        * Watch out for versions of putenv that copy the string (e.g. VC++). In
   464    477        * this case we need to free the string immediately. Otherwise update the

Changes to generic/tclExecute.c.

   495    495    * TclGetNumberFromObj(). The ANSI C "prototype" is:
   496    496    *
   497    497    * MODULE_SCOPE int GetNumberFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
   498    498    *			ClientData *ptrPtr, int *tPtr);
   499    499    */
   500    500   
   501    501   #define GetNumberFromObj(interp, objPtr, ptrPtr, tPtr) \
   502         -    (((objPtr)->typePtr == &tclIntType)					\
          502  +    ((TclHasIntRep((objPtr), &tclIntType))					\
   503    503   	?	(*(tPtr) = TCL_NUMBER_INT,				\
   504    504   		*(ptrPtr) = (ClientData)				\
   505    505   		    (&((objPtr)->internalRep.wideValue)), TCL_OK) :	\
   506         -    ((objPtr)->typePtr == &tclDoubleType)				\
          506  +    TclHasIntRep((objPtr), &tclDoubleType)				\
   507    507   	?	(((TclIsNaN((objPtr)->internalRep.doubleValue))		\
   508    508   		    ?	(*(tPtr) = TCL_NUMBER_NAN)			\
   509    509   		    :	(*(tPtr) = TCL_NUMBER_DOUBLE)),			\
   510    510   		*(ptrPtr) = (ClientData)				\
   511    511   		    (&((objPtr)->internalRep.doubleValue)), TCL_OK) :	\
   512    512       (((objPtr)->bytes != NULL) && ((objPtr)->length == 0))		\
   513    513   	? TCL_ERROR :			\
................................................................................
  4764   4764   	TRACE(("\"%.30s\" \"%.30s\" => ", O2S(valuePtr), O2S(value2Ptr)));
  4765   4765   
  4766   4766   	/*
  4767   4767   	 * Extract the desired list element.
  4768   4768   	 */
  4769   4769   
  4770   4770   	if ((TclListObjGetElements(interp, valuePtr, &objc, &objv) == TCL_OK)
  4771         -		&& (value2Ptr->typePtr != &tclListType)
         4771  +		&& !TclHasIntRep(value2Ptr, &tclListType)
  4772   4772   		&& (TclGetIntForIndexM(NULL, value2Ptr, objc-1,
  4773   4773   			&index) == TCL_OK)) {
  4774   4774   	    TclDecrRefCount(value2Ptr);
  4775   4775   	    tosPtr--;
  4776   4776   	    pcAdjustment = 1;
  4777   4777   	    goto lindexFastPath;
  4778   4778   	}
................................................................................
  5211   5211   	} else if (TclIsPureByteArray(valuePtr)) {
  5212   5212   	    objResultPtr = Tcl_NewByteArrayObj(
  5213   5213   		    Tcl_GetByteArrayFromObj(valuePtr, NULL)+index, 1);
  5214   5214   	} else if (valuePtr->bytes && length == valuePtr->length) {
  5215   5215   	    objResultPtr = Tcl_NewStringObj((const char *)
  5216   5216   		    valuePtr->bytes+index, 1);
  5217   5217   	} else {
  5218         -	    char buf[4];
         5218  +	    char buf[4] = "";
  5219   5219   	    int ch = Tcl_GetUniChar(valuePtr, index);
  5220   5220   
  5221   5221   	    /*
  5222   5222   	     * This could be: Tcl_NewUnicodeObj((const Tcl_UniChar *)&ch, 1)
  5223   5223   	     * but creating the object as a string seems to be faster in
  5224   5224   	     * practical use.
  5225   5225   	     */
  5226   5226   	    if (ch == -1) {
  5227   5227   		objResultPtr = Tcl_NewObj();
  5228   5228   	    } else {
  5229   5229   		length = Tcl_UniCharToUtf(ch, buf);
  5230         -		if (!length) {
  5231         -		    length = Tcl_UniCharToUtf(-1, buf);
         5230  +		if ((ch >= 0xD800) && (length < 3)) {
         5231  +		    length += Tcl_UniCharToUtf(-1, buf + length);
  5232   5232   		}
  5233   5233   		objResultPtr = Tcl_NewStringObj(buf, length);
  5234   5234   	    }
  5235   5235   	}
  5236   5236   
  5237   5237   	TRACE_APPEND(("\"%s\"\n", O2S(objResultPtr)));
  5238   5238   	NEXT_INST_F(1, 2, 1);
................................................................................
  5482   5482   	value2Ptr = OBJ_UNDER_TOS;	/* Pattern */
  5483   5483   
  5484   5484   	/*
  5485   5485   	 * Check that at least one of the objects is Unicode before promoting
  5486   5486   	 * both.
  5487   5487   	 */
  5488   5488   
  5489         -	if ((valuePtr->typePtr == &tclStringType)
  5490         -		|| (value2Ptr->typePtr == &tclStringType)) {
         5489  +	if (TclHasIntRep(valuePtr, &tclStringType)
         5490  +		|| TclHasIntRep(value2Ptr, &tclStringType)) {
  5491   5491   	    Tcl_UniChar *ustring1, *ustring2;
  5492   5492   
  5493   5493   	    ustring1 = Tcl_GetUnicodeFromObj(valuePtr, &length);
  5494   5494   	    ustring2 = Tcl_GetUnicodeFromObj(value2Ptr, &length2);
  5495   5495   	    match = TclUniCharMatch(ustring1, length, ustring2, length2,
  5496   5496   		    nocase);
  5497   5497   	} else if (TclIsPureByteArray(valuePtr) && !nocase) {
................................................................................
  6289   6289       /*
  6290   6290        *	   End of numeric operator instructions.
  6291   6291        * -----------------------------------------------------------------
  6292   6292        */
  6293   6293   
  6294   6294       case INST_TRY_CVT_TO_BOOLEAN:
  6295   6295   	valuePtr = OBJ_AT_TOS;
  6296         -	if (valuePtr->typePtr == &tclBooleanType) {
         6296  +	if (TclHasIntRep(valuePtr,  &tclBooleanType)) {
  6297   6297   	    objResultPtr = TCONST(1);
  6298   6298   	} else {
  6299   6299   	    int result = (TclSetBooleanFromAny(NULL, valuePtr) == TCL_OK);
  6300   6300   	    objResultPtr = TCONST(result);
  6301   6301   	}
  6302   6302   	TRACE_WITH_OBJ(("\"%.30s\" => ", O2S(valuePtr)), objResultPtr);
  6303   6303   	NEXT_INST_F(1, 0, 1);
................................................................................
  7104   7104   	    TclNewObj(statePtr);
  7105   7105   	    ir.twoPtrValue.ptr1 = searchPtr;
  7106   7106   	    ir.twoPtrValue.ptr2 = dictPtr;
  7107   7107   	    Tcl_StoreIntRep(statePtr, &dictIteratorType, &ir);
  7108   7108   	}
  7109   7109   	varPtr = LOCAL(opnd);
  7110   7110   	if (varPtr->value.objPtr) {
  7111         -	    if (varPtr->value.objPtr->typePtr == &dictIteratorType) {
         7111  +	    if (TclHasIntRep(varPtr->value.objPtr, &dictIteratorType)) {
  7112   7112   		Tcl_Panic("mis-issued dictFirst!");
  7113   7113   	    }
  7114   7114   	    TclDecrRefCount(varPtr->value.objPtr);
  7115   7115   	}
  7116   7116   	varPtr->value.objPtr = statePtr;
  7117   7117   	Tcl_IncrRefCount(statePtr);
  7118   7118   	goto pushDictIteratorResult;
................................................................................
  7981   7981   		/*
  7982   7982   		 * Force Tcl's integer division rules.
  7983   7983   		 * TODO: examine for logic simplification
  7984   7984   		 */
  7985   7985   
  7986   7986   		if (((wQuotient < (Tcl_WideInt) 0)
  7987   7987   			|| ((wQuotient == (Tcl_WideInt) 0)
  7988         -			&& ((w1 < (Tcl_WideInt)0 && w2 > (Tcl_WideInt)0)
  7989         -			|| (w1 > (Tcl_WideInt)0 && w2 < (Tcl_WideInt)0))))
         7988  +			&& ((w1 < 0 && w2 > 0)
         7989  +			|| (w1 > 0 && w2 < 0))))
  7990   7990   			&& (wQuotient * w2 != w1)) {
  7991   7991   		    wQuotient -= (Tcl_WideInt) 1;
  7992   7992   		}
  7993   7993   		wRemainder = w1 - w2*wQuotient;
  7994   7994   		WIDE_RESULT(wRemainder);
  7995   7995   	    }
  7996   7996   
................................................................................
  8016   8016   	    return NULL;
  8017   8017   	}
  8018   8018   	Tcl_GetBignumFromObj(NULL, valuePtr, &big1);
  8019   8019   	Tcl_GetBignumFromObj(NULL, value2Ptr, &big2);
  8020   8020   	mp_init(&bigResult);
  8021   8021   	mp_init(&bigRemainder);
  8022   8022   	mp_div(&big1, &big2, &bigResult, &bigRemainder);
  8023         -	if (!mp_iszero(&bigRemainder) && (bigRemainder.sign != big2.sign)) {
         8023  +	if ((bigRemainder.used != 0) && (bigRemainder.sign != big2.sign)) {
  8024   8024   	    /*
  8025   8025   	     * Convert to Tcl's integer division rules.
  8026   8026   	     */
  8027   8027   
  8028   8028   	    mp_sub_d(&bigResult, 1, &bigResult);
  8029   8029   	    mp_add(&bigRemainder, &big2, &bigRemainder);
  8030   8030   	}
................................................................................
  8038   8038       case INST_RSHIFT: {
  8039   8039   	/*
  8040   8040   	 * Reject negative shift argument.
  8041   8041   	 */
  8042   8042   
  8043   8043   	switch (type2) {
  8044   8044   	case TCL_NUMBER_INT:
  8045         -	    invalid = (*((const Tcl_WideInt *)ptr2) < (Tcl_WideInt)0);
         8045  +	    invalid = (*((const Tcl_WideInt *)ptr2) < 0);
  8046   8046   	    break;
  8047   8047   	case TCL_NUMBER_BIG:
  8048   8048   	    Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2);
  8049         -	    invalid = mp_isneg(&big2);
         8049  +	    invalid = big2.sign != MP_ZPOS;
  8050   8050   	    mp_clear(&big2);
  8051   8051   	    break;
  8052   8052   	default:
  8053   8053   	    /* Unused, here to silence compiler warning */
  8054   8054   	    invalid = 0;
  8055   8055   	}
  8056   8056   	if (invalid) {
................................................................................
  8059   8059   	    return GENERAL_ARITHMETIC_ERROR;
  8060   8060   	}
  8061   8061   
  8062   8062   	/*
  8063   8063   	 * Zero shifted any number of bits is still zero.
  8064   8064   	 */
  8065   8065   
  8066         -	if ((type1==TCL_NUMBER_INT) && (*((const Tcl_WideInt *)ptr1) == (Tcl_WideInt)0)) {
         8066  +	if ((type1==TCL_NUMBER_INT) && (*((const Tcl_WideInt *)ptr1) == 0)) {
  8067   8067   	    return constants[0];
  8068   8068   	}
  8069   8069   
  8070   8070   	if (opcode == INST_LSHIFT) {
  8071   8071   	    /*
  8072   8072   	     * Large left shifts create integer overflow.
  8073   8073   	     *
................................................................................
  8117   8117   		 * not take us to the result of 0 or -1, but since we're using
  8118   8118   		 * mp_div_2d to do the work, and it takes only an int
  8119   8119   		 * argument, we draw the line there.
  8120   8120   		 */
  8121   8121   
  8122   8122   		switch (type1) {
  8123   8123   		case TCL_NUMBER_INT:
  8124         -		    zero = (*(const Tcl_WideInt *)ptr1 > (Tcl_WideInt)0);
         8124  +		    zero = (*(const Tcl_WideInt *)ptr1 > 0);
  8125   8125   		    break;
  8126   8126   		case TCL_NUMBER_BIG:
  8127   8127   		    Tcl_TakeBignumFromObj(NULL, valuePtr, &big1);
  8128         -		    zero = (!mp_isneg(&big1));
         8128  +		    zero = (big1.sign == MP_ZPOS);
  8129   8129   		    mp_clear(&big1);
  8130   8130   		    break;
  8131   8131   		default:
  8132   8132   		    /* Unused, here to silence compiler warning. */
  8133   8133   		    zero = 0;
  8134   8134   		}
  8135   8135   		if (zero) {
................................................................................
  8142   8142   	    /*
  8143   8143   	     * Handle shifts within the native wide range.
  8144   8144   	     */
  8145   8145   
  8146   8146   	    if (type1 == TCL_NUMBER_INT) {
  8147   8147   		w1 = *(const Tcl_WideInt *)ptr1;
  8148   8148   		if ((size_t)shift >= CHAR_BIT*sizeof(Tcl_WideInt)) {
  8149         -		    if (w1 >= (Tcl_WideInt)0) {
         8149  +		    if (w1 >= 0) {
  8150   8150   			return constants[0];
  8151   8151   		    }
  8152   8152   		    WIDE_RESULT(-1);
  8153   8153   		}
  8154   8154   		WIDE_RESULT(w1 >> shift);
  8155   8155   	    }
  8156   8156   	}
................................................................................
  8245   8245   		return NULL;
  8246   8246   	    }
  8247   8247   
  8248   8248   	    negativeExponent = (w2 < 0);
  8249   8249   	    oddExponent = (int) (w2 & (Tcl_WideInt)1);
  8250   8250   	} else {
  8251   8251   	    Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2);
  8252         -	    negativeExponent = mp_isneg(&big2);
         8252  +	    negativeExponent = big2.sign != MP_ZPOS;
  8253   8253   	    mp_mod_2d(&big2, 1, &big2);
  8254         -	    oddExponent = !mp_iszero(&big2);
         8254  +	    oddExponent = big2.used != 0;
  8255   8255   	    mp_clear(&big2);
  8256   8256   	}
  8257   8257   
  8258   8258   	if (type1 == TCL_NUMBER_INT) {
  8259   8259   	    w1 = *((const Tcl_WideInt *)ptr1);
  8260   8260   
  8261   8261   	    if (negativeExponent) {
................................................................................
  8396   8396   		wResult = oddExponent ? -Exp64Value[base] : Exp64Value[base];
  8397   8397   		WIDE_RESULT(wResult);
  8398   8398   	    }
  8399   8399   	}
  8400   8400   
  8401   8401       overflowExpon:
  8402   8402   	Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2);
  8403         -	if (big2.used > 1) {
         8403  +	if ((big2.used > 1)
         8404  +#if DIGIT_BIT > 28
         8405  +		|| ((big2.used == 1) && (big2.dp[0] >= (1<<28)))
         8406  +#endif
         8407  +	) {
  8404   8408   	    mp_clear(&big2);
  8405   8409   	    Tcl_SetObjResult(interp, Tcl_NewStringObj(
  8406   8410   		    "exponent too large", -1));
  8407   8411   	    return GENERAL_ARITHMETIC_ERROR;
  8408   8412   	}
  8409   8413   	Tcl_TakeBignumFromObj(NULL, valuePtr, &big1);
  8410   8414   	mp_init(&bigResult);
................................................................................
  8564   8568   	case INST_SUB:
  8565   8569   	    mp_sub(&big1, &big2, &bigResult);
  8566   8570   	    break;
  8567   8571   	case INST_MULT:
  8568   8572   	    mp_mul(&big1, &big2, &bigResult);
  8569   8573   	    break;
  8570   8574   	case INST_DIV:
  8571         -	    if (mp_iszero(&big2)) {
         8575  +	    if (big2.used == 0) {
  8572   8576   		mp_clear(&big1);
  8573   8577   		mp_clear(&big2);
  8574   8578   		mp_clear(&bigResult);
  8575   8579   		return DIVIDED_BY_ZERO;
  8576   8580   	    }
  8577   8581   	    mp_init(&bigRemainder);
  8578   8582   	    mp_div(&big1, &big2, &bigResult, &bigRemainder);
  8579   8583   	    /* TODO: internals intrusion */
  8580         -	    if (!mp_iszero(&bigRemainder)
         8584  +	    if ((bigRemainder.used != 0)
  8581   8585   		    && (bigRemainder.sign != big2.sign)) {
  8582   8586   		/*
  8583   8587   		 * Convert to Tcl's integer division rules.
  8584   8588   		 */
  8585   8589   
  8586   8590   		mp_sub_d(&bigResult, 1, &bigResult);
  8587   8591   		mp_add(&bigRemainder, &big2, &bigRemainder);
................................................................................
  8720   8724   	    if (d2 > (double)WIDE_MAX) {
  8721   8725   		return MP_LT;
  8722   8726   	    }
  8723   8727   	    w2 = (Tcl_WideInt) d2;
  8724   8728   	    goto wideCompare;
  8725   8729   	case TCL_NUMBER_BIG:
  8726   8730   	    Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2);
  8727         -	    if (mp_isneg(&big2)) {
         8731  +	    if (big2.sign != MP_ZPOS) {
  8728   8732   		compare = MP_GT;
  8729   8733   	    } else {
  8730   8734   		compare = MP_LT;
  8731   8735   	    }
  8732   8736   	    mp_clear(&big2);
  8733   8737   	    return compare;
  8734   8738   	}
................................................................................
  8757   8761   	    goto wideCompare;
  8758   8762   	case TCL_NUMBER_BIG:
  8759   8763   	    if (TclIsInfinite(d1)) {
  8760   8764   		return (d1 > 0.0) ? MP_GT : MP_LT;
  8761   8765   	    }
  8762   8766   	    Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2);
  8763   8767   	    if ((d1 < (double)WIDE_MAX) && (d1 > (double)WIDE_MIN)) {
  8764         -		if (mp_isneg(&big2)) {
         8768  +		if (big2.sign != MP_ZPOS) {
  8765   8769   		    compare = MP_GT;
  8766   8770   		} else {
  8767   8771   		    compare = MP_LT;
  8768   8772   		}
  8769   8773   		mp_clear(&big2);
  8770   8774   		return compare;
  8771   8775   	    }
................................................................................
  9618   9622       objBytesIfUnshared = 0.0;
  9619   9623       strBytesIfUnshared = 0.0;
  9620   9624       strBytesSharedMultX = 0.0;
  9621   9625       strBytesSharedOnce = 0.0;
  9622   9626       for (i = 0;  i < globalTablePtr->numBuckets;  i++) {
  9623   9627   	for (entryPtr = globalTablePtr->buckets[i];  entryPtr != NULL;
  9624   9628   		entryPtr = entryPtr->nextPtr) {
  9625         -	    if (entryPtr->objPtr->typePtr == &tclByteCodeType) {
         9629  +	    if (TclHasIntRep(entryPtr->objPtr, &tclByteCodeType)) {
  9626   9630   		numByteCodeLits++;
  9627   9631   	    }
  9628   9632   	    (void) TclGetStringFromObj(entryPtr->objPtr, &length);
  9629   9633   	    refCountSum += entryPtr->refCount;
  9630   9634   	    objBytesIfUnshared += (entryPtr->refCount * sizeof(Tcl_Obj));
  9631   9635   	    strBytesIfUnshared += (entryPtr->refCount * (length+1));
  9632   9636   	    if (entryPtr->refCount > 1) {

Changes to generic/tclFileName.c.

   594    594        * list in, piece by piece.
   595    595        */
   596    596   
   597    597       p = (char *) &(*argvPtr)[(*argcPtr) + 1];
   598    598       for (i = 0; i < *argcPtr; i++) {
   599    599   	Tcl_ListObjIndex(NULL, resultPtr, i, &eltPtr);
   600    600   	str = TclGetStringFromObj(eltPtr, &len);
   601         -	memcpy(p, str, (size_t) len+1);
          601  +	memcpy(p, str, len+1);
   602    602   	p += len+1;
   603    603       }
   604    604   
   605    605       /*
   606    606        * Now set up the argv pointers.
   607    607        */
   608    608   
................................................................................
  2544   2544    *---------------------------------------------------------------------------
  2545   2545    */
  2546   2546   
  2547   2547   unsigned
  2548   2548   Tcl_GetFSDeviceFromStat(
  2549   2549       const Tcl_StatBuf *statPtr)
  2550   2550   {
  2551         -    return (unsigned) statPtr->st_dev;
         2551  +    return statPtr->st_dev;
  2552   2552   }
  2553   2553   
  2554   2554   unsigned
  2555   2555   Tcl_GetFSInodeFromStat(
  2556   2556       const Tcl_StatBuf *statPtr)
  2557   2557   {
  2558         -    return (unsigned) statPtr->st_ino;
         2558  +    return statPtr->st_ino;
  2559   2559   }
  2560   2560   
  2561   2561   unsigned
  2562   2562   Tcl_GetModeFromStat(
  2563   2563       const Tcl_StatBuf *statPtr)
  2564   2564   {
  2565         -    return (unsigned) statPtr->st_mode;
         2565  +    return statPtr->st_mode;
  2566   2566   }
  2567   2567   
  2568   2568   int
  2569   2569   Tcl_GetLinkCountFromStat(
  2570   2570       const Tcl_StatBuf *statPtr)
  2571   2571   {
  2572   2572       return (int)statPtr->st_nlink;
................................................................................
  2635   2635   }
  2636   2636   
  2637   2637   unsigned
  2638   2638   Tcl_GetBlockSizeFromStat(
  2639   2639       const Tcl_StatBuf *statPtr)
  2640   2640   {
  2641   2641   #ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
  2642         -    return (unsigned) statPtr->st_blksize;
         2642  +    return statPtr->st_blksize;
  2643   2643   #else
  2644   2644       /*
  2645   2645        * Not a great guess, but will do...
  2646   2646        */
  2647   2647   
  2648   2648       return GUESSED_BLOCK_SIZE;
  2649   2649   #endif

Changes to generic/tclHash.c.

  1011   1011       /*
  1012   1012        * Allocate and initialize the new bucket array, and set up hashing
  1013   1013        * constants for new array size.
  1014   1014        */
  1015   1015   
  1016   1016       tablePtr->numBuckets *= 4;
  1017   1017       if (typePtr->flags & TCL_HASH_KEY_SYSTEM_HASH) {
  1018         -	tablePtr->buckets = (Tcl_HashEntry **) TclpSysAlloc((unsigned)
  1019         -		(tablePtr->numBuckets * sizeof(Tcl_HashEntry *)), 0);
         1018  +	tablePtr->buckets = (Tcl_HashEntry **) TclpSysAlloc(
         1019  +		tablePtr->numBuckets * sizeof(Tcl_HashEntry *), 0);
  1020   1020       } else {
  1021   1021   	tablePtr->buckets =
  1022   1022   		ckalloc(tablePtr->numBuckets * sizeof(Tcl_HashEntry *));
  1023   1023       }
  1024   1024       for (count = tablePtr->numBuckets, newChainPtr = tablePtr->buckets;
  1025   1025   	    count > 0; count--, newChainPtr++) {
  1026   1026   	*newChainPtr = NULL;

Changes to generic/tclIO.c.

  4316   4316   	}
  4317   4317   	if (saved) {
  4318   4318   	    /*
  4319   4319   	     * Here's some translated bytes left over from the last buffer
  4320   4320   	     * that we need to stick at the beginning of this buffer.
  4321   4321   	     */
  4322   4322   
  4323         -	    memcpy(InsertPoint(bufPtr), safe, (size_t) saved);
         4323  +	    memcpy(InsertPoint(bufPtr), safe, saved);
  4324   4324   	    bufPtr->nextAdded += saved;
  4325   4325   	    saved = 0;
  4326   4326   	}
  4327   4327   	PreserveChannelBuffer(bufPtr);
  4328   4328   	dst = InsertPoint(bufPtr);
  4329   4329   	dstLen = SpaceLeft(bufPtr);
  4330   4330   
................................................................................
  4404   4404   	     * the translation to produce a character that crossed the end of
  4405   4405   	     * the output buffer, so that we would get a completely full
  4406   4406   	     * buffer before flushing it. The extra bytes will be moved to the
  4407   4407   	     * beginning of the next buffer.
  4408   4408   	     */
  4409   4409   
  4410   4410   	    saved = -SpaceLeft(bufPtr);
  4411         -	    memcpy(safe, dst + dstLen, (size_t) saved);
         4411  +	    memcpy(safe, dst + dstLen, saved);
  4412   4412   	    bufPtr->nextAdded = bufPtr->bufLength;
  4413   4413   	}
  4414   4414   
  4415   4415   	if ((srcLen + saved == 0) && (result == TCL_OK)) {
  4416   4416   	    endEncoding = 0;
  4417   4417   	}
  4418   4418   
................................................................................
  5082   5082   	/*
  5083   5083   	 * Copy bytes from the channel buffer to the ByteArray. This may
  5084   5084   	 * realloc space, so keep track of result.
  5085   5085   	 */
  5086   5086   
  5087   5087   	rawLen = dstEnd - dst;
  5088   5088   	byteArray = Tcl_SetByteArrayLength(objPtr, byteLen + rawLen);
  5089         -	memcpy(byteArray + byteLen, dst, (size_t) rawLen);
         5089  +	memcpy(byteArray + byteLen, dst, rawLen);
  5090   5090   	byteLen += rawLen;
  5091   5091       }
  5092   5092   
  5093   5093       /*
  5094   5094        * Found EOL or EOF, but the output buffer may now contain too many bytes.
  5095   5095        * We need to know how many bytes correspond to the number we want, so we
  5096   5096        * can remove the correct number of bytes from the channel buffer.
................................................................................
  5099   5099     gotEOL:
  5100   5100       if (bufPtr == NULL) {
  5101   5101   	Tcl_Panic("TclGetsObjBinary: gotEOL reached with bufPtr==NULL");
  5102   5102       }
  5103   5103   
  5104   5104       rawLen = eol - dst;
  5105   5105       byteArray = Tcl_SetByteArrayLength(objPtr, byteLen + rawLen);
  5106         -    memcpy(byteArray + byteLen, dst, (size_t) rawLen);
         5106  +    memcpy(byteArray + byteLen, dst, rawLen);
  5107   5107       byteLen += rawLen;
  5108   5108       bufPtr->nextRemoved += rawLen + skip;
  5109   5109   
  5110   5110       /*
  5111   5111        * Convert the buffer if there was an encoding.
  5112   5112        * XXX - unimplemented.
  5113   5113        */
................................................................................
  5650   5650   	int toCopy = (bytesInBuffer < bytesToRead) ? bytesInBuffer
  5651   5651   		: bytesToRead;
  5652   5652   
  5653   5653   	/*
  5654   5654            * Copy the current chunk into the read buffer.
  5655   5655            */
  5656   5656   
  5657         -	memcpy(readBuf, RemovePoint(bufPtr), (size_t) toCopy);
         5657  +	memcpy(readBuf, RemovePoint(bufPtr), toCopy);
  5658   5658   	bufPtr->nextRemoved += toCopy;
  5659   5659   	copied += toCopy;
  5660   5660   	readBuf += toCopy;
  5661   5661   	bytesToRead -= toCopy;
  5662   5662   
  5663   5663   	/*
  5664   5664            * If the current buffer is empty recycle it.
................................................................................
  6212   6212   		{
  6213   6213   		    /*
  6214   6214   		     * There are chars leading the buffer before the eof char.
  6215   6215   		     * Adjust the dstLimit so we go back and read only those
  6216   6216   		     * and do not encounter the eof char this time.
  6217   6217   		     */
  6218   6218   
  6219         -		    dstLimit = dstRead - 1 + TCL_UTF_MAX;
         6219  +		    dstLimit = dstRead + (TCL_UTF_MAX - 1);
  6220   6220   		    statePtr->flags = savedFlags;
  6221   6221   		    statePtr->inputEncodingFlags = savedIEFlags;
  6222   6222   		    statePtr->inputEncodingState = savedState;
  6223   6223   		    continue;
  6224   6224   		}
  6225   6225   	    }
  6226   6226   
................................................................................
  6237   6237   		/*
  6238   6238   		 * There are chars we can read before we hit the bare CR.  Go
  6239   6239   		 * back with a smaller dstLimit so we get them in the next
  6240   6240   		 * pass, compute a matching srcRead, and don't end up back
  6241   6241   		 * here in this call.
  6242   6242   		 */
  6243   6243   
  6244         -		dstLimit = dstRead - 1 + TCL_UTF_MAX;
         6244  +		dstLimit = dstRead + (TCL_UTF_MAX - 1);
  6245   6245   		statePtr->flags = savedFlags;
  6246   6246   		statePtr->inputEncodingFlags = savedIEFlags;
  6247   6247   		statePtr->inputEncodingState = savedState;
  6248   6248   		continue;
  6249   6249   	    }
  6250   6250   
  6251   6251   	    assert(dstWrote == 0);
................................................................................
  6330   6330   	     * TODO: This cannot happen anymore.
  6331   6331   	     *
  6332   6332   	     * We read more chars than allowed.  Reset limits to prevent that
  6333   6333   	     * and try again.  Don't forget the extra padding of TCL_UTF_MAX
  6334   6334   	     * bytes demanded by the Tcl_ExternalToUtf() call!
  6335   6335   	     */
  6336   6336   
  6337         -	    dstLimit = Tcl_UtfAtIndex(dst, charsToRead) - 1 + TCL_UTF_MAX - dst;
         6337  +	    dstLimit = Tcl_UtfAtIndex(dst, charsToRead) - dst + (TCL_UTF_MAX - 1);
  6338   6338   	    statePtr->flags = savedFlags;
  6339   6339   	    statePtr->inputEncodingFlags = savedIEFlags;
  6340   6340   	    statePtr->inputEncodingState = savedState;
  6341   6341   	    continue;
  6342   6342   	}
  6343   6343   
  6344   6344   	if (dstWrote == 0) {
................................................................................
  6398   6398   	     */
  6399   6399   
  6400   6400   	    if (nextPtr->nextRemoved - srcLen < 0) {
  6401   6401   		Tcl_Panic("Buffer Underflow, BUFFER_PADDING not enough");
  6402   6402   	    }
  6403   6403   
  6404   6404   	    nextPtr->nextRemoved -= srcLen;
  6405         -	    memcpy(RemovePoint(nextPtr), src, (size_t) srcLen);
         6405  +	    memcpy(RemovePoint(nextPtr), src, srcLen);
  6406   6406   	    RecycleBuffer(statePtr, bufPtr, 0);
  6407   6407   	    statePtr->inQueueHead = nextPtr;
  6408   6408   	    Tcl_SetObjLength(objPtr, numBytes);
  6409   6409   	    return ReadChars(statePtr, objPtr, charsToRead, factorPtr);
  6410   6410   	}
  6411   6411   
  6412   6412   	statePtr->inputEncodingFlags &= ~TCL_ENCODING_START;
................................................................................
  6504   6504   	}
  6505   6505       }
  6506   6506   
  6507   6507       switch (statePtr->inputTranslation) {
  6508   6508       case TCL_TRANSLATE_LF:
  6509   6509       case TCL_TRANSLATE_CR:
  6510   6510   	if (dstStart != srcStart) {
  6511         -	    memcpy(dstStart, srcStart, (size_t) srcLen);
         6511  +	    memcpy(dstStart, srcStart, srcLen);
  6512   6512   	}
  6513   6513   	if (statePtr->inputTranslation == TCL_TRANSLATE_CR) {
  6514   6514   	    char *dst = dstStart;
  6515   6515   	    char *dstEnd = dstStart + srcLen;
  6516   6516   
  6517   6517   	    while ((dst = memchr(dst, '\r', dstEnd - dst))) {
  6518   6518   		*dst++ = '\n';
................................................................................
  6661   6661   	statePtr->inputEncodingFlags |= TCL_ENCODING_START;
  6662   6662       }
  6663   6663       ResetFlag(statePtr,
  6664   6664   	    CHANNEL_BLOCKED | CHANNEL_STICKY_EOF | CHANNEL_EOF | INPUT_SAW_CR);
  6665   6665       statePtr->inputEncodingFlags &= ~TCL_ENCODING_END;
  6666   6666   
  6667   6667       bufPtr = AllocChannelBuffer(len);
  6668         -    memcpy(InsertPoint(bufPtr), str, (size_t) len);
         6668  +    memcpy(InsertPoint(bufPtr), str, len);
  6669   6669       bufPtr->nextAdded += len;
  6670   6670   
  6671   6671       if (statePtr->inQueueHead == NULL) {
  6672   6672   	bufPtr->nextPtr = NULL;
  6673   6673   	statePtr->inQueueHead = bufPtr;
  6674   6674   	statePtr->inQueueTail = bufPtr;
  6675   6675       } else if (atEnd) {

Changes to generic/tclIOCmd.c.

   948    948   
   949    949       /*
   950    950        * Create the string argument array "argv". Make sure argv is large enough
   951    951        * to hold the argc arguments plus 1 extra for the zero end-of-argv word.
   952    952        */
   953    953   
   954    954       argc = objc - skip;
   955         -    argv = TclStackAlloc(interp, (unsigned)(argc + 1) * sizeof(char *));
          955  +    argv = TclStackAlloc(interp, (argc + 1) * sizeof(char *));
   956    956   
   957    957       /*
   958    958        * Copy the string conversions of each (post option) object into the
   959    959        * argument vector.
   960    960        */
   961    961   
   962    962       for (i = 0; i < argc; i++) {

Changes to generic/tclIORChan.c.

  1322   1322   	SetChannelErrorStr(rcPtr->chan, msg_read_toomuch);
  1323   1323           goto invalid;
  1324   1324       }
  1325   1325   
  1326   1326       *errorCodePtr = EOK;
  1327   1327   
  1328   1328       if (bytec > 0) {
  1329         -	memcpy(buf, bytev, (size_t) bytec);
         1329  +	memcpy(buf, bytev, bytec);
  1330   1330       }
  1331   1331   
  1332   1332    stop:
  1333   1333       Tcl_DecrRefCount(toReadObj);
  1334   1334       Tcl_DecrRefCount(resObj);		/* Remove reference held from invoke */
  1335   1335       Tcl_Release(rcPtr);
  1336   1336       return bytec;
................................................................................
  3004   3004   	    bytev = Tcl_GetByteArrayFromObj(resObj, &bytec);
  3005   3005   
  3006   3006   	    if (paramPtr->input.toRead < bytec) {
  3007   3007   		ForwardSetStaticError(paramPtr, msg_read_toomuch);
  3008   3008   		paramPtr->input.toRead = -1;
  3009   3009   	    } else {
  3010   3010   		if (bytec > 0) {
  3011         -		    memcpy(paramPtr->input.buf, bytev, (size_t) bytec);
         3011  +		    memcpy(paramPtr->input.buf, bytev, bytec);
  3012   3012   		}
  3013   3013   		paramPtr->input.toRead = bytec;
  3014   3014   	    }
  3015   3015   	}
  3016   3016           Tcl_Release(rcPtr);
  3017   3017           Tcl_DecrRefCount(toReadObj);
  3018   3018   	break;
................................................................................
  3294   3294       Tcl_Obj *obj)
  3295   3295   {
  3296   3296       int len;
  3297   3297       const char *msgStr = TclGetStringFromObj(obj, &len);
  3298   3298   
  3299   3299       len++;
  3300   3300       ForwardSetDynamicError(paramPtr, ckalloc(len));
  3301         -    memcpy(paramPtr->base.msgStr, msgStr, (unsigned) len);
         3301  +    memcpy(paramPtr->base.msgStr, msgStr, len);
  3302   3302   }
  3303   3303   #endif
  3304   3304   
  3305   3305   /*
  3306   3306    * Local Variables:
  3307   3307    * mode: c
  3308   3308    * c-basic-offset: 4
  3309   3309    * fill-column: 78
  3310   3310    * tab-width: 8
  3311   3311    * indent-tabs-mode: nil
  3312   3312    * End:
  3313   3313    */

Changes to generic/tclIORTrans.c.

  2603   2603   
  2604   2604   	    bytev = Tcl_GetByteArrayFromObj(resObj, &bytec);
  2605   2605   
  2606   2606   	    paramPtr->transform.size = bytec;
  2607   2607   
  2608   2608   	    if (bytec > 0) {
  2609   2609   		paramPtr->transform.buf = ckalloc(bytec);
  2610         -		memcpy(paramPtr->transform.buf, bytev, (size_t)bytec);
         2610  +		memcpy(paramPtr->transform.buf, bytev, bytec);
  2611   2611   	    } else {
  2612   2612   		paramPtr->transform.buf = NULL;
  2613   2613   	    }
  2614   2614   	}
  2615   2615   
  2616   2616   	Tcl_DecrRefCount(bufObj);
  2617   2617   	break;
................................................................................
  2637   2637   
  2638   2638   	    bytev = Tcl_GetByteArrayFromObj(resObj, &bytec);
  2639   2639   
  2640   2640   	    paramPtr->transform.size = bytec;
  2641   2641   
  2642   2642   	    if (bytec > 0) {
  2643   2643   		paramPtr->transform.buf = ckalloc(bytec);
  2644         -		memcpy(paramPtr->transform.buf, bytev, (size_t)bytec);
         2644  +		memcpy(paramPtr->transform.buf, bytev, bytec);
  2645   2645   	    } else {
  2646   2646   		paramPtr->transform.buf = NULL;
  2647   2647   	    }
  2648   2648   	}
  2649   2649   
  2650   2650   	Tcl_DecrRefCount(bufObj);
  2651   2651   	break;
................................................................................
  2666   2666   
  2667   2667   	    bytev = Tcl_GetByteArrayFromObj(resObj, &bytec);
  2668   2668   
  2669   2669   	    paramPtr->transform.size = bytec;
  2670   2670   
  2671   2671   	    if (bytec > 0) {
  2672   2672   		paramPtr->transform.buf = ckalloc(bytec);
  2673         -		memcpy(paramPtr->transform.buf, bytev, (size_t)bytec);
         2673  +		memcpy(paramPtr->transform.buf, bytev, bytec);
  2674   2674   	    } else {
  2675   2675   		paramPtr->transform.buf = NULL;
  2676   2676   	    }
  2677   2677   	}
  2678   2678   	break;
  2679   2679   
  2680   2680       case ForwardedFlush:
................................................................................
  2693   2693   
  2694   2694   	    bytev = Tcl_GetByteArrayFromObj(resObj, &bytec);
  2695   2695   
  2696   2696   	    paramPtr->transform.size = bytec;
  2697   2697   
  2698   2698   	    if (bytec > 0) {
  2699   2699   		paramPtr->transform.buf = ckalloc(bytec);
  2700         -		memcpy(paramPtr->transform.buf, bytev, (size_t)bytec);
         2700  +		memcpy(paramPtr->transform.buf, bytev, bytec);
  2701   2701   	    } else {
  2702   2702   		paramPtr->transform.buf = NULL;
  2703   2703   	    }
  2704   2704   	}
  2705   2705   	break;
  2706   2706   
  2707   2707       case ForwardedClear:
................................................................................
  2806   2806       Tcl_Obj *obj)
  2807   2807   {
  2808   2808       int len;
  2809   2809       const char *msgStr = TclGetStringFromObj(obj, &len);
  2810   2810   
  2811   2811       len++;
  2812   2812       ForwardSetDynamicError(paramPtr, ckalloc(len));
  2813         -    memcpy(paramPtr->base.msgStr, msgStr, (unsigned) len);
         2813  +    memcpy(paramPtr->base.msgStr, msgStr, len);
  2814   2814   }
  2815   2815   #endif /* TCL_THREADS */
  2816   2816   
  2817   2817   /*
  2818   2818    *----------------------------------------------------------------------
  2819   2819    *
  2820   2820    * TimerKill --

Changes to generic/tclIOUtil.c.

  4695   4695   
  4696   4696   /*
  4697   4697    *---------------------------------------------------------------------------
  4698   4698    *
  4699   4699    * Tcl_FSGetNativePath --
  4700   4700    *
  4701   4701    *	This function is for use by the Win/Unix native filesystems, so that
  4702         - *	they can easily retrieve the native (char* or TCHAR*) representation
         4702  + *	they can easily retrieve the native (char* or WCHAR*) representation
  4703   4703    *	of a path. Other filesystems will probably want to implement similar
  4704   4704    *	functions. They basically act as a safety net around
  4705   4705    *	Tcl_FSGetInternalRep. Normally your file-system functions will always
  4706   4706    *	be called with path objects already converted to the correct
  4707   4707    *	filesystem, but if for some reason they are called directly (i.e. by
  4708   4708    *	functions not in this file), then one cannot necessarily guarantee
  4709   4709    *	that the path object pointer is from the correct filesystem.

Changes to generic/tclIndexObj.c.

   974    974   	    } else {
   975    975   		elementStr = TclGetStringFromObj(origObjv[i], &elemLen);
   976    976   	    }
   977    977   	    flags = 0;
   978    978   	    len = TclScanElement(elementStr, elemLen, &flags);
   979    979   
   980    980   	    if (MAY_QUOTE_WORD && len != elemLen) {
   981         -		char *quotedElementStr = TclStackAlloc(interp,
   982         -			(unsigned)len + 1);
          981  +		char *quotedElementStr = TclStackAlloc(interp, len + 1);
   983    982   
   984    983   		len = TclConvertElement(elementStr, elemLen,
   985    984   			quotedElementStr, flags);
   986    985   		Tcl_AppendToObj(objPtr, quotedElementStr, len);
   987    986   		TclStackFree(interp, quotedElementStr);
   988    987   	    } else {
   989    988   		Tcl_AppendToObj(objPtr, elementStr, elemLen);
................................................................................
  1026   1025   	     */
  1027   1026   
  1028   1027   	    elementStr = TclGetStringFromObj(objv[i], &elemLen);
  1029   1028   	    flags = 0;
  1030   1029   	    len = TclScanElement(elementStr, elemLen, &flags);
  1031   1030   
  1032   1031   	    if (MAY_QUOTE_WORD && len != elemLen) {
  1033         -		char *quotedElementStr = TclStackAlloc(interp,
  1034         -			(unsigned) len + 1);
         1032  +		char *quotedElementStr = TclStackAlloc(interp, len + 1);
  1035   1033   
  1036   1034   		len = TclConvertElement(elementStr, elemLen,
  1037   1035   			quotedElementStr, flags);
  1038   1036   		Tcl_AppendToObj(objPtr, quotedElementStr, len);
  1039   1037   		TclStackFree(interp, quotedElementStr);
  1040   1038   	    } else {
  1041   1039   		Tcl_AppendToObj(objPtr, elementStr, elemLen);
................................................................................
  1460   1458       Tcl_Obj *value,
  1461   1459       int *codePtr)		/* Argument objects. */
  1462   1460   {
  1463   1461       static const char *const returnCodes[] = {
  1464   1462   	"ok", "error", "return", "break", "continue", NULL
  1465   1463       };
  1466   1464   
  1467         -    if ((value->typePtr != &indexType)
         1465  +    if (!TclHasIntRep(value, &indexType)
  1468   1466   	    && TclGetIntFromObj(NULL, value, codePtr) == TCL_OK) {
  1469   1467   	return TCL_OK;
  1470   1468       }
  1471   1469       if (Tcl_GetIndexFromObj(NULL, value, returnCodes, NULL, TCL_EXACT,
  1472   1470   	    codePtr) == TCL_OK) {
  1473   1471   	return TCL_OK;
  1474   1472       }

Changes to generic/tclInt.h.

  2744   2744   /*
  2745   2745    * Variables denoting the Tcl object types defined in the core.
  2746   2746    */
  2747   2747   
  2748   2748   MODULE_SCOPE const Tcl_ObjType tclBignumType;
  2749   2749   MODULE_SCOPE const Tcl_ObjType tclBooleanType;
  2750   2750   MODULE_SCOPE const Tcl_ObjType tclByteArrayType;
  2751         -MODULE_SCOPE const Tcl_ObjType tclPureByteArrayType;
  2752   2751   MODULE_SCOPE const Tcl_ObjType tclByteCodeType;
  2753   2752   MODULE_SCOPE const Tcl_ObjType tclDoubleType;
  2754   2753   MODULE_SCOPE const Tcl_ObjType tclIntType;
  2755   2754   MODULE_SCOPE const Tcl_ObjType tclListType;
  2756   2755   MODULE_SCOPE const Tcl_ObjType tclDictType;
  2757   2756   MODULE_SCOPE const Tcl_ObjType tclProcBodyType;
  2758   2757   MODULE_SCOPE const Tcl_ObjType tclStringType;
................................................................................
  2873   2872   				/* Procedure that unloads a loaded module */
  2874   2873   };
  2875   2874   
  2876   2875   /* Flags for conversion of doubles to digit strings */
  2877   2876   
  2878   2877   #define TCL_DD_SHORTEST 		0x4
  2879   2878   				/* Use the shortest possible string */
  2880         -#define TCL_DD_STEELE   		0x5
  2881         -				/* Use the original Steele&White algorithm */
  2882   2879   #define TCL_DD_E_FORMAT 		0x2
  2883   2880   				/* Use a fixed-length string of digits,
  2884   2881   				 * suitable for E format*/
  2885   2882   #define TCL_DD_F_FORMAT 		0x3
  2886   2883   				/* Use a fixed number of digits after the
  2887   2884   				 * decimal point, suitable for F format */
  2888   2885   
................................................................................
  2890   2887   				/* Allow return of a shorter digit string
  2891   2888   				 * if it converts losslessly */
  2892   2889   #define TCL_DD_NO_QUICK 		0x8
  2893   2890   				/* Debug flag: forbid quick FP conversion */
  2894   2891   
  2895   2892   #define TCL_DD_CONVERSION_TYPE_MASK	0x3
  2896   2893   				/* Mask to isolate the conversion type */
  2897         -#define TCL_DD_STEELE0 			0x1
  2898         -				/* 'Steele&White' after masking */
  2899         -#define TCL_DD_SHORTEST0		0x0
  2900         -				/* 'Shortest possible' after masking */
  2901   2894   
  2902   2895   /*
  2903   2896    *----------------------------------------------------------------
  2904   2897    * Procedures shared among Tcl modules but not used by the outside world:
  2905   2898    *----------------------------------------------------------------
  2906   2899    */
  2907   2900   
................................................................................
  3063   3056   MODULE_SCOPE int	TclInfoGlobalsCmd(ClientData dummy, Tcl_Interp *interp,
  3064   3057   			    int objc, Tcl_Obj *const objv[]);
  3065   3058   MODULE_SCOPE int	TclInfoLocalsCmd(ClientData dummy, Tcl_Interp *interp,
  3066   3059   			    int objc, Tcl_Obj *const objv[]);
  3067   3060   MODULE_SCOPE int	TclInfoVarsCmd(ClientData dummy, Tcl_Interp *interp,
  3068   3061   			    int objc, Tcl_Obj *const objv[]);
  3069   3062   MODULE_SCOPE void	TclInitAlloc(void);
  3070         -MODULE_SCOPE void	TclInitBignumFromLong(mp_int *, long);
  3071   3063   MODULE_SCOPE void	TclInitBignumFromWideInt(mp_int *, Tcl_WideInt);
  3072   3064   MODULE_SCOPE void	TclInitBignumFromWideUInt(mp_int *, Tcl_WideUInt);
  3073   3065   MODULE_SCOPE void	TclInitDbCkalloc(void);
  3074   3066   MODULE_SCOPE void	TclInitDoubleConversion(void);
  3075   3067   MODULE_SCOPE void	TclInitEmbeddedConfigurationInformation(
  3076   3068   			    Tcl_Interp *interp);
  3077   3069   MODULE_SCOPE void	TclInitEncodingSubsystem(void);
................................................................................
  3244   3236   			    const char *trim, int numTrim);
  3245   3237   MODULE_SCOPE int	TclTrimRight(const char *bytes, int numBytes,
  3246   3238   			    const char *trim, int numTrim);
  3247   3239   MODULE_SCOPE const char*TclGetCommandTypeName(Tcl_Command command);
  3248   3240   MODULE_SCOPE void	TclRegisterCommandTypeName(
  3249   3241   			    Tcl_ObjCmdProc *implementationProc,
  3250   3242   			    const char *nameStr);
         3243  +#if (TCL_UTF_MAX > 4) && (defined(__CYGWIN__) || defined(_WIN32))
         3244  +MODULE_SCOPE int TclUtfToWChar(const char *src, WCHAR *chPtr);
         3245  +MODULE_SCOPE char *	TclWCharToUtfDString(const WCHAR *uniStr,
         3246  +			    int uniLength, Tcl_DString *dsPtr);
         3247  +MODULE_SCOPE WCHAR * TclUtfToWCharDString(const char *src,
         3248  +			    int length, Tcl_DString *dsPtr);
         3249  +#else
         3250  +#   define TclUtfToWChar TclUtfToUniChar
         3251  +#   define TclWCharToUtfDString Tcl_UniCharToUtfDString
         3252  +#   define TclUtfToWCharDString Tcl_UtfToUniCharDString
         3253  +#endif
  3251   3254   MODULE_SCOPE int	TclUtfCmp(const char *cs, const char *ct);
  3252   3255   MODULE_SCOPE int	TclUtfCasecmp(const char *cs, const char *ct);
  3253   3256   MODULE_SCOPE int	TclUtfCount(int ch);
  3254   3257   MODULE_SCOPE Tcl_Obj *	TclpNativeToNormalized(ClientData clientData);
  3255   3258   MODULE_SCOPE Tcl_Obj *	TclpFilesystemPathType(Tcl_Obj *pathPtr);
  3256   3259   MODULE_SCOPE int	TclpDlopen(Tcl_Interp *interp, Tcl_Obj *pathPtr,
  3257   3260   			    Tcl_LoadHandle *loadHandle,
................................................................................
  3262   3265   MODULE_SCOPE int	TclpLoadMemory(Tcl_Interp *interp, void *buffer,
  3263   3266   			    int size, int codeSize, Tcl_LoadHandle *loadHandle,
  3264   3267   			    Tcl_FSUnloadFileProc **unloadProcPtr, int flags);
  3265   3268   #endif
  3266   3269   MODULE_SCOPE void	TclInitThreadStorage(void);
  3267   3270   MODULE_SCOPE void	TclFinalizeThreadDataThread(void);
  3268   3271   MODULE_SCOPE void	TclFinalizeThreadStorage(void);
         3272  +
  3269   3273   #ifdef TCL_WIDE_CLICKS
  3270   3274   MODULE_SCOPE Tcl_WideInt TclpGetWideClicks(void);
  3271   3275   MODULE_SCOPE double	TclpWideClicksToNanoseconds(Tcl_WideInt clicks);
         3276  +MODULE_SCOPE double	TclpWideClickInMicrosec(void);
         3277  +#else
         3278  +#   ifdef _WIN32
         3279  +#	define TCL_WIDE_CLICKS 1
         3280  +MODULE_SCOPE Tcl_WideInt TclpGetWideClicks(void);
         3281  +MODULE_SCOPE double	TclpWideClickInMicrosec(void);
         3282  +#	define		TclpWideClicksToNanoseconds(clicks) \
         3283  +				((double)(clicks) * TclpWideClickInMicrosec() * 1000)
         3284  +#   endif
  3272   3285   #endif
         3286  +MODULE_SCOPE Tcl_WideInt TclpGetMicroseconds(void);
         3287  +
  3273   3288   MODULE_SCOPE int	TclZlibInit(Tcl_Interp *interp);
  3274   3289   MODULE_SCOPE void *	TclpThreadCreateKey(void);
  3275   3290   MODULE_SCOPE void	TclpThreadDeleteKey(void *keyPtr);
  3276   3291   MODULE_SCOPE void	TclpThreadSetMasterTSD(void *tsdKeyPtr, void *ptr);
  3277   3292   MODULE_SCOPE void *	TclpThreadGetMasterTSD(void *tsdKeyPtr);
  3278   3293   MODULE_SCOPE void	TclErrorStackResetIf(Tcl_Interp *interp,
  3279   3294   			    const char *msg, int length);
................................................................................
  3540   3555   MODULE_SCOPE int	Tcl_TellObjCmd(ClientData clientData,
  3541   3556   			    Tcl_Interp *interp, int objc,
  3542   3557   			    Tcl_Obj *const objv[]);
  3543   3558   MODULE_SCOPE int	Tcl_ThrowObjCmd(ClientData dummy, Tcl_Interp *interp,
  3544   3559   			    int objc, Tcl_Obj *const objv[]);
  3545   3560   MODULE_SCOPE int	Tcl_TimeObjCmd(ClientData clientData,
  3546   3561   			    Tcl_Interp *interp, int objc,
         3562  +			    Tcl_Obj *const objv[]);
         3563  +MODULE_SCOPE int	Tcl_TimeRateObjCmd(ClientData clientData,
         3564  +			    Tcl_Interp *interp, int objc,
  3547   3565   			    Tcl_Obj *const objv[]);
  3548   3566   MODULE_SCOPE int	Tcl_TraceObjCmd(ClientData clientData,
  3549   3567   			    Tcl_Interp *interp, int objc,
  3550   3568   			    Tcl_Obj *const objv[]);
  3551   3569   MODULE_SCOPE int	Tcl_TryObjCmd(ClientData clientData,
  3552   3570   			    Tcl_Interp *interp, int objc,
  3553   3571   			    Tcl_Obj *const objv[]);
................................................................................
  4417   4435    */
  4418   4436   
  4419   4437   #define TclInitStringRep(objPtr, bytePtr, len) \
  4420   4438       if ((len) == 0) { \
  4421   4439   	(objPtr)->bytes	 = &tclEmptyString; \
  4422   4440   	(objPtr)->length = 0; \
  4423   4441       } else { \
  4424         -	(objPtr)->bytes = (char *) ckalloc((unsigned) ((len) + 1)); \
  4425         -	memcpy((objPtr)->bytes, (bytePtr) ? (bytePtr) : &tclEmptyString, (unsigned) (len)); \
         4442  +	(objPtr)->bytes = (char *) ckalloc((len) + 1); \
         4443  +	memcpy((objPtr)->bytes, (bytePtr) ? (bytePtr) : &tclEmptyString, (len)); \
  4426   4444   	(objPtr)->bytes[len] = '\0'; \
  4427   4445   	(objPtr)->length = (len); \
  4428   4446       }
  4429   4447   
  4430   4448   /*
  4431   4449    *----------------------------------------------------------------
  4432   4450    * Macro used by the Tcl core to get the string representation's byte array
................................................................................
  4538   4556   	    if (oldPtr == (staticPtr)) {				\
  4539   4557   		oldPtr = NULL;						\
  4540   4558   	    }								\
  4541   4559   	    if (allocated > TCL_MAX_TOKENS) {				\
  4542   4560   		allocated = TCL_MAX_TOKENS;				\
  4543   4561   	    }								\
  4544   4562   	    newPtr = (Tcl_Token *) attemptckrealloc((char *) oldPtr,	\
  4545         -		    (unsigned int) (allocated * sizeof(Tcl_Token)));	\
         4563  +		    allocated * sizeof(Tcl_Token));	\
  4546   4564   	    if (newPtr == NULL) {					\
  4547   4565   		allocated = _needed + (append) + TCL_MIN_TOKEN_GROWTH;	\
  4548   4566   		if (allocated > TCL_MAX_TOKENS) {			\
  4549   4567   		    allocated = TCL_MAX_TOKENS;				\
  4550   4568   		}							\
  4551   4569   		newPtr = (Tcl_Token *) ckrealloc((char *) oldPtr,	\
  4552         -			(unsigned int) (allocated * sizeof(Tcl_Token))); \
         4570  +			allocated * sizeof(Tcl_Token)); \
  4553   4571   	    }								\
  4554   4572   	    (available) = allocated;					\
  4555   4573   	    if (oldPtr == NULL) {					\
  4556   4574   		memcpy(newPtr, staticPtr,				\
  4557         -			(size_t) ((used) * sizeof(Tcl_Token)));		\
         4575  +			(used) * sizeof(Tcl_Token));		\
  4558   4576   	    }								\
  4559   4577   	    (tokenPtr) = newPtr;					\
  4560   4578   	}								\
  4561   4579       } while (0)
  4562   4580   
  4563   4581   #define TclGrowParseTokenArray(parsePtr, append)			\
  4564   4582       TclGrowTokenArray((parsePtr)->tokenPtr, (parsePtr)->numTokens,	\
................................................................................
  4617   4635    * but we don't do that at the moment since this is purely about efficiency.
  4618   4636    * The ANSI C "prototype" for this macro is:
  4619   4637    *
  4620   4638    * MODULE_SCOPE int	TclIsPureByteArray(Tcl_Obj *objPtr);
  4621   4639    *----------------------------------------------------------------
  4622   4640    */
  4623   4641   
  4624         -#define TclIsPureByteArray(objPtr) \
  4625         -	((objPtr)->typePtr==&tclPureByteArrayType)
         4642  +MODULE_SCOPE int	TclIsPureByteArray(Tcl_Obj *objPtr);
  4626   4643   #define TclIsPureDict(objPtr) \
  4627   4644   	(((objPtr)->bytes==NULL) && ((objPtr)->typePtr==&tclDictType))
         4645  +#define TclHasIntRep(objPtr, type) \
         4646  +	((objPtr)->typePtr == (type))
  4628   4647   #define TclFetchIntRep(objPtr, type) \
  4629         -	(((objPtr)->typePtr == type) ? &((objPtr)->internalRep) : NULL)
         4648  +	(TclHasIntRep((objPtr), (type)) ? &((objPtr)->internalRep) : NULL)
  4630   4649   
  4631   4650   
  4632   4651   /*
  4633   4652    *----------------------------------------------------------------
  4634   4653    * Macro used by the Tcl core to compare Unicode strings. On big-endian
  4635   4654    * systems we can use the more efficient memcmp, but this would not be
  4636   4655    * lexically correct on little-endian systems. The ANSI C "prototype" for

Changes to generic/tclInterp.c.

  1827   1827   
  1828   1828       listPtr = Tcl_NewListObj(cmdc, NULL);
  1829   1829       listRep = ListRepPtr(listPtr);
  1830   1830       listRep->elemCount = cmdc;
  1831   1831       cmdv = &listRep->elements;
  1832   1832   
  1833   1833       prefv = &aliasPtr->objPtr;
  1834         -    memcpy(cmdv, prefv, (size_t) (prefc * sizeof(Tcl_Obj *)));
  1835         -    memcpy(cmdv+prefc, objv+1, (size_t) ((objc-1) * sizeof(Tcl_Obj *)));
         1834  +    memcpy(cmdv, prefv, prefc * sizeof(Tcl_Obj *));
         1835  +    memcpy(cmdv+prefc, objv+1, (objc-1) * sizeof(Tcl_Obj *));
  1836   1836   
  1837   1837       for (i=0; i<cmdc; i++) {
  1838   1838   	Tcl_IncrRefCount(cmdv[i]);
  1839   1839       }
  1840   1840   
  1841   1841       /*
  1842   1842        * Use the ensemble rewriting machinery to ensure correct error messages:
................................................................................
  1876   1876       cmdc = prefc + objc - 1;
  1877   1877       if (cmdc <= ALIAS_CMDV_PREALLOC) {
  1878   1878   	cmdv = cmdArr;
  1879   1879       } else {
  1880   1880   	cmdv = TclStackAlloc(interp, cmdc * sizeof(Tcl_Obj *));
  1881   1881       }
  1882   1882   
  1883         -    memcpy(cmdv, prefv, (size_t) (prefc * sizeof(Tcl_Obj *)));
  1884         -    memcpy(cmdv+prefc, objv+1, (size_t) ((objc-1) * sizeof(Tcl_Obj *)));
         1883  +    memcpy(cmdv, prefv, prefc * sizeof(Tcl_Obj *));
         1884  +    memcpy(cmdv+prefc, objv+1, (objc-1) * sizeof(Tcl_Obj *));
  1885   1885   
  1886   1886       Tcl_ResetResult(targetInterp);
  1887   1887   
  1888   1888       for (i=0; i<cmdc; i++) {
  1889   1889   	Tcl_IncrRefCount(cmdv[i]);
  1890   1890       }
  1891   1891   
................................................................................
  1966   1966       cmdc = prefc + objc - 1;
  1967   1967       if (cmdc <= ALIAS_CMDV_PREALLOC) {
  1968   1968   	cmdv = cmdArr;
  1969   1969       } else {
  1970   1970   	cmdv = TclStackAlloc(interp, cmdc * sizeof(Tcl_Obj *));
  1971   1971       }
  1972   1972   
  1973         -    memcpy(cmdv, prefv, (size_t) (prefc * sizeof(Tcl_Obj *)));
  1974         -    memcpy(cmdv+prefc, objv+1, (size_t) ((objc-1) * sizeof(Tcl_Obj *)));
         1973  +    memcpy(cmdv, prefv, prefc * sizeof(Tcl_Obj *));
         1974  +    memcpy(cmdv+prefc, objv+1, (objc-1) * sizeof(Tcl_Obj *));
  1975   1975   
  1976   1976       for (i=0; i<cmdc; i++) {
  1977   1977   	Tcl_IncrRefCount(cmdv[i]);
  1978   1978       }
  1979   1979   
  1980   1980       /*
  1981   1981        * Use the ensemble rewriting machinery to ensure correct error messages:

Changes to generic/tclLink.c.

   731    731    * (upper- and lowercase) and sequences like "1e-". See bug [39f6304c2e].
   732    732    */
   733    733   int
   734    734   GetInvalidDoubleFromObj(Tcl_Obj *objPtr, double *doublePtr)
   735    735   {
   736    736       int intValue;
   737    737   
   738         -    if (objPtr->typePtr == &invalidRealType) {
          738  +    if (TclHasIntRep(objPtr, &invalidRealType)) {
   739    739   	goto gotdouble;
   740    740       }
   741    741       if (GetInvalidIntFromObj(objPtr, &intValue) == TCL_OK) {
   742    742   	*doublePtr = (double) intValue;
   743    743   	return TCL_OK;
   744    744       }
   745    745       if (SetInvalidRealFromAny(NULL, objPtr) == TCL_OK) {

Changes to generic/tclListObj.c.

   782    782   	    }
   783    783   	    listRepPtr->refCount--;
   784    784   	} else {
   785    785   	    /*
   786    786   	     * Old intrep to be freed, re-use refCounts.
   787    787   	     */
   788    788   
   789         -	    memcpy(dst, src, (size_t) numElems * sizeof(Tcl_Obj *));
          789  +	    memcpy(dst, src, numElems * sizeof(Tcl_Obj *));
   790    790   	    ckfree(listRepPtr);
   791    791   	}
   792    792   	listRepPtr = newPtr;
   793    793       }
   794    794       ListResetIntRep(listPtr, listRepPtr);
   795    795       listRepPtr->refCount++;
   796    796       TclFreeIntRep(listPtr);
................................................................................
  1160   1160   	    oldListRepPtr->refCount--;
  1161   1161   	} else {
  1162   1162   	    /*
  1163   1163   	     * The old struct will be removed; use its inherited refCounts.
  1164   1164   	     */
  1165   1165   
  1166   1166   	    if (first > 0) {
  1167         -		memcpy(elemPtrs, oldPtrs, (size_t) first * sizeof(Tcl_Obj *));
         1167  +		memcpy(elemPtrs, oldPtrs, first * sizeof(Tcl_Obj *));
  1168   1168   	    }
  1169   1169   
  1170   1170   	    /*
  1171   1171   	     * "Delete" count elements starting at first.
  1172   1172   	     */
  1173   1173   
  1174   1174   	    for (j = first;  j < first + count;  j++) {
................................................................................
  1993   1993        * Dictionaries are a special case; they have a string representation such
  1994   1994        * that *all* valid dictionaries are valid lists. Hence we can convert
  1995   1995        * more directly. Only do this when there's no existing string rep; if
  1996   1996        * there is, it is the string rep that's authoritative (because it could
  1997   1997        * describe duplicate keys).
  1998   1998        */
  1999   1999   
  2000         -    if (!TclHasStringRep(objPtr) && (objPtr->typePtr == &tclDictType)) {
         2000  +    if (!TclHasStringRep(objPtr) && TclHasIntRep(objPtr, &tclDictType)) {
  2001   2001   	Tcl_Obj *keyPtr, *valuePtr;
  2002   2002   	Tcl_DictSearch search;
  2003   2003   	int done, size;
  2004   2004   
  2005   2005   	/*
  2006   2006   	 * Create the new list representation. Note that we do not need to do
  2007   2007   	 * anything with the string representation as the transformation (and

Changes to generic/tclLiteral.c.

   209    209   	     */
   210    210   
   211    211   	    int objLength;
   212    212   	    char *objBytes = TclGetStringFromObj(objPtr, &objLength);
   213    213   
   214    214   	    if ((objLength == length) && ((length == 0)
   215    215   		    || ((objBytes[0] == bytes[0])
   216         -		    && (memcmp(objBytes, bytes, (unsigned) length) == 0)))) {
          216  +		    && (memcmp(objBytes, bytes, length) == 0)))) {
   217    217   		/*
   218    218   		 * A literal was found: return it
   219    219   		 */
   220    220   
   221    221   		if (newPtr) {
   222    222   		    *newPtr = 0;
   223    223   		}
................................................................................
   420    420   
   421    421       localHash = (hash & localTablePtr->mask);
   422    422       for (localPtr=localTablePtr->buckets[localHash] ; localPtr!=NULL;
   423    423   	    localPtr = localPtr->nextPtr) {
   424    424   	objPtr = localPtr->objPtr;
   425    425   	if ((objPtr->length == length) && ((length == 0)
   426    426   		|| ((objPtr->bytes[0] == bytes[0])
   427         -		&& (memcmp(objPtr->bytes, bytes, (unsigned) length) == 0)))) {
          427  +		&& (memcmp(objPtr->bytes, bytes, length) == 0)))) {
   428    428   	    if ((flags & LITERAL_ON_HEAP)) {
   429    429   		ckfree(bytes);
   430    430   	    }
   431    431   	    objIndex = (localPtr - envPtr->literalArrayPtr);
   432    432   #ifdef TCL_COMPILE_DEBUG
   433    433   	    TclVerifyLocalLiteralTable(envPtr);
   434    434   #endif /*TCL_COMPILE_DEBUG*/
................................................................................
  1053   1053   				 * invalidate a cmd literal. */
  1054   1054   {
  1055   1055       Interp *iPtr = (Interp *) interp;
  1056   1056       Tcl_Obj *literalObjPtr = TclCreateLiteral(iPtr, name,
  1057   1057   	    strlen(name), -1, NULL, nsPtr, 0, NULL);
  1058   1058   
  1059   1059       if (literalObjPtr != NULL) {
  1060         -	if (literalObjPtr->typePtr == &tclCmdNameType) {
         1060  +	if (TclHasIntRep(literalObjPtr, &tclCmdNameType)) {
  1061   1061   	    TclFreeIntRep(literalObjPtr);
  1062   1062   	}
  1063   1063   	/* Balance the refcount effects of TclCreateLiteral() above */
  1064   1064   	Tcl_IncrRefCount(literalObjPtr);
  1065   1065   	TclReleaseLiteral(interp, literalObjPtr);
  1066   1066       }
  1067   1067   }

Changes to generic/tclLoad.c.

   401    401   	 * Create a new record to describe this package.
   402    402   	 */
   403    403   
   404    404   	pkgPtr = ckalloc(sizeof(LoadedPackage));
   405    405   	len = strlen(fullFileName) + 1;
   406    406   	pkgPtr->fileName	   = ckalloc(len);
   407    407   	memcpy(pkgPtr->fileName, fullFileName, len);
   408         -	len = (unsigned) Tcl_DStringLength(&pkgName) + 1;
          408  +	len = Tcl_DStringLength(&pkgName) + 1;
   409    409   	pkgPtr->packageName	   = ckalloc(len);
   410    410   	memcpy(pkgPtr->packageName, Tcl_DStringValue(&pkgName), len);
   411    411   	pkgPtr->loadHandle	   = loadHandle;
   412    412   	pkgPtr->initProc	   = initProc;
   413    413   	pkgPtr->safeInitProc	   = (Tcl_PackageInitProc *)
   414    414   		Tcl_FindSymbol(interp, loadHandle,
   415    415   			Tcl_DStringValue(&safeInitName));

Changes to generic/tclMain.c.

    55     55   
    56     56   /*
    57     57    * Further on, in UNICODE mode we just use Tcl_NewUnicodeObj, otherwise
    58     58    * NewNativeObj is needed (which provides proper conversion from native
    59     59    * encoding to UTF-8).
    60     60    */
    61     61   
    62         -#ifdef UNICODE
           62  +#if defined(UNICODE) && (TCL_UTF_MAX <= 4)
    63     63   #   define NewNativeObj Tcl_NewUnicodeObj
    64         -#else /* !UNICODE */
           64  +#else /* !UNICODE || (TCL_UTF_MAX > 4) */
    65     65   static inline Tcl_Obj *
    66     66   NewNativeObj(
    67         -    char *string,
           67  +    TCHAR *string,
    68     68       int length)
    69     69   {
    70     70       Tcl_DString ds;
    71     71   
    72         -    Tcl_ExternalToUtfDString(NULL, string, length, &ds);
           72  +#ifdef UNICODE
           73  +    if (length > 0) {
           74  +	length *= sizeof(WCHAR);
           75  +    }
           76  +    Tcl_WinTCharToUtf(string, length, &ds);
           77  +#else
           78  +    Tcl_ExternalToUtfDString(NULL, (char *) string, length, &ds);
           79  +#endif
    73     80       return TclDStringToObj(&ds);
    74     81   }
    75         -#endif /* !UNICODE */
           82  +#endif /* !UNICODE || (TCL_UTF_MAX > 4) */
    76     83   
    77     84   /*
    78     85    * Declarations for various library functions and variables (don't want to
    79     86    * include tclPort.h here, because people might copy this file out of the Tcl
    80     87    * source directory to make their own modified versions).
    81     88    */
    82     89   

Changes to generic/tclNamesp.c.

   872    872   	    buffPtr = tempPtr;
   873    873   	}
   874    874       }
   875    875   
   876    876       name = Tcl_DStringValue(namePtr);
   877    877       nameLen = Tcl_DStringLength(namePtr);
   878    878       nsPtr->fullName = ckalloc(nameLen + 1);
   879         -    memcpy(nsPtr->fullName, name, (unsigned) nameLen + 1);
          879  +    memcpy(nsPtr->fullName, name, nameLen + 1);
   880    880   
   881    881       Tcl_DStringFree(&buffer1);
   882    882       Tcl_DStringFree(&buffer2);
   883    883       Tcl_DStringFree(&tmpBuffer);
   884    884   
   885    885       /*
   886    886        * If compilation of commands originating from the parent NS is
................................................................................
  1458   1458   
  1459   1459       /*
  1460   1460        * Add the pattern to the namespace's array of export patterns.
  1461   1461        */
  1462   1462   
  1463   1463       len = strlen(pattern);
  1464   1464       patternCpy = ckalloc(len + 1);
  1465         -    memcpy(patternCpy, pattern, (unsigned) len + 1);
         1465  +    memcpy(patternCpy, pattern, len + 1);
  1466   1466   
  1467   1467       nsPtr->exportArrayPtr[nsPtr->numExportPatterns] = patternCpy;
  1468   1468       nsPtr->numExportPatterns++;
  1469   1469   
  1470   1470       /*
  1471   1471        * The list of commands actually exported from the namespace might have
  1472   1472        * changed (probably will have!) However, we do not need to recompute this

Changes to generic/tclOOCall.c.

   627    627        * Note that 'i' may well be less than names.numEntries when we are
   628    628        * dealing with public method names. We don't sort unless there's at least
   629    629        * two method names.
   630    630        */
   631    631   
   632    632       if (i > 0) {
   633    633   	if (i > 1) {
   634         -	    qsort((void *) strings, (unsigned) i, sizeof(char *), CmpStr);
          634  +	    qsort((void *) strings, i, sizeof(char *), CmpStr);
   635    635   	}
   636    636   	*stringsPtr = strings;
   637    637       } else {
   638    638   	ckfree(strings);
   639    639   	*stringsPtr = NULL;
   640    640       }
   641    641       return i;

Changes to generic/tclObj.c.

  3026   3026   	     * Must check for those bignum values that can fit in a long, even
  3027   3027   	     * when auto-narrowing is enabled. Only those values in the signed
  3028   3028   	     * long range get auto-narrowed to tclIntType, while all the
  3029   3029   	     * values in the unsigned long range will fit in a long.
  3030   3030   	     */
  3031   3031   
  3032   3032   	    mp_int big;
         3033  +	    unsigned long scratch, value = 0, numBytes = sizeof(unsigned long);
         3034  +	    unsigned char *bytes = (unsigned char *) &scratch;
  3033   3035   
  3034   3036   	    UNPACK_BIGNUM(objPtr, big);
  3035         -	    if ((size_t) big.used <= (CHAR_BIT * sizeof(unsigned long) + DIGIT_BIT - 1)
  3036         -		    / DIGIT_BIT) {
  3037         -		unsigned long scratch, value = 0, numBytes = sizeof(unsigned long);
  3038         -		unsigned char *bytes = (unsigned char *) &scratch;
  3039         -
  3040         -		if (mp_to_unsigned_bin_n(&big, bytes, &numBytes) == MP_OKAY) {
  3041         -		    while (numBytes-- > 0) {
         3037  +	    if (mp_to_unsigned_bin_n(&big, bytes, &numBytes) == MP_OKAY) {
         3038  +		while (numBytes-- > 0) {
  3042   3039   			value = (value << CHAR_BIT) | *bytes++;
         3040  +		}
         3041  +		if (big.sign) {
         3042  +		    if (value <= 1 + (unsigned long)LONG_MAX) {
         3043  +			*longPtr = - (long) value;
         3044  +			return TCL_OK;
  3043   3045   		    }
  3044         -		    if (big.sign) {
  3045         -			if (value <= 1 + (unsigned long)LONG_MAX) {
  3046         -			    *longPtr = - (long) value;
  3047         -			    return TCL_OK;
  3048         -			}
  3049         -		    } else {
  3050         -			if (value <= (unsigned long)ULONG_MAX) {
  3051         -			    *longPtr = (long) value;
  3052         -			    return TCL_OK;
  3053         -			}
         3046  +		} else {
         3047  +		    if (value <= (unsigned long)ULONG_MAX) {
         3048  +			*longPtr = (long) value;
         3049  +			return TCL_OK;
  3054   3050   		    }
  3055   3051   		}
  3056   3052   	    }
  3057   3053   #ifndef TCL_WIDE_INT_IS_LONG
  3058   3054   	tooLarge:
  3059   3055   #endif
  3060   3056   	    if (interp != NULL) {
................................................................................
  3268   3264   	if (objPtr->typePtr == &tclBignumType) {
  3269   3265   	    /*
  3270   3266   	     * Must check for those bignum values that can fit in a
  3271   3267   	     * Tcl_WideInt, even when auto-narrowing is enabled.
  3272   3268   	     */
  3273   3269   
  3274   3270   	    mp_int big;
         3271  +	    Tcl_WideUInt value = 0;
         3272  +	    unsigned long numBytes = sizeof(Tcl_WideInt);
         3273  +	    Tcl_WideInt scratch;
         3274  +	    unsigned char *bytes = (unsigned char *) &scratch;
  3275   3275   
  3276   3276   	    UNPACK_BIGNUM(objPtr, big);
  3277         -	    if ((size_t) big.used <= (CHAR_BIT * sizeof(Tcl_WideInt)
  3278         -		     + DIGIT_BIT - 1) / DIGIT_BIT) {
  3279         -		Tcl_WideUInt value = 0;
  3280         -		unsigned long numBytes = sizeof(Tcl_WideInt);
  3281         -		Tcl_WideInt scratch;
  3282         -		unsigned char *bytes = (unsigned char *) &scratch;
  3283         -
  3284         -		if (mp_to_unsigned_bin_n(&big, bytes, &numBytes) == MP_OKAY) {
  3285         -		    while (numBytes-- > 0) {
  3286         -			value = (value << CHAR_BIT) | *bytes++;
         3277  +	    if (mp_to_unsigned_bin_n(&big, bytes, &numBytes) == MP_OKAY) {
         3278  +		while (numBytes-- > 0) {
         3279  +		    value = (value << CHAR_BIT) | *bytes++;
         3280  +		}
         3281  +		if (big.sign) {
         3282  +		    if (value <= 1 + ~(Tcl_WideUInt)WIDE_MIN) {
         3283  +			*wideIntPtr = - (Tcl_WideInt) value;
         3284  +			return TCL_OK;
  3287   3285   		    }
  3288         -		    if (big.sign) {
  3289         -			if (value <= 1 + ~(Tcl_WideUInt)WIDE_MIN) {
  3290         -			    *wideIntPtr = - (Tcl_WideInt) value;
  3291         -			    return TCL_OK;
  3292         -			}
  3293         -		    } else {
  3294         -			if (value <= (Tcl_WideUInt)WIDE_MAX) {
  3295         -			    *wideIntPtr = (Tcl_WideInt) value;
  3296         -			    return TCL_OK;
  3297         -			}
         3286  +		} else {
         3287  +		    if (value <= (Tcl_WideUInt)WIDE_MAX) {
         3288  +			*wideIntPtr = (Tcl_WideInt) value;
         3289  +			return TCL_OK;
  3298   3290   		    }
  3299   3291   		}
  3300   3292   	    }
  3301   3293   	    if (interp != NULL) {
  3302   3294   		const char *s = "integer value too large to represent";
  3303   3295   		Tcl_Obj *msg = Tcl_NewStringObj(s, -1);
  3304   3296   
................................................................................
  3727   3719    */
  3728   3720   
  3729   3721   void
  3730   3722   Tcl_SetBignumObj(
  3731   3723       Tcl_Obj *objPtr,		/* Object to set */
  3732   3724       mp_int *bignumValue)	/* Value to store */
  3733   3725   {
         3726  +    Tcl_WideUInt value = 0;
         3727  +    unsigned long numBytes = sizeof(Tcl_WideUInt);
         3728  +    Tcl_WideUInt scratch;
         3729  +    unsigned char *bytes = (unsigned char *) &scratch;
         3730  +
  3734   3731       if (Tcl_IsShared(objPtr)) {
  3735   3732   	Tcl_Panic("%s called with shared object", "Tcl_SetBignumObj");
  3736   3733       }
  3737         -    if ((size_t) bignumValue->used
  3738         -	    <= (CHAR_BIT * sizeof(Tcl_WideUInt) + DIGIT_BIT - 1) / DIGIT_BIT) {
  3739         -	Tcl_WideUInt value = 0;
  3740         -	unsigned long numBytes = sizeof(Tcl_WideUInt);
  3741         -	Tcl_WideUInt scratch;
  3742         -	unsigned char *bytes = (unsigned char *) &scratch;
  3743         -
  3744         -	if (mp_to_unsigned_bin_n(bignumValue, bytes, &numBytes) != MP_OKAY) {
  3745         -	    goto tooLargeForWide;
  3746         -	}
  3747         -	while (numBytes-- > 0) {
  3748         -	    value = (value << CHAR_BIT) | *bytes++;
  3749         -	}
  3750         -	if (value > ((Tcl_WideUInt)WIDE_MAX + bignumValue->sign)) {
  3751         -	    goto tooLargeForWide;
  3752         -	}
  3753         -	if (bignumValue->sign) {
  3754         -	    TclSetIntObj(objPtr, -(Tcl_WideInt)value);
  3755         -	} else {
  3756         -	    TclSetIntObj(objPtr, (Tcl_WideInt)value);
  3757         -	}
  3758         -	mp_clear(bignumValue);
  3759         -	return;
         3734  +    if (mp_to_unsigned_bin_n(bignumValue, bytes, &numBytes) != MP_OKAY) {
         3735  +	goto tooLargeForWide;
  3760   3736       }
         3737  +    while (numBytes-- > 0) {
         3738  +	value = (value << CHAR_BIT) | *bytes++;
         3739  +    }
         3740  +    if (value > ((Tcl_WideUInt)WIDE_MAX + bignumValue->sign)) {
         3741  +	goto tooLargeForWide;
         3742  +    }
         3743  +    if (bignumValue->sign) {
         3744  +	TclSetIntObj(objPtr, -(Tcl_WideInt)value);
         3745  +    } else {
         3746  +	TclSetIntObj(objPtr, (Tcl_WideInt)value);
         3747  +    }
         3748  +    mp_clear(bignumValue);
         3749  +    return;
  3761   3750     tooLargeForWide:
  3762   3751       TclInvalidateStringRep(objPtr);
  3763   3752       TclFreeIntRep(objPtr);
  3764   3753       TclSetBignumIntRep(objPtr, bignumValue);
  3765   3754   }
  3766   3755   
  3767   3756   /*

Changes to generic/tclParse.c.

   787    787   				 * written. At most TCL_UTF_MAX bytes will be
   788    788   				 * written there. */
   789    789   {
   790    790       register const char *p = src+1;
   791    791       Tcl_UniChar unichar = 0;
   792    792       int result;
   793    793       int count;
   794         -    char buf[TCL_UTF_MAX];
          794  +    char buf[4] = "";
   795    795   
   796    796       if (numBytes == 0) {
   797    797   	if (readPtr != NULL) {
   798    798   	    *readPtr = 0;
   799    799   	}
   800    800   	return 0;
   801    801       }
................................................................................
   922    922   	 */
   923    923   
   924    924   	if (Tcl_UtfCharComplete(p, numBytes - 1)) {
   925    925   	    count = TclUtfToUniChar(p, &unichar) + 1;	/* +1 for '\' */
   926    926   	} else {
   927    927   	    char utfBytes[TCL_UTF_MAX];
   928    928   
   929         -	    memcpy(utfBytes, p, (size_t) (numBytes - 1));
          929  +	    memcpy(utfBytes, p, numBytes - 1);
   930    930   	    utfBytes[numBytes - 1] = '\0';
   931    931   	    count = TclUtfToUniChar(utfBytes, &unichar) + 1;
   932    932   	}
   933    933   	result = unichar;
   934    934   	break;
   935    935       }
   936    936   
   937    937     done:
   938    938       if (readPtr != NULL) {
   939    939   	*readPtr = count;
   940    940       }
   941    941       count = Tcl_UniCharToUtf(result, dst);
   942         -    if (!count) {
   943         -	/* Special case for handling upper surrogates. */
   944         -	count = Tcl_UniCharToUtf(-1, dst);
          942  +    if ((result >= 0xD800) && (count < 3)) {
          943  +	/* Special case for handling high surrogates. */
          944  +	count += Tcl_UniCharToUtf(-1, dst + count);
   945    945       }
   946    946       return count;
   947    947   }
   948    948   
   949    949   /*
   950    950    *----------------------------------------------------------------------
   951    951    *
................................................................................
  2147   2147   
  2148   2148       adjust = 0;
  2149   2149       result = NULL;
  2150   2150       for (; count>0 && code==TCL_OK ; count--, tokenPtr++) {
  2151   2151   	Tcl_Obj *appendObj = NULL;
  2152   2152   	const char *append = NULL;
  2153   2153   	int appendByteLength = 0;
  2154         -	char utfCharBytes[TCL_UTF_MAX];
         2154  +	char utfCharBytes[4] = "";
  2155   2155   
  2156   2156   	switch (tokenPtr->type) {
  2157   2157   	case TCL_TOKEN_TEXT:
  2158   2158   	    append = tokenPtr->start;
  2159   2159   	    appendByteLength = tokenPtr->size;
  2160   2160   	    break;
  2161   2161   

Changes to generic/tclPathObj.c.

   556    556   
   557    557   Tcl_Obj *
   558    558   TclPathPart(
   559    559       Tcl_Interp *interp,		/* Used for error reporting */
   560    560       Tcl_Obj *pathPtr,		/* Path to take dirname of */
   561    561       Tcl_PathPart portion)	/* Requested portion of name */
   562    562   {
   563         -    Tcl_ObjIntRep *irPtr = TclFetchIntRep(pathPtr, &fsPathType);
   564         -
   565         -    if (irPtr) {
          563  +    if (TclHasIntRep(pathPtr, &fsPathType)) {
   566    564   	FsPath *fsPathPtr = PATHOBJ(pathPtr);
   567    565   
   568    566   	if (PATHFLAGS(pathPtr) != 0) {
   569    567   	    switch (portion) {
   570    568   	    case TCL_PATH_DIRNAME: {
   571    569   		/*
   572    570   		 * Check if the joined-on bit has any directory delimiters in
................................................................................
  1154   1152   int
  1155   1153   Tcl_FSConvertToPathType(
  1156   1154       Tcl_Interp *interp,		/* Interpreter in which to store error message
  1157   1155   				 * (if necessary). */
  1158   1156       Tcl_Obj *pathPtr)		/* Object to convert to a valid, current path
  1159   1157   				 * type. */
  1160   1158   {
  1161         -    Tcl_ObjIntRep *irPtr = TclFetchIntRep(pathPtr, &fsPathType);
  1162         -
  1163   1159       /*
  1164   1160        * While it is bad practice to examine an object's type directly, this is
  1165   1161        * actually the best thing to do here. The reason is that if we are
  1166   1162        * converting this object to FsPath type for the first time, we don't need
  1167   1163        * to worry whether the 'cwd' has changed. On the other hand, if this
  1168   1164        * object is already of FsPath type, and is a relative path, we do have to
  1169   1165        * worry about the cwd. If the cwd has changed, we must recompute the
  1170   1166        * path.
  1171   1167        */
  1172   1168   
  1173         -    if (irPtr) {
         1169  +    if (TclHasIntRep(pathPtr, &fsPathType)) {
  1174   1170   	if (TclFSEpochOk(PATHOBJ(pathPtr)->filesystemEpoch)) {
  1175   1171   	    return TCL_OK;
  1176   1172   	}
  1177   1173   
  1178   1174   	TclGetString(pathPtr);
  1179   1175   	Tcl_StoreIntRep(pathPtr, &fsPathType, NULL);
  1180   1176       }
................................................................................
  1477   1473   
  1478   1474   static int
  1479   1475   MakePathFromNormalized(
  1480   1476       Tcl_Interp *interp,		/* Used for error reporting if not NULL. */
  1481   1477       Tcl_Obj *pathPtr)		/* The object to convert. */
  1482   1478   {
  1483   1479       FsPath *fsPathPtr;
  1484         -    Tcl_ObjIntRep *irPtr = TclFetchIntRep(pathPtr, &fsPathType);
  1485   1480   
  1486         -    if (irPtr) {
         1481  +    if (TclHasIntRep(pathPtr, &fsPathType)) {
  1487   1482   	return TCL_OK;
  1488   1483       }
  1489   1484   
  1490   1485       fsPathPtr = ckalloc(sizeof(FsPath));
  1491   1486   
  1492   1487       /*
  1493   1488        * It's a pure normalized absolute path.
................................................................................
  1680   1675       Tcl_Obj *transPtr = Tcl_FSGetTranslatedPath(interp, pathPtr);
  1681   1676   
  1682   1677       if (transPtr != NULL) {
  1683   1678   	int len;
  1684   1679   	const char *orig = TclGetStringFromObj(transPtr, &len);
  1685   1680   	char *result = ckalloc(len+1);
  1686   1681   
  1687         -	memcpy(result, orig, (size_t) len+1);
         1682  +	memcpy(result, orig, len+1);
  1688   1683   	TclDecrRefCount(transPtr);
  1689   1684   	return result;
  1690   1685       }
  1691   1686   
  1692   1687       return NULL;
  1693   1688   }
  1694   1689   
................................................................................
  2083   2078   
  2084   2079   int
  2085   2080   TclFSEnsureEpochOk(
  2086   2081       Tcl_Obj *pathPtr,
  2087   2082       const Tcl_Filesystem **fsPtrPtr)
  2088   2083   {
  2089   2084       FsPath *srcFsPathPtr;
  2090         -    Tcl_ObjIntRep *irPtr = TclFetchIntRep(pathPtr, &fsPathType);
  2091   2085   
  2092         -    if (irPtr == NULL) {
         2086  +    if (!TclHasIntRep(pathPtr, &fsPathType)) {
  2093   2087   	return TCL_OK;
  2094   2088       }
  2095   2089   
  2096   2090       srcFsPathPtr = PATHOBJ(pathPtr);
  2097   2091   
  2098   2092       /*
  2099   2093        * Check if the filesystem has changed in some way since this object's
................................................................................
  2142   2136   void
  2143   2137   TclFSSetPathDetails(
  2144   2138       Tcl_Obj *pathPtr,
  2145   2139       const Tcl_Filesystem *fsPtr,
  2146   2140       ClientData clientData)
  2147   2141   {
  2148   2142       FsPath *srcFsPathPtr;
  2149         -    Tcl_ObjIntRep *irPtr = TclFetchIntRep(pathPtr, &fsPathType);;
  2150   2143   
  2151   2144       /*
  2152   2145        * Make sure pathPtr is of the correct type.
  2153   2146        */
  2154   2147   
  2155         -    if (irPtr == NULL) {
         2148  +    if (!TclHasIntRep(pathPtr, &fsPathType)) {
  2156   2149   	if (SetFsPathFromAny(NULL, pathPtr) != TCL_OK) {
  2157   2150   	    return;
  2158   2151   	}
  2159   2152       }
  2160   2153   
  2161   2154       srcFsPathPtr = PATHOBJ(pathPtr);
  2162   2155       srcFsPathPtr->fsPtr = fsPtr;
................................................................................
  2246   2239       Tcl_Interp *interp,		/* Used for error reporting if not NULL. */
  2247   2240       Tcl_Obj *pathPtr)		/* The object to convert. */
  2248   2241   {
  2249   2242       int len;
  2250   2243       FsPath *fsPathPtr;
  2251   2244       Tcl_Obj *transPtr;
  2252   2245       char *name;
  2253         -    Tcl_ObjIntRep *irPtr = TclFetchIntRep(pathPtr, &fsPathType);
  2254   2246   
  2255         -    if (irPtr) {
         2247  +    if (TclHasIntRep(pathPtr, &fsPathType)) {
  2256   2248   	return TCL_OK;
  2257   2249       }
  2258   2250   
  2259   2251       /*
  2260   2252        * First step is to translate the filename. This is similar to
  2261   2253        * Tcl_TranslateFilename, but shouldn't convert everything to windows
  2262   2254        * backslashes on that platform. The current implementation of this piece
................................................................................
  2554   2546    */
  2555   2547   
  2556   2548   int
  2557   2549   TclNativePathInFilesystem(
  2558   2550       Tcl_Obj *pathPtr,
  2559   2551       ClientData *clientDataPtr)
  2560   2552   {
  2561         -    Tcl_ObjIntRep *irPtr = TclFetchIntRep(pathPtr, &fsPathType);
  2562         -
  2563   2553       /*
  2564   2554        * A special case is required to handle the empty path "". This is a valid
  2565   2555        * path (i.e. the user should be able to do 'file exists ""' without
  2566   2556        * throwing an error), but equally the path doesn't exist. Those are the
  2567   2557        * semantics of Tcl (at present anyway), so we have to abide by them here.
  2568   2558        */
  2569   2559   
  2570         -    if (irPtr) {
         2560  +    if (TclHasIntRep(pathPtr, &fsPathType)) {
  2571   2561   	if (pathPtr->bytes != NULL && pathPtr->bytes[0] == '\0') {
  2572   2562   	    /*
  2573   2563   	     * We reject the empty path "".
  2574   2564   	     */
  2575   2565   
  2576   2566   	    return -1;
  2577   2567   	}

Changes to generic/tclPipe.c.

   329    329   	 * Make sure we start at the beginning of the file.
   330    330   	 */
   331    331   
   332    332   	if (interp != NULL) {
   333    333   	    int count;
   334    334   	    Tcl_Obj *objPtr;
   335    335   
   336         -	    Tcl_Seek(errorChan, (Tcl_WideInt)0, SEEK_SET);
          336  +	    Tcl_Seek(errorChan, 0, SEEK_SET);
   337    337   	    objPtr = Tcl_NewObj();
   338    338   	    count = Tcl_ReadChars(errorChan, objPtr, -1, 0);
   339    339   	    if (count < 0) {
   340    340   		result = TCL_ERROR;
   341    341   		Tcl_DecrRefCount(objPtr);
   342    342   		Tcl_ResetResult(interp);
   343    343   		Tcl_SetObjResult(interp, Tcl_ObjPrintf(

Changes to generic/tclPkg.c.

    52     52    * For each package that is known in any way to an interpreter, there is one
    53     53    * record of the following type. These records are stored in the
    54     54    * "packageTable" hash table in the interpreter, keyed by package name such as
    55     55    * "Tk" (no version number).
    56     56    */
    57     57   
    58     58   typedef struct Package {
    59         -    char *version;		/* Version that has been supplied in this
    60         -				 * interpreter via "package provide"
    61         -				 * (malloc'ed). NULL means the package doesn't
    62         -				 * exist in this interpreter yet. */
           59  +    Tcl_Obj *version;
    63     60       PkgAvail *availPtr;		/* First in list of all available versions of
    64     61   				 * this package. */
    65     62       const void *clientData;	/* Client data. */
    66     63   } Package;
    67     64   
    68     65   typedef struct Require {
    69     66       void * clientDataPtr;
................................................................................
   162    159   {
   163    160       Package *pkgPtr;
   164    161       char *pvi, *vi;
   165    162       int res;
   166    163   
   167    164       pkgPtr = FindPackage(interp, name);
   168    165       if (pkgPtr->version == NULL) {
   169         -	DupString(pkgPtr->version, version);
          166  +	pkgPtr->version = Tcl_NewStringObj(version, -1);
          167  +	Tcl_IncrRefCount(pkgPtr->version);
   170    168   	pkgPtr->clientData = clientData;
   171    169   	return TCL_OK;
   172    170       }
   173    171   
   174         -    if (CheckVersionAndConvert(interp, pkgPtr->version, &pvi,
          172  +    if (CheckVersionAndConvert(interp, Tcl_GetString(pkgPtr->version), &pvi,
   175    173   	    NULL) != TCL_OK) {
   176    174   	return TCL_ERROR;
   177    175       } else if (CheckVersionAndConvert(interp, version, &vi, NULL) != TCL_OK) {
   178    176   	ckfree(pvi);
   179    177   	return TCL_ERROR;
   180    178       }
   181    179   
................................................................................
   187    185   	if (clientData != NULL) {
   188    186   	    pkgPtr->clientData = clientData;
   189    187   	}
   190    188   	return TCL_OK;
   191    189       }
   192    190       Tcl_SetObjResult(interp, Tcl_ObjPrintf(
   193    191   	    "conflicting versions provided for package \"%s\": %s, then %s",
   194         -	    name, pkgPtr->version, version));
          192  +	    name, Tcl_GetString(pkgPtr->version), version));
   195    193       Tcl_SetErrorCode(interp, "TCL", "PACKAGE", "VERSIONCONFLICT", NULL);
   196    194       return TCL_ERROR;
   197    195   }
   198    196   
   199    197   /*
   200    198    *----------------------------------------------------------------------
   201    199    *
................................................................................
   380    378   
   381    379       /*
   382    380        * Translate between old and new API, and defer to the new function.
   383    381        */
   384    382   
   385    383       if (version == NULL) {
   386    384   	if (Tcl_PkgRequireProc(interp, name, 0, NULL, clientDataPtr) == TCL_OK) {
   387         -	    result = Tcl_GetStringResult(interp);
          385  +	    result = Tcl_GetString(Tcl_GetObjResult(interp));
   388    386   	    Tcl_ResetResult(interp);
   389    387   	}
   390    388       } else {
   391    389   	if (exact && TCL_OK
   392    390   		!= CheckVersionAndConvert(interp, version, NULL, NULL)) {
   393    391   	    return NULL;
   394    392   	}
   395    393   	ov = Tcl_NewStringObj(version, -1);
   396    394   	if (exact) {
   397    395   	    Tcl_AppendStringsToObj(ov, "-", version, NULL);
   398    396   	}
   399    397   	Tcl_IncrRefCount(ov);
   400    398   	if (Tcl_PkgRequireProc(interp, name, 1, &ov, clientDataPtr) == TCL_OK) {
   401         -	    result = Tcl_GetStringResult(interp);
          399  +	    result = Tcl_GetString(Tcl_GetObjResult(interp));
   402    400   	    Tcl_ResetResult(interp);
   403    401   	}
   404    402   	TclDecrRefCount(ov);
   405    403       }
   406    404       return result;
   407    405   }
   408    406   
................................................................................
   536    534       }
   537    535   
   538    536       /*
   539    537        * Ensure that the provided version meets the current requirements.
   540    538        */
   541    539   
   542    540       if (reqc != 0) {
   543         -	CheckVersionAndConvert(interp, reqPtr->pkgPtr->version, &pkgVersionI, NULL);
          541  +	CheckVersionAndConvert(interp, Tcl_GetString(reqPtr->pkgPtr->version),
          542  +		&pkgVersionI, NULL);
   544    543   	satisfies = SomeRequirementSatisfied(pkgVersionI, reqc, reqv);
   545    544   
   546    545   	ckfree(pkgVersionI);
   547    546   
   548    547   	if (!satisfies) {
   549    548   	    Tcl_SetObjResult(interp, Tcl_ObjPrintf(
   550    549   		    "version conflict for package \"%s\": have %s, need",
   551         -		    name, reqPtr->pkgPtr->version));
          550  +		    name, Tcl_GetString(reqPtr->pkgPtr->version)));
   552    551   	    Tcl_SetErrorCode(interp, "TCL", "PACKAGE", "VERSIONCONFLICT",
   553    552   		    NULL);
   554    553   	    AddRequirementsToResult(interp, reqc, reqv);
   555    554   	    return TCL_ERROR;
   556    555   	}
   557    556       }
   558    557   
   559    558       if (clientDataPtr) {
   560    559   	const void **ptr = (const void **) clientDataPtr;
   561    560   
   562    561   	*ptr = reqPtr->pkgPtr->clientData;
   563    562       }
   564         -    Tcl_SetObjResult(interp, Tcl_NewStringObj(reqPtr->pkgPtr->version, -1));
          563  +    Tcl_SetObjResult(interp, reqPtr->pkgPtr->version);
   565    564       return TCL_OK;
   566    565   }
   567    566   
   568    567   static int
   569    568   PkgRequireCoreCleanup(ClientData data[], Tcl_Interp *interp, int result) {
   570    569       ckfree(data[0]);
   571    570       return result;
................................................................................
   774    773   		    " no version of package %s provided",
   775    774   		    name, versionToProvide, name));
   776    775   	    Tcl_SetErrorCode(interp, "TCL", "PACKAGE", "UNPROVIDED",
   777    776   		    NULL);
   778    777   	} else {
   779    778   	    char *pvi, *vi;
   780    779   
   781         -	    if (CheckVersionAndConvert(interp, reqPtr->pkgPtr->version, &pvi,
   782         -		    NULL) != TCL_OK) {
          780  +	    if (TCL_OK != CheckVersionAndConvert(interp,
          781  +		    Tcl_GetString(reqPtr->pkgPtr->version), &pvi, NULL)) {
   783    782   		result = TCL_ERROR;
   784    783   	    } else if (CheckVersionAndConvert(interp,
   785    784   		    versionToProvide, &vi, NULL) != TCL_OK) {
   786    785   		ckfree(pvi);
   787    786   		result = TCL_ERROR;
   788    787   	    } else {
   789    788   		int res = CompareVersions(pvi, vi, NULL);
................................................................................
   792    791   		ckfree(vi);
   793    792   		if (res != 0) {
   794    793   		    result = TCL_ERROR;
   795    794   		    Tcl_SetObjResult(interp, Tcl_ObjPrintf(
   796    795   			    "attempt to provide package %s %s failed:"
   797    796   			    " package %s %s provided instead",
   798    797   			    name, versionToProvide,
   799         -			    name, reqPtr->pkgPtr->version));
          798  +			    name, Tcl_GetString(reqPtr->pkgPtr->version)));
   800    799   		    Tcl_SetErrorCode(interp, "TCL", "PACKAGE",
   801    800   			    "WRONGPROVIDE", NULL);
   802    801   		}
   803    802   	    }
   804    803   	}
   805    804       } else if (result != TCL_ERROR) {
   806    805   	Tcl_Obj *codePtr = Tcl_NewIntObj(result);
................................................................................
   830    829   	 * This is consistent with our returning NULL. If we're not
   831    830   	 * willing to tell our caller we got a particular version, we
   832    831   	 * shouldn't store that version for telling future callers
   833    832   	 * either.
   834    833   	 */
   835    834   
   836    835   	if (reqPtr->pkgPtr->version != NULL) {
   837         -	    ckfree(reqPtr->pkgPtr->version);
          836  +	    Tcl_DecrRefCount(reqPtr->pkgPtr->version);
   838    837   	    reqPtr->pkgPtr->version = NULL;
   839    838   	}
   840    839   	reqPtr->pkgPtr->clientData = NULL;
   841    840   	return result;
   842    841       }
   843    842   
   844    843       Tcl_NRAddCallback(interp, data[3], reqPtr, INT2PTR(reqc), (void *)reqv, NULL);
................................................................................
  1032   1031   	    hPtr = Tcl_FindHashEntry(&iPtr->packageTable, keyString);
  1033   1032   	    if (hPtr == NULL) {
  1034   1033   		continue;
  1035   1034   	    }
  1036   1035   	    pkgPtr = Tcl_GetHashValue(hPtr);
  1037   1036   	    Tcl_DeleteHashEntry(hPtr);
  1038   1037   	    if (pkgPtr->version != NULL) {
  1039         -		ckfree(pkgPtr->version);
         1038  +		Tcl_DecrRefCount(pkgPtr->version);
  1040   1039   	    }
  1041   1040   	    while (pkgPtr->availPtr != NULL) {
  1042   1041   		availPtr = pkgPtr->availPtr;
  1043   1042   		pkgPtr->availPtr = availPtr->nextPtr;
  1044   1043   		Tcl_EventuallyFree(availPtr->version, TCL_DYNAMIC);
  1045   1044   		Tcl_EventuallyFree(availPtr->script, TCL_DYNAMIC);
  1046   1045   		if (availPtr->pkgIndex) {
................................................................................
  1108   1107   
  1109   1108   	if (objc == 4) {
  1110   1109   	    return TCL_OK;
  1111   1110   	}
  1112   1111   	if (availPtr == NULL) {
  1113   1112   	    availPtr = ckalloc(sizeof(PkgAvail));
  1114   1113   	    availPtr->pkgIndex = NULL;
  1115         -	    DupBlock(availPtr->version, argv3, (unsigned) length + 1);
         1114  +	    DupBlock(availPtr->version, argv3, length + 1);
  1116   1115   
  1117   1116   	    if (prevPtr == NULL) {
  1118   1117   		availPtr->nextPtr = pkgPtr->availPtr;
  1119   1118   		pkgPtr->availPtr = availPtr;
  1120   1119   	    } else {
  1121   1120   		availPtr->nextPtr = prevPtr->nextPtr;
  1122   1121   		prevPtr->nextPtr = availPtr;
  1123   1122   	    }
  1124   1123   	}
  1125   1124   	if (iPtr->scriptFile) {
  1126   1125   	    argv4 = TclGetStringFromObj(iPtr->scriptFile, &length);
  1127         -	    DupBlock(availPtr->pkgIndex, argv4, (unsigned) length + 1);
         1126  +	    DupBlock(availPtr->pkgIndex, argv4, length + 1);
  1128   1127   	}
  1129   1128   	argv4 = TclGetStringFromObj(objv[4], &length);
  1130         -	DupBlock(availPtr->script, argv4, (unsigned) length + 1);
         1129  +	DupBlock(availPtr->script, argv4, length + 1);
  1131   1130   	break;
  1132   1131       }
  1133   1132       case PKG_NAMES:
  1134   1133   	if (objc != 2) {
  1135   1134   	    Tcl_WrongNumArgs(interp, 2, objv, NULL);
  1136   1135   	    return TCL_ERROR;
  1137   1136   	} else {
................................................................................
  1203   1202   	}
  1204   1203   	argv2 = TclGetString(objv[2]);
  1205   1204   	if (objc == 3) {
  1206   1205   	    hPtr = Tcl_FindHashEntry(&iPtr->packageTable, argv2);
  1207   1206   	    if (hPtr != NULL) {
  1208   1207   		pkgPtr = Tcl_GetHashValue(hPtr);
  1209   1208   		if (pkgPtr->version != NULL) {
  1210         -		    Tcl_SetObjResult(interp,
  1211         -			    Tcl_NewStringObj(pkgPtr->version, -1));
         1209  +		    Tcl_SetObjResult(interp, pkgPtr->version);
  1212   1210   		}
  1213   1211   	    }
  1214   1212   	    return TCL_OK;
  1215   1213   	}
  1216   1214   	argv3 = TclGetString(objv[3]);
  1217   1215   	if (CheckVersionAndConvert(interp, argv3, NULL, NULL) != TCL_OK) {
  1218   1216   	    return TCL_ERROR;
................................................................................
  1297   1295   	    if (iPtr->packageUnknown != NULL) {
  1298   1296   		ckfree(iPtr->packageUnknown);
  1299   1297   	    }
  1300   1298   	    argv2 = TclGetStringFromObj(objv[2], &length);
  1301   1299   	    if (argv2[0] == 0) {
  1302   1300   		iPtr->packageUnknown = NULL;
  1303   1301   	    } else {
  1304         -		DupBlock(iPtr->packageUnknown, argv2, (unsigned) length+1);
         1302  +		DupBlock(iPtr->packageUnknown, argv2, length+1);
  1305   1303   	    }
  1306   1304   	} else {
  1307   1305   	    Tcl_WrongNumArgs(interp, 2, objv, "?command?");
  1308   1306   	    return TCL_ERROR;
  1309   1307   	}
  1310   1308   	break;
  1311   1309       }
................................................................................
  1497   1495       Tcl_HashEntry *hPtr;
  1498   1496       PkgAvail *availPtr;
  1499   1497   
  1500   1498       for (hPtr = Tcl_FirstHashEntry(&iPtr->packageTable, &search);
  1501   1499   	    hPtr != NULL; hPtr = Tcl_NextHashEntry(&search)) {
  1502   1500   	pkgPtr = Tcl_GetHashValue(hPtr);
  1503   1501   	if (pkgPtr->version != NULL) {
  1504         -	    ckfree(pkgPtr->version);
         1502  +	    Tcl_DecrRefCount(pkgPtr->version);
  1505   1503   	}
  1506   1504   	while (pkgPtr->availPtr != NULL) {
  1507   1505   	    availPtr = pkgPtr->availPtr;
  1508   1506   	    pkgPtr->availPtr = availPtr->nextPtr;
  1509   1507   	    Tcl_EventuallyFree(availPtr->version, TCL_DYNAMIC);
  1510   1508   	    Tcl_EventuallyFree(availPtr->script, TCL_DYNAMIC);
  1511   1509   	    if (availPtr->pkgIndex) {

Changes to generic/tclProc.c.

   325    325        *	   seem to make a lot of sense to verify the number of arguments we
   326    326        *	   are about to ignore ...
   327    327        *	 - could be enhanced to handle also non-empty bodies that contain only
   328    328        *	   comments; however, parsing the body will slow down the compilation
   329    329        *	   of all procs whose argument list is just _args_
   330    330        */
   331    331   
   332         -    if (TclFetchIntRep(objv[3], &tclProcBodyType)) {
          332  +    if (TclHasIntRep(objv[3], &tclProcBodyType)) {
   333    333   	goto done;
   334    334       }
   335    335   
   336    336       procArgs = TclGetString(objv[2]);
   337    337   
   338    338       while (*procArgs == ' ') {
   339    339   	procArgs++;

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/tclRegexp.c.

   994    994       }
   995    995       for (i = NUM_REGEXPS - 2; i >= 0; i--) {
   996    996   	tsdPtr->patterns[i+1] = tsdPtr->patterns[i];
   997    997   	tsdPtr->patLengths[i+1] = tsdPtr->patLengths[i];
   998    998   	tsdPtr->regexps[i+1] = tsdPtr->regexps[i];
   999    999       }
  1000   1000       tsdPtr->patterns[0] = ckalloc(length + 1);
  1001         -    memcpy(tsdPtr->patterns[0], string, (unsigned) length + 1);
         1001  +    memcpy(tsdPtr->patterns[0], string, length + 1);
  1002   1002       tsdPtr->patLengths[0] = length;
  1003   1003       tsdPtr->regexps[0] = regexpPtr;
  1004   1004   
  1005   1005       return regexpPtr;
  1006   1006   }
  1007   1007   
  1008   1008   /*

Changes to generic/tclResult.c.

   434    434   	if (length > TCL_RESULT_SIZE) {
   435    435   	    iPtr->result = ckalloc(length + 1);
   436    436   	    iPtr->freeProc = TCL_DYNAMIC;
   437    437   	} else {
   438    438   	    iPtr->result = iPtr->resultSpace;
   439    439   	    iPtr->freeProc = 0;
   440    440   	}
   441         -	memcpy(iPtr->result, result, (unsigned) length+1);
          441  +	memcpy(iPtr->result, result, length+1);
   442    442       } else {
   443    443   	iPtr->result = (char *) result;
   444    444   	iPtr->freeProc = freeProc;
   445    445       }
   446    446   
   447    447       /*
   448    448        * If the old result was dynamically-allocated, free it up. Do it here,

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
................................................................................
   877    877   	case 'c':
   878    878   	    /*
   879    879   	     * Scan a single Unicode character.
   880    880   	     */
   881    881   
   882    882   	    offset = TclUtfToUniChar(string, &sch);
   883    883   	    i = (int)sch;
   884         -#if TCL_UTF_MAX == 4
   885         -	    if (!offset) {
   886         -		offset = TclUtfToUniChar(string, &sch);
          884  +#if TCL_UTF_MAX <= 4
          885  +	    if ((sch >= 0xD800) && (offset < 3)) {
          886  +		offset += TclUtfToUniChar(string+offset, &sch);
   887    887   		i = (((i<<10) & 0x0FFC00) + 0x10000) + (sch & 0x3FF);
   888    888   	    }
   889    889   #endif
   890    890   	    string += offset;
   891    891   	    if (!(flags & SCAN_SUPPRESS)) {
   892    892   		objPtr = Tcl_NewWideIntObj(i);
   893    893   		Tcl_IncrRefCount(objPtr);
................................................................................
   939    939   		}
   940    940   	    } else if (flags & SCAN_BIG) {
   941    941   		if (flags & SCAN_UNSIGNED) {
   942    942   		    mp_int big;
   943    943   		    int code = Tcl_GetBignumFromObj(interp, objPtr, &big);
   944    944   
   945    945   		    if (code == TCL_OK) {
   946         -			if (mp_isneg(&big)) {
          946  +			if (big.sign != MP_ZPOS) {
   947    947   			    code = TCL_ERROR;
   948    948   			}
   949    949   			mp_clear(&big);
   950    950   		    }
   951    951   
   952    952   		    if (code == TCL_ERROR) {
   953    953   			if (objs != NULL) {

Changes to generic/tclStrToD.c.

   316    316   static char *		ShorteningQuickFormat(double, int, int, double,
   317    317   			    char *, int *);
   318    318   static char *		StrictQuickFormat(double, int, int, double,
   319    319   			    char *, int *);
   320    320   static char *		QuickConversion(double, int, int, int, int, int, int,
   321    321   			    int *, char **);
   322    322   static void		CastOutPowersOf2(int *, int *, int *);
   323         -static char *		ShorteningInt64Conversion(Double *, int, Tcl_WideUInt,
          323  +static char *		ShorteningInt64Conversion(Double *, Tcl_WideUInt,
   324    324   			    int, int, int, int, int, int, int, int, int,
   325    325   			    int, int, int *, char **);
   326         -static char *		StrictInt64Conversion(Double *, int, Tcl_WideUInt,
          326  +static char *		StrictInt64Conversion(Double *, Tcl_WideUInt,
   327    327   			    int, int, int, int, int, int,
   328    328   			    int, int, int *, char **);
   329    329   static int		ShouldBankerRoundUpPowD(mp_int *, int, int);
   330    330   static int		ShouldBankerRoundUpToNextPowD(mp_int *, mp_int *,
   331         -			    int, int, int, mp_int *);
          331  +			    int, int, mp_int *);
   332    332   static char *		ShorteningBignumConversionPowD(Double *dPtr,
   333         -			    int convType, Tcl_WideUInt bw, int b2, int b5,
          333  +			    Tcl_WideUInt bw, int b2, int b5,
   334    334   			    int m2plus, int m2minus, int m5,
   335    335   			    int sd, int k, int len,
   336    336   			    int ilim, int ilim1, int *decpt,
   337    337   			    char **endPtr);
   338         -static char *		StrictBignumConversionPowD(Double *dPtr, int convType,
          338  +static char *		StrictBignumConversionPowD(Double *dPtr,
   339    339   			    Tcl_WideUInt bw, int b2, int b5,
   340    340   			    int sd, int k, int len,
   341    341   			    int ilim, int ilim1, int *decpt,
   342    342   			    char **endPtr);
   343    343   static int		ShouldBankerRoundUp(mp_int *, mp_int *, int);
   344    344   static int		ShouldBankerRoundUpToNext(mp_int *, mp_int *,
   345         -			    mp_int *, int, int, mp_int *);
   346         -static char *		ShorteningBignumConversion(Double *dPtr, int convType,
          345  +			    mp_int *, int);
          346  +static char *		ShorteningBignumConversion(Double *dPtr,
   347    347   			    Tcl_WideUInt bw, int b2,
   348    348   			    int m2plus, int m2minus,
   349    349   			    int s2, int s5, int k, int len,
   350    350   			    int ilim, int ilim1, int *decpt,
   351    351   			    char **endPtr);
   352         -static char *		StrictBignumConversion(Double *dPtr, int convType,
          352  +static char *		StrictBignumConversion(Double *dPtr,
   353    353   			    Tcl_WideUInt bw, int b2,
   354    354   			    int s2, int s5, int k, int len,
   355    355   			    int ilim, int ilim1, int *decpt,
   356    356   			    char **endPtr);
   357    357   static double		BignumToBiasedFrExp(const mp_int *big, int *machexp);
   358    358   static double		Pow10TimesFrExp(int exponent, double fraction,
   359    359   			    int *machexp);
................................................................................
   526    526   				 * point. */
   527    527       int status = TCL_OK;	/* Status to return to caller. */
   528    528       char d = 0;			/* Last hexadecimal digit scanned; initialized
   529    529   				 * to avoid a compiler warning. */
   530    530       int shift = 0;		/* Amount to shift when accumulating binary */
   531    531       int explicitOctal = 0;
   532    532   
   533         -#define ALL_BITS	(~(Tcl_WideUInt)0)
          533  +#define ALL_BITS	((Tcl_WideUInt)-1)
   534    534   #define MOST_BITS	(ALL_BITS >> 1)
   535    535   
   536    536       /*
   537    537        * Initialize bytes to start of the object's string rep if the caller
   538    538        * didn't pass anything else.
   539    539        */
   540    540   
   541    541       if (bytes == NULL) {
   542    542   	if (interp == NULL && endPtrPtr == NULL) {
   543         -	    if (objPtr->typePtr == &tclDictType) {
          543  +	    if (TclHasIntRep(objPtr, &tclDictType)) {
   544    544   		/* A dict can never be a (single) number */
   545    545   		return TCL_ERROR;
   546    546   	    }
   547         -	    if (objPtr->typePtr == &tclListType) {
          547  +	    if (TclHasIntRep(objPtr, &tclListType)) {
   548    548   		int length;
   549    549   		/* A list can only be a (single) number if its length == 1 */
   550    550   		TclListObjLength(NULL, objPtr, &length);
   551    551   		if (length != 1) {
   552    552   		    return TCL_ERROR;
   553    553   		}
   554    554   	    }
................................................................................
   705    705   			 * too large shifts first.
   706    706   			 */
   707    707   
   708    708   			if ((octalSignificandWide != 0)
   709    709   				&& (((size_t)shift >=
   710    710   					CHAR_BIT*sizeof(Tcl_WideUInt))
   711    711   				|| (octalSignificandWide >
   712         -					(~(Tcl_WideUInt)0 >> shift)))) {
          712  +					((Tcl_WideUInt)-1 >> shift)))) {
   713    713   			    octalSignificandOverflow = 1;
   714    714   			    TclInitBignumFromWideUInt(&octalSignificandBig,
   715    715   				    octalSignificandWide);
   716    716   			}
   717    717   		    }
   718    718   		    if (!octalSignificandOverflow) {
   719    719   			octalSignificandWide =
................................................................................
   822    822   		     * Shifting by more bits than are in the value being
   823    823   		     * shifted is at least de facto nonportable. Check for too
   824    824   		     * large shifts first.
   825    825   		     */
   826    826   
   827    827   		    if (significandWide != 0 &&
   828    828   			    ((size_t)shift >= CHAR_BIT*sizeof(Tcl_WideUInt) ||
   829         -			    significandWide > (~(Tcl_WideUInt)0 >> shift))) {
          829  +			    significandWide > ((Tcl_WideUInt)-1 >> shift))) {
   830    830   			significandOverflow = 1;
   831    831   			TclInitBignumFromWideUInt(&significandBig,
   832    832   				significandWide);
   833    833   		    }
   834    834   		}
   835    835   		if (!significandOverflow) {
   836    836   		    significandWide = (significandWide << shift) + d;
................................................................................
   863    863   		     * Shifting by more bits than are in the value being
   864    864   		     * shifted is at least de facto nonportable. Check for too
   865    865   		     * large shifts first.
   866    866   		     */
   867    867   
   868    868   		    if (significandWide != 0 &&
   869    869   			    ((size_t)shift >= CHAR_BIT*sizeof(Tcl_WideUInt) ||
   870         -			    significandWide > (~(Tcl_WideUInt)0 >> shift))) {
          870  +			    significandWide > ((Tcl_WideUInt)-1 >> shift))) {
   871    871   			significandOverflow = 1;
   872    872   			TclInitBignumFromWideUInt(&significandBig,
   873    873   				significandWide);
   874    874   		    }
   875    875   		}
   876    876   		if (!significandOverflow) {
   877    877   		    significandWide = (significandWide << shift) + 1;
................................................................................
  1447   1447   	    /*
  1448   1448   	     * There's no need to multiply if the multiplicand is zero.
  1449   1449   	     */
  1450   1450   
  1451   1451   	    *wideRepPtr = digit;
  1452   1452   	    return 0;
  1453   1453   	} else if (numZeros >= maxpow10_wide
  1454         -		|| w > ((~(Tcl_WideUInt)0)-digit)/pow10_wide[numZeros+1]) {
         1454  +		|| w > ((Tcl_WideUInt)-1-digit)/pow10_wide[numZeros+1]) {
  1455   1455   	    /*
  1456   1456   	     * Wide multiplication will overflow.  Expand the number to a
  1457   1457   	     * bignum and fall through into the bignum case.
  1458   1458   	     */
  1459   1459   
  1460   1460   	    TclInitBignumFromWideUInt(bignumRepPtr, w);
  1461   1461   	} else {
................................................................................
  2406   2406    *	one too high.
  2407   2407    *
  2408   2408    *----------------------------------------------------------------------
  2409   2409    */
  2410   2410   
  2411   2411   static inline void
  2412   2412   SetPrecisionLimits(
  2413         -    int convType,		/* Type of conversion: TCL_DD_SHORTEST,
  2414         -				 * TCL_DD_STEELE0, TCL_DD_E_FMT,
  2415         -				 * TCL_DD_F_FMT. */
         2413  +    int flags,		/* Type of conversion: TCL_DD_SHORTEST,
         2414  +				 * TCL_DD_E_FMT, TCL_DD_F_FMT. */
  2416   2415       int k,			/* Floor(log10(number to convert)) */
  2417   2416       int *ndigitsPtr,		/* IN/OUT: Number of digits requested (will be
  2418   2417   				 *         adjusted if needed). */
  2419   2418       int *iPtr,			/* OUT: Maximum number of digits to return. */
  2420   2419       int *iLimPtr,		/* OUT: Number of digits of significance if
  2421   2420   				 *      the bignum method is used.*/
  2422   2421       int *iLim1Ptr)		/* OUT: Number of digits of significance if
  2423   2422   				 *      the quick method is used. */
  2424   2423   {
  2425         -    switch (convType) {
  2426         -    case TCL_DD_SHORTEST0:
  2427         -    case TCL_DD_STEELE0:
  2428         -	*iLimPtr = *iLim1Ptr = -1;
  2429         -	*iPtr = 18;
  2430         -	*ndigitsPtr = 0;
  2431         -	break;
         2424  +    switch (flags & TCL_DD_CONVERSION_TYPE_MASK) {
  2432   2425       case TCL_DD_E_FORMAT:
  2433   2426   	if (*ndigitsPtr <= 0) {
  2434   2427   	    *ndigitsPtr = 1;
  2435   2428   	}
  2436   2429   	*iLimPtr = *iLim1Ptr = *iPtr = *ndigitsPtr;
  2437   2430   	break;
  2438   2431       case TCL_DD_F_FORMAT:
................................................................................
  2440   2433   	*iLimPtr = *iPtr;
  2441   2434   	*iLim1Ptr = *iPtr - 1;
  2442   2435   	if (*iPtr <= 0) {
  2443   2436   	    *iPtr = 1;
  2444   2437   	}
  2445   2438   	break;
  2446   2439       default:
  2447         -	*iPtr = -1;
  2448         -	*iLimPtr = -1;
  2449         -	*iLim1Ptr = -1;
  2450         -	Tcl_Panic("impossible conversion type in TclDoubleDigits");
         2440  +	*iLimPtr = *iLim1Ptr = -1;
         2441  +	*iPtr = 18;
         2442  +	*ndigitsPtr = 0;
         2443  +	break;
  2451   2444       }
  2452   2445   }
  2453   2446   
  2454   2447   /*
  2455   2448    *----------------------------------------------------------------------
  2456   2449    *
  2457   2450    * BumpUp --
................................................................................
  2873   2866    *
  2874   2867    *----------------------------------------------------------------------
  2875   2868    */
  2876   2869   
  2877   2870   static inline char *
  2878   2871   ShorteningInt64Conversion(
  2879   2872       Double *dPtr,		/* Original number to convert. */
  2880         -    int convType,		/* Type of conversion (shortest, Steele,
  2881         -				 * E format, F format). */
  2882   2873       Tcl_WideUInt bw,		/* Integer significand. */
  2883   2874       int b2, int b5,		/* Scale factor for the significand in the
  2884   2875   				 * numerator. */
  2885   2876       int m2plus, int m2minus, int m5,
  2886   2877   				/* Scale factors for 1/2 ulp in the numerator
  2887   2878   				 * (will be different if bw == 1. */
  2888   2879       int s2, int s5,		/* Scale factors for the denominator. */
................................................................................
  2941   2932   
  2942   2933   	/*
  2943   2934   	 * Does the current digit put us on the low side of the exact value
  2944   2935   	 * but within within roundoff of being exact?
  2945   2936   	 */
  2946   2937   
  2947   2938   	if (b < mplus || (b == mplus
  2948         -		&& convType != TCL_DD_STEELE0 && (dPtr->w.word1 & 1) == 0)) {
         2939  +		&& (dPtr->w.word1 & 1) == 0)) {
  2949   2940   	    /*
  2950   2941   	     * Make sure we shouldn't be rounding *up* instead, in case the
  2951   2942   	     * next number above is closer.
  2952   2943   	     */
  2953   2944   
  2954   2945   	    if (2 * b > S || (2 * b == S && (digit & 1) != 0)) {
  2955   2946   		++digit;
................................................................................
  2970   2961   
  2971   2962   	/*
  2972   2963   	 * Does one plus the current digit put us within roundoff of the
  2973   2964   	 * number?
  2974   2965   	 */
  2975   2966   
  2976   2967   	if (b > S - mminus || (b == S - mminus
  2977         -		&& convType != TCL_DD_STEELE0 && (dPtr->w.word1 & 1) == 0)) {
         2968  +		&& (dPtr->w.word1 & 1) == 0)) {
  2978   2969   	    if (digit == 9) {
  2979   2970   		*s++ = '9';
  2980   2971   		s = BumpUp(s, retval, &k);
  2981   2972   		break;
  2982   2973   	    }
  2983   2974   	    ++digit;
  2984   2975   	    *s++ = '0' + digit;
................................................................................
  3042   3033    *
  3043   3034    *----------------------------------------------------------------------
  3044   3035    */
  3045   3036   
  3046   3037   static inline char *
  3047   3038   StrictInt64Conversion(
  3048   3039       Double *dPtr,		/* Original number to convert. */
  3049         -    int convType,		/* Type of conversion (shortest, Steele,
  3050         -				 * E format, F format). */
  3051   3040       Tcl_WideUInt bw,		/* Integer significand. */
  3052   3041       int b2, int b5,		/* Scale factor for the significand in the
  3053   3042   				 * numerator. */
  3054   3043       int s2, int s5,		/* Scale factors for the denominator. */
  3055   3044       int k,			/* Number of output digits before the decimal
  3056   3045   				 * point. */
  3057   3046       int len,			/* Number of digits to allocate. */
................................................................................
  3152   3141   static inline int
  3153   3142   ShouldBankerRoundUpPowD(
  3154   3143       mp_int *b,			/* Numerator of the fraction. */
  3155   3144       int sd,			/* Denominator is 2**(sd*DIGIT_BIT). */
  3156   3145       int isodd)			/* 1 if the digit is odd, 0 if even. */
  3157   3146   {
  3158   3147       int i;
  3159         -    static const mp_digit topbit = 1 << (DIGIT_BIT - 1);
         3148  +    static const mp_digit topbit = ((mp_digit)1) << (DIGIT_BIT - 1);
  3160   3149   
  3161   3150       if (b->used < sd || (b->dp[sd-1] & topbit) == 0) {
  3162   3151   	return 0;
  3163   3152       }
  3164   3153       if (b->dp[sd-1] != topbit) {
  3165   3154   	return 1;
  3166   3155       }
................................................................................
  3188   3177    */
  3189   3178   
  3190   3179   static inline int
  3191   3180   ShouldBankerRoundUpToNextPowD(
  3192   3181       mp_int *b,			/* Numerator of the fraction. */
  3193   3182       mp_int *m,			/* Numerator of the rounding tolerance. */
  3194   3183       int sd,			/* Common denominator is 2**(sd*DIGIT_BIT). */
  3195         -    int convType,		/* Conversion type: STEELE defeats
  3196         -				 * round-to-even (not sure why one wants to do
  3197         -				 * this; I copied it from Gay). FIXME */
  3198   3184       int isodd,			/* 1 if the integer significand is odd. */
  3199   3185       mp_int *temp)		/* Work area for the calculation. */
  3200   3186   {
  3201   3187       int i;
  3202   3188   
  3203   3189       /*
  3204   3190        * Compare B and S-m - which is the same as comparing B+m and S - which we
................................................................................
  3216   3202       }
  3217   3203       for (i = sd-1; i >= 0; --i) {
  3218   3204   				/* Check for ==s */
  3219   3205   	if (temp->dp[i] != 0) {	/* > s */
  3220   3206   	    return 1;
  3221   3207   	}
  3222   3208       }
  3223         -    if (convType == TCL_DD_STEELE0) {
  3224         -				/* Biased rounding. */
  3225         -	return 0;
  3226         -    }
  3227   3209       return isodd;
  3228   3210   }
  3229   3211   
  3230   3212   /*
  3231   3213    *----------------------------------------------------------------------
  3232   3214    *
  3233   3215    * ShorteningBignumConversionPowD --
................................................................................
  3249   3231    *
  3250   3232    *----------------------------------------------------------------------
  3251   3233    */
  3252   3234   
  3253   3235   static inline char *
  3254   3236   ShorteningBignumConversionPowD(
  3255   3237       Double *dPtr,		/* Original number to convert. */
  3256         -    int convType,		/* Type of conversion (shortest, Steele,
  3257         -				 * E format, F format). */
  3258   3238       Tcl_WideUInt bw,		/* Integer significand. */
  3259   3239       int b2, int b5,		/* Scale factor for the significand in the
  3260   3240   				 * numerator. */
  3261   3241       int m2plus, int m2minus, int m5,
  3262   3242   				/* Scale factors for 1/2 ulp in the numerator
  3263   3243   				 * (will be different if bw == 1). */
  3264   3244       int sd,			/* Scale factor for the denominator. */
................................................................................
  3336   3316   	/*
  3337   3317   	 * Does the current digit put us on the low side of the exact value
  3338   3318   	 * but within within roundoff of being exact?
  3339   3319   	 */
  3340   3320   
  3341   3321   	r1 = mp_cmp_mag(&b, (m2plus > m2minus)? &mplus : &mminus);
  3342   3322   	if (r1 == MP_LT || (r1 == MP_EQ
  3343         -		&& convType != TCL_DD_STEELE0 && (dPtr->w.word1 & 1) == 0)) {
         3323  +		&& (dPtr->w.word1 & 1) == 0)) {
  3344   3324   	    /*
  3345   3325   	     * Make sure we shouldn't be rounding *up* instead, in case the
  3346   3326   	     * next number above is closer.
  3347   3327   	     */
  3348   3328   
  3349   3329   	    if (ShouldBankerRoundUpPowD(&b, sd, digit&1)) {
  3350   3330   		++digit;
................................................................................
  3364   3344   	}
  3365   3345   
  3366   3346   	/*
  3367   3347   	 * Does one plus the current digit put us within roundoff of the
  3368   3348   	 * number?
  3369   3349   	 */
  3370   3350   
  3371         -	if (ShouldBankerRoundUpToNextPowD(&b, &mminus, sd, convType,
         3351  +	if (ShouldBankerRoundUpToNextPowD(&b, &mminus, sd,
  3372   3352   		dPtr->w.word1 & 1, &temp)) {
  3373   3353   	    if (digit == 9) {
  3374   3354   		*s++ = '9';
  3375   3355   		s = BumpUp(s, retval, &k);
  3376   3356   		break;
  3377   3357   	    }
  3378   3358   	    ++digit;
................................................................................
  3442   3422    *
  3443   3423    *----------------------------------------------------------------------
  3444   3424    */
  3445   3425   
  3446   3426   static inline char *
  3447   3427   StrictBignumConversionPowD(
  3448   3428       Double *dPtr,		/* Original number to convert. */
  3449         -    int convType,		/* Type of conversion (shortest, Steele,
  3450         -				 * E format, F format). */
  3451   3429       Tcl_WideUInt bw,		/* Integer significand. */
  3452   3430       int b2, int b5,		/* Scale factor for the significand in the
  3453   3431   				 * numerator. */
  3454   3432       int sd,			/* Scale factor for the denominator. */
  3455   3433       int k,			/* Number of output digits before the decimal
  3456   3434   				 * point. */
  3457   3435       int len,			/* Number of digits to allocate. */
................................................................................
  3464   3442       char *retval = ckalloc(len + 1);
  3465   3443   				/* Output buffer. */
  3466   3444       mp_int b;			/* Numerator of the fraction being
  3467   3445   				 * converted. */
  3468   3446       mp_digit digit;		/* Current output digit. */
  3469   3447       char *s = retval;		/* Cursor in the output buffer. */
  3470   3448       int i;			/* Index in the output buffer. */
  3471         -    mp_int temp;
  3472   3449   
  3473   3450       /*
  3474   3451        * b = bw * 2**b2 * 5**b5
  3475   3452        */
  3476   3453   
  3477   3454       TclInitBignumFromWideUInt(&b, bw);
  3478   3455       MulPow5(&b, b5, &b);
................................................................................
  3483   3460        */
  3484   3461   
  3485   3462       if (b.used <= sd) {
  3486   3463   	mp_mul_d(&b, 10, &b);
  3487   3464   	ilim = ilim1;
  3488   3465   	--k;
  3489   3466       }
  3490         -    mp_init(&temp);
  3491   3467   
  3492   3468       /*
  3493   3469        * Loop through the digits. Do division and mod by s == 2**(sd*DIGIT_BIT)
  3494   3470        * by mp_digit extraction.
  3495   3471        */
  3496   3472   
  3497   3473       i = 1;
................................................................................
  3532   3508       }
  3533   3509   
  3534   3510       /*
  3535   3511        * Endgame - store the location of the decimal point and the end of the
  3536   3512        * string.
  3537   3513        */
  3538   3514   
  3539         -    mp_clear_multi(&b, &temp, NULL);
         3515  +    mp_clear(&b);
  3540   3516       *s = '\0';
  3541   3517       *decpt = k;
  3542   3518       if (endPtr) {
  3543   3519   	*endPtr = s;
  3544   3520       }
  3545   3521       return retval;
  3546   3522   }
................................................................................
  3596   3572   
  3597   3573   static inline int
  3598   3574   ShouldBankerRoundUpToNext(
  3599   3575       mp_int *b,			/* Remainder from the division that produced
  3600   3576   				 * the last digit. */
  3601   3577       mp_int *m,			/* Numerator of the rounding tolerance. */
  3602   3578       mp_int *S,			/* Denominator. */
  3603         -    int convType,		/* Conversion type: STEELE0 defeats
  3604         -				 * round-to-even. (Not sure why one would want
  3605         -				 * this; I coped it from Gay). FIXME */
  3606         -    int isodd,			/* 1 if the integer significand is odd. */
  3607         -    mp_int *temp)		/* Work area needed for the calculation. */
         3579  +    int isodd)			/* 1 if the integer significand is odd. */
  3608   3580   {
  3609   3581       int r;
         3582  +    mp_int temp;
  3610   3583   
  3611   3584       /*
  3612   3585        * Compare b and S-m: this is the same as comparing B+m and S.
  3613   3586        */
  3614   3587   
  3615         -    mp_add(b, m, temp);
  3616         -    r = mp_cmp_mag(temp, S);
         3588  +    mp_init(&temp);
         3589  +    mp_add(b, m, &temp);
         3590  +    r = mp_cmp_mag(&temp, S);
         3591  +    mp_clear(&temp);
  3617   3592       switch(r) {
  3618   3593       case MP_LT:
  3619   3594   	return 0;
  3620   3595       case MP_EQ:
  3621         -	if (convType == TCL_DD_STEELE0) {
  3622         -	    return 0;
  3623         -	} else {
  3624         -	    return isodd;
  3625         -	}
         3596  +	return isodd;
  3626   3597       case MP_GT:
  3627   3598   	return 1;
  3628   3599       }
  3629   3600       Tcl_Panic("in ShouldBankerRoundUpToNext, trichotomy fails!");
  3630   3601       return 0;
  3631   3602   }
  3632   3603   
................................................................................
  3647   3618    *
  3648   3619    *----------------------------------------------------------------------
  3649   3620    */
  3650   3621   
  3651   3622   static inline char *
  3652   3623   ShorteningBignumConversion(
  3653   3624       Double *dPtr,		/* Original number being converted. */
  3654         -    int convType,		/* Conversion type. */
  3655   3625       Tcl_WideUInt bw,		/* Integer significand and exponent. */
  3656   3626       int b2,			/* Scale factor for the significand. */
  3657   3627       int m2plus, int m2minus,	/* Scale factors for 1/2 ulp in numerator. */
  3658   3628       int s2, int s5,		/* Scale factors for denominator. */
  3659   3629       int k,			/* Guessed position of the decimal point. */
  3660   3630       int len,			/* Size of the digit buffer to allocate. */
  3661   3631       int ilim,			/* Number of digits to convert if b >= s */
................................................................................
  3668   3638       char *s = retval;		/* Cursor in the return value. */
  3669   3639       mp_int b;			/* Numerator of the result. */
  3670   3640       mp_int mminus;		/* 1/2 ulp below the result. */
  3671   3641       mp_int mplus;		/* 1/2 ulp above the result. */
  3672   3642       mp_int S;			/* Denominator of the result. */
  3673   3643       mp_int dig;			/* Current digit of the result. */
  3674   3644       int digit;			/* Current digit of the result. */
  3675         -    mp_int temp;		/* Work area. */
  3676   3645       int minit = 1;		/* Fudge factor for when we misguess k. */
  3677   3646       int i;
  3678   3647       int r1;
  3679   3648   
  3680   3649       /*
  3681   3650        * b = bw * 2**b2 * 5**b5
  3682   3651        * S = 2**s2 * 5*s5
................................................................................
  3704   3673   
  3705   3674       mp_init_set_int(&mminus, minit);
  3706   3675       mp_mul_2d(&mminus, m2minus, &mminus);
  3707   3676       if (m2plus > m2minus) {
  3708   3677   	mp_init_copy(&mplus, &mminus);
  3709   3678   	mp_mul_2d(&mplus, m2plus-m2minus, &mplus);
  3710   3679       }
  3711         -    mp_init(&temp);
  3712   3680   
  3713   3681       /*
  3714   3682        * Loop through the digits.
  3715   3683        */
  3716   3684   
  3717   3685       mp_init(&dig);
  3718   3686       i = 1;
................................................................................
  3725   3693   
  3726   3694   	/*
  3727   3695   	 * Does the current digit leave us with a remainder small enough to
  3728   3696   	 * round to it?
  3729   3697   	 */
  3730   3698   
  3731   3699   	r1 = mp_cmp_mag(&b, (m2plus > m2minus)? &mplus : &mminus);
  3732         -	if (r1 == MP_LT || (r1 == MP_EQ
  3733         -		&& convType != TCL_DD_STEELE0 && (dPtr->w.word1 & 1) == 0)) {
         3700  +	if (r1 == MP_LT || (r1 == MP_EQ && (dPtr->w.word1 & 1) == 0)) {
  3734   3701   	    mp_mul_2d(&b, 1, &b);
  3735   3702   	    if (ShouldBankerRoundUp(&b, &S, digit&1)) {
  3736   3703   		++digit;
  3737   3704   		if (digit == 10) {
  3738   3705   		    *s++ = '9';
  3739   3706   		    s = BumpUp(s, retval, &k);
  3740   3707   		    break;
................................................................................
  3745   3712   	}
  3746   3713   
  3747   3714   	/*
  3748   3715   	 * Does the current digit leave us with a remainder large enough to
  3749   3716   	 * commit to rounding up to the next higher digit?
  3750   3717   	 */
  3751   3718   
  3752         -	if (ShouldBankerRoundUpToNext(&b, &mminus, &S, convType,
  3753         -		dPtr->w.word1 & 1, &temp)) {
         3719  +	if (ShouldBankerRoundUpToNext(&b, &mminus, &S,
         3720  +		dPtr->w.word1 & 1)) {
  3754   3721   	    ++digit;
  3755   3722   	    if (digit == 10) {
  3756   3723   		*s++ = '9';
  3757   3724   		s = BumpUp(s, retval, &k);
  3758   3725   		break;
  3759   3726   	    }
  3760   3727   	    *s++ = '0' + digit;
................................................................................
  3833   3800        * Endgame - store the location of the decimal point and the end of the
  3834   3801        * string.
  3835   3802        */
  3836   3803   
  3837   3804       if (m2plus > m2minus) {
  3838   3805   	mp_clear(&mplus);
  3839   3806       }
  3840         -    mp_clear_multi(&b, &mminus, &temp, &dig, &S, NULL);
         3807  +    mp_clear_multi(&b, &mminus, &dig, &S, NULL);
  3841   3808       *s = '\0';
  3842   3809       *decpt = k;
  3843   3810       if (endPtr) {
  3844   3811   	*endPtr = s;
  3845   3812       }
  3846   3813       return retval;
  3847   3814   }
................................................................................
  3863   3830    *
  3864   3831    *----------------------------------------------------------------------
  3865   3832    */
  3866   3833   
  3867   3834   static inline char *
  3868   3835   StrictBignumConversion(
  3869   3836       Double *dPtr,		/* Original number being converted. */
  3870         -    int convType,		/* Conversion type. */
  3871   3837       Tcl_WideUInt bw,		/* Integer significand and exponent. */
  3872   3838       int b2,			/* Scale factor for the significand. */
  3873   3839       int s2, int s5,		/* Scale factors for denominator. */
  3874   3840       int k,			/* Guessed position of the decimal point. */
  3875   3841       int len,			/* Size of the digit buffer to allocate. */
  3876   3842       int ilim,			/* Number of digits to convert if b >= s */
  3877   3843       int ilim1,			/* Number of digits to convert if b < s */
................................................................................
  3881   3847       char *retval = ckalloc(len+1);
  3882   3848   				/* Buffer of digits to return. */
  3883   3849       char *s = retval;		/* Cursor in the return value. */
  3884   3850       mp_int b;			/* Numerator of the result. */
  3885   3851       mp_int S;			/* Denominator of the result. */
  3886   3852       mp_int dig;			/* Current digit of the result. */
  3887   3853       int digit;			/* Current digit of the result. */
  3888         -    mp_int temp;		/* Work area. */
  3889   3854       int g;			/* Size of the current digit ground. */
  3890   3855       int i, j;
  3891   3856   
  3892   3857       /*
  3893   3858        * b = bw * 2**b2 * 5**b5
  3894   3859        * S = 2**s2 * 5*s5
  3895   3860        */
  3896   3861   
  3897         -    mp_init_multi(&temp, &dig, NULL);
         3862  +    mp_init_multi(&dig, NULL);
  3898   3863       TclInitBignumFromWideUInt(&b, bw);
  3899   3864       mp_mul_2d(&b, b2, &b);
  3900   3865       mp_init_set_int(&S, 1);
  3901   3866       MulPow5(&S, s5, &S); mp_mul_2d(&S, s2, &S);
  3902   3867   
  3903   3868       /*
  3904   3869        * Handle the case where we guess the position of the decimal point wrong.
................................................................................
  3997   3962       ++s;
  3998   3963   
  3999   3964       /*
  4000   3965        * Endgame - store the location of the decimal point and the end of the
  4001   3966        * string.
  4002   3967        */
  4003   3968   
  4004         -    mp_clear_multi(&b, &S, &temp, &dig, NULL);
         3969  +    mp_clear_multi(&b, &S, &dig, NULL);
  4005   3970       *s = '\0';
  4006   3971       *decpt = k;
  4007   3972       if (endPtr) {
  4008   3973   	*endPtr = s;
  4009   3974       }
  4010   3975       return retval;
  4011   3976   }
................................................................................
  4033   3998    * according to the 'flags' argument. Valid values for 'flags' include:
  4034   3999    *	TCL_DD_SHORTEST - This is the default for floating point conversion if
  4035   4000    *		::tcl_precision is 0. It constructs the shortest string of
  4036   4001    *		digits that will reconvert to the given number when scanned.
  4037   4002    *		For floating point numbers that are exactly between two
  4038   4003    *		decimal numbers, it resolves using the 'round to even' rule.
  4039   4004    *		With this value, the 'ndigits' parameter is ignored.
  4040         - *	TCL_DD_STEELE - This value is not recommended and may be removed in
  4041         - *		the future. It follows the conversion algorithm outlined in
  4042         - *		"How to Print Floating-Point Numbers Accurately" by Guy
  4043         - *		L. Steele, Jr. and Jon L. White [Proc. ACM SIGPLAN '90,
  4044         - *		pp. 112-126]. This rule has the effect of rendering 1e23 as
  4045         - *		9.9999999999999999e22 - which is a 'better' approximation in
  4046         - *		the sense that it will reconvert correctly even if a
  4047         - *		subsequent input conversion is 'round up' or 'round down'
  4048         - *		rather than 'round to nearest', but is surprising otherwise.
  4049   4005    *	TCL_DD_E_FORMAT - This value is used to prepare numbers for %e format
  4050   4006    *		conversion (or for default floating->string if tcl_precision
  4051   4007    *		is not 0). It constructs a string of at most 'ndigits' digits,
  4052   4008    *		choosing the one that is closest to the given number (and
  4053   4009    *		resolving ties with 'round to even').  It is allowed to return
  4054   4010    *		fewer than 'ndigits' if the number converts exactly; if the
  4055   4011    *		TCL_DD_E_FORMAT|TCL_DD_SHORTEN_FLAG is supplied instead, it
................................................................................
  4092   4048       int flags,			/* Conversion flags. */
  4093   4049       int *decpt,			/* OUTPUT: Position of the decimal point. */
  4094   4050       int *sign,			/* OUTPUT: 1 if the result is negative. */
  4095   4051       char **endPtr)		/* OUTPUT: If not NULL, receives a pointer to
  4096   4052   				 *	   one character beyond the end of the
  4097   4053   				 *	   returned string. */
  4098   4054   {
  4099         -    int convType = (flags & TCL_DD_CONVERSION_TYPE_MASK);
  4100         -				/* Type of conversion being performed:
  4101         -				 * TCL_DD_SHORTEST0, TCL_DD_STEELE0,
  4102         -				 * TCL_DD_E_FORMAT, or TCL_DD_F_FORMAT. */
  4103   4055       Double d;			/* Union for deconstructing doubles. */
  4104   4056       Tcl_WideUInt bw;		/* Integer significand. */
  4105   4057       int be;			/* Power of 2 by which b must be multiplied */
  4106   4058       int bbits;			/* Number of bits needed to represent b. */
  4107   4059       int denorm;			/* Flag == 1 iff the input number was
  4108   4060   				 * denormalized. */
  4109   4061       int k;			/* Estimate of floor(log10(d)). */
................................................................................
  4163   4115   
  4164   4116       ComputeScale(be, k, &b2, &b5, &s2, &s5);
  4165   4117   
  4166   4118       /*
  4167   4119        * Correct an incorrect caller-supplied 'ndigits'.  Also determine:
  4168   4120        *	i = The maximum number of decimal digits that will be returned in the
  4169   4121        *      formatted string.  This is k + 1 + ndigits for F format, 18 for
  4170         -     *      shortest and Steele, and ndigits for E format.
         4122  +     *      shortest, and ndigits for E format.
  4171   4123        *  ilim = The number of significant digits to convert if k has been
  4172         -     *         guessed correctly. This is -1 for shortest and Steele (which
         4124  +     *         guessed correctly. This is -1 for shortest (which
  4173   4125        *         stop when all significance has been lost), 'ndigits' for E
  4174   4126        *         format, and 'k + 1 + ndigits' for F format.
  4175   4127        *  ilim1 = The minimum number of significant digits to convert if k has
  4176         -     *	        been guessed 1 too high. This, too, is -1 for shortest and
  4177         -     *	        Steele, and 'ndigits' for E format, but it's 'ndigits-1' for F
         4128  +     *	        been guessed 1 too high. This, too, is -1 for shortest,
         4129  +     *	        and 'ndigits' for E format, but it's 'ndigits-1' for F
  4178   4130        *	        format.
  4179   4131        */
  4180   4132   
  4181         -    SetPrecisionLimits(convType, k, &ndigits, &i, &ilim, &ilim1);
         4133  +    SetPrecisionLimits(flags, k, &ndigits, &i, &ilim, &ilim1);
  4182   4134   
  4183   4135       /*
  4184   4136        * Try to do low-precision conversion in floating point rather than
  4185   4137        * resorting to expensive multiprecision arithmetic.
  4186   4138        */
  4187   4139   
  4188   4140       if (ilim >= 0 && ilim <= QUICK_MAX && !(flags & TCL_DD_NO_QUICK)) {
................................................................................
  4247   4199   	     * If 10*2**s2*5**s5 == 2**(s2+1)+5**(s5+1) fits in a 64-bit word,
  4248   4200   	     * then all our intermediate calculations can be done using exact
  4249   4201   	     * 64-bit arithmetic with no need for expensive multiprecision
  4250   4202   	     * operations. (This will be true for all numbers in the range
  4251   4203   	     * [1.0e-3 .. 1.0e+24]).
  4252   4204   	     */
  4253   4205   
  4254         -	    return ShorteningInt64Conversion(&d, convType, bw, b2, b5, m2plus,
         4206  +	    return ShorteningInt64Conversion(&d, bw, b2, b5, m2plus,
  4255   4207   		    m2minus, m5, s2, s5, k, len, ilim, ilim1, decpt, endPtr);
  4256   4208   	} else if (s5 == 0) {
  4257   4209   	    /*
  4258   4210   	     * The denominator is a power of 2, so we can replace division by
  4259   4211   	     * digit shifts. First we round up s2 to a multiple of DIGIT_BIT,
  4260   4212   	     * and adjust m2 and b2 accordingly. Then we launch into a version
  4261   4213   	     * of the comparison that's specialized for the 'power of mp_digit
................................................................................
  4266   4218   		int delta = DIGIT_BIT - (s2 % DIGIT_BIT);
  4267   4219   
  4268   4220   		b2 += delta;
  4269   4221   		m2plus += delta;
  4270   4222   		m2minus += delta;
  4271   4223   		s2 += delta;
  4272   4224   	    }
  4273         -	    return ShorteningBignumConversionPowD(&d, convType, bw, b2, b5,
         4225  +	    return ShorteningBignumConversionPowD(&d, bw, b2, b5,
  4274   4226   		    m2plus, m2minus, m5, s2/DIGIT_BIT, k, len, ilim, ilim1,
  4275   4227   		    decpt, endPtr);
  4276   4228   	} else {
  4277   4229   	    /*
  4278   4230   	     * Alas, there's no helpful special case; use full-up bignum
  4279   4231   	     * arithmetic for the conversion.
  4280   4232   	     */
  4281   4233   
  4282         -	    return ShorteningBignumConversion(&d, convType, bw, b2, m2plus,
         4234  +	    return ShorteningBignumConversion(&d, bw, b2, m2plus,
  4283   4235   		    m2minus, s2, s5, k, len, ilim, ilim1, decpt, endPtr);
  4284   4236   	}
  4285   4237       } else {
  4286   4238   	/*
  4287   4239   	 * Non-shortening conversion.
  4288   4240   	 */
  4289   4241   
................................................................................
  4303   4255   	    /*
  4304   4256   	     * If 10*2**s2*5**s5 == 2**(s2+1)+5**(s5+1) fits in a 64-bit word,
  4305   4257   	     * then all our intermediate calculations can be done using exact
  4306   4258   	     * 64-bit arithmetic with no need for expensive multiprecision
  4307   4259   	     * operations.
  4308   4260   	     */
  4309   4261   
  4310         -	    return StrictInt64Conversion(&d, convType, bw, b2, b5, s2, s5, k,
         4262  +	    return StrictInt64Conversion(&d, bw, b2, b5, s2, s5, k,
  4311   4263   		    len, ilim, ilim1, decpt, endPtr);
  4312   4264   	} else if (s5 == 0) {
  4313   4265   	    /*
  4314   4266   	     * The denominator is a power of 2, so we can replace division by
  4315   4267   	     * digit shifts. First we round up s2 to a multiple of DIGIT_BIT,
  4316   4268   	     * and adjust m2 and b2 accordingly. Then we launch into a version
  4317   4269   	     * of the comparison that's specialized for the 'power of mp_digit
................................................................................
  4320   4272   
  4321   4273   	    if (s2 % DIGIT_BIT != 0) {
  4322   4274   		int delta = DIGIT_BIT - (s2 % DIGIT_BIT);
  4323   4275   
  4324   4276   		b2 += delta;
  4325   4277   		s2 += delta;
  4326   4278   	    }
  4327         -	    return StrictBignumConversionPowD(&d, convType, bw, b2, b5,
         4279  +	    return StrictBignumConversionPowD(&d, bw, b2, b5,
  4328   4280   		    s2/DIGIT_BIT, k, len, ilim, ilim1, decpt, endPtr);
  4329   4281   	} else {
  4330   4282   	    /*
  4331   4283   	     * There are no helpful special cases, but at least we know in
  4332   4284   	     * advance how many digits we will convert. We can run the
  4333   4285   	     * conversion in steps of DIGIT_GROUP digits, so as to have many
  4334   4286   	     * fewer mp_int divisions.
  4335   4287   	     */
  4336   4288   
  4337         -	    return StrictBignumConversion(&d, convType, bw, b2, s2, s5, k,
         4289  +	    return StrictBignumConversion(&d, bw, b2, s2, s5, k,
  4338   4290   		    len, ilim, ilim1, decpt, endPtr);
  4339   4291   	}
  4340   4292       }
  4341   4293   }
  4342   4294   
  4343   4295   /*
  4344   4296    *----------------------------------------------------------------------
................................................................................
  4621   4573   	if (lsb == -1-shift) {
  4622   4574   
  4623   4575   	    /*
  4624   4576   	     * Round to even
  4625   4577   	     */
  4626   4578   
  4627   4579   	    mp_div_2d(a, -shift, &b, NULL);
  4628         -	    if (mp_isodd(&b)) {
         4580  +	    if (mp_get_bit(&b, 0)) {
  4629   4581   		if (b.sign == MP_ZPOS) {
  4630   4582   		    mp_add_d(&b, 1, &b);
  4631   4583   		} else {
  4632   4584   		    mp_sub_d(&b, 1, &b);
  4633   4585   		}
  4634   4586   	    }
  4635   4587   	} else {
................................................................................
  4693   4645   TclCeil(
  4694   4646       const mp_int *a)			/* Integer to convert. */
  4695   4647   {
  4696   4648       double r = 0.0;
  4697   4649       mp_int b;
  4698   4650   
  4699   4651       mp_init(&b);
  4700         -    if (mp_isneg(a)) {
         4652  +    if (a->sign != MP_ZPOS) {
  4701   4653   	mp_neg(a, &b);
  4702   4654   	r = -TclFloor(&b);
  4703   4655       } else {
  4704   4656   	int bits = mp_count_bits(a);
  4705   4657   
  4706   4658   	if (bits > DBL_MAX_EXP*log2FLT_RADIX) {
  4707   4659   	    r = HUGE_VAL;
................................................................................
  4710   4662   
  4711   4663   	    if (shift > 0) {
  4712   4664   		mp_mul_2d(a, shift, &b);
  4713   4665   	    } else if (shift < 0) {
  4714   4666   		mp_int d;
  4715   4667   		mp_init(&d);
  4716   4668   		mp_div_2d(a, -shift, &b, &d);
  4717         -		exact = mp_iszero(&d);
         4669  +		exact = d.used == 0;
  4718   4670   		mp_clear(&d);
  4719   4671   	    } else {
  4720   4672   		mp_copy(a, &b);
  4721   4673   	    }
  4722   4674   	    if (!exact) {
  4723   4675   		mp_add_d(&b, 1, &b);
  4724   4676   	    }
................................................................................
  4750   4702   TclFloor(
  4751   4703       const mp_int *a)			/* Integer to convert. */
  4752   4704   {
  4753   4705       double r = 0.0;
  4754   4706       mp_int b;
  4755   4707   
  4756   4708       mp_init(&b);
  4757         -    if (mp_isneg(a)) {
         4709  +    if (a->sign != MP_ZPOS) {
  4758   4710   	mp_neg(a, &b);
  4759   4711   	r = -TclCeil(&b);
  4760   4712       } else {
  4761   4713   	int bits = mp_count_bits(a);
  4762   4714   
  4763   4715   	if (bits > DBL_MAX_EXP*log2FLT_RADIX) {
  4764   4716   	    r = DBL_MAX;

Changes to generic/tclStringObj.c.

  1387   1387        */
  1388   1388   
  1389   1389       if (stringPtr->hasUnicode) {
  1390   1390   	/*
  1391   1391   	 * If appendObjPtr is not of the "String" type, don't convert it.
  1392   1392   	 */
  1393   1393   
  1394         -	if (appendObjPtr->typePtr == &tclStringType) {
         1394  +	if (TclHasIntRep(appendObjPtr, &tclStringType)) {
  1395   1395   	    Tcl_UniChar *unicode =
  1396   1396   		    Tcl_GetUnicodeFromObj(appendObjPtr, &numChars);
  1397   1397   
  1398   1398   	    AppendUnicodeToUnicodeRep(objPtr, unicode, numChars);
  1399   1399   	} else {
  1400   1400   	    bytes = TclGetStringFromObj(appendObjPtr, &length);
  1401   1401   	    AppendUtfToUnicodeRep(objPtr, bytes, length);
................................................................................
  1408   1408        * in both objects before appending, then set the combined number of
  1409   1409        * characters in the final (appended-to) object.
  1410   1410        */
  1411   1411   
  1412   1412       bytes = TclGetStringFromObj(appendObjPtr, &length);
  1413   1413   
  1414   1414       numChars = stringPtr->numChars;
  1415         -    if ((numChars >= 0) && (appendObjPtr->typePtr == &tclStringType)) {
         1415  +    if ((numChars >= 0) && TclHasIntRep(appendObjPtr, &tclStringType)) {
  1416   1416   	String *appendStringPtr = GET_STRING(appendObjPtr);
  1417   1417   
  1418   1418   	appendNumChars = appendStringPtr->numChars;
  1419   1419       }
  1420   1420   
  1421   1421       AppendUtfToUtfRep(objPtr, bytes, length);
  1422   1422   
................................................................................
  2037   2037   		    numChars = precision;
  2038   2038   		    Tcl_IncrRefCount(segment);
  2039   2039   		    allocSegment = 1;
  2040   2040   		}
  2041   2041   	    }
  2042   2042   	    break;
  2043   2043   	case 'c': {
  2044         -	    char buf[4];
         2044  +	    char buf[4] = "";
  2045   2045   	    int code, length;
  2046   2046   
  2047   2047   	    if (TclGetIntFromObj(interp, segment, &code) != TCL_OK) {
  2048   2048   		goto error;
  2049   2049   	    }
  2050   2050   	    length = Tcl_UniCharToUtf(code, buf);
  2051         -	    if (!length) {
  2052         -		/* Special case for handling upper surrogates. */
  2053         -		length = Tcl_UniCharToUtf(-1, buf);
         2051  +	    if ((code >= 0xD800) && (length < 3)) {
         2052  +		/* Special case for handling high surrogates. */
         2053  +		length += Tcl_UniCharToUtf(-1, buf + length);
  2054   2054   	    }
  2055   2055   	    segment = Tcl_NewStringObj(buf, length);
  2056   2056   	    Tcl_IncrRefCount(segment);
  2057   2057   	    allocSegment = 1;
  2058   2058   	    break;
  2059   2059   	}
  2060   2060   
................................................................................
  2808   2808   char *
  2809   2809   TclGetStringStorage(
  2810   2810       Tcl_Obj *objPtr,
  2811   2811       unsigned int *sizePtr)
  2812   2812   {
  2813   2813       String *stringPtr;
  2814   2814   
  2815         -    if (objPtr->typePtr != &tclStringType || objPtr->bytes == NULL) {
         2815  +    if (!TclHasIntRep(objPtr, &tclStringType) || objPtr->bytes == NULL) {
  2816   2816   	return TclGetStringFromObj(objPtr, (int *)sizePtr);
  2817   2817       }
  2818   2818   
  2819   2819       stringPtr = GET_STRING(objPtr);
  2820   2820       *sizePtr = stringPtr->allocated;
  2821   2821       return objPtr->bytes;
  2822   2822   }
................................................................................
  2856   2856        * Analyze to determine what representation result should be.
  2857   2857        * GOALS:	Avoid shimmering & string rep generation.
  2858   2858        * 		Produce pure bytearray when possible.
  2859   2859        * 		Error on overflow.
  2860   2860        */
  2861   2861   
  2862   2862       if (!binary) {
  2863         -	if (objPtr->typePtr == &tclStringType) {
         2863  +	if (TclHasIntRep(objPtr, &tclStringType)) {
  2864   2864   	    String *stringPtr = GET_STRING(objPtr);
  2865   2865   	    if (stringPtr->hasUnicode) {
  2866   2866   		unichar = 1;
  2867   2867   	    }
  2868   2868   	}
  2869   2869       }
  2870   2870   
................................................................................
  3033   3033   		    /* Prevent shimmer of non-string types. */
  3034   3034   		    allowUniChar = 0;
  3035   3035   		}
  3036   3036   	    }
  3037   3037   	} else {
  3038   3038   	    /* assert (objPtr->typePtr != NULL) -- stork! */
  3039   3039   	    binary = 0;
  3040         -	    if (objPtr->typePtr == &tclStringType) {
         3040  +	    if (TclHasIntRep(objPtr, &tclStringType)) {
  3041   3041   		/* Have a pure Unicode value; ask to preserve it */
  3042   3042   		requestUniChar = 1;
  3043   3043   	    } else {
  3044   3044   		/* Have another type; prevent shimmer */
  3045   3045   		allowUniChar = 0;
  3046   3046   	    }
  3047   3047   	}
................................................................................
  3223   3223   	     * value we know we can safely use, or it is an empty string.
  3224   3224   	     * We don't need to copy bytes from the empty strings.
  3225   3225   	     */
  3226   3226   
  3227   3227   	    if (TclIsPureByteArray(objPtr)) {
  3228   3228   		int more;
  3229   3229   		unsigned char *src = Tcl_GetByteArrayFromObj(objPtr, &more);
  3230         -		memcpy(dst, src, (size_t) more);
         3230  +		memcpy(dst, src, more);
  3231   3231   		dst += more;
  3232   3232   	    }
  3233   3233   	}
  3234   3234       } else if (allowUniChar && requestUniChar) {
  3235   3235   	/* Efficiently produce a pure Tcl_UniChar array result */
  3236   3236   	Tcl_UniChar *dst;
  3237   3237   
................................................................................
  3322   3322   	while (objc--) {
  3323   3323   	    Tcl_Obj *objPtr = *objv++;
  3324   3324   
  3325   3325   	    if ((objPtr->bytes == NULL) || (objPtr->length)) {
  3326   3326   		int more;
  3327   3327   		char *src = Tcl_GetStringFromObj(objPtr, &more);
  3328   3328   
  3329         -		memcpy(dst, src, (size_t) more);
         3329  +		memcpy(dst, src, more);
  3330   3330   		dst += more;
  3331   3331   	    }
  3332   3332   	}
  3333   3333   	/* Must NUL-terminate! */
  3334   3334   	*dst = '\0';
  3335   3335       }
  3336   3336       return objResultPtr;
................................................................................
  3386   3386   	     * case-sensitive (which is all that really makes sense with byte
  3387   3387   	     * arrays anyway, and we have no memcasecmp() for some reason... :^)
  3388   3388   	     */
  3389   3389   
  3390   3390   	    s1 = (char *) Tcl_GetByteArrayFromObj(value1Ptr, &s1len);
  3391   3391   	    s2 = (char *) Tcl_GetByteArrayFromObj(value2Ptr, &s2len);
  3392   3392   	    memCmpFn = memcmp;
  3393         -	} else if ((value1Ptr->typePtr == &tclStringType)
  3394         -		&& (value2Ptr->typePtr == &tclStringType)) {
         3393  +	} else if (TclHasIntRep(value1Ptr, &tclStringType)
         3394  +		&& TclHasIntRep(value2Ptr, &tclStringType)) {
  3395   3395   	    /*
  3396   3396   	     * Do a unicode-specific comparison if both of the args are of
  3397   3397   	     * String type. If the char length == byte length, we can do a
  3398   3398   	     * memcmp. In benchmark testing this proved the most efficient
  3399   3399   	     * check between the unicode and string comparison operations.
  3400   3400   	     */
  3401   3401   
................................................................................
  4162   4162    */
  4163   4163   
  4164   4164   static int
  4165   4165   SetStringFromAny(
  4166   4166       Tcl_Interp *interp,		/* Used for error reporting if not NULL. */
  4167   4167       Tcl_Obj *objPtr)		/* The object to convert. */
  4168   4168   {
  4169         -    if (objPtr->typePtr != &tclStringType) {
         4169  +    if (!TclHasIntRep(objPtr, &tclStringType)) {
  4170   4170   	String *stringPtr = stringAlloc(0);
  4171   4171   
  4172   4172   	/*
  4173   4173   	 * Convert whatever we have into an untyped value. Just A String.
  4174   4174   	 */
  4175   4175   
  4176   4176   	(void) TclGetString(objPtr);
................................................................................
  4283   4283       if (size > stringPtr->allocated) {
  4284   4284   	GrowStringBuffer(objPtr, size, 1);
  4285   4285       }
  4286   4286   
  4287   4287     copyBytes:
  4288   4288       dst = objPtr->bytes + origLength;
  4289   4289       for (i = 0; i < numChars; i++) {
  4290         -	dst += Tcl_UniCharToUtf((int) unicode[i], dst);
         4290  +	dst += Tcl_UniCharToUtf(unicode[i], dst);
  4291   4291       }
  4292   4292       *dst = '\0';
  4293   4293       objPtr->length = dst - objPtr->bytes;
  4294   4294       return numChars;
  4295   4295   }
  4296   4296   
  4297   4297   /*

Changes to generic/tclStubInit.c.

    53     53   #undef Tcl_SetLongObj
    54     54   #undef TclpInetNtoa
    55     55   #undef TclWinGetServByName
    56     56   #undef TclWinGetSockOpt
    57     57   #undef TclWinSetSockOpt
    58     58   #undef TclWinNToHS
    59     59   #undef TclStaticPackage
           60  +#undef TclBNInitBignumFromLong
           61  +#undef Tcl_BackgroundError
    60     62   #define TclStaticPackage Tcl_StaticPackage
    61     63   
    62     64   /* See bug 510001: TclSockMinimumBuffers needs plat imp */
    63     65   #if defined(_WIN64) || defined(TCL_NO_DEPRECATED) || TCL_MAJOR_VERSION > 8
    64     66   #   define TclSockMinimumBuffersOld 0
    65     67   #else
    66     68   #define TclSockMinimumBuffersOld sockMinimumBuffersOld
................................................................................
    97     99   #   define Tcl_ListMathFuncs 0
    98    100   #   define Tcl_SetIntObj 0
    99    101   #   define Tcl_SetLongObj 0
   100    102   #   define Tcl_NewIntObj 0
   101    103   #   define Tcl_NewLongObj 0
   102    104   #   define Tcl_DbNewLongObj 0
   103    105   #   define Tcl_BackgroundError 0
   104         -
   105    106   #else
          107  +#define TclBNInitBignumFromLong initBignumFromLong
          108  +static void TclBNInitBignumFromLong(mp_int *a, long b)
          109  +{
          110  +    TclInitBignumFromWideInt(a, b);
          111  +}
   106    112   #define TclSetStartupScriptPath setStartupScriptPath
   107    113   static void TclSetStartupScriptPath(Tcl_Obj *path)
   108    114   {
   109    115       Tcl_SetStartupScript(path, NULL);
   110    116   }
   111    117   #define TclGetStartupScriptPath getStartupScriptPath
   112    118   static Tcl_Obj *TclGetStartupScriptPath(void)
................................................................................
   149    155       return 2; /* VER_PLATFORM_WIN32_NT */;
   150    156   }
   151    157   #define TclWinResetInterfaces doNothing
   152    158   #define TclWinSetInterfaces (void (*) (int)) doNothing
   153    159   #endif
   154    160   #   define TclBNInitBignumFromWideUInt TclInitBignumFromWideUInt
   155    161   #   define TclBNInitBignumFromWideInt TclInitBignumFromWideInt
   156         -#   define TclBNInitBignumFromLong TclInitBignumFromLong
   157    162   #endif /* TCL_NO_DEPRECATED */
   158    163   
   159    164   #ifdef _WIN32
   160    165   #   define TclUnixWaitForFile 0
   161    166   #   define TclUnixCopyFile 0
   162    167   #   define TclUnixOpenTemporaryFile 0
   163    168   #   define TclpReaddir 0
................................................................................
   235    240   
   236    241   char *
   237    242   Tcl_WinUtfToTChar(
   238    243       const char *string,
   239    244       int len,
   240    245       Tcl_DString *dsPtr)
   241    246   {
   242         -#if TCL_UTF_MAX > 4
   243         -    Tcl_UniChar ch = 0;
   244         -    wchar_t *w, *wString;
   245         -    const char *p, *end;
   246         -    int oldLength;
   247         -#endif
   248         -
   249    247       Tcl_DStringInit(dsPtr);
   250    248       if (!string) {
   251    249   	return NULL;
   252    250       }
   253         -#if TCL_UTF_MAX > 4
   254         -
   255         -    if (len < 0) {
   256         -	len = strlen(string);
   257         -    }
   258         -
   259         -    /*
   260         -     * Unicode string length in Tcl_UniChars will be <= UTF-8 string length in
   261         -     * bytes.
   262         -     */
   263         -
   264         -    oldLength = Tcl_DStringLength(dsPtr);
   265         -
   266         -    Tcl_DStringSetLength(dsPtr,
   267         -	    oldLength + (int) ((len + 1) * sizeof(wchar_t)));
   268         -    wString = (wchar_t *) (Tcl_DStringValue(dsPtr) + oldLength);
   269         -
   270         -    w = wString;
   271         -    p = string;
   272         -    end = string + len - 4;
   273         -    while (p < end) {
   274         -	p += TclUtfToUniChar(p, &ch);
   275         -	if (ch > 0xFFFF) {
   276         -	    *w++ = (wchar_t) (0xD800 + ((ch -= 0x10000) >> 10));
   277         -	    *w++ = (wchar_t) (0xDC00 | (ch & 0x3FF));
   278         -	} else {
   279         -	    *w++ = ch;
   280         -	}
   281         -    }
   282         -    end += 4;
   283         -    while (p < end) {
   284         -	if (Tcl_UtfCharComplete(p, end-p)) {
   285         -	    p += TclUtfToUniChar(p, &ch);
   286         -	} else {
   287         -	    ch = UCHAR(*p++);
   288         -	}
   289         -	if (ch > 0xFFFF) {
   290         -	    *w++ = (wchar_t) (0xD800 + ((ch -= 0x10000) >> 10));
   291         -	    *w++ = (wchar_t) (0xDC00 | (ch & 0x3FF));
   292         -	} else {
   293         -	    *w++ = ch;
   294         -	}
   295         -    }
   296         -    *w = '\0';
   297         -    Tcl_DStringSetLength(dsPtr,
   298         -	    oldLength + ((char *) w - (char *) wString));
   299         -
   300         -    return (char *)wString;
   301         -#else
   302         -    return (char *)Tcl_UtfToUniCharDString(string, len, dsPtr);
   303         -#endif
          251  +    return (char *)TclUtfToWCharDString(string, len, dsPtr);
   304    252   }
   305    253   
   306    254   char *
   307    255   Tcl_WinTCharToUtf(
   308    256       const char *string,
   309    257       int len,
   310    258       Tcl_DString *dsPtr)
   311    259   {
   312         -#if TCL_UTF_MAX > 4
   313         -    const wchar_t *w, *wEnd;
   314         -    char *p, *result;
   315         -    int oldLength, blen = 1;
   316         -#endif
   317         -
   318    260       Tcl_DStringInit(dsPtr);
   319    261       if (!string) {
   320    262   	return NULL;
   321    263       }
   322    264       if (len < 0) {
   323    265   	len = wcslen((wchar_t *)string);
   324    266       } else {
   325    267   	len /= 2;
   326    268       }
   327         -#if TCL_UTF_MAX > 4
   328         -    oldLength = Tcl_DStringLength(dsPtr);
   329         -    Tcl_DStringSetLength(dsPtr, oldLength + (len + 1) * 4);
   330         -    result = Tcl_DStringValue(dsPtr) + oldLength;
   331         -
   332         -    p = result;
   333         -    wEnd = (wchar_t *)string + len;
   334         -    for (w = (wchar_t *)string; w < wEnd; ) {
   335         -	if (!blen && ((*w & 0xFC00) != 0xDC00)) {
   336         -	    /* Special case for handling upper surrogates. */
   337         -	    p += Tcl_UniCharToUtf(-1, p);
   338         -	}
   339         -	blen = Tcl_UniCharToUtf(*w, p);
   340         -	p += blen;
   341         -	w++;
   342         -    }
   343         -    if (!blen) {
   344         -	/* Special case for handling upper surrogates. */
   345         -	p += Tcl_UniCharToUtf(-1, p);
   346         -    }
   347         -    Tcl_DStringSetLength(dsPtr, oldLength + (p - result));
   348         -
   349         -    return result;
   350         -#else
   351         -    return Tcl_UniCharToUtfDString((Tcl_UniChar *)string, len, dsPtr);
   352         -#endif
          269  +    return TclWCharToUtfDString((const WCHAR *)string, len, dsPtr);
   353    270   }
   354    271   
   355    272   #if defined(TCL_WIDE_INT_IS_LONG)
   356    273   /* On Cygwin64, long is 64-bit while on Win64 long is 32-bit. Therefore
   357    274    * we have to make sure that all stub entries on Cygwin64 follow the Win64
   358    275    * signature. Tcl 9 must find a better solution, but that cannot be done
   359    276    * without introducing a binary incompatibility.
................................................................................
   495    412   #   define TclpLocaltime_unix 0
   496    413   #   define TclpGmtime_unix 0
   497    414   #   define Tcl_SetExitProc 0
   498    415   #   define Tcl_SetPanicProc 0
   499    416   #   define Tcl_FindExecutable 0
   500    417   #   define Tcl_GetUnicode 0
   501    418   #   define TclOldFreeObj 0
          419  +#   undef Tcl_StringMatch
          420  +#   define Tcl_StringMatch 0
          421  +#   define TclBN_reverse 0
          422  +#   define TclBN_fast_s_mp_mul_digs 0
          423  +#   define TclBN_fast_s_mp_sqr 0
          424  +#   define TclBN_mp_karatsuba_mul 0
          425  +#   define TclBN_mp_karatsuba_sqr 0
          426  +#   define TclBN_mp_toom_mul 0
          427  +#   define TclBN_mp_toom_sqr 0
          428  +#   define TclBN_s_mp_add 0
          429  +#   define TclBN_s_mp_mul_digs 0
          430  +#   define TclBN_s_mp_sqr 0
          431  +#   define TclBN_s_mp_sub 0
   502    432   #else /* TCL_NO_DEPRECATED */
   503    433   #   define Tcl_SeekOld seekOld
   504    434   #   define Tcl_TellOld tellOld
   505    435   #   define TclBackgroundException Tcl_BackgroundException
   506    436   #   define TclSetStartupScript Tcl_SetStartupScript
   507    437   #   define TclGetStartupScript Tcl_GetStartupScript
   508    438   #   define TclCreateNamespace Tcl_CreateNamespace
................................................................................
  1014    944       TclBN_mp_set_long, /* 70 */
  1015    945       TclBN_mp_get_long, /* 71 */
  1016    946       TclBN_mp_get_int, /* 72 */
  1017    947       TclBN_mp_tc_and, /* 73 */
  1018    948       TclBN_mp_tc_or, /* 74 */
  1019    949       TclBN_mp_tc_xor, /* 75 */
  1020    950       TclBN_mp_tc_div_2d, /* 76 */
          951  +    TclBN_mp_get_bit, /* 77 */
  1021    952   };
  1022    953   
  1023    954   static const TclStubHooks tclStubHooks = {
  1024    955       &tclPlatStubs,
  1025    956       &tclIntStubs,
  1026    957       &tclIntPlatStubs
  1027    958   };

Changes to generic/tclTest.c.

    48     48   /*
    49     49    * Dynamic string shared by TestdcallCmd and DelCallbackProc; used to collect
    50     50    * the results of the various deletion callbacks.
    51     51    */
    52     52   
    53     53   static Tcl_DString delString;
    54     54   static Tcl_Interp *delInterp;
           55  +static const Tcl_ObjType *properByteArrayType;
    55     56   
    56     57   /*
    57     58    * One of the following structures exists for each asynchronous handler
    58     59    * created by the "testasync" command".
    59     60    */
    60     61   
    61     62   typedef struct TestAsyncHandler {
................................................................................
   548    549    *----------------------------------------------------------------------
   549    550    */
   550    551   
   551    552   int
   552    553   Tcltest_Init(
   553    554       Tcl_Interp *interp)		/* Interpreter for application. */
   554    555   {
   555         -    Tcl_Obj *listPtr;
   556         -    Tcl_Obj **objv;
          556  +    Tcl_Obj **objv, *objPtr;
   557    557       int objc, index;
   558    558       static const char *const specialOptions[] = {
   559    559   	"-appinitprocerror", "-appinitprocdeleteinterp",
   560    560   	"-appinitprocclosestderr", "-appinitprocsetrcfile", NULL
   561    561       };
   562    562   
   563    563       if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
................................................................................
   570    570   	return TCL_ERROR;
   571    571       }
   572    572       /* TIP #268: Full patchlevel instead of just major.minor */
   573    573   
   574    574       if (Tcl_PkgProvideEx(interp, "Tcltest", TCL_PATCH_LEVEL, NULL) == TCL_ERROR) {
   575    575   	return TCL_ERROR;
   576    576       }
          577  +
          578  +    objPtr = Tcl_NewStringObj("abc", 3);
          579  +    (void)Tcl_GetByteArrayFromObj(objPtr, &index);
          580  +    properByteArrayType = objPtr->typePtr;
          581  +    Tcl_DecrRefCount(objPtr);
   577    582   
   578    583       /*
   579    584        * Create additional commands and math functions for testing Tcl.
   580    585        */
   581    586   
   582    587       Tcl_CreateObjCommand(interp, "gettimes", GetTimesObjCmd, NULL, NULL);
   583    588       Tcl_CreateCommand(interp, "noop", NoopCmd, NULL, NULL);
................................................................................
   736    741       }
   737    742   #endif
   738    743   
   739    744       /*
   740    745        * Check for special options used in ../tests/main.test
   741    746        */
   742    747   
   743         -    listPtr = Tcl_GetVar2Ex(interp, "argv", NULL, TCL_GLOBAL_ONLY);
   744         -    if (listPtr != NULL) {
   745         -	if (Tcl_ListObjGetElements(interp, listPtr, &objc, &objv) != TCL_OK) {
          748  +    objPtr = Tcl_GetVar2Ex(interp, "argv", NULL, TCL_GLOBAL_ONLY);
          749  +    if (objPtr != NULL) {
          750  +	if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
   746    751   	    return TCL_ERROR;
   747    752   	}
   748    753   	if (objc && (Tcl_GetIndexFromObj(NULL, objv[0], specialOptions, NULL,
   749    754   		TCL_EXACT, &index) == TCL_OK)) {
   750    755   	    switch (index) {
   751    756   	    case 0:
   752    757   		return TCL_ERROR;
................................................................................
  1697   1702    *
  1698   1703    * Usage:
  1699   1704    *	testdoubledigits fpval ndigits type ?shorten"
  1700   1705    *
  1701   1706    * Parameters:
  1702   1707    *	fpval - Floating-point value to format.
  1703   1708    *	ndigits - Digit count to request from Tcl_DoubleDigits
  1704         - *	type - One of 'shortest', 'Steele', 'e', 'f'
         1709  + *	type - One of 'shortest', 'e', 'f'
  1705   1710    *	shorten - Indicates that the 'shorten' flag should be passed in.
  1706   1711    *
  1707   1712    *-----------------------------------------------------------------------------
  1708   1713    */
  1709   1714   
  1710   1715   static int
  1711   1716   TestdoubledigitsObjCmd(void *unused,
................................................................................
  1715   1720   		       int objc,
  1716   1721   				/* Parameter count */
  1717   1722   		       Tcl_Obj* const objv[])
  1718   1723   				/* Parameter vector */
  1719   1724   {
  1720   1725       static const char* options[] = {
  1721   1726   	"shortest",
  1722         -	"Steele",
  1723   1727   	"e",
  1724   1728   	"f",
  1725   1729   	NULL
  1726   1730       };
  1727   1731       static const int types[] = {
  1728   1732   	TCL_DD_SHORTEST,
  1729         -	TCL_DD_STEELE,
  1730   1733   	TCL_DD_E_FORMAT,
  1731   1734   	TCL_DD_F_FORMAT
  1732   1735       };
  1733   1736   
  1734   1737       const Tcl_ObjType* doubleType;
  1735   1738       double d;
  1736   1739       int status;
................................................................................
  1746   1749       if (objc < 4 || objc > 5) {
  1747   1750   	Tcl_WrongNumArgs(interp, 1, objv, "fpval ndigits type ?shorten?");
  1748   1751   	return TCL_ERROR;
  1749   1752       }
  1750   1753       status = Tcl_GetDoubleFromObj(interp, objv[1], &d);
  1751   1754       if (status != TCL_OK) {
  1752   1755   	doubleType = Tcl_GetObjType("double");
  1753         -	if (objv[1]->typePtr == doubleType
  1754         -	    || TclIsNaN(objv[1]->internalRep.doubleValue)) {
         1756  +	if (Tcl_FetchIntRep(objv[1], doubleType)
         1757  +	    && TclIsNaN(objv[1]->internalRep.doubleValue)) {
  1755   1758   	    status = TCL_OK;
  1756   1759   	    memcpy(&d, &(objv[1]->internalRep.doubleValue), sizeof(double));
  1757   1760   	}
  1758   1761       }
  1759   1762       if (status != TCL_OK
  1760   1763   	|| Tcl_GetIntFromObj(interp, objv[2], &ndigits) != TCL_OK
  1761   1764   	|| Tcl_GetIndexFromObj(interp, objv[3], options, "conversion type",
................................................................................
  5009   5012   static int
  5010   5013   TestbytestringObjCmd(
  5011   5014       void *unused,		/* Not used. */
  5012   5015       Tcl_Interp *interp,		/* Current interpreter. */
  5013   5016       int objc,			/* Number of arguments. */
  5014   5017       Tcl_Obj *const objv[])	/* The argument objects. */
  5015   5018   {
  5016         -    int n;
         5019  +    int n = 0;
  5017   5020       const char *p;
  5018   5021   
  5019   5022       if (objc != 2) {
  5020   5023   	Tcl_WrongNumArgs(interp, 1, objv, "bytearray");
  5021   5024   	return TCL_ERROR;
  5022   5025       }
  5023   5026       p = (const char *)Tcl_GetByteArrayFromObj(objv[1], &n);
         5027  +    if ((p == NULL) || !Tcl_FetchIntRep(objv[1], properByteArrayType)) {
         5028  +	Tcl_AppendResult(interp, "testbytestring expects bytes", NULL);
         5029  +	return TCL_ERROR;
         5030  +    }
  5024   5031       Tcl_SetObjResult(interp, Tcl_NewStringObj(p, n));
  5025   5032       return TCL_OK;
  5026   5033   }
  5027   5034   
  5028   5035   /*
  5029   5036    *----------------------------------------------------------------------
  5030   5037    *

Changes to generic/tclTestObj.c.

   286    286   	    return TCL_ERROR;
   287    287   	}
   288    288   	if (Tcl_GetBignumFromObj(interp, varPtr[varIndex],
   289    289   		&bignumValue) != TCL_OK) {
   290    290   	    return TCL_ERROR;
   291    291   	}
   292    292   	if (!Tcl_IsShared(varPtr[varIndex])) {
   293         -	    Tcl_SetIntObj(varPtr[varIndex], mp_iseven(&bignumValue));
          293  +	    Tcl_SetIntObj(varPtr[varIndex], !mp_get_bit(&bignumValue, 0));
   294    294   	} else {
   295         -	    SetVarToObj(varPtr, varIndex, Tcl_NewIntObj(mp_iseven(&bignumValue)));
          295  +	    SetVarToObj(varPtr, varIndex, Tcl_NewIntObj(!mp_get_bit(&bignumValue, 0)));
   296    296   	}
   297    297   	mp_clear(&bignumValue);
   298    298   	break;
   299    299   
   300    300       case BIGNUM_RADIXSIZE:
   301    301   	if (objc != 3) {
   302    302   	    Tcl_WrongNumArgs(interp, 2, objv, "varIndex");
................................................................................
   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   	}
................................................................................
  1344   1344   	    }
  1345   1345   	    Tcl_SetIntObj(Tcl_GetObjResult(interp), length);
  1346   1346   	    break;
  1347   1347   	case 10:			/* getunicode */
  1348   1348   	    if (objc != 3) {
  1349   1349   		goto wrongNumArgs;
  1350   1350   	    }
  1351         -	    Tcl_GetUnicodeFromObj(varPtr[varIndex], NULL);
         1351  +	    Tcl_GetUnicode(varPtr[varIndex]);
  1352   1352   	    break;
  1353   1353   	case 11:			/* appendself */
  1354   1354   	    if (objc != 4) {
  1355   1355   		goto wrongNumArgs;
  1356   1356   	    }
  1357   1357   	    if (varPtr[varIndex] == NULL) {
  1358   1358   		SetVarToObj(varPtr, varIndex, Tcl_NewObj());

Changes to generic/tclTestProcBodyObj.c.

    17     17   #include "tclInt.h"
    18     18   
    19     19   /*
    20     20    * name and version of this package
    21     21    */
    22     22   
    23     23   static const char packageName[] = "procbodytest";
    24         -static const char packageVersion[] = "1.0";
           24  +static const char packageVersion[] = "1.1";
    25     25   
    26     26   /*
    27     27    * Name of the commands exported by this package
    28     28    */
    29     29   
    30     30   static const char procCommand[] = "proc";
           31  +static const char checkCommand[] = "check";
    31     32   
    32     33   /*
    33     34    * this struct describes an entry in the table of command names and command
    34     35    * procs
    35     36    */
    36     37   
    37     38   typedef struct CmdTable {
................................................................................
    41     42   } CmdTable;
    42     43   
    43     44   /*
    44     45    * Declarations for functions defined in this file.
    45     46    */
    46     47   
    47     48   static int	ProcBodyTestProcObjCmd(ClientData dummy,
           49  +			Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);
           50  +static int	ProcBodyTestCheckObjCmd(ClientData dummy,
    48     51   			Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);
    49     52   static int	ProcBodyTestInitInternal(Tcl_Interp *interp, int isSafe);
    50     53   static int	RegisterCommand(Tcl_Interp* interp,
    51     54   			const char *namespace, const CmdTable *cmdTablePtr);
    52     55   
    53     56   /*
    54     57    * List of commands to create when the package is loaded; must go after the
    55     58    * declarations of the enable command procedure.
    56     59    */
    57     60   
    58     61   static const CmdTable commands[] = {
    59     62       { procCommand,	ProcBodyTestProcObjCmd,	1 },
           63  +    { checkCommand,	ProcBodyTestCheckObjCmd,	1 },
    60     64       { 0, 0, 0 }
    61     65   };
    62     66   
    63     67   static const CmdTable safeCommands[] = {
    64     68       { procCommand,	ProcBodyTestProcObjCmd,	1 },
           69  +    { checkCommand,	ProcBodyTestCheckObjCmd,	1 },
    65     70       { 0, 0, 0 }
    66     71   };
    67     72   
    68     73   /*
    69     74    *----------------------------------------------------------------------
    70     75    *
    71     76    * Procbodytest_Init --
................................................................................
   295    300       myobjv[4] = NULL;
   296    301   
   297    302       result = Tcl_ProcObjCmd(NULL, interp, objc, myobjv);
   298    303       Tcl_DecrRefCount(bodyObjPtr);
   299    304   
   300    305       return result;
   301    306   }
          307  +
          308  +/*
          309  + *----------------------------------------------------------------------
          310  + *
          311  + * ProcBodyTestCheckObjCmd --
          312  + *
          313  + *  Implements the "procbodytest::check" command. Here is the command
          314  + *  description:
          315  + *	procbodytest::check
          316  + *
          317  + *  Performs an internal check that the Tcl_PkgPresent() command returns
          318  + *  the same version number as was registered when the procbodytest package
          319  + *  was provided.  Places a boolean in the interp result indicating the
          320  + *  test outcome.
          321  + *
          322  + * Results:
          323  + *  Returns a standard Tcl code.
          324  + *
          325  + *----------------------------------------------------------------------
          326  + */
          327  +
          328  +static int
          329  +ProcBodyTestCheckObjCmd(
          330  +    ClientData dummy,		/* context; not used */
          331  +    Tcl_Interp *interp,		/* the current interpreter */
          332  +    int objc,			/* argument count */
          333  +    Tcl_Obj *const objv[])	/* arguments */
          334  +{
          335  +    const char *version;
          336  +
          337  +    if (objc != 1) {
          338  +	Tcl_WrongNumArgs(interp, 1, objv, "");
          339  +	return TCL_ERROR;
          340  +    }
          341  +
          342  +    version = Tcl_PkgPresent(interp, packageName, packageVersion, 1);
          343  +    Tcl_SetObjResult(interp, Tcl_NewWideIntObj(
          344  +	    strcmp(version, packageVersion) == 0));
          345  +    return TCL_OK;
          346  +}
   302    347   
   303    348   /*
   304    349    * Local Variables:
   305    350    * mode: c
   306    351    * c-basic-offset: 4
   307    352    * fill-column: 78
   308    353    * End:
   309    354    */

Changes to generic/tclThread.c.

    69     69        * Initialize the key for this thread.
    70     70        */
    71     71   
    72     72       result = TclThreadStorageKeyGet(keyPtr);
    73     73   
    74     74       if (result == NULL) {
    75     75   	result = ckalloc(size);
    76         -	memset(result, 0, (size_t) size);
           76  +	memset(result, 0, size);
    77     77   	TclThreadStorageKeySet(keyPtr, result);
    78     78       }
    79     79   #else /* TCL_THREADS */
    80     80       if (*keyPtr == NULL) {
    81     81   	result = ckalloc(size);
    82         -	memset(result, 0, (size_t)size);
           82  +	memset(result, 0, size);
    83     83   	*keyPtr = result;
    84     84   	RememberSyncObject(keyPtr, &keyRecord);
    85     85       } else {
    86     86   	result = *keyPtr;
    87     87       }
    88     88   #endif /* TCL_THREADS */
    89     89       return result;

Changes to generic/tclTimer.c.

   896    896   	}
   897    897   	command = TclGetStringFromObj(commandPtr, &length);
   898    898   	for (afterPtr = assocPtr->firstAfterPtr;  afterPtr != NULL;
   899    899   		afterPtr = afterPtr->nextPtr) {
   900    900   	    tempCommand = TclGetStringFromObj(afterPtr->commandPtr,
   901    901   		    &tempLength);
   902    902   	    if ((length == tempLength)
   903         -		    && !memcmp(command, tempCommand, (unsigned) length)) {
          903  +		    && !memcmp(command, tempCommand, length)) {
   904    904   		break;
   905    905   	    }
   906    906   	}
   907    907   	if (afterPtr == NULL) {
   908    908   	    afterPtr = GetAfterEvent(assocPtr, commandPtr);
   909    909   	}
   910    910   	if (objc != 3) {

Changes to generic/tclTomMath.decls.

   174    174   declare 49 {
   175    175       void TclBN_mp_zero(mp_int *a)
   176    176   }
   177    177   
   178    178   # internal routines to libtommath - should not be called but must be
   179    179   # exported to accommodate the "tommath" extension
   180    180   
   181         -declare 50 {
          181  +declare 50 {deprecated {is private function in libtommath}} {
   182    182       void TclBN_reverse(unsigned char *s, int len)
   183    183   }
   184         -declare 51 {
          184  +declare 51 {deprecated {is private function in libtommath}} {
   185    185       int TclBN_fast_s_mp_mul_digs(const mp_int *a, const mp_int *b, mp_int *c, int digs)
   186    186   }
   187         -declare 52 {
          187  +declare 52 {deprecated {is private function in libtommath}} {
   188    188       int TclBN_fast_s_mp_sqr(const mp_int *a, mp_int *b)
   189    189   }
   190         -declare 53 {
          190  +declare 53 {deprecated {is private function in libtommath}} {
   191    191       int TclBN_mp_karatsuba_mul(const mp_int *a, const mp_int *b, mp_int *c)
   192    192   }
   193         -declare 54 {
          193  +declare 54 {deprecated {is private function in libtommath}} {
   194    194       int TclBN_mp_karatsuba_sqr(const mp_int *a, mp_int *b)
   195    195   }
   196         -declare 55 {
          196  +declare 55 {deprecated {is private function in libtommath}} {
   197    197       int TclBN_mp_toom_mul(const mp_int *a, const mp_int *b, mp_int *c)
   198    198   }
   199         -declare 56 {
          199  +declare 56 {deprecated {is private function in libtommath}} {
   200    200       int TclBN_mp_toom_sqr(const mp_int *a, mp_int *b)
   201    201   }
   202         -declare 57 {
          202  +declare 57 {deprecated {is private function in libtommath}} {
   203    203       int TclBN_s_mp_add(const mp_int *a, const mp_int *b, mp_int *c)
   204    204   }
   205         -declare 58 {
          205  +declare 58 {deprecated {is private function in libtommath}} {
   206    206       int TclBN_s_mp_mul_digs(const mp_int *a, const mp_int *b, mp_int *c, int digs)
   207    207   }
   208         -declare 59 {
          208  +declare 59 {deprecated {is private function in libtommath}} {
   209    209       int TclBN_s_mp_sqr(const mp_int *a, mp_int *b)
   210    210   }
   211         -declare 60 {
          211  +declare 60 {deprecated {is private function in libtommath}} {
   212    212       int TclBN_s_mp_sub(const mp_int *a, const mp_int *b, mp_int *c)
   213    213   }
   214    214   declare 61 {
   215    215       int TclBN_mp_init_set_int(mp_int *a, unsigned long i)
   216    216   }
   217    217   declare 62 {
   218    218       int TclBN_mp_set_int(mp_int *a, unsigned long i)
................................................................................
   263    263   }
   264    264   declare 75 {
   265    265       int TclBN_mp_tc_xor(const mp_int *a, const mp_int *b, mp_int *c)
   266    266   }
   267    267   declare 76 {
   268    268       int TclBN_mp_tc_div_2d(const mp_int *a, int b, mp_int *c)
   269    269   }
          270  +declare 77 {
          271  +    int TclBN_mp_get_bit(const mp_int *a, int b)
          272  +}
   270    273   
   271    274   
   272    275   # Local Variables:
   273    276   # mode: tcl
   274    277   # End:

Changes to generic/tclTomMath.h.

     3      3    * LibTomMath is a library that provides multiple-precision
     4      4    * integer arithmetic as well as number theoretic functionality.
     5      5    *
     6      6    * The library was designed directly after the MPI library by
     7      7    * Michael Fromberger but has been written from scratch with
     8      8    * additional optimizations in place.
     9      9    *
    10         - * The library is free for all purposes without any express
    11         - * guarantee it works.
           10  + * SPDX-License-Identifier: Unlicense
    12     11    */
    13     12   #ifndef BN_H_
    14     13   #define BN_H_
    15     14   
    16     15   #include "tclTomMathDecls.h"
    17     16   #ifndef MODULE_SCOPE
    18     17   #define MODULE_SCOPE extern
................................................................................
    21     20   
    22     21   
    23     22   #ifdef __cplusplus
    24     23   extern "C" {
    25     24   #endif
    26     25   
    27     26   /* 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__)
           27  +#if defined(_WIN32) || defined(__LLP64__) || defined(__e2k__) || defined(__LCC__)
    29     28   #   define MP_32BIT
    30     29   #endif
    31     30   
    32     31   /* detect 64-bit mode if possible */
    33     32   #if defined(NEVER)
    34     33   #   if !(defined(MP_32BIT) || defined(MP_16BIT) || defined(MP_8BIT))
    35     34   #      if defined(__GNUC__)
................................................................................
   106    105   #      define MP_28BIT
   107    106   #   endif
   108    107   #endif
   109    108   
   110    109   /* otherwise the bits per digit is calculated automatically from the size of a mp_digit */
   111    110   #ifndef DIGIT_BIT
   112    111   #   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    112   #endif
   117    113   
   118    114   #define MP_DIGIT_BIT     DIGIT_BIT
   119    115   #define MP_MASK          ((((mp_digit)1)<<((mp_digit)DIGIT_BIT))-((mp_digit)1))
   120    116   #define MP_DIGIT_MAX     MP_MASK
   121    117   
   122    118   /* equalities */
................................................................................
   127    123   #define MP_ZPOS       0   /* positive integer */
   128    124   #define MP_NEG        1   /* negative */
   129    125   
   130    126   #define MP_OKAY       0   /* ok result */
   131    127   #define MP_MEM        -2  /* out of mem */
   132    128   #define MP_VAL        -3  /* invalid input */
   133    129   #define MP_RANGE      MP_VAL
          130  +#define MP_ITER       -4  /* Max. iterations reached */
   134    131   
   135    132   #define MP_YES        1   /* yes response */
   136    133   #define MP_NO         0   /* no response */
   137    134   
   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   
................................................................................
   353    342   /* Counts the number of lsbs which are zero before the first zero bit */
   354    343   /*
   355    344   int mp_cnt_lsb(const mp_int *a);
   356    345   */
   357    346   
   358    347   /* I Love Earth! */
   359    348   
   360         -/* makes a pseudo-random int of a given size */
          349  +/* makes a pseudo-random mp_int of a given size */
   361    350   /*
   362    351   int mp_rand(mp_int *a, int digits);
   363    352   */
          353  +/* makes a pseudo-random small int of a given size */
          354  +/*
          355  +int mp_rand_digit(mp_digit *r);
          356  +*/
   364    357   
   365    358   #ifdef MP_PRNG_ENABLE_LTM_RNG
   366         -/* as last resort we will fall back to libtomcrypt's rng_get_bytes()
   367         - * in case you don't use libtomcrypt or use it w/o rng_get_bytes()
   368         - * you have to implement it somewhere else, as it's required */
          359  +/* A last resort to provide random data on systems without any of the other
          360  + * implemented ways to gather entropy.
          361  + * It is compatible with `rng_get_bytes()` from libtomcrypt so you could
          362  + * provide that one and then set `ltm_rng = rng_get_bytes;` */
   369    363   extern unsigned long (*ltm_rng)(unsigned char *out, unsigned long outlen, void (*callback)(void));
   370    364   extern void (*ltm_rng_callback)(void);
   371    365   #endif
   372    366   
   373    367   /* ---> binary operations <--- */
   374    368   /* c = a XOR b  */
   375    369   /*
................................................................................
   698    692   /* This gives [for a given bit size] the number of trials required
   699    693    * such that Miller-Rabin gives a prob of failure lower than 2^-96
   700    694    */
   701    695   /*
   702    696   int mp_prime_rabin_miller_trials(int size);
   703    697   */
   704    698   
   705         -/* performs t rounds of Miller-Rabin on "a" using the first
   706         - * t prime bases.  Also performs an initial sieve of trial
          699  +/* performs t random rounds of Miller-Rabin on "a" additional to
          700  + * bases 2 and 3.  Also performs an initial sieve of trial
   707    701    * division.  Determines if "a" is prime with probability
   708    702    * of error no more than (1/4)**t.
          703  + * Both a strong Lucas-Selfridge to complete the BPSW test
          704  + * and a separate Frobenius test are available at compile time.
          705  + * With t<0 a deterministic test is run for primes up to
          706  + * 318665857834031151167461. With t<13 (abs(t)-13) additional
          707  + * tests with sequential small primes are run starting at 43.
          708  + * Is Fips 186.4 compliant if called with t as computed by
          709  + * mp_prime_rabin_miller_trials();
   709    710    *
   710    711    * Sets result to 1 if probably prime, 0 otherwise
   711    712    */
   712    713   /*
   713    714   int mp_prime_is_prime(const mp_int *a, int t, int *result);
   714    715   */
   715    716   

Changes to generic/tclTomMathDecls.h.

    32     32   
    33     33   /* MODULE_SCOPE void* TclBNAlloc( size_t ); */
    34     34   #define TclBNAlloc(s) ((void*)ckalloc((size_t)(s)))
    35     35   /* MODULE_SCOPE void* TclBNRealloc( void*, size_t ); */
    36     36   #define TclBNRealloc(x,s) ((void*)ckrealloc((char*)(x),(size_t)(s)))
    37     37   /* MODULE_SCOPE void  TclBNFree( void* ); */
    38     38   #define TclBNFree(x) (ckfree((char*)(x)))
    39         -/* MODULE_SCOPE void* TclBNCalloc( size_t, size_t ); */
    40         -/* unused - no macro */
    41     39   
    42         -#define XMALLOC(x) TclBNAlloc(x)
    43         -#define XFREE(x) TclBNFree(x)
    44         -#define XREALLOC(x,n) TclBNRealloc(x,n)
    45         -#define XCALLOC(n,x) TclBNCalloc(n,x)
           40  +#define XMALLOC(size)                   TclBNAlloc(size)
           41  +#define XFREE(mem, size)                TclBNFree(mem)
           42  +#define XREALLOC(mem, oldsize, newsize) TclBNRealloc(mem, newsize)
           43  +
    46     44   
    47     45   /* Rename the global symbols in libtommath to avoid linkage conflicts */
    48     46   
    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     47   #define bn_reverse TclBN_reverse
    55     48   #define fast_s_mp_mul_digs TclBN_fast_s_mp_mul_digs
    56     49   #define fast_s_mp_sqr TclBN_fast_s_mp_sqr
    57     50   #define mp_add TclBN_mp_add
    58     51   #define mp_add_d TclBN_mp_add_d
    59     52   #define mp_and TclBN_mp_and
    60     53   #define mp_clamp TclBN_mp_clamp
................................................................................
    70     63   #define mp_div_2 TclBN_mp_div_2
    71     64   #define mp_div_2d TclBN_mp_div_2d
    72     65   #define mp_div_3 TclBN_mp_div_3
    73     66   #define mp_div_d TclBN_mp_div_d
    74     67   #define mp_exch TclBN_mp_exch
    75     68   #define mp_expt_d TclBN_mp_expt_d
    76     69   #define mp_expt_d_ex TclBN_mp_expt_d_ex
           70  +#define mp_get_bit TclBN_mp_get_bit
    77     71   #define mp_get_int TclBN_mp_get_int
    78     72   #define mp_get_long TclBN_mp_get_long
    79     73   #define mp_get_long_long TclBN_mp_get_long_long
    80     74   #define mp_grow TclBN_mp_grow
    81     75   #define mp_init TclBN_mp_init
    82     76   #define mp_init_copy TclBN_mp_init_copy
    83     77   #define mp_init_multi TclBN_mp_init_multi
................................................................................
   268    262   EXTERN int		TclBN_mp_unsigned_bin_size(const mp_int *a);
   269    263   /* 48 */
   270    264   EXTERN int		TclBN_mp_xor(const mp_int *a, const mp_int *b,
   271    265   				mp_int *c);
   272    266   /* 49 */
   273    267   EXTERN void		TclBN_mp_zero(mp_int *a);
   274    268   /* 50 */
   275         -EXTERN void		TclBN_reverse(unsigned char *s, int len);
          269  +TCL_DEPRECATED("is private function in libtommath")
          270  +void			TclBN_reverse(unsigned char *s, int len);
   276    271   /* 51 */
   277         -EXTERN int		TclBN_fast_s_mp_mul_digs(const mp_int *a,
          272  +TCL_DEPRECATED("is private function in libtommath")
          273  +int			TclBN_fast_s_mp_mul_digs(const mp_int *a,
   278    274   				const mp_int *b, mp_int *c, int digs);
   279    275   /* 52 */
   280         -EXTERN int		TclBN_fast_s_mp_sqr(const mp_int *a, mp_int *b);
          276  +TCL_DEPRECATED("is private function in libtommath")
          277  +int			TclBN_fast_s_mp_sqr(const mp_int *a, mp_int *b);
   281    278   /* 53 */
   282         -EXTERN int		TclBN_mp_karatsuba_mul(const mp_int *a,
          279  +TCL_DEPRECATED("is private function in libtommath")
          280  +int			TclBN_mp_karatsuba_mul(const mp_int *a,
   283    281   				const mp_int *b, mp_int *c);
   284    282   /* 54 */
   285         -EXTERN int		TclBN_mp_karatsuba_sqr(const mp_int *a, mp_int *b);
          283  +TCL_DEPRECATED("is private function in libtommath")
          284  +int			TclBN_mp_karatsuba_sqr(const mp_int *a, mp_int *b);
   286    285   /* 55 */
   287         -EXTERN int		TclBN_mp_toom_mul(const mp_int *a, const mp_int *b,
          286  +TCL_DEPRECATED("is private function in libtommath")
          287  +int			TclBN_mp_toom_mul(const mp_int *a, const mp_int *b,
   288    288   				mp_int *c);
   289    289   /* 56 */
   290         -EXTERN int		TclBN_mp_toom_sqr(const mp_int *a, mp_int *b);
          290  +TCL_DEPRECATED("is private function in libtommath")
          291  +int			TclBN_mp_toom_sqr(const mp_int *a, mp_int *b);
   291    292   /* 57 */
   292         -EXTERN int		TclBN_s_mp_add(const mp_int *a, const mp_int *b,
          293  +TCL_DEPRECATED("is private function in libtommath")
          294  +int			TclBN_s_mp_add(const mp_int *a, const mp_int *b,
   293    295   				mp_int *c);
   294    296   /* 58 */
   295         -EXTERN int		TclBN_s_mp_mul_digs(const mp_int *a, const mp_int *b,
          297  +TCL_DEPRECATED("is private function in libtommath")
          298  +int			TclBN_s_mp_mul_digs(const mp_int *a, const mp_int *b,
   296    299   				mp_int *c, int digs);
   297    300   /* 59 */
   298         -EXTERN int		TclBN_s_mp_sqr(const mp_int *a, mp_int *b);
          301  +TCL_DEPRECATED("is private function in libtommath")
          302  +int			TclBN_s_mp_sqr(const mp_int *a, mp_int *b);
   299    303   /* 60 */
   300         -EXTERN int		TclBN_s_mp_sub(const mp_int *a, const mp_int *b,
          304  +TCL_DEPRECATED("is private function in libtommath")
          305  +int			TclBN_s_mp_sub(const mp_int *a, const mp_int *b,
   301    306   				mp_int *c);
   302    307   /* 61 */
   303    308   EXTERN int		TclBN_mp_init_set_int(mp_int *a, unsigned long i);
   304    309   /* 62 */
   305    310   EXTERN int		TclBN_mp_set_int(mp_int *a, unsigned long i);
   306    311   /* 63 */
   307    312   EXTERN int		TclBN_mp_cnt_lsb(const mp_int *a);
................................................................................
   336    341   EXTERN int		TclBN_mp_tc_or(const mp_int *a, const mp_int *b,
   337    342   				mp_int *c);
   338    343   /* 75 */
   339    344   EXTERN int		TclBN_mp_tc_xor(const mp_int *a, const mp_int *b,
   340    345   				mp_int *c);
   341    346   /* 76 */
   342    347   EXTERN int		TclBN_mp_tc_div_2d(const mp_int *a, int b, mp_int *c);
          348  +/* 77 */
          349  +EXTERN int		TclBN_mp_get_bit(const mp_int *a, int b);
   343    350   
   344    351   typedef struct TclTomMathStubs {
   345    352       int magic;
   346    353       void *hooks;
   347    354   
   348    355       int (*tclBN_epoch) (void); /* 0 */
   349    356       int (*tclBN_revision) (void); /* 1 */
................................................................................
   391    398       int (*tclBN_mp_sub_d) (const mp_int *a, mp_digit b, mp_int *c); /* 43 */
   392    399       int (*tclBN_mp_to_unsigned_bin) (const mp_int *a, unsigned char *b); /* 44 */
   393    400       int (*tclBN_mp_to_unsigned_bin_n) (const mp_int *a, unsigned char *b, unsigned long *outlen); /* 45 */
   394    401       int (*tclBN_mp_toradix_n) (const mp_int *a, char *str, int radix, int maxlen); /* 46 */
   395    402       int (*tclBN_mp_unsigned_bin_size) (const mp_int *a); /* 47 */
   396    403       int (*tclBN_mp_xor) (const mp_int *a, const mp_int *b, mp_int *c); /* 48 */
   397    404       void (*tclBN_mp_zero) (mp_int *a); /* 49 */
   398         -    void (*tclBN_reverse) (unsigned char *s, int len); /* 50 */
   399         -    int (*tclBN_fast_s_mp_mul_digs) (const mp_int *a, const mp_int *b, mp_int *c, int digs); /* 51 */
   400         -    int (*tclBN_fast_s_mp_sqr) (const mp_int *a, mp_int *b); /* 52 */
   401         -    int (*tclBN_mp_karatsuba_mul) (const mp_int *a, const mp_int *b, mp_int *c); /* 53 */
   402         -    int (*tclBN_mp_karatsuba_sqr) (const mp_int *a, mp_int *b); /* 54 */
   403         -    int (*tclBN_mp_toom_mul) (const mp_int *a, const mp_int *b, mp_int *c); /* 55 */
   404         -    int (*tclBN_mp_toom_sqr) (const mp_int *a, mp_int *b); /* 56 */
   405         -    int (*tclBN_s_mp_add) (const mp_int *a, const mp_int *b, mp_int *c); /* 57 */
   406         -    int (*tclBN_s_mp_mul_digs) (const mp_int *a, const mp_int *b, mp_int *c, int digs); /* 58 */
   407         -    int (*tclBN_s_mp_sqr) (const mp_int *a, mp_int *b); /* 59 */
   408         -    int (*tclBN_s_mp_sub) (const mp_int *a, const mp_int *b, mp_int *c); /* 60 */
          405  +    TCL_DEPRECATED_API("is private function in libtommath") void (*tclBN_reverse) (unsigned char *s, int len); /* 50 */
          406  +    TCL_DEPRECATED_API("is private function in libtommath") int (*tclBN_fast_s_mp_mul_digs) (const mp_int *a, const mp_int *b, mp_int *c, int digs); /* 51 */
          407  +    TCL_DEPRECATED_API("is private function in libtommath") int (*tclBN_fast_s_mp_sqr) (const mp_int *a, mp_int *b); /* 52 */
          408  +    TCL_DEPRECATED_API("is private function in libtommath") int (*tclBN_mp_karatsuba_mul) (const mp_int *a, const mp_int *b, mp_int *c); /* 53 */
          409  +    TCL_DEPRECATED_API("is private function in libtommath") int (*tclBN_mp_karatsuba_sqr) (const mp_int *a, mp_int *b); /* 54 */
          410  +    TCL_DEPRECATED_API("is private function in libtommath") int (*tclBN_mp_toom_mul) (const mp_int *a, const mp_int *b, mp_int *c); /* 55 */
          411  +    TCL_DEPRECATED_API("is private function in libtommath") int (*tclBN_mp_toom_sqr) (const mp_int *a, mp_int *b); /* 56 */
          412  +    TCL_DEPRECATED_API("is private function in libtommath") int (*tclBN_s_mp_add) (const mp_int *a, const mp_int *b, mp_int *c); /* 57 */
          413  +    TCL_DEPRECATED_API("is private function in libtommath") int (*tclBN_s_mp_mul_digs) (const mp_int *a, const mp_int *b, mp_int *c, int digs); /* 58 */
          414  +    TCL_DEPRECATED_API("is private function in libtommath") int (*tclBN_s_mp_sqr) (const mp_int *a, mp_int *b); /* 59 */
          415  +    TCL_DEPRECATED_API("is private function in libtommath") int (*tclBN_s_mp_sub) (const mp_int *a, const mp_int *b, mp_int *c); /* 60 */
   409    416       int (*tclBN_mp_init_set_int) (mp_int *a, unsigned long i); /* 61 */
   410    417       int (*tclBN_mp_set_int) (mp_int *a, unsigned long i); /* 62 */
   411    418       int (*tclBN_mp_cnt_lsb) (const mp_int *a); /* 63 */
   412    419       TCL_DEPRECATED_API("Use mp_init() + mp_set_long_long()") void (*tclBNInitBignumFromLong) (mp_int *bignum, long initVal); /* 64 */
   413    420       TCL_DEPRECATED_API("Use mp_init() + mp_set_long_long()") void (*tclBNInitBignumFromWideInt) (mp_int *bignum, Tcl_WideInt initVal); /* 65 */
   414    421       TCL_DEPRECATED_API("Use mp_init() + mp_set_long_long()") void (*tclBNInitBignumFromWideUInt) (mp_int *bignum, Tcl_WideUInt initVal); /* 66 */
   415    422       int (*tclBN_mp_expt_d_ex) (const mp_int *a, mp_digit b, mp_int *c, int fast); /* 67 */
................................................................................
   418    425       int (*tclBN_mp_set_long) (mp_int *a, unsigned long i); /* 70 */
   419    426       unsigned long (*tclBN_mp_get_long) (const mp_int *a); /* 71 */
   420    427       unsigned long (*tclBN_mp_get_int) (const mp_int *a); /* 72 */
   421    428       int (*tclBN_mp_tc_and) (const mp_int *a, const mp_int *b, mp_int *c); /* 73 */
   422    429       int (*tclBN_mp_tc_or) (const mp_int *a, const mp_int *b, mp_int *c); /* 74 */
   423    430       int (*tclBN_mp_tc_xor) (const mp_int *a, const mp_int *b, mp_int *c); /* 75 */
   424    431       int (*tclBN_mp_tc_div_2d) (const mp_int *a, int b, mp_int *c); /* 76 */
          432  +    int (*tclBN_mp_get_bit) (const mp_int *a, int b); /* 77 */
   425    433   } TclTomMathStubs;
   426    434   
   427    435   extern const TclTomMathStubs *tclTomMathStubsPtr;
   428    436   
   429    437   #ifdef __cplusplus
   430    438   }
   431    439   #endif
................................................................................
   586    594   	(tclTomMathStubsPtr->tclBN_mp_tc_and) /* 73 */
   587    595   #define TclBN_mp_tc_or \
   588    596   	(tclTomMathStubsPtr->tclBN_mp_tc_or) /* 74 */
   589    597   #define TclBN_mp_tc_xor \
   590    598   	(tclTomMathStubsPtr->tclBN_mp_tc_xor) /* 75 */
   591    599   #define TclBN_mp_tc_div_2d \
   592    600   	(tclTomMathStubsPtr->tclBN_mp_tc_div_2d) /* 76 */
          601  +#define TclBN_mp_get_bit \
          602  +	(tclTomMathStubsPtr->tclBN_mp_get_bit) /* 77 */
   593    603   
   594    604   #endif /* defined(USE_TCL_STUBS) */
   595    605   
   596    606   /* !END!: Do not edit above this line. */
   597    607   
   598    608   #undef TCL_STORAGE_CLASS
   599    609   #define TCL_STORAGE_CLASS DLLIMPORT
   600    610   
   601    611   #endif /* _TCLINTDECLS */

Changes to generic/tclTomMathInterface.c.

    89     89   {
    90     90       return TCLTOMMATH_REVISION;
    91     91   }
    92     92   
    93     93   /*
    94     94    *----------------------------------------------------------------------
    95     95    *
    96         - * TclInitBignumFromLong --
    97         - *
    98         - *	Allocate and initialize a 'bignum' from a native 'long'.
    99         - *
   100         - * Results:
   101         - *	None.
   102         - *
   103         - * Side effects:
   104         - *	The 'bignum' is constructed.
   105         - *
   106         - *----------------------------------------------------------------------
   107         - */
   108         -
   109         -void
   110         -TclInitBignumFromLong(
   111         -    mp_int *a,
   112         -    long v)
   113         -{
   114         -    if (mp_init_size(a, (CHAR_BIT * sizeof(long) + DIGIT_BIT - 1) / DIGIT_BIT) != MP_OKAY) {
   115         -	Tcl_Panic("initialization failure in TclInitBignumFromLong");
   116         -    }
   117         -    if (v < (long)0) {
   118         -	mp_set_long_long(a, (Tcl_WideUInt)(-(Tcl_WideInt)v));
   119         -	mp_neg(a, a);
   120         -    } else {
   121         -	mp_set_long_long(a, (Tcl_WideUInt)v);
   122         -    }
   123         -}
   124         -
   125         -/*
   126         - *----------------------------------------------------------------------
   127         - *
   128         - * TclBNInitBignumFromWideInt --
           96  + * TclInitBignumFromWideInt --
   129     97    *
   130     98    *	Allocate and initialize a 'bignum' from a Tcl_WideInt
   131     99    *
   132    100    * Results:
   133    101    *	None.
   134    102    *
   135    103    * Side effects:
................................................................................
   142    110   TclInitBignumFromWideInt(
   143    111       mp_int *a,			/* Bignum to initialize */
   144    112       Tcl_WideInt v)		/* Initial value */
   145    113   {
   146    114   	if (mp_init_size(a, (CHAR_BIT * sizeof(Tcl_WideUInt) + DIGIT_BIT - 1) / DIGIT_BIT) != MP_OKAY) {
   147    115   		Tcl_Panic("initialization failure in TclInitBignumFromWideInt");
   148    116   	}
   149         -    if (v < (Tcl_WideInt)0) {
          117  +    if (v < 0) {
   150    118   	mp_set_long_long(a, (Tcl_WideUInt)(-v));
   151    119   	mp_neg(a, a);
   152    120       } else {
   153    121   	mp_set_long_long(a, (Tcl_WideUInt)v);
   154    122       }
   155    123   }
   156    124   
   157    125   /*
   158    126    *----------------------------------------------------------------------
   159    127    *
   160         - * TclBNInitBignumFromWideUInt --
          128  + * TclInitBignumFromWideUInt --
   161    129    *
   162    130    *	Allocate and initialize a 'bignum' from a Tcl_WideUInt
   163    131    *
   164    132    * Results:
   165    133    *	None.
   166    134    *
   167    135    * Side effects:

Changes to generic/tclTrace.c.

  1685   1685       char *commandCopy;
  1686   1686       int traceCode;
  1687   1687   
  1688   1688       /*
  1689   1689        * Copy the command characters into a new string.
  1690   1690        */
  1691   1691   
  1692         -    commandCopy = TclStackAlloc(interp, (unsigned) numChars + 1);
  1693         -    memcpy(commandCopy, command, (size_t) numChars);
         1692  +    commandCopy = TclStackAlloc(interp, numChars + 1);
         1693  +    memcpy(commandCopy, command, numChars);
  1694   1694       commandCopy[numChars] = '\0';
  1695   1695   
  1696   1696       /*
  1697   1697        * Call the trace function then free allocated storage.
  1698   1698        */
  1699   1699   
  1700   1700       traceCode = tracePtr->proc(tracePtr->clientData, (Tcl_Interp *) iPtr,
................................................................................
  2271   2271   
  2272   2272       /*
  2273   2273        * This is a bit messy because we have to emulate the old trace interface,
  2274   2274        * which uses strings for everything.
  2275   2275        */
  2276   2276   
  2277   2277       argv = (const char **) TclStackAlloc(interp,
  2278         -	    (unsigned) ((objc + 1) * sizeof(const char *)));
         2278  +	    (objc + 1) * sizeof(const char *));
  2279   2279       for (i = 0; i < objc; i++) {
  2280   2280   	argv[i] = Tcl_GetString(objv[i]);
  2281   2281       }
  2282   2282       argv[objc] = 0;
  2283   2283   
  2284   2284       /*
  2285   2285        * Invoke the command function. Note that we cast away const-ness on two

Changes to generic/tclUniData.c.

    48     48       6144, 6176, 6208, 6240, 6272, 6304, 6336, 6368, 6400, 6432, 6464, 6496,
    49     49       6528, 6560, 6560, 6560, 6560, 6560, 6560, 6560, 6560, 6592, 6624, 4928,
    50     50       6656, 6688, 6720, 6752, 6784, 4928, 6816, 6848, 6880, 6912, 6944, 6976,
    51     51       7008, 4928, 4928, 4928, 4928, 4928, 7040, 7072, 7104, 4928, 4928, 4928,
    52     52       7136, 4928, 4928, 4928, 4928, 4928, 4928, 4928, 7168, 7200, 4928, 7232,
    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         -    6560, 4928, 7392, 7424, 7456, 7488, 4928, 7520, 7552, 7584, 7616, 7648,
    56         -    7680, 224, 224, 224, 7712, 7744, 7776, 1344, 7808, 7840, 7872, 7872,
    57         -    704, 7904, 7936, 7968, 1824, 8000, 4928, 4928, 8032, 4928, 4928, 4928,
    58         -    4928, 4928, 4928, 8064, 8096, 8128, 8160, 3232, 1344, 8192, 4192, 1344,
    59         -    8224, 8256, 8288, 1344, 1344, 8320, 8352, 4928, 8384, 7552, 8416, 8448,
    60         -    4928, 8416, 8480, 4928, 7552, 4928, 4928, 4928, 4928, 4928, 4928, 4928,
           55  +    6560, 4928, 7392, 7424, 7456, 7488, 4928, 4928, 4928, 7520, 7552, 7584,
           56  +    7616, 224, 224, 224, 7648, 7680, 7712, 1344, 7744, 7776, 7808, 7808,
           57  +    704, 7840, 7872, 7904, 1824, 7936, 4928, 4928, 7968, 4928, 4928, 4928,
           58  +    4928, 4928, 4928, 8000, 8032, 8064, 8096, 3232, 1344, 8128, 4192, 1344,
           59  +    8160, 8192, 8224, 1344, 1344, 8256, 8288, 4928, 8320, 8352, 8384, 8416,
           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,
................................................................................
   126    126       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   127    127       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   128    128       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   129    129       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   130    130       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   131    131       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   132    132       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   133         -    8512, 8544, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          133  +    8480, 8512, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   134    134       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   135    135       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   136         -    1344, 8576, 4928, 8608, 5408, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   137         -    1344, 8640, 8672, 224, 8704, 8736, 1344, 1344, 8768, 8800, 8832, 224,
   138         -    8864, 8896, 8928, 1824, 8960, 8992, 9024, 1344, 9056, 9088, 9120, 9152,
          136  +    1344, 8544, 4928, 8576, 5408, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          137  +    1344, 8608, 8640, 224, 8672, 8704, 1344, 1344, 8736, 8768, 8800, 224,
          138  +    8832, 8864, 8896, 8928, 8960, 8992, 9024, 1344, 9056, 9088, 9120, 9152,
   139    139       9184, 1632, 9216, 9248, 9280, 1952, 9312, 9344, 9376, 1344, 9408, 9440,
   140    140       9472, 1344, 9504, 9536, 9568, 9600, 9632, 9664, 9696, 9728, 9728, 1344,
   141    141       9760, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   142    142       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   143    143       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   144    144       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   145    145       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
................................................................................
   191    191       9920, 9920, 9920, 9920, 9920, 9920, 9920, 9920, 9920, 9920, 9920, 9920,
   192    192       9920, 9920, 9920, 9920, 9920, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   193    193       1344, 1344, 1344, 1344, 9952, 1344, 1344, 9984, 1824, 10016, 10048,
   194    194       10080, 1344, 1344, 10112, 10144, 1344, 1344, 1344, 1344, 1344, 1344,
   195    195       1344, 1344, 1344, 1344, 10176, 10208, 1344, 10240, 1344, 10272, 10304,
   196    196       10336, 10368, 10400, 10432, 1344, 1344, 1344, 10464, 10496, 64, 10528,
   197    197       10560, 10592, 4736, 10624, 10656
   198         -#if TCL_UTF_MAX > 3
   199         -    ,10688, 10720, 10752, 1824, 1344, 1344, 1344, 8352, 10784, 10816, 10848,
          198  +#if TCL_UTF_MAX > 3 || TCL_MAJOR_VERSION > 8 || TCL_MINOR_VERSION > 6
          199  +    ,10688, 10720, 10752, 1824, 1344, 1344, 1344, 8288, 10784, 10816, 10848,
   200    200       10880, 10912, 10944, 10976, 11008, 1824, 1824, 1824, 1824, 9280, 1344,
   201    201       11040, 11072, 1344, 11104, 11136, 11168, 11200, 1344, 11232, 1824,
   202    202       11264, 11296, 11328, 1344, 11360, 11392, 11424, 11456, 1344, 11488,
   203    203       1344, 11520, 1824, 1824, 1824, 1824, 1344, 1344, 1344, 1344, 1344,
   204         -    1344, 1344, 1344, 1344, 7840, 4704, 10272, 1824, 1824, 1824, 1824,
          204  +    1344, 1344, 1344, 1344, 7776, 4704, 10272, 1824, 1824, 1824, 1824,
   205    205       11552, 11584, 11616, 11648, 4736, 11680, 1824, 11712, 11744, 11776,
   206    206       1824, 1824, 1344, 11808, 11840, 6880, 11872, 11904, 11936, 11968, 12000,
   207    207       1824, 12032, 12064, 1344, 12096, 12128, 12160, 12192, 12224, 1824,
   208    208       1824, 1344, 1344, 12256, 1824, 12288, 12320, 12352, 12384, 1344, 12416,
   209    209       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 12448, 1824,
   210         -    1824, 1824, 1824, 12000, 12480, 12512, 1824, 1824, 1824, 1824, 1824,
          210  +    1824, 1824, 1824, 12000, 12480, 12512, 1824, 1824, 1824, 1824, 7776,
   211    211       12544, 12576, 12608, 12640, 5248, 12672, 12704, 12736, 12768, 12800,
   212    212       12832, 12864, 5248, 12896, 12928, 12960, 12992, 13024, 1824, 1824,
   213    213       13056, 13088, 13120, 13152, 13184, 13216, 13248, 13280, 1824, 1824,
   214    214       1824, 1824, 1344, 13312, 13344, 1824, 1344, 13376, 13408, 1824, 1824,
   215    215       1824, 1824, 1824, 1344, 13440, 13472, 1824, 1344, 13504, 13536, 13568,
   216    216       1344, 13600, 13632, 1824, 4032, 13664, 1824, 1824, 1824, 1824, 1824,
   217    217       1824, 1344, 13696, 1824, 1824, 1824, 13728, 13760, 13792, 1824, 1824,
   218         -    1824, 1824, 1824, 1824, 1824, 1824, 13824, 13856, 13888, 1344, 13920,
   219         -    13952, 1344, 4608, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   220         -    13984, 14016, 14048, 14080, 14112, 14144, 1824, 1824, 14176, 14208,
   221         -    14240, 14272, 14304, 13632, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   222         -    1824, 1824, 14336, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
          218  +    1824, 1824, 1824, 13824, 13856, 13888, 13920, 13952, 13984, 1344, 14016,
          219  +    14048, 1344, 4608, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
          220  +    14080, 14112, 14144, 14176, 14208, 14240, 1824, 1824, 14272, 14304,
          221  +    14336, 14368, 14400, 13632, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
          222  +    1824, 1824, 14432, 1824, 1824, 1824, 1824, 1824, 1824, 14464, 14496,
   223    223       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   224    224       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   225    225       1344, 1344, 1344, 1344, 9984, 1824, 1824, 1824, 10848, 10848, 10848,
   226         -    14368, 1344, 1344, 1344, 1344, 1344, 1344, 14400, 1824, 1824, 1824,
          226  +    14528, 1344, 1344, 1344, 1344, 1344, 1344, 14560, 1824, 1824, 1824,
   227    227       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   228    228       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   229    229       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   230    230       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   231    231       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   232    232       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   233    233       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1344, 1344,
   234    234       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   235    235       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   236         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 14432, 1824, 1824, 1824,
          236  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 14592, 1824, 1824, 1824,
   237    237       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   238    238       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   239    239       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   240    240       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   241    241       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   242    242       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   243    243       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   244    244       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   245    245       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   246    246       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   247    247       1824, 1824, 1824, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   248         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 14464, 1824,
          248  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 14624, 1824,
   249    249       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   250    250       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   251    251       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   252    252       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   253    253       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   254    254       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   255    255       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
................................................................................
   265    265       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   266    266       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   267    267       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   268    268       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   269    269       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   270    270       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   271    271       1824, 1824, 1824, 1824, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   272         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 4608, 4736, 14496,
   273         -    1824, 1824, 10208, 14528, 1344, 14560, 14592, 14624, 8512, 1824, 1824,
   274         -    1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   275         -    1824, 1824, 1824, 1824, 1824, 1824, 1824, 13728, 13760, 14656, 1824,
   276         -    1824, 1824, 1344, 1344, 14688, 14720, 14752, 1824, 1824, 14784, 1344,
   277         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   278         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   279         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   280         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   281         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   282         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   283         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   284         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   285         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   286         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   287         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   288         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   289         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   290         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   291         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   292         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 14816,
   293         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   294         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 14848,
          272  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 4608, 4736, 14656,
          273  +    1824, 1824, 10208, 14688, 1344, 14720, 14752, 14784, 8480, 1824, 1824,
          274  +    1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
          275  +    1824, 1824, 1824, 1824, 1824, 1824, 1824, 13728, 13760, 14816, 1824,
          276  +    1824, 1824, 1344, 1344, 14848, 14880, 14912, 1824, 1824, 14944, 1344,
          277  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          278  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          279  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          280  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          281  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          282  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          283  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          284  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          285  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          286  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          287  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          288  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          289  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          290  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          291  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          292  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 14976,
          293  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          294  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 15008,
   295    295       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   296    296       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   297    297       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   298    298       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   299    299       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   300    300       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   301    301       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
................................................................................
   313    313       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   314    314       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   315    315       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   316    316       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   317    317       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   318    318       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   319    319       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1344, 1344, 1344, 1344,
   320         -    1344, 1344, 1344, 1344, 4736, 1824, 1824, 10208, 1344, 1344, 1344,
          320  +    1344, 1344, 1344, 1344, 4736, 1824, 15040, 15072, 1344, 1344, 1344,
   321    321       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 9856, 1824, 1824, 1824,
   322    322       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   323    323       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   324    324       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   325    325       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   326    326       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   327    327       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1344, 1344, 1344,
   328         -    14880, 14912, 14944, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
          328  +    15104, 15136, 15168, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   329    329       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   330    330       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   331    331       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   332    332       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   333    333       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   334    334       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   335    335       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   336    336       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   337    337       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
          338  +    1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
          339  +    1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
          340  +    1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
          341  +    1824, 1824, 4928, 4928, 4928, 4928, 4928, 4928, 4928, 8000, 4928, 15200,
          342  +    4928, 15232, 15264, 15296, 4928, 15328, 4928, 4928, 15360, 1824, 1824,
          343  +    1824, 1824, 15392, 4928, 4928, 15424, 15456, 1824, 1824, 1824, 1824,
          344  +    15488, 15520, 15552, 15584, 15616, 15648, 15680, 15712, 15744, 15776,
          345  +    15808, 15840, 15872, 15488, 15520, 15904, 15584, 15936, 15968, 16000,
          346  +    15712, 16032, 16064, 16096, 16128, 16160, 16192, 16224, 16256, 16288,
          347  +    16320, 16352, 4928, 4928, 4928, 4928, 4928, 4928, 4928, 4928, 4928,
          348  +    4928, 4928, 4928, 4928, 4928, 4928, 4928, 704, 16384, 704, 16416, 16448,
          349  +    16480, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
          350  +    1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
          351  +    1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
          352  +    1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 16512, 16544, 1824,
          353  +    1824, 1824, 1824, 1824, 1824, 1344, 16576, 16608, 1824, 1824, 1824,
          354  +    1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1344, 16640, 1824,
   338    355       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   339    356       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   340    357       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   341         -    1824, 1824, 4928, 4928, 4928, 4928, 4928, 4928, 4928, 8064, 4928, 14976,
   342         -    4928, 15008, 15040, 15072, 4928, 15104, 4928, 4928, 15136, 1824, 1824,
   343         -    1824, 1824, 15168, 4928, 4928, 15200, 15232, 1824, 1824, 1824, 1824,
   344         -    15264, 15296, 15328, 15360, 15392, 15424, 15456, 15488, 15520, 15552,
   345         -    15584, 15616, 15648, 15264, 15296, 15680, 15360, 15712, 15744, 15776,
   346         -    15488, 15808, 15840, 15872, 15904, 15936, 15968, 16000, 16032, 16064,
   347         -    16096, 16128, 4928, 4928, 4928, 4928, 4928, 4928, 4928, 4928, 4928,
   348         -    4928, 4928, 4928, 4928, 4928, 4928, 4928, 704, 16160, 704, 16192, 16224,
   349         -    16256, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
          358  +    1824, 1824, 1824, 1344, 1344, 1344, 1344, 1344, 1344, 16672, 1824,
          359  +    16704, 16736, 16768, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   350    360       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   351         -    1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   352         -    1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 16288, 16320, 1824,
   353         -    1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   354         -    1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   355         -    1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   356         -    1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   357         -    1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   358         -    1824, 1344, 1344, 1344, 1344, 1344, 1344, 16352, 1824, 16384, 16416,
   359         -    16448, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   360         -    1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   361         -    1824, 1824, 16480, 6880, 16512, 1824, 1824, 1824, 1824, 1824, 1824,
   362         -    1824, 1824, 1824, 1824, 16544, 16576, 16608, 16640, 16672, 16704, 1824,
   363         -    16736, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 4928, 16768,
   364         -    4928, 4928, 8032, 16800, 16832, 8064, 16864, 4928, 4928, 16768, 4928,
   365         -    16896, 1824, 16928, 16960, 16992, 17024, 17056, 1824, 1824, 1824, 1824,
   366         -    4928, 4928, 4928, 4928, 4928, 4928, 4928, 17088, 4928, 4928, 4928,
          361  +    1824, 1824, 1824, 1824, 16800, 6880, 16832, 1824, 1824, 16864, 16896,
          362  +    1824, 1824, 1824, 1824, 1824, 1824, 16928, 16960, 16992, 17024, 17056,
          363  +    17088, 1824, 17120, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
          364  +    4928, 17152, 4928, 4928, 7968, 17184, 17216, 8000, 17248, 4928, 4928,
          365  +    17280, 4928, 17312, 1824, 17344, 17376, 17408, 17440, 17472, 1824,
          366  +    1824, 1824, 1824, 4928, 4928, 4928, 4928, 4928, 4928, 4928, 17504,
   367    367       4928, 4928, 4928, 4928, 4928, 4928, 4928, 4928, 4928, 4928, 4928, 4928,
   368         -    4928, 4928, 4928, 4928, 4928, 4928, 4928, 17120, 17152, 4928, 4928,
   369         -    4928, 8032, 4928, 4928, 17184, 1824, 16768, 4928, 17216, 4928, 17248,
   370         -    17280, 1824, 1824, 16768, 7552, 4928, 17312, 4928, 17344, 16960, 4928,
   371         -    1824, 1824, 1824, 17280, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
          368  +    4928, 4928, 4928, 4928, 4928, 4928, 4928, 4928, 4928, 4928, 8000, 17536,
          369  +    4928, 4928, 4928, 7968, 4928, 4928, 17568, 17600, 17152, 4928, 17632,
          370  +    4928, 17664, 17696, 1824, 1824, 17728, 4928, 4928, 17760, 4928, 17792,
          371  +    17824, 4928, 4928, 4928, 7968, 17856, 17888, 1824, 1824, 1824, 1824,
   372    372       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   373    373       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   374    374       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   375         -    1824, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   376         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   377         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   378         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   379         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   380         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   381         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   382         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   383         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   384         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   385         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   386         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   387         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   388         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   389         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   390         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   391         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   392         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   393         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   394         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   395         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   396         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   397         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   398         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   399         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   400         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   401         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   402         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   403         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   404         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   405         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   406         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   407         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   408         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   409         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   410         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   411         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   412         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   413         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   414         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   415         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   416         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          375  +    1824, 1824, 1824, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          376  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          377  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          378  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          379  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          380  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          381  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          382  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          383  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          384  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          385  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          386  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          387  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          388  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          389  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          390  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          391  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          392  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          393  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          394  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          395  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          396  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          397  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          398  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          399  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          400  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          401  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          402  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          403  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          404  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          405  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          406  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          407  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          408  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          409  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          410  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          411  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          412  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          413  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          414  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          415  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          416  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          417  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          418  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          419  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          420  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          421  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          422  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          423  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          424  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          425  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          426  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          427  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          428  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          429  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          430  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          431  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          432  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          433  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          434  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          435  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          436  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          437  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          438  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          439  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          440  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          441  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          442  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          443  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          444  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          445  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          446  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          447  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          448  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          449  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          450  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          451  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          452  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          453  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          454  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          455  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          456  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          457  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          458  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          459  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          460  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          461  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          462  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          463  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          464  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          465  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          466  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          467  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          468  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          469  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          470  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          471  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          472  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          473  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          474  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          475  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          476  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          477  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          478  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          479  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          480  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          481  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          482  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          483  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          484  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          485  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          486  +    1344, 1344, 1344, 1344, 1344, 7776, 1824, 1344, 1344, 1344, 1344, 1344,
          487  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          488  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          489  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          490  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          491  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          492  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          493  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          494  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          495  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          496  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          497  +    1344, 1344, 1344, 1344, 17920, 1344, 1344, 1344, 1344, 1344, 1344,
          498  +    11360, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          499  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          500  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          501  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          502  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          503  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          504  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          505  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          506  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          507  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          508  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          509  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          510  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          511  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          512  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          513  +    1344, 1344, 17952, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   417    514       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   418    515       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   419    516       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   420    517       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   421    518       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   422    519       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   423    520       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
................................................................................
   428    525       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   429    526       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   430    527       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   431    528       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   432    529       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   433    530       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   434    531       1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   435         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   436         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   437         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   438         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   439         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   440         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   441         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   442         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   443         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   444         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   445         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   446         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   447         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   448         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   449         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   450         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   451         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   452         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   453         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   454         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   455         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   456         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   457         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   458         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   459         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   460         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   461         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   462         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   463         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   464         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   465         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   466         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   467         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   468         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   469         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   470         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   471         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   472         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   473         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   474         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   475         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   476         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   477         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   478         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   479         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   480         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   481         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   482         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   483         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   484         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   485         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   486         -    1344, 1344, 1344, 7840, 1824, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   487         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   488         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   489         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   490         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   491         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   492         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   493         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   494         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   495         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   496         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   497         -    1344, 1344, 17376, 1344, 1344, 1344, 1344, 1344, 1344, 11360, 1344,
   498         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   499         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   500         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   501         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   502         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   503         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   504         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   505         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   506         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   507         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   508         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   509         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   510         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   511         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   512         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 17408,
   513         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   514         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   515         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   516         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   517         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   518         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   519         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   520         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   521         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   522         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   523         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   524         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   525         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   526         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   527         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   528         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   529         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   530         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   531         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
   532         -    1344, 1344, 1344, 1344, 1344, 17440, 1824, 1824, 1824, 1824, 1824,
          532  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 17984, 1824,
   533    533       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   534    534       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   535    535       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   536    536       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   537    537       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   538    538       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   539    539       1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824,
   540         -    1824, 1824, 1824, 1824, 1824, 1824, 1824, 1344, 1344, 1344, 1344, 1344,
   541         -    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 11360
          540  +    1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1344,
          541  +    1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
          542  +    1344, 1344, 1344, 11360
   542    543   #endif /* TCL_UTF_MAX > 3 */
   543    544   };
   544    545   
   545    546   /*
   546    547    * The groupMap is indexed by combining the alternate page number with
   547    548    * the page offset and returns a group number that identifies a unique
   548    549    * set of character attributes.
................................................................................
   577    578       24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24,
   578    579       21, 48, 49, 50, 23, 24, 52, 53, 23, 24, 23, 24, 23, 24, 23, 24, 54,
   579    580       21, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24,
   580    581       23, 24, 21, 21, 21, 21, 21, 21, 55, 23, 24, 56, 57, 58, 58, 23, 24,
   581    582       59, 60, 61, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 62, 63, 64, 65,
   582    583       66, 21, 67, 67, 21, 68, 21, 69, 70, 21, 21, 21, 67, 71, 21, 72, 21,
   583    584       73, 74, 21, 75, 76, 74, 77, 78, 21, 21, 76, 21, 79, 80, 21, 21, 81,
   584         -    21, 21, 21, 21, 21, 21, 21, 82, 21, 21, 83, 21, 21, 83, 21, 21, 21,
   585         -    84, 83, 85, 86, 86, 87, 21, 21, 21, 21, 21, 88, 21, 15, 21, 21, 21,
   586         -    21, 21, 21, 21, 21, 89, 90, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
   587         -    21, 21, 21, 21, 21, 21, 21, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
   588         -    91, 91, 91, 91, 91, 91, 91, 91, 11, 11, 11, 11, 91, 91, 91, 91, 91,
   589         -    91, 91, 91, 91, 91, 91, 91, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
   590         -    11, 11, 11, 11, 91, 91, 91, 91, 91, 11, 11, 11, 11, 11, 11, 11, 91,
   591         -    11, 91, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
   592         -    11, 11, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
   593         -    92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
   594         -    92, 92, 92, 92, 92, 93, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
   595         -    92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
   596         -    92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 23, 24, 23,
   597         -    24, 91, 11, 23, 24, 0, 0, 91, 42, 42, 42, 3, 94, 0, 0, 0, 0, 11, 11,
   598         -    95, 3, 96, 96, 96, 0, 97, 0, 98, 98, 21, 10, 10, 10, 10, 10, 10, 10,
          585  +    21, 21, 21, 21, 21, 21, 21, 82, 21, 21, 83, 21, 84, 83, 21, 21, 21,
          586  +    85, 83, 86, 87, 87, 88, 21, 21, 21, 21, 21, 89, 21, 15, 21, 21, 21,
          587  +    21, 21, 21, 21, 21, 90, 91, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
          588  +    21, 21, 21, 21, 21, 21, 21, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
          589  +    92, 92, 92, 92, 92, 92, 92, 92, 11, 11, 11, 11, 92, 92, 92, 92, 92,
          590  +    92, 92, 92, 92, 92, 92, 92, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
          591  +    11, 11, 11, 11, 92, 92, 92, 92, 92, 11, 11, 11, 11, 11, 11, 11, 92,
          592  +    11, 92, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
          593  +    11, 11, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
          594  +    93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
          595  +    93, 93, 93, 93, 93, 94, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
          596  +    93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
          597  +    93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 23, 24, 23,
          598  +    24, 92, 11, 23, 24, 0, 0, 92, 42, 42, 42, 3, 95, 0, 0, 0, 0, 11, 11,
          599  +    96, 3, 97, 97, 97, 0, 98, 0, 99, 99, 21, 10, 10, 10, 10, 10, 10, 10,
   599    600       10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10,
   600         -    10, 10, 10, 99, 100, 100, 100, 21, 13, 13, 13, 13, 13, 13, 13, 13,
   601         -    13, 13, 13, 13, 13, 13, 13, 13, 13, 101, 13, 13, 13, 13, 13, 13, 13,
   602         -    13, 13, 102, 103, 103, 104, 105, 106, 107, 107, 107, 108, 109, 110,
          601  +    10, 10, 10, 100, 101, 101, 101, 21, 13, 13, 13, 13, 13, 13, 13, 13,
          602  +    13, 13, 13, 13, 13, 13, 13, 13, 13, 102, 13, 13, 13, 13, 13, 13, 13,
          603  +    13, 13, 103, 104, 104, 105, 106, 107, 108, 108, 108, 109, 110, 111,
   603    604       23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23,
   604         -    24, 23, 24, 23, 24, 23, 24, 111, 112, 113, 114, 115, 116, 7, 23, 24,
   605         -    117, 23, 24, 21, 54, 54, 54, 118, 118, 118, 118, 118, 118, 118, 118,
   606         -    118, 118, 118, 118, 118, 118, 118, 118, 10, 10, 10, 10, 10, 10, 10,
          605  +    24, 23, 24, 23, 24, 23, 24, 112, 113, 114, 115, 116, 117, 7, 23, 24,
          606  +    118, 23, 24, 21, 54, 54, 54, 119, 119, 119, 119, 119, 119, 119, 119,
          607  +    119, 119, 119, 119, 119, 119, 119, 119, 10, 10, 10, 10, 10, 10, 10,
   607    608       10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
   608    609       10, 10, 10, 10, 10, 10, 10, 10, 13, 13, 13, 13, 13, 13, 13, 13, 13,
   609    610       13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
   610         -    13, 13, 13, 13, 13, 13, 112, 112, 112, 112, 112, 112, 112, 112, 112,
   611         -    112, 112, 112, 112, 112, 112, 112, 23, 24, 14, 92, 92, 92, 92, 92,
   612         -    119, 119, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23,
   613         -    24, 23, 24, 23, 24, 23, 24, 120, 23, 24, 23, 24, 23, 24, 23, 24, 23,
   614         -    24, 23, 24, 23, 24, 121, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23,
          611  +    13, 13, 13, 13, 13, 13, 113, 113, 113, 113, 113, 113, 113, 113, 113,
          612  +    113, 113, 113, 113, 113, 113, 113, 23, 24, 14, 93, 93, 93, 93, 93,
          613  +    120, 120, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23,
          614  +    24, 23, 24, 23, 24, 23, 24, 121, 23, 24, 23, 24, 23, 24, 23, 24, 23,
          615  +    24, 23, 24, 23, 24, 122, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23,
   615    616       24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24,
   616         -    23, 24, 23, 24, 0, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122,
   617         -    122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122,
   618         -    122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122,
   619         -    0, 0, 91, 3, 3, 3, 3, 3, 3, 21, 123, 123, 123, 123, 123, 123, 123,
          617  +    23, 24, 23, 24, 0, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
   620    618       123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
   621    619       123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
   622         -    123, 123, 123, 21, 21, 3, 8, 0, 0, 14, 14, 4, 0, 92, 92, 92, 92, 92,
   623         -    92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
   624         -    92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
   625         -    92, 92, 92, 92, 92, 92, 8, 92, 3, 92, 92, 3, 92, 92, 3, 92, 0, 0, 0,
          620  +    0, 0, 92, 3, 3, 3, 3, 3, 3, 21, 124, 124, 124, 124, 124, 124, 124,
          621  +    124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
          622  +    124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
          623  +    124, 124, 124, 21, 21, 3, 8, 0, 0, 14, 14, 4, 0, 93, 93, 93, 93, 93,
          624  +    93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
          625  +    93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
          626  +    93, 93, 93, 93, 93, 93, 8, 93, 3, 93, 93, 3, 93, 93, 3, 93, 0, 0, 0,
   626    627       0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   627    628       15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0,
   628    629       15, 15, 15, 15, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 17,
   629         -    17, 17, 17, 7, 7, 7, 3, 3, 4, 3, 3, 14, 14, 92, 92, 92, 92, 92, 92,
   630         -    92, 92, 92, 92, 92, 3, 17, 0, 3, 3, 15, 15, 15, 15, 15, 15, 15, 15,
          630  +    17, 17, 17, 7, 7, 7, 3, 3, 4, 3, 3, 14, 14, 93, 93, 93, 93, 93, 93,
          631  +    93, 93, 93, 93, 93, 3, 17, 0, 3, 3, 15, 15, 15, 15, 15, 15, 15, 15,
   631    632       15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   632         -    15, 15, 15, 15, 15, 15, 15, 91, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   633         -    15, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
   634         -    92, 92, 92, 92, 92, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 3, 3, 3, 3, 15, 15,
   635         -    92, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          633  +    15, 15, 15, 15, 15, 15, 15, 92, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          634  +    15, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
          635  +    93, 93, 93, 93, 93, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 3, 3, 3, 3, 15, 15,
          636  +    93, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   636    637       15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   637         -    15, 15, 3, 15, 92, 92, 92, 92, 92, 92, 92, 17, 14, 92, 92, 92, 92,
   638         -    92, 92, 91, 91, 92, 92, 14, 92, 92, 92, 92, 15, 15, 9, 9, 9, 9, 9,
          638  +    15, 15, 3, 15, 93, 93, 93, 93, 93, 93, 93, 17, 14, 93, 93, 93, 93,
          639  +    93, 93, 92, 92, 93, 93, 14, 93, 93, 93, 93, 15, 15, 9, 9, 9, 9, 9,
   639    640       9, 9, 9, 9, 9, 15, 15, 15, 14, 14, 15, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
   640         -    3, 3, 3, 3, 0, 17, 15, 92, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          641  +    3, 3, 3, 3, 0, 17, 15, 93, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   641    642       15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   642         -    15, 15, 15, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
   643         -    92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 0, 0, 15, 15, 15,
          643  +    15, 15, 15, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
          644  +    93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 0, 0, 15, 15, 15,
   644    645       15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   645         -    15, 15, 15, 15, 15, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 15,
          646  +    15, 15, 15, 15, 15, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 15,
   646    647       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
   647    648       9, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   648    649       15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   649         -    92, 92, 92, 92, 92, 92, 92, 92, 92, 91, 91, 14, 3, 3, 3, 91, 0, 0,
   650         -    92, 4, 4, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   651         -    15, 15, 15, 15, 15, 15, 15, 92, 92, 92, 92, 91, 92, 92, 92, 92, 92,
   652         -    92, 92, 92, 92, 91, 92, 92, 92, 91, 92, 92, 92, 92, 92, 0, 0, 3, 3,
          650  +    93, 93, 93, 93, 93, 93, 93, 93, 93, 92, 92, 14, 3, 3, 3, 92, 0, 0,
          651  +    93, 4, 4, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          652  +    15, 15, 15, 15, 15, 15, 15, 93, 93, 93, 93, 92, 93, 93, 93, 93, 93,
          653  +    93, 93, 93, 93, 92, 93, 93, 93, 92, 93, 93, 93, 93, 93, 0, 0, 3, 3,
   653    654       3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 15, 15, 15, 15, 15, 15, 15,
   654    655       15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   655         -    15, 92, 92, 92, 0, 0, 3, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          656  +    15, 93, 93, 93, 0, 0, 3, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   656    657       15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
   657    658       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
   658    659       0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   659    660       15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 15,
   660    661       15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
   661         -    0, 0, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 17,
   662         -    92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
   663         -    92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 124, 15,
          662  +    0, 0, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 17,
          663  +    93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
          664  +    93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 125, 15,
   664    665       15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   665    666       15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   666    667       15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   667         -    15, 15, 92, 124, 92, 15, 124, 124, 124, 92, 92, 92, 92, 92, 92, 92,
   668         -    92, 124, 124, 124, 124, 92, 124, 124, 15, 92, 92, 92, 92, 92, 92, 92,
   669         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 92, 92, 3, 3, 9, 9, 9, 9, 9,
   670         -    9, 9, 9, 9, 9, 3, 91, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   671         -    15, 15, 15, 92, 124, 124, 0, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0,
          668  +    15, 15, 93, 125, 93, 15, 125, 125, 125, 93, 93, 93, 93, 93, 93, 93,
          669  +    93, 125, 125, 125, 125, 93, 125, 125, 15, 93, 93, 93, 93, 93, 93, 93,
          670  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 93, 93, 3, 3, 9, 9, 9, 9, 9,
          671  +    9, 9, 9, 9, 9, 3, 92, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          672  +    15, 15, 15, 93, 125, 125, 0, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0,
   672    673       15, 15, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   673    674       15, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 15, 15, 15, 0, 15,
   674         -    0, 0, 0, 15, 15, 15, 15, 0, 0, 92, 15, 124, 124, 124, 92, 92, 92, 92,
   675         -    0, 0, 124, 124, 0, 0, 124, 124, 92, 15, 0, 0, 0, 0, 0, 0, 0, 0, 124,
   676         -    0, 0, 0, 0, 15, 15, 0, 15, 15, 15, 92, 92, 0, 0, 9, 9, 9, 9, 9, 9,
   677         -    9, 9, 9, 9, 15, 15, 4, 4, 18, 18, 18, 18, 18, 18, 14, 4, 15, 3, 92,
   678         -    0, 0, 92, 92, 124, 0, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 15, 15, 0,
          675  +    0, 0, 0, 15, 15, 15, 15, 0, 0, 93, 15, 125, 125, 125, 93, 93, 93, 93,
          676  +    0, 0, 125, 125, 0, 0, 125, 125, 93, 15, 0, 0, 0, 0, 0, 0, 0, 0, 125,
          677  +    0, 0, 0, 0, 15, 15, 0, 15, 15, 15, 93, 93, 0, 0, 9, 9, 9, 9, 9, 9,
          678  +    9, 9, 9, 9, 15, 15, 4, 4, 18, 18, 18, 18, 18, 18, 14, 4, 15, 3, 93,
          679  +    0, 0, 93, 93, 125, 0, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 15, 15, 0,
   679    680       0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   680    681       15, 15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 0,
   681         -    15, 15, 0, 15, 15, 0, 0, 92, 0, 124, 124, 124, 92, 92, 0, 0, 0, 0,
   682         -    92, 92, 0, 0, 92, 92, 92, 0, 0, 0, 92, 0, 0, 0, 0, 0, 0, 0, 15, 15,
   683         -    15, 15, 0, 15, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 92,
   684         -    92, 15, 15, 15, 92, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 92, 124, 0,
          682  +    15, 15, 0, 15, 15, 0, 0, 93, 0, 125, 125, 125, 93, 93, 0, 0, 0, 0,
          683  +    93, 93, 0, 0, 93, 93, 93, 0, 0, 0, 93, 0, 0, 0, 0, 0, 0, 0, 15, 15,
          684  +    15, 15, 0, 15, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 93,
          685  +    93, 15, 15, 15, 93, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 93, 125, 0,
   685    686       15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 15, 0, 15, 15, 15, 15,
   686    687       15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   687    688       15, 0, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 0, 15, 15, 15, 15, 15,
   688         -    0, 0, 92, 15, 124, 124, 124, 92, 92, 92, 92, 92, 0, 92, 92, 124, 0,
   689         -    124, 124, 92, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
   690         -    15, 15, 92, 92, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 3, 4, 0, 0, 0,
   691         -    0, 0, 0, 0, 15, 92, 92, 92, 92, 92, 92, 0, 92, 124, 124, 0, 15, 15,
          689  +    0, 0, 93, 15, 125, 125, 125, 93, 93, 93, 93, 93, 0, 93, 93, 125, 0,
          690  +    125, 125, 93, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
          691  +    15, 15, 93, 93, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 3, 4, 0, 0, 0,
          692  +    0, 0, 0, 0, 15, 93, 93, 93, 93, 93, 93, 0, 93, 125, 125, 0, 15, 15,
   692    693       15, 15, 15, 15, 15, 15, 0, 0, 15, 15, 0, 0, 15, 15, 15, 15, 15, 15,
   693    694       15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0,
   694    695       15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 0, 15, 15, 15, 15, 15, 0, 0,
   695         -    92, 15, 124, 92, 124, 92, 92, 92, 92, 0, 0, 124, 124, 0, 0, 124, 124,
   696         -    92, 0, 0, 0, 0, 0, 0, 0, 0, 92, 124, 0, 0, 0, 0, 15, 15, 0, 15, 15,
   697         -    15, 92, 92, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 14, 15, 18, 18, 18,
   698         -    18, 18, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 15, 0, 15, 15, 15, 15,
          696  +    93, 15, 125, 93, 125, 93, 93, 93, 93, 0, 0, 125, 125, 0, 0, 125, 125,
          697  +    93, 0, 0, 0, 0, 0, 0, 0, 0, 93, 125, 0, 0, 0, 0, 15, 15, 0, 15, 15,
          698  +    15, 93, 93, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 14, 15, 18, 18, 18,
          699  +    18, 18, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 15, 0, 15, 15, 15, 15,
   699    700       15, 15, 0, 0, 0, 15, 15, 15, 0, 15, 15, 15, 15, 0, 0, 0, 15, 15, 0,
   700    701       15, 0, 15, 15, 0, 0, 0, 15, 15, 0, 0, 0, 15, 15, 15, 0, 0, 0, 15, 15,
   701         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 124, 124, 92, 124,
   702         -    124, 0, 0, 0, 124, 124, 124, 0, 124, 124, 124, 92, 0, 0, 15, 0, 0,
   703         -    0, 0, 0, 0, 124, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9,
          702  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 125, 125, 93, 125,
          703  +    125, 0, 0, 0, 125, 125, 125, 0, 125, 125, 125, 93, 0, 0, 15, 0, 0,
          704  +    0, 0, 0, 0, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9,
   704    705       9, 9, 9, 9, 9, 9, 9, 18, 18, 18, 14, 14, 14, 14, 14, 14, 4, 14, 0,
   705         -    0, 0, 0, 0, 92, 124, 124, 124, 92, 15, 15, 15, 15, 15, 15, 15, 15,
          706  +    0, 0, 0, 0, 93, 125, 125, 125, 93, 15, 15, 15, 15, 15, 15, 15, 15,
   706    707       0, 15, 15, 15, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   707    708       15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 15, 15,
   708         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 15, 92, 92, 92, 124,
   709         -    124, 124, 124, 0, 92, 92, 92, 0, 92, 92, 92, 92, 0, 0, 0, 0, 0, 0,
   710         -    0, 92, 92, 0, 15, 15, 15, 0, 0, 0, 0, 0, 15, 15, 92, 92, 0, 0, 9, 9,
   711         -    9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 18, 18, 18, 18, 18,
   712         -    18, 18, 14, 15, 92, 124, 124, 3, 15, 15, 15, 15, 15, 15, 15, 15, 0,
          709  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 15, 93, 93, 93, 125,
          710  +    125, 125, 125, 0, 93, 93, 93, 0, 93, 93, 93, 93, 0, 0, 0, 0, 0, 0,
          711  +    0, 93, 93, 0, 15, 15, 15, 0, 0, 0, 0, 0, 15, 15, 93, 93, 0, 0, 9, 9,
          712  +    9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 3, 18, 18, 18, 18, 18,
          713  +    18, 18, 14, 15, 93, 125, 125, 3, 15, 15, 15, 15, 15, 15, 15, 15, 0,
   713    714       15, 15, 15, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   714    715       15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 15, 15,
   715         -    15, 15, 15, 15, 0, 15, 15, 15, 15, 15, 0, 0, 92, 15, 124, 92, 124,
   716         -    124, 124, 124, 124, 0, 92, 124, 124, 0, 124, 124, 92, 92, 0, 0, 0,
   717         -    0, 0, 0, 0, 124, 124, 0, 0, 0, 0, 0, 0, 0, 15, 0, 15, 15, 92, 92, 0,
          716  +    15, 15, 15, 15, 0, 15, 15, 15, 15, 15, 0, 0, 93, 15, 125, 93, 125,
          717  +    125, 125, 125, 125, 0, 93, 125, 125, 0, 125, 125, 93, 93, 0, 0, 0,
          718  +    0, 0, 0, 0, 125, 125, 0, 0, 0, 0, 0, 0, 0, 15, 0, 15, 15, 93, 93, 0,
   718    719       0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0,
   719         -    0, 0, 0, 0, 0, 92, 92, 124, 124, 0, 15, 15, 15, 15, 15, 15, 15, 15,
          720  +    0, 0, 0, 0, 0, 93, 93, 125, 125, 0, 15, 15, 15, 15, 15, 15, 15, 15,
   720    721       0, 15, 15, 15, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   721    722       15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   722         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 92, 92, 15, 124, 124, 124,
   723         -    92, 92, 92, 92, 0, 124, 124, 124, 0, 124, 124, 124, 92, 15, 14, 0,
   724         -    0, 0, 0, 15, 15, 15, 124, 18, 18, 18, 18, 18, 18, 18, 15, 15, 15, 92,
   725         -    92, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 18, 18, 18, 18, 18, 18, 18,
   726         -    18, 18, 14, 15, 15, 15, 15, 15, 15, 0, 0, 124, 124, 0, 15, 15, 15,
          723  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 93, 93, 15, 125, 125, 125,
          724  +    93, 93, 93, 93, 0, 125, 125, 125, 0, 125, 125, 125, 93, 15, 14, 0,
          725  +    0, 0, 0, 15, 15, 15, 125, 18, 18, 18, 18, 18, 18, 18, 15, 15, 15, 93,
          726  +    93, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 18, 18, 18, 18, 18, 18, 18,
          727  +    18, 18, 14, 15, 15, 15, 15, 15, 15, 0, 0, 125, 125, 0, 15, 15, 15,
   727    728       15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0,
   728    729       15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   729    730       15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   730         -    0, 15, 0, 0, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 92, 0, 0, 0, 0, 124,
   731         -    124, 124, 92, 92, 92, 0, 92, 0, 124, 124, 124, 124, 124, 124, 124,
   732         -    124, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 124, 124,
          731  +    0, 15, 0, 0, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 93, 0, 0, 0, 0, 125,
          732  +    125, 125, 93, 93, 93, 0, 93, 0, 125, 125, 125, 125, 125, 125, 125,
          733  +    125, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 125, 125,
   733    734       3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15,
   734    735       15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   735    736       15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   736         -    15, 15, 15, 15, 15, 15, 15, 92, 15, 15, 92, 92, 92, 92, 92, 92, 92,
   737         -    0, 0, 0, 0, 4, 15, 15, 15, 15, 15, 15, 91, 92, 92, 92, 92, 92, 92,
   738         -    92, 92, 3, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 3, 3, 0, 0, 0, 0, 0, 15, 15,
   739         -    0, 15, 0, 0, 15, 15, 0, 15, 0, 0, 15, 0, 0, 0, 0, 0, 0, 15, 15, 15,
   740         -    15, 0, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 15, 0, 15, 0, 15, 0,
   741         -    0, 15, 15, 0, 15, 15, 15, 15, 92, 15, 15, 92, 92, 92, 92, 92, 92, 0,
   742         -    92, 92, 15, 0, 0, 15, 15, 15, 15, 15, 0, 91, 0, 92, 92, 92, 92, 92,
   743         -    92, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 15, 15, 15, 15, 15, 14,
   744         -    14, 14, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 14, 3, 14, 14,
   745         -    14, 92, 92, 14, 14, 14, 14, 14, 14, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 18,
   746         -    18, 18, 18, 18, 18, 18, 18, 18, 18, 14, 92, 14, 92, 14, 92, 5, 6, 5,
   747         -    6, 124, 124, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 15,
   748         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   749         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0,
   750         -    92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 124, 92, 92,
   751         -    92, 92, 92, 3, 92, 92, 15, 15, 15, 15, 15, 92, 92, 92, 92, 92, 92,
   752         -    92, 92, 92, 92, 92, 0, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
   753         -    92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
   754         -    92, 92, 92, 92, 92, 92, 92, 92, 0, 14, 14, 14, 14, 14, 14, 14, 14,
   755         -    92, 14, 14, 14, 14, 14, 14, 0, 14, 14, 3, 3, 3, 3, 3, 14, 14, 14, 14,
   756         -    3, 3, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 124,
   757         -    124, 92, 92, 92, 92, 124, 92, 92, 92, 92, 92, 92, 124, 92, 92, 124,
   758         -    124, 92, 92, 15, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 3, 3, 3, 3, 3, 3, 15,
   759         -    15, 15, 15, 15, 15, 124, 124, 92, 92, 15, 15, 15, 15, 92, 92, 92, 15,
   760         -    124, 124, 124, 15, 15, 124, 124, 124, 124, 124, 124, 124, 15, 15, 15,
   761         -    92, 92, 92, 92, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   762         -    92, 124, 124, 92, 92, 124, 124, 124, 124, 124, 124, 92, 15, 124, 9,
   763         -    9, 9, 9, 9, 9, 9, 9, 9, 9, 124, 124, 124, 92, 14, 14, 125, 125, 125,
   764         -    125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
   765         -    125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
   766         -    125, 125, 125, 125, 125, 125, 125, 0, 125, 0, 0, 0, 0, 0, 125, 0, 0,
          737  +    15, 15, 15, 15, 15, 15, 15, 93, 15, 15, 93, 93, 93, 93, 93, 93, 93,
          738  +    0, 0, 0, 0, 4, 15, 15, 15, 15, 15, 15, 92, 93, 93, 93, 93, 93, 93,
          739  +    93, 93, 3, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 3, 3, 0, 0, 0, 0, 0, 15, 15,
          740  +    0, 15, 0, 15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          741  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15,
          742  +    0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 93, 15, 15, 93, 93, 93,
          743  +    93, 93, 93, 93, 93, 93, 15, 0, 0, 15, 15, 15, 15, 15, 0, 92, 0, 93,
          744  +    93, 93, 93, 93, 93, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 15, 15,
          745  +    15, 15, 15, 14, 14, 14, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
          746  +    14, 3, 14, 14, 14, 93, 93, 14, 14, 14, 14, 14, 14, 9, 9, 9, 9, 9, 9,
          747  +    9, 9, 9, 9, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 14, 93, 14, 93,
          748  +    14, 93, 5, 6, 5, 6, 125, 125, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15,
          749  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          750  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          751  +    15, 0, 0, 0, 0, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
          752  +    93, 125, 93, 93, 93, 93, 93, 3, 93, 93, 15, 15, 15, 15, 15, 93, 93,
          753  +    93, 93, 93, 93, 93, 93, 93, 93, 93, 0, 93, 93, 93, 93, 93, 93, 93,
          754  +    93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
          755  +    93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 0, 14, 14, 14, 14,
          756  +    14, 14, 14, 14, 93, 14, 14, 14, 14, 14, 14, 0, 14, 14, 3, 3, 3, 3,
          757  +    3, 14, 14, 14, 14, 3, 3, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15,
          758  +    15, 15, 15, 15, 125, 125, 93, 93, 93, 93, 125, 93, 93, 93, 93, 93,
          759  +    93, 125, 93, 93, 125, 125, 93, 93, 15, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
          760  +    3, 3, 3, 3, 3, 3, 15, 15, 15, 15, 15, 15, 125, 125, 93, 93, 15, 15,
          761  +    15, 15, 93, 93, 93, 15, 125, 125, 125, 15, 15, 125, 125, 125, 125,
          762  +    125, 125, 125, 15, 15, 15, 93, 93, 93, 93, 15, 15, 15, 15, 15, 15,
          763  +    15, 15, 15, 15, 15, 15, 15, 93, 125, 125, 93, 93, 125, 125, 125, 125,
          764  +    125, 125, 93, 15, 125, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 125, 125, 125,
          765  +    93, 14, 14, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
   767    766       126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
   768         -    126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
   769         -    126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
   770         -    126, 3, 91, 126, 126, 126, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15,
   771         -    15, 15, 15, 0, 0, 15, 15, 15, 15, 15, 15, 15, 0, 15, 0, 15, 15, 15,
   772         -    15, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 0,
   773         -    0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   774         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   775         -    0, 15, 15, 15, 15, 0, 0, 15, 15, 15, 15, 15, 15, 15, 0, 15, 0, 15,
   776         -    15, 15, 15, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   777         -    15, 15, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   778         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 0, 0,
   779         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   780         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   781         -    15, 0, 0, 92, 92, 92, 3, 3, 3, 3, 3, 3, 3, 3, 3, 18, 18, 18, 18, 18,
   782         -    18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 0, 0, 0,
   783         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14,
   784         -    14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 0, 0, 0, 0, 127, 127, 127,
          767  +    126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 0,
          768  +    126, 0, 0, 0, 0, 0, 126, 0, 0, 127, 127, 127, 127, 127, 127, 127, 127,
   785    769       127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
   786    770       127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
   787         -    127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
   788         -    127, 127, 127, 104, 104, 104, 104, 104, 104, 0, 0, 110, 110, 110, 110,
   789         -    110, 110, 0, 0, 8, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   790         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   791         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 3, 3, 15,
   792         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 2,
   793         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   794         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 5, 6, 0, 0, 0, 15, 15, 15, 15,
   795         -    15, 15, 15, 15, 15, 15, 15, 3, 3, 3, 128, 128, 128, 15, 15, 15, 15,
   796         -    15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15,
   797         -    15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 92, 92, 92, 0, 0, 0, 0, 0, 0,
   798         -    0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   799         -    15, 15, 15, 15, 15, 92, 92, 92, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15,
   800         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   801         -    92, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15,
   802         -    15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 15, 0, 92, 92, 0, 0, 0, 0, 0,
   803         -    0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   804         -    15, 15, 15, 15, 15, 15, 15, 15, 92, 92, 124, 92, 92, 92, 92, 92, 92,
   805         -    92, 124, 124, 124, 124, 124, 124, 124, 124, 92, 124, 124, 92, 92, 92,
   806         -    92, 92, 92, 92, 92, 92, 92, 92, 3, 3, 3, 91, 3, 3, 3, 4, 15, 92, 0,
   807         -    0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 18, 18, 18, 18,
   808         -    18, 18, 18, 18, 18, 18, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 8, 3, 3,
   809         -    3, 3, 92, 92, 92, 17, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0,
   810         -    0, 0, 15, 15, 15, 91, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   811         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   812         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   813         -    15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15,
   814         -    92, 92, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   815         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   816         -    15, 15, 92, 15, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   817         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   818         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0,
   819         -    0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          771  +    127, 127, 127, 127, 127, 127, 127, 3, 92, 127, 127, 127, 15, 15, 15,
          772  +    15, 15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 0, 0, 15, 15, 15, 15, 15,
          773  +    15, 15, 0, 15, 0, 15, 15, 15, 15, 0, 0, 15, 15, 15, 15, 15, 15, 15,
          774  +    15, 15, 0, 15, 15, 15, 15, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          775  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          776  +    15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 0, 0, 15, 15, 15, 15,
          777  +    15, 15, 15, 0, 15, 0, 15, 15, 15, 15, 0, 0, 15, 15, 15, 15, 15, 15,
          778  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 15, 15, 15,
          779  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          780  +    15, 0, 15, 15, 15, 15, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          781  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          782  +    15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 93, 93, 93, 3, 3, 3, 3, 3, 3,
          783  +    3, 3, 3, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
          784  +    18, 18, 18, 18, 18, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          785  +    15, 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0,
          786  +    0, 0, 0, 0, 0, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
          787  +    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
          788  +    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
          789  +    128, 128, 128, 128, 128, 128, 128, 128, 128, 105, 105, 105, 105, 105,
          790  +    105, 0, 0, 111, 111, 111, 111, 111, 111, 0, 0, 8, 15, 15, 15, 15, 15,
          791  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          792  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          793  +    15, 15, 15, 15, 15, 14, 3, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          794  +    15, 15, 15, 15, 15, 15, 15, 2, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          795  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          796  +    5, 6, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 3, 3, 3,
          797  +    129, 129, 129, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0,
          798  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 15,
          799  +    15, 93, 93, 93, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15,
          800  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 93, 93, 93, 3,
          801  +    3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          802  +    15, 15, 15, 15, 15, 15, 15, 15, 93, 93, 0, 0, 0, 0, 0, 0, 0, 0, 0,
          803  +    0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15,
          804  +    15, 15, 0, 93, 93, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15,
          805  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          806  +    93, 93, 125, 93, 93, 93, 93, 93, 93, 93, 125, 125, 125, 125, 125, 125,
          807  +    125, 125, 93, 125, 125, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
          808  +    3, 3, 3, 92, 3, 3, 3, 4, 15, 93, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
          809  +    0, 0, 0, 0, 0, 0, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 0, 0, 0,
          810  +    0, 0, 0, 3, 3, 3, 3, 3, 3, 8, 3, 3, 3, 3, 93, 93, 93, 17, 0, 9, 9,
          811  +    9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 15, 15, 15, 92, 15, 15, 15,
          812  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          813  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   820    814       15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0,
   821         -    92, 92, 92, 124, 124, 124, 124, 92, 92, 124, 124, 124, 0, 0, 0, 0,
   822         -    124, 124, 92, 124, 124, 124, 124, 124, 124, 92, 92, 92, 0, 0, 0, 0,
   823         -    14, 0, 0, 0, 3, 3, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 15, 15, 15, 15, 15,
   824         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   825         -    15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 15, 15, 15, 15, 15, 0, 0, 0,
   826         -    0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   827         -    15, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   828         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0,
   829         -    0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 18, 0, 0, 0, 14, 14, 14, 14, 14, 14,
   830         -    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
   831         -    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15,
   832         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   833         -    92, 92, 124, 124, 92, 0, 0, 3, 3, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   834         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 124, 92, 124, 92, 92,
   835         -    92, 92, 92, 92, 92, 0, 92, 124, 92, 124, 124, 92, 92, 92, 92, 92, 92,
   836         -    92, 92, 124, 124, 124, 124, 124, 124, 92, 92, 92, 92, 92, 92, 92, 92,
   837         -    92, 92, 0, 0, 92, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 9,
   838         -    9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 91,
   839         -    3, 3, 3, 3, 3, 3, 0, 0, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
   840         -    92, 92, 92, 119, 0, 92, 92, 92, 92, 124, 15, 15, 15, 15, 15, 15, 15,
   841         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   842         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   843         -    15, 15, 15, 15, 15, 15, 92, 124, 92, 92, 92, 92, 92, 124, 92, 124,
   844         -    124, 124, 124, 124, 92, 124, 124, 15, 15, 15, 15, 15, 15, 15, 0, 0,
   845         -    0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 3, 3, 3, 3, 3, 3, 3, 14, 14, 14,
   846         -    14, 14, 14, 14, 14, 14, 14, 92, 92, 92, 92, 92, 92, 92, 92, 92, 14,
   847         -    14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 0, 92, 92, 124, 15, 15, 15, 15,
   848         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   849         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 124, 92, 92, 92, 92, 124, 124,
   850         -    92, 92, 124, 92, 92, 92, 15, 15, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 15,
   851         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 92, 124, 92, 92, 124, 124,
   852         -    124, 92, 124, 92, 92, 92, 124, 124, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3,
   853         -    3, 15, 15, 15, 15, 124, 124, 124, 124, 124, 124, 124, 124, 92, 92,
   854         -    92, 92, 92, 92, 92, 92, 124, 124, 92, 92, 0, 0, 0, 3, 3, 3, 3, 3, 9,
   855         -    9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 15, 15, 15, 9, 9, 9, 9, 9, 9, 9,
   856         -    9, 9, 9, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   857         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 91, 91,
   858         -    91, 91, 91, 91, 3, 3, 129, 130, 131, 132, 132, 133, 134, 135, 136,
   859         -    0, 0, 0, 0, 0, 0, 0, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
   860         -    137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
   861         -    137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
   862         -    137, 137, 137, 137, 137, 0, 0, 137, 137, 137, 3, 3, 3, 3, 3, 3, 3,
   863         -    3, 0, 0, 0, 0, 0, 0, 0, 0, 92, 92, 92, 3, 92, 92, 92, 92, 92, 92, 92,
   864         -    92, 92, 92, 92, 92, 92, 124, 92, 92, 92, 92, 92, 92, 92, 15, 15, 15,
   865         -    15, 92, 15, 15, 15, 15, 124, 124, 92, 15, 15, 124, 92, 92, 0, 0, 0,
   866         -    0, 0, 0, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
          815  +    0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 93, 93, 15, 15, 15, 15, 15, 15,
          816  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          817  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 93, 15, 0, 0, 0, 0, 0,
          818  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          819  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          820  +    15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15,
          821  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          822  +    15, 15, 15, 15, 15, 15, 15, 15, 0, 93, 93, 93, 125, 125, 125, 125,
          823  +    93, 93, 125, 125, 125, 0, 0, 0, 0, 125, 125, 93, 125, 125, 125, 125,
          824  +    125, 125, 93, 93, 93, 0, 0, 0, 0, 14, 0, 0, 0, 3, 3, 9, 9, 9, 9, 9,
          825  +    9, 9, 9, 9, 9, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          826  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          827  +    0, 0, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15,
          828  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 15, 15, 15, 15,
          829  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          830  +    15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
          831  +    18, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
          832  +    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
          833  +    14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          834  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 93, 93, 125, 125, 93, 0, 0, 3,
          835  +    3, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          836  +    15, 15, 15, 15, 15, 125, 93, 125, 93, 93, 93, 93, 93, 93, 93, 0, 93,
          837  +    125, 93, 125, 125, 93, 93, 93, 93, 93, 93, 93, 93, 125, 125, 125, 125,
          838  +    125, 125, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 0, 0, 93, 9, 9, 9,
          839  +    9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
          840  +    0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 92, 3, 3, 3, 3, 3, 3, 0, 0,
          841  +    93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 120, 0, 93,
          842  +    93, 93, 93, 125, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          843  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          844  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          845  +    93, 125, 93, 93, 93, 93, 93, 125, 93, 125, 125, 125, 125, 125, 93,
          846  +    125, 125, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9,
          847  +    9, 9, 9, 9, 3, 3, 3, 3, 3, 3, 3, 14, 14, 14, 14, 14, 14, 14, 14, 14,
          848  +    14, 93, 93, 93, 93, 93, 93, 93, 93, 93, 14, 14, 14, 14, 14, 14, 14,
          849  +    14, 14, 0, 0, 0, 93, 93, 125, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          850  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          851  +    15, 15, 15, 125, 93, 93, 93, 93, 125, 125, 93, 93, 125, 93, 93, 93,
          852  +    15, 15, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 15, 15, 15, 15, 15, 15, 15, 15,
          853  +    15, 15, 15, 15, 93, 125, 93, 93, 125, 125, 125, 93, 125, 93, 93, 93,
          854  +    125, 125, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 15, 15, 15, 15, 125,
          855  +    125, 125, 125, 125, 125, 125, 125, 93, 93, 93, 93, 93, 93, 93, 93,
          856  +    125, 125, 93, 93, 0, 0, 0, 3, 3, 3, 3, 3, 9, 9, 9, 9, 9, 9, 9, 9, 9,
          857  +    9, 0, 0, 0, 15, 15, 15, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 15, 15, 15, 15,
          858  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          859  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 92, 92, 92, 92, 92, 92, 3, 3, 130,
          860  +    131, 132, 133, 133, 134, 135, 136, 137, 0, 0, 0, 0, 0, 0, 0, 138, 138,
          861  +    138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
          862  +    138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
          863  +    138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 0,
          864  +    0, 138, 138, 138, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 93,
          865  +    93, 93, 3, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 125,
          866  +    93, 93, 93, 93, 93, 93, 93, 15, 15, 15, 15, 93, 15, 15, 15, 15, 15,
          867  +    15, 93, 15, 15, 125, 93, 93, 15, 0, 0, 0, 0, 0, 21, 21, 21, 21, 21,
          868  +    21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
   867    869       21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
   868         -    21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 91, 91, 91, 91, 91,
   869         -    91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
   870         -    91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
   871         -    91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
   872         -    91, 91, 91, 91, 91, 91, 91, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
   873         -    21, 21, 21, 91, 138, 21, 21, 21, 139, 21, 21, 21, 21, 21, 21, 21, 21,
   874         -    21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
   875         -    21, 21, 21, 21, 91, 91, 91, 91, 91, 92, 92, 92, 92, 92, 92, 92, 92,
          870  +    21, 21, 21, 21, 21, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
          871  +    92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
          872  +    92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
   876    873       92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
   877         -    92, 0, 92, 92, 92, 92, 92, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24,
   878         -    23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 21, 21, 21, 21, 21,
   879         -    140, 21, 21, 141, 21, 142, 142, 142, 142, 142, 142, 142, 142, 143,
   880         -    143, 143, 143, 143, 143, 143, 143, 142, 142, 142, 142, 142, 142, 0,
   881         -    0, 143, 143, 143, 143, 143, 143, 0, 0, 142, 142, 142, 142, 142, 142,
   882         -    142, 142, 143, 143, 143, 143, 143, 143, 143, 143, 142, 142, 142, 142,
   883         -    142, 142, 142, 142, 143, 143, 143, 143, 143, 143, 143, 143, 142, 142,
   884         -    142, 142, 142, 142, 0, 0, 143, 143, 143, 143, 143, 143, 0, 0, 21, 142,
   885         -    21, 142, 21, 142, 21, 142, 0, 143, 0, 143, 0, 143, 0, 143, 142, 142,
   886         -    142, 142, 142, 142, 142, 142, 143, 143, 143, 143, 143, 143, 143, 143,
   887         -    144, 144, 145, 145, 145, 145, 146, 146, 147, 147, 148, 148, 149, 149,
   888         -    0, 0, 142, 142, 142, 142, 142, 142, 142, 142, 150, 150, 150, 150, 150,
   889         -    150, 150, 150, 142, 142, 142, 142, 142, 142, 142, 142, 150, 150, 150,
   890         -    150, 150, 150, 150, 150, 142, 142, 142, 142, 142, 142, 142, 142, 150,
   891         -    150, 150, 150, 150, 150, 150, 150, 142, 142, 21, 151, 21, 0, 21, 21,
   892         -    143, 143, 152, 152, 153, 11, 154, 11, 11, 11, 21, 151, 21, 0, 21, 21,
   893         -    155, 155, 155, 155, 153, 11, 11, 11, 142, 142, 21, 21, 0, 0, 21, 21,
   894         -    143, 143, 156, 156, 0, 11, 11, 11, 142, 142, 21, 21, 21, 113, 21, 21,
   895         -    143, 143, 157, 157, 117, 11, 11, 11, 0, 0, 21, 151, 21, 0, 21, 21,
   896         -    158, 158, 159, 159, 153, 11, 11, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
   897         -    17, 17, 17, 17, 17, 8, 8, 8, 8, 8, 8, 3, 3, 16, 20, 5, 16, 16, 20,
   898         -    5, 16, 3, 3, 3, 3, 3, 3, 3, 3, 160, 161, 17, 17, 17, 17, 17, 2, 3,
   899         -    3, 3, 3, 3, 3, 3, 3, 3, 16, 20, 3, 3, 3, 3, 12, 12, 3, 3, 3, 7, 5,
   900         -    6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 12, 3, 3, 3, 3, 3, 3, 3,
   901         -    3, 3, 3, 2, 17, 17, 17, 17, 17, 0, 17, 17, 17, 17, 17, 17, 17, 17,
   902         -    17, 17, 18, 91, 0, 0, 18, 18, 18, 18, 18, 18, 7, 7, 7, 5, 6, 91, 18,
   903         -    18, 18, 18, 18, 18, 18, 18, 18, 18, 7, 7, 7, 5, 6, 0, 91, 91, 91, 91,
   904         -    91, 91, 91, 91, 91, 91, 91, 91, 91, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4,
   905         -    4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
   906         -    4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 92, 92, 92,
   907         -    92, 92, 92, 92, 92, 92, 92, 92, 92, 119, 119, 119, 119, 92, 119, 119,
   908         -    119, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 0, 0, 0, 0, 0,
   909         -    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 14, 107, 14, 14, 14, 14, 107, 14,
   910         -    14, 21, 107, 107, 107, 21, 21, 107, 107, 107, 21, 14, 107, 14, 14,
   911         -    7, 107, 107, 107, 107, 107, 14, 14, 14, 14, 14, 14, 107, 14, 162, 14,
   912         -    107, 14, 163, 164, 107, 107, 14, 21, 107, 107, 165, 107, 21, 15, 15,
   913         -    15, 15, 21, 14, 14, 21, 21, 107, 107, 7, 7, 7, 7, 7, 107, 21, 21, 21,
   914         -    21, 14, 7, 14, 14, 166, 14, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
   915         -    18, 18, 18, 18, 18, 18, 167, 167, 167, 167, 167, 167, 167, 167, 167,
   916         -    167, 167, 167, 167, 167, 167, 167, 168, 168, 168, 168, 168, 168, 168,
   917         -    168, 168, 168, 168, 168, 168, 168, 168, 168, 128, 128, 128, 23, 24,
   918         -    128, 128, 128, 128, 18, 14, 14, 0, 0, 0, 0, 7, 7, 7, 7, 7, 14, 14,
   919         -    14, 14, 14, 7, 7, 14, 14, 14, 14, 7, 14, 14, 7, 14, 14, 7, 14, 14,
   920         -    14, 14, 14, 14, 14, 7, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
   921         -    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
   922         -    14, 14, 14, 7, 7, 14, 14, 7, 14, 7, 14, 14, 14, 14, 14, 14, 14, 14,
   923         -    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
   924         -    14, 14, 14, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
          874  +    21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 92, 139, 21, 21,
          875  +    21, 140, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
          876  +    21, 141, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 92, 92, 92,
          877  +    92, 92, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
          878  +    93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 0, 93, 93, 93, 93, 93,
          879  +    23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23,
          880  +    24, 23, 24, 23, 24, 21, 21, 21, 21, 21, 142, 21, 21, 143, 21, 144,
          881  +    144, 144, 144, 144, 144, 144, 144, 145, 145, 145, 145, 145, 145, 145,
          882  +    145, 144, 144, 144, 144, 144, 144, 0, 0, 145, 145, 145, 145, 145, 145,
          883  +    0, 0, 144, 144, 144, 144, 144, 144, 144, 144, 145, 145, 145, 145, 145,
          884  +    145, 145, 145, 144, 144, 144, 144, 144, 144, 144, 144, 145, 145, 145,
          885  +    145, 145, 145, 145, 145, 144, 144, 144, 144, 144, 144, 0, 0, 145, 145,
          886  +    145, 145, 145, 145, 0, 0, 21, 144, 21, 144, 21, 144, 21, 144, 0, 145,
          887  +    0, 145, 0, 145, 0, 145, 144, 144, 144, 144, 144, 144, 144, 144, 145,
          888  +    145, 145, 145, 145, 145, 145, 145, 146, 146, 147, 147, 147, 147, 148,
          889  +    148, 149, 149, 150, 150, 151, 151, 0, 0, 144, 144, 144, 144, 144, 144,
          890  +    144, 144, 152, 152, 152, 152, 152, 152, 152, 152, 144, 144, 144, 144,
          891  +    144, 144, 144, 144, 152, 152, 152, 152, 152, 152, 152, 152, 144, 144,
          892  +    144, 144, 144, 144, 144, 144, 152, 152, 152, 152, 152, 152, 152, 152,
          893  +    144, 144, 21, 153, 21, 0, 21, 21, 145, 145, 154, 154, 155, 11, 156,
          894  +    11, 11, 11, 21, 153, 21, 0, 21, 21, 157, 157, 157, 157, 155, 11, 11,
          895  +    11, 144, 144, 21, 21, 0, 0, 21, 21, 145, 145, 158, 158, 0, 11, 11,
          896  +    11, 144, 144, 21, 21, 21, 114, 21, 21, 145, 145, 159, 159, 118, 11,
          897  +    11, 11, 0, 0, 21, 153, 21, 0, 21, 21, 160, 160, 161, 161, 155, 11,
          898  +    11, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 17, 17, 17, 17, 17, 8, 8, 8,
          899  +    8, 8, 8, 3, 3, 16, 20, 5, 16, 16, 20, 5, 16, 3, 3, 3, 3, 3, 3, 3, 3,
          900  +    162, 163, 17, 17, 17, 17, 17, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 16, 20,
          901  +    3, 3, 3, 3, 12, 12, 3, 3, 3, 7, 5, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
          902  +    3, 7, 3, 12, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 17, 17, 17, 17, 17, 0,
          903  +    17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 92, 0, 0, 18, 18, 18, 18,
          904  +    18, 18, 7, 7, 7, 5, 6, 92, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
          905  +    7, 7, 7, 5, 6, 0, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
          906  +    0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
          907  +    4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
          908  +    0, 0, 0, 0, 0, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
          909  +    120, 120, 120, 120, 93, 120, 120, 120, 93, 93, 93, 93, 93, 93, 93,
          910  +    93, 93, 93, 93, 93, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14,
          911  +    14, 108, 14, 14, 14, 14, 108, 14, 14, 21, 108, 108, 108, 21, 21, 108,
          912  +    108, 108, 21, 14, 108, 14, 14, 7, 108, 108, 108, 108, 108, 14, 14,
          913  +    14, 14, 14, 14, 108, 14, 164, 14, 108, 14, 165, 166, 108, 108, 14,
          914  +    21, 108, 108, 167, 108, 21, 15, 15, 15, 15, 21, 14, 14, 21, 21, 108,
          915  +    108, 7, 7, 7, 7, 7, 108, 21, 21, 21, 21, 14, 7, 14, 14, 168, 14, 18,
          916  +    18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 169, 169,
          917  +    169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
          918  +    170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
          919  +    170, 170, 129, 129, 129, 23, 24, 129, 129, 129, 129, 18, 14, 14, 0,
          920  +    0, 0, 0, 7, 7, 7, 7, 7, 14, 14, 14, 14, 14, 7, 7, 14, 14, 14, 14, 7,
          921  +    14, 14, 7, 14, 14, 7, 14, 14, 14, 14, 14, 14, 14, 7, 14, 14, 14, 14,
          922  +    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
          923  +    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 7, 7, 14, 14, 7, 14, 7, 14,
          924  +    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
          925  +    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 7, 7, 7, 7, 7,
   925    926       7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
   926         -    7, 7, 7, 7, 7, 7, 14, 14, 14, 14, 14, 14, 14, 14, 5, 6, 5, 6, 14, 14,
          927  +    7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 14, 14,
          928  +    14, 14, 14, 5, 6, 5, 6, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
          929  +    14, 14, 14, 14, 14, 14, 14, 14, 14, 7, 7, 14, 14, 14, 14, 14, 14, 14,
          930  +    5, 6, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
   927    931       14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
   928         -    14, 7, 7, 14, 14, 14, 14, 14, 14, 14, 5, 6, 14, 14, 14, 14, 14, 14,
   929         -    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
   930         -    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
   931         -    14, 14, 14, 14, 14, 14, 14, 14, 14, 7, 14, 14, 14, 14, 14, 14, 14,
   932         -    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
   933         -    14, 14, 14, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
   934         -    7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
          932  +    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 7,
   935    933       14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
   936    934       14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 7, 7, 7, 7, 7,
   937         -    7, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
          935  +    7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14,
   938    936       14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
   939         -    14, 14, 14, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
   940         -    0, 0, 0, 0, 0, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
   941         -    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18,
   942         -    18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
          937  +    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
          938  +    14, 14, 14, 14, 7, 7, 7, 7, 7, 7, 14, 14, 14, 14, 14, 14, 14, 14, 14,
          939  +    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
          940  +    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 0, 0, 0, 0, 0, 0,
          941  +    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 14, 14, 14,
          942  +    14, 14, 14, 14, 14, 14, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
          943  +    0, 0, 0, 0, 0, 0, 0, 0, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
   943    944       18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
   944    945       18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
   945         -    18, 18, 18, 18, 18, 18, 18, 18, 14, 14, 14, 14, 14, 14, 14, 14, 14,
          946  +    18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 14, 14,
   946    947       14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
   947         -    169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
   948         -    169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 170, 170,
   949         -    170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
   950         -    170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 18, 18, 18, 18, 18,
   951         -    18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
   952         -    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
   953         -    14, 14, 14, 14, 14, 14, 7, 14, 14, 14, 14, 14, 14, 14, 14, 14, 7, 14,
   954         -    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
   955         -    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
   956         -    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
   957         -    14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 14, 14, 14, 14, 14, 14,
          948  +    14, 14, 14, 14, 14, 14, 14, 171, 171, 171, 171, 171, 171, 171, 171,
          949  +    171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
          950  +    171, 171, 171, 171, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
          951  +    172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
          952  +    172, 172, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
          953  +    18, 18, 18, 18, 18, 18, 18, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
          954  +    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 7, 14, 14, 14,
   958    955       14, 14, 14, 14, 14, 14, 7, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
   959         -    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 5, 6, 5, 6,
   960         -    5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
          956  +    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
          957  +    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
          958  +    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 14,
          959  +    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 7, 14, 14,
          960  +    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
          961  +    14, 14, 14, 14, 14, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 18, 18,
   961    962       18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
   962         -    18, 18, 18, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 7, 7, 7,
   963         -    7, 7, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
   964         -    7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 7,
   965         -    7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 5, 6, 5, 6, 5,
   966         -    6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 7, 7, 7, 7, 7, 7,
          963  +    18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 14, 14, 14, 14, 14, 14,
          964  +    14, 14, 14, 14, 14, 14, 7, 7, 7, 7, 7, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7,
          965  +    7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
          966  +    5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
          967  +    7, 7, 7, 7, 7, 7, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5,
          968  +    6, 5, 6, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
          969  +    7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 5, 6, 5, 6, 7, 7, 7, 7, 7, 7,
   967    970       7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
   968         -    7, 7, 5, 6, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
   969         -    7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 5, 6, 7, 7, 14, 14, 14,
   970         -    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 7, 7, 7, 7, 7,
   971         -    7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 7, 7, 7, 7,
   972         -    7, 7, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
          971  +    7, 7, 7, 5, 6, 7, 7, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
          972  +    14, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
          973  +    7, 7, 7, 7, 14, 14, 7, 7, 7, 7, 7, 7, 14, 14, 14, 14, 14, 14, 14, 14,
   973    974       14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
   974         -    14, 14, 14, 14, 14, 14, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
          975  +    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 14, 14,
   975    976       14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
   976         -    14, 14, 14, 14, 14, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
   977         -    14, 14, 14, 14, 14, 14, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
   978         -    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
   979         -    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
   980         -    14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 122, 122, 122, 122, 122, 122,
   981         -    122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122,
   982         -    122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122,
   983         -    122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 0,
          977  +    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 14, 14, 14,
          978  +    14, 14, 14, 14, 14, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
   984    979       123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
   985    980       123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
   986         -    123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
   987         -    123, 123, 123, 123, 123, 0, 23, 24, 171, 172, 173, 174, 175, 23, 24,
   988         -    23, 24, 23, 24, 176, 177, 178, 179, 21, 23, 24, 21, 23, 24, 21, 21,
   989         -    21, 21, 21, 91, 91, 180, 180, 23, 24, 23, 24, 21, 14, 14, 14, 14, 14,
   990         -    14, 23, 24, 23, 24, 92, 92, 92, 23, 24, 0, 0, 0, 0, 0, 3, 3, 3, 3,
   991         -    18, 3, 3, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
   992         -    181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
   993         -    181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 0, 181,
   994         -    0, 0, 0, 0, 0, 181, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   995         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0,
   996         -    0, 0, 91, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 15, 15,
   997         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
   998         -    15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15,
   999         -    15, 0, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 15, 15, 15, 0,
  1000         -    15, 15, 15, 15, 15, 15, 15, 0, 3, 3, 16, 20, 16, 20, 3, 3, 3, 16, 20,
  1001         -    3, 16, 20, 3, 3, 3, 3, 3, 3, 3, 3, 3, 8, 3, 3, 8, 3, 16, 20, 3, 3,
  1002         -    16, 20, 5, 6, 5, 6, 5, 6, 5, 6, 3, 3, 3, 3, 3, 91, 3, 3, 3, 3, 3, 3,
  1003         -    3, 3, 3, 3, 8, 8, 3, 3, 3, 3, 8, 3, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
  1004         -    3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 14, 14,
  1005         -    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
  1006         -    14, 14, 14, 14, 14, 14, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
  1007         -    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 0,
  1008         -    0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
  1009         -    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 0, 0, 0, 0, 0,
  1010         -    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 14, 14,
  1011         -    14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 0, 0, 2, 3, 3, 3, 14, 91,
  1012         -    15, 128, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 14, 14, 5, 6, 5, 6, 5, 6, 5,
  1013         -    6, 8, 5, 6, 6, 14, 128, 128, 128, 128, 128, 128, 128, 128, 128, 92,
  1014         -    92, 92, 92, 124, 124, 8, 91, 91, 91, 91, 91, 14, 14, 128, 128, 128,
  1015         -    91, 15, 3, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1016         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 92, 92, 11, 11, 91,
  1017         -    91, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1018         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 3, 91, 91, 91, 15,
  1019         -    0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1020         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1021         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 15,
  1022         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1023         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 14, 14, 18, 18, 18, 18,
  1024         -    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15,
  1025         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1026         -    15, 15, 15, 0, 0, 0, 0, 0, 14, 14, 14, 14, 0, 0, 0, 0, 0, 0, 0, 0,
  1027         -    0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1028         -    15, 15, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 14, 14, 14, 14, 14,
  1029         -    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
  1030         -    14, 14, 14, 14, 14, 14, 14, 14, 18, 18, 18, 18, 18, 18, 18, 18, 14,
  1031         -    18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 14, 14,
          981  +    123, 123, 123, 123, 123, 123, 123, 123, 123, 0, 124, 124, 124, 124,
          982  +    124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
          983  +    124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
          984  +    124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
          985  +    124, 0, 23, 24, 173, 174, 175, 176, 177, 23, 24, 23, 24, 23, 24, 178,
          986  +    179, 180, 181, 21, 23, 24, 21, 23, 24, 21, 21, 21, 21, 21, 92, 92,
          987  +    182, 182, 23, 24, 23, 24, 21, 14, 14, 14, 14, 14, 14, 23, 24, 23, 24,
          988  +    93, 93, 93, 23, 24, 0, 0, 0, 0, 0, 3, 3, 3, 3, 18, 3, 3, 183, 183,
          989  +    183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
          990  +    183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
          991  +    183, 183, 183, 183, 183, 183, 183, 183, 0, 183, 0, 0, 0, 0, 0, 183,
          992  +    0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
          993  +    15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 92, 3, 0, 0, 0,
          994  +    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 15, 15, 15, 15, 15, 15, 15, 15,
          995  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0,
          996  +    0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 15,
          997  +    15, 15, 0, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 15, 15, 15,
          998  +    0, 3, 3, 16, 20, 16, 20, 3, 3, 3, 16, 20, 3, 16, 20, 3, 3, 3, 3, 3,
          999  +    3, 3, 3, 3, 8, 3, 3, 8, 3, 16, 20, 3, 3, 16, 20, 5, 6, 5, 6, 5, 6,
         1000  +    5, 6, 3, 3, 3, 3, 3, 92, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 8, 8, 3, 3,
         1001  +    3, 3, 8, 3, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0,
         1002  +    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14,
         1003  +    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
         1004  +    0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
         1005  +    14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
         1006  +    0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
         1007  +    14, 14, 14, 14, 14, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
         1008  +    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14,
         1009  +    14, 14, 14, 0, 0, 0, 0, 2, 3, 3, 3, 14, 92, 15, 129, 5, 6, 5, 6, 5,
         1010  +    6, 5, 6, 5, 6, 14, 14, 5, 6, 5, 6, 5, 6, 5, 6, 8, 5, 6, 6, 14, 129,
         1011  +    129, 129, 129, 129, 129, 129, 129, 129, 93, 93, 93, 93, 125, 125, 8,
         1012  +    92, 92, 92, 92, 92, 14, 14, 129, 129, 129, 92, 15, 3, 14, 14, 15, 15,
         1013  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1014  +    15, 15, 15, 15, 0, 0, 93, 93, 11, 11, 92, 92, 15, 15, 15, 15, 15, 15,
         1015  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1016  +    15, 15, 15, 15, 15, 3, 92, 92, 92, 15, 0, 0, 0, 0, 0, 15, 15, 15, 15,
         1017  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1018  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1019  +    15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1020  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1021  +    15, 15, 0, 14, 14, 18, 18, 18, 18, 14, 14, 14, 14, 14, 14, 14, 14,
         1022  +    14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1023  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 14,
         1024  +    14, 14, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15,
         1025  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14,
         1026  +    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
         1027  +    14, 14, 14, 14, 14, 14, 14, 14, 0, 18, 18, 18, 18, 18, 18, 18, 18,
         1028  +    18, 18, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
  1032   1029       14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 18, 18,
  1033         -    18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 15, 15, 15, 15,
  1034         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0,
  1035         -    0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1036         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 91, 15, 15, 15, 15, 15,
         1030  +    18, 18, 18, 18, 18, 18, 14, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
         1031  +    18, 18, 18, 18, 18, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
         1032  +    14, 14, 14, 14, 14, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
         1033  +    18, 18, 18, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1034  +    15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15,
  1037   1035       15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1038         -    15, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
  1039         -    14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15,
         1036  +    15, 92, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1037  +    15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14,
         1038  +    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0,
         1039  +    0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1040   1040       15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1041         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 91, 3, 3, 3, 15, 15, 15, 15,
  1042         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 9, 9, 9, 9, 9, 9, 9,
  1043         -    9, 9, 9, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1044         -    0, 0, 0, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 15,
  1045         -    92, 119, 119, 119, 3, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 3, 91,
  1046         -    23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23,
  1047         -    24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 91, 91, 92, 92, 15, 15,
  1048         -    15, 15, 15, 15, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 92,
  1049         -    92, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 11, 11, 11, 11,
  1050         -    11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
  1051         -    91, 91, 91, 91, 91, 91, 91, 91, 91, 11, 11, 23, 24, 23, 24, 23, 24,
  1052         -    23, 24, 23, 24, 23, 24, 23, 24, 21, 21, 23, 24, 23, 24, 23, 24, 23,
         1041  +    92, 3, 3, 3, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1042  +    15, 15, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 15, 15, 0, 0, 0, 0, 0, 0, 0,
         1043  +    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 24, 23, 24, 23, 24, 23,
         1044  +    24, 23, 24, 23, 24, 23, 24, 15, 93, 120, 120, 120, 3, 93, 93, 93, 93,
         1045  +    93, 93, 93, 93, 93, 93, 3, 92, 23, 24, 23, 24, 23, 24, 23, 24, 23,
  1053   1046       24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24,
  1054         -    23, 24, 23, 24, 23, 24, 91, 21, 21, 21, 21, 21, 21, 21, 21, 23, 24,
  1055         -    23, 24, 182, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 91, 11, 11, 23,
  1056         -    24, 183, 21, 15, 23, 24, 23, 24, 21, 21, 23, 24, 23, 24, 23, 24, 23,
  1057         -    24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 184, 185, 186,
  1058         -    187, 184, 21, 188, 189, 190, 191, 23, 24, 23, 24, 23, 24, 0, 0, 0,
         1047  +    23, 24, 92, 92, 93, 93, 15, 15, 15, 15, 15, 15, 129, 129, 129, 129,
         1048  +    129, 129, 129, 129, 129, 129, 93, 93, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0,
         1049  +    0, 0, 0, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
         1050  +    11, 11, 11, 11, 11, 11, 11, 11, 11, 92, 92, 92, 92, 92, 92, 92, 92,
         1051  +    92, 11, 11, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24,
         1052  +    21, 21, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23,
         1053  +    24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 92, 21,
         1054  +    21, 21, 21, 21, 21, 21, 21, 23, 24, 23, 24, 184, 23, 24, 23, 24, 23,
         1055  +    24, 23, 24, 23, 24, 92, 11, 11, 23, 24, 185, 21, 15, 23, 24, 23, 24,
         1056  +    186, 21, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23,
         1057  +    24, 23, 24, 23, 24, 187, 188, 189, 190, 187, 21, 191, 192, 193, 194,
         1058  +    23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 0, 0, 23, 24, 195,
         1059  +    196, 197, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1059   1060       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1060         -    0, 0, 0, 15, 91, 91, 21, 15, 15, 15, 15, 15, 15, 15, 92, 15, 15, 15,
  1061         -    92, 15, 15, 15, 15, 92, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1062         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 124, 124, 92, 92, 124,
  1063         -    14, 14, 14, 14, 0, 0, 0, 0, 18, 18, 18, 18, 18, 18, 14, 14, 4, 14,
  1064         -    0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1065         -    15, 15, 15, 15, 15, 15, 15, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 124,
  1066         -    124, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1067         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1068         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1069         -    124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
  1070         -    124, 124, 92, 92, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 9, 9, 9, 9, 9, 9, 9,
  1071         -    9, 9, 9, 0, 0, 0, 0, 0, 0, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
  1072         -    92, 92, 92, 92, 92, 92, 92, 92, 15, 15, 15, 15, 15, 15, 3, 3, 3, 15,
  1073         -    3, 15, 15, 92, 15, 15, 15, 15, 15, 15, 92, 92, 92, 92, 92, 92, 92,
  1074         -    92, 3, 3, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1075         -    15, 15, 15, 15, 15, 15, 15, 15, 92, 92, 92, 92, 92, 92, 92, 92, 92,
  1076         -    92, 92, 124, 124, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 15, 15, 15, 15,
  1077         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1078         -    15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15,
  1079         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 92, 124, 124, 92, 92,
  1080         -    92, 92, 124, 124, 92, 124, 124, 124, 124, 3, 3, 3, 3, 3, 3, 3, 3, 3,
  1081         -    3, 3, 3, 3, 0, 91, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 3, 3,
  1082         -    15, 15, 15, 15, 15, 92, 91, 15, 15, 15, 15, 15, 15, 15, 15, 15, 9,
  1083         -    9, 9, 9, 9, 9, 9, 9, 9, 9, 15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 15,
  1084         -    15, 15, 15, 15, 92, 92, 92, 92, 92, 92, 124, 124, 92, 92, 124, 124,
  1085         -    92, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 92, 15, 15, 15, 15,
  1086         -    15, 15, 15, 15, 92, 124, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0,
  1087         -    3, 3, 3, 3, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1088         -    15, 15, 91, 15, 15, 15, 15, 15, 15, 14, 14, 14, 15, 124, 92, 124, 15,
  1089         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1090         -    92, 15, 92, 92, 92, 15, 15, 92, 92, 15, 15, 15, 15, 15, 92, 92, 15,
  1091         -    92, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1092         -    0, 0, 0, 0, 15, 15, 91, 3, 3, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1093         -    15, 124, 92, 92, 124, 124, 3, 3, 15, 91, 91, 124, 92, 0, 0, 0, 0, 0,
  1094         -    0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 0, 0, 15, 15, 15, 15, 15, 15,
  1095         -    0, 0, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15,
  1096         -    15, 15, 15, 15, 0, 15, 15, 15, 15, 15, 15, 15, 0, 21, 21, 21, 21, 21,
         1061  +    0, 0, 0, 0, 0, 0, 15, 92, 92, 21, 15, 15, 15, 15, 15, 15, 15, 93, 15,
         1062  +    15, 15, 93, 15, 15, 15, 15, 93, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1063  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 125, 125, 93,
         1064  +    93, 125, 14, 14, 14, 14, 0, 0, 0, 0, 18, 18, 18, 18, 18, 18, 14, 14,
         1065  +    4, 14, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1066  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0,
         1067  +    0, 125, 125, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1068  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1069  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1070  +    15, 15, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
         1071  +    125, 125, 125, 125, 93, 93, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 9, 9, 9,
         1072  +    9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 93, 93, 93, 93, 93, 93, 93,
         1073  +    93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 15, 15, 15, 15, 15, 15,
         1074  +    3, 3, 3, 15, 3, 15, 15, 93, 15, 15, 15, 15, 15, 15, 93, 93, 93, 93,
         1075  +    93, 93, 93, 93, 3, 3, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1076  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 93, 93, 93, 93, 93, 93,
         1077  +    93, 93, 93, 93, 93, 125, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 15,
         1078  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1079  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 15, 15, 15, 15,
         1080  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 93, 125,
         1081  +    125, 93, 93, 93, 93, 125, 125, 93, 93, 125, 125, 125, 3, 3, 3, 3, 3,
         1082  +    3, 3, 3, 3, 3, 3, 3, 3, 0, 92, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0,
         1083  +    0, 0, 3, 3, 15, 15, 15, 15, 15, 93, 92, 15, 15, 15, 15, 15, 15, 15,
         1084  +    15, 15, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 15, 15, 15, 15, 15, 0, 15, 15,
         1085  +    15, 15, 15, 15, 15, 15, 15, 93, 93, 93, 93, 93, 93, 125, 125, 93, 93,
         1086  +    125, 125, 93, 93, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 93, 15, 15,
         1087  +    15, 15, 15, 15, 15, 15, 93, 125, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
         1088  +    0, 0, 3, 3, 3, 3, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1089  +    15, 15, 15, 92, 15, 15, 15, 15, 15, 15, 14, 14, 14, 15, 125, 93, 125,
         1090  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1091  +    15, 93, 15, 93, 93, 93, 15, 15, 93, 93, 15, 15, 15, 15, 15, 93, 93,
         1092  +    15, 93, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
         1093  +    0, 0, 0, 0, 0, 15, 15, 92, 3, 3, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1094  +    15, 15, 125, 93, 93, 125, 125, 3, 3, 15, 92, 92, 125, 93, 0, 0, 0,
         1095  +    0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 0, 0, 15, 15, 15, 15,
         1096  +    15, 15, 0, 0, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15,
         1097  +    15, 15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 15, 15, 15, 0, 21, 21, 21,
  1097   1098       21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
  1098         -    21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 192, 21, 21, 21,
  1099         -    21, 21, 21, 21, 11, 91, 91, 91, 91, 21, 21, 21, 21, 21, 21, 0, 0, 0,
  1100         -    0, 0, 0, 0, 0, 0, 0, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
  1101         -    193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
  1102         -    193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
  1103         -    193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 15, 15, 15, 124,
  1104         -    124, 92, 124, 124, 92, 124, 124, 3, 124, 92, 0, 0, 9, 9, 9, 9, 9, 9,
  1105         -    9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0,
  1106         -    0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1107         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 15, 15, 15, 15,
  1108         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1109         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1110         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 194, 194, 194,
  1111         -    194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
  1112         -    194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
  1113         -    194, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
  1114         -    195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
  1115         -    195, 195, 195, 195, 195, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1116         -    15, 15, 15, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1117         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1118         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 21,
  1119         -    21, 21, 21, 21, 21, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 21,
  1120         -    21, 21, 21, 0, 0, 0, 0, 0, 15, 92, 15, 15, 15, 15, 15, 15, 15, 15,
  1121         -    15, 15, 7, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15,
  1122         -    15, 15, 15, 15, 0, 15, 0, 15, 15, 0, 15, 15, 0, 15, 15, 15, 15, 15,
  1123         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1124         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1125         -    15, 15, 15, 15, 15, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
  1126         -    11, 11, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1127         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1128         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1129         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 6, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1130         -    0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1131         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1132         -    15, 15, 15, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1133         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
         1099  +    21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 198, 21,
         1100  +    21, 21, 21, 21, 21, 21, 11, 92, 92, 92, 92, 21, 21, 21, 21, 21, 21,
         1101  +    21, 21, 0, 0, 0, 0, 0, 0, 0, 0, 199, 199, 199, 199, 199, 199, 199,
         1102  +    199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
         1103  +    199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
         1104  +    199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 15,
         1105  +    15, 15, 125, 125, 93, 125, 125, 93, 125, 125, 3, 125, 93, 0, 0, 9,
         1106  +    9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 0, 0,
         1107  +    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1108  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 15,
         1109  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1110  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1111  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0,
         1112  +    200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
         1113  +    200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
         1114  +    200, 200, 200, 200, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201,
         1115  +    201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201,
         1116  +    201, 201, 201, 201, 201, 201, 201, 201, 15, 15, 15, 15, 15, 15, 15,
         1117  +    15, 15, 15, 15, 15, 15, 15, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1118  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1119  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0,
         1120  +    0, 0, 0, 0, 0, 21, 21, 21, 21, 21, 21, 21, 0, 0, 0, 0, 0, 0, 0, 0,
         1121  +    0, 0, 0, 0, 21, 21, 21, 21, 21, 0, 0, 0, 0, 0, 15, 93, 15, 15, 15,
         1122  +    15, 15, 15, 15, 15, 15, 15, 7, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1123  +    15, 15, 15, 15, 0, 15, 15, 15, 15, 15, 0, 15, 0, 15, 15, 0, 15, 15,
         1124  +    0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1125  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1126  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 11, 11, 11, 11, 11, 11,
         1127  +    11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0,
         1128  +    0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1129  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1130  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 6, 5, 0,
         1131  +    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15,
         1132  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1133  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 15, 15, 15, 15, 15, 15, 15,
         1134  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0,
  1134   1135       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1135         -    0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 4,
  1136         -    14, 0, 0, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
  1137         -    92, 3, 3, 3, 3, 3, 3, 3, 5, 6, 3, 0, 0, 0, 0, 0, 0, 92, 92, 92, 92,
  1138         -    92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 3, 8, 8, 12, 12, 5,
  1139         -    6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 3, 3, 5, 6, 3, 3, 3, 3,
  1140         -    12, 12, 12, 3, 3, 3, 0, 3, 3, 3, 3, 8, 5, 6, 5, 6, 5, 6, 3, 3, 3, 7,
  1141         -    8, 7, 7, 7, 0, 3, 4, 3, 3, 0, 0, 0, 0, 15, 15, 15, 15, 15, 0, 15, 15,
  1142         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1143         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1144         -    15, 15, 15, 0, 0, 17, 0, 3, 3, 3, 4, 3, 3, 3, 5, 6, 3, 7, 3, 8, 3,
  1145         -    3, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 3, 3, 7, 7, 7, 3, 11, 13, 13, 13,
  1146         -    13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
  1147         -    13, 13, 13, 13, 13, 13, 5, 7, 6, 7, 5, 6, 3, 5, 6, 3, 3, 15, 15, 15,
  1148         -    15, 15, 15, 15, 15, 15, 15, 91, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1149         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1150         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1151         -    15, 15, 91, 91, 0, 0, 15, 15, 15, 15, 15, 15, 0, 0, 15, 15, 15, 15,
  1152         -    15, 15, 0, 0, 15, 15, 15, 15, 15, 15, 0, 0, 15, 15, 15, 0, 0, 0, 4,
  1153         -    4, 7, 11, 14, 4, 4, 0, 14, 7, 7, 7, 7, 14, 14, 0, 0, 0, 0, 0, 0, 0,
  1154         -    0, 0, 0, 17, 17, 17, 14, 14, 0, 0
  1155         -#if TCL_UTF_MAX > 3
         1136  +    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15,
         1137  +    15, 15, 15, 15, 15, 4, 14, 0, 0, 93, 93, 93, 93, 93, 93, 93, 93, 93,
         1138  +    93, 93, 93, 93, 93, 93, 93, 3, 3, 3, 3, 3, 3, 3, 5, 6, 3, 0, 0, 0,
         1139  +    0, 0, 0, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
         1140  +    93, 3, 8, 8, 12, 12, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6,
         1141  +    3, 3, 5, 6, 3, 3, 3, 3, 12, 12, 12, 3, 3, 3, 0, 3, 3, 3, 3, 8, 5, 6,
         1142  +    5, 6, 5, 6, 3, 3, 3, 7, 8, 7, 7, 7, 0, 3, 4, 3, 3, 0, 0, 0, 0, 15,
         1143  +    15, 15, 15, 15, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1144  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1145  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 17, 0, 3, 3, 3, 4, 3,
         1146  +    3, 3, 5, 6, 3, 7, 3, 8, 3, 3, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 3, 3, 7,
         1147  +    7, 7, 3, 11, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
         1148  +    13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 5, 7, 6, 7, 5, 6, 3,
         1149  +    5, 6, 3, 3, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 92, 15, 15, 15,
         1150  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1151  +    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1152  +    15, 15, 15, 15, 15, 15, 15, 15, 92, 92, 0, 0, 15, 15, 15, 15, 15, 15,
         1153  +    0, 0, 15, 15, 15, 15, 15, 15, 0, 0, 15, 15, 15, 15, 15, 15, 0, 0, 15,
         1154  +    15, 15, 0, 0, 0, 4, 4, 7, 11, 14, 4, 4, 0, 14, 7, 7, 7, 7, 14, 14,
         1155  +    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 17, 14, 14, 0, 0
         1156  +#if TCL_UTF_MAX > 3 || TCL_MAJOR_VERSION > 8 || TCL_MINOR_VERSION > 6
  1156   1157       ,15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 15, 15,
  1157   1158       15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1158   1159       15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1159   1160       15, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 0, 15, 15, 15, 15, 15, 15,
  1160   1161       15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 15, 15, 15, 15, 15, 15, 15,
  1161   1162       15, 15, 15, 15, 15, 15, 15, 0, 0, 3, 3, 3, 0, 0, 0, 0, 18, 18, 18,
  1162   1163       18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
  1163   1164       18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
  1164   1165       18, 18, 18, 18, 18, 18, 18, 18, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14,
  1165         -    14, 14, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
  1166         -    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
  1167         -    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
  1168         -    128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 18,
         1166  +    14, 14, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129,
         1167  +    129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129,
         1168  +    129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129,
         1169  +    129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 18,
  1169   1170       18, 18, 18, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
  1170   1171       14, 14, 14, 18, 18, 14, 14, 14, 0, 14, 14, 14, 14, 14, 14, 14, 14,
  1171   1172       14, 14, 14, 14, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1172   1173       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1173   1174       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14,
  1174   1175       14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
  1175   1176       14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
  1176         -    14, 14, 14, 92, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1177         -    15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92,
         1177  +    14, 14, 14, 93, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
         1178  +    15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93,
  1178   1179       18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
  1179   1180       18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 0, 0, 0, 0, 18, 18, 18, 18,
  1180   1181       0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
  1181         -    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 128, 15, 15, 15, 15, 15, 15,
  1182         -    15, 15, 128, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,