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
33725537
Commit
33725537
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 URLCacheFindEntryHandle to find_handle.
parent
299739d0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
40 deletions
+39
-40
urlcache.c
dlls/wininet/urlcache.c
+39
-40
No files found.
dlls/wininet/urlcache.c
View file @
33725537
...
...
@@ -100,6 +100,8 @@ static const char urlcache_ver[] = "0.2012001";
#define DWORD_ALIGN(x) ( (DWORD)(((DWORD)(x)+sizeof(DWORD)-1)/sizeof(DWORD))*sizeof(DWORD) )
#define URLCACHE_FIND_ENTRY_HANDLE_MAGIC 0xF389ABCD
typedef
struct
{
DWORD
signature
;
...
...
@@ -195,6 +197,14 @@ typedef struct
DWORD
default_entry_type
;
}
cache_container
;
typedef
struct
{
DWORD
magic
;
LPWSTR
url_search_pattern
;
DWORD
container_idx
;
DWORD
hash_table_idx
;
DWORD
hash_entry_idx
;
}
find_handle
;
/* List of all containers available */
static
struct
list
UrlContainers
=
LIST_INIT
(
UrlContainers
);
...
...
@@ -3839,17 +3849,6 @@ HANDLE WINAPI FindFirstUrlCacheEntryExW(
return
NULL
;
}
#define URLCACHE_FIND_ENTRY_HANDLE_MAGIC 0xF389ABCD
typedef
struct
URLCacheFindEntryHandle
{
DWORD
dwMagic
;
LPWSTR
lpszUrlSearchPattern
;
DWORD
dwContainerIndex
;
DWORD
dwHashTableIndex
;
DWORD
dwHashEntryIndex
;
}
URLCacheFindEntryHandle
;
/***********************************************************************
* FindFirstUrlCacheEntryA (WININET.@)
*
...
...
@@ -3857,7 +3856,7 @@ typedef struct URLCacheFindEntryHandle
INTERNETAPI
HANDLE
WINAPI
FindFirstUrlCacheEntryA
(
LPCSTR
lpszUrlSearchPattern
,
LPINTERNET_CACHE_ENTRY_INFOA
lpFirstCacheEntryInfo
,
LPDWORD
lpdwFirstCacheEntryInfoBufferSize
)
{
URLCacheFindEntryH
andle
*
pEntryHandle
;
find_h
andle
*
pEntryHandle
;
TRACE
(
"(%s, %p, %p)
\n
"
,
debugstr_a
(
lpszUrlSearchPattern
),
lpFirstCacheEntryInfo
,
lpdwFirstCacheEntryInfoBufferSize
);
...
...
@@ -3865,21 +3864,21 @@ INTERNETAPI HANDLE WINAPI FindFirstUrlCacheEntryA(LPCSTR lpszUrlSearchPattern,
if
(
!
pEntryHandle
)
return
NULL
;
pEntryHandle
->
dwM
agic
=
URLCACHE_FIND_ENTRY_HANDLE_MAGIC
;
pEntryHandle
->
m
agic
=
URLCACHE_FIND_ENTRY_HANDLE_MAGIC
;
if
(
lpszUrlSearchPattern
)
{
pEntryHandle
->
lpszUrlSearchP
attern
=
heap_strdupAtoW
(
lpszUrlSearchPattern
);
if
(
!
pEntryHandle
->
lpszUrlSearchP
attern
)
pEntryHandle
->
url_search_p
attern
=
heap_strdupAtoW
(
lpszUrlSearchPattern
);
if
(
!
pEntryHandle
->
url_search_p
attern
)
{
heap_free
(
pEntryHandle
);
return
NULL
;
}
}
else
pEntryHandle
->
lpszUrlSearchP
attern
=
NULL
;
pEntryHandle
->
dwContainerInde
x
=
0
;
pEntryHandle
->
dwHashTableInde
x
=
0
;
pEntryHandle
->
dwHashEntryInde
x
=
0
;
pEntryHandle
->
url_search_p
attern
=
NULL
;
pEntryHandle
->
container_id
x
=
0
;
pEntryHandle
->
hash_table_id
x
=
0
;
pEntryHandle
->
hash_entry_id
x
=
0
;
if
(
!
FindNextUrlCacheEntryA
(
pEntryHandle
,
lpFirstCacheEntryInfo
,
lpdwFirstCacheEntryInfoBufferSize
))
{
...
...
@@ -3896,7 +3895,7 @@ INTERNETAPI HANDLE WINAPI FindFirstUrlCacheEntryA(LPCSTR lpszUrlSearchPattern,
INTERNETAPI
HANDLE
WINAPI
FindFirstUrlCacheEntryW
(
LPCWSTR
lpszUrlSearchPattern
,
LPINTERNET_CACHE_ENTRY_INFOW
lpFirstCacheEntryInfo
,
LPDWORD
lpdwFirstCacheEntryInfoBufferSize
)
{
URLCacheFindEntryH
andle
*
pEntryHandle
;
find_h
andle
*
pEntryHandle
;
TRACE
(
"(%s, %p, %p)
\n
"
,
debugstr_w
(
lpszUrlSearchPattern
),
lpFirstCacheEntryInfo
,
lpdwFirstCacheEntryInfoBufferSize
);
...
...
@@ -3904,21 +3903,21 @@ INTERNETAPI HANDLE WINAPI FindFirstUrlCacheEntryW(LPCWSTR lpszUrlSearchPattern,
if
(
!
pEntryHandle
)
return
NULL
;
pEntryHandle
->
dwM
agic
=
URLCACHE_FIND_ENTRY_HANDLE_MAGIC
;
pEntryHandle
->
m
agic
=
URLCACHE_FIND_ENTRY_HANDLE_MAGIC
;
if
(
lpszUrlSearchPattern
)
{
pEntryHandle
->
lpszUrlSearchP
attern
=
heap_strdupW
(
lpszUrlSearchPattern
);
if
(
!
pEntryHandle
->
lpszUrlSearchP
attern
)
pEntryHandle
->
url_search_p
attern
=
heap_strdupW
(
lpszUrlSearchPattern
);
if
(
!
pEntryHandle
->
url_search_p
attern
)
{
heap_free
(
pEntryHandle
);
return
NULL
;
}
}
else
pEntryHandle
->
lpszUrlSearchP
attern
=
NULL
;
pEntryHandle
->
dwContainerInde
x
=
0
;
pEntryHandle
->
dwHashTableInde
x
=
0
;
pEntryHandle
->
dwHashEntryInde
x
=
0
;
pEntryHandle
->
url_search_p
attern
=
NULL
;
pEntryHandle
->
container_id
x
=
0
;
pEntryHandle
->
hash_table_id
x
=
0
;
pEntryHandle
->
hash_entry_id
x
=
0
;
if
(
!
FindNextUrlCacheEntryW
(
pEntryHandle
,
lpFirstCacheEntryInfo
,
lpdwFirstCacheEntryInfoBufferSize
))
{
...
...
@@ -3934,17 +3933,17 @@ static BOOL FindNextUrlCacheEntryInternal(
LPDWORD
lpdwNextCacheEntryInfoBufferSize
,
BOOL
unicode
)
{
URLCacheFindEntryHandle
*
pEntryHandle
=
(
URLCacheFindEntryHandle
*
)
hEnumHandle
;
find_handle
*
pEntryHandle
=
(
find_handle
*
)
hEnumHandle
;
cache_container
*
pContainer
;
if
(
pEntryHandle
->
dwM
agic
!=
URLCACHE_FIND_ENTRY_HANDLE_MAGIC
)
if
(
pEntryHandle
->
m
agic
!=
URLCACHE_FIND_ENTRY_HANDLE_MAGIC
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
for
(;
URLCacheContainers_Enum
(
pEntryHandle
->
lpszUrlSearchPattern
,
pEntryHandle
->
dwContainerInde
x
,
&
pContainer
);
pEntryHandle
->
dwContainerIndex
++
,
pEntryHandle
->
dwHashTableInde
x
=
0
)
for
(;
URLCacheContainers_Enum
(
pEntryHandle
->
url_search_pattern
,
pEntryHandle
->
container_id
x
,
&
pContainer
);
pEntryHandle
->
container_idx
++
,
pEntryHandle
->
hash_table_id
x
=
0
)
{
urlcache_header
*
pHeader
;
entry_hash_table
*
pHashTableEntry
;
...
...
@@ -3960,12 +3959,12 @@ static BOOL FindNextUrlCacheEntryInternal(
if
(
!
(
pHeader
=
cache_container_lock_index
(
pContainer
)))
return
FALSE
;
for
(;
URLCache_EnumHashTables
(
pHeader
,
&
pEntryHandle
->
dwHashTableInde
x
,
&
pHashTableEntry
);
pEntryHandle
->
dwHashTableIndex
++
,
pEntryHandle
->
dwHashEntryInde
x
=
0
)
for
(;
URLCache_EnumHashTables
(
pHeader
,
&
pEntryHandle
->
hash_table_id
x
,
&
pHashTableEntry
);
pEntryHandle
->
hash_table_idx
++
,
pEntryHandle
->
hash_entry_id
x
=
0
)
{
const
struct
hash_entry
*
pHashEntry
=
NULL
;
for
(;
URLCache_EnumHashTableEntries
(
pHeader
,
pHashTableEntry
,
&
pEntryHandle
->
dwHashEntryInde
x
,
&
pHashEntry
);
pEntryHandle
->
dwHashEntryInde
x
++
)
for
(;
URLCache_EnumHashTableEntries
(
pHeader
,
pHashTableEntry
,
&
pEntryHandle
->
hash_entry_id
x
,
&
pHashEntry
);
pEntryHandle
->
hash_entry_id
x
++
)
{
const
entry_url
*
pUrlEntry
;
const
entry_header
*
pEntry
=
(
const
entry_header
*
)((
LPBYTE
)
pHeader
+
pHashEntry
->
offset
);
...
...
@@ -3998,7 +3997,7 @@ static BOOL FindNextUrlCacheEntryInternal(
/* increment the current index so that next time the function
* is called the next entry is returned */
pEntryHandle
->
dwHashEntryInde
x
++
;
pEntryHandle
->
hash_entry_id
x
++
;
cache_container_unlock_index
(
pContainer
,
pHeader
);
return
TRUE
;
}
...
...
@@ -4046,18 +4045,18 @@ BOOL WINAPI FindNextUrlCacheEntryW(
*/
BOOL
WINAPI
FindCloseUrlCache
(
HANDLE
hEnumHandle
)
{
URLCacheFindEntryHandle
*
pEntryHandle
=
(
URLCacheFindEntryHandle
*
)
hEnumHandle
;
find_handle
*
pEntryHandle
=
(
find_handle
*
)
hEnumHandle
;
TRACE
(
"(%p)
\n
"
,
hEnumHandle
);
if
(
!
pEntryHandle
||
pEntryHandle
->
dwM
agic
!=
URLCACHE_FIND_ENTRY_HANDLE_MAGIC
)
if
(
!
pEntryHandle
||
pEntryHandle
->
m
agic
!=
URLCACHE_FIND_ENTRY_HANDLE_MAGIC
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
pEntryHandle
->
dwM
agic
=
0
;
heap_free
(
pEntryHandle
->
lpszUrlSearchP
attern
);
pEntryHandle
->
m
agic
=
0
;
heap_free
(
pEntryHandle
->
url_search_p
attern
);
heap_free
(
pEntryHandle
);
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