471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
|
*/
static int
TempFileName(
TCHAR name[MAX_PATH]) /* Buffer in which name for temporary file
* gets stored. */
{
TCHAR *prefix = TEXT("TCL");
if (GetTempPath(MAX_PATH, name) != 0) {
if (GetTempFileName(name, prefix, 0, name) != 0) {
return 1;
}
}
name[0] = '.';
name[1] = '\0';
|
|
|
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
|
*/
static int
TempFileName(
TCHAR name[MAX_PATH]) /* Buffer in which name for temporary file
* gets stored. */
{
const TCHAR *prefix = TEXT("TCL");
if (GetTempPath(MAX_PATH, name) != 0) {
if (GetTempFileName(name, prefix, 0, name) != 0) {
return 1;
}
}
name[0] = '.';
name[1] = '\0';
|
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
|
const char *string = Tcl_GetStringFromObj(basenameObj, &length);
Tcl_WinUtfToTChar(string, length, &buf);
memcpy(namePtr, Tcl_DStringValue(&buf), Tcl_DStringLength(&buf));
namePtr += Tcl_DStringLength(&buf);
Tcl_DStringFree(&buf);
} else {
TCHAR *baseStr = TEXT("TCL");
int length = 3 * sizeof(TCHAR);
memcpy(namePtr, baseStr, length);
namePtr += length;
}
counter = TclpGetClicks() % 65533;
counter2 = 1024; /* Only try this many times! Prevents
|
|
|
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
|
const char *string = Tcl_GetStringFromObj(basenameObj, &length);
Tcl_WinUtfToTChar(string, length, &buf);
memcpy(namePtr, Tcl_DStringValue(&buf), Tcl_DStringLength(&buf));
namePtr += Tcl_DStringLength(&buf);
Tcl_DStringFree(&buf);
} else {
const TCHAR *baseStr = TEXT("TCL");
int length = 3 * sizeof(TCHAR);
memcpy(namePtr, baseStr, length);
namePtr += length;
}
counter = TclpGetClicks() % 65533;
counter2 = 1024; /* Only try this many times! Prevents
|