Commit Graph

671 Commits

Author SHA1 Message Date
Alexandre Julliard e81327358a kernelbase: Move codepage initialization to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-13 16:08:30 +02:00
Alexandre Julliard d53bc38d34 ntdll: Initialize the system locale on the Unix side.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-13 16:03:14 +02:00
Zebediah Figura 351fa352f6 kernelbase: Set user_lcid to the user locale, not the system locale.
Fixes: fffbe3fcae
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-13 10:42:59 +02:00
Eric Pouech eff83cd4e0 kernelbase: Provide a pseudo console environment for initial CUI processes not tied to a Unix tty.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52771
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52761
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52743
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-12 21:39:42 +02:00
Jacek Caban b4d91adb16 kernelbase: Add support for CREATE_NO_WINDOW flag in CreateProcess.
Based on patches by Eric Pouech and Torge Matthies.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-12 21:39:42 +02:00
Paul Gofman 02faaea93b kernelbase: Reset last error on success in CopyFileExW().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-11 21:15:56 +02:00
Alexandre Julliard 1790546d03 kernelbase: Support UTF-8 as default Ansi codepage in WideCharToMultiByte().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-11 17:34:48 +02:00
Alexandre Julliard 2cc54d4b85 kernelbase: Support UTF-8 as default Ansi codepage in MultiByteToWideChar().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-11 17:34:48 +02:00
Alexandre Julliard 8993e15cfa kernelbase: Support UTF-7/8 codepages in get_codepage_table().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-11 17:34:48 +02:00
Alexandre Julliard fd2ecee06f kernelbase: Avoid redundant locale lookups in GetLocaleInfoA().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-11 17:34:48 +02:00
Alexandre Julliard 23834ee3b8 kernelbase: Use RtlMultiByteToUnicodeN in IsChar* functions.
In case the Ansi codepage was set to UTF-8.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-11 17:34:48 +02:00
Alexandre Julliard 4d68497fac kernelbase: Reimplement Internal_EnumDateFormats() using the locale.nls data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-07 22:44:39 +02:00
Alexandre Julliard 25595a0abe kernelbase: Reimplement Internal_EnumTimeFormats() using the locale.nls data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-07 22:44:39 +02:00
Alexandre Julliard 8576c3e131 kernelbase: Reimplement Internal_EnumCalendarInfo() using the locale.nls data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-07 22:44:39 +02:00
Alexandre Julliard 6517f6c239 kernelbase: Implement NlsValidateLocale().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-07 22:44:39 +02:00
Alexandre Julliard 812ebc67a4 kernelbase: Fix IsValidLocale() and GetLocaleInfo() with special LOCALE_* identifiers.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-07 22:44:39 +02:00
Alexandre Julliard a074d0c3a8 kernelbase: Reimplement GetCalendarInfoEx/W using the locale.nls data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-05 16:59:09 +02:00
Rémi Bernon dee510bd32 kernelbase: Use the same HLOCAL flags / lock layout as native.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-04 18:40:26 +02:00
Rémi Bernon 4f596c04be kernelbase: Remove unnecessary handler from LocalUnlock.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-04 18:40:26 +02:00
Rémi Bernon e358731f96 kernelbase: Remove unnecessary handler from LocalLock.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-04 18:40:26 +02:00
Rémi Bernon 2fcb072f03 kernelbase: Use the same HLOCAL entry pointer alignment as native.
This changes the GlobalUnlock todo_wine as we previously considered the
invalid mem handle as a valid pointer, and we now instead check handle
validity.

