summaryrefslogtreecommitdiffstats
path: root/win/tclWinInit.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2001-08-24 16:19:09 (GMT)
committerdgp <dgp@users.sourceforge.net>2001-08-24 16:19:09 (GMT)
commit814083448a1a2ee8c8acf8f700bcc7d3fe096f5d (patch)
tree83a2c71e82588b352db0685f3f7eeaa9837568b3 /win/tclWinInit.c
parentb3af10ed93dc0d55599a21cf33311871939dd1bd (diff)
downloadtcl-814083448a1a2ee8c8acf8f700bcc7d3fe096f5d.zip
tcl-814083448a1a2ee8c8acf8f700bcc7d3fe096f5d.tar.gz
tcl-814083448a1a2ee8c8acf8f700bcc7d3fe096f5d.tar.bz2
* Backport of several bug fixes from HEAD to core-8-3-1-branch
Diffstat (limited to 'win/tclWinInit.c')
-rw-r--r--win/tclWinInit.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/win/tclWinInit.c b/win/tclWinInit.c
index 2d22b0a..8328bb9 100644
--- a/win/tclWinInit.c
+++ b/win/tclWinInit.c
@@ -7,7 +7,7 @@
* Copyright (c) 1998-1999 by Scriptics Corporation.
* All rights reserved.
*
- * RCS: @(#) $Id: tclWinInit.c,v 1.22.2.1 2001/04/03 22:54:39 hobbs Exp $
+ * RCS: @(#) $Id: tclWinInit.c,v 1.22.2.2 2001/08/24 16:19:10 dgp Exp $
*/
#include "tclWinInt.h"
@@ -249,43 +249,55 @@ TclpInitLibraryPath(path)
if (path != NULL) {
Tcl_SplitPath(path, &pathc, &pathv);
if (pathc > 2) {
+ str = pathv[pathc - 2];
pathv[pathc - 2] = installLib;
path = Tcl_JoinPath(pathc - 1, pathv, &ds);
+ pathv[pathc - 2] = str;
objPtr = Tcl_NewStringObj(path, Tcl_DStringLength(&ds));
Tcl_ListObjAppendElement(NULL, pathPtr, objPtr);
Tcl_DStringFree(&ds);
}
if (pathc > 3) {
+ str = pathv[pathc - 3];
pathv[pathc - 3] = installLib;
path = Tcl_JoinPath(pathc - 2, pathv, &ds);
+ pathv[pathc - 3] = str;
objPtr = Tcl_NewStringObj(path, Tcl_DStringLength(&ds));
Tcl_ListObjAppendElement(NULL, pathPtr, objPtr);
Tcl_DStringFree(&ds);
}
if (pathc > 2) {
+ str = pathv[pathc - 2];
pathv[pathc - 2] = "library";
path = Tcl_JoinPath(pathc - 1, pathv, &ds);
+ pathv[pathc - 2] = str;
objPtr = Tcl_NewStringObj(path, Tcl_DStringLength(&ds));
Tcl_ListObjAppendElement(NULL, pathPtr, objPtr);
Tcl_DStringFree(&ds);
}
if (pathc > 3) {
+ str = pathv[pathc - 3];
pathv[pathc - 3] = "library";
path = Tcl_JoinPath(pathc - 2, pathv, &ds);
+ pathv[pathc - 3] = str;
objPtr = Tcl_NewStringObj(path, Tcl_DStringLength(&ds));
Tcl_ListObjAppendElement(NULL, pathPtr, objPtr);
Tcl_DStringFree(&ds);
}
if (pathc > 3) {
+ str = pathv[pathc - 3];
pathv[pathc - 3] = developLib;
path = Tcl_JoinPath(pathc - 2, pathv, &ds);
+ pathv[pathc - 3] = str;
objPtr = Tcl_NewStringObj(path, Tcl_DStringLength(&ds));
Tcl_ListObjAppendElement(NULL, pathPtr, objPtr);
Tcl_DStringFree(&ds);
}
if (pathc > 4) {
+ str = pathv[pathc - 4];
pathv[pathc - 4] = developLib;
path = Tcl_JoinPath(pathc - 3, pathv, &ds);
+ pathv[pathc - 4] = str;
objPtr = Tcl_NewStringObj(path, Tcl_DStringLength(&ds));
Tcl_ListObjAppendElement(NULL, pathPtr, objPtr);
Tcl_DStringFree(&ds);