Diff
Not logged in

Differences From Artifact [260624eaf5]:

To Artifact [128ae5d4b4]:


327
328
329
330
331
332
333

334
335
336
337
338
339
340
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341







+







static void
AppendEnvironment(
    Tcl_Obj *pathPtr,
    const char *lib)
{
    Tcl_Size pathc;
    WCHAR wBuf[MAX_PATH];
    DWORD dw;
    char buf[MAX_PATH * 3];
    Tcl_Obj *objPtr;
    Tcl_DString ds;
    const char **pathv;
    char *shortlib;

    /*
351
352
353
354
355
356
357
358
359
360



361
362

363
364




365
366
367
368
369
370
371
352
353
354
355
356
357
358



359
360
361


362


363
364
365
366
367
368
369
370
371
372
373







-
-
-
+
+
+
-
-
+
-
-
+
+
+
+







	    break;
	}
    }
    if (shortlib == lib) {
	Tcl_Panic("no '/' character found in lib");
    }

    /*
     * The "L" preceding the TCL_LIBRARY string is used to tell VC++ that
     * this is a Unicode string.
    dw = GetEnvironmentVariableW(L"TCL_LIBRARY", wBuf, MAX_PATH);
    if (dw <= 0 || dw >= (sizeof(buf) / sizeof(buf[0]))) {
	return;
     */

    }
    GetEnvironmentVariableW(L"TCL_LIBRARY", wBuf, MAX_PATH);
    WideCharToMultiByte(CP_UTF8, 0, wBuf, -1, buf, MAX_PATH * 3, NULL, NULL);
    if (WideCharToMultiByte(
	    CP_UTF8, 0, wBuf, -1, buf, MAX_PATH * 3, NULL, NULL) == 0) {
	return;
    }

    if (buf[0] != '\0') {
	objPtr = Tcl_NewStringObj(buf, TCL_INDEX_NONE);
	Tcl_ListObjAppendElement(NULL, pathPtr, objPtr);

	TclWinNoBackslash(buf);
	Tcl_SplitPath(buf, &pathc, &pathv);