Compare commits
40
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f76c6ff3da | ||
|
|
19e0981d35 | ||
|
|
596fd6687e | ||
|
|
b2a59d29b6 | ||
|
|
d917353c7e | ||
|
|
35ca781f6c | ||
|
|
28ac0c5353 | ||
|
|
5fdbd4a749 | ||
|
|
b3800e2fed | ||
|
|
67b6b8b92c | ||
|
|
17cf9db2f7 | ||
|
|
e7e8174dba | ||
|
|
4b357897d5 | ||
|
|
68275b03de | ||
|
|
2645c0ef3a | ||
|
|
7de961e9fa | ||
|
|
c26df8ae12 | ||
|
|
d1c1cbf476 | ||
|
|
4166996b42 | ||
|
|
47692f4e99 | ||
|
|
649902f7fa | ||
|
|
e7e764dbdf | ||
|
|
b0aa1e2416 | ||
|
|
3cd704802f | ||
|
|
ea1cc886b5 | ||
|
|
3dba96d22a | ||
|
|
a0ea496ffb | ||
|
|
1ef8141062 | ||
|
|
893b999f51 | ||
|
|
1a7f4b5e4c | ||
|
|
2d2102400e | ||
|
|
e1dcac30d8 | ||
|
|
ad6dcfad67 | ||
|
|
cc89e55f7d | ||
|
|
3703dbd940 | ||
|
|
8da19e064b | ||
|
|
666afa7352 | ||
|
|
5e02396d5e | ||
|
|
2e108cd831 | ||
|
|
27fb8875b7 |
@@ -3,7 +3,7 @@ set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
|
||||
|
||||
project(zlib C)
|
||||
|
||||
set(VERSION "1.2.10")
|
||||
set(VERSION "1.2.11")
|
||||
|
||||
option(ASM686 "Enable building i686 assembly implementation")
|
||||
option(AMD64 "Enable building amd64 assembly implementation")
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
|
||||
ChangeLog file for zlib
|
||||
|
||||
Changes in 1.2.11 (15 Jan 2017)
|
||||
- Fix deflate stored bug when pulling last block from window
|
||||
- Permit immediate deflateParams changes before any deflate input
|
||||
|
||||
Changes in 1.2.10 (2 Jan 2017)
|
||||
- Avoid warnings on snprintf() return value
|
||||
- Fix bug in deflate_stored() for zero-length input
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Makefile for zlib
|
||||
# Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
|
||||
# Copyright (C) 1995-2017 Jean-loup Gailly, Mark Adler
|
||||
# For conditions of distribution and use, see copyright notice in zlib.h
|
||||
|
||||
# To compile and test, type:
|
||||
@@ -32,7 +32,7 @@ CPP=$(CC) -E
|
||||
|
||||
STATICLIB=libz.a
|
||||
SHAREDLIB=libz.so
|
||||
SHAREDLIBV=libz.so.1.2.10
|
||||
SHAREDLIBV=libz.so.1.2.11
|
||||
SHAREDLIBM=libz.so.1
|
||||
LIBS=$(STATICLIB) $(SHAREDLIBV)
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
ZLIB DATA COMPRESSION LIBRARY
|
||||
|
||||
zlib 1.2.10 is a general purpose data compression library. All the code is
|
||||
zlib 1.2.11 is a general purpose data compression library. All the code is
|
||||
thread safe. The data format used by the zlib library is described by RFCs
|
||||
(Request for Comments) 1950 to 1952 in the files
|
||||
http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and
|
||||
@@ -31,7 +31,7 @@ Mark Nelson <markn@ieee.org> wrote an article about zlib for the Jan. 1997
|
||||
issue of Dr. Dobb's Journal; a copy of the article is available at
|
||||
http://marknelson.us/1997/01/01/zlib-engine/ .
|
||||
|
||||
The changes made in version 1.2.10 are documented in the file ChangeLog.
|
||||
The changes made in version 1.2.11 are documented in the file ChangeLog.
|
||||
|
||||
Unsupported third party contributions are provided in directory contrib/ .
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer;
|
||||
const OutBuf: Pointer; BufSize: Integer);
|
||||
|
||||
const
|
||||
zlib_version = '1.2.10';
|
||||
zlib_version = '1.2.11';
|
||||
|
||||
type
|
||||
EZlibError = class(Exception);
|
||||
|
||||
@@ -156,7 +156,7 @@ namespace DotZLibTests
|
||||
public void Info_Version()
|
||||
{
|
||||
Info info = new Info();
|
||||
Assert.AreEqual("1.2.10", Info.Version);
|
||||
Assert.AreEqual("1.2.11", Info.Version);
|
||||
Assert.AreEqual(32, info.SizeOfUInt);
|
||||
Assert.AreEqual(32, info.SizeOfULong);
|
||||
Assert.AreEqual(32, info.SizeOfPointer);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#define MAXBITS 15
|
||||
|
||||
const char inflate9_copyright[] =
|
||||
" inflate9 1.2.10 Copyright 1995-2017 Mark Adler ";
|
||||
" inflate9 1.2.11 Copyright 1995-2017 Mark Adler ";
|
||||
/*
|
||||
If you use the zlib library in a product, an acknowledgment is welcome
|
||||
in the documentation of your product. If for some reason you cannot
|
||||
@@ -64,7 +64,7 @@ unsigned short FAR *work;
|
||||
static const unsigned short lext[31] = { /* Length codes 257..285 extra */
|
||||
128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129,
|
||||
130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132,
|
||||
133, 133, 133, 133, 144, 192, 202};
|
||||
133, 133, 133, 133, 144, 77, 202};
|
||||
static const unsigned short dbase[32] = { /* Distance codes 0..31 base */
|
||||
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49,
|
||||
65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT([minizip], [1.2.10], [bugzilla.redhat.com])
|
||||
AC_INIT([minizip], [1.2.11], [bugzilla.redhat.com])
|
||||
AC_CONFIG_SRCDIR([minizip.c])
|
||||
AM_INIT_AUTOMAKE([foreign])
|
||||
LT_INIT
|
||||
|
||||
@@ -10,7 +10,7 @@ unit zlibpas;
|
||||
interface
|
||||
|
||||
const
|
||||
ZLIB_VERSION = '1.2.10';
|
||||
ZLIB_VERSION = '1.2.11';
|
||||
ZLIB_VERNUM = $12a0;
|
||||
|
||||
type
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Building instructions for the DLL versions of Zlib 1.2.10
|
||||
Building instructions for the DLL versions of Zlib 1.2.11
|
||||
========================================================
|
||||
|
||||
This directory contains projects that build zlib and minizip using
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
#define IDR_VERSION1 1
|
||||
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
|
||||
FILEVERSION 1, 2, 10, 0
|
||||
PRODUCTVERSION 1, 2, 10, 0
|
||||
FILEVERSION 1, 2, 11, 0
|
||||
PRODUCTVERSION 1, 2, 11, 0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS_DOS_WINDOWS32
|
||||
@@ -17,7 +17,7 @@ BEGIN
|
||||
|
||||
BEGIN
|
||||
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
|
||||
VALUE "FileVersion", "1.2.10\0"
|
||||
VALUE "FileVersion", "1.2.11\0"
|
||||
VALUE "InternalName", "zlib\0"
|
||||
VALUE "OriginalFilename", "zlibwapi.dll\0"
|
||||
VALUE "ProductName", "ZLib.DLL\0"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
#define IDR_VERSION1 1
|
||||
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
|
||||
FILEVERSION 1, 2, 10, 0
|
||||
PRODUCTVERSION 1, 2, 10, 0
|
||||
FILEVERSION 1, 2, 11, 0
|
||||
PRODUCTVERSION 1, 2, 11, 0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS_DOS_WINDOWS32
|
||||
@@ -17,7 +17,7 @@ BEGIN
|
||||
|
||||
BEGIN
|
||||
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
|
||||
VALUE "FileVersion", "1.2.10\0"
|
||||
VALUE "FileVersion", "1.2.11\0"
|
||||
VALUE "InternalName", "zlib\0"
|
||||
VALUE "OriginalFilename", "zlibwapi.dll\0"
|
||||
VALUE "ProductName", "ZLib.DLL\0"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
#define IDR_VERSION1 1
|
||||
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
|
||||
FILEVERSION 1, 2, 10, 0
|
||||
PRODUCTVERSION 1, 2, 10, 0
|
||||
FILEVERSION 1, 2, 11, 0
|
||||
PRODUCTVERSION 1, 2, 11, 0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS_DOS_WINDOWS32
|
||||
@@ -17,7 +17,7 @@ BEGIN
|
||||
|
||||
BEGIN
|
||||
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
|
||||
VALUE "FileVersion", "1.2.10\0"
|
||||
VALUE "FileVersion", "1.2.11\0"
|
||||
VALUE "InternalName", "zlib\0"
|
||||
VALUE "OriginalFilename", "zlibwapi.dll\0"
|
||||
VALUE "ProductName", "ZLib.DLL\0"
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
#define IDR_VERSION1 1
|
||||
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
|
||||
FILEVERSION 1, 2, 10, 0
|
||||
PRODUCTVERSION 1, 2, 10, 0
|
||||
FILEVERSION 1, 2, 11, 0
|
||||
PRODUCTVERSION 1, 2, 11, 0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS_DOS_WINDOWS32
|
||||
@@ -17,7 +17,7 @@ BEGIN
|
||||
|
||||
BEGIN
|
||||
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
|
||||
VALUE "FileVersion", "1.2.10\0"
|
||||
VALUE "FileVersion", "1.2.11\0"
|
||||
VALUE "InternalName", "zlib\0"
|
||||
VALUE "OriginalFilename", "zlibwapi.dll\0"
|
||||
VALUE "ProductName", "ZLib.DLL\0"
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
#define IDR_VERSION1 1
|
||||
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
|
||||
FILEVERSION 1, 2, 10, 0
|
||||
PRODUCTVERSION 1, 2, 10, 0
|
||||
FILEVERSION 1, 2, 11, 0
|
||||
PRODUCTVERSION 1, 2, 11, 0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS_DOS_WINDOWS32
|
||||
@@ -17,7 +17,7 @@ BEGIN
|
||||
|
||||
BEGIN
|
||||
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
|
||||
VALUE "FileVersion", "1.2.10\0"
|
||||
VALUE "FileVersion", "1.2.11\0"
|
||||
VALUE "InternalName", "zlib\0"
|
||||
VALUE "OriginalFilename", "zlibwapi.dll\0"
|
||||
VALUE "ProductName", "ZLib.DLL\0"
|
||||
|
||||
+12
-7
@@ -52,7 +52,7 @@
|
||||
#include "deflate.h"
|
||||
|
||||
const char deflate_copyright[] =
|
||||
" deflate 1.2.10 Copyright 1995-2017 Jean-loup Gailly and Mark Adler ";
|
||||
" deflate 1.2.11 Copyright 1995-2017 Jean-loup Gailly and Mark Adler ";
|
||||
/*
|
||||
If you use the zlib library in a product, an acknowledgment is welcome
|
||||
in the documentation of your product. If for some reason you cannot
|
||||
@@ -586,7 +586,8 @@ int ZEXPORT deflateParams(strm, level, strategy)
|
||||
}
|
||||
func = configuration_table[s->level].func;
|
||||
|
||||
if ((strategy != s->strategy || func != configuration_table[level].func)) {
|
||||
if ((strategy != s->strategy || func != configuration_table[level].func) &&
|
||||
s->high_water) {
|
||||
/* Flush the last buffer: */
|
||||
int err = deflate(strm, Z_BLOCK);
|
||||
if (err == Z_STREAM_ERROR)
|
||||
@@ -1671,8 +1672,6 @@ local block_state deflate_stored(s, flush)
|
||||
len = left + s->strm->avail_in; /* limit len to the input */
|
||||
if (len > have)
|
||||
len = have; /* limit len to the output */
|
||||
if (left > len)
|
||||
left = len; /* limit window pull to len */
|
||||
|
||||
/* If the stored block would be less than min_block in length, or if
|
||||
* unable to copy all of the available input when flushing, then try
|
||||
@@ -1681,13 +1680,13 @@ local block_state deflate_stored(s, flush)
|
||||
*/
|
||||
if (len < min_block && ((len == 0 && flush != Z_FINISH) ||
|
||||
flush == Z_NO_FLUSH ||
|
||||
len - left != s->strm->avail_in))
|
||||
len != left + s->strm->avail_in))
|
||||
break;
|
||||
|
||||
/* Make a dummy stored block in pending to get the header bytes,
|
||||
* including any pending bits. This also updates the debugging counts.
|
||||
*/
|
||||
last = flush == Z_FINISH && len - left == s->strm->avail_in ? 1 : 0;
|
||||
last = flush == Z_FINISH && len == left + s->strm->avail_in ? 1 : 0;
|
||||
_tr_stored_block(s, (char *)0, 0L, last);
|
||||
|
||||
/* Replace the lengths in the dummy stored block with len. */
|
||||
@@ -1699,14 +1698,16 @@ local block_state deflate_stored(s, flush)
|
||||
/* Write the stored block header bytes. */
|
||||
flush_pending(s->strm);
|
||||
|
||||
/* Update debugging counts for the data about to be copied. */
|
||||
#ifdef ZLIB_DEBUG
|
||||
/* Update debugging counts for the data about to be copied. */
|
||||
s->compressed_len += len << 3;
|
||||
s->bits_sent += len << 3;
|
||||
#endif
|
||||
|
||||
/* Copy uncompressed bytes from the window to next_out. */
|
||||
if (left) {
|
||||
if (left > len)
|
||||
left = len;
|
||||
zmemcpy(s->strm->next_out, s->window + s->block_start, left);
|
||||
s->strm->next_out += left;
|
||||
s->strm->avail_out -= left;
|
||||
@@ -1756,6 +1757,8 @@ local block_state deflate_stored(s, flush)
|
||||
s->block_start = s->strstart;
|
||||
s->insert += MIN(used, s->w_size - s->insert);
|
||||
}
|
||||
if (s->high_water < s->strstart)
|
||||
s->high_water = s->strstart;
|
||||
|
||||
/* If the last block was written to next_out, then done. */
|
||||
if (last)
|
||||
@@ -1783,6 +1786,8 @@ local block_state deflate_stored(s, flush)
|
||||
read_buf(s->strm, s->window + s->strstart, have);
|
||||
s->strstart += have;
|
||||
}
|
||||
if (s->high_water < s->strstart)
|
||||
s->high_water = s->strstart;
|
||||
|
||||
/* There was not enough avail_out to write a complete worthy or flushed
|
||||
* stored block to next_out. Write a stored block to pending instead, if we
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/* gzlib.c -- zlib functions common to reading and writing gzip files
|
||||
* Copyright (C) 2004, 2010, 2011, 2012, 2013, 2016 Mark Adler
|
||||
* Copyright (C) 2004-2017 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* gzwrite.c -- zlib functions for writing gzip files
|
||||
* Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 Mark Adler
|
||||
* Copyright (C) 2004-2017 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* inffast.c -- fast decoding
|
||||
* Copyright (C) 1995-2008, 2010, 2013, 2016 Mark Adler
|
||||
* Copyright (C) 1995-2017 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#define MAXBITS 15
|
||||
|
||||
const char inflate_copyright[] =
|
||||
" inflate 1.2.10 Copyright 1995-2017 Mark Adler ";
|
||||
" inflate 1.2.11 Copyright 1995-2017 Mark Adler ";
|
||||
/*
|
||||
If you use the zlib library in a product, an acknowledgment is welcome
|
||||
in the documentation of your product. If for some reason you cannot
|
||||
@@ -62,7 +62,7 @@ unsigned short FAR *work;
|
||||
35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
|
||||
static const unsigned short lext[31] = { /* Length codes 257..285 extra */
|
||||
16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
|
||||
19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 192, 202};
|
||||
19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 77, 202};
|
||||
static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
|
||||
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
|
||||
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ZLIB version 1.2.10 for OS/400 installation instructions
|
||||
ZLIB version 1.2.11 for OS/400 installation instructions
|
||||
|
||||
1) Download and unpack the zlib tarball to some IFS directory.
|
||||
(i.e.: /path/to/the/zlib/ifs/source/directory)
|
||||
|
||||
@@ -260,7 +260,7 @@ fi
|
||||
echo '#pragma comment(user, "ZLIB version '"${VERSION}"'")' > os400.c
|
||||
echo '#pragma comment(user, __DATE__)' >> os400.c
|
||||
echo '#pragma comment(user, __TIME__)' >> os400.c
|
||||
echo '#pragma comment(copyright, "Copyright (C) 1995-2016 Jean-Loup Gailly, Mark Adler. OS/400 version by P. Monnerat.")' >> os400.c
|
||||
echo '#pragma comment(copyright, "Copyright (C) 1995-2017 Jean-Loup Gailly, Mark Adler. OS/400 version by P. Monnerat.")' >> os400.c
|
||||
make_module OS400 os400.c
|
||||
LINK= # No need to rebuild service program yet.
|
||||
MODULES=
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
* ZLIB.INC - Interface to the general purpose compression library
|
||||
*
|
||||
* ILE RPG400 version by Patrick Monnerat, DATASPHERE.
|
||||
* Version 1.2.10
|
||||
* Version 1.2.11
|
||||
*
|
||||
*
|
||||
* WARNING:
|
||||
@@ -22,12 +22,12 @@
|
||||
*
|
||||
* Versioning information.
|
||||
*
|
||||
D ZLIB_VERSION C '1.2.10'
|
||||
D ZLIB_VERSION C '1.2.11'
|
||||
D ZLIB_VERNUM C X'12a0'
|
||||
D ZLIB_VER_MAJOR C 1
|
||||
D ZLIB_VER_MINOR C 2
|
||||
D ZLIB_VER_REVISION...
|
||||
D C 10
|
||||
D C 11
|
||||
D ZLIB_VER_SUBREVISION...
|
||||
D C 0
|
||||
*
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
<QPG:Files>
|
||||
<QPG:Add file="../zconf.h" install="/opt/include/" user="root:sys" permission="644"/>
|
||||
<QPG:Add file="../zlib.h" install="/opt/include/" user="root:sys" permission="644"/>
|
||||
<QPG:Add file="../libz.so.1.2.10" install="/opt/lib/" user="root:bin" permission="644"/>
|
||||
<QPG:Add file="libz.so" install="/opt/lib/" component="dev" filetype="symlink" linkto="libz.so.1.2.10"/>
|
||||
<QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.10"/>
|
||||
<QPG:Add file="../libz.so.1.2.10" install="/opt/lib/" component="slib"/>
|
||||
<QPG:Add file="../libz.so.1.2.11" install="/opt/lib/" user="root:bin" permission="644"/>
|
||||
<QPG:Add file="libz.so" install="/opt/lib/" component="dev" filetype="symlink" linkto="libz.so.1.2.11"/>
|
||||
<QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.11"/>
|
||||
<QPG:Add file="../libz.so.1.2.11" install="/opt/lib/" component="slib"/>
|
||||
</QPG:Files>
|
||||
|
||||
<QPG:PackageFilter>
|
||||
@@ -63,7 +63,7 @@
|
||||
</QPM:ProductDescription>
|
||||
|
||||
<QPM:ReleaseDescription>
|
||||
<QPM:ReleaseVersion>1.2.10</QPM:ReleaseVersion>
|
||||
<QPM:ReleaseVersion>1.2.11</QPM:ReleaseVersion>
|
||||
<QPM:ReleaseUrgency>Medium</QPM:ReleaseUrgency>
|
||||
<QPM:ReleaseStability>Stable</QPM:ReleaseStability>
|
||||
<QPM:ReleaseNoteMinor></QPM:ReleaseNoteMinor>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" ?>
|
||||
<package name="zlib" version="1.2.10">
|
||||
<library name="zlib" dlversion="1.2.10" dlname="z">
|
||||
<package name="zlib" version="1.2.11">
|
||||
<library name="zlib" dlversion="1.2.11" dlname="z">
|
||||
<property name="description"> zip compression library </property>
|
||||
<property name="include-target-dir" value="$(@PACKAGE/install-includedir)" />
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/* trees.c -- output deflated data using Huffman coding
|
||||
* Copyright (C) 1995-2016 Jean-loup Gailly
|
||||
* Copyright (C) 1995-2017 Jean-loup Gailly
|
||||
* detect_data_type() function provided freely by Cosmin Truta, 2006
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
@@ -906,7 +906,7 @@ void ZLIB_INTERNAL _tr_align(s)
|
||||
|
||||
/* ===========================================================================
|
||||
* Determine the best encoding for the current block: dynamic trees, static
|
||||
* trees or store, and output the encoded block to the zip file.
|
||||
* trees or store, and write out the encoded block.
|
||||
*/
|
||||
void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
|
||||
deflate_state *s;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Makefile for zlib using Microsoft (Visual) C
|
||||
# zlib is copyright (C) 1995-2006 Jean-loup Gailly and Mark Adler
|
||||
# zlib is copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
|
||||
#
|
||||
# Usage:
|
||||
# nmake -f win32/Makefile.msc (standard build)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
ZLIB DATA COMPRESSION LIBRARY
|
||||
|
||||
zlib 1.2.10 is a general purpose data compression library. All the code is
|
||||
zlib 1.2.11 is a general purpose data compression library. All the code is
|
||||
thread safe. The data format used by the zlib library is described by RFCs
|
||||
(Request for Comments) 1950 to 1952 in the files
|
||||
http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format)
|
||||
@@ -22,7 +22,7 @@ before asking for help.
|
||||
|
||||
Manifest:
|
||||
|
||||
The package zlib-1.2.10-win32-x86.zip will contain the following files:
|
||||
The package zlib-1.2.11-win32-x86.zip will contain the following files:
|
||||
|
||||
README-WIN32.txt This document
|
||||
ChangeLog Changes since previous zlib packages
|
||||
@@ -72,7 +72,7 @@ are too numerous to cite here.
|
||||
|
||||
Copyright notice:
|
||||
|
||||
(C) 1995-2012 Jean-loup Gailly and Mark Adler
|
||||
(C) 1995-2017 Jean-loup Gailly and Mark Adler
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -6,7 +6,7 @@ What's here
|
||||
|
||||
Source
|
||||
======
|
||||
zlib version 1.2.10
|
||||
zlib version 1.2.11
|
||||
available at http://www.gzip.org/zlib/
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ Build info
|
||||
|
||||
Copyright notice
|
||||
================
|
||||
Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
|
||||
Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
Installing ZLIB1.DLL
|
||||
====================
|
||||
Copy ZLIB1.DLL to the SYSTEM or the SYSTEM32 directory.
|
||||
|
||||
If you want to install the 32-bit dll on a 64-bit
|
||||
machine, use the SysWOW64 directory instead.
|
||||
|
||||
|
||||
Using ZLIB1.DLL with Microsoft Visual C++
|
||||
@@ -20,12 +23,17 @@ Using ZLIB1.DLL with gcc/MinGW
|
||||
1. Install the supplied header files "zlib.h" and "zconf.h"
|
||||
into the INCLUDE directory.
|
||||
|
||||
2. Copy the supplied library file "zdll.lib" to "libzdll.a":
|
||||
2. (32-bit): Copy the supplied library file "zdll.lib" to "libzdll.a":
|
||||
cp lib/zdll.lib lib/libzdll.a
|
||||
|
||||
OR
|
||||
|
||||
2' Build the import library from the supplied "zlib.def":
|
||||
2'. (64-bit): Copy the supplied library file "libz.dll.a" to "libzdll.a":
|
||||
cp lib/libz.dll.a lib/libzdll.a
|
||||
|
||||
OR
|
||||
|
||||
2'' Build the import library from the supplied "zlib.def":
|
||||
dlltool -D zlib1.dll -d lib/zlib.def -l lib/libzdll.a
|
||||
|
||||
3. Install "libzdll.a" into the LIB directory.
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
|
||||
To build zlib using the Microsoft Visual C++ environment,
|
||||
use the appropriate project from the projects/ directory.
|
||||
use the appropriate project from the contrib/vstudio/ directory.
|
||||
|
||||
Regular → Executable
BIN
Binary file not shown.
Binary file not shown.
@@ -26,7 +26,7 @@ BEGIN
|
||||
VALUE "FileDescription", "zlib data compression library\0"
|
||||
VALUE "FileVersion", ZLIB_VERSION "\0"
|
||||
VALUE "InternalName", "zlib1.dll\0"
|
||||
VALUE "LegalCopyright", "(C) 1995-2013 Jean-loup Gailly & Mark Adler\0"
|
||||
VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0"
|
||||
VALUE "OriginalFilename", "zlib1.dll\0"
|
||||
VALUE "ProductName", "zlib\0"
|
||||
VALUE "ProductVersion", ZLIB_VERSION "\0"
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
+2
-2
@@ -1,4 +1,4 @@
|
||||
.TH ZLIB 3 "2 Jan 2017"
|
||||
.TH ZLIB 3 "15 Jan 2017"
|
||||
.SH NAME
|
||||
zlib \- compression/decompression library
|
||||
.SH SYNOPSIS
|
||||
@@ -105,7 +105,7 @@ before asking for help.
|
||||
Send questions and/or comments to zlib@gzip.org,
|
||||
or (for the Windows DLL version) to Gilles Vollant (info@winimage.com).
|
||||
.SH AUTHORS AND LICENSE
|
||||
Version 1.2.10
|
||||
Version 1.2.11
|
||||
.LP
|
||||
Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
|
||||
.LP
|
||||
|
||||
Binary file not shown.
+9
-8
@@ -1,5 +1,5 @@
|
||||
/* zlib.h -- interface of the 'zlib' general purpose compression library
|
||||
version 1.2.10, January 2nd, 2017
|
||||
version 1.2.11, January 15th, 2017
|
||||
|
||||
Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
|
||||
|
||||
@@ -37,11 +37,11 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ZLIB_VERSION "1.2.10"
|
||||
#define ZLIB_VERNUM 0x12a0
|
||||
#define ZLIB_VERSION "1.2.11"
|
||||
#define ZLIB_VERNUM 0x12b0
|
||||
#define ZLIB_VER_MAJOR 1
|
||||
#define ZLIB_VER_MINOR 2
|
||||
#define ZLIB_VER_REVISION 10
|
||||
#define ZLIB_VER_REVISION 11
|
||||
#define ZLIB_VER_SUBREVISION 0
|
||||
|
||||
/*
|
||||
@@ -712,10 +712,11 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
|
||||
used to switch between compression and straight copy of the input data, or
|
||||
to switch to a different kind of input data requiring a different strategy.
|
||||
If the compression approach (which is a function of the level) or the
|
||||
strategy is changed, then the input available so far is compressed with the
|
||||
old level and strategy using deflate(strm, Z_BLOCK). There are three
|
||||
approaches for the compression levels 0, 1..3, and 4..9 respectively. The
|
||||
new level and strategy will take effect at the next call of deflate().
|
||||
strategy is changed, and if any input has been consumed in a previous
|
||||
deflate() call, then the input available so far is compressed with the old
|
||||
level and strategy using deflate(strm, Z_BLOCK). There are three approaches
|
||||
for the compression levels 0, 1..3, and 4..9 respectively. The new level
|
||||
and strategy will take effect at the next call of deflate().
|
||||
|
||||
If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does
|
||||
not have enough output space to complete, then the parameter change will not
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/* zutil.c -- target dependent utility functions for the compression library
|
||||
* Copyright (C) 1995-2005, 2010, 2011, 2012, 2016 Jean-loup Gailly
|
||||
* Copyright (C) 1995-2017 Jean-loup Gailly
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
|
||||
+36
-12
@@ -61,7 +61,9 @@ The C variable is of type \fBint\fR.
|
||||
Any value written into the Tcl variable must have a proper integer
|
||||
form acceptable to \fBTcl_GetIntFromObj\fR; attempts to write
|
||||
non-integer values into \fIvarName\fR will be rejected with
|
||||
Tcl errors.
|
||||
Tcl errors. Incomplete integer representations (like the empty
|
||||
string, '+', '-' or the hex/octal/binary prefix) are accepted
|
||||
as if they are valid too.
|
||||
.TP
|
||||
\fBTCL_LINK_UINT\fR
|
||||
The C variable is of type \fBunsigned int\fR.
|
||||
@@ -69,14 +71,18 @@ Any value written into the Tcl variable must have a proper unsigned
|
||||
integer form acceptable to \fBTcl_GetWideIntFromObj\fR and in the
|
||||
platform's defined range for the \fBunsigned int\fR type; attempts to
|
||||
write non-integer values (or values outside the range) into
|
||||
\fIvarName\fR will be rejected with Tcl errors.
|
||||
\fIvarName\fR will be rejected with Tcl errors. Incomplete integer
|
||||
representations (like the empty string, '+', '-' or the hex/octal/binary
|
||||
prefix) are accepted as if they are valid too.
|
||||
.TP
|
||||
\fBTCL_LINK_CHAR\fR
|
||||
The C variable is of type \fBchar\fR.
|
||||
Any value written into the Tcl variable must have a proper integer
|
||||
form acceptable to \fBTcl_GetIntFromObj\fR and be in the range of the
|
||||
\fBchar\fR datatype; attempts to write non-integer or out-of-range
|
||||
values into \fIvarName\fR will be rejected with Tcl errors.
|
||||
values into \fIvarName\fR will be rejected with Tcl errors. Incomplete
|
||||
integer representations (like the empty string, '+', '-' or the
|
||||
hex/octal/binary prefix) are accepted as if they are valid too.
|
||||
.TP
|
||||
\fBTCL_LINK_UCHAR\fR
|
||||
The C variable is of type \fBunsigned char\fR.
|
||||
@@ -84,14 +90,18 @@ Any value written into the Tcl variable must have a proper unsigned
|
||||
integer form acceptable to \fBTcl_GetIntFromObj\fR and in the
|
||||
platform's defined range for the \fBunsigned char\fR type; attempts to
|
||||
write non-integer values (or values outside the range) into
|
||||
\fIvarName\fR will be rejected with Tcl errors.
|
||||
\fIvarName\fR will be rejected with Tcl errors. Incomplete integer
|
||||
representations (like the empty string, '+', '-' or the hex/octal/binary
|
||||
prefix) are accepted as if they are valid too.
|
||||
.TP
|
||||
\fBTCL_LINK_SHORT\fR
|
||||
The C variable is of type \fBshort\fR.
|
||||
Any value written into the Tcl variable must have a proper integer
|
||||
form acceptable to \fBTcl_GetIntFromObj\fR and be in the range of the
|
||||
\fBshort\fR datatype; attempts to write non-integer or out-of-range
|
||||
values into \fIvarName\fR will be rejected with Tcl errors.
|
||||
values into \fIvarName\fR will be rejected with Tcl errors. Incomplete
|
||||
integer representations (like the empty string, '+', '-' or the
|
||||
hex/octal/binary prefix) are accepted as if they are valid too.
|
||||
.TP
|
||||
\fBTCL_LINK_USHORT\fR
|
||||
The C variable is of type \fBunsigned short\fR.
|
||||
@@ -99,14 +109,18 @@ Any value written into the Tcl variable must have a proper unsigned
|
||||
integer form acceptable to \fBTcl_GetIntFromObj\fR and in the
|
||||
platform's defined range for the \fBunsigned short\fR type; attempts to
|
||||
write non-integer values (or values outside the range) into
|
||||
\fIvarName\fR will be rejected with Tcl errors.
|
||||
\fIvarName\fR will be rejected with Tcl errors. Incomplete integer
|
||||
representations (like the empty string, '+', '-' or the hex/octal/binary
|
||||
prefix) are accepted as if they are valid too.
|
||||
.TP
|
||||
\fBTCL_LINK_LONG\fR
|
||||
The C variable is of type \fBlong\fR.
|
||||
Any value written into the Tcl variable must have a proper integer
|
||||
form acceptable to \fBTcl_GetLongFromObj\fR; attempts to write
|
||||
non-integer or out-of-range
|
||||
values into \fIvarName\fR will be rejected with Tcl errors.
|
||||
values into \fIvarName\fR will be rejected with Tcl errors. Incomplete
|
||||
integer representations (like the empty string, '+', '-' or the
|
||||
hex/octal/binary prefix) are accepted as if they are valid too.
|
||||
.TP
|
||||
\fBTCL_LINK_ULONG\fR
|
||||
The C variable is of type \fBunsigned long\fR.
|
||||
@@ -114,14 +128,18 @@ Any value written into the Tcl variable must have a proper unsigned
|
||||
integer form acceptable to \fBTcl_GetWideIntFromObj\fR and in the
|
||||
platform's defined range for the \fBunsigned long\fR type; attempts to
|
||||
write non-integer values (or values outside the range) into
|
||||
\fIvarName\fR will be rejected with Tcl errors.
|
||||
\fIvarName\fR will be rejected with Tcl errors. Incomplete integer
|
||||
representations (like the empty string, '+', '-' or the hex/octal/binary
|
||||
prefix) are accepted as if they are valid too.
|
||||
.TP
|
||||
\fBTCL_LINK_DOUBLE\fR
|
||||
The C variable is of type \fBdouble\fR.
|
||||
Any value written into the Tcl variable must have a proper real
|
||||
form acceptable to \fBTcl_GetDoubleFromObj\fR; attempts to write
|
||||
non-real values into \fIvarName\fR will be rejected with
|
||||
Tcl errors.
|
||||
Tcl errors. Incomplete integer or real representations (like the
|
||||
empty string, '.', '+', '-' or the hex/octal/binary prefix) are
|
||||
accepted as if they are valid too.
|
||||
.TP
|
||||
\fBTCL_LINK_FLOAT\fR
|
||||
The C variable is of type \fBfloat\fR.
|
||||
@@ -129,7 +147,9 @@ Any value written into the Tcl variable must have a proper real
|
||||
form acceptable to \fBTcl_GetDoubleFromObj\fR and must be within the
|
||||
range acceptable for a \fBfloat\fR; attempts to
|
||||
write non-real values (or values outside the range) into
|
||||
\fIvarName\fR will be rejected with Tcl errors.
|
||||
\fIvarName\fR will be rejected with Tcl errors. Incomplete integer
|
||||
or real representations (like the empty string, '.', '+', '-' or
|
||||
the hex/octal/binary prefix) are accepted as if they are valid too.
|
||||
.TP
|
||||
\fBTCL_LINK_WIDE_INT\fR
|
||||
The C variable is of type \fBTcl_WideInt\fR (which is an integer type
|
||||
@@ -137,7 +157,9 @@ at least 64-bits wide on all platforms that can support it.)
|
||||
Any value written into the Tcl variable must have a proper integer
|
||||
form acceptable to \fBTcl_GetWideIntFromObj\fR; attempts to write
|
||||
non-integer values into \fIvarName\fR will be rejected with
|
||||
Tcl errors.
|
||||
Tcl errors. Incomplete integer representations (like the empty
|
||||
string, '+', '-' or the hex/octal/binary prefix) are accepted
|
||||
as if they are valid too.
|
||||
.TP
|
||||
\fBTCL_LINK_WIDE_UINT\fR
|
||||
The C variable is of type \fBTcl_WideUInt\fR (which is an unsigned
|
||||
@@ -148,7 +170,9 @@ integer form acceptable to \fBTcl_GetWideIntFromObj\fR (it will be
|
||||
cast to unsigned);
|
||||
.\" FIXME! Use bignums instead.
|
||||
attempts to write non-integer values into \fIvarName\fR will be
|
||||
rejected with Tcl errors.
|
||||
rejected with Tcl errors. Incomplete integer representations (like
|
||||
the empty string, '+', '-' or the hex/octal/binary prefix) are accepted
|
||||
as if they are valid too.
|
||||
.TP
|
||||
\fBTCL_LINK_BOOLEAN\fR
|
||||
The C variable is of type \fBint\fR.
|
||||
|
||||
+2
-1
@@ -40,7 +40,8 @@ except (a) case is ignored except as a tie-breaker and (b) if two
|
||||
strings contain embedded numbers, the numbers compare as integers,
|
||||
not characters. For example, in \fB\-dictionary\fR mode, \fBbigBoy\fR
|
||||
sorts between \fBbigbang\fR and \fBbigboy\fR, and \fBx10y\fR
|
||||
sorts between \fBx9y\fR and \fBx11y\fR.
|
||||
sorts between \fBx9y\fR and \fBx11y\fR. Overrides the \fB\-nocase\fR
|
||||
option.
|
||||
.TP
|
||||
\fB\-integer\fR
|
||||
.
|
||||
|
||||
+2
-2
@@ -203,7 +203,7 @@ static const CmdInfo builtInCmds[] = {
|
||||
{"append", Tcl_AppendObjCmd, TclCompileAppendCmd, NULL, CMD_IS_SAFE},
|
||||
{"apply", Tcl_ApplyObjCmd, NULL, TclNRApplyObjCmd, CMD_IS_SAFE},
|
||||
{"break", Tcl_BreakObjCmd, TclCompileBreakCmd, NULL, CMD_IS_SAFE},
|
||||
#ifndef EXCLUDE_OBSOLETE_COMMANDS
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
{"case", Tcl_CaseObjCmd, NULL, NULL, CMD_IS_SAFE},
|
||||
#endif
|
||||
{"catch", Tcl_CatchObjCmd, TclCompileCatchCmd, TclNRCatchObjCmd, CMD_IS_SAFE},
|
||||
@@ -6055,7 +6055,7 @@ TclNREvalObjEx(
|
||||
TclNRAddCallback(interp, TEOEx_ListCallback, listPtr, eoFramePtr,
|
||||
objPtr, NULL);
|
||||
|
||||
ListObjGetElements(listPtr, objc, objv);
|
||||
TclListObjGetElements(NULL, listPtr, &objc, &objv);
|
||||
return TclNREvalObjv(interp, objc, objv, flags, NULL);
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -149,7 +149,7 @@ Tcl_BreakObjCmd(
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
/* ARGSUSED */
|
||||
int
|
||||
Tcl_CaseObjCmd(
|
||||
@@ -267,6 +267,7 @@ Tcl_CaseObjCmd(
|
||||
|
||||
return TCL_OK;
|
||||
}
|
||||
#endif /* !TCL_NO_DEPRECATED */
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
|
||||
+27
-3
@@ -989,8 +989,11 @@ TclNRSourceObjCmd(
|
||||
{
|
||||
const char *encodingName = NULL;
|
||||
Tcl_Obj *fileName;
|
||||
int result;
|
||||
void **pkgFiles = NULL;
|
||||
void *names = NULL;
|
||||
|
||||
if (objc != 2 && objc !=4) {
|
||||
if (objc < 2 || objc > 4) {
|
||||
Tcl_WrongNumArgs(interp, 1, objv, "?-encoding name? fileName");
|
||||
return TCL_ERROR;
|
||||
}
|
||||
@@ -1008,9 +1011,30 @@ TclNRSourceObjCmd(
|
||||
return TCL_ERROR;
|
||||
}
|
||||
encodingName = TclGetString(objv[2]);
|
||||
}
|
||||
} else if (objc == 3) {
|
||||
/* Handle undocumented -nopkg option. This should only be
|
||||
* used by the internal ::tcl::Pkg::source utility function. */
|
||||
static const char *const nopkgoptions[] = {
|
||||
"-nopkg", NULL
|
||||
};
|
||||
int index;
|
||||
|
||||
return TclNREvalFile(interp, fileName, encodingName);
|
||||
if (TCL_ERROR == Tcl_GetIndexFromObj(interp, objv[1], nopkgoptions,
|
||||
"option", TCL_EXACT, &index)) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
pkgFiles = Tcl_GetAssocData(interp, "tclPkgFiles", NULL);
|
||||
/* Make sure that during the following TclNREvalFile no filenames
|
||||
* are recorded for inclusion in the "package files" command */
|
||||
names = *pkgFiles;
|
||||
*pkgFiles = NULL;
|
||||
}
|
||||
result = TclNREvalFile(interp, fileName, encodingName);
|
||||
if (pkgFiles) {
|
||||
/* restore "tclPkgFiles" assocdata to how it was. */
|
||||
*pkgFiles = names;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -3869,6 +3869,22 @@ extern const TclStubs *tclStubsPtr;
|
||||
#undef Tcl_AddObjErrorInfo
|
||||
#define Tcl_AddObjErrorInfo(interp, message, length) \
|
||||
Tcl_AppendObjToErrorInfo(interp, Tcl_NewStringObj(message, length))
|
||||
#ifdef TCL_NO_DEPRECATED
|
||||
#undef Tcl_SetResult
|
||||
#define Tcl_SetResult(interp, result, freeProc) \
|
||||
do { \
|
||||
char *__result = result; \
|
||||
Tcl_FreeProc *__freeProc = freeProc; \
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj(__result, -1)); \
|
||||
if (__result != NULL && __freeProc != NULL && __freeProc != TCL_VOLATILE) { \
|
||||
if (__freeProc == TCL_DYNAMIC) { \
|
||||
ckfree(__result); \
|
||||
} else { \
|
||||
(*__freeProc)(__result); \
|
||||
} \
|
||||
} \
|
||||
} while(0)
|
||||
#endif /* TCL_NO_DEPRECATED */
|
||||
|
||||
#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
|
||||
# if defined(__CYGWIN__) && defined(TCL_WIDE_INT_IS_LONG)
|
||||
|
||||
@@ -506,7 +506,7 @@ UpdateStringOfDict(
|
||||
|
||||
/* Handle empty list case first, simplifies what follows */
|
||||
if (numElems == 0) {
|
||||
dictPtr->bytes = tclEmptyStringRep;
|
||||
dictPtr->bytes = &tclEmptyString;
|
||||
dictPtr->length = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
+8
-22
@@ -511,8 +511,8 @@ VarHashCreateVar(
|
||||
*(ptrPtr) = (ClientData) \
|
||||
(&((objPtr)->internalRep.doubleValue)), TCL_OK) : \
|
||||
((((objPtr)->typePtr == NULL) && ((objPtr)->bytes == NULL)) || \
|
||||
(((objPtr)->bytes != NULL) && ((objPtr)->length == 0))) \
|
||||
? (*(tPtr) = TCL_NUMBER_LONG),TCL_ERROR : \
|
||||
(((objPtr)->bytes != NULL) && ((objPtr)->length == 0)) || \
|
||||
((objPtr)->typePtr == &tclDictType)) ? TCL_ERROR : \
|
||||
TclGetNumberFromObj((interp), (objPtr), (ptrPtr), (tPtr)))
|
||||
#else /* !TCL_WIDE_INT_IS_LONG */
|
||||
#define GetNumberFromObj(interp, objPtr, ptrPtr, tPtr) \
|
||||
@@ -531,8 +531,8 @@ VarHashCreateVar(
|
||||
*(ptrPtr) = (ClientData) \
|
||||
(&((objPtr)->internalRep.doubleValue)), TCL_OK) : \
|
||||
((((objPtr)->typePtr == NULL) && ((objPtr)->bytes == NULL)) || \
|
||||
(((objPtr)->bytes != NULL) && ((objPtr)->length == 0))) \
|
||||
? (*(tPtr) = TCL_NUMBER_LONG),TCL_ERROR : \
|
||||
(((objPtr)->bytes != NULL) && ((objPtr)->length == 0)) || \
|
||||
((objPtr)->typePtr == &tclDictType)) ? TCL_ERROR : \
|
||||
TclGetNumberFromObj((interp), (objPtr), (ptrPtr), (tPtr)))
|
||||
#endif /* TCL_WIDE_INT_IS_LONG */
|
||||
|
||||
@@ -5950,16 +5950,17 @@ TEBCresume(
|
||||
value2Ptr = OBJ_AT_TOS;
|
||||
valuePtr = OBJ_UNDER_TOS;
|
||||
|
||||
if (GetNumberFromObj(NULL, valuePtr, &ptr1, &type1) != TCL_OK) {
|
||||
if (GetNumberFromObj(NULL, valuePtr, &ptr1, &type1) != TCL_OK
|
||||
|| GetNumberFromObj(NULL, value2Ptr, &ptr2, &type2) != TCL_OK) {
|
||||
/*
|
||||
* At least one non-numeric argument - compare as strings.
|
||||
*/
|
||||
|
||||
goto stringCompare;
|
||||
}
|
||||
if (type1 == TCL_NUMBER_NAN) {
|
||||
if (type1 == TCL_NUMBER_NAN || type2 == TCL_NUMBER_NAN) {
|
||||
/*
|
||||
* NaN first arg: NaN != to everything, other compares are false.
|
||||
* NaN arg: NaN != to everything, other compares are false.
|
||||
*/
|
||||
|
||||
iResult = (*pc == INST_NEQ);
|
||||
@@ -5969,21 +5970,6 @@ TEBCresume(
|
||||
compare = MP_EQ;
|
||||
goto convertComparison;
|
||||
}
|
||||
if (GetNumberFromObj(NULL, value2Ptr, &ptr2, &type2) != TCL_OK) {
|
||||
/*
|
||||
* At least one non-numeric argument - compare as strings.
|
||||
*/
|
||||
|
||||
goto stringCompare;
|
||||
}
|
||||
if (type2 == TCL_NUMBER_NAN) {
|
||||
/*
|
||||
* NaN 2nd arg: NaN != to everything, other compares are false.
|
||||
*/
|
||||
|
||||
iResult = (*pc == INST_NEQ);
|
||||
goto foundResult;
|
||||
}
|
||||
if ((type1 == TCL_NUMBER_LONG) && (type2 == TCL_NUMBER_LONG)) {
|
||||
l1 = *((const long *)ptr1);
|
||||
l2 = *((const long *)ptr2);
|
||||
|
||||
@@ -7124,47 +7124,6 @@ Tcl_Tell(
|
||||
return curPos + outputBuffered;
|
||||
}
|
||||
|
||||
/*
|
||||
*---------------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_SeekOld, Tcl_TellOld --
|
||||
*
|
||||
* Backward-compatibility versions of the seek/tell interface that do not
|
||||
* support 64-bit offsets. This interface is not documented or expected
|
||||
* to be supported indefinitely.
|
||||
*
|
||||
* Results:
|
||||
* As for Tcl_Seek and Tcl_Tell respectively, except truncated to
|
||||
* whatever value will fit in an 'int'.
|
||||
*
|
||||
* Side effects:
|
||||
* As for Tcl_Seek and Tcl_Tell respectively.
|
||||
*
|
||||
*---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
int
|
||||
Tcl_SeekOld(
|
||||
Tcl_Channel chan, /* The channel on which to seek. */
|
||||
int offset, /* Offset to seek to. */
|
||||
int mode) /* Relative to which location to seek? */
|
||||
{
|
||||
Tcl_WideInt wOffset, wResult;
|
||||
|
||||
wOffset = Tcl_LongAsWide((long) offset);
|
||||
wResult = Tcl_Seek(chan, wOffset, mode);
|
||||
return (int) Tcl_WideAsLong(wResult);
|
||||
}
|
||||
|
||||
int
|
||||
Tcl_TellOld(
|
||||
Tcl_Channel chan) /* The channel to return pos for. */
|
||||
{
|
||||
Tcl_WideInt wResult = Tcl_Tell(chan);
|
||||
|
||||
return (int) Tcl_WideAsLong(wResult);
|
||||
}
|
||||
|
||||
/*
|
||||
*---------------------------------------------------------------------------
|
||||
*
|
||||
|
||||
+6
-5
@@ -2745,7 +2745,6 @@ MODULE_SCOPE long tclObjsShared[TCL_MAX_SHARED_OBJ_STATS];
|
||||
* shared by all new objects allocated by Tcl_NewObj.
|
||||
*/
|
||||
|
||||
MODULE_SCOPE char * tclEmptyStringRep;
|
||||
MODULE_SCOPE char tclEmptyString;
|
||||
|
||||
/*
|
||||
@@ -3219,9 +3218,11 @@ MODULE_SCOPE Tcl_Command TclInitBinaryCmd(Tcl_Interp *interp);
|
||||
MODULE_SCOPE int Tcl_BreakObjCmd(ClientData clientData,
|
||||
Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *const objv[]);
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
MODULE_SCOPE int Tcl_CaseObjCmd(ClientData clientData,
|
||||
Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *const objv[]);
|
||||
#endif
|
||||
MODULE_SCOPE int Tcl_CatchObjCmd(ClientData clientData,
|
||||
Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *const objv[]);
|
||||
@@ -4064,7 +4065,7 @@ typedef const char *TclDTraceStr;
|
||||
TclIncrObjsAllocated(); \
|
||||
TclAllocObjStorage(objPtr); \
|
||||
(objPtr)->refCount = 0; \
|
||||
(objPtr)->bytes = tclEmptyStringRep; \
|
||||
(objPtr)->bytes = &tclEmptyString; \
|
||||
(objPtr)->length = 0; \
|
||||
(objPtr)->typePtr = NULL; \
|
||||
TCL_DTRACE_OBJ_CREATE(objPtr)
|
||||
@@ -4081,7 +4082,7 @@ typedef const char *TclDTraceStr;
|
||||
if (!(objPtr)->typePtr || !(objPtr)->typePtr->freeIntRepProc) { \
|
||||
TCL_DTRACE_OBJ_FREE(objPtr); \
|
||||
if ((objPtr)->bytes \
|
||||
&& ((objPtr)->bytes != tclEmptyStringRep)) { \
|
||||
&& ((objPtr)->bytes != &tclEmptyString)) { \
|
||||
ckfree((objPtr)->bytes); \
|
||||
} \
|
||||
(objPtr)->length = -1; \
|
||||
@@ -4242,7 +4243,7 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file,
|
||||
|
||||
#define TclInitStringRep(objPtr, bytePtr, len) \
|
||||
if ((len) == 0) { \
|
||||
(objPtr)->bytes = tclEmptyStringRep; \
|
||||
(objPtr)->bytes = &tclEmptyString; \
|
||||
(objPtr)->length = 0; \
|
||||
} else { \
|
||||
(objPtr)->bytes = (char *) ckalloc((unsigned) ((len) + 1)); \
|
||||
@@ -4300,7 +4301,7 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file,
|
||||
|
||||
#define TclInvalidateStringRep(objPtr) \
|
||||
if ((objPtr)->bytes != NULL) { \
|
||||
if ((objPtr)->bytes != tclEmptyStringRep) { \
|
||||
if ((objPtr)->bytes != &tclEmptyString) { \
|
||||
ckfree((objPtr)->bytes); \
|
||||
} \
|
||||
(objPtr)->bytes = NULL; \
|
||||
|
||||
+42
-52
@@ -67,10 +67,8 @@ typedef struct Link {
|
||||
static char * LinkTraceProc(ClientData clientData,Tcl_Interp *interp,
|
||||
const char *name1, const char *name2, int flags);
|
||||
static Tcl_Obj * ObjValue(Link *linkPtr);
|
||||
static int GetInvalidIntFromObj(Tcl_Obj *objPtr,
|
||||
int *intPtr);
|
||||
static int GetInvalidDoubleFromObj(Tcl_Obj *objPtr,
|
||||
double *doublePtr);
|
||||
static int GetInvalidIntFromObj(Tcl_Obj *objPtr, int *intPtr);
|
||||
static int GetInvalidDoubleFromObj(Tcl_Obj *objPtr, double *doublePtr);
|
||||
|
||||
/*
|
||||
* Convenience macro for accessing the value of the C variable pointed to by a
|
||||
@@ -263,7 +261,8 @@ LinkTraceProc(
|
||||
int flags) /* Miscellaneous additional information. */
|
||||
{
|
||||
Link *linkPtr = clientData;
|
||||
int changed, valueLength;
|
||||
int changed;
|
||||
size_t valueLength;
|
||||
const char *value;
|
||||
char **pp;
|
||||
Tcl_Obj *valueObj;
|
||||
@@ -384,8 +383,7 @@ LinkTraceProc(
|
||||
case TCL_LINK_INT:
|
||||
if (Tcl_GetIntFromObj(NULL, valueObj, &linkPtr->lastValue.i)
|
||||
!= TCL_OK) {
|
||||
if (GetInvalidIntFromObj(valueObj, &linkPtr->lastValue.i)
|
||||
!= TCL_OK) {
|
||||
if (GetInvalidIntFromObj(valueObj, &linkPtr->lastValue.i) != TCL_OK) {
|
||||
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
|
||||
TCL_GLOBAL_ONLY);
|
||||
return (char *) "variable must have integer value";
|
||||
@@ -397,8 +395,7 @@ LinkTraceProc(
|
||||
case TCL_LINK_WIDE_INT:
|
||||
if (Tcl_GetWideIntFromObj(NULL, valueObj, &linkPtr->lastValue.w)
|
||||
!= TCL_OK) {
|
||||
if (GetInvalidIntFromObj(valueObj, &valueInt)
|
||||
!= TCL_OK) {
|
||||
if (GetInvalidIntFromObj(valueObj, &valueInt) != TCL_OK) {
|
||||
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
|
||||
TCL_GLOBAL_ONLY);
|
||||
return (char *) "variable must have integer value";
|
||||
@@ -441,8 +438,7 @@ LinkTraceProc(
|
||||
case TCL_LINK_CHAR:
|
||||
if (Tcl_GetIntFromObj(NULL, valueObj, &valueInt) != TCL_OK
|
||||
|| valueInt < SCHAR_MIN || valueInt > SCHAR_MAX) {
|
||||
if (GetInvalidIntFromObj(valueObj, &valueInt)
|
||||
!= TCL_OK) {
|
||||
if (GetInvalidIntFromObj(valueObj, &valueInt) != TCL_OK) {
|
||||
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
|
||||
TCL_GLOBAL_ONLY);
|
||||
return (char *) "variable must have char value";
|
||||
@@ -455,8 +451,7 @@ LinkTraceProc(
|
||||
case TCL_LINK_UCHAR:
|
||||
if (Tcl_GetIntFromObj(NULL, valueObj, &valueInt) != TCL_OK
|
||||
|| valueInt < 0 || valueInt > UCHAR_MAX) {
|
||||
if (GetInvalidIntFromObj(valueObj, &valueInt)
|
||||
!= TCL_OK) {
|
||||
if (GetInvalidIntFromObj(valueObj, &valueInt) != TCL_OK) {
|
||||
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
|
||||
TCL_GLOBAL_ONLY);
|
||||
return (char *) "variable must have unsigned char value";
|
||||
@@ -469,8 +464,7 @@ LinkTraceProc(
|
||||
case TCL_LINK_SHORT:
|
||||
if (Tcl_GetIntFromObj(NULL, valueObj, &valueInt) != TCL_OK
|
||||
|| valueInt < SHRT_MIN || valueInt > SHRT_MAX) {
|
||||
if (GetInvalidIntFromObj(valueObj, &valueInt)
|
||||
!= TCL_OK) {
|
||||
if (GetInvalidIntFromObj(valueObj, &valueInt) != TCL_OK) {
|
||||
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
|
||||
TCL_GLOBAL_ONLY);
|
||||
return (char *) "variable must have short value";
|
||||
@@ -483,8 +477,7 @@ LinkTraceProc(
|
||||
case TCL_LINK_USHORT:
|
||||
if (Tcl_GetIntFromObj(NULL, valueObj, &valueInt) != TCL_OK
|
||||
|| valueInt < 0 || valueInt > USHRT_MAX) {
|
||||
if (GetInvalidIntFromObj(valueObj, &valueInt)
|
||||
!= TCL_OK) {
|
||||
if (GetInvalidIntFromObj(valueObj, &valueInt) != TCL_OK) {
|
||||
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
|
||||
TCL_GLOBAL_ONLY);
|
||||
return (char *) "variable must have unsigned short value";
|
||||
@@ -497,8 +490,7 @@ LinkTraceProc(
|
||||
case TCL_LINK_UINT:
|
||||
if (Tcl_GetWideIntFromObj(NULL, valueObj, &valueWide) != TCL_OK
|
||||
|| valueWide < 0 || valueWide > UINT_MAX) {
|
||||
if (GetInvalidIntFromObj(valueObj, &valueInt)
|
||||
!= TCL_OK) {
|
||||
if (GetInvalidIntFromObj(valueObj, &valueInt) != TCL_OK) {
|
||||
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
|
||||
TCL_GLOBAL_ONLY);
|
||||
return (char *) "variable must have unsigned int value";
|
||||
@@ -513,8 +505,7 @@ LinkTraceProc(
|
||||
case TCL_LINK_LONG:
|
||||
if (Tcl_GetWideIntFromObj(NULL, valueObj, &valueWide) != TCL_OK
|
||||
|| valueWide < LONG_MIN || valueWide > LONG_MAX) {
|
||||
if (GetInvalidIntFromObj(valueObj, &valueInt)
|
||||
!= TCL_OK) {
|
||||
if (GetInvalidIntFromObj(valueObj, &valueInt) != TCL_OK) {
|
||||
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
|
||||
TCL_GLOBAL_ONLY);
|
||||
return (char *) "variable must have long value";
|
||||
@@ -529,8 +520,7 @@ LinkTraceProc(
|
||||
case TCL_LINK_ULONG:
|
||||
if (Tcl_GetWideIntFromObj(NULL, valueObj, &valueWide) != TCL_OK
|
||||
|| valueWide < 0 || (Tcl_WideUInt) valueWide > ULONG_MAX) {
|
||||
if (GetInvalidIntFromObj(valueObj, &valueInt)
|
||||
!= TCL_OK) {
|
||||
if (GetInvalidIntFromObj(valueObj, &valueInt) != TCL_OK) {
|
||||
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
|
||||
TCL_GLOBAL_ONLY);
|
||||
return (char *) "variable must have unsigned long value";
|
||||
@@ -547,8 +537,7 @@ LinkTraceProc(
|
||||
* FIXME: represent as a bignum.
|
||||
*/
|
||||
if (Tcl_GetWideIntFromObj(NULL, valueObj, &valueWide) != TCL_OK) {
|
||||
if (GetInvalidIntFromObj(valueObj, &valueInt)
|
||||
!= TCL_OK) {
|
||||
if (GetInvalidIntFromObj(valueObj, &valueInt) != TCL_OK) {
|
||||
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
|
||||
TCL_GLOBAL_ONLY);
|
||||
return (char *) "variable must have unsigned wide int value";
|
||||
@@ -575,12 +564,12 @@ LinkTraceProc(
|
||||
break;
|
||||
|
||||
case TCL_LINK_STRING:
|
||||
value = TclGetStringFromObj(valueObj, &valueLength);
|
||||
valueLength++;
|
||||
value = TclGetString(valueObj);
|
||||
valueLength = valueObj->length + 1;
|
||||
pp = (char **) linkPtr->addr;
|
||||
|
||||
*pp = ckrealloc(*pp, valueLength);
|
||||
memcpy(*pp, value, (unsigned) valueLength);
|
||||
memcpy(*pp, value, valueLength);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -688,17 +677,16 @@ static Tcl_ObjType invalidRealType = {
|
||||
|
||||
static int
|
||||
SetInvalidRealFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr) {
|
||||
int length;
|
||||
const char *str;
|
||||
const char *endPtr;
|
||||
|
||||
str = TclGetStringFromObj(objPtr, &length);
|
||||
if ((length == 1) && (str[0] == '.')){
|
||||
str = TclGetString(objPtr);
|
||||
if ((objPtr->length == 1) && (str[0] == '.')){
|
||||
objPtr->typePtr = &invalidRealType;
|
||||
objPtr->internalRep.doubleValue = 0.0;
|
||||
return TCL_OK;
|
||||
}
|
||||
if (TclParseNumber(NULL, objPtr, NULL, str, length, &endPtr,
|
||||
if (TclParseNumber(NULL, objPtr, NULL, str, objPtr->length, &endPtr,
|
||||
TCL_PARSE_DECIMAL_ONLY) == TCL_OK) {
|
||||
/* If number is followed by [eE][+-]?, then it is an invalid
|
||||
* double, but it could be the start of a valid double. */
|
||||
@@ -708,7 +696,7 @@ SetInvalidRealFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr) {
|
||||
if (*endPtr == 0) {
|
||||
double doubleValue = 0.0;
|
||||
Tcl_GetDoubleFromObj(NULL, objPtr, &doubleValue);
|
||||
if (objPtr->typePtr->freeIntRepProc) objPtr->typePtr->freeIntRepProc(objPtr);
|
||||
TclFreeIntRep(objPtr);
|
||||
objPtr->typePtr = &invalidRealType;
|
||||
objPtr->internalRep.doubleValue = doubleValue;
|
||||
return TCL_OK;
|
||||
@@ -722,22 +710,21 @@ SetInvalidRealFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr) {
|
||||
/*
|
||||
* This function checks for integer representations, which are valid
|
||||
* when linking with C variables, but which are invalid in other
|
||||
* contexts in Tcl. Handled are "+", "-", "0x", "0b" and "0o" (upper-
|
||||
* and lowercase). See bug [39f6304c2e].
|
||||
* contexts in Tcl. Handled are "+", "-", "", "0x", "0b" and "0o"
|
||||
* (upperand lowercase). See bug [39f6304c2e].
|
||||
*/
|
||||
int
|
||||
GetInvalidIntFromObj(Tcl_Obj *objPtr,
|
||||
int *intPtr)
|
||||
GetInvalidIntFromObj(Tcl_Obj *objPtr, int *intPtr)
|
||||
{
|
||||
int length;
|
||||
const char *str = TclGetStringFromObj(objPtr, &length);
|
||||
const char *str = TclGetString(objPtr);
|
||||
|
||||
if ((length == 1) && strchr("+-", str[0])) {
|
||||
*intPtr = (str[0] == '+');
|
||||
return TCL_OK;
|
||||
} else if ((length == 2) && (str[0] == '0') && strchr("xXbBoO", str[1])) {
|
||||
if ((objPtr->length == 0) ||
|
||||
((objPtr->length == 2) && (str[0] == '0') && strchr("xXbBoO", str[1]))) {
|
||||
*intPtr = 0;
|
||||
return TCL_OK;
|
||||
} else if ((objPtr->length == 1) && strchr("+-", str[0])) {
|
||||
*intPtr = (str[0] == '+');
|
||||
return TCL_OK;
|
||||
}
|
||||
return TCL_ERROR;
|
||||
}
|
||||
@@ -745,25 +732,28 @@ GetInvalidIntFromObj(Tcl_Obj *objPtr,
|
||||
/*
|
||||
* This function checks for double representations, which are valid
|
||||
* when linking with C variables, but which are invalid in other
|
||||
* contexts in Tcl. Handled are ".", "+", "-", "0x", "0b" and "0o"
|
||||
* contexts in Tcl. Handled are "+", "-", "", ".", "0x", "0b" and "0o"
|
||||
* (upper- and lowercase) and sequences like "1e-". See bug [39f6304c2e].
|
||||
*/
|
||||
int
|
||||
GetInvalidDoubleFromObj(Tcl_Obj *objPtr,
|
||||
double *doublePtr)
|
||||
{
|
||||
int intValue, result;
|
||||
int intValue;
|
||||
|
||||
if ((objPtr->typePtr == &invalidRealType) ||
|
||||
(SetInvalidRealFromAny(NULL, objPtr) == TCL_OK)) {
|
||||
if (objPtr->typePtr == &invalidRealType) {
|
||||
goto gotdouble;
|
||||
}
|
||||
if (GetInvalidIntFromObj(objPtr, &intValue) == TCL_OK) {
|
||||
*doublePtr = (double) intValue;
|
||||
return TCL_OK;
|
||||
}
|
||||
if (SetInvalidRealFromAny(NULL, objPtr) == TCL_OK) {
|
||||
gotdouble:
|
||||
*doublePtr = objPtr->internalRep.doubleValue;
|
||||
return TCL_OK;
|
||||
}
|
||||
result = GetInvalidIntFromObj(objPtr, &intValue);
|
||||
if (result == TCL_OK) {
|
||||
*doublePtr = (double) intValue;
|
||||
}
|
||||
return result;
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+19
-14
@@ -374,7 +374,7 @@ Tcl_SetListObj(
|
||||
listRepPtr = NewListIntRep(objc, objv, 1);
|
||||
ListSetIntRep(objPtr, listRepPtr);
|
||||
} else {
|
||||
objPtr->bytes = tclEmptyStringRep;
|
||||
objPtr->bytes = &tclEmptyString;
|
||||
objPtr->length = 0;
|
||||
}
|
||||
}
|
||||
@@ -407,6 +407,7 @@ TclListObjCopy(
|
||||
* to be returned. */
|
||||
{
|
||||
Tcl_Obj *copyPtr;
|
||||
int length;
|
||||
|
||||
if (listPtr->typePtr != &tclListType) {
|
||||
if (SetListFromAny(interp, listPtr) != TCL_OK) {
|
||||
@@ -415,8 +416,11 @@ TclListObjCopy(
|
||||
}
|
||||
|
||||
TclNewObj(copyPtr);
|
||||
TclInvalidateStringRep(copyPtr);
|
||||
DupListInternalRep(listPtr, copyPtr);
|
||||
TclListObjLength(NULL, listPtr, &length);
|
||||
if (length > 0) {
|
||||
TclInvalidateStringRep(copyPtr);
|
||||
DupListInternalRep(listPtr, copyPtr);
|
||||
}
|
||||
return copyPtr;
|
||||
}
|
||||
|
||||
@@ -465,15 +469,15 @@ Tcl_ListObjGetElements(
|
||||
if (listPtr->typePtr != &tclListType) {
|
||||
int result;
|
||||
|
||||
if (listPtr->bytes == tclEmptyStringRep) {
|
||||
*objcPtr = 0;
|
||||
*objvPtr = NULL;
|
||||
return TCL_OK;
|
||||
}
|
||||
result = SetListFromAny(interp, listPtr);
|
||||
if (result != TCL_OK) {
|
||||
return result;
|
||||
}
|
||||
if (listPtr->bytes == &tclEmptyString) {
|
||||
*objcPtr = 0;
|
||||
*objvPtr = NULL;
|
||||
return TCL_OK;
|
||||
}
|
||||
}
|
||||
listRepPtr = ListRepPtr(listPtr);
|
||||
*objcPtr = listRepPtr->elemCount;
|
||||
@@ -575,7 +579,7 @@ Tcl_ListObjAppendElement(
|
||||
if (listPtr->typePtr != &tclListType) {
|
||||
int result;
|
||||
|
||||
if (listPtr->bytes == tclEmptyStringRep) {
|
||||
if (listPtr->bytes == &tclEmptyString) {
|
||||
Tcl_SetListObj(listPtr, 1, &objPtr);
|
||||
return TCL_OK;
|
||||
}
|
||||
@@ -739,7 +743,7 @@ Tcl_ListObjIndex(
|
||||
if (listPtr->typePtr != &tclListType) {
|
||||
int result;
|
||||
|
||||
if (listPtr->bytes == tclEmptyStringRep) {
|
||||
if (listPtr->bytes == &tclEmptyString) {
|
||||
*objPtrPtr = NULL;
|
||||
return TCL_OK;
|
||||
}
|
||||
@@ -792,7 +796,7 @@ Tcl_ListObjLength(
|
||||
if (listPtr->typePtr != &tclListType) {
|
||||
int result;
|
||||
|
||||
if (listPtr->bytes == tclEmptyStringRep) {
|
||||
if (listPtr->bytes == &tclEmptyString) {
|
||||
*intPtr = 0;
|
||||
return TCL_OK;
|
||||
}
|
||||
@@ -863,7 +867,7 @@ Tcl_ListObjReplace(
|
||||
Tcl_Panic("%s called with shared object", "Tcl_ListObjReplace");
|
||||
}
|
||||
if (listPtr->typePtr != &tclListType) {
|
||||
if (listPtr->bytes == tclEmptyStringRep) {
|
||||
if (listPtr->bytes == &tclEmptyString) {
|
||||
if (!objc) {
|
||||
return TCL_OK;
|
||||
}
|
||||
@@ -1650,7 +1654,7 @@ TclListObjSetElement(
|
||||
if (listPtr->typePtr != &tclListType) {
|
||||
int result;
|
||||
|
||||
if (listPtr->bytes == tclEmptyStringRep) {
|
||||
if (listPtr->bytes == &tclEmptyString) {
|
||||
if (interp != NULL) {
|
||||
Tcl_SetObjResult(interp,
|
||||
Tcl_NewStringObj("list index out of range", -1));
|
||||
@@ -1871,6 +1875,7 @@ SetListFromAny(
|
||||
int estCount, length;
|
||||
const char *limit, *nextElem = TclGetStringFromObj(objPtr, &length);
|
||||
|
||||
if (length == 0) return TCL_OK;
|
||||
/*
|
||||
* Allocate enough space to hold a (Tcl_Obj *) for each
|
||||
* (possible) list element.
|
||||
@@ -1979,7 +1984,7 @@ UpdateStringOfList(
|
||||
*/
|
||||
|
||||
if (numElems == 0) {
|
||||
listPtr->bytes = tclEmptyStringRep;
|
||||
listPtr->bytes = &tclEmptyString;
|
||||
listPtr->length = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
+15
-15
@@ -49,7 +49,6 @@ Tcl_Mutex tclObjMutex;
|
||||
*/
|
||||
|
||||
char tclEmptyString = '\0';
|
||||
char *tclEmptyStringRep = &tclEmptyString;
|
||||
|
||||
#if defined(TCL_MEM_DEBUG) && defined(TCL_THREADS)
|
||||
/*
|
||||
@@ -1060,7 +1059,7 @@ TclDbInitNewObj(
|
||||
* debugging. */
|
||||
{
|
||||
objPtr->refCount = 0;
|
||||
objPtr->bytes = tclEmptyStringRep;
|
||||
objPtr->bytes = &tclEmptyString;
|
||||
objPtr->length = 0;
|
||||
objPtr->typePtr = NULL;
|
||||
|
||||
@@ -2004,9 +2003,10 @@ static int
|
||||
ParseBoolean(
|
||||
register Tcl_Obj *objPtr) /* The object to parse/convert. */
|
||||
{
|
||||
int i, length, newBool;
|
||||
int newBool;
|
||||
char lowerCase[6];
|
||||
const char *str = TclGetStringFromObj(objPtr, &length);
|
||||
const char *str = TclGetString(objPtr);
|
||||
size_t i, length = objPtr->length;
|
||||
|
||||
if ((length == 0) || (length > 5)) {
|
||||
/*
|
||||
@@ -2058,25 +2058,25 @@ ParseBoolean(
|
||||
/*
|
||||
* Checking the 'y' is redundant, but makes the code clearer.
|
||||
*/
|
||||
if (strncmp(lowerCase, "yes", (size_t) length) == 0) {
|
||||
if (strncmp(lowerCase, "yes", length) == 0) {
|
||||
newBool = 1;
|
||||
goto goodBoolean;
|
||||
}
|
||||
return TCL_ERROR;
|
||||
case 'n':
|
||||
if (strncmp(lowerCase, "no", (size_t) length) == 0) {
|
||||
if (strncmp(lowerCase, "no", length) == 0) {
|
||||
newBool = 0;
|
||||
goto goodBoolean;
|
||||
}
|
||||
return TCL_ERROR;
|
||||
case 't':
|
||||
if (strncmp(lowerCase, "true", (size_t) length) == 0) {
|
||||
if (strncmp(lowerCase, "true", length) == 0) {
|
||||
newBool = 1;
|
||||
goto goodBoolean;
|
||||
}
|
||||
return TCL_ERROR;
|
||||
case 'f':
|
||||
if (strncmp(lowerCase, "false", (size_t) length) == 0) {
|
||||
if (strncmp(lowerCase, "false", length) == 0) {
|
||||
newBool = 0;
|
||||
goto goodBoolean;
|
||||
}
|
||||
@@ -2085,10 +2085,10 @@ ParseBoolean(
|
||||
if (length < 2) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
if (strncmp(lowerCase, "on", (size_t) length) == 0) {
|
||||
if (strncmp(lowerCase, "on", length) == 0) {
|
||||
newBool = 1;
|
||||
goto goodBoolean;
|
||||
} else if (strncmp(lowerCase, "off", (size_t) length) == 0) {
|
||||
} else if (strncmp(lowerCase, "off", length) == 0) {
|
||||
newBool = 0;
|
||||
goto goodBoolean;
|
||||
}
|
||||
@@ -2784,7 +2784,7 @@ Tcl_GetLongFromObj(
|
||||
if (interp != NULL) {
|
||||
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
|
||||
"expected integer but got \"%s\"",
|
||||
Tcl_GetString(objPtr)));
|
||||
TclGetString(objPtr)));
|
||||
Tcl_SetErrorCode(interp, "TCL", "VALUE", "INTEGER", NULL);
|
||||
}
|
||||
return TCL_ERROR;
|
||||
@@ -3085,7 +3085,7 @@ Tcl_GetWideIntFromObj(
|
||||
if (interp != NULL) {
|
||||
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
|
||||
"expected integer but got \"%s\"",
|
||||
Tcl_GetString(objPtr)));
|
||||
TclGetString(objPtr)));
|
||||
Tcl_SetErrorCode(interp, "TCL", "VALUE", "INTEGER", NULL);
|
||||
}
|
||||
return TCL_ERROR;
|
||||
@@ -3394,7 +3394,7 @@ GetBignumFromObj(
|
||||
objPtr->internalRep.twoPtrValue.ptr2 = NULL;
|
||||
objPtr->typePtr = NULL;
|
||||
if (objPtr->bytes == NULL) {
|
||||
TclInitStringRep(objPtr, tclEmptyStringRep, 0);
|
||||
TclInitStringRep(objPtr, &tclEmptyString, 0);
|
||||
}
|
||||
}
|
||||
return TCL_OK;
|
||||
@@ -3414,7 +3414,7 @@ GetBignumFromObj(
|
||||
if (interp != NULL) {
|
||||
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
|
||||
"expected integer but got \"%s\"",
|
||||
Tcl_GetString(objPtr)));
|
||||
TclGetString(objPtr)));
|
||||
Tcl_SetErrorCode(interp, "TCL", "VALUE", "INTEGER", NULL);
|
||||
}
|
||||
return TCL_ERROR;
|
||||
@@ -3964,7 +3964,7 @@ TclCompareObjKeys(
|
||||
Tcl_Obj *objPtr1 = keyPtr;
|
||||
Tcl_Obj *objPtr2 = (Tcl_Obj *) hPtr->key.oneWordValue;
|
||||
register const char *p1, *p2;
|
||||
register int l1, l2;
|
||||
register size_t l1, l2;
|
||||
|
||||
/*
|
||||
* If the object pointers are the same then they match.
|
||||
|
||||
@@ -2608,7 +2608,7 @@ UpdateStringOfFsPath(
|
||||
|
||||
pathPtr->bytes = TclGetStringFromObj(copy, &cwdLen);
|
||||
pathPtr->length = cwdLen;
|
||||
copy->bytes = tclEmptyStringRep;
|
||||
copy->bytes = &tclEmptyString;
|
||||
copy->length = 0;
|
||||
TclDecrRefCount(copy);
|
||||
}
|
||||
|
||||
@@ -17,6 +17,10 @@
|
||||
|
||||
#include "tclInt.h"
|
||||
|
||||
MODULE_SCOPE char *tclEmptyStringRep;
|
||||
|
||||
char *tclEmptyStringRep = &tclEmptyString;
|
||||
|
||||
/*
|
||||
* Each invocation of the "package ifneeded" command creates a structure of
|
||||
* the following type, which is used to load the package into the interpreter
|
||||
|
||||
+5
-5
@@ -500,7 +500,8 @@ TclCreateProc(
|
||||
}
|
||||
|
||||
for (i = 0; i < numArgs; i++) {
|
||||
int fieldCount, nameLength, valueLength;
|
||||
int fieldCount, nameLength;
|
||||
size_t valueLength;
|
||||
const char **fieldValues;
|
||||
|
||||
/*
|
||||
@@ -602,12 +603,11 @@ TclCreateProc(
|
||||
*/
|
||||
|
||||
if (localPtr->defValuePtr != NULL) {
|
||||
int tmpLength;
|
||||
const char *tmpPtr = TclGetStringFromObj(localPtr->defValuePtr,
|
||||
&tmpLength);
|
||||
const char *tmpPtr = TclGetString(localPtr->defValuePtr);
|
||||
size_t tmpLength = localPtr->defValuePtr->length;
|
||||
|
||||
if ((valueLength != tmpLength) ||
|
||||
strncmp(fieldValues[1], tmpPtr, (size_t) tmpLength)) {
|
||||
strncmp(fieldValues[1], tmpPtr, tmpLength)) {
|
||||
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
|
||||
"procedure \"%s\": formal parameter \"%s\" has "
|
||||
"default value inconsistent with precompiled body",
|
||||
|
||||
+44
-15
@@ -27,7 +27,9 @@ enum returnKeys {
|
||||
static Tcl_Obj ** GetKeys(void);
|
||||
static void ReleaseKeys(ClientData clientData);
|
||||
static void ResetObjResult(Interp *iPtr);
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
static void SetupAppendBuffer(Interp *iPtr, int newSpace);
|
||||
#endif /* !TCL_NO_DEPRECATED */
|
||||
|
||||
/*
|
||||
* This structure is used to take a snapshot of the interpreter state in
|
||||
@@ -35,7 +37,7 @@ static void SetupAppendBuffer(Interp *iPtr, int newSpace);
|
||||
* then back up to the result or the error that was previously in progress.
|
||||
*/
|
||||
|
||||
typedef struct InterpState {
|
||||
typedef struct {
|
||||
int status; /* return code status */
|
||||
int flags; /* Each remaining field saves the */
|
||||
int returnLevel; /* corresponding field of the Interp */
|
||||
@@ -407,6 +409,7 @@ Tcl_DiscardResult(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
void
|
||||
Tcl_SetResult(
|
||||
Tcl_Interp *interp, /* Interpreter with which to associate the
|
||||
@@ -461,6 +464,7 @@ Tcl_SetResult(
|
||||
|
||||
ResetObjResult(iPtr);
|
||||
}
|
||||
#endif /* !TCL_NO_DEPRECATED */
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
@@ -483,18 +487,21 @@ const char *
|
||||
Tcl_GetStringResult(
|
||||
register Tcl_Interp *interp)/* Interpreter whose result to return. */
|
||||
{
|
||||
Interp *iPtr = (Interp *) interp;
|
||||
#ifdef TCL_NO_DEPRECATED
|
||||
return Tcl_GetString(iPtr->objResultPtr);
|
||||
#else
|
||||
/*
|
||||
* If the string result is empty, move the object result to the string
|
||||
* result, then reset the object result.
|
||||
*/
|
||||
|
||||
Interp *iPtr = (Interp *) interp;
|
||||
|
||||
if (*(iPtr->result) == 0) {
|
||||
Tcl_SetResult(interp, TclGetString(Tcl_GetObjResult(interp)),
|
||||
TCL_VOLATILE);
|
||||
}
|
||||
return iPtr->result;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -536,6 +543,7 @@ Tcl_SetObjResult(
|
||||
|
||||
TclDecrRefCount(oldObjResult);
|
||||
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
/*
|
||||
* Reset the string result since we just set the result object.
|
||||
*/
|
||||
@@ -550,6 +558,7 @@ Tcl_SetObjResult(
|
||||
}
|
||||
iPtr->result = iPtr->resultSpace;
|
||||
iPtr->resultSpace[0] = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -578,6 +587,7 @@ Tcl_GetObjResult(
|
||||
Tcl_Interp *interp) /* Interpreter whose result to return. */
|
||||
{
|
||||
register Interp *iPtr = (Interp *) interp;
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
Tcl_Obj *objResultPtr;
|
||||
int length;
|
||||
|
||||
@@ -604,6 +614,7 @@ Tcl_GetObjResult(
|
||||
iPtr->result = iPtr->resultSpace;
|
||||
iPtr->result[0] = 0;
|
||||
}
|
||||
#endif /* !TCL_NO_DEPRECATED */
|
||||
return iPtr->objResultPtr;
|
||||
}
|
||||
|
||||
@@ -722,6 +733,21 @@ Tcl_AppendElement(
|
||||
* to result. */
|
||||
{
|
||||
Interp *iPtr = (Interp *) interp;
|
||||
#ifdef TCL_NO_DEPRECATED
|
||||
Tcl_Obj *elementPtr = Tcl_NewStringObj(element, -1);
|
||||
Tcl_Obj *listPtr = Tcl_NewListObj(1, &elementPtr);
|
||||
const char *bytes;
|
||||
|
||||
if (Tcl_IsShared(iPtr->objResultPtr)) {
|
||||
Tcl_SetObjResult(interp, Tcl_DuplicateObj(iPtr->objResultPtr));
|
||||
}
|
||||
bytes = TclGetString(iPtr->objResultPtr);
|
||||
if (TclNeedSpace(bytes, bytes+iPtr->objResultPtr->length)) {
|
||||
Tcl_AppendToObj(iPtr->objResultPtr, " ", 1);
|
||||
}
|
||||
Tcl_AppendObjToObj(iPtr->objResultPtr, listPtr);
|
||||
Tcl_DecrRefCount(listPtr);
|
||||
#else
|
||||
char *dst;
|
||||
int size;
|
||||
int flags;
|
||||
@@ -765,6 +791,7 @@ Tcl_AppendElement(
|
||||
flags |= TCL_DONT_QUOTE_HASH;
|
||||
}
|
||||
iPtr->appendUsed += Tcl_ConvertElement(element, dst, flags);
|
||||
#endif /* !TCL_NO_DEPRECATED */
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -786,6 +813,7 @@ Tcl_AppendElement(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
static void
|
||||
SetupAppendBuffer(
|
||||
Interp *iPtr, /* Interpreter whose result is being set up. */
|
||||
@@ -846,6 +874,7 @@ SetupAppendBuffer(
|
||||
Tcl_FreeResult((Tcl_Interp *) iPtr);
|
||||
iPtr->result = iPtr->appendResult;
|
||||
}
|
||||
#endif /* !TCL_NO_DEPRECATED */
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
@@ -875,6 +904,7 @@ Tcl_FreeResult(
|
||||
{
|
||||
register Interp *iPtr = (Interp *) interp;
|
||||
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
if (iPtr->freeProc != NULL) {
|
||||
if (iPtr->freeProc == TCL_DYNAMIC) {
|
||||
ckfree(iPtr->result);
|
||||
@@ -884,6 +914,7 @@ Tcl_FreeResult(
|
||||
iPtr->freeProc = 0;
|
||||
}
|
||||
|
||||
#endif /* !TCL_NO_DEPRECATED */
|
||||
ResetObjResult(iPtr);
|
||||
}
|
||||
|
||||
@@ -913,6 +944,7 @@ Tcl_ResetResult(
|
||||
register Interp *iPtr = (Interp *) interp;
|
||||
|
||||
ResetObjResult(iPtr);
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
if (iPtr->freeProc != NULL) {
|
||||
if (iPtr->freeProc == TCL_DYNAMIC) {
|
||||
ckfree(iPtr->result);
|
||||
@@ -923,6 +955,7 @@ Tcl_ResetResult(
|
||||
}
|
||||
iPtr->result = iPtr->resultSpace;
|
||||
iPtr->resultSpace[0] = 0;
|
||||
#endif /* !TCL_NO_DEPRECATED */
|
||||
if (iPtr->errorCode) {
|
||||
/* Legacy support */
|
||||
if (iPtr->flags & ERR_LEGACY_COPY) {
|
||||
@@ -982,11 +1015,11 @@ ResetObjResult(
|
||||
Tcl_IncrRefCount(objResultPtr);
|
||||
iPtr->objResultPtr = objResultPtr;
|
||||
} else {
|
||||
if (objResultPtr->bytes != tclEmptyStringRep) {
|
||||
if (objResultPtr->bytes != &tclEmptyString) {
|
||||
if (objResultPtr->bytes) {
|
||||
ckfree(objResultPtr->bytes);
|
||||
}
|
||||
objResultPtr->bytes = tclEmptyStringRep;
|
||||
objResultPtr->bytes = &tclEmptyString;
|
||||
objResultPtr->length = 0;
|
||||
}
|
||||
TclFreeIntRep(objResultPtr);
|
||||
@@ -1276,10 +1309,8 @@ TclProcessReturn(
|
||||
Tcl_DictObjGet(NULL, iPtr->returnOpts, keys[KEY_ERRORINFO],
|
||||
&valuePtr);
|
||||
if (valuePtr != NULL) {
|
||||
int infoLen;
|
||||
|
||||
(void) TclGetStringFromObj(valuePtr, &infoLen);
|
||||
if (infoLen) {
|
||||
(void) TclGetString(valuePtr);
|
||||
if (valuePtr->length) {
|
||||
iPtr->errorInfo = valuePtr;
|
||||
Tcl_IncrRefCount(iPtr->errorInfo);
|
||||
iPtr->flags |= ERR_ALREADY_LOGGED;
|
||||
@@ -1382,13 +1413,11 @@ TclMergeReturnOptions(
|
||||
Tcl_Obj **keys = GetKeys();
|
||||
|
||||
for (; objc > 1; objv += 2, objc -= 2) {
|
||||
int optLen;
|
||||
const char *opt = TclGetStringFromObj(objv[0], &optLen);
|
||||
int compareLen;
|
||||
const char *compare =
|
||||
TclGetStringFromObj(keys[KEY_OPTIONS], &compareLen);
|
||||
const char *opt = TclGetString(objv[0]);
|
||||
const char *compare = TclGetString(keys[KEY_OPTIONS]);
|
||||
|
||||
if ((optLen == compareLen) && (memcmp(opt, compare, optLen) == 0)) {
|
||||
if ((objv[0]->length == keys[KEY_OPTIONS]->length)
|
||||
&& (memcmp(opt, compare, objv[0]->length) == 0)) {
|
||||
Tcl_DictSearch search;
|
||||
int done = 0;
|
||||
Tcl_Obj *keyPtr;
|
||||
|
||||
@@ -546,6 +546,18 @@ TclParseNumber(
|
||||
*/
|
||||
|
||||
if (bytes == NULL) {
|
||||
if (objPtr->typePtr == &tclDictType) {
|
||||
/* A dict can never be a (single) number */
|
||||
return TCL_ERROR;
|
||||
}
|
||||
if (objPtr->typePtr == &tclListType) {
|
||||
int length;
|
||||
/* A list can only be a (single) number if its length == 1 */
|
||||
TclListObjLength(NULL, objPtr, &length);
|
||||
if (length != 1) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
}
|
||||
bytes = TclGetString(objPtr);
|
||||
}
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ GrowStringBuffer(
|
||||
char *ptr = NULL;
|
||||
int attempt;
|
||||
|
||||
if (objPtr->bytes == tclEmptyStringRep) {
|
||||
if (objPtr->bytes == &tclEmptyString) {
|
||||
objPtr->bytes = NULL;
|
||||
}
|
||||
if (flag == 0 || stringPtr->allocated > 0) {
|
||||
@@ -767,7 +767,7 @@ Tcl_SetObjLength(
|
||||
/*
|
||||
* Need to enlarge the buffer.
|
||||
*/
|
||||
if (objPtr->bytes == tclEmptyStringRep) {
|
||||
if (objPtr->bytes == &tclEmptyString) {
|
||||
objPtr->bytes = ckalloc(length + 1);
|
||||
} else {
|
||||
objPtr->bytes = ckrealloc(objPtr->bytes, length + 1);
|
||||
@@ -873,7 +873,7 @@ Tcl_AttemptSetObjLength(
|
||||
|
||||
char *newBytes;
|
||||
|
||||
if (objPtr->bytes == tclEmptyStringRep) {
|
||||
if (objPtr->bytes == &tclEmptyString) {
|
||||
newBytes = attemptckalloc(length + 1);
|
||||
} else {
|
||||
newBytes = attemptckrealloc(objPtr->bytes, length + 1);
|
||||
@@ -1202,7 +1202,7 @@ Tcl_AppendObjToObj(
|
||||
* that appending nothing to anything leaves that starting anything...
|
||||
*/
|
||||
|
||||
if (appendObjPtr->bytes == tclEmptyStringRep) {
|
||||
if (appendObjPtr->bytes == &tclEmptyString) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1213,7 +1213,7 @@ Tcl_AppendObjToObj(
|
||||
* information; this is a special-case optimization only.
|
||||
*/
|
||||
|
||||
if ((TclIsPureByteArray(objPtr) || objPtr->bytes == tclEmptyStringRep)
|
||||
if ((TclIsPureByteArray(objPtr) || objPtr->bytes == &tclEmptyString)
|
||||
&& TclIsPureByteArray(appendObjPtr)) {
|
||||
|
||||
/*
|
||||
@@ -3603,7 +3603,7 @@ UpdateStringOfString(
|
||||
stringPtr->allocated = 0;
|
||||
|
||||
if (stringPtr->numChars == 0) {
|
||||
TclInitStringRep(objPtr, tclEmptyStringRep, 0);
|
||||
TclInitStringRep(objPtr, &tclEmptyString, 0);
|
||||
} else {
|
||||
(void) ExtendStringRepWithUnicode(objPtr, stringPtr->unicode,
|
||||
stringPtr->numChars);
|
||||
|
||||
+39
-2
@@ -290,10 +290,47 @@ static int formatInt(char *buffer, int n){
|
||||
#endif
|
||||
|
||||
#else /* UNIX and MAC */
|
||||
# define TclpLocaltime_unix TclpLocaltime
|
||||
# define TclpGmtime_unix TclpGmtime
|
||||
# ifdef TCL_NO_DEPRECATED
|
||||
# define TclpLocaltime_unix 0
|
||||
# define TclpGmtime_unix 0
|
||||
# else
|
||||
# define TclpLocaltime_unix TclpLocaltime
|
||||
# define TclpGmtime_unix TclpGmtime
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef TCL_NO_DEPRECATED
|
||||
# define Tcl_SeekOld 0
|
||||
# define Tcl_TellOld 0
|
||||
# undef Tcl_SetResult
|
||||
# define Tcl_SetResult 0
|
||||
#else /* TCL_NO_DEPRECATED */
|
||||
# define Tcl_SeekOld seekOld
|
||||
# define Tcl_TellOld tellOld
|
||||
|
||||
static int
|
||||
seekOld(
|
||||
Tcl_Channel chan, /* The channel on which to seek. */
|
||||
int offset, /* Offset to seek to. */
|
||||
int mode) /* Relative to which location to seek? */
|
||||
{
|
||||
Tcl_WideInt wOffset, wResult;
|
||||
|
||||
wOffset = Tcl_LongAsWide((long) offset);
|
||||
wResult = Tcl_Seek(chan, wOffset, mode);
|
||||
return (int) Tcl_WideAsLong(wResult);
|
||||
}
|
||||
|
||||
static int
|
||||
tellOld(
|
||||
Tcl_Channel chan) /* The channel to return pos for. */
|
||||
{
|
||||
Tcl_WideInt wResult = Tcl_Tell(chan);
|
||||
|
||||
return (int) Tcl_WideAsLong(wResult);
|
||||
}
|
||||
#endif /* !TCL_NO_DEPRECATED */
|
||||
|
||||
/*
|
||||
* WARNING: The contents of this file is automatically generated by the
|
||||
* tools/genStubs.tcl script. Any modifications to the function declarations
|
||||
|
||||
+8
-12
@@ -290,12 +290,14 @@ static int TestlinkCmd(ClientData dummy,
|
||||
static int TestlocaleCmd(ClientData dummy,
|
||||
Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *const objv[]);
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
static int TestMathFunc(ClientData clientData,
|
||||
Tcl_Interp *interp, Tcl_Value *args,
|
||||
Tcl_Value *resultPtr);
|
||||
static int TestMathFunc2(ClientData clientData,
|
||||
Tcl_Interp *interp, Tcl_Value *args,
|
||||
Tcl_Value *resultPtr);
|
||||
#endif /* TCL_NO_DEPRECATED */
|
||||
static int TestmainthreadCmd(ClientData dummy,
|
||||
Tcl_Interp *interp, int argc, const char **argv);
|
||||
static int TestsetmainloopCmd(ClientData dummy,
|
||||
@@ -329,12 +331,10 @@ static int TestreturnObjCmd(ClientData dummy,
|
||||
Tcl_Obj *const objv[]);
|
||||
static void TestregexpXflags(const char *string,
|
||||
int length, int *cflagsPtr, int *eflagsPtr);
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
static int TestsaveresultCmd(ClientData dummy,
|
||||
Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *const objv[]);
|
||||
static void TestsaveresultFree(char *blockPtr);
|
||||
#endif /* TCL_NO_DEPRECATED */
|
||||
static int TestsetassocdataCmd(ClientData dummy,
|
||||
Tcl_Interp *interp, int argc, const char **argv);
|
||||
static int TestsetCmd(ClientData dummy,
|
||||
@@ -555,7 +555,7 @@ Tcltest_Init(
|
||||
}
|
||||
/* TIP #268: Full patchlevel instead of just major.minor */
|
||||
|
||||
if (Tcl_PkgProvide(interp, "Tcltest", TCL_PATCH_LEVEL) == TCL_ERROR) {
|
||||
if (Tcl_PkgProvideEx(interp, "Tcltest", TCL_PATCH_LEVEL, NULL) == TCL_ERROR) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
@@ -658,10 +658,8 @@ Tcltest_Init(
|
||||
NULL, NULL);
|
||||
Tcl_CreateObjCommand(interp, "testreturn", TestreturnObjCmd,
|
||||
NULL, NULL);
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
Tcl_CreateObjCommand(interp, "testsaveresult", TestsaveresultCmd,
|
||||
NULL, NULL);
|
||||
#endif /* TCL_NO_DEPRECATED */
|
||||
Tcl_CreateCommand(interp, "testsetassocdata", TestsetassocdataCmd,
|
||||
NULL, NULL);
|
||||
Tcl_CreateCommand(interp, "testsetnoerr", TestsetCmd,
|
||||
@@ -3341,6 +3339,7 @@ TestlocaleCmd(
|
||||
*/
|
||||
|
||||
/* ARGSUSED */
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
static int
|
||||
TestMathFunc(
|
||||
ClientData clientData, /* Integer value to return. */
|
||||
@@ -3460,6 +3459,7 @@ TestMathFunc2(
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif /* TCL_NO_DEPRECATED */
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
@@ -5144,7 +5144,6 @@ Testset2Cmd(
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
@@ -5197,6 +5196,7 @@ TestsaveresultCmd(
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
freeCount = 0;
|
||||
objPtr = NULL; /* Lint. */
|
||||
switch ((enum options) index) {
|
||||
case RESULT_SMALL:
|
||||
@@ -5221,7 +5221,6 @@ TestsaveresultCmd(
|
||||
break;
|
||||
}
|
||||
|
||||
freeCount = 0;
|
||||
Tcl_SaveResult(interp, &state);
|
||||
|
||||
if (((enum options) index) == RESULT_OBJECT) {
|
||||
@@ -5239,11 +5238,9 @@ TestsaveresultCmd(
|
||||
|
||||
switch ((enum options) index) {
|
||||
case RESULT_DYNAMIC: {
|
||||
int present = iPtr->freeProc == TestsaveresultFree;
|
||||
int called = freeCount;
|
||||
int presentOrFreed = (iPtr->freeProc == TestsaveresultFree) ^ freeCount;
|
||||
|
||||
Tcl_AppendElement(interp, called ? "called" : "notCalled");
|
||||
Tcl_AppendElement(interp, present ? "present" : "missing");
|
||||
Tcl_AppendElement(interp, presentOrFreed ? "presentOrFreed" : "missingOrLeak");
|
||||
break;
|
||||
}
|
||||
case RESULT_OBJECT:
|
||||
@@ -5278,7 +5275,6 @@ TestsaveresultFree(
|
||||
{
|
||||
freeCount++;
|
||||
}
|
||||
#endif /* TCL_NO_DEPRECATED */
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
|
||||
+16
-7
@@ -1384,7 +1384,7 @@ TclConvertElement(
|
||||
*/
|
||||
|
||||
if ((src == NULL) || (length == 0) || (*src == '\0' && length == -1)) {
|
||||
src = tclEmptyStringRep;
|
||||
src = &tclEmptyString;
|
||||
length = 0;
|
||||
conversion = CONVERT_BRACE;
|
||||
}
|
||||
@@ -2894,7 +2894,6 @@ Tcl_DStringResult(
|
||||
Tcl_DString *dsPtr) /* Dynamic string that is to become the
|
||||
* result of interp. */
|
||||
{
|
||||
Tcl_ResetResult(interp);
|
||||
Tcl_SetObjResult(interp, TclDStringToObj(dsPtr));
|
||||
}
|
||||
|
||||
@@ -2924,6 +2923,14 @@ Tcl_DStringGetResult(
|
||||
Tcl_DString *dsPtr) /* Dynamic string that is to become the result
|
||||
* of interp. */
|
||||
{
|
||||
#ifdef TCL_NO_DEPRECATED
|
||||
Tcl_Obj *obj = Tcl_GetObjResult(interp);
|
||||
const char *bytes = TclGetString(obj);
|
||||
|
||||
Tcl_DStringFree(dsPtr);
|
||||
Tcl_DStringAppend(dsPtr, bytes, obj->length);
|
||||
Tcl_ResetResult(interp);
|
||||
#else
|
||||
Interp *iPtr = (Interp *) interp;
|
||||
|
||||
if (dsPtr->string != dsPtr->staticSpace) {
|
||||
@@ -2932,7 +2939,7 @@ Tcl_DStringGetResult(
|
||||
|
||||
/*
|
||||
* Do more efficient transfer when we know the result is a Tcl_Obj. When
|
||||
* there's no st`ring result, we only have to deal with two cases:
|
||||
* there's no string result, we only have to deal with two cases:
|
||||
*
|
||||
* 1. When the string rep is the empty string, when we don't copy but
|
||||
* instead use the staticSpace in the DString to hold an empty string.
|
||||
@@ -2947,7 +2954,7 @@ Tcl_DStringGetResult(
|
||||
|
||||
if (!iPtr->result[0] && iPtr->objResultPtr
|
||||
&& !Tcl_IsShared(iPtr->objResultPtr)) {
|
||||
if (iPtr->objResultPtr->bytes == tclEmptyStringRep) {
|
||||
if (iPtr->objResultPtr->bytes == &tclEmptyString) {
|
||||
dsPtr->string = dsPtr->staticSpace;
|
||||
dsPtr->string[0] = 0;
|
||||
dsPtr->length = 0;
|
||||
@@ -2957,7 +2964,7 @@ Tcl_DStringGetResult(
|
||||
dsPtr->length = iPtr->objResultPtr->length;
|
||||
dsPtr->spaceAvl = dsPtr->length + 1;
|
||||
TclFreeIntRep(iPtr->objResultPtr);
|
||||
iPtr->objResultPtr->bytes = tclEmptyStringRep;
|
||||
iPtr->objResultPtr->bytes = &tclEmptyString;
|
||||
iPtr->objResultPtr->length = 0;
|
||||
}
|
||||
return;
|
||||
@@ -2995,6 +3002,7 @@ Tcl_DStringGetResult(
|
||||
|
||||
iPtr->result = iPtr->resultSpace;
|
||||
iPtr->resultSpace[0] = 0;
|
||||
#endif /* !TCL_NO_DEPRECATED */
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3576,7 +3584,7 @@ TclGetIntForIndex(
|
||||
int *indexPtr) /* Location filled in with an integer
|
||||
* representing an index. */
|
||||
{
|
||||
int length;
|
||||
size_t length;
|
||||
char *opPtr;
|
||||
const char *bytes;
|
||||
|
||||
@@ -3594,7 +3602,8 @@ TclGetIntForIndex(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
bytes = TclGetStringFromObj(objPtr, &length);
|
||||
bytes = TclGetString(objPtr);
|
||||
length = objPtr->length;
|
||||
|
||||
/*
|
||||
* Leading whitespace is acceptable in an index.
|
||||
|
||||
+23
-3
@@ -45,6 +45,7 @@ if {![info exists auto_path]} {
|
||||
set auto_path ""
|
||||
}
|
||||
}
|
||||
|
||||
namespace eval tcl {
|
||||
variable Dir
|
||||
foreach Dir [list $::tcl_library [file dirname $::tcl_library]] {
|
||||
@@ -112,6 +113,8 @@ namespace eval tcl {
|
||||
}
|
||||
}
|
||||
|
||||
namespace eval tcl::Pkg {}
|
||||
|
||||
# Windows specific end of initialization
|
||||
|
||||
if {(![interp issafe]) && ($tcl_platform(platform) eq "windows")} {
|
||||
@@ -457,6 +460,22 @@ proc auto_load {cmd {namespace {}}} {
|
||||
return 0
|
||||
}
|
||||
|
||||
# ::tcl::Pkg::source --
|
||||
# This procedure provides an alternative "source" command, which doesn't
|
||||
# register the file for the "package files" command. Safe interpreters
|
||||
# don't have to do anything special.
|
||||
#
|
||||
# Arguments:
|
||||
# filename
|
||||
|
||||
proc ::tcl::Pkg::source {filename} {
|
||||
if {[interp issafe]} {
|
||||
uplevel 1 [list ::source $filename]
|
||||
} else {
|
||||
uplevel 1 [list ::source -nopkg $filename]
|
||||
}
|
||||
}
|
||||
|
||||
# auto_load_index --
|
||||
# Loads the contents of tclIndex files on the auto_path directory
|
||||
# list. This is usually invoked within auto_load to load the index
|
||||
@@ -499,7 +518,7 @@ proc auto_load_index {} {
|
||||
}
|
||||
set name [lindex $line 0]
|
||||
set auto_index($name) \
|
||||
"source [file join $dir [lindex $line 1]]"
|
||||
"::tcl::Pkg::source [file join $dir [lindex $line 1]]"
|
||||
}
|
||||
} else {
|
||||
error "[file join $dir tclIndex] isn't a proper Tcl index file"
|
||||
@@ -636,8 +655,9 @@ proc auto_execok name {
|
||||
}
|
||||
set auto_execs($name) ""
|
||||
|
||||
set shellBuiltins [list cls copy date del dir echo erase md mkdir \
|
||||
mklink rd ren rename rmdir start time type ver vol]
|
||||
set shellBuiltins [list assoc cls copy date del dir echo erase ftype \
|
||||
md mkdir mklink move rd ren rename rmdir start \
|
||||
time type ver vol]
|
||||
if {[info exists env(PATHEXT)]} {
|
||||
# Add an initial ; to have the {} extension check first.
|
||||
set execExtensions [split ";$env(PATHEXT)" ";"]
|
||||
|
||||
+3
-3
@@ -488,7 +488,7 @@ proc tclPkgUnknown {name args} {
|
||||
set dir [file dirname $file]
|
||||
if {![info exists procdDirs($dir)]} {
|
||||
try {
|
||||
source $file
|
||||
::tcl::Pkg::source $file
|
||||
} trap {POSIX EACCES} {} {
|
||||
# $file was not readable; silently ignore
|
||||
continue
|
||||
@@ -506,7 +506,7 @@ proc tclPkgUnknown {name args} {
|
||||
# safe interps usually don't have "file exists",
|
||||
if {([interp issafe] || [file exists $file])} {
|
||||
try {
|
||||
source $file
|
||||
::tcl::Pkg::source $file
|
||||
} trap {POSIX EACCES} {} {
|
||||
# $file was not readable; silently ignore
|
||||
continue
|
||||
@@ -590,7 +590,7 @@ proc tcl::MacOSXPkgUnknown {original name args} {
|
||||
set dir [file dirname $file]
|
||||
if {![info exists procdDirs($dir)]} {
|
||||
try {
|
||||
source $file
|
||||
::tcl::Pkg::source $file
|
||||
} trap {POSIX EACCES} {} {
|
||||
# $file was not readable; silently ignore
|
||||
continue
|
||||
|
||||
+66
-66
@@ -7,69 +7,69 @@
|
||||
# element name is the name of a command and the value is
|
||||
# a script that loads the command.
|
||||
|
||||
set auto_index(auto_reset) [list source [file join $dir auto.tcl]]
|
||||
set auto_index(tcl_findLibrary) [list source [file join $dir auto.tcl]]
|
||||
set auto_index(auto_mkindex) [list source [file join $dir auto.tcl]]
|
||||
set auto_index(auto_mkindex_old) [list source [file join $dir auto.tcl]]
|
||||
set auto_index(::auto_mkindex_parser::init) [list source [file join $dir auto.tcl]]
|
||||
set auto_index(::auto_mkindex_parser::cleanup) [list source [file join $dir auto.tcl]]
|
||||
set auto_index(::auto_mkindex_parser::mkindex) [list source [file join $dir auto.tcl]]
|
||||
set auto_index(::auto_mkindex_parser::hook) [list source [file join $dir auto.tcl]]
|
||||
set auto_index(::auto_mkindex_parser::slavehook) [list source [file join $dir auto.tcl]]
|
||||
set auto_index(::auto_mkindex_parser::command) [list source [file join $dir auto.tcl]]
|
||||
set auto_index(::auto_mkindex_parser::commandInit) [list source [file join $dir auto.tcl]]
|
||||
set auto_index(::auto_mkindex_parser::fullname) [list source [file join $dir auto.tcl]]
|
||||
set auto_index(history) [list source [file join $dir history.tcl]]
|
||||
set auto_index(::tcl::HistAdd) [list source [file join $dir history.tcl]]
|
||||
set auto_index(::tcl::HistKeep) [list source [file join $dir history.tcl]]
|
||||
set auto_index(::tcl::HistClear) [list source [file join $dir history.tcl]]
|
||||
set auto_index(::tcl::HistInfo) [list source [file join $dir history.tcl]]
|
||||
set auto_index(::tcl::HistRedo) [list source [file join $dir history.tcl]]
|
||||
set auto_index(::tcl::HistIndex) [list source [file join $dir history.tcl]]
|
||||
set auto_index(::tcl::HistEvent) [list source [file join $dir history.tcl]]
|
||||
set auto_index(::tcl::HistChange) [list source [file join $dir history.tcl]]
|
||||
set auto_index(pkg_mkIndex) [list source [file join $dir package.tcl]]
|
||||
set auto_index(tclPkgSetup) [list source [file join $dir package.tcl]]
|
||||
set auto_index(tclPkgUnknown) [list source [file join $dir package.tcl]]
|
||||
set auto_index(::tcl::MacOSXPkgUnknown) [list source [file join $dir package.tcl]]
|
||||
set auto_index(::pkg::create) [list source [file join $dir package.tcl]]
|
||||
set auto_index(parray) [list source [file join $dir parray.tcl]]
|
||||
set auto_index(::safe::InterpStatics) [list source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::InterpNested) [list source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::interpCreate) [list source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::interpInit) [list source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::CheckInterp) [list source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::interpConfigure) [list source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::InterpCreate) [list source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::InterpSetConfig) [list source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::interpFindInAccessPath) [list source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::interpAddToAccessPath) [list source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::InterpInit) [list source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::AddSubDirs) [list source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::interpDelete) [list source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::setLogCmd) [list source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::SyncAccessPath) [list source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::PathToken) [list source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::TranslatePath) [list source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::Log) [list source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::CheckFileName) [list source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::AliasGlob) [list source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::AliasSource) [list source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::AliasLoad) [list source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::FileInAccessPath) [list source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::DirInAccessPath) [list source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::Subset) [list source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::AliasSubset) [list source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::AliasEncoding) [list source [file join $dir safe.tcl]]
|
||||
set auto_index(tcl_wordBreakAfter) [list source [file join $dir word.tcl]]
|
||||
set auto_index(tcl_wordBreakBefore) [list source [file join $dir word.tcl]]
|
||||
set auto_index(tcl_endOfWord) [list source [file join $dir word.tcl]]
|
||||
set auto_index(tcl_startOfNextWord) [list source [file join $dir word.tcl]]
|
||||
set auto_index(tcl_startOfPreviousWord) [list source [file join $dir word.tcl]]
|
||||
set auto_index(::tcl::tm::add) [list source [file join $dir tm.tcl]]
|
||||
set auto_index(::tcl::tm::remove) [list source [file join $dir tm.tcl]]
|
||||
set auto_index(::tcl::tm::list) [list source [file join $dir tm.tcl]]
|
||||
set auto_index(::tcl::tm::Defaults) [list source [file join $dir tm.tcl]]
|
||||
set auto_index(::tcl::tm::UnknownHandler) [list source [file join $dir tm.tcl]]
|
||||
set auto_index(::tcl::tm::roots) [list source [file join $dir tm.tcl]]
|
||||
set auto_index(::tcl::tm::path) [list source [file join $dir tm.tcl]]
|
||||
set auto_index(auto_reset) [list ::tcl::Pkg::source [file join $dir auto.tcl]]
|
||||
set auto_index(tcl_findLibrary) [list ::tcl::Pkg::source [file join $dir auto.tcl]]
|
||||
set auto_index(auto_mkindex) [list ::tcl::Pkg::source [file join $dir auto.tcl]]
|
||||
set auto_index(auto_mkindex_old) [list ::tcl::Pkg::source [file join $dir auto.tcl]]
|
||||
set auto_index(::auto_mkindex_parser::init) [list ::tcl::Pkg::source [file join $dir auto.tcl]]
|
||||
set auto_index(::auto_mkindex_parser::cleanup) [list ::tcl::Pkg::source [file join $dir auto.tcl]]
|
||||
set auto_index(::auto_mkindex_parser::mkindex) [list ::tcl::Pkg::source [file join $dir auto.tcl]]
|
||||
set auto_index(::auto_mkindex_parser::hook) [list ::tcl::Pkg::source [file join $dir auto.tcl]]
|
||||
set auto_index(::auto_mkindex_parser::slavehook) [list ::tcl::Pkg::source [file join $dir auto.tcl]]
|
||||
set auto_index(::auto_mkindex_parser::command) [list ::tcl::Pkg::source [file join $dir auto.tcl]]
|
||||
set auto_index(::auto_mkindex_parser::commandInit) [list ::tcl::Pkg::source [file join $dir auto.tcl]]
|
||||
set auto_index(::auto_mkindex_parser::fullname) [list ::tcl::Pkg::source [file join $dir auto.tcl]]
|
||||
set auto_index(history) [list ::tcl::Pkg::source [file join $dir history.tcl]]
|
||||
set auto_index(::tcl::HistAdd) [list ::tcl::Pkg::source [file join $dir history.tcl]]
|
||||
set auto_index(::tcl::HistKeep) [list ::tcl::Pkg::source [file join $dir history.tcl]]
|
||||
set auto_index(::tcl::HistClear) [list ::tcl::Pkg::source [file join $dir history.tcl]]
|
||||
set auto_index(::tcl::HistInfo) [list ::tcl::Pkg::source [file join $dir history.tcl]]
|
||||
set auto_index(::tcl::HistRedo) [list ::tcl::Pkg::source [file join $dir history.tcl]]
|
||||
set auto_index(::tcl::HistIndex) [list ::tcl::Pkg::source [file join $dir history.tcl]]
|
||||
set auto_index(::tcl::HistEvent) [list ::tcl::Pkg::source [file join $dir history.tcl]]
|
||||
set auto_index(::tcl::HistChange) [list ::tcl::Pkg::source [file join $dir history.tcl]]
|
||||
set auto_index(pkg_mkIndex) [list ::tcl::Pkg::source [file join $dir package.tcl]]
|
||||
set auto_index(tclPkgSetup) [list ::tcl::Pkg::source [file join $dir package.tcl]]
|
||||
set auto_index(tclPkgUnknown) [list ::tcl::Pkg::source [file join $dir package.tcl]]
|
||||
set auto_index(::tcl::MacOSXPkgUnknown) [list ::tcl::Pkg::source [file join $dir package.tcl]]
|
||||
set auto_index(::pkg::create) [list ::tcl::Pkg::source [file join $dir package.tcl]]
|
||||
set auto_index(parray) [list ::tcl::Pkg::source [file join $dir parray.tcl]]
|
||||
set auto_index(::safe::InterpStatics) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::InterpNested) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::interpCreate) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::interpInit) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::CheckInterp) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::interpConfigure) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::InterpCreate) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::InterpSetConfig) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::interpFindInAccessPath) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::interpAddToAccessPath) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::InterpInit) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::AddSubDirs) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::interpDelete) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::setLogCmd) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::SyncAccessPath) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::PathToken) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::TranslatePath) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::Log) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::CheckFileName) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::AliasGlob) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::AliasSource) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::AliasLoad) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::FileInAccessPath) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::DirInAccessPath) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::Subset) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::AliasSubset) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
|
||||
set auto_index(::safe::AliasEncoding) [list ::tcl::Pkg::source [file join $dir safe.tcl]]
|
||||
set auto_index(tcl_wordBreakAfter) [list ::tcl::Pkg::source [file join $dir word.tcl]]
|
||||
set auto_index(tcl_wordBreakBefore) [list ::tcl::Pkg::source [file join $dir word.tcl]]
|
||||
set auto_index(tcl_endOfWord) [list ::tcl::Pkg::source [file join $dir word.tcl]]
|
||||
set auto_index(tcl_startOfNextWord) [list ::tcl::Pkg::source [file join $dir word.tcl]]
|
||||
set auto_index(tcl_startOfPreviousWord) [list ::tcl::Pkg::source [file join $dir word.tcl]]
|
||||
set auto_index(::tcl::tm::add) [list ::tcl::Pkg::source [file join $dir tm.tcl]]
|
||||
set auto_index(::tcl::tm::remove) [list ::tcl::Pkg::source [file join $dir tm.tcl]]
|
||||
set auto_index(::tcl::tm::list) [list ::tcl::Pkg::source [file join $dir tm.tcl]]
|
||||
set auto_index(::tcl::tm::Defaults) [list ::tcl::Pkg::source [file join $dir tm.tcl]]
|
||||
set auto_index(::tcl::tm::UnknownHandler) [list ::tcl::Pkg::source [file join $dir tm.tcl]]
|
||||
set auto_index(::tcl::tm::roots) [list ::tcl::Pkg::source [file join $dir tm.tcl]]
|
||||
set auto_index(::tcl::tm::path) [list ::tcl::Pkg::source [file join $dir tm.tcl]]
|
||||
|
||||
@@ -4,7 +4,6 @@ set TZData(:Asia/Aqtau) {
|
||||
{-9223372036854775808 12064 0 LMT}
|
||||
{-1441164064 14400 0 +04}
|
||||
{-1247544000 18000 0 +05}
|
||||
{-220942800 18000 0 +05}
|
||||
{370724400 21600 0 +06}
|
||||
{386445600 18000 0 +05}
|
||||
{386449200 21600 1 +06}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
# created by tools/tclZIC.tcl - do not edit
|
||||
|
||||
set TZData(:Asia/Atyrau) {
|
||||
{-9223372036854775808 12464 0 LMT}
|
||||
{-1441164464 14400 0 +04}
|
||||
{-1247544000 18000 0 +05}
|
||||
{370724400 21600 0 +06}
|
||||
{386445600 18000 0 +05}
|
||||
{386449200 21600 1 +06}
|
||||
{402256800 18000 0 +05}
|
||||
{417985200 21600 1 +06}
|
||||
{433792800 18000 0 +05}
|
||||
{449607600 21600 1 +06}
|
||||
{465339600 18000 0 +05}
|
||||
{481064400 21600 1 +06}
|
||||
{496789200 18000 0 +05}
|
||||
{512514000 21600 1 +06}
|
||||
{528238800 18000 0 +05}
|
||||
{543963600 21600 1 +06}
|
||||
{559688400 18000 0 +05}
|
||||
{575413200 21600 1 +06}
|
||||
{591138000 18000 0 +05}
|
||||
{606862800 21600 1 +06}
|
||||
{622587600 18000 0 +05}
|
||||
{638312400 21600 1 +06}
|
||||
{654642000 18000 0 +05}
|
||||
{670366800 14400 0 +04}
|
||||
{670370400 18000 1 +05}
|
||||
{686095200 14400 0 +04}
|
||||
{695772000 18000 0 +05}
|
||||
{701816400 21600 1 +06}
|
||||
{717541200 18000 0 +05}
|
||||
{733266000 21600 1 +06}
|
||||
{748990800 18000 0 +05}
|
||||
{764715600 21600 1 +06}
|
||||
{780440400 18000 0 +05}
|
||||
{796165200 21600 1 +06}
|
||||
{811890000 18000 0 +05}
|
||||
{828219600 21600 1 +06}
|
||||
{846363600 18000 0 +05}
|
||||
{859669200 21600 1 +06}
|
||||
{877813200 18000 0 +05}
|
||||
{891118800 21600 1 +06}
|
||||
{909262800 18000 0 +05}
|
||||
{922568400 14400 0 +04}
|
||||
{922572000 18000 1 +05}
|
||||
{941320800 14400 0 +04}
|
||||
{954021600 18000 1 +05}
|
||||
{972770400 14400 0 +04}
|
||||
{985471200 18000 1 +05}
|
||||
{1004220000 14400 0 +04}
|
||||
{1017525600 18000 1 +05}
|
||||
{1035669600 14400 0 +04}
|
||||
{1048975200 18000 1 +05}
|
||||
{1067119200 14400 0 +04}
|
||||
{1080424800 18000 1 +05}
|
||||
{1099173600 18000 0 +05}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
# created by tools/tclZIC.tcl - do not edit
|
||||
|
||||
set TZData(:Asia/Famagusta) {
|
||||
{-9223372036854775808 8148 0 LMT}
|
||||
{-1518920148 7200 0 EET}
|
||||
{166572000 10800 1 EEST}
|
||||
{182293200 7200 0 EET}
|
||||
{200959200 10800 1 EEST}
|
||||
{213829200 7200 0 EET}
|
||||
{228866400 10800 1 EEST}
|
||||
{243982800 7200 0 EET}
|
||||
{260316000 10800 1 EEST}
|
||||
{276123600 7200 0 EET}
|
||||
{291765600 10800 1 EEST}
|
||||
{307486800 7200 0 EET}
|
||||
{323820000 10800 1 EEST}
|
||||
{338936400 7200 0 EET}
|
||||
{354664800 10800 1 EEST}
|
||||
{370386000 7200 0 EET}
|
||||
{386114400 10800 1 EEST}
|
||||
{401835600 7200 0 EET}
|
||||
{417564000 10800 1 EEST}
|
||||
{433285200 7200 0 EET}
|
||||
{449013600 10800 1 EEST}
|
||||
{465339600 7200 0 EET}
|
||||
{481068000 10800 1 EEST}
|
||||
{496789200 7200 0 EET}
|
||||
{512517600 10800 1 EEST}
|
||||
{528238800 7200 0 EET}
|
||||
{543967200 10800 1 EEST}
|
||||
{559688400 7200 0 EET}
|
||||
{575416800 10800 1 EEST}
|
||||
{591138000 7200 0 EET}
|
||||
{606866400 10800 1 EEST}
|
||||
{622587600 7200 0 EET}
|
||||
{638316000 10800 1 EEST}
|
||||
{654642000 7200 0 EET}
|
||||
{670370400 10800 1 EEST}
|
||||
{686091600 7200 0 EET}
|
||||
{701820000 10800 1 EEST}
|
||||
{717541200 7200 0 EET}
|
||||
{733269600 10800 1 EEST}
|
||||
{748990800 7200 0 EET}
|
||||
{764719200 10800 1 EEST}
|
||||
{780440400 7200 0 EET}
|
||||
{796168800 10800 1 EEST}
|
||||
{811890000 7200 0 EET}
|
||||
{828223200 10800 1 EEST}
|
||||
{843944400 7200 0 EET}
|
||||
{859672800 10800 1 EEST}
|
||||
{875394000 7200 0 EET}
|
||||
{891122400 10800 1 EEST}
|
||||
{904597200 10800 0 EEST}
|
||||
{909277200 7200 0 EET}
|
||||
{922582800 10800 1 EEST}
|
||||
{941331600 7200 0 EET}
|
||||
{954032400 10800 1 EEST}
|
||||
{972781200 7200 0 EET}
|
||||
{985482000 10800 1 EEST}
|
||||
{1004230800 7200 0 EET}
|
||||
{1017536400 10800 1 EEST}
|
||||
{1035680400 7200 0 EET}
|
||||
{1048986000 10800 1 EEST}
|
||||
{1067130000 7200 0 EET}
|
||||
{1080435600 10800 1 EEST}
|
||||
{1099184400 7200 0 EET}
|
||||
{1111885200 10800 1 EEST}
|
||||
{1130634000 7200 0 EET}
|
||||
{1143334800 10800 1 EEST}
|
||||
{1162083600 7200 0 EET}
|
||||
{1174784400 10800 1 EEST}
|
||||
{1193533200 7200 0 EET}
|
||||
{1206838800 10800 1 EEST}
|
||||
{1224982800 7200 0 EET}
|
||||
{1238288400 10800 1 EEST}
|
||||
{1256432400 7200 0 EET}
|
||||
{1269738000 10800 1 EEST}
|
||||
{1288486800 7200 0 EET}
|
||||
{1301187600 10800 1 EEST}
|
||||
{1319936400 7200 0 EET}
|
||||
{1332637200 10800 1 EEST}
|
||||
{1351386000 7200 0 EET}
|
||||
{1364691600 10800 1 EEST}
|
||||
{1382835600 7200 0 EET}
|
||||
{1396141200 10800 1 EEST}
|
||||
{1414285200 7200 0 EET}
|
||||
{1427590800 10800 1 EEST}
|
||||
{1445734800 7200 0 EET}
|
||||
{1459040400 10800 1 EEST}
|
||||
{1473285600 10800 0 +03}
|
||||
}
|
||||
+11
-11
@@ -2,17 +2,17 @@
|
||||
|
||||
set TZData(:Asia/Gaza) {
|
||||
{-9223372036854775808 8272 0 LMT}
|
||||
{-2185409872 7200 0 EET}
|
||||
{-933645600 10800 1 EET}
|
||||
{-857358000 7200 0 EET}
|
||||
{-844300800 10800 1 EET}
|
||||
{-825822000 7200 0 EET}
|
||||
{-812685600 10800 1 EET}
|
||||
{-794199600 7200 0 EET}
|
||||
{-779853600 10800 1 EET}
|
||||
{-762656400 7200 0 EET}
|
||||
{-748310400 10800 1 EET}
|
||||
{-731127600 7200 0 EET}
|
||||
{-2185409872 7200 0 EEST}
|
||||
{-933645600 10800 1 EEST}
|
||||
{-857358000 7200 0 EEST}
|
||||
{-844300800 10800 1 EEST}
|
||||
{-825822000 7200 0 EEST}
|
||||
{-812685600 10800 1 EEST}
|
||||
{-794199600 7200 0 EEST}
|
||||
{-779853600 10800 1 EEST}
|
||||
{-762656400 7200 0 EEST}
|
||||
{-748310400 10800 1 EEST}
|
||||
{-731127600 7200 0 EEST}
|
||||
{-682653600 7200 0 EET}
|
||||
{-399088800 10800 1 EEST}
|
||||
{-386650800 7200 0 EET}
|
||||
|
||||
+11
-11
@@ -2,17 +2,17 @@
|
||||
|
||||
set TZData(:Asia/Hebron) {
|
||||
{-9223372036854775808 8423 0 LMT}
|
||||
{-2185410023 7200 0 EET}
|
||||
{-933645600 10800 1 EET}
|
||||
{-857358000 7200 0 EET}
|
||||
{-844300800 10800 1 EET}
|
||||
{-825822000 7200 0 EET}
|
||||
{-812685600 10800 1 EET}
|
||||
{-794199600 7200 0 EET}
|
||||
{-779853600 10800 1 EET}
|
||||
{-762656400 7200 0 EET}
|
||||
{-748310400 10800 1 EET}
|
||||
{-731127600 7200 0 EET}
|
||||
{-2185410023 7200 0 EEST}
|
||||
{-933645600 10800 1 EEST}
|
||||
{-857358000 7200 0 EEST}
|
||||
{-844300800 10800 1 EEST}
|
||||
{-825822000 7200 0 EEST}
|
||||
{-812685600 10800 1 EEST}
|
||||
{-794199600 7200 0 EEST}
|
||||
{-779853600 10800 1 EEST}
|
||||
{-762656400 7200 0 EEST}
|
||||
{-748310400 10800 1 EEST}
|
||||
{-731127600 7200 0 EEST}
|
||||
{-682653600 7200 0 EET}
|
||||
{-399088800 10800 1 EEST}
|
||||
{-386650800 7200 0 EET}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
# created by tools/tclZIC.tcl - do not edit
|
||||
|
||||
set TZData(:Europe/Saratov) {
|
||||
{-9223372036854775808 11058 0 LMT}
|
||||
{-1593820800 10800 0 +03}
|
||||
{-1247540400 14400 0 +05}
|
||||
{354916800 18000 1 +05}
|
||||
{370724400 14400 0 +04}
|
||||
{386452800 18000 1 +05}
|
||||
{402260400 14400 0 +04}
|
||||
{417988800 18000 1 +05}
|
||||
{433796400 14400 0 +04}
|
||||
{449611200 18000 1 +05}
|
||||
{465343200 14400 0 +04}
|
||||
{481068000 18000 1 +05}
|
||||
{496792800 14400 0 +04}
|
||||
{512517600 18000 1 +05}
|
||||
{528242400 14400 0 +04}
|
||||
{543967200 18000 1 +05}
|
||||
{559692000 14400 0 +04}
|
||||
{575416800 10800 0 +04}
|
||||
{575420400 14400 1 +04}
|
||||
{591145200 10800 0 +03}
|
||||
{606870000 14400 1 +04}
|
||||
{622594800 10800 0 +03}
|
||||
{638319600 14400 1 +04}
|
||||
{654649200 10800 0 +03}
|
||||
{670374000 14400 0 +04}
|
||||
{701820000 10800 0 +04}
|
||||
{701823600 14400 1 +04}
|
||||
{717548400 10800 0 +03}
|
||||
{733273200 14400 1 +04}
|
||||
{748998000 10800 0 +03}
|
||||
{764722800 14400 1 +04}
|
||||
{780447600 10800 0 +03}
|
||||
{796172400 14400 1 +04}
|
||||
{811897200 10800 0 +03}
|
||||
{828226800 14400 1 +04}
|
||||
{846370800 10800 0 +03}
|
||||
{859676400 14400 1 +04}
|
||||
{877820400 10800 0 +03}
|
||||
{891126000 14400 1 +04}
|
||||
{909270000 10800 0 +03}
|
||||
{922575600 14400 1 +04}
|
||||
{941324400 10800 0 +03}
|
||||
{954025200 14400 1 +04}
|
||||
{972774000 10800 0 +03}
|
||||
{985474800 14400 1 +04}
|
||||
{1004223600 10800 0 +03}
|
||||
{1017529200 14400 1 +04}
|
||||
{1035673200 10800 0 +03}
|
||||
{1048978800 14400 1 +04}
|
||||
{1067122800 10800 0 +03}
|
||||
{1080428400 14400 1 +04}
|
||||
{1099177200 10800 0 +03}
|
||||
{1111878000 14400 1 +04}
|
||||
{1130626800 10800 0 +03}
|
||||
{1143327600 14400 1 +04}
|
||||
{1162076400 10800 0 +03}
|
||||
{1174777200 14400 1 +04}
|
||||
{1193526000 10800 0 +03}
|
||||
{1206831600 14400 1 +04}
|
||||
{1224975600 10800 0 +03}
|
||||
{1238281200 14400 1 +04}
|
||||
{1256425200 10800 0 +03}
|
||||
{1269730800 14400 1 +04}
|
||||
{1288479600 10800 0 +03}
|
||||
{1301180400 14400 0 +04}
|
||||
{1414274400 10800 0 +03}
|
||||
{1480806000 14400 0 +04}
|
||||
}
|
||||
@@ -11,6 +11,11 @@
|
||||
# See the file "license.terms" for information on usage and redistribution
|
||||
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
|
||||
if {![llength [info commands case]]} {
|
||||
# No "case" command? So no need to test
|
||||
return
|
||||
}
|
||||
|
||||
if {[lsearch [namespace children] ::tcltest] == -1} {
|
||||
package require tcltest
|
||||
namespace import -force ::tcltest::*
|
||||
|
||||
@@ -910,6 +910,15 @@ test expr-22.9 {non-numeric floats: shared object equality and NaN} {
|
||||
set x NaN
|
||||
expr {$x == $x}
|
||||
} 0
|
||||
# Make sure [Bug d0f7ba56f0] stays fixed.
|
||||
test expr-22.10 {non-numeric arguments: equality and NaN} {
|
||||
set x NaN
|
||||
expr {$x > "Gran"}
|
||||
} 1
|
||||
test expr-22.11 {non-numeric arguments: equality and NaN} {
|
||||
set x NaN
|
||||
expr {"Gran" < $x}
|
||||
} 1
|
||||
|
||||
# Tests for exponentiation handling
|
||||
test expr-23.1 {CompileExponentialExpr: just exponential expr} {expr 4**2} 16
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
# See the file "license.terms" for information on usage and redistribution
|
||||
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
|
||||
package require Tcl 8.6
|
||||
package require Tcl 8.6-
|
||||
|
||||
proc ::tcl::dict::get? {dict key} {
|
||||
if {[dict exists $dict $key]} {
|
||||
|
||||
+2
-2
@@ -31,7 +31,7 @@ test result-1.2 {Tcl_SaveInterpResult} {testsaveresult} {
|
||||
} {append result}
|
||||
test result-1.3 {Tcl_SaveInterpResult} {testsaveresult} {
|
||||
testsaveresult dynamic {set x 42} 0
|
||||
} {dynamic result notCalled present}
|
||||
} {dynamic result presentOrFreed}
|
||||
test result-1.4 {Tcl_SaveInterpResult} {testsaveresult} {
|
||||
testsaveresult object {set x 42} 0
|
||||
} {object result same}
|
||||
@@ -43,7 +43,7 @@ test result-1.6 {Tcl_SaveInterpResult} {testsaveresult} {
|
||||
} {42}
|
||||
test result-1.7 {Tcl_SaveInterpResult} {testsaveresult} {
|
||||
testsaveresult dynamic {set x 42} 1
|
||||
} {42 called missing}
|
||||
} {42 presentOrFreed}
|
||||
test result-1.8 {Tcl_SaveInterpResult} {testsaveresult} {
|
||||
testsaveresult object {set x 42} 1
|
||||
} {42 different}
|
||||
|
||||
Vendored
+1
-1
@@ -1681,7 +1681,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
# not, assume that its top-level directory is a sibling of ours.
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
DEF_VER=8.6
|
||||
DEF_VER=8.7
|
||||
|
||||
|
||||
# Check whether --with-tcl was given.
|
||||
|
||||
+17
-1
@@ -199,6 +199,13 @@ proc genStubs::declare {args} {
|
||||
set stubs($curName,$platform,lastNum) $index
|
||||
}
|
||||
}
|
||||
if {$platformList eq "deprecated"} {
|
||||
set stubs($curName,generic,$index) $decl
|
||||
if {![info exists stubs($curName,generic,lastNum)] \
|
||||
|| ($index > $stubs($curName,generic,lastNum))} {
|
||||
set stubs($curName,$platform,lastNum) $index
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
@@ -455,10 +462,16 @@ proc genStubs::parseArg {arg} {
|
||||
|
||||
proc genStubs::makeDecl {name decl index} {
|
||||
variable scspec
|
||||
variable stubs
|
||||
variable libraryName
|
||||
lassign $decl rtype fname args
|
||||
|
||||
append text "/* $index */\n"
|
||||
if {[info exists stubs($name,deprecated,$index)]} {
|
||||
set line "[string toupper $libraryName]_DEPRECATED $rtype"
|
||||
} else {
|
||||
set line "$scspec $rtype"
|
||||
}
|
||||
set count [expr {2 - ([string length $line] / 8)}]
|
||||
append line [string range "\t\t\t" 0 $count]
|
||||
set pad [expr {24 - [string length $line]}]
|
||||
@@ -682,7 +695,10 @@ proc genStubs::forAllStubs {name slotProc onAll textVar
|
||||
for {set i 0} {$i <= $lastNum} {incr i} {
|
||||
set slots [array names stubs $name,*,$i]
|
||||
set emit 0
|
||||
if {[info exists stubs($name,generic,$i)]} {
|
||||
if {[info exists stubs($name,deprecated,$i)]} {
|
||||
append text [$slotProc $name $stubs($name,generic,$i) $i]
|
||||
set emit 1
|
||||
} elseif {[info exists stubs($name,generic,$i)]} {
|
||||
if {[llength $slots] > 1} {
|
||||
puts stderr "conflicting generic and platform entries:\
|
||||
$name $i"
|
||||
|
||||
+1
-1
@@ -240,7 +240,7 @@ InitializeHostName(
|
||||
}
|
||||
}
|
||||
if (native == NULL) {
|
||||
native = tclEmptyStringRep;
|
||||
native = &tclEmptyString;
|
||||
}
|
||||
#else /* !NO_UNAME */
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user