summaryrefslogtreecommitdiff
path: root/plugins/MirOTR
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-12-26 20:31:39 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-12-26 20:31:39 +0300
commitcddcd7483a7c472598af098e759e5d309024f606 (patch)
treeb0a227d6e087c41958cc84d27bc323353248aae5 /plugins/MirOTR
parent1039b2829a264280493ba0fa979214fe024dc70c (diff)
DWORD -> uint32_t
Diffstat (limited to 'plugins/MirOTR')
-rw-r--r--plugins/MirOTR/Libgcrypt/random/rndw32.c32
-rw-r--r--plugins/MirOTR/Libgpg-error/estream.c8
-rw-r--r--plugins/MirOTR/Libgpg-error/init.c2
-rw-r--r--plugins/MirOTR/Libgpg-error/w32-gettext.c8
-rw-r--r--plugins/MirOTR/src/options.cpp2
-rw-r--r--plugins/MirOTR/src/otr.cpp2
-rw-r--r--plugins/MirOTR/src/svcs_menu.cpp4
-rw-r--r--plugins/MirOTR/src/svcs_proto.cpp2
8 files changed, 30 insertions, 30 deletions
diff --git a/plugins/MirOTR/Libgcrypt/random/rndw32.c b/plugins/MirOTR/Libgcrypt/random/rndw32.c
index d50fa22215..a6430394eb 100644
--- a/plugins/MirOTR/Libgcrypt/random/rndw32.c
+++ b/plugins/MirOTR/Libgcrypt/random/rndw32.c
@@ -120,34 +120,34 @@
/* Type definitions for function pointers to call NetAPI32 functions. */
-typedef DWORD (WINAPI *NETSTATISTICSGET)(LPWSTR szServer, LPWSTR szService,
- DWORD dwLevel, DWORD dwOptions,
+typedef uint32_t (WINAPI *NETSTATISTICSGET)(LPWSTR szServer, LPWSTR szService,
+ uint32_t dwLevel, uint32_t dwOptions,
LPBYTE *lpBuffer);
-typedef DWORD (WINAPI *NETAPIBUFFERSIZE)(LPVOID lpBuffer, LPDWORD cbBuffer);
-typedef DWORD (WINAPI *NETAPIBUFFERFREE)(LPVOID lpBuffer);
+typedef uint32_t (WINAPI *NETAPIBUFFERSIZE)(LPVOID lpBuffer, LPDWORD cbBuffer);
+typedef uint32_t (WINAPI *NETAPIBUFFERFREE)(LPVOID lpBuffer);
/* Type definitions for function pointers to call native NT functions. */
-typedef DWORD (WINAPI *NTQUERYSYSTEMINFORMATION)(DWORD systemInformationClass,
+typedef uint32_t (WINAPI *NTQUERYSYSTEMINFORMATION)(uint32_t systemInformationClass,
PVOID systemInformation,
ULONG systemInformationLength,
PULONG returnLength);
-typedef DWORD (WINAPI *NTQUERYINFORMATIONPROCESS)
- (HANDLE processHandle, DWORD processInformationClass,
+typedef uint32_t (WINAPI *NTQUERYINFORMATIONPROCESS)
+ (HANDLE processHandle, uint32_t processInformationClass,
PVOID processInformation, ULONG processInformationLength,
PULONG returnLength);
-typedef DWORD (WINAPI *NTPOWERINFORMATION)
- (DWORD powerInformationClass, PVOID inputBuffer,
+typedef uint32_t (WINAPI *NTPOWERINFORMATION)
+ (uint32_t powerInformationClass, PVOID inputBuffer,
ULONG inputBufferLength, PVOID outputBuffer, ULONG outputBufferLength );
/* Type definitions for function pointers to call CryptoAPI functions. */
typedef BOOL (WINAPI *CRYPTACQUIRECONTEXT)(HCRYPTPROV *phProv,
LPCTSTR pszContainer,
LPCTSTR pszProvider,
- DWORD dwProvType,
- DWORD dwFlags);
-typedef BOOL (WINAPI *CRYPTGENRANDOM)(HCRYPTPROV hProv, DWORD dwLen,
+ uint32_t dwProvType,
+ uint32_t dwFlags);
+typedef BOOL (WINAPI *CRYPTGENRANDOM)(HCRYPTPROV hProv, uint32_t dwLen,
uint8_t *pbBuffer);
-typedef BOOL (WINAPI *CRYPTRELEASECONTEXT)(HCRYPTPROV hProv, DWORD dwFlags);
+typedef BOOL (WINAPI *CRYPTRELEASECONTEXT)(HCRYPTPROV hProv, uint32_t dwFlags);
/* Somewhat alternative functionality available as a direct call, for
Windows XP and newer. This is the CryptoAPI RNG, which isn't anywhere
@@ -361,7 +361,7 @@ registry_poll (void (*add)(const void*, size_t, enum random_origins),
{
static int cbPerfData = PERFORMANCE_BUFFER_SIZE;
int iterations;
- DWORD dwSize, status;
+ uint32_t dwSize, status;
PERF_DATA_BLOCK *pPerfData;
/* Get information from the system performance counters. This can take a
@@ -488,7 +488,7 @@ slow_gatherer ( void (*add)(const void*, size_t, enum random_origins),
static int is_initialized = 0;
static int is_workstation = 1;
HANDLE hDevice;
- DWORD dwType, dwSize, dwResult;
+ uint32_t dwType, dwSize, dwResult;
ULONG ulSize;
int drive_no, status;
int no_results = 0;
@@ -985,7 +985,7 @@ _gcry_rndw32_gather_random_fast (void (*add)(const void*, size_t,
else
{
/* Millisecond accuracy at best... */
- DWORD aword = GetTickCount ();
+ uint32_t aword = GetTickCount ();
(*add) (&aword, sizeof (aword), origin );
}
}
diff --git a/plugins/MirOTR/Libgpg-error/estream.c b/plugins/MirOTR/Libgpg-error/estream.c
index f4bda2a1c0..0ec22a0ba0 100644
--- a/plugins/MirOTR/Libgpg-error/estream.c
+++ b/plugins/MirOTR/Libgpg-error/estream.c
@@ -263,7 +263,7 @@ mem_free (void *p)
#ifdef HAVE_W32_SYSTEM
static int
-map_w32_to_errno (DWORD w32_err)
+map_w32_to_errno (uint32_t w32_err)
{
switch (w32_err)
{
@@ -1075,7 +1075,7 @@ es_func_w32_read (void *cookie, void *buffer, size_t size)
pre_syscall_func ();
do
{
- DWORD nread, ec;
+ uint32_t nread, ec;
if (!ReadFile (w32_cookie->hd, buffer, size, &nread, NULL))
{
@@ -1117,7 +1117,7 @@ es_func_w32_write (void *cookie, const void *buffer, size_t size)
pre_syscall_func ();
do
{
- DWORD nwritten;
+ uint32_t nwritten;
if (!WriteFile (w32_cookie->hd, buffer, size, &nwritten, NULL))
{
@@ -1140,7 +1140,7 @@ static int
es_func_w32_seek (void *cookie, gpgrt_off_t *offset, int whence)
{
estream_cookie_w32_t w32_cookie = cookie;
- DWORD method;
+ uint32_t method;
LARGE_INTEGER distance, newoff;
if (w32_cookie->hd == INVALID_HANDLE_VALUE)
diff --git a/plugins/MirOTR/Libgpg-error/init.c b/plugins/MirOTR/Libgpg-error/init.c
index 6305fe31af..4f3ca57af8 100644
--- a/plugins/MirOTR/Libgpg-error/init.c
+++ b/plugins/MirOTR/Libgpg-error/init.c
@@ -433,7 +433,7 @@ _gpg_err_set_errno (int err)
/* Entry point called by the DLL loader. */
#ifdef DLL_EXPORT
int WINAPI
-DllMain (HINSTANCE hinst, DWORD reason, LPVOID reserved)
+DllMain (HINSTANCE hinst, uint32_t reason, LPVOID reserved)
{
struct tls_space_s *tls;
(void)reserved;
diff --git a/plugins/MirOTR/Libgpg-error/w32-gettext.c b/plugins/MirOTR/Libgpg-error/w32-gettext.c
index 89f505d91d..e52e3aee82 100644
--- a/plugins/MirOTR/Libgpg-error/w32-gettext.c
+++ b/plugins/MirOTR/Libgpg-error/w32-gettext.c
@@ -58,9 +58,9 @@
static wchar_t *utf8_to_wchar (const char *string, size_t length, size_t *retlen);
static HANDLE
-MyCreateFileA (LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwSharedMode,
+MyCreateFileA (LPCSTR lpFileName, uint32_t dwDesiredAccess, uint32_t dwSharedMode,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
- DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes,
+ uint32_t dwCreationDisposition, uint32_t dwFlagsAndAttributes,
HANDLE hTemplateFile)
{
wchar_t *filename;
@@ -1230,7 +1230,7 @@ static struct loaded_domain *
load_domain (const char *filename)
{
HANDLE fh;
- DWORD size;
+ uint32_t size;
struct mo_file_header *data = NULL;
struct loaded_domain *domain = NULL;
size_t to_read;
@@ -1260,7 +1260,7 @@ load_domain (const char *filename)
do
{
BOOL res;
- DWORD nb;
+ uint32_t nb;
res = ReadFile (fh, read_ptr, to_read, &nb, NULL);
if (! res || nb < to_read)
diff --git a/plugins/MirOTR/src/options.cpp b/plugins/MirOTR/src/options.cpp
index da607a301f..f593f738e9 100644
--- a/plugins/MirOTR/src/options.cpp
+++ b/plugins/MirOTR/src/options.cpp
@@ -597,7 +597,7 @@ public:
{
for (auto &it : m_map) {
if (!it.first) continue;
- db_set_dw(it.first, MODULENAME, "Policy", (DWORD)it.second.policy);
+ db_set_dw(it.first, MODULENAME, "Policy", (uint32_t)it.second.policy);
db_set_b(it.first, MODULENAME, "HTMLConv", it.second.htmlconv);
}
return true;
diff --git a/plugins/MirOTR/src/otr.cpp b/plugins/MirOTR/src/otr.cpp
index eed207e7ae..51e2633f24 100644
--- a/plugins/MirOTR/src/otr.cpp
+++ b/plugins/MirOTR/src/otr.cpp
@@ -80,7 +80,7 @@ extern "C" {
OtrlPolicy otr_gui_policy(void *opdata, ConnContext *context) {
DEBUGOUTA("OTR_GUI_POLICY\n");
MCONTACT hContact = (UINT_PTR)opdata;
- DWORD pol;
+ uint32_t pol;
if (hContact) {
pol = g_plugin.getDword(hContact, "Policy", CONTACT_DEFAULT_POLICY);
if (options.bHaveSecureIM && pol != OTRL_POLICY_MANUAL_MOD && pol != OTRL_POLICY_NEVER && db_get_b(hContact, "SecureIM", "StatusID", 0)) {
diff --git a/plugins/MirOTR/src/svcs_menu.cpp b/plugins/MirOTR/src/svcs_menu.cpp
index 955265ac6b..50829b2f16 100644
--- a/plugins/MirOTR/src/svcs_menu.cpp
+++ b/plugins/MirOTR/src/svcs_menu.cpp
@@ -13,7 +13,7 @@ int StartOTR(MCONTACT hContact)
if (!uname)
return 1; // error
- DWORD pol = g_plugin.getDword(hContact, "Policy", CONTACT_DEFAULT_POLICY);
+ uint32_t pol = g_plugin.getDword(hContact, "Policy", CONTACT_DEFAULT_POLICY);
if (pol == CONTACT_DEFAULT_POLICY)
pol = options.default_policy;
@@ -199,7 +199,7 @@ int SVC_PrebuildContactMenu(WPARAM hContact, LPARAM)
if ((caps & PF1_IM) == 0)
return 0;
- DWORD pol = g_plugin.getDword(hContact, "Policy", CONTACT_DEFAULT_POLICY);
+ uint32_t pol = g_plugin.getDword(hContact, "Policy", CONTACT_DEFAULT_POLICY);
if (pol == CONTACT_DEFAULT_POLICY)
pol = options.default_policy;
diff --git a/plugins/MirOTR/src/svcs_proto.cpp b/plugins/MirOTR/src/svcs_proto.cpp
index 2207ea09fd..038500363b 100644
--- a/plugins/MirOTR/src/svcs_proto.cpp
+++ b/plugins/MirOTR/src/svcs_proto.cpp
@@ -125,7 +125,7 @@ INT_PTR SVC_OTRRecvMessage(WPARAM wParam,LPARAM lParam)
if (newmessage == nullptr)
return Proto_ChainRecv(wParam, ccs);
- DWORD oldflags = pre->flags;
+ uint32_t oldflags = pre->flags;
typedef void (*msg_free_t)(void*);
msg_free_t msg_free = (msg_free_t)otrl_message_free;