Tcl Source Code

Check-in [1203d7b979]
Login
Bounty program for improvements to Tcl and certain Tcl packages.

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

Overview
Comment:Adapt some comments, which are not correct for Tcl 8.7 any more
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-branch
Files: files | file ages | folders
SHA3-256: 1203d7b979928aabbef057c71709295f1cf0828676da3d27cb5c4d083e926c6d
User & Date: jan.nijtmans 2020-05-20 19:09:25
Context
2020-05-25
09:32
Fix compiled "string is <class>" for characters > U+FFFF. Add testcase exposing this bug. check-in: 2a3709ca18 user: jan.nijtmans tags: core-8-branch
2020-05-24
22:34
Merge 8.7 check-in: 3184183373 user: jan.nijtmans tags: jn-index-reform
2020-05-22
14:36
Merge 8.7 Add function Tcl_UniCharFold(). It's the same as Tcl_UniCharToLower() for now, but that wi... check-in: c338858460 user: jan.nijtmans tags: tip-575
2020-05-20
19:12
Merge 8.7 check-in: 4d5fc5a4f3 user: jan.nijtmans tags: trunk
19:09
Adapt some comments, which are not correct for Tcl 8.7 any more check-in: 1203d7b979 user: jan.nijtmans tags: core-8-branch
2020-05-18
20:25
Merge-mark check-in: 4427efd83c user: jan.nijtmans tags: core-8-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tcl.h.

2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
#define TCL_CONVERT_UNKNOWN	(-3)
#define TCL_CONVERT_NOSPACE	(-4)

/*
 * The maximum number of bytes that are necessary to represent a single
 * Unicode character in UTF-8. The valid values are 3 and 4
 * (or perhaps 1 if we want to support a non-unicode enabled core). If 3,
 * then Tcl_UniChar must be 2-bytes in size (UCS-2) (the default). If > 3,
 * then Tcl_UniChar must be 4-bytes in size (UCS-4). At this time UCS-2 mode
 * is the default and recommended mode.
 */

#ifndef TCL_UTF_MAX
#define TCL_UTF_MAX		3
#endif








|
|







2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
#define TCL_CONVERT_UNKNOWN	(-3)
#define TCL_CONVERT_NOSPACE	(-4)

/*
 * The maximum number of bytes that are necessary to represent a single
 * Unicode character in UTF-8. The valid values are 3 and 4
 * (or perhaps 1 if we want to support a non-unicode enabled core). If 3,
 * then Tcl_UniChar must be 2-bytes in size (UTF-16) (the default). If > 3,
 * then Tcl_UniChar must be 4-bytes in size (UCS-4). At this time UTF-16 mode
 * is the default and recommended mode.
 */

#ifndef TCL_UTF_MAX
#define TCL_UTF_MAX		3
#endif

Changes to generic/tclUtf.c.

51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
 * Unicode characters less than this value are represented by themselves in
 * UTF-8 strings.
 */

#define UNICODE_SELF	0x80

/*
 * The following structures are used when mapping between Unicode (UCS-2) and
 * UTF-8.
 */

static const unsigned char totalBytes[256] = {
    1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
    1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
    1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,







|







51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
 * Unicode characters less than this value are represented by themselves in
 * UTF-8 strings.
 */

#define UNICODE_SELF	0x80

/*
 * The following structures are used when mapping between Unicode and
 * UTF-8.
 */

static const unsigned char totalBytes[256] = {
    1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
    1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
    1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,