Tcl Source Code

Check-in [bd9cd15006]
Login

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

Overview
Comment:merge trunk
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tip-400-impl
Files: files | file ages | folders
SHA1: bd9cd150069b03f5433fc9dcddf1600b54e232fc
User & Date: dkf 2012-04-15 10:12:18
Context
2012-04-15
21:05
Refactor some [zlib] subcommands into their own functions check-in: e1ad1c7bd0 user: dkf tags: tip-400-impl
10:12
merge trunk check-in: bd9cd15006 user: dkf tags: tip-400-impl
10:07
* generic/tclZlib.c (ZlibTransformSetOption): [Bug 3517696]: Make flushing work correctly in a pus...
check-in: d04f1fc81a user: dkf tags: trunk
2012-04-14
06:45
merge trunk check-in: f054d4db25 user: dkf tags: tip-400-impl
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.






1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

26
27
28
29
30
31
32





2012-04-12  Jan Nijtmans  <[email protected]>

	* generic/tclInt.decls:      [Bug 3514475]: remove TclpGetTimeZone
	* generic/tclIntDecls.h:     and TclpGetTZName
	* generic/tclIntPlatDecls.h:
	* generic/tclStubInit.c:
	* unix/tclUnixTime.c:
	* unix/tclWinTilemc:

2012-04-11  Jan Nijtmans  <[email protected]>

	* win/tclWinInit.c:     [Bug 3448512]: clock scan "1958-01-01" fails only
	* win/tcl.m4:           in debug compilation.
	* win/configure:
	* unix/tcl.m4:          Use NDEBUG consistantly meaning: no debugging.
	* unix/configure:
	* generic/tclBasic.c:
	* library/dde/pkgIndex.tcl   Use [::tcl::pkgconfig get debug] in stead
	* library/reg/pkgIndex.tcl   of [info exists ::tcl_platform(debug)]

	***POTENTIAL INCOMPATIBILITY***
	The variables $tcl_platform(debug) and $tcl_platform(threaded) no longer
	exist. They don't belong in the tcl_platform array, were never documented,
	disturbed the platform-1.1 test, $tcl_platform(debug) was only available
	on Windows anyway, and TIP #59 provides a much better alternative.


2012-04-10  Donal K. Fellows  <[email protected]>

	* generic/tcl.h (TCL_DEPRECATED_API): [Bug 2458976]: Added macro that
	can be used to mark parts of Tcl's API as deprecated. Currently only
	used for fields of Tcl_Interp, which TIPs 330 and 336 have deprecated
	with a migration strategy; we want to encourage people to move away
>
>
>
>
>


|
|







|
|




|



|
|
|
|
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
2012-04-15  Donal K. Fellows  <[email protected]>

	* generic/tclZlib.c (ZlibTransformSetOption): [Bug 3517696]: Make
	flushing work correctly in a pushed compressing channel transform.

2012-04-12  Jan Nijtmans  <[email protected]>

	* generic/tclInt.decls:      [Bug 3514475]: Remove TclpGetTimeZone and
	* generic/tclIntDecls.h:     TclpGetTZName
	* generic/tclIntPlatDecls.h:
	* generic/tclStubInit.c:
	* unix/tclUnixTime.c:
	* unix/tclWinTilemc:

2012-04-11  Jan Nijtmans  <[email protected]>

	* win/tclWinInit.c:     [Bug 3448512]: clock scan "1958-01-01" fails
	* win/tcl.m4:           only in debug compilation.
	* win/configure:
	* unix/tcl.m4:          Use NDEBUG consistantly meaning: no debugging.
	* unix/configure:
	* generic/tclBasic.c:
	* library/dde/pkgIndex.tcl   Use [::tcl::pkgconfig get debug] instead
	* library/reg/pkgIndex.tcl   of [info exists ::tcl_platform(debug)]

	***POTENTIAL INCOMPATIBILITY***
	The variables $tcl_platform(debug) and $tcl_platform(threaded) no
	longer exist. They don't belong in the tcl_platform array, were never
	documented, disturbed the platform-1.1 test, $tcl_platform(debug) was
	only available on Windows anyway, and TIP #59 provides a much better
	alternative.

