Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
db9d6503
Commit
db9d6503
authored
Mar 26, 2013
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 26, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Rename STREAM_HANDLE to stream_handle.
parent
39daf43c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
urlcache.c
dlls/wininet/urlcache.c
+20
-20
No files found.
dlls/wininet/urlcache.c
View file @
db9d6503
...
@@ -178,11 +178,11 @@ typedef struct
...
@@ -178,11 +178,11 @@ typedef struct
BYTE
allocation_table
[
ALLOCATION_TABLE_SIZE
];
BYTE
allocation_table
[
ALLOCATION_TABLE_SIZE
];
}
urlcache_header
;
}
urlcache_header
;
typedef
struct
_STREAM_HANDLE
typedef
struct
{
{
HANDLE
hF
ile
;
HANDLE
f
ile
;
CHAR
lpszU
rl
[
1
];
CHAR
u
rl
[
1
];
}
STREAM_HANDLE
;
}
stream_handle
;
typedef
struct
_URLCACHECONTAINER
typedef
struct
_URLCACHECONTAINER
{
{
...
@@ -3455,7 +3455,7 @@ BOOL WINAPI ReadUrlCacheEntryStream(
...
@@ -3455,7 +3455,7 @@ BOOL WINAPI ReadUrlCacheEntryStream(
)
)
{
{
/* Get handle to file from 'stream' */
/* Get handle to file from 'stream' */
STREAM_HANDLE
*
pStream
=
(
STREAM_HANDLE
*
)
hUrlCacheStream
;
stream_handle
*
pStream
=
(
stream_handle
*
)
hUrlCacheStream
;
if
(
dwReserved
!=
0
)
if
(
dwReserved
!=
0
)
{
{
...
@@ -3464,15 +3464,15 @@ BOOL WINAPI ReadUrlCacheEntryStream(
...
@@ -3464,15 +3464,15 @@ BOOL WINAPI ReadUrlCacheEntryStream(
return
FALSE
;
return
FALSE
;
}
}
if
(
IsBadReadPtr
(
pStream
,
sizeof
(
*
pStream
))
||
IsBadStringPtrA
(
pStream
->
lpszU
rl
,
INTERNET_MAX_URL_LENGTH
))
if
(
IsBadReadPtr
(
pStream
,
sizeof
(
*
pStream
))
||
IsBadStringPtrA
(
pStream
->
u
rl
,
INTERNET_MAX_URL_LENGTH
))
{
{
SetLastError
(
ERROR_INVALID_HANDLE
);
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
return
FALSE
;
}
}
if
(
SetFilePointer
(
pStream
->
hF
ile
,
dwLocation
,
NULL
,
FILE_CURRENT
)
==
INVALID_SET_FILE_POINTER
)
if
(
SetFilePointer
(
pStream
->
f
ile
,
dwLocation
,
NULL
,
FILE_CURRENT
)
==
INVALID_SET_FILE_POINTER
)
return
FALSE
;
return
FALSE
;
return
ReadFile
(
pStream
->
hF
ile
,
lpBuffer
,
*
lpdwLen
,
lpdwLen
,
NULL
);
return
ReadFile
(
pStream
->
f
ile
,
lpBuffer
,
*
lpdwLen
,
lpdwLen
,
NULL
);
}
}
/***********************************************************************
/***********************************************************************
...
@@ -3493,7 +3493,7 @@ HANDLE WINAPI RetrieveUrlCacheEntryStreamA(
...
@@ -3493,7 +3493,7 @@ HANDLE WINAPI RetrieveUrlCacheEntryStreamA(
* on this behaviour. (Native version appears to allocate
* on this behaviour. (Native version appears to allocate
* indices into a table)
* indices into a table)
*/
*/
STREAM_HANDLE
*
pStream
;
stream_handle
*
pStream
;
HANDLE
hFile
;
HANDLE
hFile
;
TRACE
(
"(%s, %p, %p, %x, 0x%08x)
\n
"
,
debugstr_a
(
lpszUrlName
),
lpCacheEntryInfo
,
TRACE
(
"(%s, %p, %p, %x, 0x%08x)
\n
"
,
debugstr_a
(
lpszUrlName
),
lpCacheEntryInfo
,
...
@@ -3518,7 +3518,7 @@ HANDLE WINAPI RetrieveUrlCacheEntryStreamA(
...
@@ -3518,7 +3518,7 @@ HANDLE WINAPI RetrieveUrlCacheEntryStreamA(
return
FALSE
;
return
FALSE
;
/* allocate handle storage space */
/* allocate handle storage space */
pStream
=
heap_alloc
(
sizeof
(
STREAM_HANDLE
)
+
strlen
(
lpszUrlName
)
*
sizeof
(
CHAR
));
pStream
=
heap_alloc
(
sizeof
(
stream_handle
)
+
strlen
(
lpszUrlName
)
*
sizeof
(
CHAR
));
if
(
!
pStream
)
if
(
!
pStream
)
{
{
CloseHandle
(
hFile
);
CloseHandle
(
hFile
);
...
@@ -3526,8 +3526,8 @@ HANDLE WINAPI RetrieveUrlCacheEntryStreamA(
...
@@ -3526,8 +3526,8 @@ HANDLE WINAPI RetrieveUrlCacheEntryStreamA(
return
FALSE
;
return
FALSE
;
}
}
pStream
->
hF
ile
=
hFile
;
pStream
->
f
ile
=
hFile
;
strcpy
(
pStream
->
lpszU
rl
,
lpszUrlName
);
strcpy
(
pStream
->
u
rl
,
lpszUrlName
);
return
pStream
;
return
pStream
;
}
}
...
@@ -3551,7 +3551,7 @@ HANDLE WINAPI RetrieveUrlCacheEntryStreamW(
...
@@ -3551,7 +3551,7 @@ HANDLE WINAPI RetrieveUrlCacheEntryStreamW(
* on this behaviour. (Native version appears to allocate
* on this behaviour. (Native version appears to allocate
* indices into a table)
* indices into a table)
*/
*/
STREAM_HANDLE
*
pStream
;
stream_handle
*
pStream
;
HANDLE
hFile
;
HANDLE
hFile
;
TRACE
(
"(%s, %p, %p, %x, 0x%08x)
\n
"
,
debugstr_w
(
lpszUrlName
),
lpCacheEntryInfo
,
TRACE
(
"(%s, %p, %p, %x, 0x%08x)
\n
"
,
debugstr_w
(
lpszUrlName
),
lpCacheEntryInfo
,
...
@@ -3576,7 +3576,7 @@ HANDLE WINAPI RetrieveUrlCacheEntryStreamW(
...
@@ -3576,7 +3576,7 @@ HANDLE WINAPI RetrieveUrlCacheEntryStreamW(
return
FALSE
;
return
FALSE
;
/* allocate handle storage space */
/* allocate handle storage space */
size
=
sizeof
(
STREAM_HANDLE
);
size
=
sizeof
(
stream_handle
);
url_len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
lpszUrlName
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
url_len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
lpszUrlName
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
size
+=
url_len
;
size
+=
url_len
;
pStream
=
heap_alloc
(
size
);
pStream
=
heap_alloc
(
size
);
...
@@ -3587,8 +3587,8 @@ HANDLE WINAPI RetrieveUrlCacheEntryStreamW(
...
@@ -3587,8 +3587,8 @@ HANDLE WINAPI RetrieveUrlCacheEntryStreamW(
return
FALSE
;
return
FALSE
;
}
}
pStream
->
hF
ile
=
hFile
;
pStream
->
f
ile
=
hFile
;
WideCharToMultiByte
(
CP_ACP
,
0
,
lpszUrlName
,
-
1
,
pStream
->
lpszU
rl
,
url_len
,
NULL
,
NULL
);
WideCharToMultiByte
(
CP_ACP
,
0
,
lpszUrlName
,
-
1
,
pStream
->
u
rl
,
url_len
,
NULL
,
NULL
);
return
pStream
;
return
pStream
;
}
}
...
@@ -3601,7 +3601,7 @@ BOOL WINAPI UnlockUrlCacheEntryStream(
...
@@ -3601,7 +3601,7 @@ BOOL WINAPI UnlockUrlCacheEntryStream(
IN
DWORD
dwReserved
IN
DWORD
dwReserved
)
)
{
{
STREAM_HANDLE
*
pStream
=
(
STREAM_HANDLE
*
)
hUrlCacheStream
;
stream_handle
*
pStream
=
(
stream_handle
*
)
hUrlCacheStream
;
if
(
dwReserved
!=
0
)
if
(
dwReserved
!=
0
)
{
{
...
@@ -3610,16 +3610,16 @@ BOOL WINAPI UnlockUrlCacheEntryStream(
...
@@ -3610,16 +3610,16 @@ BOOL WINAPI UnlockUrlCacheEntryStream(
return
FALSE
;
return
FALSE
;
}
}
if
(
IsBadReadPtr
(
pStream
,
sizeof
(
*
pStream
))
||
IsBadStringPtrA
(
pStream
->
lpszU
rl
,
INTERNET_MAX_URL_LENGTH
))
if
(
IsBadReadPtr
(
pStream
,
sizeof
(
*
pStream
))
||
IsBadStringPtrA
(
pStream
->
u
rl
,
INTERNET_MAX_URL_LENGTH
))
{
{
SetLastError
(
ERROR_INVALID_HANDLE
);
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
return
FALSE
;
}
}
if
(
!
UnlockUrlCacheEntryFileA
(
pStream
->
lpszU
rl
,
0
))
if
(
!
UnlockUrlCacheEntryFileA
(
pStream
->
u
rl
,
0
))
return
FALSE
;
return
FALSE
;
CloseHandle
(
pStream
->
hF
ile
);
CloseHandle
(
pStream
->
f
ile
);
heap_free
(
pStream
);
heap_free
(
pStream
);
return
TRUE
;
return
TRUE
;
}
}
...
...
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