ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
April 2017
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
14 participants
179 discussions
Start a n
N
ew thread
[hbelusca] 74416: [CMD]: Improvements for the CHCP command. - Display the informative CP-change message on stdout, using the *output* code page (and not the input CP); - Correctly update the local ...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Wed Apr 26 22:29:07 2017 New Revision: 74416 URL:
http://svn.reactos.org/svn/reactos?rev=74416&view=rev
Log: [CMD]: Improvements for the CHCP command. - Display the informative CP-change message on stdout, using the *output* code page (and not the input CP); - Correctly update the local codepage cache; - Display the informative CP-change message when the CP change succeeded; - Add source comments + informative TODO for what remains to be done. Modified: trunk/reactos/base/shell/cmd/chcp.c Modified: trunk/reactos/base/shell/cmd/chcp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/chcp.c?rev=…
============================================================================== --- trunk/reactos/base/shell/cmd/chcp.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/cmd/chcp.c [iso-8859-1] Wed Apr 26 22:29:07 2017 @@ -15,14 +15,14 @@ #ifdef INCLUDE_CMD_CHCP -INT CommandChcp (LPTSTR param) +INT CommandChcp(LPTSTR param) { LPTSTR *arg; INT args; UINT uNewCodePage; - /* print help */ - if (!_tcsncmp (param, _T("/?"), 2)) + /* Print help */ + if (!_tcsncmp(param, _T("/?"), 2)) { ConOutResPaging(TRUE,STRING_CHCP_HELP); return 0; @@ -30,23 +30,23 @@ nErrorLevel = 0; - /* get parameters */ - arg = split (param, &args, FALSE, FALSE); + /* Get parameters */ + arg = split(param, &args, FALSE, FALSE); if (args == 0) { - /* display active code page number */ - ConErrResPrintf(STRING_CHCP_ERROR1, InputCodePage); - freep (arg); + /* Display the active code page number */ + ConOutResPrintf(STRING_CHCP_ERROR1, OutputCodePage); + freep(arg); return 0; } if (args >= 2) { - /* too many parameters */ + /* Too many parameters */ ConErrResPrintf(STRING_ERROR_INVALID_PARAM_FORMAT, param); + freep(arg); nErrorLevel = 1; - freep (arg); return 1; } @@ -55,24 +55,38 @@ if (uNewCodePage == 0) { ConErrResPrintf(STRING_ERROR_INVALID_PARAM_FORMAT, arg[0]); - freep (arg); + freep(arg); nErrorLevel = 1; return 1; } + freep(arg); + + // TODO: In case of failure of SetConsoleCP or SetConsoleOutputCP, + // restore the old code page! + + /* + * Try changing the console input codepage. If it works then also change + * the console output codepage, and refresh our local codepage cache. + */ if (!SetConsoleCP(uNewCodePage)) { ConErrResPuts(STRING_CHCP_ERROR4); } else { + SetConsoleOutputCP(uNewCodePage); - SetConsoleOutputCP (uNewCodePage); - InitLocale (); - InputCodePage= GetConsoleCP(); + /* Update our local codepage cache */ + InputCodePage = GetConsoleCP(); + OutputCodePage = GetConsoleOutputCP(); + + InitLocale(); + + /* Display the active code page number */ + ConOutResPrintf(STRING_CHCP_ERROR1, OutputCodePage); } - freep (arg); return 0; }
7 years, 8 months
1
0
0
0
[ekohl] 74415: [BOOTDATA] Make the timezone names translatable. CORE-11855
by ekohl@svn.reactos.org
Author: ekohl Date: Wed Apr 26 21:21:02 2017 New Revision: 74415 URL:
http://svn.reactos.org/svn/reactos?rev=74415&view=rev
Log: [BOOTDATA] Make the timezone names translatable. CORE-11855 Modified: trunk/reactos/boot/bootdata/hivesft.inf [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/boot/bootdata/hivesft.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivesft.inf?…
7 years, 8 months
1
0
0
0
[hbelusca] 74414: [KERNEL32]: Add/update localized codepage display names. - Slightly update the description of CP 28599; - Add descriptions for CPs 28600, 28603, 28604 and 28606; - Add CP 856 "OEM...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Wed Apr 26 20:31:54 2017 New Revision: 74414 URL:
http://svn.reactos.org/svn/reactos?rev=74414&view=rev
Log: [KERNEL32]: Add/update localized codepage display names. - Slightly update the description of CP 28599; - Add descriptions for CPs 28600, 28603, 28604 and 28606; - Add CP 856 "OEM - Hebrew PC" (which differs from OEM Hebrew CP 862). Note that while we also have codepages 424, 878 and 1006, I don't add their description because: - CP 424 is actually CP 20424 "IBM EBCDIC - Hebrew" on Windows (documented in the resource files); - CP 878 is actually CP 20866 "Russian - KOI8" on Windows (documented in the resource files); - CP 1006 seems to be "IBM Arabic" according to Wine, but I don't know its corresponding number on Windows. Modified: trunk/reactos/dll/win32/kernel32/winnls/lang/cs-CZ.rc trunk/reactos/dll/win32/kernel32/winnls/lang/de-DE.rc trunk/reactos/dll/win32/kernel32/winnls/lang/en-US.rc trunk/reactos/dll/win32/kernel32/winnls/lang/es-ES.rc trunk/reactos/dll/win32/kernel32/winnls/lang/fr-FR.rc trunk/reactos/dll/win32/kernel32/winnls/lang/it-IT.rc trunk/reactos/dll/win32/kernel32/winnls/lang/ro-RO.rc trunk/reactos/dll/win32/kernel32/winnls/lang/ru-RU.rc trunk/reactos/dll/win32/kernel32/winnls/lang/sq-AL.rc trunk/reactos/dll/win32/kernel32/winnls/lang/tr-TR.rc trunk/reactos/dll/win32/kernel32/winnls/lang/uk-UA.rc trunk/reactos/dll/win32/kernel32/winnls/lang/zh-CN.rc Modified: trunk/reactos/dll/win32/kernel32/winnls/lang/cs-CZ.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/winnls/lang/cs-CZ.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/winnls/lang/cs-CZ.rc [iso-8859-1] Wed Apr 26 20:31:54 2017 @@ -24,6 +24,7 @@ 850 "850 (OEM - vÃcejazyÄná latin I)" 852 "852 (OEM - latin II)" 855 "855 (OEM - azbuka)" + 856 "856 (OEM - hebrejÅ¡tina PC)" 857 "857 (OEM - tureÄtina)" 858 "858 (OEM - vÃcejazyÄná Latin I + Euro)" 860 "860 (OEM - portugalÅ¡tina)" @@ -33,7 +34,7 @@ 864 "864 (OEM - arabÅ¡tina)" 865 "865 (OEM - severské jazyky)" 866 "866 (OEM - ruÅ¡tina)" - 869 "869 (OEM - modernà ÅeÄtina )" + 869 "869 (OEM - modernà ÅeÄtina)" 10000 "10000 (MAC - románské jazyky)" 10001 "10001 (MAC - japonÅ¡tina)" @@ -56,6 +57,7 @@ 65001 "65001 (UTF-8)" 3700 "37 (IBM EBCDIC - U.S.A./Kanada)" /* FIXME */ +// 424 "424 (IBM EBCDIC - hebrejÅ¡tina)" // On Windows, this is CP 20424 1026 "1026 (IBM EBCDIC - tureÄtina (latin-5))" 1047 "1047 (IBM EBCDIC - latin-1/Open System)" 1140 "1140 (IBM EBCDIC - U.S.A/Kanada (37 + Euro))" @@ -99,8 +101,12 @@ 28596 "28596 (ISO 8859-6 arabÅ¡tina)" 28597 "28597 (ISO 8859-7 Åecko)" 28598 "28598 (ISO 8859-8 hebrejÅ¡tina: vizuálnà ÅazenÃ)" - 28599 "28599 (ISO 8859-9 latin 5)" + 28599 "28599 (ISO 8859-9 latin 5 tureÄtina)" + 28600 "28600 (ISO 8859-10 latin 6 severské jazyky)" + 28603 "28603 (ISO 8859-13 latin 7 Estonian)" + 28604 "28604 (ISO 8859-14 latin 8 Celtic)" 28605 "28605 (ISO 8859-15 latin 9)" + 28606 "28606 (ISO 8859-16 latin 10 Balkan)" 38598 "38598 (ISO 8859-8 hebrejÅ¡tina: logické ÅazenÃ)" 20105 "20105 (IA5 IRV mezinárodnà abeceda No.5)" @@ -117,6 +123,7 @@ 20005 "20005 (Wang - Tchaj-wan)" 20127 "20127 (US-ASCII)" 20261 "20261 (T.61)" +// 878 "878 (ruÅ¡tina - KOI8)" // On Windows, this is CP 20866 20866 "20866 (ruÅ¡tina - KOI8)" 21027 "21027 (rozÅ¡ÃÅená Alfa - malá pÃsmena)" 21866 "21866 (ukrajinÅ¡tina - KOI8-U)" Modified: trunk/reactos/dll/win32/kernel32/winnls/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/winnls/lang/de-DE.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/winnls/lang/de-DE.rc [iso-8859-1] Wed Apr 26 20:31:54 2017 @@ -24,6 +24,7 @@ 850 "850 (OEM - Westeuropäisch)" 852 "852 (OEM - Mitteleuropäisch)" 855 "855 (OEM - Kyrillisch)" + 856 "856 (OEM - Hebräisch PC)" 857 "857 (OEM - Türkisch)" 858 "858 (OEM - Multilingual Lateinisch 1)" 860 "860 (OEM - Portugiesisch)" @@ -56,6 +57,7 @@ 65001 "65001 (Unicode (UTF-8))" 3700 "37 (IBM EBCDIC - USA-Kanada)" /* FIXME */ +// 424 "424 (IBM EBCDIC - Hebräisch)" // On Windows, this is CP 20424 1026 "1026 (IBM EBCDIC - Türkisch, Lateinisch-5)" 1047 "1047 (IBM EBCDIC - Lateinisch-1)" 1140 "1140 (IBM EBCDIC - USA-Kanada-Europäisch)" @@ -90,7 +92,7 @@ 870 "870 (IBM EBCDIC - Multilingual Lateinisch-2)" 875 "875 (IBM EBCDIC - Griechisch, modern)" - 20269 "20269 (ISO 6937)" + 20269 "20269 (ISO 6937 Non-Spacing Accent)" 28591 "28591 (ISO 8859-1 Westeuropäisch)" 28592 "28592 (ISO 8859-2 Mitteleuropäisch)" 28593 "28593 (ISO 8859-3 Lateinisch 3)" @@ -99,8 +101,12 @@ 28596 "28596 (ISO 8859-6 Arabisch)" 28597 "28597 (ISO 8859-7 Griechisch)" 28598 "28598 (ISO 8859-8 Hebräisch (Visual))" - 28599 "28599 (ISO 8859-9 Türkisch)" + 28599 "28599 (ISO 8859-9 Lateinisch 5 Türkisch)" + 28600 "28600 (ISO 8859-10 Lateinisch 6 Nordisch)" + 28603 "28603 (ISO 8859-13 Lateinisch 7 Estonian)" + 28604 "28604 (ISO 8859-14 Lateinisch 8 Celtic)" 28605 "28605 (ISO 8859-15 Lateinisch 9)" + 28606 "28606 (ISO 8859-16 Lateinisch 10 Balkan)" 38598 "38598 (ISO 8859-8 Hebräisch (Logisch))" 20105 "20105 (IA5 Westeuropäisch)" @@ -117,6 +123,7 @@ 20005 "20005 (Wang - Taiwan)" 20127 "20127 (US-ASCII)" 20261 "20261 (T.61)" +// 878 "878 (Kyrillisch (KOI8-R))" // On Windows, this is CP 20866 20866 "20866 (Kyrillisch (KOI8-R))" 21027 "21027 (Ext Alpha Lowercase)" 21866 "21866 (Kyrillisch (KOI8-U))" Modified: trunk/reactos/dll/win32/kernel32/winnls/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/winnls/lang/en-US.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/winnls/lang/en-US.rc [iso-8859-1] Wed Apr 26 20:31:54 2017 @@ -24,6 +24,7 @@ 850 "850 (OEM - Multilingual Latin I)" 852 "852 (OEM - Latin II)" 855 "855 (OEM - Cyrillic)" + 856 "856 (OEM - Hebrew PC)" 857 "857 (OEM - Turkish)" 858 "858 (OEM - Multilingual Latin I + Euro)" 860 "860 (OEM - Portuguese)" @@ -56,6 +57,7 @@ 65001 "65001 (UTF-8)" 3700 "37 (IBM EBCDIC - U.S./Canada)" /* FIXME */ +// 424 "424 (IBM EBCDIC - Hebrew)" // On Windows, this is CP 20424 1026 "1026 (IBM EBCDIC - Turkish (Latin-5))" 1047 "1047 (IBM EBCDIC - Latin-1/Open System)" 1140 "1140 (IBM EBCDIC - U.S./Canada (37 + Euro))" @@ -99,8 +101,12 @@ 28596 "28596 (ISO 8859-6 Arabic)" 28597 "28597 (ISO 8859-7 Greek)" 28598 "28598 (ISO 8859-8 Hebrew: Visual Ordering)" - 28599 "28599 (ISO 8859-9 Latin 5)" + 28599 "28599 (ISO 8859-9 Latin 5 Turkish)" + 28600 "28600 (ISO 8859-10 Latin 6 Nordic)" + 28603 "28603 (ISO 8859-13 Latin 7 Estonian)" + 28604 "28604 (ISO 8859-14 Latin 8 Celtic)" 28605 "28605 (ISO 8859-15 Latin 9)" + 28606 "28606 (ISO 8859-16 Latin 10 Balkan)" 38598 "38598 (ISO 8859-8 Hebrew: Logical Ordering)" 20105 "20105 (IA5 IRV International Alphabet No.5)" @@ -117,6 +123,7 @@ 20005 "20005 (Wang - Taiwan)" 20127 "20127 (US-ASCII)" 20261 "20261 (T.61)" +// 878 "878 (Russian - KOI8)" // On Windows, this is CP 20866 20866 "20866 (Russian - KOI8)" 21027 "21027 (Ext Alpha Lowercase)" 21866 "21866 (Ukrainian - KOI8-U)" Modified: trunk/reactos/dll/win32/kernel32/winnls/lang/es-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/winnls/lang/es-ES.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/winnls/lang/es-ES.rc [iso-8859-1] Wed Apr 26 20:31:54 2017 @@ -24,6 +24,7 @@ 850 "850 (OEM - LatÃn I multilÃngüe)" 852 "852 (OEM - LatÃn II)" 855 "855 (OEM - CirÃlico)" + 856 "856 (OEM - Hebreo PC)" 857 "857 (OEM - Turco)" 858 "858 (OEM - LatÃn I multilÃngüe + Euro)" 860 "860 (OEM - Portugués)" @@ -56,6 +57,7 @@ 65001 "65001 (UTF-8)" 3700 "37 (IBM EBCDIC - E.E.U.U y Canadá)" /* FIXME */ +// 424 "424 (IBM EBCDIC - Hebreo)" // On Windows, this is CP 20424 1026 "1026 (IBM EBCDIC - TurquÃa (Latin-5))" 1047 "1047 (IBM EBCDIC - Latin-1 y sistema abierto)" 1140 "1140 (IBM EBCDIC - E.E.U.U/Canadá (37 + Euro))" @@ -99,8 +101,12 @@ 28596 "28596 (ISO 8859-6 Ãrabe)" 28597 "28597 (ISO 8859-7 Griego)" 28598 "28598 (ISO 8859-8 Hebreo: orden visual)" - 28599 "28599 (ISO 8859-9 LatÃn 5)" + 28599 "28599 (ISO 8859-9 LatÃn 5 Turco)" + 28600 "28600 (ISO 8859-10 LatÃn 6 Nórdico)" + 28603 "28603 (ISO 8859-13 LatÃn 7 Estonian)" + 28604 "28604 (ISO 8859-14 LatÃn 8 Celtic)" 28605 "28605 (ISO 8859-15 LatÃn 9)" + 28606 "28606 (ISO 8859-16 LatÃn 10 Balkan)" 38598 "38598 (ISO 8859-8 Hebreo: orden lógico)" 20105 "20105 (IA5 IRV Alfabeto international No.5)" @@ -117,6 +123,7 @@ 20005 "20005 (Wang - Taiwán)" 20127 "20127 (E.E.U.U.-ASCII)" 20261 "20261 (T.61)" +// 878 "878 (Ruso - KOI8)" // On Windows, this is CP 20866 20866 "20866 (Ruso - KOI8)" 21027 "21027 (Alfabeto extendido minúsculas)" 21866 "21866 (Ucraniano - KOI8-U)" Modified: trunk/reactos/dll/win32/kernel32/winnls/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/winnls/lang/fr-FR.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/winnls/lang/fr-FR.rc [iso-8859-1] Wed Apr 26 20:31:54 2017 @@ -24,6 +24,7 @@ 850 "850 (OEM - Multilingual Latin I)" 852 "852 (OEM - Latin II)" 855 "855 (OEM - Cyrillic)" + 856 "856 (OEM - Hebrew PC)" 857 "857 (OEM - Turkish)" 858 "858 (OEM - Multilingual Latin I + Euro)" 860 "860 (OEM - Portuguese)" @@ -56,6 +57,7 @@ 65001 "65001 (UTF-8)" 3700 "37 (IBM EBCDIC - U.S./Canada)" /* FIXME */ +// 424 "424 (IBM EBCDIC - Hebrew)" // On Windows, this is CP 20424 1026 "1026 (IBM EBCDIC - Turkish (Latin-5))" 1047 "1047 (IBM EBCDIC - Latin-1/Open System)" 1140 "1140 (IBM EBCDIC - U.S./Canada (37 + Euro))" @@ -99,8 +101,12 @@ 28596 "28596 (ISO 8859-6 Arabic)" 28597 "28597 (ISO 8859-7 Greek)" 28598 "28598 (ISO 8859-8 Hebrew: Visual Ordering)" - 28599 "28599 (ISO 8859-9 Latin 5)" + 28599 "28599 (ISO 8859-9 Latin 5 Turkish)" + 28600 "28600 (ISO 8859-10 Latin 6 Nordic)" + 28603 "28603 (ISO 8859-13 Latin 7 Estonian)" + 28604 "28604 (ISO 8859-14 Latin 8 Celtic)" 28605 "28605 (ISO 8859-15 Latin 9)" + 28606 "28606 (ISO 8859-16 Latin 10 Balkan)" 38598 "38598 (ISO 8859-8 Hebrew: Logical Ordering)" 20105 "20105 (IA5 IRV International Alphabet No.5)" @@ -117,6 +123,7 @@ 20005 "20005 (Wang - Taiwan)" 20127 "20127 (US-ASCII)" 20261 "20261 (T.61)" +// 878 "878 (Russian - KOI8)" // On Windows, this is CP 20866 20866 "20866 (Russian - KOI8)" 21027 "21027 (Ext Alpha Lowercase)" 21866 "21866 (Ukrainian - KOI8-U)" Modified: trunk/reactos/dll/win32/kernel32/winnls/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/winnls/lang/it-IT.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/winnls/lang/it-IT.rc [iso-8859-1] Wed Apr 26 20:31:54 2017 @@ -24,6 +24,7 @@ 850 "850 (OEM - Multilingue Latino I)" 852 "852 (OEM - Latino II)" 855 "855 (OEM - Cirillico)" + 856 "856 (OEM - Ebraico PC)" 857 "857 (OEM - Turco)" 858 "858 (OEM - Multilingue Latino I + Euro)" 860 "860 (OEM - Portoghese)" @@ -56,6 +57,7 @@ 65001 "65001 (UTF-8)" 3700 "37 (IBM EBCDIC - Stati Uniti/Canada)" /* FIXME */ +// 424 "424 (IBM EBCDIC - Ebraico)" // On Windows, this is CP 20424 1026 "1026 (IBM EBCDIC - Turco (Latino-5))" 1047 "1047 (IBM EBCDIC - Latino-1/Sistema aperto)" 1140 "1140 (IBM EBCDIC - Stati Uniti/Canada (37 + Euro))" @@ -99,8 +101,12 @@ 28596 "28596 (ISO 8859-6 Arabo)" 28597 "28597 (ISO 8859-7 Greco)" 28598 "28598 (ISO 8859-8 Ebraico: Ordinamento Visivo)" - 28599 "28599 (ISO 8859-9 Latino 5)" + 28599 "28599 (ISO 8859-9 Latino 5 Turco)" + 28600 "28600 (ISO 8859-10 Latino 6 Nordic)" + 28603 "28603 (ISO 8859-13 Latino 7 Estonian)" + 28604 "28604 (ISO 8859-14 Latino 8 Celtic)" 28605 "28605 (ISO 8859-15 Latino 9)" + 28606 "28606 (ISO 8859-16 Latino 10 Balkan)" 38598 "38598 (ISO 8859-8 Ebraico: Ordinamento Logico)" 20105 "20105 (IA5 IRV Alfabeto Internazionale No.5)" @@ -117,6 +123,7 @@ 20005 "20005 (Wang - Taiwan)" 20127 "20127 (US-ASCII)" 20261 "20261 (T.61)" +// 878 "878 (Russo - KOI8)" // On Windows, this is CP 20866 20866 "20866 (Russo - KOI8)" 21027 "21027 (Ext Alpha minuscolo)" 21866 "21866 (Ucraino - KOI8-U)" Modified: trunk/reactos/dll/win32/kernel32/winnls/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/winnls/lang/ro-RO.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/winnls/lang/ro-RO.rc [iso-8859-1] Wed Apr 26 20:31:54 2017 @@ -26,6 +26,7 @@ 850 "850 (OEM - latin multilingv I)" 852 "852 (OEM - latin II)" 855 "855 (OEM - chirilic)" + 856 "856 (OEM - ebraic PC)" 857 "857 (OEM - turcesc)" 858 "858 (OEM - latin multilingv I + Euro)" 860 "860 (OEM - portughez)" @@ -58,6 +59,7 @@ 65001 "65001 (UTF-8)" 3700 "37 (IBM EBCDIC - SUA/canadian)" +// 424 "424 (IBM EBCDIC - ebraic)" // On Windows, this is CP 20424 1026 "1026 (IBM EBCDIC - turcesc (latin-5))" 1047 "1047 (IBM EBCDIC - latin-1/Open System)" 1140 "1140 (IBM EBCDIC - SUA/canadian (37 + Euro))" @@ -101,8 +103,12 @@ 28596 "28596 (ISO 8859-6 arab)" 28597 "28597 (ISO 8859-7 grecesc)" 28598 "28598 (ISO 8859-8 ebraic: ordonare vizualÄ)" - 28599 "28599 (ISO 8859-9 latin 5)" + 28599 "28599 (ISO 8859-9 latin 5 turcesc)" + 28600 "28600 (ISO 8859-10 latin 6 nordic)" + 28603 "28603 (ISO 8859-13 latin 7 Estonian)" + 28604 "28604 (ISO 8859-14 latin 8 Celtic)" 28605 "28605 (ISO 8859-15 latin 9)" + 28606 "28606 (ISO 8859-16 latin 10 Balkan)" 38598 "38598 (ISO 8859-8 ebraic: ordonare logicÄ)" 20105 "20105 (IA5 alfabetul internaÈional IRV Nr.5)" @@ -119,6 +125,7 @@ 20005 "20005 (Wang - taiwanez)" 20127 "20127 (SUA-ASCII)" 20261 "20261 (T.61)" +// 878 "878 (rusesc - KOI8)" // On Windows, this is CP 20866 20866 "20866 (rusesc - KOI8)" 21027 "21027 (alfab. extins minuscule)" 21866 "21866 (ucrainean - KOI8-U)" Modified: trunk/reactos/dll/win32/kernel32/winnls/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/winnls/lang/ru-RU.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/winnls/lang/ru-RU.rc [iso-8859-1] Wed Apr 26 20:31:54 2017 @@ -24,6 +24,7 @@ 850 "850 (OEM - многоÑзÑÑÐ½Ð°Ñ Ð»Ð°ÑиниÑа 1)" 852 "852 (OEM - лаÑиниÑа 2)" 855 "855 (OEM - киÑиллиÑа ÑÑадиÑионнаÑ)" + 856 "856 (OEM - ивÑÐ¸Ñ PC)" 857 "857 (OEM - ÑÑÑеÑкаÑ)" 858 "858 (OEM - многоÑзÑÑÐ½Ð°Ñ Ð»Ð°ÑиниÑа 1 + ÐвÑо)" 860 "860 (OEM - поÑÑÑгалÑÑкаÑ)" @@ -56,6 +57,7 @@ 65001 "65001 (UTF-8)" 3700 "37 (IBM EBCDIC - СШÐ/Ðанада)" /* FIXME */ +// 424 "424 (IBM EBCDIC - ивÑиÑ)" // On Windows, this is CP 20424 1026 "1026 (IBM EBCDIC - ÑÑÑеÑÐºÐ°Ñ (лаÑиниÑа-5))" 1047 "1047 (IBM EBCDIC - лаÑиниÑа 1/Open System)" 1140 "1140 (IBM EBCDIC - СШÐ/Ðанада (37 + евÑо))" @@ -99,8 +101,12 @@ 28596 "28596 (ISO 8859-6 аÑабÑкаÑ)" 28597 "28597 (ISO 8859-7 гÑеÑеÑкаÑ)" 28598 "28598 (ISO 8859-8 ивÑиÑ: визÑалÑÐ½Ð°Ñ ÑоÑÑиÑовка)" - 28599 "28599 (ISO 8859-9 лаÑиниÑа 5)" + 28599 "28599 (ISO 8859-9 лаÑиниÑа 5 ÑÑÑеÑкаÑ)" + 28600 "28600 (ISO 8859-10 лаÑиниÑа 6 ÑкандинавÑкаÑ)" + 28603 "28603 (ISO 8859-13 лаÑиниÑа 7 Estonian)" + 28604 "28604 (ISO 8859-14 лаÑиниÑа 8 Celtic)" 28605 "28605 (ISO 8859-15 лаÑиниÑа 9)" + 28606 "28606 (ISO 8859-16 лаÑиниÑа 10 Balkan)" 38598 "38598 (ISO 8859-8 ивÑиÑ: логиÑеÑÐºÐ°Ñ ÑоÑÑиÑовка)" 20105 "20105 (IA5 IRV междÑнаÑоднÑй алÑÐ°Ð²Ð¸Ñ â5)" @@ -117,6 +123,7 @@ 20005 "20005 (Wang - ÑайванÑÑкаÑ)" 20127 "20127 (СШÐ-ASCII)" 20261 "20261 (T.61)" +// 878 "878 (ÑÑÑÑÐºÐ°Ñ - ÐÐÐ8)" // On Windows, this is CP 20866 20866 "20866 (ÑÑÑÑÐºÐ°Ñ - ÐÐÐ8)" 21027 "21027 (ÑаÑÑ. алÑ. нижний ÑегиÑÑÑ)" 21866 "21866 (ÑкÑаинÑÐºÐ°Ñ - ÐÐÐ8-U)" Modified: trunk/reactos/dll/win32/kernel32/winnls/lang/sq-AL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/winnls/lang/sq-AL.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/winnls/lang/sq-AL.rc [iso-8859-1] Wed Apr 26 20:31:54 2017 @@ -24,6 +24,7 @@ 850 "850 (OEM - Shumegjuhe Latine I)" 852 "852 (OEM - Latine II)" 855 "855 (OEM - Cyrillik)" + 856 "856 (OEM - Hebre PC)" 857 "857 (OEM - Turke)" 858 "858 (OEM - Shumegjuhe Latine I + Euro)" 860 "860 (OEM - Portugeze)" @@ -56,6 +57,7 @@ 65001 "65001 (UTF-8)" 3700 "37 (IBM EBCDIC - U.S./Kanada)" /* FIXME */ +// 424 "424 (IBM EBCDIC - Hebre)" // On Windows, this is CP 20424 1026 "1026 (IBM EBCDIC - Turke (Latin-5))" 1047 "1047 (IBM EBCDIC - Latin-1/Sistem i hapur)" 1140 "1140 (IBM EBCDIC - U.S./Kanada (37 + Euro))" @@ -99,8 +101,12 @@ 28596 "28596 (ISO 8859-6 Arabik)" 28597 "28597 (ISO 8859-7 Greeke)" 28598 "28598 (ISO 8859-8 Hebrew: Liste Vizuale)" - 28599 "28599 (ISO 8859-9 Latine 5)" + 28599 "28599 (ISO 8859-9 Latine 5 Turke)" + 28600 "28600 (ISO 8859-10 Latine 6 Nordike)" + 28603 "28603 (ISO 8859-13 Latine 7 Estonian)" + 28604 "28604 (ISO 8859-14 Latine 8 Celtic)" 28605 "28605 (ISO 8859-15 Latine 9)" + 28606 "28606 (ISO 8859-16 Latine 10 Balkan)" 38598 "38598 (ISO 8859-8 Hebrew: Liste Logjike)" 20105 "20105 (IA5 IRV Alfabet Internacional No.5)" @@ -117,6 +123,7 @@ 20005 "20005 (Wang - Taiwan)" 20127 "20127 (US-ASCII)" 20261 "20261 (T.61)" +// 878 "878 (Rus - KOI8)" // On Windows, this is CP 20866 20866 "20866 (Rus - KOI8)" 21027 "21027 (Ext Alpha Lowercase)" 21866 "21866 (Ukrainiane - KOI8-U)" Modified: trunk/reactos/dll/win32/kernel32/winnls/lang/tr-TR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/winnls/lang/tr-TR.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/winnls/lang/tr-TR.rc [iso-8859-1] Wed Apr 26 20:31:54 2017 @@ -25,6 +25,7 @@ 850 "850 (OEM - Ãok Dilli Latin I)" 852 "852 (OEM - Latin II)" 855 "855 (OEM - Kiril)" + 856 "856 (OEM - Ä°brânice PC)" 857 "857 (OEM - Türkçe)" 858 "858 (OEM - Ãok Dilli Latin I + Avro)" 860 "860 (OEM - Portekizce)" @@ -57,6 +58,7 @@ 65001 "65001 (UTF-8)" 3700 "37 (IBM EBCDIC - ABD/Kanada)" /* FIXME */ +// 424 "424 (IBM EBCDIC - Ä°brânice)" // On Windows, this is CP 20424 1026 "1026 (IBM EBCDIC - Türkçe (Latin-5))" 1047 "1047 (IBM EBCDIC - Latin-1/Açık Dizge)" 1140 "1140 (IBM EBCDIC - ABD/Kanada (37 + Avro))" @@ -100,8 +102,12 @@ 28596 "28596 (ISO 8859-6 Arapça)" 28597 "28597 (ISO 8859-7 Yunanca)" 28598 "28598 (ISO 8859-8 Ä°brânice: Görmelik Dizme)" - 28599 "28599 (ISO 8859-9 Latin 5)" + 28599 "28599 (ISO 8859-9 Latin 5 Türkçe)" + 28600 "28600 (ISO 8859-10 Latin 6 Nordik)" + 28603 "28603 (ISO 8859-13 Latin 7 Estonian)" + 28604 "28604 (ISO 8859-14 Latin 8 Celtic)" 28605 "28605 (ISO 8859-15 Latin 9)" + 28606 "28606 (ISO 8859-16 Latin 10 Balkan)" 38598 "38598 (ISO 8859-8 Ä°brânice: Mantıklık Dizme)" 20105 "20105 (IA5 IRV Uluslararası Harflik Nu: 5)" @@ -118,6 +124,7 @@ 20005 "20005 (Vang - Tayvan)" 20127 "20127 (ABD-ASCII)" 20261 "20261 (T.61)" +// 878 "878 (Rusça - KOI8)" // On Windows, this is CP 20866 20866 "20866 (Rusça - KOI8)" 21027 "21027 (GeniÅletilmiÅ Alfa Küçük Harf)" 21866 "21866 (Ukraynaca - KOI8-U)" Modified: trunk/reactos/dll/win32/kernel32/winnls/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/winnls/lang/uk-UA.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/winnls/lang/uk-UA.rc [iso-8859-1] Wed Apr 26 20:31:54 2017 @@ -24,6 +24,7 @@ 850 "850 (OEM - ÐагаÑомовна ÐаÑиниÑÑ I)" 852 "852 (OEM - ÐаÑиниÑÑ II)" 855 "855 (OEM - ÐиÑилиÑÑ)" + 856 "856 (OEM - ÐвÑÐ¸Ñ PC)" 857 "857 (OEM - ТÑÑеÑÑка)" 858 "858 (OEM - ÐагаÑомовна ÐаÑиниÑÑ I + ÐвÑо)" 860 "860 (OEM - ÐоÑÑÑгалÑÑÑка)" @@ -56,6 +57,7 @@ 65001 "65001 (UTF-8)" 3700 "37 (IBM EBCDIC - СШÐ/Ðанада)" /* FIXME */ +// 424 "424 (IBM EBCDIC - ÐвÑиÑ)" // On Windows, this is CP 20424 1026 "1026 (IBM EBCDIC - ТÑÑеÑÑка (ÐаÑиниÑÑ-5))" 1047 "1047 (IBM EBCDIC - ÐаÑиниÑÑ-1/Open System)" 1140 "1140 (IBM EBCDIC - СШÐ/Ðанада (37 + ÐвÑо))" @@ -99,8 +101,12 @@ 28596 "28596 (ISO 8859-6 ÐÑабÑÑка)" 28597 "28597 (ISO 8859-7 ÐÑеÑÑка)" 28598 "28598 (ISO 8859-8 ÐвÑиÑ: ÐÑзÑалÑний ÐоÑÑдок)" - 28599 "28599 (ISO 8859-9 ÐаÑиниÑÑ 5)" + 28599 "28599 (ISO 8859-9 ÐаÑиниÑÑ 5 ТÑÑеÑÑка)" + 28600 "28600 (ISO 8859-10 ÐаÑиниÑÑ 6 СкандинавÑÑка)" + 28603 "28603 (ISO 8859-13 ÐаÑиниÑÑ 7 Estonian)" + 28604 "28604 (ISO 8859-14 ÐаÑиниÑÑ 8 Celtic)" 28605 "28605 (ISO 8859-15 ÐаÑиниÑÑ 9)" + 28606 "28606 (ISO 8859-16 ÐаÑиниÑÑ 10 Balkan)" 38598 "38598 (ISO 8859-8 ÐвÑиÑ: ÐогÑÑний ÐоÑÑдок)" 20105 "20105 (IA5 IRV ÐÑжнаÑодний ÐлÑавÑÑ No.5)" @@ -117,6 +123,7 @@ 20005 "20005 (Wang - ТайванÑÑка)" 20127 "20127 (СШÐ-ASCII)" 20261 "20261 (T.61)" +// 878 "878 (РоÑÑйÑÑка - KOI8)" // On Windows, this is CP 20866 20866 "20866 (РоÑÑйÑÑка - KOI8)" 21027 "21027 (РозÑ. ÐлÑ. ÐижнÑй ÑегÑÑÑÑ)" 21866 "21866 (УкÑаÑнÑÑка - KOI8-U)" Modified: trunk/reactos/dll/win32/kernel32/winnls/lang/zh-CN.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/winnls/lang/zh-CN.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/winnls/lang/zh-CN.rc [iso-8859-1] Wed Apr 26 20:31:54 2017 @@ -26,6 +26,7 @@ 850 "850 (OEM - å¤è¯è¨æä¸è¯ I)" 852 "852 (OEM - æä¸è¯ II)" 855 "855 (OEM - 西éå°æ)" + 856 "856 (OEM - å¸ä¼¯æ¥è¯ PC)" 857 "857 (OEM - åè³å ¶è¯)" 858 "858 (OEM - å¤è¯è¨æä¸è¯ I + 欧è¯)" 860 "860 (OEM - è¡èçè¯)" @@ -58,6 +59,7 @@ 65001 "65001 (UTF-8)" 3700 "37 (IBM EBCDIC - ç¾å½/å æ¿å¤§)" /* FIXME */ +// 424 "424 (IBM EBCDIC - å¸ä¼¯æ¥è¯)" // On Windows, this is CP 20424 1026 "1026 (IBM EBCDIC - åè³å ¶è¯ (Latin-5))" 1047 "1047 (IBM EBCDIC - æä¸è¯-1/æå¼ç³»ç»)" 1140 "1140 (IBM EBCDIC - ç¾å½/å æ¿å¤§ (37 + 欧è¯))" @@ -101,8 +103,12 @@ 28596 "28596 (ISO 8859-6 é¿æ伯è¯)" 28597 "28597 (ISO 8859-7 å¸è è¯)" 28598 "28598 (ISO 8859-8 å¸ä¼¯æ¥è¯: è§è§è®¢è´)" - 28599 "28599 (ISO 8859-9 æä¸è¯ 5)" + 28599 "28599 (ISO 8859-9 æä¸è¯ 5 åè³å ¶è¯)" + 28600 "28600 (ISO 8859-10 æä¸è¯ 6 å欧)" + 28603 "28603 (ISO 8859-13 æä¸è¯ 7 Estonian)" + 28604 "28604 (ISO 8859-14 æä¸è¯ 8 Celtic)" 28605 "28605 (ISO 8859-15 æä¸è¯ 9)" + 28606 "28606 (ISO 8859-16 æä¸è¯ 10 Balkan)" 38598 "38598 (ISO 8859-8 å¸ä¼¯æ¥è¯: é»è¾æåº)" 20105 "20105 (IA5 IRV å½é åæ¯è¡¨ 5 å·)" @@ -119,6 +125,7 @@ 20005 "20005 (Wang - å°æ¹¾)" 20127 "20127 (ç¾å½-ASCII)" 20261 "20261 (T.61)" +// 878 "878 (ä¿ç½æ¯-KOI8)" // On Windows, this is CP 20866 20866 "20866 (ä¿ç½æ¯-KOI8)" 21027 "21027 (Ext åæ¯å°å)" 21866 "21866 (ä¹å å °è¯ - KOI8-U)"
7 years, 8 months
1
0
0
0
[hbelusca] 74413: [KERNEL32]: Little improvements/fixes for GetCPInfoExW and GetGeoInfoW: - Rework GetLocalisedText helper such that it looks more like LoadStringW. Also, if the string is not found...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Wed Apr 26 17:38:57 2017 New Revision: 74413 URL:
http://svn.reactos.org/svn/reactos?rev=74413&view=rev
Log: [KERNEL32]: Little improvements/fixes for GetCPInfoExW and GetGeoInfoW: - Rework GetLocalisedText helper such that it looks more like LoadStringW. Also, if the string is not found (either because there is no associated string table, or because its resource length is zero), then return zero. Otherwise we return the correct number of characters copied into the user buffer, not counting the NULL terminator. This fixes the blank strings showing in the list of codepage user-friendly names in the console properties dialog. - Simplify the code of NLS_GetGeoFriendlyName: we can directly use the user-provided buffer to retrieve the string. Addendum to r65157. CORE-13130 #resolve Modified: trunk/reactos/dll/win32/kernel32/winnls/string/lang.c trunk/reactos/dll/win32/kernel32/winnls/string/nls.c Modified: trunk/reactos/dll/win32/kernel32/winnls/string/lang.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/winnls/string/lang.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/winnls/string/lang.c [iso-8859-1] Wed Apr 26 17:38:57 2017 @@ -33,7 +33,7 @@ extern int wine_fold_string(int flags, const WCHAR *src, int srclen, WCHAR *dst, int dstlen); extern int wine_get_sortkey(int flags, const WCHAR *src, int srclen, char *dst, int dstlen); extern int wine_compare_string(int flags, const WCHAR *str1, int len1, const WCHAR *str2, int len2); -extern DWORD GetLocalisedText(DWORD dwResId, WCHAR *lpszDest, DWORD dwDestSize); +extern UINT GetLocalisedText(IN UINT uID, IN LPWSTR lpszDest, IN UINT cchDest); #define NLSRC_OFFSET 5000 /* FIXME */ extern HMODULE kernel32_handle; @@ -3093,33 +3093,16 @@ static int NLS_GetGeoFriendlyName(GEOID Location, LPWSTR szFriendlyName, int cchData) { - LPWSTR szBuffer; - DWORD dwSize; - /* FIXME: move *.nls resources out of kernel32 into locale.nls */ Location += NLSRC_OFFSET; Location &= 0xFFFF; - if(cchData == 0) + if (cchData == 0) return GetLocalisedText(Location, NULL, 0); - dwSize = cchData * sizeof(WCHAR); - szBuffer = HeapAlloc(GetProcessHeap(), 0, dwSize); - - if (!szBuffer) - { - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return 0; - } - - if(GetLocalisedText(Location, szBuffer, dwSize)) - { - memcpy(szFriendlyName, szBuffer, dwSize); - HeapFree(GetProcessHeap(), 0, szBuffer); + if (GetLocalisedText(Location, szFriendlyName, (UINT)cchData)) return strlenW(szFriendlyName) + 1; - } - - HeapFree(GetProcessHeap(), 0, szBuffer); + return 0; } Modified: trunk/reactos/dll/win32/kernel32/winnls/string/nls.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/winnls/string/nls.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/winnls/string/nls.c [iso-8859-1] Wed Apr 26 17:38:57 2017 @@ -1714,18 +1714,30 @@ return dest_index; } -DWORD -GetLocalisedText(DWORD dwResId, WCHAR *lpszDest, DWORD dwDestSize) +/* + * A function similar to LoadStringW, but adapted for usage by GetCPInfoExW + * and GetGeoInfoW. It uses the current user localization, otherwise falls back + * to English (US). Contrary to LoadStringW which always saves the loaded string + * into the user-given buffer, truncating the string if needed, this function + * returns instead an ERROR_INSUFFICIENT_BUFFER error code if the user buffer + * is not large enough. + */ +UINT +GetLocalisedText( + IN UINT uID, + IN LPWSTR lpszDest, + IN UINT cchDest) { HRSRC hrsrc; + HGLOBAL hmem; LCID lcid; LANGID langId; - DWORD dwId; - - if (dwResId == 37) - dwId = dwResId * 100; - else - dwId = dwResId; + const WCHAR *p; + UINT i; + + /* See HACK in winnls/lang/xx-XX.rc files */ + if (uID == 37) + uID = uID * 100; lcid = GetUserDefaultLCID(); lcid = ConvertDefaultLocale(lcid); @@ -1737,53 +1749,60 @@ hrsrc = FindResourceExW(hCurrentModule, (LPWSTR)RT_STRING, - MAKEINTRESOURCEW((dwId >> 4) + 1), + MAKEINTRESOURCEW((uID >> 4) + 1), langId); - /* english fallback */ - if(!hrsrc) + /* English fallback */ + if (!hrsrc) { hrsrc = FindResourceExW(hCurrentModule, - (LPWSTR)RT_STRING, - MAKEINTRESOURCEW((dwId >> 4) + 1), - MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US)); - } - - if (hrsrc) - { - HGLOBAL hmem = LoadResource(hCurrentModule, hrsrc); - - if (hmem) - { - const WCHAR *p; - unsigned int i; - unsigned int len; - - p = LockResource(hmem); - - for (i = 0; i < (dwId & 0x0f); i++) p += *p + 1; - - if(dwDestSize == 0) - return *p + 1; - - len = *p * sizeof(WCHAR); - - if(len + sizeof(WCHAR) > dwDestSize) - { - SetLastError(ERROR_INSUFFICIENT_BUFFER); - return FALSE; - } - - memcpy(lpszDest, p + 1, len); - lpszDest[*p] = '\0'; - - return TRUE; - } - } - - DPRINT1("Resource not found: dwResId = %lu\n", dwResId); + (LPWSTR)RT_STRING, + MAKEINTRESOURCEW((uID >> 4) + 1), + MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US)); + } + + if (!hrsrc) + goto NotFound; + + hmem = LoadResource(hCurrentModule, hrsrc); + if (!hmem) + goto NotFound; + + p = LockResource(hmem); + + for (i = 0; i < (uID & 0x0F); i++) + p += *p + 1; + + /* Needed for GetGeoInfo(): return the needed string size including the NULL terminator */ + if (cchDest == 0) + return *p + 1; + /* Needed for GetGeoInfo(): bail out if the user buffer is not large enough */ + if (*p + 1 > cchDest) + { + SetLastError(ERROR_INSUFFICIENT_BUFFER); + return 0; + } + + i = *p; + if (i > 0) + { + memcpy(lpszDest, p + 1, i * sizeof(WCHAR)); + lpszDest[i] = L'\0'; + return i; + } +#if 0 + else + { + if (cchDest >= 1) + lpszDest[0] = L'\0'; + /* Fall-back */ + } +#endif + +NotFound: + DPRINT1("Resource not found: uID = %lu\n", uID); SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; + return 0; } /* @@ -1849,7 +1868,7 @@ DWORD dwFlags, LPCPINFOEXW lpCPInfoEx) { - if (!GetCPInfo(CodePage, (LPCPINFO) lpCPInfoEx)) + if (!GetCPInfo(CodePage, (LPCPINFO)lpCPInfoEx)) return FALSE; switch(CodePage) @@ -1858,7 +1877,9 @@ { lpCPInfoEx->CodePage = CP_UTF7; lpCPInfoEx->UnicodeDefaultChar = 0x3f; - return GetLocalisedText((DWORD)CodePage, lpCPInfoEx->CodePageName, sizeof(lpCPInfoEx->CodePageName)) != 0; + return GetLocalisedText(lpCPInfoEx->CodePage, + lpCPInfoEx->CodePageName, + ARRAYSIZE(lpCPInfoEx->CodePageName)) != 0; } break; @@ -1866,7 +1887,9 @@ { lpCPInfoEx->CodePage = CP_UTF8; lpCPInfoEx->UnicodeDefaultChar = 0x3f; - return GetLocalisedText((DWORD)CodePage, lpCPInfoEx->CodePageName, sizeof(lpCPInfoEx->CodePageName)) != 0; + return GetLocalisedText(lpCPInfoEx->CodePage, + lpCPInfoEx->CodePageName, + ARRAYSIZE(lpCPInfoEx->CodePageName)) != 0; } default: @@ -1876,14 +1899,16 @@ CodePageEntry = IntGetCodePageEntry(CodePage); if (CodePageEntry == NULL) { - DPRINT1("Could not get CodePage Entry! CodePageEntry = 0\n"); + DPRINT1("Could not get CodePage Entry! CodePageEntry = NULL\n"); SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } lpCPInfoEx->CodePage = CodePageEntry->CodePageTable.CodePage; lpCPInfoEx->UnicodeDefaultChar = CodePageEntry->CodePageTable.UniDefaultChar; - return GetLocalisedText(CodePageEntry->CodePageTable.CodePage, lpCPInfoEx->CodePageName, sizeof(lpCPInfoEx->CodePageName)) != 0; + return GetLocalisedText(lpCPInfoEx->CodePage, + lpCPInfoEx->CodePageName, + ARRAYSIZE(lpCPInfoEx->CodePageName)) != 0; } break; }
7 years, 8 months
1
0
0
0
[hbelusca] 74412: [KERNEL32]: Add the Brunei in the list of localized countries. Translators, please localize the name!
by hbelusca@svn.reactos.org
Author: hbelusca Date: Wed Apr 26 17:10:51 2017 New Revision: 74412 URL:
http://svn.reactos.org/svn/reactos?rev=74412&view=rev
Log: [KERNEL32]: Add the Brunei in the list of localized countries. Translators, please localize the name! Modified: trunk/reactos/dll/win32/kernel32/winnls/lang/cs-CZ.rc trunk/reactos/dll/win32/kernel32/winnls/lang/de-DE.rc trunk/reactos/dll/win32/kernel32/winnls/lang/en-US.rc trunk/reactos/dll/win32/kernel32/winnls/lang/es-ES.rc trunk/reactos/dll/win32/kernel32/winnls/lang/fr-FR.rc trunk/reactos/dll/win32/kernel32/winnls/lang/it-IT.rc trunk/reactos/dll/win32/kernel32/winnls/lang/ro-RO.rc trunk/reactos/dll/win32/kernel32/winnls/lang/ru-RU.rc trunk/reactos/dll/win32/kernel32/winnls/lang/sq-AL.rc trunk/reactos/dll/win32/kernel32/winnls/lang/tr-TR.rc trunk/reactos/dll/win32/kernel32/winnls/lang/uk-UA.rc trunk/reactos/dll/win32/kernel32/winnls/lang/zh-CN.rc Modified: trunk/reactos/dll/win32/kernel32/winnls/lang/cs-CZ.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/winnls/lang/cs-CZ.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/winnls/lang/cs-CZ.rc [iso-8859-1] Wed Apr 26 17:10:51 2017 @@ -189,6 +189,7 @@ 32+NLSRC_OFFSET "Brazil" 34+NLSRC_OFFSET "Bhutan" 35+NLSRC_OFFSET "Bulgaria" + 37+NLSRC_OFFSET "Brunei" 38+NLSRC_OFFSET "Burundi" 39+NLSRC_OFFSET "Canada" 40+NLSRC_OFFSET "Cambodia" Modified: trunk/reactos/dll/win32/kernel32/winnls/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/winnls/lang/de-DE.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/winnls/lang/de-DE.rc [iso-8859-1] Wed Apr 26 17:10:51 2017 @@ -189,6 +189,7 @@ 32+NLSRC_OFFSET "Brazil" 34+NLSRC_OFFSET "Bhutan" 35+NLSRC_OFFSET "Bulgaria" + 37+NLSRC_OFFSET "Brunei" 38+NLSRC_OFFSET "Burundi" 39+NLSRC_OFFSET "Canada" 40+NLSRC_OFFSET "Cambodia" Modified: trunk/reactos/dll/win32/kernel32/winnls/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/winnls/lang/en-US.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/winnls/lang/en-US.rc [iso-8859-1] Wed Apr 26 17:10:51 2017 @@ -189,6 +189,7 @@ 32+NLSRC_OFFSET "Brazil" 34+NLSRC_OFFSET "Bhutan" 35+NLSRC_OFFSET "Bulgaria" + 37+NLSRC_OFFSET "Brunei" 38+NLSRC_OFFSET "Burundi" 39+NLSRC_OFFSET "Canada" 40+NLSRC_OFFSET "Cambodia" Modified: trunk/reactos/dll/win32/kernel32/winnls/lang/es-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/winnls/lang/es-ES.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/winnls/lang/es-ES.rc [iso-8859-1] Wed Apr 26 17:10:51 2017 @@ -189,6 +189,7 @@ 32+NLSRC_OFFSET "Brazil" 34+NLSRC_OFFSET "Bhutan" 35+NLSRC_OFFSET "Bulgaria" + 37+NLSRC_OFFSET "Brunei" 38+NLSRC_OFFSET "Burundi" 39+NLSRC_OFFSET "Canada" 40+NLSRC_OFFSET "Cambodia" Modified: trunk/reactos/dll/win32/kernel32/winnls/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/winnls/lang/fr-FR.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/winnls/lang/fr-FR.rc [iso-8859-1] Wed Apr 26 17:10:51 2017 @@ -189,6 +189,7 @@ 32+NLSRC_OFFSET "Brazil" 34+NLSRC_OFFSET "Bhutan" 35+NLSRC_OFFSET "Bulgaria" + 37+NLSRC_OFFSET "Brunei" 38+NLSRC_OFFSET "Burundi" 39+NLSRC_OFFSET "Canada" 40+NLSRC_OFFSET "Cambodia" Modified: trunk/reactos/dll/win32/kernel32/winnls/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/winnls/lang/it-IT.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/winnls/lang/it-IT.rc [iso-8859-1] Wed Apr 26 17:10:51 2017 @@ -189,6 +189,7 @@ 32+NLSRC_OFFSET "Brasile" 34+NLSRC_OFFSET "Bhutan" 35+NLSRC_OFFSET "Bulgaria" + 37+NLSRC_OFFSET "Brunei" 38+NLSRC_OFFSET "Burundi" 39+NLSRC_OFFSET "Canada" 40+NLSRC_OFFSET "Cambogia" Modified: trunk/reactos/dll/win32/kernel32/winnls/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/winnls/lang/ro-RO.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/winnls/lang/ro-RO.rc [iso-8859-1] Wed Apr 26 17:10:51 2017 @@ -191,6 +191,7 @@ 32+NLSRC_OFFSET "Brazilia" 34+NLSRC_OFFSET "Bhutan" 35+NLSRC_OFFSET "Bulgaria" + 37+NLSRC_OFFSET "Brunei" 38+NLSRC_OFFSET "Burundi" 39+NLSRC_OFFSET "Canada" 40+NLSRC_OFFSET "Cambodgia" Modified: trunk/reactos/dll/win32/kernel32/winnls/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/winnls/lang/ru-RU.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/winnls/lang/ru-RU.rc [iso-8859-1] Wed Apr 26 17:10:51 2017 @@ -189,6 +189,7 @@ 32+NLSRC_OFFSET "ÐÑазилиÑ" 34+NLSRC_OFFSET "ÐÑÑан" 35+NLSRC_OFFSET "ÐолгаÑиÑ" + 37+NLSRC_OFFSET "ÐÑÑней" 38+NLSRC_OFFSET "ÐÑÑÑнди" 39+NLSRC_OFFSET "Ðанада" 40+NLSRC_OFFSET "Ðамбоджа" Modified: trunk/reactos/dll/win32/kernel32/winnls/lang/sq-AL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/winnls/lang/sq-AL.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/winnls/lang/sq-AL.rc [iso-8859-1] Wed Apr 26 17:10:51 2017 @@ -189,6 +189,7 @@ 32+NLSRC_OFFSET "Brazil" 34+NLSRC_OFFSET "Bhutan" 35+NLSRC_OFFSET "Bulgaria" + 37+NLSRC_OFFSET "Brunei" 38+NLSRC_OFFSET "Burundi" 39+NLSRC_OFFSET "Canada" 40+NLSRC_OFFSET "Cambodia" Modified: trunk/reactos/dll/win32/kernel32/winnls/lang/tr-TR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/winnls/lang/tr-TR.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/winnls/lang/tr-TR.rc [iso-8859-1] Wed Apr 26 17:10:51 2017 @@ -190,6 +190,7 @@ 32+NLSRC_OFFSET "Brezilya" 34+NLSRC_OFFSET "Bhutan" 35+NLSRC_OFFSET "Bulgaristan" + 37+NLSRC_OFFSET "Brunei" 38+NLSRC_OFFSET "Burundi" 39+NLSRC_OFFSET "Kanada" 40+NLSRC_OFFSET "Kamboçya" Modified: trunk/reactos/dll/win32/kernel32/winnls/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/winnls/lang/uk-UA.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/winnls/lang/uk-UA.rc [iso-8859-1] Wed Apr 26 17:10:51 2017 @@ -189,6 +189,7 @@ 32+NLSRC_OFFSET "Brazil" 34+NLSRC_OFFSET "Bhutan" 35+NLSRC_OFFSET "Bulgaria" + 37+NLSRC_OFFSET "Brunei" 38+NLSRC_OFFSET "Burundi" 39+NLSRC_OFFSET "Canada" 40+NLSRC_OFFSET "Cambodia" Modified: trunk/reactos/dll/win32/kernel32/winnls/lang/zh-CN.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/winnls/lang/zh-CN.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/winnls/lang/zh-CN.rc [iso-8859-1] Wed Apr 26 17:10:51 2017 @@ -191,6 +191,7 @@ 32+NLSRC_OFFSET "巴西" 34+NLSRC_OFFSET "ä¸ä¸¹" 35+NLSRC_OFFSET "ä¿å å©äº" + 37+NLSRC_OFFSET "Brunei" 38+NLSRC_OFFSET "å¸é迪" 39+NLSRC_OFFSET "å æ¿å¤§" 40+NLSRC_OFFSET "æ¬å寨"
7 years, 8 months
1
0
0
0
[gadamopoulos] 74411: [UXTHEME] -Fix some resource leaks.
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Wed Apr 26 13:55:19 2017 New Revision: 74411 URL:
http://svn.reactos.org/svn/reactos?rev=74411&view=rev
Log: [UXTHEME] -Fix some resource leaks. Modified: trunk/reactos/dll/win32/uxtheme/themehooks.c Modified: trunk/reactos/dll/win32/uxtheme/themehooks.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/themehoo…
============================================================================== --- trunk/reactos/dll/win32/uxtheme/themehooks.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/uxtheme/themehooks.c [iso-8859-1] Wed Apr 26 13:55:19 2017 @@ -60,6 +60,8 @@ if (pContext->hTabBackgroundBrush != NULL) { + CloseThemeData(GetWindowTheme(hWnd)); + DeleteObject(pContext->hTabBackgroundBrush); pContext->hTabBackgroundBrush = NULL; } @@ -281,7 +283,7 @@ { return OnPostWinPosChanged(hWnd, (WINDOWPOS*)lParam); } - case WM_DESTROY: + case WM_NCDESTROY: { ThemeDestroyWndContext(hWnd); return 0; @@ -304,10 +306,6 @@ HBITMAP hbmp; RECT dummy, bmpRect; BOOL hasImageAlpha; - //HTHEME theme = GetWindowTheme(hwnd); - theme = MSSTYLES_OpenThemeClass(ActiveThemeFile, NULL, L"TAB"); - if (!theme) - return E_FAIL; UXTHEME_LoadImage(theme, 0, TABP_BODY, 0, &dummy, FALSE, &hbmp, &bmpRect, &hasImageAlpha); if (changeOrigin) @@ -384,7 +382,7 @@ HWND hwndTarget = (HWND)lParam; HDC hdc = (HDC)wParam; HBRUSH* phbrush = (HBRUSH*)ret; - HTHEME theme = GetWindowTheme ( hWnd ); + HTHEME hTheme; if (!IsAppThemed()) break; @@ -392,7 +390,14 @@ if (!IsThemeDialogTextureEnabled (hWnd)) break; - GetDiaogTextureBrush(theme, hwndTarget, hdc, phbrush, Msg != WM_CTLCOLORDLG); + hTheme = GetWindowTheme(hWnd); + if (!hTheme) + hTheme = OpenThemeData(hWnd, L"TAB"); + + if (!hTheme) + break; + + GetDiaogTextureBrush(hTheme, hwndTarget, hdc, phbrush, Msg != WM_CTLCOLORDLG); #if 1 { @@ -491,7 +496,7 @@ puah->DefWndProcArray.Size = UAHOWP_MAX_SIZE; puah->WndProcArray.MsgBitArray = gabMSGPmessages; puah->WndProcArray.Size = UAHOWP_MAX_SIZE; - puah->DlgProcArray.MsgBitArray = gabMSGPmessages; + puah->DlgProcArray.MsgBitArray = gabDLGPmessages; puah->DlgProcArray.Size = UAHOWP_MAX_SIZE; puah->SetWindowRgn = ThemeSetWindowRgn;
7 years, 8 months
1
0
0
0
[hbelusca] 74410: [COMMAND]: Disable COMMAND.COM debugging messages by default. Disable again this #define if you want to get the dbg messages back. CORE-10710
by hbelusca@svn.reactos.org
Author: hbelusca Date: Wed Apr 26 13:41:43 2017 New Revision: 74410 URL:
http://svn.reactos.org/svn/reactos?rev=74410&view=rev
Log: [COMMAND]: Disable
COMMAND.COM
debugging messages by default. Disable again this #define if you want to get the dbg messages back. CORE-10710 Modified: trunk/reactos/subsystems/mvdm/dos/command.S Modified: trunk/reactos/subsystems/mvdm/dos/command.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/dos/comman…
============================================================================== --- trunk/reactos/subsystems/mvdm/dos/command.S [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/dos/command.S [iso-8859-1] Wed Apr 26 13:41:43 2017 @@ -17,7 +17,7 @@ #include "asmxtras.inc" #include <isvbop.inc> -// #define NDEBUG +#define NDEBUG /* DEFINES ********************************************************************/
7 years, 8 months
1
0
0
0
[tfaber] 74409: [USBOHCI] - Not building before committing is also a hack CORE-9224
by tfaber@svn.reactos.org
Author: tfaber Date: Wed Apr 26 10:54:34 2017 New Revision: 74409 URL:
http://svn.reactos.org/svn/reactos?rev=74409&view=rev
Log: [USBOHCI] - Not building before committing is also a hack CORE-9224 Modified: trunk/reactos/drivers/usb/usbohci/usb_request.cpp Modified: trunk/reactos/drivers/usb/usbohci/usb_request.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbohci/usb_re…
============================================================================== --- trunk/reactos/drivers/usb/usbohci/usb_request.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbohci/usb_request.cpp [iso-8859-1] Wed Apr 26 10:54:34 2017 @@ -786,7 +786,7 @@ // // get physical page (HACK) // - *(volatile char *)TransferBuffer; + *(volatile char *)Buffer; Page = MmGetPhysicalAddress(Buffer).LowPart; //
7 years, 8 months
1
0
0
0
[tfaber] 74408: [USBEHCI][USBOHCI] - Touch the virtual address of DMA buffers before calling MmGetPhysicalAddress on them. This ensures page directories are correctly set up for the current process...
by tfaber@svn.reactos.org
Author: tfaber Date: Wed Apr 26 10:53:32 2017 New Revision: 74408 URL:
http://svn.reactos.org/svn/reactos?rev=74408&view=rev
Log: [USBEHCI][USBOHCI] - Touch the virtual address of DMA buffers before calling MmGetPhysicalAddress on them. This ensures page directories are correctly set up for the current process context, and fixes random DMA operation failures ("MM:MmGetPhysicalAddressFailed"). This is not a hack -- using MmGetPhysicalAddress for DMA in the first place is. CORE-9224 #resolve Modified: trunk/reactos/drivers/usb/usbehci/usb_request.cpp trunk/reactos/drivers/usb/usbohci/usb_request.cpp Modified: trunk/reactos/drivers/usb/usbehci/usb_request.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbehci/usb_re…
============================================================================== --- trunk/reactos/drivers/usb/usbehci/usb_request.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbehci/usb_request.cpp [iso-8859-1] Wed Apr 26 10:53:32 2017 @@ -615,8 +615,9 @@ do { // - // get address - // + // get address (HACK) + // + *(volatile char *)TransferBuffer; Address = MmGetPhysicalAddress(TransferBuffer); // Modified: trunk/reactos/drivers/usb/usbohci/usb_request.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbohci/usb_re…
============================================================================== --- trunk/reactos/drivers/usb/usbohci/usb_request.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbohci/usb_request.cpp [iso-8859-1] Wed Apr 26 10:53:32 2017 @@ -784,8 +784,9 @@ } // - // get physical page - // + // get physical page (HACK) + // + *(volatile char *)TransferBuffer; Page = MmGetPhysicalAddress(Buffer).LowPart; //
7 years, 8 months
1
0
0
0
[gadamopoulos] 74407: [UXTHEME] -Implement the tab background texture. NOTE: A hack was used to go around the problem that SetBrushOrgEx doesn't really work. CORE-12978
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Wed Apr 26 09:28:35 2017 New Revision: 74407 URL:
http://svn.reactos.org/svn/reactos?rev=74407&view=rev
Log: [UXTHEME] -Implement the tab background texture. NOTE: A hack was used to go around the problem that SetBrushOrgEx doesn't really work. CORE-12978 Modified: trunk/reactos/dll/win32/uxtheme/draw.c trunk/reactos/dll/win32/uxtheme/themehooks.c trunk/reactos/dll/win32/uxtheme/uxthemep.h Modified: trunk/reactos/dll/win32/uxtheme/draw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/draw.c?r…
============================================================================== --- trunk/reactos/dll/win32/uxtheme/draw.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/uxtheme/draw.c [iso-8859-1] Wed Apr 26 09:28:35 2017 @@ -61,7 +61,7 @@ dwDialogTextureFlags = HandleToUlong( GetPropW( hwnd, (LPCWSTR)MAKEINTATOM(atDialogThemeEnabled) )); if (dwDialogTextureFlags == 0) /* Means EnableThemeDialogTexture wasn't called for this dialog */ - return TRUE; + return FALSE; return (dwDialogTextureFlags & ETDT_ENABLE) && !(dwDialogTextureFlags & ETDT_DISABLE); } @@ -224,7 +224,7 @@ * * Load image for part/state */ -static HRESULT UXTHEME_LoadImage(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, BOOL glyph, +HRESULT UXTHEME_LoadImage(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, BOOL glyph, HBITMAP *hBmp, RECT *bmpRect, BOOL* hasImageAlpha) { int imagelayout = IL_HORIZONTAL; Modified: trunk/reactos/dll/win32/uxtheme/themehooks.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/themehoo…
============================================================================== --- trunk/reactos/dll/win32/uxtheme/themehooks.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/uxtheme/themehooks.c [iso-8859-1] Wed Apr 26 09:28:35 2017 @@ -11,6 +11,7 @@ USERAPIHOOK user32ApiHook; BYTE gabDWPmessages[UAHOWP_MAX_SIZE]; BYTE gabMSGPmessages[UAHOWP_MAX_SIZE]; +BYTE gabDLGPmessages[UAHOWP_MAX_SIZE]; BOOL gbThemeHooksActive = FALSE; PWND_CONTEXT ThemeGetWndContext(HWND hWnd) @@ -56,7 +57,19 @@ { user32ApiHook.SetWindowRgn(hWnd, 0, TRUE); } - + + if (pContext->hTabBackgroundBrush != NULL) + { + DeleteObject(pContext->hTabBackgroundBrush); + pContext->hTabBackgroundBrush = NULL; + } + + if (pContext->hTabBackgroundBmp != NULL) + { + DeleteObject(pContext->hTabBackgroundBmp); + pContext->hTabBackgroundBmp = NULL; + } + HeapFree(GetProcessHeap(), 0, pContext); SetPropW( hWnd, (LPCWSTR)MAKEINTATOM(atWndContext), NULL); @@ -225,8 +238,27 @@ switch(Msg) { case WM_THEMECHANGED: + { + PWND_CONTEXT pcontext = ThemeGetWndContext(hWnd); + if (GetAncestor(hWnd, GA_PARENT) == GetDesktopWindow()) UXTHEME_LoadTheme(TRUE); + + if (pcontext == NULL) + return 0; + + if (pcontext->hTabBackgroundBrush != NULL) + { + DeleteObject(pcontext->hTabBackgroundBrush); + pcontext->hTabBackgroundBrush = NULL; + } + + if (pcontext->hTabBackgroundBmp != NULL) + { + DeleteObject(pcontext->hTabBackgroundBmp); + pcontext->hTabBackgroundBmp = NULL; + } + } case WM_NCCREATE: { PWND_CONTEXT pcontext = ThemeGetWndContext(hWnd); @@ -253,6 +285,126 @@ { ThemeDestroyWndContext(hWnd); return 0; + } + } + + return 0; +} + +HRESULT GetDiaogTextureBrush(HTHEME theme, HWND hwnd, HDC hdc, HBRUSH* result, BOOL changeOrigin) +{ + PWND_CONTEXT pcontext; + + pcontext = ThemeGetWndContext(hwnd); + if (pcontext == NULL) + return E_FAIL; + + if (pcontext->hTabBackgroundBrush == NULL) + { + HBITMAP hbmp; + RECT dummy, bmpRect; + BOOL hasImageAlpha; + //HTHEME theme = GetWindowTheme(hwnd); + theme = MSSTYLES_OpenThemeClass(ActiveThemeFile, NULL, L"TAB"); + if (!theme) + return E_FAIL; + + UXTHEME_LoadImage(theme, 0, TABP_BODY, 0, &dummy, FALSE, &hbmp, &bmpRect, &hasImageAlpha); + if (changeOrigin) + { + /* Unfortunately SetBrushOrgEx doesn't work at all */ + RECT rcWindow, rcParent; + POINT pt; + HDC hdcPattern, hdcHackPattern; + HBITMAP hbmpOld1, hbmpold2, hbmpHack; + + GetWindowRect(hwnd, &rcWindow); + GetWindowRect(GetParent(hwnd), &rcParent); + pt.x = rcWindow.left - rcParent.left; + pt.y = rcWindow.top - rcParent.top; + + hdcPattern = CreateCompatibleDC(hdc); + hbmpOld1 = (HBITMAP)SelectObject(hdcPattern, hbmp); + + hdcHackPattern = CreateCompatibleDC(hdc); + hbmpHack = CreateCompatibleBitmap(hdc, bmpRect.right, bmpRect.bottom); + hbmpold2 = (HBITMAP)SelectObject(hdcHackPattern, hbmpHack); + + BitBlt(hdcHackPattern, 0, 0, bmpRect.right, bmpRect.bottom - pt.y, hdcPattern, 0, pt.y, SRCCOPY); + BitBlt(hdcHackPattern, 0, bmpRect.bottom - pt.y, bmpRect.right, pt.y, hdcPattern, 0, 0, SRCCOPY); + + hbmpold2 = (HBITMAP)SelectObject(hdcHackPattern, hbmpold2); + hbmpOld1 = (HBITMAP)SelectObject(hdcPattern, hbmpOld1); + + DeleteDC(hdcPattern); + DeleteDC(hdcHackPattern); + + /* Keep the handle of the bitmap we created so that it can be used later */ + pcontext->hTabBackgroundBmp = hbmpHack; + hbmp = hbmpHack; + } + + /* hbmp is cached so there is no need to free it */ + pcontext->hTabBackgroundBrush = CreatePatternBrush(hbmp); + } + + if (!pcontext->hTabBackgroundBrush) + return E_FAIL; + + *result = pcontext->hTabBackgroundBrush; + return S_OK; +} + +void HackFillStaticBg(HWND hwnd, HDC hdc, HBRUSH* result) +{ + RECT rcStatic; + + GetClientRect(hwnd, &rcStatic); + FillRect(hdc, &rcStatic, *result); + + SetBkMode (hdc, TRANSPARENT); + *result = GetStockObject (NULL_BRUSH); +} + +static LRESULT CALLBACK +ThemeDlgPreWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, ULONG_PTR ret,PDWORD unknown) +{ + return 0; +} + +static LRESULT CALLBACK +ThemeDlgPostWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, ULONG_PTR ret,PDWORD unknown) +{ + switch(Msg) + { + case WM_CTLCOLORDLG: + case WM_CTLCOLORBTN: + case WM_CTLCOLORSTATIC: + { + HWND hwndTarget = (HWND)lParam; + HDC hdc = (HDC)wParam; + HBRUSH* phbrush = (HBRUSH*)ret; + HTHEME theme = GetWindowTheme ( hWnd ); + + if (!IsAppThemed()) + break; + + if (!IsThemeDialogTextureEnabled (hWnd)) + break; + + GetDiaogTextureBrush(theme, hwndTarget, hdc, phbrush, Msg != WM_CTLCOLORDLG); + +#if 1 + { + WCHAR controlClass[32]; + GetClassNameW (hwndTarget, controlClass, sizeof(controlClass) / sizeof(controlClass[0])); + + /* This is a hack for the static class. Windows have a v6 static class just for this. */ + if (lstrcmpiW (controlClass, WC_STATICW) == 0) + HackFillStaticBg(hwndTarget, hdc, phbrush); + } +#endif + break; } } @@ -333,8 +485,8 @@ puah->DefWindowProcW = ThemeDefWindowProcW; puah->PreWndProc = ThemePreWindowProc; puah->PostWndProc = ThemePostWindowProc; - puah->PreDefDlgProc = ThemePreWindowProc; - puah->PostDefDlgProc = ThemePostWindowProc; + puah->PreDefDlgProc = ThemeDlgPreWindowProc; + puah->PostDefDlgProc = ThemeDlgPostWindowProc; puah->DefWndProcArray.MsgBitArray = gabDWPmessages; puah->DefWndProcArray.Size = UAHOWP_MAX_SIZE; puah->WndProcArray.MsgBitArray = gabMSGPmessages; @@ -380,6 +532,16 @@ UAH_HOOK_MESSAGE(puah->WndProcArray, WM_THEMECHANGED); UAH_HOOK_MESSAGE(puah->WndProcArray, WM_UAHINIT); + puah->DlgProcArray.MsgBitArray = gabDLGPmessages; + puah->DlgProcArray.Size = UAHOWP_MAX_SIZE; + + UAH_HOOK_MESSAGE(puah->DlgProcArray, WM_INITDIALOG); + UAH_HOOK_MESSAGE(puah->DlgProcArray, WM_CTLCOLORMSGBOX); + UAH_HOOK_MESSAGE(puah->DlgProcArray, WM_CTLCOLORBTN); + UAH_HOOK_MESSAGE(puah->DlgProcArray, WM_CTLCOLORDLG); + UAH_HOOK_MESSAGE(puah->DlgProcArray, WM_CTLCOLORSTATIC); + UAH_HOOK_MESSAGE(puah->DlgProcArray, WM_PRINTCLIENT); + UXTHEME_LoadTheme(TRUE); return TRUE; Modified: trunk/reactos/dll/win32/uxtheme/uxthemep.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/uxthemep…
============================================================================== --- trunk/reactos/dll/win32/uxtheme/uxthemep.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/uxtheme/uxthemep.h [iso-8859-1] Wed Apr 26 09:28:35 2017 @@ -85,6 +85,9 @@ typedef struct _UXINI_FILE *PUXINI_FILE; +HRESULT UXTHEME_LoadImage(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, BOOL glyph, + HBITMAP *hBmp, RECT *bmpRect, BOOL* hasImageAlpha); + BOOL MSSTYLES_LookupProperty(LPCWSTR pszPropertyName, int *dwPrimitive, int *dwId); BOOL MSSTYLES_LookupEnum(LPCWSTR pszValueName, int dwEnum, int *dwValue); BOOL MSSTYLES_LookupPartState(LPCWSTR pszClass, LPCWSTR pszPart, LPCWSTR pszState, int *iPartId, int *iStateId); @@ -137,6 +140,8 @@ BOOL HasThemeRgn; BOOL UpdatingRgn; BOOL DirtyThemeRegion; + HBRUSH hTabBackgroundBrush; + HBITMAP hTabBackgroundBmp; BOOL SCROLL_trackVertical; enum SCROLL_HITTEST SCROLL_trackHitTest;
7 years, 8 months
1
0
0
0
← Newer
1
2
3
4
5
6
...
18
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Results per page:
10
25
50
100
200