2012-04-10  Donal K. Fellows  <[email protected]>

	* generic/tcl.h (TCL_DEPRECATED_API): [Bug 2458976]: Added macro that
	can be used to mark parts of Tcl's API as deprecated. Currently only
	used for fields of Tcl_Interp, which TIPs 330 and 336 have deprecated
	with a migration strategy; we want to encourage people to move away

Changes to generic/tclZlib.c.

2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700


2701
2702
2703


2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
	}

	/*
	 * Try to actually do the flush now.
	 */

	cd->outStream.avail_in = 0;
	do {
	    int e;

	    cd->outStream.next_out = (Bytef *) cd->outBuffer;
	    cd->outStream.avail_out = cd->outAllocated;

	    e = deflate(&cd->outStream, flushType);


	    if (e != Z_OK) {
		ConvertError(interp, e);
		return TCL_ERROR;


	    }

	    if (cd->outStream.avail_out > 0) {
		if (Tcl_WriteRaw(cd->parent, cd->outBuffer,
			PTR2INT(cd->outStream.next_out)) < 0) {
		    Tcl_AppendResult(interp, "problem flushing channel: ",
			    Tcl_PosixError(interp), NULL);
		    return TCL_ERROR;
		}
	    }
	} while (cd->outStream.avail_out > 0);
	return TCL_OK;
    }

    if (setOptionProc == NULL) {
	return Tcl_BadChannelOption(interp, optionName, chanOptions);
    }








|






>
>
|


>
>


<
|
|
|
|
|
|
|
<







2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709

2710
2711
2712
2713
2714
2715
2716

2717
2718
2719
2720
2721
2722
2723
	}

	/*
	 * Try to actually do the flush now.
	 */

	cd->outStream.avail_in = 0;
	while (1) {
	    int e;

	    cd->outStream.next_out = (Bytef *) cd->outBuffer;
	    cd->outStream.avail_out = cd->outAllocated;

	    e = deflate(&cd->outStream, flushType);
	    if (e == Z_BUF_ERROR) {
		break;
	    } else if (e != Z_OK) {
		ConvertError(interp, e);
		return TCL_ERROR;
	    } else if (cd->outStream.avail_out == 0) {
		break;
	    }


	    if (Tcl_WriteRaw(cd->parent, cd->outBuffer,
		    cd->outStream.next_out - (Bytef*)cd->outBuffer) < 0) {
		Tcl_AppendResult(interp, "problem flushing channel: ",
			Tcl_PosixError(interp), NULL);
		return TCL_ERROR;
	    }
	}

	return TCL_OK;
    }

    if (setOptionProc == NULL) {
	return Tcl_BadChannelOption(interp, optionName, chanOptions);
    }

Changes to tests/zlib.test.

152
153
154
155
156
157
158












159
160
161
162
163
164
165
    }
    append total --> [file size $file]
} -cleanup {
    close $fout
    close $srv
    removeFile $file
} -result 81920-->81920













test zlib-9.1 "check fcopy with push" -constraints zlib -setup {
    set sfile [makeFile {} testsrc.gz]
    set file [makeFile {} test.gz]
    set f [open $sfile wb]
    puts -nonewline $f [zlib gzip [string repeat a 81920]]
    close $f







>
>
>
>
>
>
>
>
>
>
>
>







152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
    }
    append total --> [file size $file]
} -cleanup {
    close $fout
    close $srv
    removeFile $file
} -result 81920-->81920
test zlib-8.4 {transformation and flushing: Bug 3517696} -setup {
    set file [makeFile {} test.z]
    set fd [open $file w]
} -constraints zlib -body {
    zlib push compress $fd
    puts $fd "qwertyuiop"
    fconfigure $fd -flush sync
    puts $fd "qwertyuiop"
} -cleanup {
    catch {close $fd}
    removeFile $file
} -result {}

test zlib-9.1 "check fcopy with push" -constraints zlib -setup {
    set sfile [makeFile {} testsrc.gz]
    set file [makeFile {} test.gz]
    set f [open $sfile wb]
    puts -nonewline $f [zlib gzip [string repeat a 81920]]
    close $f