Michael Stefaniuc : mlang: Use wide-char string literals.
Alexandre Julliard
julliard at winehq.org
Mon Oct 5 15:54:57 CDT 2020
Module: wine
Branch: master
Commit: 250e6d9f8c417341e498ba35ad7938ec93d21a21
URL: https://source.winehq.org/git/wine.git/?a=commit;h=250e6d9f8c417341e498ba35ad7938ec93d21a21
Author: Michael Stefaniuc <mstefani at winehq.org>
Date: Sat Oct 3 20:28:19 2020 +0200
mlang: Use wide-char string literals.
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mlang/mlang.c | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/dlls/mlang/mlang.c b/dlls/mlang/mlang.c
index e3582cca2d..62e9947fb7 100644
--- a/dlls/mlang/mlang.c
+++ b/dlls/mlang/mlang.c
@@ -392,8 +392,6 @@ static const MIME_CP_INFO vietnamese_cp[] =
"windows-1258", "windows-1258", "windows-1258" }
};
-static const WCHAR asciiW[] = {'a','s','c','i','i',0};
-
static const MIME_CP_INFO western_cp[] =
{
{ "IBM EBCDIC (US-Canada)",
@@ -446,7 +444,7 @@ static const MIME_CP_INFO western_cp[] =
20127, MIMECONTF_MAILNEWS | MIMECONTF_IMPORT | MIMECONTF_EXPORT |
MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_VALID |
MIMECONTF_VALID_NLS | MIMECONTF_MIME_LATEST,
- "us-ascii", "us-ascii", "us-ascii", asciiW },
+ "us-ascii", "us-ascii", "us-ascii", L"ascii" },
{ "Western European (ISO)",
28591, MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_IMPORT |
MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER |
@@ -3934,14 +3932,7 @@ static BOOL register_codepages(void)
WCHAR buf[32];
LSTATUS status;
- static const WCHAR db_key_nameW[] = {
- 'M','I','M','E',
- '\\','D','a','t','a','b','a','s','e',
- '\\','C','o','d','e','p','a','g','e',0};
- static const WCHAR familyW[] = {'F','a','m','i','l','y',0};
- static const WCHAR formatW[] = {'%','u',0};
-
- status = RegCreateKeyW(HKEY_CLASSES_ROOT, db_key_nameW, &db_key);
+ status = RegCreateKeyW(HKEY_CLASSES_ROOT, L"MIME\\Database\\Codepage", &db_key);
if (status != ERROR_SUCCESS)
return FALSE;
@@ -3949,7 +3940,7 @@ static BOOL register_codepages(void)
{
for (info = family->mime_cp_info; info < family->mime_cp_info + family->number_of_cp; info++)
{
- swprintf(buf, ARRAY_SIZE(buf), formatW, info->cp);
+ swprintf(buf, ARRAY_SIZE(buf), L"%u", info->cp);
status = RegCreateKeyW(db_key, buf, &key);
if (status != ERROR_SUCCESS)
continue;
@@ -3966,7 +3957,7 @@ static BOOL register_codepages(void)
}
else
{
- RegSetValueExW(key, familyW, 0, REG_DWORD, (BYTE*)&family->family_codepage,
+ RegSetValueExW(key, L"Family", 0, REG_DWORD, (BYTE*)&family->family_codepage,
sizeof(family->family_codepage));
}
More information about the wine-cvs
mailing list