Returning TRUE in for an invalid handle doesn't seem very important, and
a corner case, and it breaks compatibility and imm32 tests.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-04 18:40:26 +02:00
Alexandre Julliard c30626505b kernelbase: Check the locale name instead of the LCID to detect changes.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-01 20:30:57 +02:00
Alexandre Julliard c0ff1a221b kernelbase: Set system/user locales by name if they have no LCID.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-01 20:30:57 +02:00
Rémi Bernon 3c9d2cbaea kernelbase: Allocate HLOCAL / HGLOBAL from a static handle table.
Sharing the table pointers through KernelBaseGetGlobalData to check for
handle validity in kernel32, and as native does it.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-31 22:02:51 +02:00
Rémi Bernon 981283a50b kernelbase: Implement internal KernelBaseGetGlobalData.
And call it from kernel32 to get access to kernelbase global data.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-31 22:02:51 +02:00
Rémi Bernon 82bab8366d kernelbase: Check pointer validity in unsafe_ptr_from_HLOCAL.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-31 21:25:44 +02:00
Rémi Bernon 458f49dee1 kernelbase: Check handle validity in unsafe_mem_from_HLOCAL.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-31 21:25:39 +02:00
Alexandre Julliard 689e63485c kernel32: Move the error message table to kernelbase.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-31 10:57:07 +02:00
Alexandre Julliard 6d06171485 kernel32: Move the language group resources to kernelbase.
And enable translating them through the po files.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-31 10:57:07 +02:00
Alexandre Julliard 86baeafc76 kernelbase: Reimplement the Geo ID functions using the locale.nls data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-31 07:46:13 +02:00
Alexandre Julliard c0fda77fe2 kernelbase: Remove the old GetLocaleInfoEx/W implementation.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-30 11:03:37 +02:00
Alexandre Julliard 78a33f9684 kernelbase: Reimplement SetLocaleInfoW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-30 11:03:37 +02:00
Alexandre Julliard 5014a44e3c kernelbase: Reimplement updating the locale values in the registry on locale change.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-30 11:03:37 +02:00
Alexandre Julliard 1398a01064 kernelbase: Reimplement fetching customized values from the registry in GetLocaleInfoW/Ex.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-29 22:12:49 +02:00
Alexandre Julliard 781086670d kernelbase: Reimplement values computed from date/time formats in GetLocaleInfoW/Ex.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-29 22:12:49 +02:00
Alexandre Julliard c957158730 kernelbase: Reimplement values computed from currency formats in GetLocaleInfoW/Ex.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-29 22:12:49 +02:00
Alexandre Julliard 08a9dc5031 kernelbase: Reimplement misc locale info values in GetLocaleInfoW/Ex using the locale.nls data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-29 22:12:49 +02:00
Alexandre Julliard 07cbbdeaaa kernelbase: Reimplement currency formatting values in GetLocaleInfoW/Ex using the locale.nls data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-29 22:12:49 +02:00
Alexandre Julliard ba43e4cfca kernelbase: Reimplement number formatting values in GetLocaleInfoW/Ex using the locale.nls data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-29 22:12:49 +02:00
Rémi Bernon 4ba774d85e kernelbase: Make (Global|Local)* traces and identifiers more consistent.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-29 20:53:50 +02:00
Rémi Bernon 424e38f3f8 kernelbase: Fix indentation of LocalReAlloc.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-29 20:53:50 +02:00
Alexandre Julliard 6549f1f3d2 kernelbase: Reimplement LOCALE_SSORTNAME in GetLocaleInfoW/Ex.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-29 20:53:50 +02:00
Alexandre Julliard d39c6851d3 kernelbase: Reimplement LOCALE_FONTSIGNATURE/SOPENTYPELANGUAGETAG in GetLocaleInfoW/Ex using the locale.nls data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-29 20:35:51 +02:00
Alexandre Julliard 712e4757c6 kernelbase: Reimplement misc format values in GetLocaleInfoW/Ex using the locale.nls data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-29 20:35:23 +02:00
Alexandre Julliard 00fd05d447 kernelbase: Reimplement calendar options in GetLocaleInfoW/Ex using the locale.nls data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-29 20:35:23 +02:00
Alexandre Julliard 30e8a28c3d kernelbase: Reimplement date/time format strings in GetLocaleInfoW/Ex using the locale.nls data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-29 20:35:23 +02:00
Alexandre Julliard ec5d3c9fe7 kernelbase: Reimplement LOCALE_SNATIVEDIGITS in GetLocaleInfoW/Ex using the locale.nls data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-29 20:35:23 +02:00
Alexandre Julliard f0d43939ff kernelbase: Reimplement LOCALE_ICOUNTRY/IGEOID in GetLocaleInfoW/Ex using the locale.nls data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-29 08:38:37 +02:00
Alexandre Julliard 62cd33e6b0 kernelbase: Reimplement LOCALE_*CURRNAME/CURRENCY in GetLocaleInfoW/Ex using the locale.nls data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-29 08:36:41 +02:00
Alexandre Julliard 37278557dd kernelbase: Reimplement LOCALE_*AM/PM in GetLocaleInfoW/Ex using the locale.nls data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-29 08:36:35 +02:00