Alexandre Julliard : rsaenh: Rename the HANDLETABLE structure to avoid conflicts with wingdi.h.
Alexandre Julliard
julliard at winehq.org
Mon Feb 9 10:29:26 CST 2009
Module: wine
Branch: master
Commit: 7682bc6f8805a0f890e38e7f2bae563d21f06914
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7682bc6f8805a0f890e38e7f2bae563d21f06914
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Feb 9 13:03:35 2009 +0100
rsaenh: Rename the HANDLETABLE structure to avoid conflicts with wingdi.h.
---
dlls/rsaenh/handle.c | 24 ++++++++++++------------
dlls/rsaenh/handle.h | 24 ++++++++++++------------
dlls/rsaenh/rsaenh.c | 2 +-
3 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/dlls/rsaenh/handle.c b/dlls/rsaenh/handle.c
index 672c296..43b61a5 100644
--- a/dlls/rsaenh/handle.c
+++ b/dlls/rsaenh/handle.c
@@ -47,7 +47,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(handle);
* You have to call destroy_handle_table when you don't need the table
* any more.
*/
-void init_handle_table(HANDLETABLE *lpTable)
+void init_handle_table(struct handle_table *lpTable)
{
TRACE("(lpTable=%p)\n", lpTable);
@@ -66,7 +66,7 @@ void init_handle_table(HANDLETABLE *lpTable)
* PARAMS
* lpTable [I] Pointer to the handle table, which is to be destroyed.
*/
-void destroy_handle_table(HANDLETABLE *lpTable)
+void destroy_handle_table(struct handle_table *lpTable)
{
TRACE("(lpTable=%p)\n", lpTable);
@@ -90,7 +90,7 @@ void destroy_handle_table(HANDLETABLE *lpTable)
* non zero, if handle is valid.
* zero, if handle is not valid.
*/
-int is_valid_handle(HANDLETABLE *lpTable, HCRYPTKEY handle, DWORD dwType)
+int is_valid_handle(struct handle_table *lpTable, HCRYPTKEY handle, DWORD dwType)
{
unsigned int index = HANDLE2INDEX(handle);
int ret = 0;
@@ -132,20 +132,20 @@ exit:
* NOTES
* This is a support function for alloc_handle. Do not call!
*/
-static int grow_handle_table(HANDLETABLE *lpTable)
+static int grow_handle_table(struct handle_table *lpTable)
{
- HANDLETABLEENTRY *newEntries;
+ struct handle_table_entry *newEntries;
unsigned int i, newIEntries;
newIEntries = lpTable->iEntries + TABLE_SIZE_INCREMENT;
- newEntries = HeapAlloc(GetProcessHeap(), 0, sizeof(HANDLETABLEENTRY)*newIEntries);
+ newEntries = HeapAlloc(GetProcessHeap(), 0, sizeof(struct handle_table_entry)*newIEntries);
if (!newEntries)
return 0;
if (lpTable->paEntries)
{
- memcpy(newEntries, lpTable->paEntries, sizeof(HANDLETABLEENTRY)*lpTable->iEntries);
+ memcpy(newEntries, lpTable->paEntries, sizeof(struct handle_table_entry)*lpTable->iEntries);
HeapFree(GetProcessHeap(), 0, lpTable->paEntries);
}
@@ -177,7 +177,7 @@ static int grow_handle_table(HANDLETABLE *lpTable)
* non zero, if successful
* zero, if not successful (no free handle)
*/
-static int alloc_handle(HANDLETABLE *lpTable, OBJECTHDR *lpObject, HCRYPTKEY *lpHandle)
+static int alloc_handle(struct handle_table *lpTable, OBJECTHDR *lpObject, HCRYPTKEY *lpHandle)
{
int ret = 0;
@@ -224,7 +224,7 @@ exit:
* non zero, if successful
* zero, if not successful (invalid handle)
*/
-int release_handle(HANDLETABLE *lpTable, HCRYPTKEY handle, DWORD dwType)
+int release_handle(struct handle_table *lpTable, HCRYPTKEY handle, DWORD dwType)
{
unsigned int index = HANDLE2INDEX(handle);
OBJECTHDR *pObject;
@@ -269,7 +269,7 @@ exit:
* non zero, if successful
* zero, if not successful (invalid handle)
*/
-int lookup_handle(HANDLETABLE *lpTable, HCRYPTKEY handle, DWORD dwType, OBJECTHDR **lplpObject)
+int lookup_handle(struct handle_table *lpTable, HCRYPTKEY handle, DWORD dwType, OBJECTHDR **lplpObject)
{
int ret = 0;
@@ -304,7 +304,7 @@ exit:
* non zero, if successful
* zero, if not successful (invalid handle or out of memory)
*/
-int copy_handle(HANDLETABLE *lpTable, HCRYPTKEY handle, DWORD dwType, HCRYPTKEY *copy)
+int copy_handle(struct handle_table *lpTable, HCRYPTKEY handle, DWORD dwType, HCRYPTKEY *copy)
{
OBJECTHDR *pObject;
int ret;
@@ -347,7 +347,7 @@ int copy_handle(HANDLETABLE *lpTable, HCRYPTKEY handle, DWORD dwType, HCRYPTKEY
* INVALID_HANDLE_VALUE, if something went wrong.
* a handle to the new object, if successful.
*/
-HCRYPTKEY new_object(HANDLETABLE *lpTable, size_t cbSize, DWORD dwType, DESTRUCTOR destructor,
+HCRYPTKEY new_object(struct handle_table *lpTable, size_t cbSize, DWORD dwType, DESTRUCTOR destructor,
OBJECTHDR **ppObject)
{
OBJECTHDR *pObject;
diff --git a/dlls/rsaenh/handle.h b/dlls/rsaenh/handle.h
index 1d7b927..40611da 100644
--- a/dlls/rsaenh/handle.h
+++ b/dlls/rsaenh/handle.h
@@ -42,28 +42,28 @@ struct tagOBJECTHDR
DESTRUCTOR destructor;
};
-typedef struct tagHANDLETABLEENTRY
+struct handle_table_entry
{
OBJECTHDR *pObject;
unsigned int iNextFree;
-} HANDLETABLEENTRY;
+};
-typedef struct tagHANDLETABLE
+struct handle_table
{
unsigned int iEntries;
unsigned int iFirstFree;
- HANDLETABLEENTRY *paEntries;
+ struct handle_table_entry *paEntries;
CRITICAL_SECTION mutex;
-} HANDLETABLE;
+};
-void init_handle_table (HANDLETABLE *lpTable);
-void destroy_handle_table(HANDLETABLE *lpTable);
-int release_handle (HANDLETABLE *lpTable, HCRYPTKEY handle, DWORD dwType);
-int copy_handle (HANDLETABLE *lpTable, HCRYPTKEY handle, DWORD dwType, HCRYPTKEY *copy);
-int lookup_handle (HANDLETABLE *lpTable, HCRYPTKEY handle, DWORD dwType, OBJECTHDR **lplpObject);
-int is_valid_handle (HANDLETABLE *lpTable, HCRYPTKEY handle, DWORD dwType);
+void init_handle_table (struct handle_table *lpTable);
+void destroy_handle_table(struct handle_table *lpTable);
+int release_handle (struct handle_table *lpTable, HCRYPTKEY handle, DWORD dwType);
+int copy_handle (struct handle_table *lpTable, HCRYPTKEY handle, DWORD dwType, HCRYPTKEY *copy);
+int lookup_handle (struct handle_table *lpTable, HCRYPTKEY handle, DWORD dwType, OBJECTHDR **lplpObject);
+int is_valid_handle (struct handle_table *lpTable, HCRYPTKEY handle, DWORD dwType);
-HCRYPTKEY new_object (HANDLETABLE *lpTable, size_t cbSize, DWORD dwType, DESTRUCTOR destructor,
+HCRYPTKEY new_object (struct handle_table *lpTable, size_t cbSize, DWORD dwType, DESTRUCTOR destructor,
OBJECTHDR **ppObject);
#ifdef __cplusplus
diff --git a/dlls/rsaenh/rsaenh.c b/dlls/rsaenh/rsaenh.c
index e382e43..f44db39 100644
--- a/dlls/rsaenh/rsaenh.c
+++ b/dlls/rsaenh/rsaenh.c
@@ -343,7 +343,7 @@ RSAENH_CPHashData(
/******************************************************************************
* CSP's handle table (used by all acquired key containers)
*/
-static HANDLETABLE handle_table;
+static struct handle_table handle_table;
/******************************************************************************
* DllMain (RSAENH.@)
More information about the wine-cvs
mailing list