https://git.reactos.org/?p=reactos.git;a=commitdiff;h=895909e695f70527f0493…
commit 895909e695f70527f0493552bc8c1b2a94ef6e70
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Fri Apr 8 18:21:54 2022 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Fri Apr 8 18:21:54 2022 +0900
[IMM32] Renaming: s/g_csImeDpi/gcsImeDpi/ (#4433)
Improve debuggability. CORE-11700
---
dll/win32/imm32/ime.c | 30 +++++++++++++++---------------
dll/win32/imm32/imm.c | 8 ++++----
dll/win32/imm32/precomp.h | 2 +-
3 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/dll/win32/imm32/ime.c b/dll/win32/imm32/ime.c
index 61113b6d83f..9afaa66b8d1 100644
--- a/dll/win32/imm32/ime.c
+++ b/dll/win32/imm32/ime.c
@@ -6,27 +6,27 @@
* Copyright 2002, 2003, 2007 CodeWeavers, Aric Stewart
* Copyright 2017 James Tabor <james.tabor(a)reactos.org>
* Copyright 2018 Amine Khaldi <amine.khaldi(a)reactos.org>
- * Copyright 2020-2021 Katayama Hirofumi MZ
<katayama.hirofumi.mz(a)gmail.com>
+ * Copyright 2020-2022 Katayama Hirofumi MZ
<katayama.hirofumi.mz(a)gmail.com>
*/
#include "precomp.h"
WINE_DEFAULT_DEBUG_CHANNEL(imm);
-RTL_CRITICAL_SECTION g_csImeDpi;
+RTL_CRITICAL_SECTION gcsImeDpi; // Win: gcsImeDpi
PIMEDPI g_pImeDpiList = NULL;
PIMEDPI APIENTRY Imm32FindImeDpi(HKL hKL)
{
PIMEDPI pImeDpi;
- RtlEnterCriticalSection(&g_csImeDpi);
+ RtlEnterCriticalSection(&gcsImeDpi);
for (pImeDpi = g_pImeDpiList; pImeDpi != NULL; pImeDpi = pImeDpi->pNext)
{
if (pImeDpi->hKL == hKL)
break;
}
- RtlLeaveCriticalSection(&g_csImeDpi);
+ RtlLeaveCriticalSection(&gcsImeDpi);
return pImeDpi;
}
@@ -247,7 +247,7 @@ PIMEDPI APIENTRY Ime32LoadImeDpi(HKL hKL, BOOL bLock)
return FALSE;
}
- RtlEnterCriticalSection(&g_csImeDpi);
+ RtlEnterCriticalSection(&gcsImeDpi);
pImeDpiFound = Imm32FindImeDpi(hKL);
if (pImeDpiFound)
@@ -255,7 +255,7 @@ PIMEDPI APIENTRY Ime32LoadImeDpi(HKL hKL, BOOL bLock)
if (!bLock)
pImeDpiFound->dwFlags &= ~IMEDPI_FLAG_LOCKED;
- RtlLeaveCriticalSection(&g_csImeDpi);
+ RtlLeaveCriticalSection(&gcsImeDpi);
Imm32FreeImeDpi(pImeDpiNew, FALSE);
ImmLocalFree(pImeDpiNew);
@@ -272,7 +272,7 @@ PIMEDPI APIENTRY Ime32LoadImeDpi(HKL hKL, BOOL bLock)
pImeDpiNew->pNext = g_pImeDpiList;
g_pImeDpiList = pImeDpiNew;
- RtlLeaveCriticalSection(&g_csImeDpi);
+ RtlLeaveCriticalSection(&gcsImeDpi);
return pImeDpiNew;
}
}
@@ -308,7 +308,7 @@ BOOL APIENTRY Imm32ReleaseIME(HKL hKL)
BOOL ret = TRUE;
PIMEDPI pImeDpi0, pImeDpi1;
- RtlEnterCriticalSection(&g_csImeDpi);
+ RtlEnterCriticalSection(&gcsImeDpi);
for (pImeDpi0 = g_pImeDpiList; pImeDpi0; pImeDpi0 = pImeDpi0->pNext)
{
@@ -346,7 +346,7 @@ BOOL APIENTRY Imm32ReleaseIME(HKL hKL)
ImmLocalFree(pImeDpi0);
Quit:
- RtlLeaveCriticalSection(&g_csImeDpi);
+ RtlLeaveCriticalSection(&gcsImeDpi);
return ret;
}
@@ -726,7 +726,7 @@ PIMEDPI WINAPI ImmLockImeDpi(HKL hKL)
TRACE("(%p)\n", hKL);
- RtlEnterCriticalSection(&g_csImeDpi);
+ RtlEnterCriticalSection(&gcsImeDpi);
/* Find by hKL */
for (pImeDpi = g_pImeDpiList; pImeDpi; pImeDpi = pImeDpi->pNext)
@@ -742,7 +742,7 @@ PIMEDPI WINAPI ImmLockImeDpi(HKL hKL)
}
}
- RtlLeaveCriticalSection(&g_csImeDpi);
+ RtlLeaveCriticalSection(&gcsImeDpi);
return pImeDpi;
}
@@ -758,13 +758,13 @@ VOID WINAPI ImmUnlockImeDpi(PIMEDPI pImeDpi)
if (pImeDpi == NULL)
return;
- RtlEnterCriticalSection(&g_csImeDpi);
+ RtlEnterCriticalSection(&gcsImeDpi);
/* unlock */
--(pImeDpi->cLockObj);
if (pImeDpi->cLockObj != 0)
{
- RtlLeaveCriticalSection(&g_csImeDpi);
+ RtlLeaveCriticalSection(&gcsImeDpi);
return;
}
@@ -773,7 +773,7 @@ VOID WINAPI ImmUnlockImeDpi(PIMEDPI pImeDpi)
if ((pImeDpi->dwFlags & IMEDPI_FLAG_LOCKED) == 0 ||
(pImeDpi->ImeInfo.fdwProperty & IME_PROP_END_UNLOAD) == 0)
{
- RtlLeaveCriticalSection(&g_csImeDpi);
+ RtlLeaveCriticalSection(&gcsImeDpi);
return;
}
}
@@ -791,7 +791,7 @@ VOID WINAPI ImmUnlockImeDpi(PIMEDPI pImeDpi)
Imm32FreeImeDpi(pImeDpi, TRUE);
ImmLocalFree(pImeDpi);
- RtlLeaveCriticalSection(&g_csImeDpi);
+ RtlLeaveCriticalSection(&gcsImeDpi);
}
/***********************************************************************
diff --git a/dll/win32/imm32/imm.c b/dll/win32/imm32/imm.c
index 4b6b72433f3..c5544580dda 100644
--- a/dll/win32/imm32/imm.c
+++ b/dll/win32/imm32/imm.c
@@ -29,7 +29,7 @@ static BOOL APIENTRY ImmInitializeGlobals(HMODULE hMod)
if (g_bClientRegd)
return TRUE;
- status = RtlInitializeCriticalSection(&g_csImeDpi);
+ status = RtlInitializeCriticalSection(&gcsImeDpi);
if (NT_ERROR(status))
return FALSE;
@@ -159,14 +159,14 @@ BOOL WINAPI ImmFreeLayout(DWORD dwUnknown)
}
else if (dwUnknown == 2)
{
- RtlEnterCriticalSection(&g_csImeDpi);
+ RtlEnterCriticalSection(&gcsImeDpi);
Retry:
for (pImeDpi = g_pImeDpiList; pImeDpi; pImeDpi = pImeDpi->pNext)
{
if (Imm32ReleaseIME(pImeDpi->hKL))
goto Retry;
}
- RtlLeaveCriticalSection(&g_csImeDpi);
+ RtlLeaveCriticalSection(&gcsImeDpi);
}
else
{
@@ -1291,7 +1291,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID
lpReserved)
break;
case DLL_PROCESS_DETACH:
- RtlDeleteCriticalSection(&g_csImeDpi);
+ RtlDeleteCriticalSection(&gcsImeDpi);
TRACE("imm32.dll is unloaded\n");
break;
}
diff --git a/dll/win32/imm32/precomp.h b/dll/win32/imm32/precomp.h
index e2131bcf4e4..4ddcd216e53 100644
--- a/dll/win32/imm32/precomp.h
+++ b/dll/win32/imm32/precomp.h
@@ -70,7 +70,7 @@ typedef struct REG_IME
} REG_IME, *PREG_IME;
extern HMODULE g_hImm32Inst;
-extern RTL_CRITICAL_SECTION g_csImeDpi;
+extern RTL_CRITICAL_SECTION gcsImeDpi;
extern PIMEDPI g_pImeDpiList;
extern PSERVERINFO gpsi;
extern SHAREDINFO gSharedInfo;