Diff
Not logged in

Differences From Artifact [599dc0b63e]:

To Artifact [fbcb8852c0]:


222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
222
223
224
225
226
227
228


229
230
231
232
233
234
235







-
-







	if (packageName == NULL) {
	    namesMatch = 0;
	} else {
	    TclDStringClear(&pkgName);
	    Tcl_DStringAppend(&pkgName, packageName, -1);
	    TclDStringClear(&tmp);
	    Tcl_DStringAppend(&tmp, pkgPtr->packageName, -1);
	    Tcl_UtfToLower(Tcl_DStringValue(&pkgName));
	    Tcl_UtfToLower(Tcl_DStringValue(&tmp));
	    if (strcmp(Tcl_DStringValue(&tmp),
		    Tcl_DStringValue(&pkgName)) == 0) {
		namesMatch = 1;
	    } else {
		namesMatch = 0;
	    }
	}
317
318
319
320
321
322
323






324
325
326
327
328
329
330
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334







+
+
+
+
+
+







	     * of the alphabetic and underline characters that follow
	     * that.
	     */

	    splitPtr = Tcl_FSSplitPath(objv[1], &pElements);
	    Tcl_ListObjIndex(NULL, splitPtr, pElements -1, &pkgGuessPtr);
	    pkgGuess = TclGetString(pkgGuessPtr);
#if defined(_WIN32) || defined(__CYGWIN__)
	    if ((pkgGuess[0] == 'w') && (pkgGuess[1] == 'i')
		    && (pkgGuess[2] == 'n')) {
		pkgGuess += 3;
	    } else
#endif /* __CYGWIN__ */
	    if ((pkgGuess[0] == 'l') && (pkgGuess[1] == 'i')
		    && (pkgGuess[2] == 'b')) {
		pkgGuess += 3;
	    }
#ifdef __CYGWIN__
	    else if ((pkgGuess[0] == 'c') && (pkgGuess[1] == 'y')
		    && (pkgGuess[2] == 'g')) {
347
348
349
350
351
352
353
354

355
356
357
358
359
360





361
362
363




364
365
366
367
368
369
370
351
352
353
354
355
356
357

358






359
360
361
362
363
364


365
366
367
368
369
370
371
372
373
374
375







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

-
-
+
+
+
+







		Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LOAD",
			"WHATPACKAGE", NULL);
		code = TCL_ERROR;
		goto done;
	    }
	    Tcl_DStringAppend(&pkgName, pkgGuess, p - pkgGuess);
	    Tcl_DecrRefCount(splitPtr);
	}


	/*
	 * Fix the capitalization in the package name so that the first
	 * character is in caps (or title case) but the others are all
	 * lower-case.
	 */
	    /*
	     * Fix the capitalization in the package name so that the first
	     * character is in caps (or title case) but the others are all
	     * lower-case.
	     */

	Tcl_DStringSetLength(&pkgName,
		Tcl_UtfToTitle(Tcl_DStringValue(&pkgName)));
	    Tcl_DStringSetLength(&pkgName,
		    Tcl_UtfToTitle(Tcl_DStringValue(&pkgName)));

	}

	/*
	 * Compute the names of the two initialization functions, based on the
	 * package name.
	 */

	TclDStringAppendDString(&initName, &pkgName);
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
657
658
659
660
661
662
663


664
665
666
667
668
669
670







-
-







	if (packageName == NULL) {
	    namesMatch = 0;
	} else {
	    TclDStringClear(&pkgName);
	    Tcl_DStringAppend(&pkgName, packageName, -1);
	    TclDStringClear(&tmp);
	    Tcl_DStringAppend(&tmp, pkgPtr->packageName, -1);
	    Tcl_UtfToLower(Tcl_DStringValue(&pkgName));
	    Tcl_UtfToLower(Tcl_DStringValue(&tmp));
	    if (strcmp(Tcl_DStringValue(&tmp),
		    Tcl_DStringValue(&pkgName)) == 0) {
		namesMatch = 1;
	    } else {
		namesMatch = 0;
	    }
	}