Tcl Source Code

Check-in [299f53aadb]
Login

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

Overview
Comment:[Patch #1536227]: Cygwin network pathname support
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-5-branch
Files: files | file ages | folders
SHA1: 299f53aadbcb96cb2f2666874a5d694764d4d68b
User & Date: jan.nijtmans 2012-06-25 07:54:37
Context
2012-06-25
12:54
[Bug 3537605]: Make [encoding dirs ? ?] report the right error message. check-in: 59d8363bd7 user: dkf tags: core-8-5-branch
11:55
merge 8.5 check-in: dd0f4a0975 user: dgp tags: bug-3024359
08:08
[Patch #1536227]: Cygwin network pathname support check-in: a9f36601c5 user: jan.nijtmans tags: trunk
07:54
[Patch #1536227]: Cygwin network pathname support check-in: 299f53aadb user: jan.nijtmans tags: core-8-5-branch
2012-06-24
06:00
some wrong versions check-in: eefe38655e user: jan.nijtmans tags: core-8-5-branch
2012-06-22
12:07
Cygwin network pathname support Closed-Leaf check-in: 2194dfa1f7 user: jan.nijtmans tags: bug-1536227
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.






1
2
3
4
5
6
7





2012-06-23  Jan Nijtmans  <[email protected]>

	* unix/tclUnixNotfy.c: [Bug 3508771]: Cygwin notifier for handling
	win32 events.

2012-06-21  Jan Nijtmans  <[email protected]>

>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
2012-06-25  Jan Nijtmans  <[email protected]>

	* generic/tclfileName.c: [Patch #1536227]: Cygwin network pathname
	* tests/fileName.test:   support

2012-06-23  Jan Nijtmans  <[email protected]>

	* unix/tclUnixNotfy.c: [Bug 3508771]: Cygwin notifier for handling
	win32 events.

2012-06-21  Jan Nijtmans  <[email protected]>

Changes to generic/tclFileName.c.

410
411
412
413
414
415
416








417
418
419
420
421
422
423
424
425
426
		path += 3;
		while (isdigit(UCHAR(*path))) {
		    ++path;
		}
	    }
#endif
	    if (path[0] == '/') {








		if (driveNameLengthPtr != NULL) {
		    /*
		     * We need this addition in case the QNX code was used.
		     */

		    *driveNameLengthPtr = (1 + path - origPath);
		}
	    } else {
		type = TCL_PATH_RELATIVE;
	    }







>
>
>
>
>
>
>
>


|







410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
		path += 3;
		while (isdigit(UCHAR(*path))) {
		    ++path;
		}
	    }
#endif
	    if (path[0] == '/') {
#ifdef __CYGWIN__
		/*
		 * Check for Cygwin // network path prefix
		 */
		if (path[1] == '/') {
		    path++;
		}
#endif
		if (driveNameLengthPtr != NULL) {
		    /*
		     * We need this addition in case the QNX or Cygwin code was used.
		     */

		    *driveNameLengthPtr = (1 + path - origPath);
		}
	    } else {
		type = TCL_PATH_RELATIVE;
	    }
639
640
641
642
643
644
645

646











647
648
649
650
651
652
653
654
655
656
657
	path += 3;
	while (isdigit(UCHAR(*path))) { /* INTL: digit */
	    ++path;
	}
    }
#endif


    if (path[0] == '/') {











	Tcl_ListObjAppendElement(NULL, result, Tcl_NewStringObj("/",1));
	p = path+1;
    } else {
	p = path;
    }

    /*
     * Split on slashes. Embedded elements that start with tilde will be
     * prefixed with "./" so they are not affected by tilde substitution.
     */








>
|
>
>
>
>
>
>
>
>
>
>
>
|
<
<
<







647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667



668
669
670
671
672
673
674
	path += 3;
	while (isdigit(UCHAR(*path))) { /* INTL: digit */
	    ++path;
	}
    }
#endif

    p = path;
    if (*p == '/') {
	Tcl_Obj *rootElt = Tcl_NewStringObj("/", 1);
	p++;
#ifdef __CYGWIN__
	/*
	 * Check for Cygwin // network path prefix
	 */
	if (*p == '/') {
	    Tcl_AppendToObj(rootElt, "/", 1);
	    p++;
	}
#endif
	Tcl_ListObjAppendElement(NULL, result, rootElt);



    }

    /*
     * Split on slashes. Embedded elements that start with tilde will be
     * prefixed with "./" so they are not affected by tilde substitution.
     */

Changes to tests/fileName.test.

185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
test filename-4.12 {Tcl_SplitPath: unix} {testsetplatform} {
    testsetplatform unix
    file split ../..
} {.. ..}
test filename-4.13 {Tcl_SplitPath: unix} {testsetplatform} {
    testsetplatform unix
    file split //foo
} {/ foo}
test filename-4.14 {Tcl_SplitPath: unix} {testsetplatform} {
    testsetplatform unix
    file split foo//bar
} {foo bar}
test filename-4.15 {Tcl_SplitPath: unix} {testsetplatform} {
    testsetplatform unix
    file split ~foo







|







185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
test filename-4.12 {Tcl_SplitPath: unix} {testsetplatform} {
    testsetplatform unix
    file split ../..
} {.. ..}
test filename-4.13 {Tcl_SplitPath: unix} {testsetplatform} {
    testsetplatform unix
    file split //foo
} "[file split //] foo"
test filename-4.14 {Tcl_SplitPath: unix} {testsetplatform} {
    testsetplatform unix
    file split foo//bar
} {foo bar}
test filename-4.15 {Tcl_SplitPath: unix} {testsetplatform} {
    testsetplatform unix
    file split ~foo
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
test filename-7.16 {Tcl_JoinPath: unix} {testsetplatform} {
    testsetplatform unix
    file join a . ./~b
} {a/./~b}
test filename-7.17 {Tcl_JoinPath: unix} {testsetplatform} {
    testsetplatform unix
    file join //a b
} {/a/b}
test filename-7.18 {Tcl_JoinPath: unix} {testsetplatform} {
    testsetplatform unix
    file join /// a b
} {/a/b}


test filename-9.1 {Tcl_JoinPath: win} {testsetplatform} {
    testsetplatform win
    file join a b
} {a/b}
test filename-9.2 {Tcl_JoinPath: win} {testsetplatform} {







|



|







425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
test filename-7.16 {Tcl_JoinPath: unix} {testsetplatform} {
    testsetplatform unix
    file join a . ./~b
} {a/./~b}
test filename-7.17 {Tcl_JoinPath: unix} {testsetplatform} {
    testsetplatform unix
    file join //a b
} "[file split //]a/b"
test filename-7.18 {Tcl_JoinPath: unix} {testsetplatform} {
    testsetplatform unix
    file join /// a b
} "[file split //]a/b"


test filename-9.1 {Tcl_JoinPath: win} {testsetplatform} {
    testsetplatform win
    file join a b
} {a/b}
test filename-9.2 {Tcl_JoinPath: win} {testsetplatform} {