Tcl Source Code

Check-in [c60ae5b315]
Login

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

Overview
Comment:Merge 8.6
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | core-8-branch
Files: files | file ages | folders
SHA3-256: c60ae5b315d5bb489a3e3bed4e4b45f24c8fec5cb7afa86a4d9c2d2ba133d5bb
User & Date: jan.nijtmans 2020-06-25 13:01:59.400
Context
2020-06-28
15:15
Merge 8.6 check-in: ec1b0c0aa3 user: jan.nijtmans tags: core-8-branch
2020-06-25
13:02
Merge 8.7 check-in: 80673ea3d1 user: jan.nijtmans tags: trunk
13:01
Merge 8.6 check-in: c60ae5b315 user: jan.nijtmans tags: core-8-branch
12:58
Merge 8.5 check-in: e6244e2d0e user: jan.nijtmans tags: core-8-6-branch
11:26
Merge 8.6 check-in: 20bc6dfb78 user: jan.nijtmans tags: core-8-branch
Changes
Unified Diff Ignore Whitespace Patch
Changes to generic/tclZlib.c.
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
    	unsigned int n; int decBytes;

	/* if starting from scratch or continuation after full decompression */
	if (!cd->inStream.avail_in) {
	    /* buffer to start, we can read to whole available buffer */
	    cd->inStream.next_in = (Bytef *) cd->inBuffer;
	}
	/* 
	 * If done - no read needed anymore, check we have to copy rest of
	 * decompressed data, otherwise return with size (or 0 for Eof)
	 */
	if (cd->flags & STREAM_DECOMPRESS) {
	    goto copyDecompressed;
	}
	/*







|







3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
    	unsigned int n; int decBytes;

	/* if starting from scratch or continuation after full decompression */
	if (!cd->inStream.avail_in) {
	    /* buffer to start, we can read to whole available buffer */
	    cd->inStream.next_in = (Bytef *) cd->inBuffer;
	}
	/*
	 * If done - no read needed anymore, check we have to copy rest of
	 * decompressed data, otherwise return with size (or 0 for Eof)
	 */
	if (cd->flags & STREAM_DECOMPRESS) {
	    goto copyDecompressed;
	}
	/*
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
	    if (!gotBytes && !(cd->flags & STREAM_DONE)) {
		/* if no-data, but not ready - avoid signaling Eof,
		 * continue in blocking mode, otherwise EAGAIN */
		if (Tcl_InputBlocked(cd->parent)) {
		    continue;
		}
		*errorCodePtr = EAGAIN;
		return -1;		
	    }
	    break;
	}

	/*
	 * Loop until the request is satisfied (or no data available from
	 * above, possibly EOF).







|







3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
	    if (!gotBytes && !(cd->flags & STREAM_DONE)) {
		/* if no-data, but not ready - avoid signaling Eof,
		 * continue in blocking mode, otherwise EAGAIN */
		if (Tcl_InputBlocked(cd->parent)) {
		    continue;
		}
		*errorCodePtr = EAGAIN;
		return -1;
	    }
	    break;
	}

	/*
	 * Loop until the request is satisfied (or no data available from
	 * above, possibly EOF).
Changes to tests/zlib.test.
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
    set pathout [makeFile {} test-zlib-13.deflated]
    set chanout [open $pathout wb]
    zlib push inflate $chanin
    fcopy $chanin $chanout
    close $chanin
    close $chanout
} -body {
    file size $pathout    
} -cleanup {
    removeFile $pathout
    unset chanin pathin chanout pathout
} -result 458752

test zlib-13.2 {Ticket [f70ce1fead] - zlib multi-stream expansion} -constraints zlib -setup {
    # Start from the basic asset







|







1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
    set pathout [makeFile {} test-zlib-13.deflated]
    set chanout [open $pathout wb]
    zlib push inflate $chanin
    fcopy $chanin $chanout
    close $chanin
    close $chanout
} -body {
    file size $pathout
} -cleanup {
    removeFile $pathout
    unset chanin pathin chanout pathout
} -result 458752

test zlib-13.2 {Ticket [f70ce1fead] - zlib multi-stream expansion} -constraints zlib -setup {
    # Start from the basic asset
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
    close $chanout
    # Decode second stream
    set chanout [open $pathout2 wb]
    zlib push inflate $chanin
    fcopy $chanin $chanout
    chan pop $chanin
    close $chanout
    #    
    list [file size $pathout1] [file size $pathout2]
} -cleanup {
    close $chanin
    removeFile $pathout
    removeFile $pathout1
    removeFile $pathout2
    unset chanin pathin chanout pathout pathout1 pathout2







|







1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
    close $chanout
    # Decode second stream
    set chanout [open $pathout2 wb]
    zlib push inflate $chanin
    fcopy $chanin $chanout
    chan pop $chanin
    close $chanout
    #
    list [file size $pathout1] [file size $pathout2]
} -cleanup {
    close $chanin
    removeFile $pathout
    removeFile $pathout1
    removeFile $pathout2
    unset chanin pathin chanout pathout pathout1 pathout2