Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
c465e198
Commit
c465e198
authored
Oct 24, 1999
by
Gerard Patel
Committed by
Alexandre Julliard
Oct 24, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove prefixing by a tilde for GetTempFileName 32bits.
parent
88354d97
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
32 deletions
+39
-32
file.c
files/file.c
+39
-32
No files found.
files/file.c
View file @
c465e198
...
@@ -652,38 +652,11 @@ INT WINAPI CompareFileTime( LPFILETIME x, LPFILETIME y )
...
@@ -652,38 +652,11 @@ INT WINAPI CompareFileTime( LPFILETIME x, LPFILETIME y )
return
0
;
return
0
;
}
}
/***********************************************************************
/***********************************************************************
*
GetTempFileName16 (KERNEL.97)
*
FILE_GetTempFileName : utility for GetTempFileName
*/
*/
UINT16
WINAPI
GetTempFileName16
(
BYTE
drive
,
LPCSTR
prefix
,
UINT16
unique
,
static
UINT
FILE_GetTempFileName
(
LPCSTR
path
,
LPCSTR
prefix
,
UINT
unique
,
LPSTR
buffer
)
LPSTR
buffer
,
BOOL
isWin16
)
{
char
temppath
[
144
];
if
(
!
(
drive
&
~
TF_FORCEDRIVE
))
/* drive 0 means current default drive */
drive
|=
DRIVE_GetCurrentDrive
()
+
'A'
;
if
((
drive
&
TF_FORCEDRIVE
)
&&
!
DRIVE_IsValid
(
toupper
(
drive
&
~
TF_FORCEDRIVE
)
-
'A'
))
{
drive
&=
~
TF_FORCEDRIVE
;
WARN
(
"invalid drive %d specified
\n
"
,
drive
);
}
if
(
drive
&
TF_FORCEDRIVE
)
sprintf
(
temppath
,
"%c:"
,
drive
&
~
TF_FORCEDRIVE
);
else
GetTempPathA
(
132
,
temppath
);
return
(
UINT16
)
GetTempFileNameA
(
temppath
,
prefix
,
unique
,
buffer
);
}
/***********************************************************************
* GetTempFileName32A (KERNEL32.290)
*/
UINT
WINAPI
GetTempFileNameA
(
LPCSTR
path
,
LPCSTR
prefix
,
UINT
unique
,
LPSTR
buffer
)
{
{
static
UINT
unique_temp
;
static
UINT
unique_temp
;
DOS_FULL_NAME
full_name
;
DOS_FULL_NAME
full_name
;
...
@@ -703,7 +676,7 @@ UINT WINAPI GetTempFileNameA( LPCSTR path, LPCSTR prefix, UINT unique,
...
@@ -703,7 +676,7 @@ UINT WINAPI GetTempFileNameA( LPCSTR path, LPCSTR prefix, UINT unique,
if
(
!
((
strlen
(
buffer
)
==
2
)
&&
(
buffer
[
1
]
==
':'
))
if
(
!
((
strlen
(
buffer
)
==
2
)
&&
(
buffer
[
1
]
==
':'
))
&&
((
p
==
buffer
)
||
(
p
[
-
1
]
!=
'\\'
)))
*
p
++
=
'\\'
;
&&
((
p
==
buffer
)
||
(
p
[
-
1
]
!=
'\\'
)))
*
p
++
=
'\\'
;
*
p
++
=
'~'
;
if
(
isWin16
)
*
p
++
=
'~'
;
for
(
i
=
3
;
(
i
>
0
)
&&
(
*
prefix
);
i
--
)
*
p
++
=
*
prefix
++
;
for
(
i
=
3
;
(
i
>
0
)
&&
(
*
prefix
);
i
--
)
*
p
++
=
*
prefix
++
;
sprintf
(
p
,
"%04x.tmp"
,
num
);
sprintf
(
p
,
"%04x.tmp"
,
num
);
...
@@ -745,6 +718,15 @@ UINT WINAPI GetTempFileNameA( LPCSTR path, LPCSTR prefix, UINT unique,
...
@@ -745,6 +718,15 @@ UINT WINAPI GetTempFileNameA( LPCSTR path, LPCSTR prefix, UINT unique,
/***********************************************************************
/***********************************************************************
* GetTempFileName32A (KERNEL32.290)
*/
UINT
WINAPI
GetTempFileNameA
(
LPCSTR
path
,
LPCSTR
prefix
,
UINT
unique
,
LPSTR
buffer
)
{
return
FILE_GetTempFileName
(
path
,
prefix
,
unique
,
buffer
,
FALSE
);
}
/***********************************************************************
* GetTempFileName32W (KERNEL32.291)
* GetTempFileName32W (KERNEL32.291)
*/
*/
UINT
WINAPI
GetTempFileNameW
(
LPCWSTR
path
,
LPCWSTR
prefix
,
UINT
unique
,
UINT
WINAPI
GetTempFileNameW
(
LPCWSTR
path
,
LPCWSTR
prefix
,
UINT
unique
,
...
@@ -757,7 +739,7 @@ UINT WINAPI GetTempFileNameW( LPCWSTR path, LPCWSTR prefix, UINT unique,
...
@@ -757,7 +739,7 @@ UINT WINAPI GetTempFileNameW( LPCWSTR path, LPCWSTR prefix, UINT unique,
if
(
!
path
)
return
0
;
if
(
!
path
)
return
0
;
patha
=
HEAP_strdupWtoA
(
GetProcessHeap
(),
0
,
path
);
patha
=
HEAP_strdupWtoA
(
GetProcessHeap
(),
0
,
path
);
prefixa
=
HEAP_strdupWtoA
(
GetProcessHeap
(),
0
,
prefix
);
prefixa
=
HEAP_strdupWtoA
(
GetProcessHeap
(),
0
,
prefix
);
ret
=
GetTempFileNameA
(
patha
,
prefixa
,
unique
,
buffera
);
ret
=
FILE_GetTempFileName
(
patha
,
prefixa
,
unique
,
buffera
,
FALSE
);
lstrcpyAtoW
(
buffer
,
buffera
);
lstrcpyAtoW
(
buffer
,
buffera
);
HeapFree
(
GetProcessHeap
(),
0
,
patha
);
HeapFree
(
GetProcessHeap
(),
0
,
patha
);
HeapFree
(
GetProcessHeap
(),
0
,
prefixa
);
HeapFree
(
GetProcessHeap
(),
0
,
prefixa
);
...
@@ -766,6 +748,31 @@ UINT WINAPI GetTempFileNameW( LPCWSTR path, LPCWSTR prefix, UINT unique,
...
@@ -766,6 +748,31 @@ UINT WINAPI GetTempFileNameW( LPCWSTR path, LPCWSTR prefix, UINT unique,
/***********************************************************************
/***********************************************************************
* GetTempFileName16 (KERNEL.97)
*/
UINT16
WINAPI
GetTempFileName16
(
BYTE
drive
,
LPCSTR
prefix
,
UINT16
unique
,
LPSTR
buffer
)
{
char
temppath
[
144
];
if
(
!
(
drive
&
~
TF_FORCEDRIVE
))
/* drive 0 means current default drive */
drive
|=
DRIVE_GetCurrentDrive
()
+
'A'
;
if
((
drive
&
TF_FORCEDRIVE
)
&&
!
DRIVE_IsValid
(
toupper
(
drive
&
~
TF_FORCEDRIVE
)
-
'A'
))
{
drive
&=
~
TF_FORCEDRIVE
;
WARN
(
"invalid drive %d specified
\n
"
,
drive
);
}
if
(
drive
&
TF_FORCEDRIVE
)
sprintf
(
temppath
,
"%c:"
,
drive
&
~
TF_FORCEDRIVE
);
else
GetTempPathA
(
132
,
temppath
);
return
(
UINT16
)
FILE_GetTempFileName
(
temppath
,
prefix
,
unique
,
buffer
,
TRUE
);
}
/***********************************************************************
* FILE_DoOpenFile
* FILE_DoOpenFile
*
*
* Implementation of OpenFile16() and OpenFile32().
* Implementation of OpenFile16() and OpenFile32().
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment