diff options
author | uid37547 <uid37547@noemail.net> | 2002-01-31 21:07:32 (GMT) |
---|---|---|
committer | uid37547 <uid37547@noemail.net> | 2002-01-31 21:07:32 (GMT) |
commit | c910915febd6f97fe8536fbdca1e4de01507e02b (patch) | |
tree | 8a37249e9fb90e99fadeb5bb29e182a758adb719 /win/tclWinFCmd.c | |
parent | d805bebe0e5f3e524b238285056bfd0b4417298d (diff) | |
download | tcl-c910915febd6f97fe8536fbdca1e4de01507e02b.zip tcl-c910915febd6f97fe8536fbdca1e4de01507e02b.tar.gz tcl-c910915febd6f97fe8536fbdca1e4de01507e02b.tar.bz2 |
* win/tclWinFCmd.c: TIP 27: Applied patch fixing CONST warnings on
behalf of Don Porter <dgp@users.sourceforge.net>.
FossilOrigin-Name: ac7cf66301bbf823423322d946ccc540059d28bb
Diffstat (limited to 'win/tclWinFCmd.c')
-rw-r--r-- | win/tclWinFCmd.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index 5ebe7d7..dc1ed7b 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFCmd.c,v 1.20 2002/01/25 21:36:10 dgp Exp $ + * RCS: @(#) $Id: tclWinFCmd.c,v 1.21 2002/01/31 21:07:32 uid37547 Exp $ */ #include "tclWinInt.h" @@ -1824,7 +1824,8 @@ TclpObjNormalizePath(interp, pathPtr, nextCheckpoint) char *nativePath; int nativeLen; - nativePath = Tcl_UtfToExternalDString(NULL, path, -1, &ds); + Tcl_UtfToExternalDString(NULL, path, -1, &ds); + nativePath = Tcl_DStringValue(&ds); nativeLen = Tcl_DStringLength(&ds); /* We're on Windows 95/98 */ @@ -1868,7 +1869,8 @@ TclpObjNormalizePath(interp, pathPtr, nextCheckpoint) */ /* Copy over the valid part of the path and find its length */ - path = Tcl_ExternalToUtfDString(NULL, nativePath, -1, &eDs); + Tcl_ExternalToUtfDString(NULL, nativePath, -1, &eDs); + path = Tcl_DStringValue(&eDs); if (path[1] == ':') { if (path[0] >= 'a' && path[0] <= 'z') { /* Make uppercase */ @@ -1879,10 +1881,11 @@ TclpObjNormalizePath(interp, pathPtr, nextCheckpoint) Tcl_SetStringObj(pathPtr, path, Tcl_DStringLength(&eDs)); Tcl_DStringFree(&eDs); if (lastValidPathEnd != (nativePath + nativeLen)) { + CONST char *tmp; *lastValidPathEnd = '/'; /* Now copy over the invalid (i.e. non-existent) part of the path */ - path = Tcl_ExternalToUtfDString(NULL, lastValidPathEnd, -1, &eDs); - Tcl_AppendToObj(pathPtr, path, Tcl_DStringLength(&eDs)); + tmp = Tcl_ExternalToUtfDString(NULL, lastValidPathEnd, -1, &eDs); + Tcl_AppendToObj(pathPtr, tmp, Tcl_DStringLength(&eDs)); Tcl_DStringFree(&eDs); } Tcl_DStringFree(&ds); |