OSDN Git Service

* generic/tclFileName.c (Tcl_TranslateFileName): Cygwin paths (and Windows in
authorcgf <cgf>
Mon, 5 Jun 2000 23:07:29 +0000 (23:07 +0000)
committercgf <cgf>
Mon, 5 Jun 2000 23:07:29 +0000 (23:07 +0000)
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
tcl/generic/tclFileName.c
tcl/generic/tclInitScript.h
tcl/win/tclWinFile.c

index f5d6a7e..cb1cc1a 100644 (file)
@@ -1,3 +1,13 @@
+Mon Jun  5 18:48:32 2000  Christopher Faylor <cgf@cygnus.com>
+
+       * 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  <cagney@b1.cygnus.com>
 
        From Alexandre Oliva <aoliva@cygnus.com>
index d57aaed..54b6f2c 100644 (file)
@@ -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);
 }
 \f
@@ -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++) {
index 7c199c5..0af910e 100644 (file)
@@ -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\
index b0d9b9f..7a285ea 100644 (file)
@@ -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);