From e274c18ff5bbe2d5d81e83c7ec85cef1e6cc88cf Mon Sep 17 00:00:00 2001 From: cgf Date: Mon, 5 Jun 2000 23:07:29 +0000 Subject: [PATCH] * generic/tclFileName.c (Tcl_TranslateFileName): Cygwin paths (and Windows in general, actually) do not need to have '/'s translated into '\'s. (TclDoGlob): Ditto. * win/tclWinFile.c (TclMatchFiles): Ditto. * generic/tclInitScript.h: Look in "../bin/usr/share" as well as "../bin/share". --- tcl/ChangeLog | 10 ++++++++++ tcl/generic/tclFileName.c | 5 +++++ tcl/generic/tclInitScript.h | 1 + tcl/win/tclWinFile.c | 2 ++ 4 files changed, 18 insertions(+) diff --git a/tcl/ChangeLog b/tcl/ChangeLog index f5d6a7eb5f..cb1cc1a68a 100644 --- a/tcl/ChangeLog +++ b/tcl/ChangeLog @@ -1,3 +1,13 @@ +Mon Jun 5 18:48:32 2000 Christopher Faylor + + * generic/tclFileName.c (Tcl_TranslateFileName): Cygwin paths (and + Windows in general, actually) do not need to have '/'s translated into + '\'s. + (TclDoGlob): Ditto. + * win/tclWinFile.c (TclMatchFiles): Ditto. + * generic/tclInitScript.h: Look in "../bin/usr/share" as well as + "../bin/share". + Thu Apr 20 17:01:19 2000 Andrew Cagney From Alexandre Oliva diff --git a/tcl/generic/tclFileName.c b/tcl/generic/tclFileName.c index d57aaedefd..54b6f2c33a 100644 --- a/tcl/generic/tclFileName.c +++ b/tcl/generic/tclFileName.c @@ -963,6 +963,8 @@ Tcl_TranslateFileName(interp, name, bufferPtr) * some system interfaces don't accept forward slashes. */ +#ifndef __CYGWIN__ + cygwin_conv_to_win32_path (Tcl_DStringValue(bufferPtr) if (tclPlatform == TCL_PLATFORM_WINDOWS) { for (p = Tcl_DStringValue(bufferPtr); *p != '\0'; p++) { if (*p == '/') { @@ -970,6 +972,7 @@ Tcl_TranslateFileName(interp, name, bufferPtr) } } } +#endif return Tcl_DStringValue(bufferPtr); } @@ -1568,6 +1571,7 @@ TclDoGlob(interp, separators, headPtr, tail) break; case TCL_PLATFORM_WINDOWS: { int exists; +#ifndef __CYGWIN__ /* * We need to convert slashes to backslashes before checking * for the existence of the file. Once we are done, we need @@ -1588,6 +1592,7 @@ TclDoGlob(interp, separators, headPtr, tail) } } } +#endif name = Tcl_DStringValue(headPtr); exists = (TclAccess(name, F_OK) == 0); for (p = name; *p != '\0'; p++) { diff --git a/tcl/generic/tclInitScript.h b/tcl/generic/tclInitScript.h index 7c199c5817..0af910e76e 100644 --- a/tcl/generic/tclInitScript.h +++ b/tcl/generic/tclInitScript.h @@ -92,6 +92,7 @@ static char initScript[] = "if {[info proc tclInit]==\"\"} {\n\ }\n\ set parentDir [file dirname [file dirname $execName]]\n\ lappend dirs [file join $parentDir share tcl$tcl_version]\n\ + lappend dirs [file join $parentDir \"usr\" share tcl$tcl_version]\n\ lappend dirs [file join [file dirname $parentDir] share tcl$tcl_version]\n\ # NOW, let's try to find it in the build tree...\n\ # Rather than play all the games Scriptics does, if we are in the build\n\ diff --git a/tcl/win/tclWinFile.c b/tcl/win/tclWinFile.c index b0d9b9fc31..7a285ead84 100644 --- a/tcl/win/tclWinFile.c +++ b/tcl/win/tclWinFile.c @@ -130,11 +130,13 @@ TclMatchFiles(interp, separators, dirPtr, pattern, tail) Tcl_DStringAppend(&buffer, Tcl_DStringValue(dirPtr), Tcl_DStringLength(dirPtr)); } +#ifndef __CYGWIN__ for (p = Tcl_DStringValue(&buffer); *p != '\0'; p++) { if (*p == '/') { *p = '\\'; } } +#endif p--; if (*p != '\\' && *p != ':') { Tcl_DStringAppend(&buffer, "\\", 1); -- 2.11.0