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
December 2018
----- 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
26 participants
322 discussions
Start a n
N
ew thread
[reactos] 02/04: [DLL:KEYBOARD] Add Romanian Standard Keyboard layout. (#861)
by Ștefan Fulea
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e530bb36ede52c216c589…
commit e530bb36ede52c216c5891c0fbf953c7da3a53ee Author: Ștefan Fulea <stefan.fulea(a)mail.com> AuthorDate: Sat Sep 15 21:01:04 2018 +0300 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sat Dec 8 18:52:25 2018 +0100 [DLL:KEYBOARD] Add Romanian Standard Keyboard layout. (#861) Define the Romanian Standard Keyboard layout, as defined by Romanian Standards Association (ASRO). This also renders the existing Romanian Keyboard layout as Legacy. CORE-15056 --- dll/keyboard/CMakeLists.txt | 1 + dll/keyboard/kbdro/kbdro.c | 2 +- dll/keyboard/kbdro/kbdro.rc | 2 +- dll/keyboard/kbdrost/kbdrost.c | 476 ++++++++++++++++++++++++++++++++++++++ dll/keyboard/kbdrost/kbdrost.rc | 5 + dll/keyboard/kbdrost/kbdrost.spec | 1 + 6 files changed, 485 insertions(+), 2 deletions(-) diff --git a/dll/keyboard/CMakeLists.txt b/dll/keyboard/CMakeLists.txt index 26552b23fe..6c84084a3d 100644 --- a/dll/keyboard/CMakeLists.txt +++ b/dll/keyboard/CMakeLists.txt @@ -56,6 +56,7 @@ list(APPEND _keyboard_layouts kbdpl1 kbdpo kbdro + kbdrost kbdru kbdru1 kbdsg diff --git a/dll/keyboard/kbdro/kbdro.c b/dll/keyboard/kbdro/kbdro.c index 8849c4d168..8363139d36 100644 --- a/dll/keyboard/kbdro/kbdro.c +++ b/dll/keyboard/kbdro/kbdro.c @@ -1,5 +1,5 @@ /* - * ReactOS Romanian Keyboard layout + * ReactOS Romanian (Legacy) Keyboard layout * Copyright (C) 2008 ReactOS * Author: Dmitry Chapyshev * License: LGPL, see: LGPL.txt diff --git a/dll/keyboard/kbdro/kbdro.rc b/dll/keyboard/kbdro/kbdro.rc index a7b2eb6c4a..bd4e82d16c 100644 --- a/dll/keyboard/kbdro/kbdro.rc +++ b/dll/keyboard/kbdro/kbdro.rc @@ -1,5 +1,5 @@ #define REACTOS_VERSION_DLL -#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Romanian Keyboard Layout" +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Romanian (Legacy) Keyboard Layout" #define REACTOS_STR_INTERNAL_NAME "kbdro" #define REACTOS_STR_ORIGINAL_FILENAME "kbdro.dll" #include <reactos/version.rc> diff --git a/dll/keyboard/kbdrost/kbdrost.c b/dll/keyboard/kbdrost/kbdrost.c new file mode 100644 index 0000000000..99a12188c2 --- /dev/null +++ b/dll/keyboard/kbdrost/kbdrost.c @@ -0,0 +1,476 @@ +/* + * ReactOS Romanian (Standard) Keyboard layout + * Copyright (C) 2018 ReactOS + * Author: Ștefan Fulea (stefan dot fulea at mail dot com) + * License: LGPL, see: LGPL.txt + * + * Thanks to:
http://www.barcodeman.com/altek/mule/scandoc.php
+ * and
http://win.tue.nl/~aeb/linux/kbd/scancodes-1.html
+ * + * Romanian standard layout as defined in SR 13392:2004 by + * Romanian Standards Association (ASRO), with enacted use in + * romanian public institutions through Order no. 414/25.09.2006 + *
http://legislatie.just.ro/Public/FormaPrintabila/00000G22CFKNTV3ZAR52IRPL5V…
+ * + * The combining characters, non-romanian diacritics and other + * symbols were taken as reference from Microsoft's demo layout: + *
https://docs.microsoft.com/en-us/globalization/keyboards/kbdrost.html
+ * + * Finally, considering the amount of combining characters unused in Romanian + * but present by default in this language's keyboard layouts, I've took the + * liberty to add one combining character that it may use but I haven't + * encountered as of the time of this writing. The combining comma below, + * provides an alternative way of generating romanian S-comma and T-comma + * characters and is set as a dead character under letter Q. + * + */ + +#define WIN32_NO_STATUS +#include <stdarg.h> +#include <windef.h> +#include <winuser.h> +#include <ndk/kbd.h> + +#ifdef _M_IA64 +#define ROSDATA static __declspec(allocate(".data")) +#else +#ifdef _MSC_VER +#pragma data_seg(".data") +#define ROSDATA static +#else +#define ROSDATA static __attribute__((section(".data"))) +#endif +#endif + +#define VK_EMPTY 0xff /* The non-existent VK */ + +#define KNUMS KBDNUMPAD|KBDSPECIAL /* Special + number pad */ +#define KMEXT KBDEXT|KBDMULTIVK /* Multi + ext */ + +ROSDATA USHORT scancode_to_vk[] = +{ + /* Numbers Row */ + /* - 00 - */ + /* 1 ... 2 ... 3 ... 4 ... */ + VK_EMPTY, VK_ESCAPE, '1', '2', + '3', '4', '5', '6', + '7', '8', '9', '0', + VK_OEM_MINUS, VK_OEM_PLUS, VK_BACK, + + /* - 0f - */ + /* First Letters Row */ + VK_TAB, 'Q', 'W', 'E', + 'R', 'T', 'Y', 'U', + 'I', 'O', 'P', + VK_OEM_4, VK_OEM_6, VK_RETURN, + + /* - 1d - */ + /* Second Letters Row */ + VK_LCONTROL, + 'A', 'S', 'D', 'F', + 'G', 'H', 'J', 'K', + 'L', VK_OEM_1, VK_OEM_7, VK_OEM_3, + VK_LSHIFT, VK_OEM_5, + + /* - 2c - */ + /* Third letters row */ + 'Z', 'X', 'C', 'V', + 'B', 'N', 'M', VK_OEM_COMMA, + VK_OEM_PERIOD,VK_OEM_2, VK_RSHIFT, + + /* - 37 - */ + /* Bottom Row */ + VK_MULTIPLY, VK_LMENU, VK_SPACE, VK_CAPITAL, + + /* - 3b - */ + /* F-Keys */ + VK_F1, VK_F2, VK_F3, VK_F4, VK_F5, VK_F6, + VK_F7, VK_F8, VK_F9, VK_F10, + + /* - 45 - */ + /* Locks */ + VK_NUMLOCK | KMEXT, + VK_SCROLL | KBDMULTIVK, + + /* - 47 - */ + /* Number-Pad */ + VK_HOME | KNUMS, VK_UP | KNUMS, VK_PRIOR | KNUMS, VK_SUBTRACT, + VK_LEFT | KNUMS, VK_CLEAR | KNUMS, VK_RIGHT | KNUMS, VK_ADD, + VK_END | KNUMS, VK_DOWN | KNUMS, VK_NEXT | KNUMS, + VK_INSERT | KNUMS, VK_DELETE | KNUMS, + + /* - 54 - */ + /* Presumably PrtSc */ + VK_SNAPSHOT, + + /* - 55 - */ + /* Oddities, and the remaining standard F-Keys */ + VK_EMPTY, VK_OEM_102, VK_F11, VK_F12, + + /* - 59 - */ + VK_CLEAR, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* EREOF */ + VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* ZOOM */ + VK_HELP, + + /* - 64 - */ + /* Even more F-Keys (for example, NCR keyboards from the early 90's) */ + VK_F13, VK_F14, VK_F15, VK_F16, VK_F17, VK_F18, VK_F19, VK_F20, + VK_F21, VK_F22, VK_F23, + + /* - 6f - */ + /* Not sure who uses these codes */ + VK_EMPTY, VK_EMPTY, VK_EMPTY, + + /* - 72 - */ + VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, + + /* - 76 - */ + /* One more f-key */ + VK_F24, + + /* - 77 - */ + VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, + VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ + VK_EMPTY, + + /* - 80 - */ + 0 +}; + +ROSDATA VSC_VK extcode0_to_vk[] = +{ + { 0x10, VK_MEDIA_PREV_TRACK | KBDEXT }, + { 0x19, VK_MEDIA_NEXT_TRACK | KBDEXT }, + { 0x1D, VK_RCONTROL | KBDEXT }, + { 0x20, VK_VOLUME_MUTE | KBDEXT }, + { 0x21, VK_LAUNCH_APP2 | KBDEXT }, + { 0x22, VK_MEDIA_PLAY_PAUSE | KBDEXT }, + { 0x24, VK_MEDIA_STOP | KBDEXT }, + { 0x2E, VK_VOLUME_DOWN | KBDEXT }, + { 0x30, VK_VOLUME_UP | KBDEXT }, + { 0x32, VK_BROWSER_HOME | KBDEXT }, + { 0x35, VK_DIVIDE | KBDEXT }, + { 0x37, VK_SNAPSHOT | KBDEXT }, + { 0x38, VK_RMENU | KBDEXT }, + { 0x47, VK_HOME | KBDEXT }, + { 0x48, VK_UP | KBDEXT }, + { 0x49, VK_PRIOR | KBDEXT }, + { 0x4B, VK_LEFT | KBDEXT }, + { 0x4D, VK_RIGHT | KBDEXT }, + { 0x4F, VK_END | KBDEXT }, + { 0x50, VK_DOWN | KBDEXT }, + { 0x51, VK_NEXT | KBDEXT }, + { 0x52, VK_INSERT | KBDEXT }, + { 0x53, VK_DELETE | KBDEXT }, + { 0x5B, VK_LWIN | KBDEXT }, + { 0x5C, VK_RWIN | KBDEXT }, + { 0x5D, VK_APPS | KBDEXT }, + { 0x5F, VK_SLEEP | KBDEXT }, + { 0x65, VK_BROWSER_SEARCH | KBDEXT }, + { 0x66, VK_BROWSER_FAVORITES | KBDEXT }, + { 0x67, VK_BROWSER_REFRESH | KBDEXT }, + { 0x68, VK_BROWSER_STOP | KBDEXT }, + { 0x69, VK_BROWSER_FORWARD | KBDEXT }, + { 0x6A, VK_BROWSER_BACK | KBDEXT }, + { 0x6B, VK_LAUNCH_APP1 | KBDEXT }, + { 0x6C, VK_LAUNCH_MAIL | KBDEXT }, + { 0x6D, VK_LAUNCH_MEDIA_SELECT | KBDEXT }, + { 0x1C, VK_RETURN | KBDEXT }, + { 0x46, VK_CANCEL | KBDEXT }, + { 0, 0 } +}; + +ROSDATA VSC_VK extcode1_to_vk[] = +{ + { 0x1d, VK_PAUSE }, + { 0, 0 } +}; + +ROSDATA VK_TO_BIT modifier_keys[] = +{ + { VK_SHIFT, KBDSHIFT }, + { VK_CONTROL, KBDCTRL }, + { VK_MENU, KBDALT }, + { 0, 0 } +}; + +ROSDATA MODIFIERS modifier_bits = +{ + modifier_keys, + 7, + { 0, 1, 2, SHFT_INVALID, SHFT_INVALID, SHFT_INVALID, 3, 4 } + /* Modifiers order: NONE, SHIFT, CTRL, ALTGR, SHIFT-ALTGR */ +}; + +ROSDATA VK_TO_WCHARS2 key_to_chars_2mod[] = +{ + /* The alphabet */ + { 'A', CAPLOK, {'a', 'A'} }, + { 'B', CAPLOK, {'b', 'B'} }, + { 'C', CAPLOK, {'c', 'C'} }, + { 'F', CAPLOK, {'f', 'F'} }, + { 'G', CAPLOK, {'g', 'G'} }, + { 'H', CAPLOK, {'h', 'H'} }, + { 'I', CAPLOK, {'i', 'I'} }, + { 'J', CAPLOK, {'j', 'J'} }, + { 'K', CAPLOK, {'k', 'K'} }, + { 'M', CAPLOK, {'m', 'M'} }, + { 'N', CAPLOK, {'n', 'N'} }, + { 'O', CAPLOK, {'o', 'O'} }, + { 'R', CAPLOK, {'r', 'R'} }, + { 'T', CAPLOK, {'t', 'T'} }, + { 'U', CAPLOK, {'u', 'U'} }, + { 'V', CAPLOK, {'v', 'V'} }, + { 'W', CAPLOK, {'w', 'W'} }, + { 'X', CAPLOK, {'x', 'X'} }, + { 'Y', CAPLOK, {'y', 'Y'} }, + { 'Z', CAPLOK, {'z', 'Z'} }, + + /* Specials */ + { VK_OEM_2, 0, {'/', '?'} }, + + /* Keys that do not have shift states */ + { VK_TAB, 0, {'\t','\t'} }, + { VK_ADD, 0, {'+', '+'} }, + { VK_SUBTRACT, 0, {'-', '-'} }, + { VK_MULTIPLY, 0, {'*', '*'} }, + { VK_DIVIDE, 0, {'/', '/'} }, + + { 0, 0 } +}; + +ROSDATA VK_TO_WCHARS3 key_to_chars_3mod[] = +{ + /* Legacy (telnet-style) ascii escapes */ + { VK_OEM_102, 0, {'\\','|', 0x1c /* FS */} }, + { VK_BACK, 0, {0x8, 0x8, 0x7F } }, + { VK_ESCAPE, 0, {0x1b,0x1b,0x1b } }, + { VK_RETURN, 0, {'\r','\r','\n'} }, + { VK_SPACE, 0, {' ', ' ', ' '} }, + { VK_CANCEL, 0, {0x3, 0x3, 0x3} }, + { 0, 0 } +}; + +ROSDATA VK_TO_WCHARS4 key_to_chars_4mod[] = +{ + { '1', 0, {'1', '!', WCH_NONE, 0x0303 /* COMBINING TILDE */} }, + { '2', 0, {'2', '@', WCH_NONE, 0x030C /* COMBINING CARON */} }, + { '3', 0, {'3', '#', WCH_NONE, 0x0302 /* COMBINING CIRCUMFLEX */} }, + { '4', 0, {'4', '$', WCH_NONE, 0x0306 /* COMBINING BREVE */} }, + { '5', 0, {'5', '%', WCH_NONE, 0x030A /* COMBINING RING ABOVE */} }, + { '6', 0, {'6', '^', WCH_NONE, 0x0328 /* COMBINING OGONEK */} }, + { '7', 0, {'7', '&', WCH_NONE, 0x0300 /* COMBINING GRAVE ACCENT */} }, + { '8', 0, {'8', '*', WCH_NONE, 0x0307 /* COMBINING DOT ABOVE */} }, + { '9', 0, {'9', '(', WCH_NONE, 0x0301 /* COMBINING ACUTE ACCENT */} }, + { '0', 0, {'0', ')', WCH_NONE, 0x030B /* COMBINING DOUBLE ACUTE ACCENT */} }, + { 'Q', CAPLOK, {'q', 'Q', WCH_NONE, 0x0326 /* COMBINING COMMA BELOW */} }, + { 'E', CAPLOK, {'e', 'E', WCH_NONE, 0x20AC /* EURO SIGN */} }, + { 'P', CAPLOK, {'p', 'P', WCH_NONE, 0x00A7 /* SECTION SIGN */} }, + { 'S', CAPLOK, {'s', 'S', WCH_NONE, 0x00DF /* LATIN SMALL LETTER SHARP S */} }, + { 0, 0 } +}; + +ROSDATA VK_TO_WCHARS5 key_to_chars_5mod[] = +{ + { VK_OEM_3, 0, {0x201E /* DOUBLE QUOTE 99 LOW */, 0x201D /* DOUBLE QUOTE 99 HIGH */, WCH_NONE, '`', '~' } }, + { VK_OEM_MINUS, 0, {'-', '_', WCH_NONE, 0x0308 /* COMBINING DIAERESIS */, 0x2013 /* EN DASH */} }, + { VK_OEM_PLUS, 0, {'=', '+', WCH_NONE, 0x0327 /* COMBINING CEDILLA */, 0x00B1 /* PLUS-MINUS SIGN */} }, + { VK_OEM_4, CAPLOK, {0x0103 /* a BREVE */, 0x0102 /* A BREVE */, 0x1b /* ESC */, '[', '{' } }, + { VK_OEM_6, CAPLOK, {0x00ee /* i CIRCUMFLEX */, 0x00ce /* I CIRCUMFLEX */, 0x1d /* GS */, ']', '}' } }, + { 'D', CAPLOK, {'d', 'D', WCH_NONE, 0x0111 /* d WITH STROKE */, 0x0110 /* D WITH STROKE */} }, + { 'L', CAPLOK, {'l', 'L', WCH_NONE, 0x0142 /* l WITH STROKE */, 0x0141 /* L WITH STROKE */} }, + { VK_OEM_1, CAPLOK, {0x0219 /* s COMMA */, 0x0218 /* S COMMA */, WCH_NONE, ';', ':' } }, + { VK_OEM_7, CAPLOK, {0x021B /* t COMMA */, 0x021A /* T COMMA */, WCH_NONE, '\'', '"' } }, + { VK_OEM_5, CAPLOK, {0x00e2 /* a CIRCUMFLEX */, 0x00c2 /* A CIRCUMFLEX */, 0x1c /* FS */, '\\', '|' } }, + { VK_OEM_COMMA, 0, {',', ';', WCH_NONE, '<', 0x00AB /* LEFT-POINTING DOUBLE ANGLE QUOTATION MARK */ } }, + { VK_OEM_PERIOD, 0, {'.', ':', WCH_NONE, '>', 0x00BB /* RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK */ } }, + { 0, 0 } +}; + +ROSDATA VK_TO_WCHARS1 keypad_numbers[] = +{ + { VK_NUMPAD0, 0, {'0'} }, + { VK_NUMPAD1, 0, {'1'} }, + { VK_NUMPAD2, 0, {'2'} }, + { VK_NUMPAD3, 0, {'3'} }, + { VK_NUMPAD4, 0, {'4'} }, + { VK_NUMPAD5, 0, {'5'} }, + { VK_NUMPAD6, 0, {'6'} }, + { VK_NUMPAD7, 0, {'7'} }, + { VK_NUMPAD8, 0, {'8'} }, + { VK_NUMPAD9, 0, {'9'} }, + { VK_DECIMAL, 0, {','} }, + { 0, 0 } +}; + +#define vk_master(n, x) { (PVK_TO_WCHARS1)x, n, sizeof(x[0]) } +ROSDATA VK_TO_WCHAR_TABLE vk_to_wchar_master_table[] = +{ + vk_master(2, key_to_chars_2mod), + vk_master(3, key_to_chars_3mod), + vk_master(4, key_to_chars_4mod), + vk_master(5, key_to_chars_5mod), + vk_master(1, keypad_numbers), + { 0, 0, 0 } +}; + +ROSDATA VSC_LPWSTR key_names[] = +{ + { 0x01, L"Esc" }, + { 0x0e, L"Retroștergere" }, + { 0x0f, L"Tabulator" }, + { 0x1c, L"Intrare" }, + { 0x1d, L"Control" }, + { 0x2a, L"Schimb" }, + { 0x35, L"/ (num.)" }, + { 0x36, L"Schimb dreapta" }, + { 0x37, L"* (num.)" }, + { 0x38, L"Alt" }, + { 0x39, L"Spațiu" }, + { 0x3a, L"MAJUSCULE" }, + { 0x3b, L"F1" }, + { 0x3c, L"F2" }, + { 0x3d, L"F3" }, + { 0x3e, L"F4" }, + { 0x3f, L"F5" }, + { 0x40, L"F6" }, + { 0x41, L"F7" }, + { 0x42, L"F8" }, + { 0x43, L"F9" }, + { 0x44, L"F10" }, + { 0x45, L"Pauză" }, + { 0x46, L"Fix. derulare" }, + { 0x47, L"7 (num.)" }, + { 0x48, L"8 (num.)" }, + { 0x49, L"9 (num.)" }, + { 0x4a, L"- (num.)" }, + { 0x4b, L"4 (num.)" }, + { 0x4c, L"5 (num.)" }, + { 0x4d, L"6 (num.)" }, + { 0x4e, L"+ (num.)" }, + { 0x4f, L"1 (num.)" }, + { 0x50, L"2 (num.)" }, + { 0x51, L"3 (num.)" }, + { 0x52, L"0 (num.)" }, + { 0x53, L"Sep. zecimal" }, + { 0x54, L"Sys Req" }, + { 0x56, L"\\" }, + { 0x57, L"F11" }, + { 0x58, L"F12" }, + { 0x7c, L"F13" }, + { 0x7d, L"F14" }, + { 0x7e, L"F15" }, + { 0x7f, L"F16" }, + { 0x80, L"F17" }, + { 0x81, L"F18" }, + { 0x82, L"F19" }, + { 0x83, L"F20" }, + { 0x84, L"F21" }, + { 0x85, L"F22" }, + { 0x86, L"F23" }, + { 0x87, L"F24" }, + { 0, NULL } +}; + +ROSDATA VSC_LPWSTR extended_key_names[] = +{ + { 0x1c, L"Intr. numerice" }, + { 0x1d, L"Control dreapta" }, + { 0x37, L"Imprimare" }, + { 0x38, L"Alt dreapta" }, + { 0x45, L"Fix. numerice" }, + { 0x46, L"Întrerupere" }, + { 0x47, L"Acasă" }, + { 0x48, L"Sus" }, + { 0x49, L"Pag. sus" }, + { 0x4b, L"Stânga" }, + { 0x4c, L"Centru" }, + { 0x4d, L"Dreapta" }, + { 0x4f, L"Sfârșit" }, + { 0x50, L"Jos" }, + { 0x51, L"Pag. jos" }, + { 0x52, L"Inserție" }, + { 0x53, L"Ștergere" }, + { 0x54, L"Meniu" }, + { 0x56, L"Ajutor" }, + { 0x5b, L"Meniu stânga" }, + { 0x5c, L"Meniu dreapta" }, + { 0, NULL } +}; + +ROSDATA DEADKEY_LPWSTR dead_key_names[] = +{ + L"\x0300" L"Accent grav", + L"\x0301" L"Accent acut", + L"\x0302" L"Circumflex", + L"\x0303" L"Tildă", + L"\x0306" L"Breve", + L"\x0307" L"Suprapunct", + L"\x0308" L"Tremă", + L"\x030A" L"Supracerc", + L"\x030B" L"Accent acut dublu", + L"\x030C" L"Caron", + L"\x0326" L"Virgulă", + L"\x0327" L"Sedilă", + L"\x0328" L"Ogonek", + NULL +}; + +#define DEADTRANS(ch, accent, comp, flags) MAKELONG(ch, accent), comp, flags +ROSDATA DEADKEY dead_key[] = +{ + /* + * combining diacritics: tilde, caron, circumflex, + * breve, ring above, ogonek, grave accent, dot above, + * acute accent, double acute accent, and comma below + */ + #include "deadkeys/tilde" + #include "deadkeys/caron" + #include "deadkeys/circumflex" + #include "deadkeys/breve" + #include "deadkeys/ring_above" + #include "deadkeys/ogonek" + #include "deadkeys/grave_acc" + #include "deadkeys/dot_above" + #include "deadkeys/acute_acc" + #include "deadkeys/dbl_acute_acc" + #include "deadkeys/comma_below" + + { 0, 0 } +}; + +/* Finally, the master table */ +ROSDATA KBDTABLES keyboard_layout_table = +{ + /* modifier assignments */ + &modifier_bits, + + /* character from vk tables */ + vk_to_wchar_master_table, + + /* diacritical marks */ + dead_key, + + /* Key names */ + key_names, + extended_key_names, + dead_key_names, + + /* scan code to virtual key maps */ + scancode_to_vk, + sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + extcode0_to_vk, + extcode1_to_vk, + + MAKELONG(KLLF_ALTGR, 1), /* Version 1.0 */ + + /* Ligatures (Romanian doesn't have any) */ + 0, + 0, + NULL +}; + +PKBDTABLES WINAPI KbdLayerDescriptor(VOID) +{ + return &keyboard_layout_table; +} diff --git a/dll/keyboard/kbdrost/kbdrost.rc b/dll/keyboard/kbdrost/kbdrost.rc new file mode 100644 index 0000000000..27ce14a56c --- /dev/null +++ b/dll/keyboard/kbdrost/kbdrost.rc @@ -0,0 +1,5 @@ +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Romanian (Standard) Keyboard Layout" +#define REACTOS_STR_INTERNAL_NAME "kbdrost" +#define REACTOS_STR_ORIGINAL_FILENAME "kbdrost.dll" +#include <reactos/version.rc> diff --git a/dll/keyboard/kbdrost/kbdrost.spec b/dll/keyboard/kbdrost/kbdrost.spec new file mode 100644 index 0000000000..e1c7a26c1c --- /dev/null +++ b/dll/keyboard/kbdrost/kbdrost.spec @@ -0,0 +1 @@ +@ stdcall KbdLayerDescriptor() \ No newline at end of file
6 years
1
0
0
0
[reactos] 01/04: [DLL:KEYBOARD] Add a dead keys transformations collection. (#861)
by Ștefan Fulea
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3c82e46ef1fc058ac8237…
commit 3c82e46ef1fc058ac8237ef17706de7292df3319 Author: Ștefan Fulea <stefan.fulea(a)mail.com> AuthorDate: Sat Sep 15 20:59:55 2018 +0300 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sat Dec 8 18:50:47 2018 +0100 [DLL:KEYBOARD] Add a dead keys transformations collection. (#861) It contains all the Unicode characters that can be formed with a given dead key (i.e. combining character). Keyboard layouts with dead keys may find these useful. CORE-15056 --- dll/keyboard/kbdrost/deadkeys/acute_acc | 40 +++++++++++++++++++++++++ dll/keyboard/kbdrost/deadkeys/breve | 22 ++++++++++++++ dll/keyboard/kbdrost/deadkeys/caron | 40 +++++++++++++++++++++++++ dll/keyboard/kbdrost/deadkeys/circumflex | 32 ++++++++++++++++++++ dll/keyboard/kbdrost/deadkeys/comma_below | 10 +++++++ dll/keyboard/kbdrost/deadkeys/dbl_acute_acc | 10 +++++++ dll/keyboard/kbdrost/deadkeys/dot_above | 45 +++++++++++++++++++++++++++++ dll/keyboard/kbdrost/deadkeys/grave_acc | 22 ++++++++++++++ dll/keyboard/kbdrost/deadkeys/ogonek | 16 ++++++++++ dll/keyboard/kbdrost/deadkeys/ring_above | 14 +++++++++ dll/keyboard/kbdrost/deadkeys/tilde | 22 ++++++++++++++ 11 files changed, 273 insertions(+) diff --git a/dll/keyboard/kbdrost/deadkeys/acute_acc b/dll/keyboard/kbdrost/deadkeys/acute_acc new file mode 100644 index 0000000000..af7bc5b0ff --- /dev/null +++ b/dll/keyboard/kbdrost/deadkeys/acute_acc @@ -0,0 +1,40 @@ +/* + * COMBINING ACUTE ACCENT + * The dead key transformation set was defined by checking the availability of + * the resulting letters in Unicode character table:
https://unicode-table.com
+ */ + + { DEADTRANS(L'a', 0x0301, 0x00E1, 0x00) }, + { DEADTRANS(L'A', 0x0301, 0x00C1, 0x00) }, + { DEADTRANS(L'c', 0x0301, 0x0107, 0x00) }, + { DEADTRANS(L'C', 0x0301, 0x0106, 0x00) }, + { DEADTRANS(L'e', 0x0301, 0x00E9, 0x00) }, + { DEADTRANS(L'E', 0x0301, 0x00C9, 0x00) }, + { DEADTRANS(L'g', 0x0301, 0x01F4, 0x00) }, + { DEADTRANS(L'G', 0x0301, 0x01F5, 0x00) }, + { DEADTRANS(L'i', 0x0301, 0x00ED, 0x00) }, + { DEADTRANS(L'I', 0x0301, 0x00CD, 0x00) }, + { DEADTRANS(L'k', 0x0301, 0x1E31, 0x00) }, + { DEADTRANS(L'K', 0x0301, 0x1E30, 0x00) }, + { DEADTRANS(L'l', 0x0301, 0x013A, 0x00) }, + { DEADTRANS(L'L', 0x0301, 0x0139, 0x00) }, + { DEADTRANS(L'm', 0x0301, 0x1E3F, 0x00) }, + { DEADTRANS(L'M', 0x0301, 0x1E3E, 0x00) }, + { DEADTRANS(L'n', 0x0301, 0x0144, 0x00) }, + { DEADTRANS(L'N', 0x0301, 0x0143, 0x00) }, + { DEADTRANS(L'o', 0x0301, 0x00F3, 0x00) }, + { DEADTRANS(L'O', 0x0301, 0x00D3, 0x00) }, + { DEADTRANS(L'p', 0x0301, 0x1E55, 0x00) }, + { DEADTRANS(L'P', 0x0301, 0x1E54, 0x00) }, + { DEADTRANS(L'r', 0x0301, 0x0155, 0x00) }, + { DEADTRANS(L'R', 0x0301, 0x0154, 0x00) }, + { DEADTRANS(L's', 0x0301, 0x015B, 0x00) }, + { DEADTRANS(L'S', 0x0301, 0x015A, 0x00) }, + { DEADTRANS(L'u', 0x0301, 0x00FA, 0x00) }, + { DEADTRANS(L'U', 0x0301, 0x00DA, 0x00) }, + { DEADTRANS(L'w', 0x0301, 0x1E83, 0x00) }, + { DEADTRANS(L'W', 0x0301, 0x1E82, 0x00) }, + { DEADTRANS(L'y', 0x0301, 0x00FD, 0x00) }, + { DEADTRANS(L'Y', 0x0301, 0x00DD, 0x00) }, + { DEADTRANS(L'z', 0x0301, 0x017A, 0x00) }, + { DEADTRANS(L'Z', 0x0301, 0x0179, 0x00) }, diff --git a/dll/keyboard/kbdrost/deadkeys/breve b/dll/keyboard/kbdrost/deadkeys/breve new file mode 100644 index 0000000000..f6ec412c16 --- /dev/null +++ b/dll/keyboard/kbdrost/deadkeys/breve @@ -0,0 +1,22 @@ +/* + * COMBINING BREVE + * The dead key transformation set was defined by checking the availability of + * the resulting letters in Unicode character table:
https://unicode-table.com
+ */ + + { DEADTRANS(L'a', 0x0306, 0x0103, 0x00) }, + { DEADTRANS(L'A', 0x0306, 0x0102, 0x00) }, + { DEADTRANS(L'e', 0x0306, 0x0115, 0x00) }, + { DEADTRANS(L'E', 0x0306, 0x0114, 0x00) }, + { DEADTRANS(L'g', 0x0306, 0x011F, 0x00) }, + { DEADTRANS(L'G', 0x0306, 0x011E, 0x00) }, + { DEADTRANS(L'i', 0x0306, 0x012D, 0x00) }, + { DEADTRANS(L'I', 0x0306, 0x012C, 0x00) }, + { DEADTRANS(L'i', 0x0306, 0x012D, 0x00) }, + { DEADTRANS(L'I', 0x0306, 0x012C, 0x00) }, + { DEADTRANS(L'o', 0x0306, 0x014F, 0x00) }, + { DEADTRANS(L'O', 0x0306, 0x014E, 0x00) }, + { DEADTRANS(L'u', 0x0306, 0x016D, 0x00) }, + { DEADTRANS(L'U', 0x0306, 0x016C, 0x00) }, + { DEADTRANS(L'u', 0x0306, 0x016D, 0x00) }, + { DEADTRANS(L'U', 0x0306, 0x016C, 0x00) }, diff --git a/dll/keyboard/kbdrost/deadkeys/caron b/dll/keyboard/kbdrost/deadkeys/caron new file mode 100644 index 0000000000..2e73970dfb --- /dev/null +++ b/dll/keyboard/kbdrost/deadkeys/caron @@ -0,0 +1,40 @@ +/* + * COMBINING CARON + * The dead key transformation set was defined by checking the availability of + * the resulting letters in Unicode character table:
https://unicode-table.com
+ */ + + { DEADTRANS(L'a', 0x030C, 0x01CE, 0x00) }, + { DEADTRANS(L'A', 0x030C, 0x01CD, 0x00) }, + { DEADTRANS(L'c', 0x030C, 0x010D, 0x00) }, + { DEADTRANS(L'C', 0x030C, 0x010C, 0x00) }, + { DEADTRANS(L'd', 0x030C, 0x010F, 0x00) }, + { DEADTRANS(L'D', 0x030C, 0x010E, 0x00) }, + { DEADTRANS(L'e', 0x030C, 0x011B, 0x00) }, + { DEADTRANS(L'E', 0x030C, 0x011A, 0x00) }, + { DEADTRANS(L'g', 0x030C, 0x01E7, 0x00) }, + { DEADTRANS(L'G', 0x030C, 0x01E6, 0x00) }, + { DEADTRANS(L'h', 0x030C, 0x021F, 0x00) }, + { DEADTRANS(L'H', 0x030C, 0x021E, 0x00) }, + { DEADTRANS(L'i', 0x030C, 0x01D0, 0x00) }, + { DEADTRANS(L'I', 0x030C, 0x01CF, 0x00) }, + { DEADTRANS(L'j', 0x030C, 0x01F0, 0x00) }, + /* no Unicode capital J with caron */ + { DEADTRANS(L'k', 0x030C, 0x01E9, 0x00) }, + { DEADTRANS(L'K', 0x030C, 0x01E8, 0x00) }, + { DEADTRANS(L'l', 0x030C, 0x013E, 0x00) }, + { DEADTRANS(L'L', 0x030C, 0x013D, 0x00) }, + { DEADTRANS(L'n', 0x030C, 0x0148, 0x00) }, + { DEADTRANS(L'N', 0x030C, 0x0147, 0x00) }, + { DEADTRANS(L'o', 0x030C, 0x01D2, 0x00) }, + { DEADTRANS(L'O', 0x030C, 0x01D1, 0x00) }, + { DEADTRANS(L'r', 0x030C, 0x0159, 0x00) }, + { DEADTRANS(L'R', 0x030C, 0x0158, 0x00) }, + { DEADTRANS(L's', 0x030C, 0x0161, 0x00) }, + { DEADTRANS(L'S', 0x030C, 0x0160, 0x00) }, + { DEADTRANS(L't', 0x030C, 0x0165, 0x00) }, + { DEADTRANS(L'T', 0x030C, 0x0164, 0x00) }, + { DEADTRANS(L'u', 0x030C, 0x01D4, 0x00) }, + { DEADTRANS(L'U', 0x030C, 0x01D3, 0x00) }, + { DEADTRANS(L'z', 0x030C, 0x017E, 0x00) }, + { DEADTRANS(L'Z', 0x030C, 0x017D, 0x00) }, diff --git a/dll/keyboard/kbdrost/deadkeys/circumflex b/dll/keyboard/kbdrost/deadkeys/circumflex new file mode 100644 index 0000000000..142a7faaed --- /dev/null +++ b/dll/keyboard/kbdrost/deadkeys/circumflex @@ -0,0 +1,32 @@ +/* + * COMBINING CIRCUMFLEX + * The dead key transformation set was defined by checking the availability of + * the resulting letters in Unicode character table:
https://unicode-table.com
+ */ + + { DEADTRANS(L'a', 0x0302, 0x00E2, 0x00) }, + { DEADTRANS(L'A', 0x0302, 0x00C2, 0x00) }, + { DEADTRANS(L'c', 0x0302, 0x0109, 0x00) }, + { DEADTRANS(L'C', 0x0302, 0x0108, 0x00) }, + { DEADTRANS(L'e', 0x0302, 0x00EA, 0x00) }, + { DEADTRANS(L'E', 0x0302, 0x00CA, 0x00) }, + { DEADTRANS(L'g', 0x0302, 0x011D, 0x00) }, + { DEADTRANS(L'G', 0x0302, 0x011C, 0x00) }, + { DEADTRANS(L'h', 0x0302, 0x0125, 0x00) }, + { DEADTRANS(L'H', 0x0302, 0x0124, 0x00) }, + { DEADTRANS(L'i', 0x0302, 0x00EE, 0x00) }, + { DEADTRANS(L'I', 0x0302, 0x00CE, 0x00) }, + { DEADTRANS(L'j', 0x0302, 0x0135, 0x00) }, + { DEADTRANS(L'J', 0x0302, 0x0134, 0x00) }, + { DEADTRANS(L'o', 0x0302, 0x00F4, 0x00) }, + { DEADTRANS(L'O', 0x0302, 0x00D4, 0x00) }, + { DEADTRANS(L's', 0x0302, 0x015D, 0x00) }, + { DEADTRANS(L'S', 0x0302, 0x015C, 0x00) }, + { DEADTRANS(L'u', 0x0302, 0x00FB, 0x00) }, + { DEADTRANS(L'U', 0x0302, 0x00DB, 0x00) }, + { DEADTRANS(L'w', 0x0302, 0x0175, 0x00) }, + { DEADTRANS(L'W', 0x0302, 0x0174, 0x00) }, + { DEADTRANS(L'y', 0x0302, 0x0177, 0x00) }, + { DEADTRANS(L'Y', 0x0302, 0x0176, 0x00) }, + { DEADTRANS(L'z', 0x0302, 0x1E91, 0x00) }, + { DEADTRANS(L'Z', 0x0302, 0x1E90, 0x00) }, diff --git a/dll/keyboard/kbdrost/deadkeys/comma_below b/dll/keyboard/kbdrost/deadkeys/comma_below new file mode 100644 index 0000000000..d63625003c --- /dev/null +++ b/dll/keyboard/kbdrost/deadkeys/comma_below @@ -0,0 +1,10 @@ +/* + * COMBINING COMMA BELOW + * The dead key transformation set was defined by checking the availability of + * the resulting letters in Unicode character table:
https://unicode-table.com
+ */ + + { DEADTRANS(L's', 0x0326, 0x0219, 0x00) }, + { DEADTRANS(L'S', 0x0326, 0x0218, 0x00) }, + { DEADTRANS(L't', 0x0326, 0x021B, 0x00) }, + { DEADTRANS(L'T', 0x0326, 0x021A, 0x00) }, diff --git a/dll/keyboard/kbdrost/deadkeys/dbl_acute_acc b/dll/keyboard/kbdrost/deadkeys/dbl_acute_acc new file mode 100644 index 0000000000..772d92e37e --- /dev/null +++ b/dll/keyboard/kbdrost/deadkeys/dbl_acute_acc @@ -0,0 +1,10 @@ +/* + * COMBINING DOUBLE ACUTE ACCENT + * The dead key transformation set was defined by checking the availability of + * the resulting letters in Unicode character table:
https://unicode-table.com
+ */ + + { DEADTRANS(L'o', 0x030B, 0x0151, 0x00) }, + { DEADTRANS(L'O', 0x030B, 0x0150, 0x00) }, + { DEADTRANS(L'u', 0x030B, 0x0171, 0x00) }, + { DEADTRANS(L'U', 0x030B, 0x0170, 0x00) }, diff --git a/dll/keyboard/kbdrost/deadkeys/dot_above b/dll/keyboard/kbdrost/deadkeys/dot_above new file mode 100644 index 0000000000..ced75d45ca --- /dev/null +++ b/dll/keyboard/kbdrost/deadkeys/dot_above @@ -0,0 +1,45 @@ +/* + * COMBINING DOT ABOVE + * The dead key transformation set was defined by checking the availability of + * the resulting letters in Unicode character table:
https://unicode-table.com
+ */ + + { DEADTRANS(L'a', 0x0307, 0x0227, 0x00) }, + { DEADTRANS(L'A', 0x0307, 0x0226, 0x00) }, + { DEADTRANS(L'b', 0x0307, 0x1E03, 0x00) }, + { DEADTRANS(L'B', 0x0307, 0x1E02, 0x00) }, + { DEADTRANS(L'c', 0x0307, 0x010B, 0x00) }, + { DEADTRANS(L'C', 0x0307, 0x010A, 0x00) }, + { DEADTRANS(L'd', 0x0307, 0x1E0B, 0x00) }, + { DEADTRANS(L'D', 0x0307, 0x1E0A, 0x00) }, + { DEADTRANS(L'e', 0x0307, 0x0117, 0x00) }, + { DEADTRANS(L'E', 0x0307, 0x0116, 0x00) }, + { DEADTRANS(L'f', 0x0307, 0x1E1F, 0x00) }, + { DEADTRANS(L'F', 0x0307, 0x1E1E, 0x00) }, + { DEADTRANS(L'g', 0x0307, 0x0121, 0x00) }, + { DEADTRANS(L'G', 0x0307, 0x0120, 0x00) }, + { DEADTRANS(L'h', 0x0307, 0x1E23, 0x00) }, + { DEADTRANS(L'H', 0x0307, 0x1E22, 0x00) }, + { DEADTRANS(L'I', 0x0307, 0x0130, 0x00) }, + { DEADTRANS(L'm', 0x0307, 0x1E41, 0x00) }, + { DEADTRANS(L'M', 0x0307, 0x1E40, 0x00) }, + { DEADTRANS(L'n', 0x0307, 0x1E45, 0x00) }, + { DEADTRANS(L'N', 0x0307, 0x1E44, 0x00) }, + { DEADTRANS(L'o', 0x0307, 0x022F, 0x00) }, + { DEADTRANS(L'O', 0x0307, 0x022E, 0x00) }, + { DEADTRANS(L'p', 0x0307, 0x1E57, 0x00) }, + { DEADTRANS(L'P', 0x0307, 0x1E56, 0x00) }, + { DEADTRANS(L'r', 0x0307, 0x1E59, 0x00) }, + { DEADTRANS(L'R', 0x0307, 0x1E58, 0x00) }, + { DEADTRANS(L's', 0x0307, 0x1E61, 0x00) }, + { DEADTRANS(L'S', 0x0307, 0x1E60, 0x00) }, + { DEADTRANS(L't', 0x0307, 0x1E6B, 0x00) }, + { DEADTRANS(L'T', 0x0307, 0x1E6A, 0x00) }, + { DEADTRANS(L'w', 0x0307, 0x1E87, 0x00) }, + { DEADTRANS(L'W', 0x0307, 0x1E86, 0x00) }, + { DEADTRANS(L'x', 0x0307, 0x1E8B, 0x00) }, + { DEADTRANS(L'X', 0x0307, 0x1E8A, 0x00) }, + { DEADTRANS(L'y', 0x0307, 0x1E8F, 0x00) }, + { DEADTRANS(L'Y', 0x0307, 0x1E8E, 0x00) }, + { DEADTRANS(L'z', 0x0307, 0x017C, 0x00) }, + { DEADTRANS(L'Z', 0x0307, 0x017B, 0x00) }, diff --git a/dll/keyboard/kbdrost/deadkeys/grave_acc b/dll/keyboard/kbdrost/deadkeys/grave_acc new file mode 100644 index 0000000000..467a482e3d --- /dev/null +++ b/dll/keyboard/kbdrost/deadkeys/grave_acc @@ -0,0 +1,22 @@ +/* + * COMBINING GRAVE ACCENT + * The dead key transformation set was defined by checking the availability of + * the resulting letters in Unicode character table:
https://unicode-table.com
+ */ + + { DEADTRANS(L'a', 0x0300, 0x00E0, 0x00) }, + { DEADTRANS(L'A', 0x0300, 0x00C0, 0x00) }, + { DEADTRANS(L'e', 0x0300, 0x00E8, 0x00) }, + { DEADTRANS(L'E', 0x0300, 0x00C8, 0x00) }, + { DEADTRANS(L'i', 0x0300, 0x00EC, 0x00) }, + { DEADTRANS(L'I', 0x0300, 0x00CC, 0x00) }, + { DEADTRANS(L'n', 0x0300, 0x01F9, 0x00) }, + { DEADTRANS(L'N', 0x0300, 0x01F8, 0x00) }, + { DEADTRANS(L'o', 0x0300, 0x00F2, 0x00) }, + { DEADTRANS(L'O', 0x0300, 0x00D2, 0x00) }, + { DEADTRANS(L'u', 0x0300, 0x00F9, 0x00) }, + { DEADTRANS(L'U', 0x0300, 0x00D9, 0x00) }, + { DEADTRANS(L'w', 0x0300, 0x1E81, 0x00) }, + { DEADTRANS(L'W', 0x0300, 0x1E80, 0x00) }, + { DEADTRANS(L'y', 0x0300, 0x1EF3, 0x00) }, + { DEADTRANS(L'Y', 0x0300, 0x1EF2, 0x00) }, diff --git a/dll/keyboard/kbdrost/deadkeys/ogonek b/dll/keyboard/kbdrost/deadkeys/ogonek new file mode 100644 index 0000000000..f33dbecad2 --- /dev/null +++ b/dll/keyboard/kbdrost/deadkeys/ogonek @@ -0,0 +1,16 @@ +/* + * COMBINING OGONEK + * The dead key transformation set was defined by checking the availability of + * the resulting letters in Unicode character table:
https://unicode-table.com
+ */ + + { DEADTRANS(L'a', 0x0328, 0x0105, 0x00) }, + { DEADTRANS(L'A', 0x0328, 0x0104, 0x00) }, + { DEADTRANS(L'e', 0x0328, 0x0119, 0x00) }, + { DEADTRANS(L'E', 0x0328, 0x0118, 0x00) }, + { DEADTRANS(L'i', 0x0328, 0x012F, 0x00) }, + { DEADTRANS(L'I', 0x0328, 0x012E, 0x00) }, + { DEADTRANS(L'o', 0x0328, 0x01EB, 0x00) }, + { DEADTRANS(L'O', 0x0328, 0x01EA, 0x00) }, + { DEADTRANS(L'u', 0x0328, 0x0173, 0x00) }, + { DEADTRANS(L'U', 0x0328, 0x0172, 0x00) }, diff --git a/dll/keyboard/kbdrost/deadkeys/ring_above b/dll/keyboard/kbdrost/deadkeys/ring_above new file mode 100644 index 0000000000..e4a451991c --- /dev/null +++ b/dll/keyboard/kbdrost/deadkeys/ring_above @@ -0,0 +1,14 @@ +/* + * COMBINING RING ABOVE + * The dead key transformation set was defined by checking the availability of + * the resulting letters in Unicode character table:
https://unicode-table.com
+ */ + + { DEADTRANS(L'a', 0x030A, 0x00E5, 0x00) }, + { DEADTRANS(L'A', 0x030A, 0x00C5, 0x00) }, + { DEADTRANS(L'u', 0x030A, 0x016F, 0x00) }, + { DEADTRANS(L'U', 0x030A, 0x016E, 0x00) }, + { DEADTRANS(L'w', 0x030A, 0x1E98, 0x00) }, + /* no Unicode capital W with ring above */ + { DEADTRANS(L'y', 0x030A, 0x1E99, 0x00) }, + /* no Unicode capital Y with ring above */ diff --git a/dll/keyboard/kbdrost/deadkeys/tilde b/dll/keyboard/kbdrost/deadkeys/tilde new file mode 100644 index 0000000000..e7ee716ddc --- /dev/null +++ b/dll/keyboard/kbdrost/deadkeys/tilde @@ -0,0 +1,22 @@ +/* + * COMBINING TILDE + * The dead key transformation set was defined by checking the availability of + * the resulting letters in Unicode character table:
https://unicode-table.com
+ */ + + { DEADTRANS(L'a', 0x0303, 0x00E3, 0x00) }, + { DEADTRANS(L'A', 0x0303, 0x00C3, 0x00) }, + { DEADTRANS(L'e', 0x0303, 0x1EBD, 0x00) }, + { DEADTRANS(L'E', 0x0303, 0x1EBC, 0x00) }, + { DEADTRANS(L'i', 0x0303, 0x0129, 0x00) }, + { DEADTRANS(L'I', 0x0303, 0x0128, 0x00) }, + { DEADTRANS(L'n', 0x0303, 0x00F1, 0x00) }, + { DEADTRANS(L'N', 0x0303, 0x00D1, 0x00) }, + { DEADTRANS(L'o', 0x0303, 0x00F5, 0x00) }, + { DEADTRANS(L'O', 0x0303, 0x00D5, 0x00) }, + { DEADTRANS(L'u', 0x0303, 0x0169, 0x00) }, + { DEADTRANS(L'U', 0x0303, 0x0168, 0x00) }, + { DEADTRANS(L'v', 0x0303, 0x1E7D, 0x00) }, + { DEADTRANS(L'V', 0x0303, 0x1E7C, 0x00) }, + { DEADTRANS(L'y', 0x0303, 0x1EF9, 0x00) }, + { DEADTRANS(L'Y', 0x0303, 0x1EF8, 0x00) },
6 years
1
0
0
0
[reactos] 04/04: [LOG2LINES] Free all memory on exit.
by Serge Gautherie
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b92f1f4cdf3143eaad6d5…
commit b92f1f4cdf3143eaad6d5220c538c23658b759ec Author: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr> AuthorDate: Sun Aug 26 03:05:46 2018 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sat Dec 8 17:38:24 2018 +0100 [LOG2LINES] Free all memory on exit. --- sdk/tools/log2lines/log2lines.c | 41 +++++++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/sdk/tools/log2lines/log2lines.c b/sdk/tools/log2lines/log2lines.c index 025ccaa49e..cbe9482f49 100644 --- a/sdk/tools/log2lines/log2lines.c +++ b/sdk/tools/log2lines/log2lines.c @@ -579,7 +579,8 @@ main(int argc, const char **argv) if (optCount < 0 || optInit < 0) { - return optCount; + res = optCount; + goto cleanup; } argc -= optCount; @@ -587,21 +588,30 @@ main(int argc, const char **argv) if (opt_Revision && (strcmp(opt_Revision, "update") == 0)) { res = updateSvnlog(); - return res; + goto cleanup; } if (check_directory(opt_force)) - return 3; + { + res = 3; + goto cleanup; + } create_cache(opt_force, 0); if (opt_exit) - return 0; + { + res = 0; + goto cleanup; + } read_cache(); l2l_dbg(4, "Cache read complete\n"); if (set_LogFile(&logFile)) - return 2; + { + res = 2; + goto cleanup; + } l2l_dbg(4, "opt_logFile processed\n"); if (opt_Pipe) @@ -612,7 +622,8 @@ main(int argc, const char **argv) { dbgIn = stdin; //restore l2l_dbg(0, "Could not popen '%s' (%s)\n", opt_Pipe, strerror(errno)); - free(opt_Pipe); opt_Pipe = NULL; + free(opt_Pipe); + opt_Pipe = NULL; } } l2l_dbg(4, "opt_Pipe processed\n"); @@ -662,6 +673,24 @@ main(int argc, const char **argv) if (opt_Pipe) PCLOSE(dbgIn); +cleanup: + // See optionParse(). + if (opt_Revision) + { + free(opt_Revision); + opt_Revision = NULL; + } + + // See optionInit(). + if (opt_Pipe) + { + free(opt_Pipe); + opt_Pipe = NULL; + } + + list_clear(&sources); + list_clear(&cache); + return res; }
6 years
1
0
0
0
[reactos] 03/04: [LOG2LINES] Optimize malloc() calls.
by Serge Gautherie
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ca2bb9ee2852313935a1a…
commit ca2bb9ee2852313935a1a5e1399a06adc5a562dc Author: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr> AuthorDate: Sun Aug 26 03:05:46 2018 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sat Dec 8 17:38:16 2018 +0100 [LOG2LINES] Optimize malloc() calls. --- sdk/tools/log2lines/options.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/tools/log2lines/options.c b/sdk/tools/log2lines/options.c index 0bcbf068dc..8fb9bb2b7c 100644 --- a/sdk/tools/log2lines/options.c +++ b/sdk/tools/log2lines/options.c @@ -96,8 +96,8 @@ int optionInit(int argc, const char **argv) strcpy(opt_logFile, argv[i+1]); break; case 'P': - free(opt_Pipe); - opt_Pipe = malloc(LINESIZE); + if (!opt_Pipe) + opt_Pipe = malloc(LINESIZE); strcpy(opt_Pipe, argv[i+1]); break; case 'z': @@ -166,8 +166,8 @@ int optionParse(int argc, const char **argv) break; case 'R': optCount++; - free(opt_Revision); - opt_Revision = malloc(LINESIZE); + if (!opt_Revision) + opt_Revision = malloc(LINESIZE); sscanf(optarg, "%s", opt_Revision); if (strcmp(opt_Revision, "check") == 0) opt_Revision_check ++;
6 years
1
0
0
0
[reactos] 02/04: [LOG2LINES] Fix indentation.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=dbaa875f05b174594add8…
commit dbaa875f05b174594add8bba3287ca1e6145862f Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sat Dec 8 17:31:17 2018 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sat Dec 8 17:38:03 2018 +0100 [LOG2LINES] Fix indentation. --- sdk/tools/log2lines/log2lines.c | 170 ++++++++++++++++++++-------------------- 1 file changed, 85 insertions(+), 85 deletions(-) diff --git a/sdk/tools/log2lines/log2lines.c b/sdk/tools/log2lines/log2lines.c index f55e5ee5a1..025ccaa49e 100644 --- a/sdk/tools/log2lines/log2lines.c +++ b/sdk/tools/log2lines/log2lines.c @@ -420,120 +420,120 @@ translate_files(FILE *inFile, FILE *outFile) const char *p = kdbg_prompt; const char *p_eos = p + sizeof(KDBG_PROMPT) - 1; //end of string pos - memset(Line, '\0', LINESIZE + 1); - if (opt_console) + memset(Line, '\0', LINESIZE + 1); + if (opt_console) + { + while ((c = fgetc(inFile)) != EOF) { - while ((c = fgetc(inFile)) != EOF) - { - if (opt_quit)break; + if (opt_quit)break; - ch = (unsigned char)c; - if (!opt_raw) + ch = (unsigned char)c; + if (!opt_raw) + { + switch (ch) { - switch (ch) + case '\n': + if ( strncmp(Line, KDBG_DISCARD, sizeof(KDBG_DISCARD)-1) == 0 ) { - case '\n': - if ( strncmp(Line, KDBG_DISCARD, sizeof(KDBG_DISCARD)-1) == 0 ) - { - memset(Line, '\0', LINESIZE); // flushed - } - else + memset(Line, '\0', LINESIZE); // flushed + } + else + { + Line[1] = handle_escape_cmd(outFile, Line, path, LineOut); + if (Line[1] != KDBG_ESC_CHAR) { - Line[1] = handle_escape_cmd(outFile, Line, path, LineOut); - if (Line[1] != KDBG_ESC_CHAR) + if (p == p_eos) { - if (p == p_eos) + // kdbg prompt, so already echoed char by char + memset(Line, '\0', LINESIZE); + translate_char(c, outFile); + } + else + { + if (match_line(outFile, Line)) { - // kdbg prompt, so already echoed char by char - memset(Line, '\0', LINESIZE); + translate_line(outFile, Line, path, LineOut); translate_char(c, outFile); - } - else - { - if (match_line(outFile, Line)) - { - translate_line(outFile, Line, path, LineOut); - translate_char(c, outFile); - report(outFile); - } + report(outFile); } } } - i = 0; - p = kdbg_prompt; - pc = kdbg_cont; - break; - case '<': - i = 0; - Line[i++] = ch; - break; - case '>': - if (ch == *p) - { - p = p_eos; - translate_line(outFile, Line, path, LineOut); - } + } + i = 0; + p = kdbg_prompt; + pc = kdbg_cont; + break; + case '<': + i = 0; + Line[i++] = ch; + break; + case '>': + if (ch == *p) + { + p = p_eos; + translate_line(outFile, Line, path, LineOut); + } - if (p != p_eos) - { - if (i < LINESIZE) - { - Line[i++] = ch; - translate_line(outFile, Line, path, LineOut); - } - else - { - translate_line(outFile, Line, path, LineOut); - translate_char(c, outFile); - } - } - else - translate_char(c, outFile); - i = 0; - break; - default: - if (ch == *p)p++; - if (ch == *pc)pc++; + if (p != p_eos) + { if (i < LINESIZE) { Line[i++] = ch; - if (p == p_eos) - { - translate_char(c, outFile); - } - else if (!*pc) - { - translate_line(outFile, Line, path, LineOut); - i = 0; - } + translate_line(outFile, Line, path, LineOut); } else { translate_line(outFile, Line, path, LineOut); translate_char(c, outFile); + } + } + else + translate_char(c, outFile); + i = 0; + break; + default: + if (ch == *p)p++; + if (ch == *pc)pc++; + if (i < LINESIZE) + { + Line[i++] = ch; + if (p == p_eos) + { + translate_char(c, outFile); + } + else if (!*pc) + { + translate_line(outFile, Line, path, LineOut); i = 0; } } + else + { + translate_line(outFile, Line, path, LineOut); + translate_char(c, outFile); + i = 0; + } } - else - translate_char(c, outFile); } + else + translate_char(c, outFile); } - else - { // Line by line, slightly faster but less interactive - while (fgets(Line, LINESIZE, inFile) != NULL) - { - if (opt_quit)break; + } + else + { // Line by line, slightly faster but less interactive + while (fgets(Line, LINESIZE, inFile) != NULL) + { + if (opt_quit)break; - if (!opt_raw) - { - translate_line(outFile, Line, path, LineOut); - report(outFile); - } - else - log(outFile, "%s", Line); + if (!opt_raw) + { + translate_line(outFile, Line, path, LineOut); + report(outFile); } + else + log(outFile, "%s", Line); } + } if (opt_Revision && (strstr(opt_Revision, "regscan") == opt_Revision)) {
6 years
1
0
0
0
[reactos] 01/04: [LOG2LINES] Replace overkill malloc() usage.
by Serge Gautherie
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f5f515c17cc3f53a304a1…
commit f5f515c17cc3f53a304a129b2c6e4fbbc61b94ee Author: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr> AuthorDate: Fri Aug 24 23:39:53 2018 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sat Dec 8 17:34:18 2018 +0100 [LOG2LINES] Replace overkill malloc() usage. NOTE: Since the 'cache_name' and 'tmp_name' pointers move inside the corresponding cached strings, separate cache buffers are needed. --- sdk/tools/log2lines/cache.c | 25 ++++++------------------- sdk/tools/log2lines/log2lines.c | 12 +++--------- 2 files changed, 9 insertions(+), 28 deletions(-) diff --git a/sdk/tools/log2lines/cache.c b/sdk/tools/log2lines/cache.c index c46bc40c1f..cac0730eae 100644 --- a/sdk/tools/log2lines/cache.c +++ b/sdk/tools/log2lines/cache.c @@ -18,8 +18,10 @@ #include "log2lines.h" -static char *cache_name; -static char *tmp_name; +static char CacheName[PATH_MAX]; +static char *cache_name = CacheName; +static char TmpName[PATH_MAX]; +static char *tmp_name = TmpName; static int unpack_iso(char *dir, char *iso) @@ -141,8 +143,6 @@ check_directory(int force) return 1; } } - cache_name = malloc(PATH_MAX); - tmp_name = malloc(PATH_MAX); strcpy(cache_name, opt_dir); if (cleanable(opt_dir)) strcat(cache_name, ALT_PATH_STR CACHEFILE); @@ -158,22 +158,15 @@ read_cache(void) { FILE *fr; LIST_MEMBER *pentry; - char *Line = NULL; + char Line[LINESIZE + 1]; int result = 0; - Line = malloc(LINESIZE + 1); - if (!Line) - { - l2l_dbg(1, "Alloc Line failed\n"); - return 1; - } Line[LINESIZE] = '\0'; fr = fopen(cache_name, "r"); if (!fr) { l2l_dbg(1, "Open %s failed\n", cache_name); - free(Line); return 2; } cache.phead = cache.ptail = NULL; @@ -190,7 +183,6 @@ read_cache(void) } fclose(fr); - free(Line); return result; } @@ -198,7 +190,7 @@ int create_cache(int force, int skipImageBase) { FILE *fr, *fw; - char *Line = NULL, *Fname = NULL; + char Line[LINESIZE + 1], *Fname = NULL; int len, err; size_t ImageBase; @@ -229,9 +221,6 @@ create_cache(int force, int skipImageBase) } } - Line = malloc(LINESIZE + 1); - if (!Line) - return 1; Line[LINESIZE] = '\0'; remove(tmp_name); @@ -243,7 +232,6 @@ create_cache(int force, int skipImageBase) l2l_dbg(0, "Cannot list directory %s\n", opt_dir); l2l_dbg(1, "Failed to execute: '%s'\n", Line); remove(tmp_name); - free(Line); return 2; } l2l_dbg(0, "Creating cache ..."); @@ -280,7 +268,6 @@ create_cache(int force, int skipImageBase) fclose(fr); } remove(tmp_name); - free(Line); return 0; } diff --git a/sdk/tools/log2lines/log2lines.c b/sdk/tools/log2lines/log2lines.c index 606b57af14..f55e5ee5a1 100644 --- a/sdk/tools/log2lines/log2lines.c +++ b/sdk/tools/log2lines/log2lines.c @@ -410,9 +410,9 @@ translate_line(FILE *outFile, char *Line, char *path, char *LineOut) static int translate_files(FILE *inFile, FILE *outFile) { - char *Line = malloc(LINESIZE + 1); - char *path = malloc(LINESIZE + 1); - char *LineOut = malloc(LINESIZE + 1); + char Line[LINESIZE + 1]; + char path[LINESIZE + 1]; + char LineOut[LINESIZE + 1]; int c; unsigned char ch; int i = 0; @@ -420,8 +420,6 @@ translate_files(FILE *inFile, FILE *outFile) const char *p = kdbg_prompt; const char *p_eos = p + sizeof(KDBG_PROMPT) - 1; //end of string pos - if (Line && path && LineOut) - { memset(Line, '\0', LINESIZE + 1); if (opt_console) { @@ -536,7 +534,6 @@ translate_files(FILE *inFile, FILE *outFile) log(outFile, "%s", Line); } } - } if (opt_Revision && (strstr(opt_Revision, "regscan") == opt_Revision)) { @@ -555,9 +552,6 @@ translate_files(FILE *inFile, FILE *outFile) if (logFile) stat_print(logFile, &summ); } - free(LineOut); - free(Line); - free(path); return 0; }
6 years
1
0
0
0
[reactos] 02/02: [DDRAW] Remove useless 'else's.
by Serge Gautherie
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5e8e654dfdb4fc998757d…
commit 5e8e654dfdb4fc998757d203c3c521fae2ebdf12 Author: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr> AuthorDate: Thu Oct 11 18:48:17 2018 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sat Dec 8 17:10:36 2018 +0100 [DDRAW] Remove useless 'else's. --- dll/directx/ddraw/Ddraw/ddraw_displaymode.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dll/directx/ddraw/Ddraw/ddraw_displaymode.c b/dll/directx/ddraw/Ddraw/ddraw_displaymode.c index 5b5c910dc7..77677f85ff 100644 --- a/dll/directx/ddraw/Ddraw/ddraw_displaymode.c +++ b/dll/directx/ddraw/Ddraw/ddraw_displaymode.c @@ -78,19 +78,19 @@ Main_DirectDraw_EnumDisplayModes(LPDDRAWI_DIRECTDRAW_INT This, DWORD dwFlags, if(pDDSD) { - if(pDDSD->dwFlags & DDSD_HEIGHT && pDDSD->dwHeight != SurfaceDesc.dwHeight) + if (pDDSD->dwFlags & DDSD_HEIGHT && pDDSD->dwHeight != SurfaceDesc.dwHeight) continue; - else if(pDDSD->dwFlags & DDSD_WIDTH && pDDSD->dwWidth != SurfaceDesc.dwWidth) + if (pDDSD->dwFlags & DDSD_WIDTH && pDDSD->dwWidth != SurfaceDesc.dwWidth) continue; - else if(pDDSD->dwFlags & DDSD_PITCH && pDDSD->lPitch != SurfaceDesc.lPitch) + if (pDDSD->dwFlags & DDSD_PITCH && pDDSD->lPitch != SurfaceDesc.lPitch) continue; - else if(pDDSD->dwFlags & DDSD_REFRESHRATE && pDDSD->dwRefreshRate != SurfaceDesc.dwRefreshRate) + if (pDDSD->dwFlags & DDSD_REFRESHRATE && pDDSD->dwRefreshRate != SurfaceDesc.dwRefreshRate) continue; - else if(pDDSD->dwFlags & DDSD_PIXELFORMAT && pDDSD->ddpfPixelFormat.dwRGBBitCount != SurfaceDesc.ddpfPixelFormat.dwRGBBitCount) + if (pDDSD->dwFlags & DDSD_PIXELFORMAT && pDDSD->ddpfPixelFormat.dwRGBBitCount != SurfaceDesc.ddpfPixelFormat.dwRGBBitCount) continue; // FIXME: test for the other members of ddpfPixelFormat as well } @@ -176,19 +176,19 @@ Main_DirectDraw_EnumDisplayModes4(LPDDRAWI_DIRECTDRAW_INT This, DWORD dwFlags, if(pDDSD) { - if(pDDSD->dwFlags & DDSD_HEIGHT && pDDSD->dwHeight != SurfaceDesc.dwHeight) + if (pDDSD->dwFlags & DDSD_HEIGHT && pDDSD->dwHeight != SurfaceDesc.dwHeight) continue; - else if(pDDSD->dwFlags & DDSD_WIDTH && pDDSD->dwWidth != SurfaceDesc.dwWidth) + if (pDDSD->dwFlags & DDSD_WIDTH && pDDSD->dwWidth != SurfaceDesc.dwWidth) continue; - else if(pDDSD->dwFlags & DDSD_PITCH && pDDSD->lPitch != SurfaceDesc.lPitch) + if (pDDSD->dwFlags & DDSD_PITCH && pDDSD->lPitch != SurfaceDesc.lPitch) continue; - else if(pDDSD->dwFlags & DDSD_REFRESHRATE && pDDSD->dwRefreshRate != SurfaceDesc.dwRefreshRate) + if (pDDSD->dwFlags & DDSD_REFRESHRATE && pDDSD->dwRefreshRate != SurfaceDesc.dwRefreshRate) continue; - else if(pDDSD->dwFlags & DDSD_PIXELFORMAT && pDDSD->ddpfPixelFormat.dwRGBBitCount != SurfaceDesc.ddpfPixelFormat.dwRGBBitCount) + if (pDDSD->dwFlags & DDSD_PIXELFORMAT && pDDSD->ddpfPixelFormat.dwRGBBitCount != SurfaceDesc.ddpfPixelFormat.dwRGBBitCount) continue; // FIXME: test for the other members of ddpfPixelFormat as well }
6 years
1
0
0
0
[reactos] 01/02: [DDRAW] Fix two duplicate DDSD_WIDTH uses.
by Serge Gautherie
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=166c6e249818990e0546f…
commit 166c6e249818990e0546f7bdfde1c6f02f2a68c3 Author: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr> AuthorDate: Thu Oct 11 01:46:44 2018 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sat Dec 8 17:10:31 2018 +0100 [DDRAW] Fix two duplicate DDSD_WIDTH uses. Thanks to Kudratov Olimjon who reported this. CORE-8545 --- dll/directx/ddraw/Ddraw/ddraw_displaymode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dll/directx/ddraw/Ddraw/ddraw_displaymode.c b/dll/directx/ddraw/Ddraw/ddraw_displaymode.c index 5c6385b85f..5b5c910dc7 100644 --- a/dll/directx/ddraw/Ddraw/ddraw_displaymode.c +++ b/dll/directx/ddraw/Ddraw/ddraw_displaymode.c @@ -51,7 +51,7 @@ Main_DirectDraw_EnumDisplayModes(LPDDRAWI_DIRECTDRAW_INT This, DWORD dwFlags, iMode++; SurfaceDesc.dwSize = sizeof (DDSURFACEDESC); - SurfaceDesc.dwFlags = DDSD_HEIGHT | DDSD_WIDTH | DDSD_REFRESHRATE | DDSD_WIDTH | DDSD_PIXELFORMAT; + SurfaceDesc.dwFlags = DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT | DDSD_PITCH | DDSD_REFRESHRATE; SurfaceDesc.dwHeight = DevMode.dmPelsHeight; SurfaceDesc.dwWidth = DevMode.dmPelsWidth; SurfaceDesc.lPitch = DevMode.dmPelsWidth * DevMode.dmBitsPerPel / 8; @@ -149,7 +149,7 @@ Main_DirectDraw_EnumDisplayModes4(LPDDRAWI_DIRECTDRAW_INT This, DWORD dwFlags, iMode++; SurfaceDesc.dwSize = sizeof (DDSURFACEDESC2); - SurfaceDesc.dwFlags = DDSD_HEIGHT | DDSD_WIDTH | DDSD_REFRESHRATE | DDSD_WIDTH | DDSD_PIXELFORMAT; + SurfaceDesc.dwFlags = DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT | DDSD_PITCH | DDSD_REFRESHRATE; SurfaceDesc.dwHeight = DevMode.dmPelsHeight; SurfaceDesc.dwWidth = DevMode.dmPelsWidth; SurfaceDesc.lPitch = DevMode.dmPelsWidth * DevMode.dmBitsPerPel / 8;
6 years
1
0
0
0
[reactos] 01/01: [USERENV] Move some functions around to make it look nicer. No code changes.
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b9d4e2dae644e6380e8e5…
commit b9d4e2dae644e6380e8e5d87a49f5430232665fb Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Sat Dec 8 16:41:17 2018 +0100 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Sat Dec 8 16:41:17 2018 +0100 [USERENV] Move some functions around to make it look nicer. No code changes. --- dll/win32/userenv/profile.c | 207 ++++++++++++++++++++++---------------------- 1 file changed, 105 insertions(+), 102 deletions(-) diff --git a/dll/win32/userenv/profile.c b/dll/win32/userenv/profile.c index 077619e5aa..40d4b323af 100644 --- a/dll/win32/userenv/profile.c +++ b/dll/win32/userenv/profile.c @@ -106,6 +106,45 @@ AcquireRemoveRestorePrivilege(IN BOOL bAcquire) } +static +BOOL +CheckForLoadedProfile(HANDLE hToken) +{ + UNICODE_STRING SidString; + HKEY hKey; + + DPRINT("CheckForLoadedProfile() called\n"); + + /* Get the user SID string */ + if (!GetUserSidStringFromToken(hToken, &SidString)) + { + DPRINT1("GetUserSidStringFromToken() failed\n"); + return FALSE; + } + + if (RegOpenKeyExW(HKEY_USERS, + SidString.Buffer, + 0, + MAXIMUM_ALLOWED, + &hKey)) + { + DPRINT("Profile not loaded\n"); + RtlFreeUnicodeString(&SidString); + return FALSE; + } + + RegCloseKey(hKey); + + RtlFreeUnicodeString(&SidString); + + DPRINT("Profile already loaded\n"); + + return TRUE; +} + + +/* PUBLIC FUNCTIONS ********************************************************/ + BOOL WINAPI CopySystemProfile( @@ -672,6 +711,62 @@ done: } +BOOL +WINAPI +DeleteProfileA( + _In_ LPCSTR lpSidString, + _In_opt_ LPCSTR lpProfilePath, + _In_opt_ LPCSTR lpComputerName) +{ + BOOL bResult; + UNICODE_STRING SidString, ProfilePath, ComputerName; + + DPRINT("DeleteProfileA() called\n"); + + /* Conversion to UNICODE */ + if (lpSidString) + RtlCreateUnicodeStringFromAsciiz(&SidString, + (LPSTR)lpSidString); + + if (lpProfilePath) + RtlCreateUnicodeStringFromAsciiz(&ProfilePath, + (LPSTR)lpProfilePath); + + if (lpComputerName) + RtlCreateUnicodeStringFromAsciiz(&ComputerName, + (LPSTR)lpComputerName); + + /* Call the UNICODE function */ + bResult = DeleteProfileW(SidString.Buffer, + ProfilePath.Buffer, + ComputerName.Buffer); + + /* Memory cleanup */ + if (lpSidString) + RtlFreeUnicodeString(&SidString); + + if (lpProfilePath) + RtlFreeUnicodeString(&ProfilePath); + + if (lpComputerName) + RtlFreeUnicodeString(&ComputerName); + + return bResult; +} + + +BOOL +WINAPI +DeleteProfileW( + _In_ LPCWSTR lpSidString, + _In_opt_ LPCWSTR lpProfilePath, + _In_opt_ LPCWSTR lpComputerName) +{ + DPRINT1("DeleteProfileW() not implemented!\n"); + return FALSE; +} + + BOOL WINAPI GetAllUsersProfileDirectoryA( @@ -1051,6 +1146,16 @@ GetProfilesDirectoryW( } +BOOL +WINAPI +GetProfileType( + _Out_ PDWORD pdwFlags) +{ + DPRINT1("GetProfileType() not implemented!\n"); + return FALSE; +} + + BOOL WINAPI GetUserProfileDirectoryA( @@ -1195,43 +1300,6 @@ GetUserProfileDirectoryW( } -static -BOOL -CheckForLoadedProfile(HANDLE hToken) -{ - UNICODE_STRING SidString; - HKEY hKey; - - DPRINT("CheckForLoadedProfile() called\n"); - - /* Get the user SID string */ - if (!GetUserSidStringFromToken(hToken, &SidString)) - { - DPRINT1("GetUserSidStringFromToken() failed\n"); - return FALSE; - } - - if (RegOpenKeyExW(HKEY_USERS, - SidString.Buffer, - 0, - MAXIMUM_ALLOWED, - &hKey)) - { - DPRINT("Profile not loaded\n"); - RtlFreeUnicodeString(&SidString); - return FALSE; - } - - RegCloseKey(hKey); - - RtlFreeUnicodeString(&SidString); - - DPRINT("Profile already loaded\n"); - - return TRUE; -} - - BOOL WINAPI LoadUserProfileA( @@ -1566,69 +1634,4 @@ UnloadUserProfile( return TRUE; } - -BOOL -WINAPI -DeleteProfileW( - _In_ LPCWSTR lpSidString, - _In_opt_ LPCWSTR lpProfilePath, - _In_opt_ LPCWSTR lpComputerName) -{ - DPRINT1("DeleteProfileW() not implemented!\n"); - return FALSE; -} - - -BOOL -WINAPI -DeleteProfileA( - _In_ LPCSTR lpSidString, - _In_opt_ LPCSTR lpProfilePath, - _In_opt_ LPCSTR lpComputerName) -{ - BOOL bResult; - UNICODE_STRING SidString, ProfilePath, ComputerName; - - DPRINT("DeleteProfileA() called\n"); - - /* Conversion to UNICODE */ - if (lpSidString) - RtlCreateUnicodeStringFromAsciiz(&SidString, - (LPSTR)lpSidString); - - if (lpProfilePath) - RtlCreateUnicodeStringFromAsciiz(&ProfilePath, - (LPSTR)lpProfilePath); - - if (lpComputerName) - RtlCreateUnicodeStringFromAsciiz(&ComputerName, - (LPSTR)lpComputerName); - - /* Call the UNICODE function */ - bResult = DeleteProfileW(SidString.Buffer, - ProfilePath.Buffer, - ComputerName.Buffer); - - /* Memory cleanup */ - if (lpSidString) - RtlFreeUnicodeString(&SidString); - - if (lpProfilePath) - RtlFreeUnicodeString(&ProfilePath); - - if (lpComputerName) - RtlFreeUnicodeString(&ComputerName); - - return bResult; -} - - -BOOL -WINAPI -GetProfileType(_Out_ PDWORD pdwFlags) -{ - DPRINT1("GetProfileType() not implemented!\n"); - return FALSE; -} - /* EOF */
6 years
1
0
0
0
[reactos] 01/01: [PSDK] Add DeleteProfileA/W prototypes to userenv.h.
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d383d1c6b0bf7e4733692…
commit d383d1c6b0bf7e47336921c45ce4e020b3573517 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Sat Dec 8 15:22:23 2018 +0100 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Sat Dec 8 15:23:04 2018 +0100 [PSDK] Add DeleteProfileA/W prototypes to userenv.h. --- sdk/include/psdk/userenv.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sdk/include/psdk/userenv.h b/sdk/include/psdk/userenv.h index 3b5054e0f1..81deda29de 100644 --- a/sdk/include/psdk/userenv.h +++ b/sdk/include/psdk/userenv.h @@ -108,6 +108,11 @@ BOOL WINAPI CopyProfileDirectoryW(LPCWSTR, LPCWSTR, DWORD); PSID WINAPI GetUserSid(HANDLE); BOOL WINAPI CopySystemProfile(ULONG); /* end private */ + +#if(WINVER >= 0x0500) +BOOL WINAPI DeleteProfileA(LPCSTR, LPCSTR, LPCSTR); +BOOL WINAPI DeleteProfileW(LPCWSTR, LPCWSTR, LPCWSTR); +#endif BOOL WINAPI LoadUserProfileA (HANDLE, LPPROFILEINFOA); BOOL WINAPI LoadUserProfileW (HANDLE, LPPROFILEINFOW); BOOL WINAPI UnloadUserProfile (HANDLE, HANDLE); @@ -175,6 +180,9 @@ typedef LPPROFILEINFOW LPPROFILEINFO; #define DeleteItem DeleteItemW #define CopyProfileDirectory CopyProfileDirectoryW /* end private */ +#if (WINVER >= 0x0500) +#define DeleteProfile DeleteProfileW +#endif #define LoadUserProfile LoadUserProfileW #define GetAllUsersProfileDirectory GetAllUsersProfileDirectoryW #define GetDefaultUserProfileDirectory GetDefaultUserProfileDirectoryW @@ -202,6 +210,9 @@ typedef LPPROFILEINFOA LPPROFILEINFO; #define DeleteItem DeleteItemA #define CopyProfileDirectory CopyProfileDirectoryA /* end private */ +#if (WINVER >= 0x0500) +#define DeleteProfile DeleteProfileA +#endif #define LoadUserProfile LoadUserProfileA #define GetAllUsersProfileDirectory GetAllUsersProfileDirectoryA #define GetDefaultUserProfileDirectory GetDefaultUserProfileDirectoryA
6 years
1
0
0
0
← Newer
1
...
25
26
27
28
29
30
31
32
33
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Results per page:
10
25
50
100
200