Tcl Source Code

Check-in [ebd55b94e1]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2018 Conference, Houston/TX, US, Oct 15-19
Send your abstracts to tclconference@googlegroups.com
or submit via the online form by Aug 20.

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

Overview
Comment:Adding typecasts in tclZipfs.c to eliminate a compiler warning
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core_zip_vfs
Files: files | file ages | folders
SHA3-256:ebd55b94e12bdd9e439424736d4f8535cd67bc5bf913fb77e992e1586c394885
User & Date: hypnotoad 2018-06-12 19:32:03
Context
2018-08-14
08:46
Merging changes with 8.7 Closed-Leaf check-in: c9c0d29199 user: hypnotoad tags: core_zip_vfs
2018-06-12
19:32
Adding typecasts in tclZipfs.c to eliminate a compiler warning check-in: ebd55b94e1 user: hypnotoad tags: core_zip_vfs
19:16
Remove AbsolutePath(), no longer used. check-in: 2209610f60 user: dgp tags: core_zip_vfs
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclZipfs.c.

2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
....
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
                ZipFSCloseArchive(interp, zf);
            } else {
                WriteLock();
                zf->nopen--;
                Unlock();
            }
        } else {
            int k, n, m;
            Tcl_Channel in;
            const char *errMsg = "seek error";

            /*
             * Fall back to read it as plain file which
             * hopefully is a static tclsh or wish binary
             * with proper zipfs infrastructure built in.
................................................................................
                Tcl_Close(interp, in);
                return TCL_ERROR;
            }
            Tcl_Seek(in, 0, SEEK_SET);
            k = 0;
            while (k < i) {
                m = i - k;
                if (m > sizeof (buf)) {
                    m = sizeof (buf);
                }
                n = Tcl_Read(in, buf, m);
                if (n == -1) {
                    errMsg = "read error";
                    goto cperr;
                } else if (n == 0) {
                    break;







|







 







|
|







2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
....
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
                ZipFSCloseArchive(interp, zf);
            } else {
                WriteLock();
                zf->nopen--;
                Unlock();
            }
        } else {
            int k, m, n;
            Tcl_Channel in;
            const char *errMsg = "seek error";

            /*
             * Fall back to read it as plain file which
             * hopefully is a static tclsh or wish binary
             * with proper zipfs infrastructure built in.
................................................................................
                Tcl_Close(interp, in);
                return TCL_ERROR;
            }
            Tcl_Seek(in, 0, SEEK_SET);
            k = 0;
            while (k < i) {
                m = i - k;
                if (m > (int)sizeof (buf)) {
                    m = (int)sizeof (buf);
                }
                n = Tcl_Read(in, buf, m);
                if (n == -1) {
                    errMsg = "read error";
                    goto cperr;
                } else if (n == 0) {
                    break;