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
January 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
37 participants
372 discussions
Start a n
N
ew thread
01/03: [RTL] actctx: Implement the implicit activation context
by Giannis Adamopoulos
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1e903d96cbdc78dbc9184…
commit 1e903d96cbdc78dbc91843cb599f6c31da627ff3 Author: Giannis Adamopoulos <gadamopoulos(a)reactos.org> AuthorDate: Thu Jan 18 16:53:59 2018 +0200 Commit: Giannis Adamopoulos <gadamopoulos(a)reactos.org> CommitDate: Sat Jan 27 02:45:50 2018 +0200 [RTL] actctx: Implement the implicit activation context --- media/CMakeLists.txt | 2 ++ media/systemcompatible.manifest | 8 ++++++++ sdk/lib/rtl/actctx.c | 26 ++++++++++++++++++++++++++ 3 files changed, 36 insertions(+) diff --git a/media/CMakeLists.txt b/media/CMakeLists.txt index 778555daa5..508ab79214 100644 --- a/media/CMakeLists.txt +++ b/media/CMakeLists.txt @@ -12,3 +12,5 @@ add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/drivers/etc/networks DESTINATION re add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/drivers/etc/protocol DESTINATION reactos/system32/drivers/etc FOR all) add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/drivers/etc/services DESTINATION reactos/system32/drivers/etc FOR all) add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/sounds/ReactOS_LogOn.wav DESTINATION reactos/media FOR all) + +add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/systemcompatible.manifest DESTINATION reactos/winsxs/manifests FOR all) \ No newline at end of file diff --git a/media/systemcompatible.manifest b/media/systemcompatible.manifest new file mode 100644 index 0000000000..e81ccfeeb2 --- /dev/null +++ b/media/systemcompatible.manifest @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> +<dependency> + <dependentAssembly> + <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="5.82.0.0" publicKeyToken="6595b64144ccf1df" processorArchitecture="*" language="*" /> + </dependentAssembly> +</dependency> +</assembly> diff --git a/sdk/lib/rtl/actctx.c b/sdk/lib/rtl/actctx.c index 6ce1734017..396b442fcd 100644 --- a/sdk/lib/rtl/actctx.c +++ b/sdk/lib/rtl/actctx.c @@ -15,6 +15,7 @@ /* Based on Wine Staging 1.7.37 */ #include <rtl.h> +#include <ntstrsafe.h> #define NDEBUG #include <debug.h> @@ -694,6 +695,7 @@ static const WCHAR wildcardW[] = {'*',0}; static ACTIVATION_CONTEXT_WRAPPED system_actctx = { ACTCTX_MAGIC_MARKER, { 1 } }; static ACTIVATION_CONTEXT *process_actctx = &system_actctx.ActivationContext; +static ACTIVATION_CONTEXT *implicit_actctx = &system_actctx.ActivationContext; static WCHAR *strdupW(const WCHAR* str) { @@ -4657,6 +4659,8 @@ void actctx_init(void) { ACTCTXW ctx; HANDLE handle; + WCHAR buffer[1024]; + NTSTATUS Status; ctx.cbSize = sizeof(ctx); ctx.lpSource = NULL; @@ -4668,6 +4672,22 @@ void actctx_init(void) { process_actctx = check_actctx(handle); } + + ctx.dwFlags = 0; + ctx.hModule = NULL; + ctx.lpResourceName = NULL; + ctx.lpSource = buffer; + RtlStringCchCopyW(buffer, 1024, SharedUserData->NtSystemRoot); + RtlStringCchCatW(buffer, 1024, L"\\winsxs\\manifests\\systemcompatible.manifest"); + Status = RtlCreateActivationContext(0, (PVOID)&ctx, 0, NULL, NULL, &handle); + if (NT_SUCCESS(Status)) + { + implicit_actctx = check_actctx(handle); + } + else + { + DPRINT1("Failed to create the implicit act ctx. Status: 0x%x!!!\n", Status); + } } /* FUNCTIONS ***************************************************************/ @@ -5350,6 +5370,9 @@ NTSTATUS NTAPI RtlFindActivationContextSectionString( ULONG flags, const GUID *g if (status != STATUS_SUCCESS) status = find_string( process_actctx, section_kind, section_name, flags, data ); + if (status != STATUS_SUCCESS) + status = find_string( implicit_actctx, section_kind, section_name, flags, data ); + DPRINT("RtlFindActivationContextSectionString() returns status %x\n", status); return status; } @@ -5390,6 +5413,9 @@ NTSTATUS WINAPI RtlFindActivationContextSectionGuid( ULONG flags, const GUID *ex if (status != STATUS_SUCCESS) status = find_guid( process_actctx, section_kind, guid, flags, data ); + if (status != STATUS_SUCCESS) + status = find_guid( implicit_actctx, section_kind, guid, flags, data ); + return status; }
6 years, 11 months
1
0
0
0
01/01: [FREELDR] FreeLdr debug.h does not care about NDEBUG. (#201)
by Serge Gautherie
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=50afbd48d4c1ffc6d8e2b…
commit 50afbd48d4c1ffc6d8e2b98d5000cace3c71aaee Author: Serge Gautherie <32623169+SergeGautherie(a)users.noreply.github.com> AuthorDate: Sat Jan 27 00:34:21 2018 +0100 Commit: Ged Murphy <gedmurphy(a)reactos.org> CommitDate: Fri Jan 26 23:34:21 2018 +0000 [FREELDR] FreeLdr debug.h does not care about NDEBUG. (#201) - Remove all "#define NDEBUG". --- boot/freeldr/freeldr/arch/archwsup.c | 2 +- boot/freeldr/freeldr/arch/i386/halstub.c | 2 +- boot/freeldr/freeldr/arch/i386/hardware.c | 1 - boot/freeldr/freeldr/arch/i386/hwapm.c | 1 - boot/freeldr/freeldr/arch/i386/hwdisk.c | 1 - boot/freeldr/freeldr/arch/i386/hwpci.c | 1 - boot/freeldr/freeldr/arch/i386/i386bug.c | 1 - boot/freeldr/freeldr/arch/i386/i386vid.c | 1 - boot/freeldr/freeldr/arch/i386/machpc.c | 1 - boot/freeldr/freeldr/arch/i386/machxbox.c | 1 - boot/freeldr/freeldr/arch/i386/pcdisk.c | 1 - boot/freeldr/freeldr/arch/i386/pcmem.c | 1 - boot/freeldr/freeldr/arch/i386/pcvideo.c | 1 - boot/freeldr/freeldr/arch/i386/xboxdisk.c | 1 - boot/freeldr/freeldr/arch/powerpc/loader.c | 1 - boot/freeldr/freeldr/arch/powerpc/mboot.c | 1 - boot/freeldr/freeldr/disk/disk.c | 1 - boot/freeldr/freeldr/disk/partition.c | 1 - boot/freeldr/freeldr/disk/ramdisk.c | 2 +- boot/freeldr/freeldr/disk/scsiport.c | 1 - boot/freeldr/freeldr/lib/fs/fat.c | 1 - boot/freeldr/freeldr/lib/fs/fs.c | 1 - boot/freeldr/freeldr/lib/fs/pxe.c | 1 - 23 files changed, 3 insertions(+), 23 deletions(-) diff --git a/boot/freeldr/freeldr/arch/archwsup.c b/boot/freeldr/freeldr/arch/archwsup.c index 14c08c293b..cad4226168 100644 --- a/boot/freeldr/freeldr/arch/archwsup.c +++ b/boot/freeldr/freeldr/arch/archwsup.c @@ -9,7 +9,7 @@ /* INCLUDES *******************************************************************/ #include <freeldr.h> -#define NDEBUG + #include <debug.h> /* GLOBALS ********************************************************************/ diff --git a/boot/freeldr/freeldr/arch/i386/halstub.c b/boot/freeldr/freeldr/arch/i386/halstub.c index 2bcff89969..6a43d5e287 100644 --- a/boot/freeldr/freeldr/arch/i386/halstub.c +++ b/boot/freeldr/freeldr/arch/i386/halstub.c @@ -9,7 +9,7 @@ /* INCLUDES ******************************************************************/ #include <ntoskrnl.h> -#define NDEBUG + #include <debug.h> /* FUNCTIONS *****************************************************************/ diff --git a/boot/freeldr/freeldr/arch/i386/hardware.c b/boot/freeldr/freeldr/arch/i386/hardware.c index 62ee77f4de..f9aa78dedb 100644 --- a/boot/freeldr/freeldr/arch/i386/hardware.c +++ b/boot/freeldr/freeldr/arch/i386/hardware.c @@ -21,7 +21,6 @@ #include <freeldr.h> -#define NDEBUG #include <debug.h> DBG_DEFAULT_CHANNEL(HWDETECT); diff --git a/boot/freeldr/freeldr/arch/i386/hwapm.c b/boot/freeldr/freeldr/arch/i386/hwapm.c index 3a7d733bcd..c5a822802c 100644 --- a/boot/freeldr/freeldr/arch/i386/hwapm.c +++ b/boot/freeldr/freeldr/arch/i386/hwapm.c @@ -20,7 +20,6 @@ #include <freeldr.h> -#define NDEBUG #include <debug.h> DBG_DEFAULT_CHANNEL(HWDETECT); diff --git a/boot/freeldr/freeldr/arch/i386/hwdisk.c b/boot/freeldr/freeldr/arch/i386/hwdisk.c index 59b028b86e..f20ee62ce6 100644 --- a/boot/freeldr/freeldr/arch/i386/hwdisk.c +++ b/boot/freeldr/freeldr/arch/i386/hwdisk.c @@ -21,7 +21,6 @@ #include <freeldr.h> -#define NDEBUG #include <debug.h> DBG_DEFAULT_CHANNEL(HWDETECT); diff --git a/boot/freeldr/freeldr/arch/i386/hwpci.c b/boot/freeldr/freeldr/arch/i386/hwpci.c index 17b8e8d3b7..c5bb0061b3 100644 --- a/boot/freeldr/freeldr/arch/i386/hwpci.c +++ b/boot/freeldr/freeldr/arch/i386/hwpci.c @@ -20,7 +20,6 @@ #include <freeldr.h> -#define NDEBUG #include <debug.h> DBG_DEFAULT_CHANNEL(HWDETECT); diff --git a/boot/freeldr/freeldr/arch/i386/i386bug.c b/boot/freeldr/freeldr/arch/i386/i386bug.c index 0d4929b7b9..c5c82af688 100644 --- a/boot/freeldr/freeldr/arch/i386/i386bug.c +++ b/boot/freeldr/freeldr/arch/i386/i386bug.c @@ -1,7 +1,6 @@ #include <freeldr.h> -#define NDEBUG #include <debug.h> typedef struct _FRAME diff --git a/boot/freeldr/freeldr/arch/i386/i386vid.c b/boot/freeldr/freeldr/arch/i386/i386vid.c index 0d5db0abf7..1138321fab 100644 --- a/boot/freeldr/freeldr/arch/i386/i386vid.c +++ b/boot/freeldr/freeldr/arch/i386/i386vid.c @@ -19,7 +19,6 @@ #include <freeldr.h> -#define NDEBUG #include <debug.h> DBG_DEFAULT_CHANNEL(HWDETECT); diff --git a/boot/freeldr/freeldr/arch/i386/machpc.c b/boot/freeldr/freeldr/arch/i386/machpc.c index ec1ab9a91c..c846bf80ae 100644 --- a/boot/freeldr/freeldr/arch/i386/machpc.c +++ b/boot/freeldr/freeldr/arch/i386/machpc.c @@ -19,7 +19,6 @@ #include <freeldr.h> #include <cportlib/cportlib.h> -#define NDEBUG #include <debug.h> DBG_DEFAULT_CHANNEL(HWDETECT); diff --git a/boot/freeldr/freeldr/arch/i386/machxbox.c b/boot/freeldr/freeldr/arch/i386/machxbox.c index 3feac4788a..7dffa2baab 100644 --- a/boot/freeldr/freeldr/arch/i386/machxbox.c +++ b/boot/freeldr/freeldr/arch/i386/machxbox.c @@ -18,7 +18,6 @@ #include <freeldr.h> -#define NDEBUG #include <debug.h> DBG_DEFAULT_CHANNEL(HWDETECT); diff --git a/boot/freeldr/freeldr/arch/i386/pcdisk.c b/boot/freeldr/freeldr/arch/i386/pcdisk.c index 7c282a6f90..d371c44c99 100644 --- a/boot/freeldr/freeldr/arch/i386/pcdisk.c +++ b/boot/freeldr/freeldr/arch/i386/pcdisk.c @@ -21,7 +21,6 @@ #include <freeldr.h> -#define NDEBUG #include <debug.h> DBG_DEFAULT_CHANNEL(DISK); diff --git a/boot/freeldr/freeldr/arch/i386/pcmem.c b/boot/freeldr/freeldr/arch/i386/pcmem.c index 5741a8414c..af4d73cd2c 100644 --- a/boot/freeldr/freeldr/arch/i386/pcmem.c +++ b/boot/freeldr/freeldr/arch/i386/pcmem.c @@ -25,7 +25,6 @@ #include <freeldr.h> #include <arch/pc/x86common.h> -#define NDEBUG #include <debug.h> DBG_DEFAULT_CHANNEL(MEMORY); diff --git a/boot/freeldr/freeldr/arch/i386/pcvideo.c b/boot/freeldr/freeldr/arch/i386/pcvideo.c index bea6a5bb87..97327122ba 100644 --- a/boot/freeldr/freeldr/arch/i386/pcvideo.c +++ b/boot/freeldr/freeldr/arch/i386/pcvideo.c @@ -19,7 +19,6 @@ #include <freeldr.h> #include <suppress.h> -#define NDEBUG #include <debug.h> #define VIDEOPORT_PALETTE_READ 0x03C7 diff --git a/boot/freeldr/freeldr/arch/i386/xboxdisk.c b/boot/freeldr/freeldr/arch/i386/xboxdisk.c index 71b398d61b..dcdf319909 100644 --- a/boot/freeldr/freeldr/arch/i386/xboxdisk.c +++ b/boot/freeldr/freeldr/arch/i386/xboxdisk.c @@ -23,7 +23,6 @@ #include <freeldr.h> -#define NDEBUG #include <debug.h> DBG_DEFAULT_CHANNEL(DISK); diff --git a/boot/freeldr/freeldr/arch/powerpc/loader.c b/boot/freeldr/freeldr/arch/powerpc/loader.c index 24c958a797..c977064165 100644 --- a/boot/freeldr/freeldr/arch/powerpc/loader.c +++ b/boot/freeldr/freeldr/arch/powerpc/loader.c @@ -20,7 +20,6 @@ #define _NTSYSTEM_ #include <freeldr.h> -#define NDEBUG #include <debug.h> #define DbgPrint printf diff --git a/boot/freeldr/freeldr/arch/powerpc/mboot.c b/boot/freeldr/freeldr/arch/powerpc/mboot.c index 07b05713b8..d08e5efece 100644 --- a/boot/freeldr/freeldr/arch/powerpc/mboot.c +++ b/boot/freeldr/freeldr/arch/powerpc/mboot.c @@ -25,7 +25,6 @@ #include "ppcmmu/mmu.h" #include "compat.h" -#define NDEBUG #include <debug.h> /* We'll check this to see if we're in OFW land */ diff --git a/boot/freeldr/freeldr/disk/disk.c b/boot/freeldr/freeldr/disk/disk.c index 012e4fd1d7..46da0be1f7 100644 --- a/boot/freeldr/freeldr/disk/disk.c +++ b/boot/freeldr/freeldr/disk/disk.c @@ -20,7 +20,6 @@ #ifndef _M_ARM #include <freeldr.h> -#define NDEBUG #include <debug.h> DBG_DEFAULT_CHANNEL(DISK); diff --git a/boot/freeldr/freeldr/disk/partition.c b/boot/freeldr/freeldr/disk/partition.c index cf3d8b3929..df2d1a7055 100644 --- a/boot/freeldr/freeldr/disk/partition.c +++ b/boot/freeldr/freeldr/disk/partition.c @@ -25,7 +25,6 @@ #ifndef _M_ARM #include <freeldr.h> -#define NDEBUG #include <debug.h> DBG_DEFAULT_CHANNEL(DISK); diff --git a/boot/freeldr/freeldr/disk/ramdisk.c b/boot/freeldr/freeldr/disk/ramdisk.c index 0afc702aa1..8f2edc6a13 100644 --- a/boot/freeldr/freeldr/disk/ramdisk.c +++ b/boot/freeldr/freeldr/disk/ramdisk.c @@ -10,7 +10,7 @@ /* INCLUDES *******************************************************************/ #include <freeldr.h> -#define NDEBUG + #include <debug.h> /* GLOBALS ********************************************************************/ diff --git a/boot/freeldr/freeldr/disk/scsiport.c b/boot/freeldr/freeldr/disk/scsiport.c index 22cf72e8c3..7f206aafe6 100644 --- a/boot/freeldr/freeldr/disk/scsiport.c +++ b/boot/freeldr/freeldr/disk/scsiport.c @@ -48,7 +48,6 @@ #undef ScsiPortReadRegisterUlong #undef ScsiPortReadRegisterUshort -#define NDEBUG #include <debug.h> #define SCSI_PORT_NEXT_REQUEST_READY 0x0008 diff --git a/boot/freeldr/freeldr/lib/fs/fat.c b/boot/freeldr/freeldr/lib/fs/fat.c index 986f6bf198..6af232b3ac 100644 --- a/boot/freeldr/freeldr/lib/fs/fat.c +++ b/boot/freeldr/freeldr/lib/fs/fat.c @@ -20,7 +20,6 @@ #include <freeldr.h> -#define NDEBUG #include <debug.h> DBG_DEFAULT_CHANNEL(FILESYSTEM); diff --git a/boot/freeldr/freeldr/lib/fs/fs.c b/boot/freeldr/freeldr/lib/fs/fs.c index ff801d0e90..74958d0427 100644 --- a/boot/freeldr/freeldr/lib/fs/fs.c +++ b/boot/freeldr/freeldr/lib/fs/fs.c @@ -22,7 +22,6 @@ #include <freeldr.h> -#define NDEBUG #include <debug.h> DBG_DEFAULT_CHANNEL(FILESYSTEM); diff --git a/boot/freeldr/freeldr/lib/fs/pxe.c b/boot/freeldr/freeldr/lib/fs/pxe.c index c38417503d..ea91710a4f 100644 --- a/boot/freeldr/freeldr/lib/fs/pxe.c +++ b/boot/freeldr/freeldr/lib/fs/pxe.c @@ -19,7 +19,6 @@ #include <freeldr.h> -#define NDEBUG #include <debug.h> #define TAG_PXE_FILE 'FexP'
6 years, 11 months
1
0
0
0
01/01: [SNDVOL32] Fix controls' offset (#280)
by toehead2001
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a30d12dde782424e3cf32…
commit a30d12dde782424e3cf324118e44a9293c0b56b3 Author: toehead2001 <toehead2001(a)users.noreply.github.com> AuthorDate: Fri Jan 26 21:30:15 2018 +0000 Commit: Alexander Shaposhnikov <sanchaez(a)reactos.org> CommitDate: Fri Jan 26 23:30:15 2018 +0200 [SNDVOL32] Fix controls' offset (#280) CORE-9108 --- base/applications/sndvol32/dialog.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/base/applications/sndvol32/dialog.c b/base/applications/sndvol32/dialog.c index 857413c374..5c74e22b33 100644 --- a/base/applications/sndvol32/dialog.c +++ b/base/applications/sndvol32/dialog.c @@ -104,7 +104,7 @@ AddDialogControl( default: /* FIXME */ assert(0); - ClassName = 0; + ClassName = NULL; } } else @@ -112,12 +112,15 @@ AddDialogControl( /* class name is encoded as string */ ClassName = (LPWSTR)Offset; - /* adjust offset */ - Offset += wcslen(ClassName) + 1; + /* move offset to the end of class string */ + Offset += wcslen(ClassName); - /* get offset */ + /* get window name */ WindowName = (LPWSTR)(Offset + 1); } + + /* move offset past class type/string */ + Offset++; if (DialogItem->id == MAXWORD) { @@ -176,16 +179,8 @@ AddDialogControl( if (WindowName != NULL) { - /* position offset to start of name */ - Offset++; - - /* move offset past name */ - Offset += wcslen((LPWSTR)Offset) + 1; - } - else - { - /* no name so just adjust offset */ - Offset++; + /* move offset past window name */ + Offset += wcslen(WindowName) + 1; } /* check if there is additional data */ @@ -196,7 +191,8 @@ AddDialogControl( } else { - /* add data offset */ + /* FIXME: Determine whether this should be "Offset += 1 + *Offset" to explicitly skip the data count too. */ + /* skip past additional data */ Offset += *Offset; }
6 years, 11 months
1
0
0
0
01/01: [GDI32_APITEST] Add GetTextMetrics tests to gdi32_apitest (#307)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=19f8ed2b7a1698da837a5…
commit 19f8ed2b7a1698da837a5aef27ddb66385fc1016 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sat Jan 27 06:23:00 2018 +0900 Commit: Alexander Shaposhnikov <sanchaez(a)reactos.org> CommitDate: Fri Jan 26 23:23:00 2018 +0200 [GDI32_APITEST] Add GetTextMetrics tests to gdi32_apitest (#307) CORE-13840 --- modules/rostests/apitests/gdi32/CMakeLists.txt | 1 + modules/rostests/apitests/gdi32/GetTextMetrics.c | 518 +++++++++++++++++++++++ modules/rostests/apitests/gdi32/testlist.c | 2 + 3 files changed, 521 insertions(+) diff --git a/modules/rostests/apitests/gdi32/CMakeLists.txt b/modules/rostests/apitests/gdi32/CMakeLists.txt index 75255b3d27..4290fce8d6 100644 --- a/modules/rostests/apitests/gdi32/CMakeLists.txt +++ b/modules/rostests/apitests/gdi32/CMakeLists.txt @@ -53,6 +53,7 @@ list(APPEND SOURCE GetStockObject.c GetTextExtentExPoint.c GetTextFace.c + GetTextMetrics.c MaskBlt.c NtGdiAddFontResource.c OffsetClipRgn.c diff --git a/modules/rostests/apitests/gdi32/GetTextMetrics.c b/modules/rostests/apitests/gdi32/GetTextMetrics.c new file mode 100644 index 0000000000..9fb056f9b9 --- /dev/null +++ b/modules/rostests/apitests/gdi32/GetTextMetrics.c @@ -0,0 +1,518 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) + * PURPOSE: Test for GetTextMetrics and GetTextExtentPoint32 + * COPYRIGHT: Copyright 2018 Katayama Hirofumi MZ (katayama.hirofumi.mz(a)gmail.com) + */ + +#include "precomp.h" + +/* #define EMIT_TESTCASES */ + +typedef struct TEST_ENTRY +{ + int line; + LONG lfHeight; + LONG lfWidth; + LONG cxText; + LONG cyText; + LONG tmHeight; + LONG tmAscent; + LONG tmDescent; + LONG tmInternalLeading; + LONG tmExternalLeading; +} TEST_ENTRY; + +#ifdef EMIT_TESTCASES +static const TEST_ENTRY g_test_entries[] = +{ + { __LINE__, 400, 0 }, + { __LINE__, 300, 0 }, + { __LINE__, 200, 0 }, + { __LINE__, 100, 0 }, + { __LINE__, 64, 0 }, + { __LINE__, 32, 0 }, + { __LINE__, 16, 0 }, + { __LINE__, 15, 0 }, + { __LINE__, 14, 0 }, + { __LINE__, 13, 0 }, + { __LINE__, 12, 0 }, + { __LINE__, 11, 0 }, + { __LINE__, 10, 0 }, + { __LINE__, 9, 0 }, + { __LINE__, 8, 0 }, + { __LINE__, 7, 0 }, + { __LINE__, 6, 0 }, + { __LINE__, 5, 0 }, + { __LINE__, 4, 0 }, + { __LINE__, 3, 0 }, + { __LINE__, 2, 0 }, + { __LINE__, 1, 0 }, + { __LINE__, 0, 0 }, + { __LINE__, -1, 0 }, + { __LINE__, -2, 0 }, + { __LINE__, -3, 0 }, + { __LINE__, -4, 0 }, + { __LINE__, -5, 0 }, + { __LINE__, -6, 0 }, + { __LINE__, -7, 0 }, + { __LINE__, -8, 0 }, + { __LINE__, -9, 0 }, + { __LINE__, -10, 0 }, + { __LINE__, -11, 0 }, + { __LINE__, -12, 0 }, + { __LINE__, -13, 0 }, + { __LINE__, -14, 0 }, + { __LINE__, -15, 0 }, + { __LINE__, -16, 0 }, + { __LINE__, -32, 0 }, + { __LINE__, -64, 0 }, + { __LINE__, -100, 0 }, + { __LINE__, -200, 0 }, + { __LINE__, -300, 0 }, + { __LINE__, -400, 0 }, +}; +#define g_test_entry_count _countof(g_test_entries) +#else +static const TEST_ENTRY g_FREEMONO[] = +{ + { __LINE__, 400, 0, 3600, 400, 400, 320, 80, 0, 0 }, + { __LINE__, 300, 0, 2700, 300, 300, 240, 60, 0, 0 }, + { __LINE__, 200, 0, 1800, 200, 200, 160, 40, 0, 0 }, + { __LINE__, 100, 0, 900, 100, 100, 80, 20, 0, 0 }, + { __LINE__, 64, 0, 570, 64, 64, 51, 13, 0, 0 }, + { __LINE__, 32, 0, 285, 32, 32, 26, 6, 0, 0 }, + { __LINE__, 16, 0, 150, 16, 16, 13, 3, 0, 0 }, + { __LINE__, 15, 0, 135, 15, 15, 12, 3, 0, 0 }, + { __LINE__, 14, 0, 120, 14, 14, 11, 3, 0, 0 }, + { __LINE__, 13, 0, 120, 13, 13, 10, 3, 0, 0 }, + { __LINE__, 12, 0, 105, 12, 12, 10, 2, 0, 0 }, + { __LINE__, 11, 0, 105, 11, 11, 9, 2, 0, 0 }, + { __LINE__, 10, 0, 90, 10, 10, 8, 2, 0, 0 }, + { __LINE__, 9, 0, 77, 9, 9, 7, 2, 0, 0 }, + { __LINE__, 8, 0, 75, 8, 8, 6, 2, 0, 0 }, + { __LINE__, 7, 0, 60, 7, 7, 6, 1, 0, 0 }, + { __LINE__, 6, 0, 60, 6, 6, 5, 1, 0, 0 }, + { __LINE__, 5, 0, 45, 5, 5, 4, 1, 0, 0 }, + { __LINE__, 4, 0, 30, 4, 4, 3, 1, 0, 0 }, + { __LINE__, 3, 0, 30, 3, 3, 2, 1, 0, 0 }, + { __LINE__, 2, 0, 15, 2, 2, 2, 0, 0, 0 }, + { __LINE__, 1, 0, 15, 2, 2, 2, 0, 0, 0 }, + { __LINE__, 0, 0, -165, -18, -18, -14, -4, 0, 0 }, + { __LINE__, -1, 0, 15, 2, 2, 2, 0, 0, 0 }, + { __LINE__, -2, 0, 15, 2, 2, 2, 0, 0, 0 }, + { __LINE__, -3, 0, 30, 3, 3, 2, 1, 0, 0 }, + { __LINE__, -4, 0, 30, 4, 4, 3, 1, 0, 0 }, + { __LINE__, -5, 0, 45, 5, 5, 4, 1, 0, 0 }, + { __LINE__, -6, 0, 60, 6, 6, 5, 1, 0, 0 }, + { __LINE__, -7, 0, 60, 7, 7, 6, 1, 0, 0 }, + { __LINE__, -8, 0, 75, 8, 8, 6, 2, 0, 0 }, + { __LINE__, -9, 0, 77, 9, 9, 7, 2, 0, 0 }, + { __LINE__, -10, 0, 90, 10, 10, 8, 2, 0, 0 }, + { __LINE__, -11, 0, 105, 11, 11, 9, 2, 0, 0 }, + { __LINE__, -12, 0, 105, 12, 12, 10, 2, 0, 0 }, + { __LINE__, -13, 0, 120, 13, 13, 10, 3, 0, 0 }, + { __LINE__, -14, 0, 120, 14, 14, 11, 3, 0, 0 }, + { __LINE__, -15, 0, 135, 15, 15, 12, 3, 0, 0 }, + { __LINE__, -16, 0, 150, 16, 16, 13, 3, 0, 0 }, + { __LINE__, -32, 0, 285, 32, 32, 26, 6, 0, 0 }, + { __LINE__, -64, 0, 570, 64, 64, 51, 13, 0, 0 }, + { __LINE__, -100, 0, 900, 100, 100, 80, 20, 0, 0 }, + { __LINE__, -200, 0, 1800, 200, 200, 160, 40, 0, 0 }, + { __LINE__, -300, 0, 2700, 300, 300, 240, 60, 0, 0 }, + { __LINE__, -400, 0, 3600, 400, 400, 320, 80, 0, 0 }, +}; +#define g_FREEMONO_count _countof(g_FREEMONO) + +static const TEST_ENTRY g_DEJAVUSERIF[] = +{ + { __LINE__, 400, 0, 2323, 400, 400, 319, 81, 56, 0 }, + { __LINE__, 300, 0, 1743, 300, 300, 239, 61, 42, 0 }, + { __LINE__, 200, 0, 1162, 200, 200, 159, 41, 28, 0 }, + { __LINE__, 100, 0, 580, 100, 100, 80, 20, 14, 0 }, + { __LINE__, 64, 0, 370, 64, 64, 51, 13, 9, 0 }, + { __LINE__, 32, 0, 190, 32, 32, 26, 6, 4, 0 }, + { __LINE__, 16, 0, 91, 16, 16, 13, 3, 2, 0 }, + { __LINE__, 15, 0, 84, 15, 15, 12, 3, 2, 0 }, + { __LINE__, 14, 0, 82, 14, 14, 11, 3, 2, 0 }, + { __LINE__, 13, 0, 77, 13, 13, 10, 3, 2, 0 }, + { __LINE__, 12, 0, 66, 12, 12, 10, 2, 2, 0 }, + { __LINE__, 11, 0, 63, 11, 11, 9, 2, 2, 0 }, + { __LINE__, 10, 0, 63, 10, 10, 8, 2, 1, 0 }, + { __LINE__, 9, 0, 56, 9, 9, 7, 2, 1, 0 }, + { __LINE__, 8, 0, 49, 8, 8, 6, 2, 1, 0 }, + { __LINE__, 7, 0, 42, 7, 7, 6, 1, 1, 0 }, + { __LINE__, 6, 0, 36, 6, 6, 5, 1, 1, 0 }, + { __LINE__, 5, 0, 26, 5, 5, 4, 1, 1, 0 }, + { __LINE__, 4, 0, 22, 4, 4, 3, 1, 1, 0 }, + { __LINE__, 3, 0, 22, 3, 3, 2, 1, 0, 0 }, + { __LINE__, 2, 0, 15, 2, 2, 2, 0, 0, 0 }, + { __LINE__, 1, 0, 15, 2, 2, 2, 0, 0, 0 }, + { __LINE__, 0, 0, -125, -21, -21, -17, -4, -3, 0 }, + { __LINE__, -1, 0, 15, 2, 2, 2, 0, 0, 0 }, + { __LINE__, -2, 0, 15, 2, 2, 2, 0, 0, 0 }, + { __LINE__, -3, 0, 22, 4, 4, 3, 1, 1, 0 }, + { __LINE__, -4, 0, 26, 5, 5, 4, 1, 1, 0 }, + { __LINE__, -5, 0, 36, 6, 6, 5, 1, 1, 0 }, + { __LINE__, -6, 0, 42, 7, 7, 6, 1, 1, 0 }, + { __LINE__, -7, 0, 49, 8, 8, 6, 2, 1, 0 }, + { __LINE__, -8, 0, 56, 9, 9, 7, 2, 1, 0 }, + { __LINE__, -9, 0, 63, 10, 10, 8, 2, 1, 0 }, + { __LINE__, -10, 0, 66, 11, 11, 9, 2, 1, 0 }, + { __LINE__, -11, 0, 77, 13, 13, 10, 3, 2, 0 }, + { __LINE__, -12, 0, 82, 14, 14, 11, 3, 2, 0 }, + { __LINE__, -13, 0, 84, 15, 15, 12, 3, 2, 0 }, + { __LINE__, -14, 0, 91, 16, 16, 13, 3, 2, 0 }, + { __LINE__, -15, 0, 103, 18, 18, 14, 4, 3, 0 }, + { __LINE__, -16, 0, 114, 19, 19, 15, 4, 3, 0 }, + { __LINE__, -32, 0, 214, 38, 38, 30, 8, 6, 0 }, + { __LINE__, -64, 0, 431, 74, 74, 59, 15, 10, 0 }, + { __LINE__, -100, 0, 674, 117, 117, 93, 24, 17, 0 }, + { __LINE__, -200, 0, 1352, 233, 233, 186, 47, 33, 0 }, + { __LINE__, -300, 0, 2026, 349, 349, 278, 71, 49, 0 }, + { __LINE__, -400, 0, 2702, 465, 465, 371, 94, 65, 0 }, +}; +#define g_DEJAVUSERIF_count _countof(g_DEJAVUSERIF) + +static const TEST_ENTRY g_DEJAVUSANS[] = +{ + { __LINE__, 400, 0, 2286, 400, 400, 319, 81, 56, 0 }, + { __LINE__, 300, 0, 1715, 300, 300, 239, 61, 42, 0 }, + { __LINE__, 200, 0, 1145, 200, 200, 159, 41, 28, 0 }, + { __LINE__, 100, 0, 573, 100, 100, 80, 20, 14, 0 }, + { __LINE__, 64, 0, 366, 64, 64, 51, 13, 9, 0 }, + { __LINE__, 32, 0, 188, 32, 32, 26, 6, 4, 0 }, + { __LINE__, 16, 0, 91, 16, 16, 13, 3, 2, 0 }, + { __LINE__, 15, 0, 84, 15, 15, 12, 3, 2, 0 }, + { __LINE__, 14, 0, 84, 14, 14, 11, 3, 2, 0 }, + { __LINE__, 13, 0, 79, 13, 13, 10, 3, 2, 0 }, + { __LINE__, 12, 0, 62, 12, 12, 10, 2, 2, 0 }, + { __LINE__, 11, 0, 64, 11, 11, 9, 2, 2, 0 }, + { __LINE__, 10, 0, 64, 10, 10, 8, 2, 1, 0 }, + { __LINE__, 9, 0, 54, 9, 9, 7, 2, 1, 0 }, + { __LINE__, 8, 0, 46, 8, 8, 6, 2, 1, 0 }, + { __LINE__, 7, 0, 41, 7, 7, 6, 1, 1, 0 }, + { __LINE__, 6, 0, 35, 6, 6, 5, 1, 1, 0 }, + { __LINE__, 5, 0, 25, 5, 5, 4, 1, 1, 0 }, + { __LINE__, 4, 0, 22, 4, 4, 3, 1, 1, 0 }, + { __LINE__, 3, 0, 22, 3, 3, 2, 1, 0, 0 }, + { __LINE__, 2, 0, 15, 2, 2, 2, 0, 0, 0 }, + { __LINE__, 1, 0, 15, 2, 2, 2, 0, 0, 0 }, + { __LINE__, 0, 0, -116, -21, -21, -17, -4, -3, 0 }, + { __LINE__, -1, 0, 15, 2, 2, 2, 0, 0, 0 }, + { __LINE__, -2, 0, 15, 2, 2, 2, 0, 0, 0 }, + { __LINE__, -3, 0, 22, 4, 4, 3, 1, 1, 0 }, + { __LINE__, -4, 0, 25, 5, 5, 4, 1, 1, 0 }, + { __LINE__, -5, 0, 35, 6, 6, 5, 1, 1, 0 }, + { __LINE__, -6, 0, 41, 7, 7, 6, 1, 1, 0 }, + { __LINE__, -7, 0, 46, 8, 8, 6, 2, 1, 0 }, + { __LINE__, -8, 0, 54, 9, 9, 7, 2, 1, 0 }, + { __LINE__, -9, 0, 64, 10, 10, 8, 2, 1, 0 }, + { __LINE__, -10, 0, 62, 11, 11, 9, 2, 1, 0 }, + { __LINE__, -11, 0, 79, 13, 13, 10, 3, 2, 0 }, + { __LINE__, -12, 0, 84, 14, 14, 11, 3, 2, 0 }, + { __LINE__, -13, 0, 84, 15, 15, 12, 3, 2, 0 }, + { __LINE__, -14, 0, 91, 16, 16, 13, 3, 2, 0 }, + { __LINE__, -15, 0, 98, 18, 18, 14, 4, 3, 0 }, + { __LINE__, -16, 0, 102, 19, 19, 15, 4, 3, 0 }, + { __LINE__, -32, 0, 215, 38, 38, 30, 8, 6, 0 }, + { __LINE__, -64, 0, 423, 74, 74, 59, 15, 10, 0 }, + { __LINE__, -100, 0, 665, 117, 117, 93, 24, 17, 0 }, + { __LINE__, -200, 0, 1331, 233, 233, 186, 47, 33, 0 }, + { __LINE__, -300, 0, 1992, 349, 349, 278, 71, 49, 0 }, + { __LINE__, -400, 0, 2657, 465, 465, 371, 94, 65, 0 }, +}; +#define g_DEJAVUSANS_count _countof(g_DEJAVUSANS) + +static const TEST_ENTRY g_UBUNTUMONO[] = +{ + { __LINE__, 400, 0, 3000, 400, 400, 332, 68, 0, 0 }, + { __LINE__, 300, 0, 2250, 300, 300, 249, 51, 0, 0 }, + { __LINE__, 200, 0, 1500, 200, 200, 166, 34, 1, 0 }, + { __LINE__, 100, 0, 735, 100, 100, 83, 17, 2, 0 }, + { __LINE__, 64, 0, 465, 63, 63, 53, 10, 2, 0 }, + { __LINE__, 32, 0, 240, 31, 31, 26, 5, 0, 0 }, + { __LINE__, 16, 0, 105, 16, 16, 13, 3, 3, 0 }, + { __LINE__, 15, 0, 90, 15, 15, 12, 3, 4, 0 }, + { __LINE__, 14, 0, 75, 14, 14, 11, 3, 5, 0 }, + { __LINE__, 13, 0, 60, 13, 13, 10, 3, 5, 0 }, + { __LINE__, 12, 0, 60, 12, 12, 10, 2, 5, 0 }, + { __LINE__, 11, 0, 60, 11, 11, 9, 2, 4, 0 }, + { __LINE__, 10, 0, 60, 10, 10, 8, 2, 3, 0 }, + { __LINE__, 9, 0, 60, 9, 9, 7, 2, 2, 0 }, + { __LINE__, 8, 0, 60, 8, 8, 7, 1, 1, 0 }, + { __LINE__, 7, 0, 60, 7, 7, 6, 1, 0, 0 }, + { __LINE__, 6, 0, 45, 6, 6, 5, 1, 0, 0 }, + { __LINE__, 5, 0, 45, 5, 5, 4, 1, 0, 0 }, + { __LINE__, 4, 0, 30, 4, 4, 3, 1, 0, 0 }, + { __LINE__, 3, 0, 30, 3, 3, 2, 1, 0, 0 }, + { __LINE__, 2, 0, 15, 2, 2, 2, 0, 0, 0 }, + { __LINE__, 1, 0, 15, 2, 2, 2, 0, 0, 0 }, + { __LINE__, 0, 0, -135, -19, -19, -16, -3, -1, 0 }, + { __LINE__, -1, 0, 15, 2, 2, 2, 0, 0, 0 }, + { __LINE__, -2, 0, 15, 2, 2, 2, 0, 0, 0 }, + { __LINE__, -3, 0, 30, 3, 3, 2, 1, 0, 0 }, + { __LINE__, -4, 0, 30, 4, 4, 3, 1, 0, 0 }, + { __LINE__, -5, 0, 45, 5, 5, 4, 1, 0, 0 }, + { __LINE__, -6, 0, 45, 6, 6, 5, 1, 0, 0 }, + { __LINE__, -7, 0, 60, 7, 7, 6, 1, 0, 0 }, + { __LINE__, -8, 0, 60, 13, 13, 10, 3, 5, 0 }, + { __LINE__, -9, 0, 75, 14, 14, 11, 3, 5, 0 }, + { __LINE__, -10, 0, 75, 14, 14, 11, 3, 4, 0 }, + { __LINE__, -11, 0, 90, 15, 15, 12, 3, 4, 0 }, + { __LINE__, -12, 0, 90, 15, 15, 12, 3, 3, 0 }, + { __LINE__, -13, 0, 105, 16, 16, 13, 3, 3, 0 }, + { __LINE__, -14, 0, 105, 17, 17, 14, 3, 3, 0 }, + { __LINE__, -15, 0, 105, 17, 17, 14, 3, 2, 0 }, + { __LINE__, -16, 0, 120, 18, 18, 15, 3, 2, 0 }, + { __LINE__, -32, 0, 240, 33, 33, 28, 5, 1, 0 }, + { __LINE__, -64, 0, 480, 66, 66, 55, 11, 2, 0 }, + { __LINE__, -100, 0, 750, 101, 101, 84, 17, 1, 0 }, + { __LINE__, -200, 0, 1500, 201, 201, 167, 34, 1, 0 }, + { __LINE__, -300, 0, 2250, 300, 300, 249, 51, 0, 0 }, + { __LINE__, -400, 0, 3000, 400, 400, 332, 68, 0, 0 }, +}; +#define g_UBUNTUMONO_count _countof(g_UBUNTUMONO) + +static const TEST_ENTRY g_MSGOTHIC[] = +{ + { __LINE__, 400, 0, 3000, 400, 400, 344, 56, 0, 0 }, + { __LINE__, 300, 0, 2250, 300, 300, 258, 42, 0, 0 }, + { __LINE__, 200, 0, 1500, 200, 200, 172, 28, 0, 0 }, + { __LINE__, 100, 0, 750, 100, 100, 86, 14, 0, 0 }, + { __LINE__, 64, 0, 480, 64, 64, 55, 9, 0, 0 }, + { __LINE__, 32, 0, 240, 33, 33, 28, 5, 1, 0 }, + { __LINE__, 16, 0, 120, 16, 16, 14, 2, 0, 0 }, + { __LINE__, 15, 0, 120, 15, 15, 13, 2, 0, 0 }, + { __LINE__, 14, 0, 105, 14, 14, 12, 2, 0, 0 }, + { __LINE__, 13, 0, 105, 13, 13, 11, 2, 0, 0 }, + { __LINE__, 12, 0, 90, 12, 12, 10, 2, 0, 0 }, + { __LINE__, 11, 0, 90, 11, 11, 9, 2, 0, 0 }, + { __LINE__, 10, 0, 75, 10, 10, 9, 1, 0, 0 }, + { __LINE__, 9, 0, 75, 9, 9, 8, 1, 0, 0 }, + { __LINE__, 8, 0, 60, 8, 8, 7, 1, 0, 0 }, + { __LINE__, 7, 0, 60, 7, 7, 6, 1, 0, 0 }, + { __LINE__, 6, 0, 45, 6, 6, 5, 1, 0, 0 }, + { __LINE__, 5, 0, 45, 5, 5, 4, 1, 0, 0 }, + { __LINE__, 4, 0, 30, 4, 4, 3, 1, 0, 0 }, + { __LINE__, 3, 0, 30, 3, 3, 3, 0, 0, 0 }, + { __LINE__, 2, 0, 15, 2, 2, 2, 0, 0, 0 }, + { __LINE__, 1, 0, 15, 2, 2, 2, 0, 0, 0 }, + { __LINE__, 0, 0, -135, -18, -18, -15, -3, 0, 0 }, + { __LINE__, -1, 0, 15, 2, 2, 2, 0, 0, 0 }, + { __LINE__, -2, 0, 15, 2, 2, 2, 0, 0, 0 }, + { __LINE__, -3, 0, 30, 3, 3, 3, 0, 0, 0 }, + { __LINE__, -4, 0, 30, 4, 4, 3, 1, 0, 0 }, + { __LINE__, -5, 0, 45, 5, 5, 4, 1, 0, 0 }, + { __LINE__, -6, 0, 45, 6, 6, 5, 1, 0, 0 }, + { __LINE__, -7, 0, 60, 7, 7, 6, 1, 0, 0 }, + { __LINE__, -8, 0, 60, 8, 8, 7, 1, 0, 0 }, + { __LINE__, -9, 0, 75, 9, 9, 8, 1, 0, 0 }, + { __LINE__, -10, 0, 75, 10, 10, 9, 1, 0, 0 }, + { __LINE__, -11, 0, 90, 11, 11, 9, 2, 0, 0 }, + { __LINE__, -12, 0, 90, 12, 12, 10, 2, 0, 0 }, + { __LINE__, -13, 0, 105, 13, 13, 11, 2, 0, 0 }, + { __LINE__, -14, 0, 105, 14, 14, 12, 2, 0, 0 }, + { __LINE__, -15, 0, 120, 15, 15, 13, 2, 0, 0 }, + { __LINE__, -16, 0, 120, 16, 16, 14, 2, 0, 0 }, + { __LINE__, -32, 0, 240, 33, 33, 28, 5, 1, 0 }, + { __LINE__, -64, 0, 480, 64, 64, 55, 9, 0, 0 }, + { __LINE__, -100, 0, 750, 100, 100, 86, 14, 0, 0 }, + { __LINE__, -200, 0, 1500, 200, 200, 172, 28, 0, 0 }, + { __LINE__, -300, 0, 2250, 300, 300, 258, 42, 0, 0 }, + { __LINE__, -400, 0, 3000, 400, 400, 344, 56, 0, 0 }, +}; +#define g_MSGOTHIC_count _countof(g_MSGOTHIC) + +static const TEST_ENTRY g_MSMINCHO[] = +{ + { __LINE__, 400, 0, 3000, 400, 400, 344, 56, 0, 0 }, + { __LINE__, 300, 0, 2250, 300, 300, 258, 42, 0, 0 }, + { __LINE__, 200, 0, 1500, 200, 200, 172, 28, 0, 0 }, + { __LINE__, 100, 0, 750, 100, 100, 86, 14, 0, 0 }, + { __LINE__, 64, 0, 480, 64, 64, 55, 9, 0, 0 }, + { __LINE__, 32, 0, 240, 33, 33, 28, 5, 1, 0 }, + { __LINE__, 16, 0, 120, 16, 16, 14, 2, 0, 0 }, + { __LINE__, 15, 0, 120, 15, 15, 13, 2, 0, 0 }, + { __LINE__, 14, 0, 105, 14, 14, 12, 2, 0, 0 }, + { __LINE__, 13, 0, 105, 13, 13, 11, 2, 0, 0 }, + { __LINE__, 12, 0, 90, 12, 12, 10, 2, 0, 0 }, + { __LINE__, 11, 0, 90, 11, 11, 9, 2, 0, 0 }, + { __LINE__, 10, 0, 75, 10, 10, 9, 1, 0, 0 }, + { __LINE__, 9, 0, 75, 9, 9, 8, 1, 0, 0 }, + { __LINE__, 8, 0, 60, 8, 8, 7, 1, 0, 0 }, + { __LINE__, 7, 0, 60, 7, 7, 6, 1, 0, 0 }, + { __LINE__, 6, 0, 45, 6, 6, 5, 1, 0, 0 }, + { __LINE__, 5, 0, 45, 5, 5, 4, 1, 0, 0 }, + { __LINE__, 4, 0, 30, 4, 4, 3, 1, 0, 0 }, + { __LINE__, 3, 0, 30, 3, 3, 3, 0, 0, 0 }, + { __LINE__, 2, 0, 15, 2, 2, 2, 0, 0, 0 }, + { __LINE__, 1, 0, 15, 2, 2, 2, 0, 0, 0 }, + { __LINE__, 0, 0, -135, -18, -18, -15, -3, 0, 0 }, + { __LINE__, -1, 0, 15, 2, 2, 2, 0, 0, 0 }, + { __LINE__, -2, 0, 15, 2, 2, 2, 0, 0, 0 }, + { __LINE__, -3, 0, 30, 3, 3, 3, 0, 0, 0 }, + { __LINE__, -4, 0, 30, 4, 4, 3, 1, 0, 0 }, + { __LINE__, -5, 0, 45, 5, 5, 4, 1, 0, 0 }, + { __LINE__, -6, 0, 45, 6, 6, 5, 1, 0, 0 }, + { __LINE__, -7, 0, 60, 7, 7, 6, 1, 0, 0 }, + { __LINE__, -8, 0, 60, 8, 8, 7, 1, 0, 0 }, + { __LINE__, -9, 0, 75, 9, 9, 8, 1, 0, 0 }, + { __LINE__, -10, 0, 75, 10, 10, 9, 1, 0, 0 }, + { __LINE__, -11, 0, 90, 11, 11, 9, 2, 0, 0 }, + { __LINE__, -12, 0, 90, 12, 12, 10, 2, 0, 0 }, + { __LINE__, -13, 0, 105, 13, 13, 11, 2, 0, 0 }, + { __LINE__, -14, 0, 105, 14, 14, 12, 2, 0, 0 }, + { __LINE__, -15, 0, 120, 15, 15, 13, 2, 0, 0 }, + { __LINE__, -16, 0, 120, 16, 16, 14, 2, 0, 0 }, + { __LINE__, -32, 0, 240, 33, 33, 28, 5, 1, 0 }, + { __LINE__, -64, 0, 480, 64, 64, 55, 9, 0, 0 }, + { __LINE__, -100, 0, 750, 100, 100, 86, 14, 0, 0 }, + { __LINE__, -200, 0, 1500, 200, 200, 172, 28, 0, 0 }, + { __LINE__, -300, 0, 2250, 300, 300, 258, 42, 0, 0 }, + { __LINE__, -400, 0, 3000, 400, 400, 344, 56, 0, 0 }, +}; +#define g_MSMINCHO_count _countof(g_MSMINCHO) +#endif + +typedef struct FONT_ENTRY +{ + const char *entry_name; + const char *font_name; + const char *font_file; + size_t test_count; + const TEST_ENTRY *tests; +} FONT_ENTRY; + +static FONT_ENTRY g_font_entries[] = +{ +#ifdef EMIT_TESTCASES + { "FREEMONO", "FreeMono", "FreeMono.ttf" }, + { "DEJAVUSERIF", "DejaVu Serif", "DejaVuSerif.ttf" }, + { "DEJAVUSANS", "DejaVu Sans", "DejaVuSans.ttf" }, + { "UBUNTUMONO", "Ubuntu Mono", "UbuntuMono-R.ttf" }, + { "MSGOTHIC", "MS Gothic", "msgothic.ttc" }, + { "MSMINCHO", "MS Mincho", "msmincho.ttc" }, +#else + { "FREEMONO", "FreeMono", "FreeMono.ttf", g_FREEMONO_count, g_FREEMONO }, + { "DEJAVUSERIF", "DejaVu Serif", "DejaVuSerif.ttf", g_DEJAVUSERIF_count, g_DEJAVUSERIF }, + { "DEJAVUSANS", "DejaVu Sans", "DejaVuSans.ttf", g_DEJAVUSANS_count, g_DEJAVUSANS }, + { "UBUNTUMONO", "Ubuntu Mono", "UbuntuMono-R.ttf", g_UBUNTUMONO_count, g_UBUNTUMONO }, + { "MSGOTHIC", "MS Gothic", "msgothic.ttc", g_MSGOTHIC_count, g_MSGOTHIC }, + { "MSMINCHO", "MS Mincho", "msmincho.ttc", g_MSMINCHO_count, g_MSMINCHO }, +#endif +}; +static size_t g_font_entry_count = _countof(g_font_entries); + +START_TEST(GetTextMetrics) +{ + size_t i, k; + LOGFONTA lf; + HFONT hFont; + HDC hDC; + HGDIOBJ hFontOld; + SIZE siz; + TEXTMETRIC tm; + char szPath[MAX_PATH]; + static const char *text = "This is a test."; + + hDC = CreateCompatibleDC(NULL); + for (i = 0; i < g_font_entry_count; ++i) + { + FONT_ENTRY *font = &g_font_entries[i]; + ZeroMemory(&lf, sizeof(lf)); + lf.lfCharSet = DEFAULT_CHARSET; + lstrcpyA(lf.lfFaceName, font->font_name); + + GetWindowsDirectoryA(szPath, MAX_PATH); + lstrcatA(szPath, "\\Fonts\\"); + lstrcatA(szPath, font->font_file); + if (GetFileAttributesA(szPath) == 0xFFFFFFFF) + { + skip("Font file '%s' doesn't exists\n", font->font_file); + continue; + } + +#ifdef EMIT_TESTCASES + printf("static const TEST_ENTRY g_%s[] =\n", font->entry_name); + printf("{\n"); + for (k = 0; k < g_test_entry_count; ++k) + { + const TEST_ENTRY *test = &g_test_entries[k]; + + lf.lfHeight = test->lfHeight; + lf.lfWidth = test->lfWidth; + + hFont = CreateFontIndirectA(&lf); + hFontOld = SelectObject(hDC, hFont); + { + GetTextExtentPoint32A(hDC, text, lstrlenA(text), &siz); + GetTextMetrics(hDC, &tm); + } + SelectObject(hDC, hFontOld); + DeleteObject(hFont); + + printf(" { __LINE__, %ld, %ld, %ld, %ld, %ld, %ld, %ld, %ld, %ld },\n", + lf.lfHeight, lf.lfWidth, + siz.cx, siz.cy, + tm.tmHeight, tm.tmAscent, tm.tmDescent, tm.tmInternalLeading, tm.tmExternalLeading); + } + printf("};\n"); + printf("#define g_%s_count _countof(g_%s)\n\n", font->entry_name, font->entry_name); +#else + for (k = 0; k < font->test_count; ++k) + { + const TEST_ENTRY *test = &font->tests[k]; + + lf.lfHeight = test->lfHeight; + lf.lfWidth = test->lfWidth; + + hFont = CreateFontIndirectA(&lf); + hFontOld = SelectObject(hDC, hFont); + { + GetTextExtentPoint32A(hDC, text, lstrlenA(text), &siz); + GetTextMetrics(hDC, &tm); + } + SelectObject(hDC, hFontOld); + DeleteObject(hFont); + + if (test->cxText > 0) + { + ok_(__FILE__, test->line)(labs(test->cxText - siz.cx) <= 1, "%s (%ld): cxText: labs(%ld - %ld) > 1\n", font->entry_name, test->lfHeight, test->cxText, siz.cx); + ok_(__FILE__, test->line)(labs(test->cxText - siz.cx) == 0, "%s (%ld): cxText: labs(%ld - %ld) != 0\n", font->entry_name, test->lfHeight, test->cxText, siz.cx); + } + if (test->cyText > 0) + { + ok_(__FILE__, test->line)(labs(test->cyText - siz.cy) <= 1, "%s (%ld): cyText: labs(%ld - %ld) > 1\n", font->entry_name, test->lfHeight, test->cyText, siz.cy); + ok_(__FILE__, test->line)(labs(test->cyText - siz.cy) == 0, "%s (%ld): cyText: labs(%ld - %ld) != 0\n", font->entry_name, test->lfHeight, test->cyText, siz.cy); + } + if (test->tmHeight > 0) + { + ok_(__FILE__, test->line)(labs(test->tmHeight - tm.tmHeight) <= 1, "%s (%ld): tmHeight: labs(%ld - %ld) > 1\n", font->entry_name, test->lfHeight, test->tmHeight, tm.tmHeight); + ok_(__FILE__, test->line)(labs(test->tmHeight - tm.tmHeight) == 0, "%s (%ld): tmHeight: labs(%ld - %ld) != 0\n", font->entry_name, test->lfHeight, test->tmHeight, tm.tmHeight); + } + if (test->tmAscent > 0) + { + ok_(__FILE__, test->line)(labs(test->tmAscent - tm.tmAscent) <= 1, "%s (%ld): tmAscent: labs(%ld - %ld) > 1\n", font->entry_name, test->lfHeight, test->tmAscent, tm.tmAscent); + ok_(__FILE__, test->line)(labs(test->tmAscent - tm.tmAscent) == 0, "%s (%ld): tmAscent: labs(%ld - %ld) != 0\n", font->entry_name, test->lfHeight, test->tmAscent, tm.tmAscent); + } + if (test->tmDescent > 0) + { + ok_(__FILE__, test->line)(labs(test->tmDescent - tm.tmDescent) <= 1, "%s (%ld): tmDescent: labs(%ld - %ld) > 1\n", font->entry_name, test->lfHeight, test->tmDescent, tm.tmDescent); + ok_(__FILE__, test->line)(labs(test->tmDescent - tm.tmDescent) == 0, "%s (%ld): tmDescent: labs(%ld - %ld) != 0\n", font->entry_name, test->lfHeight, test->tmDescent, tm.tmDescent); + } + if (test->tmInternalLeading > 0) + { + ok_(__FILE__, test->line)(labs(test->tmInternalLeading - tm.tmInternalLeading) <= 1, "%s (%ld): tmInternalLeading: labs(%ld - %ld) > 1\n", font->entry_name, test->lfHeight, test->tmInternalLeading, tm.tmInternalLeading); + ok_(__FILE__, test->line)(labs(test->tmInternalLeading - tm.tmInternalLeading) == 0, "%s (%ld): tmInternalLeading: labs(%ld - %ld) != 0\n", font->entry_name, test->lfHeight, test->tmInternalLeading, tm.tmInternalLeading); + } + if (test->tmExternalLeading > 0) + { + ok_(__FILE__, test->line)(labs(test->tmExternalLeading - tm.tmExternalLeading) <= 1, "%s (%ld): tmExternalLeading: labs(%ld - %ld) > 1\n", font->entry_name, test->lfHeight, test->tmExternalLeading, tm.tmExternalLeading); + ok_(__FILE__, test->line)(labs(test->tmExternalLeading - tm.tmExternalLeading) == 0, "%s (%ld): tmExternalLeading: labs(%ld - %ld) != 0\n", font->entry_name, test->lfHeight, test->tmExternalLeading, tm.tmExternalLeading); + } + } +#endif + } + DeleteDC(hDC); +} diff --git a/modules/rostests/apitests/gdi32/testlist.c b/modules/rostests/apitests/gdi32/testlist.c index db6ded95cc..c466cde5bd 100644 --- a/modules/rostests/apitests/gdi32/testlist.c +++ b/modules/rostests/apitests/gdi32/testlist.c @@ -54,6 +54,7 @@ extern void func_GetRandomRgn(void); extern void func_GetStockObject(void); extern void func_GetTextExtentExPoint(void); extern void func_GetTextFace(void); +extern void func_GetTextMetrics(void); extern void func_MaskBlt(void); extern void func_NtGdiAddFontResource(void); extern void func_OffsetClipRgn(void); @@ -126,6 +127,7 @@ const struct test winetest_testlist[] = { "GetRandomRgn", func_GetRandomRgn }, { "GetStockObject", func_GetStockObject }, { "GetTextExtentExPoint", func_GetTextExtentExPoint }, + { "GetTextMetrics", func_GetTextMetrics }, { "GetTextFace", func_GetTextFace }, { "MaskBlt", func_MaskBlt }, { "NtGdiAddFontResource", func_NtGdiAddFontResource},
6 years, 11 months
1
0
0
0
01/01: [FREELDR] i386vid.c: Downgrade/Improve 3 false ERR() to WARN(). CORE-13496
by Serge Gautherie
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b5a7765068852311932f9…
commit b5a7765068852311932f9d1a5e688efb8c4c8060 Author: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr> AuthorDate: Sat Jan 13 15:41:49 2018 +0100 Commit: Alexander Shaposhnikov <sanchaez(a)reactos.org> CommitDate: Fri Jan 26 23:11:52 2018 +0200 [FREELDR] i386vid.c: Downgrade/Improve 3 false ERR() to WARN(). CORE-13496 Silence harmless errors, which can be reported at every boot. --- boot/freeldr/freeldr/arch/i386/i386vid.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/boot/freeldr/freeldr/arch/i386/i386vid.c b/boot/freeldr/freeldr/arch/i386/i386vid.c index a0f86c955b..0d5db0abf7 100644 --- a/boot/freeldr/freeldr/arch/i386/i386vid.c +++ b/boot/freeldr/freeldr/arch/i386/i386vid.c @@ -205,7 +205,8 @@ USHORT BiosIsVesaSupported(VOID) if (Regs.w.ax != 0x004F) { - ERR("VESA BIOS call failed\n"); + WARN("VBE Get SuperVGA information function not supported (AL=0x%x) or failed (AH=0x%x)\n", + Regs.b.al, Regs.b.ah); return 0x0000; } @@ -260,7 +261,8 @@ BiosIsVesaDdcSupported(VOID) if (Regs.w.ax != 0x004F) { - ERR("VESA/DDC installation check failed\n"); + WARN("VBE/DDC Installation check function not supported (AL=0x%x) or failed (AH=0x%x)\n", + Regs.b.al, Regs.b.ah); return FALSE; } @@ -290,7 +292,8 @@ BiosVesaReadEdid(VOID) if (Regs.w.ax != 0x004F) { - ERR("Read EDID function not supported!\n"); + WARN("VBE/DDC Read EDID function not supported (AL=0x%x) or failed (AH=0x%x)\n", + Regs.b.al, Regs.b.ah); return FALSE; }
6 years, 11 months
1
0
0
0
01/01: [TRANSLATION] Estonian translation for Notepad & Paint
by Joann Mõndresku
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=757511c4e8de1f403fb11…
commit 757511c4e8de1f403fb11e9b71ddf79c815f3386 Author: Joann Mõndresku <joann.mondresku(a)gmail.com> AuthorDate: Fri Jan 26 20:14:17 2018 +0200 Commit: Alexander Shaposhnikov <sanchaez(a)reactos.org> CommitDate: Fri Jan 26 22:43:25 2018 +0200 [TRANSLATION] Estonian translation for Notepad & Paint Added Estonian translation for the common base applications Notepad and MS Paint. These are the initial translations, and are subject to change, as they may not be the most perfect. --- base/applications/mspaint/lang/et-EE.rc | 228 ++++++++++++++++++++++++++++++++ base/applications/mspaint/rsrc.rc | 3 + base/applications/notepad/lang/et-EE.rc | 194 +++++++++++++++++++++++++++ base/applications/notepad/rsrc.rc | 3 + 4 files changed, 428 insertions(+) diff --git a/base/applications/mspaint/lang/et-EE.rc b/base/applications/mspaint/lang/et-EE.rc new file mode 100644 index 0000000000..aa0205c7d4 --- /dev/null +++ b/base/applications/mspaint/lang/et-EE.rc @@ -0,0 +1,228 @@ +/* + * PROJECT: PAINT for ReactOS + * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) + * FILE: base/applications/mspaint/lang/et-EE.rc + * PURPOSE: Estonian Language resource file + * TRANSLATOR: Joann Mõndresku (joannmondresku at gmail dot com) + */ + +LANGUAGE LANG_ESTONIAN, SUBLANG_DEFAULT + +ID_MENU MENU +BEGIN + POPUP "&Fail" + BEGIN + MENUITEM "&Uus\tCtrl+N", IDM_FILENEW + MENUITEM "&Ava...\tCtrl+O", IDM_FILEOPEN + MENUITEM "&Salvesta\tCtrl+S", IDM_FILESAVE + MENUITEM "Salvesta &Nimega...", IDM_FILESAVEAS + MENUITEM SEPARATOR + MENUITEM "Skännerist või Kaamerast...", IDM_FILEFROMSCANNERORCAMERA + MENUITEM SEPARATOR + MENUITEM "Lehe Vaade", IDM_FILEPAGEVIEW + MENUITEM "Lehe Ülesehitus...", IDM_FILEPAGESETUP + MENUITEM "&Prindi...\tCtrl+P", IDM_FILEPRINT + MENUITEM SEPARATOR + MENUITEM "Saada...", IDM_FILESEND + MENUITEM SEPARATOR + MENUITEM "Määra taustapildiks (Paanitud)", IDM_FILEASWALLPAPERPLANE + MENUITEM "Määra taustapildiks (Keskele)", IDM_FILEASWALLPAPERCENTERED + MENUITEM "Määra taustapildiks (Venitatud)", IDM_FILEASWALLPAPERSTRETCHED + MENUITEM SEPARATOR + MENUITEM "Kõige hiljutisemalt kasutatud fail", IDM_FILEMOSTRECENTLYUSEDFILE, GRAYED + MENUITEM SEPARATOR + MENUITEM "&Välju\tAlt+F4", IDM_FILEEXIT + END + POPUP "&Redigeeri" + BEGIN + MENUITEM "&Võta Tagasi\tCtrl+Z", IDM_EDITUNDO + MENUITEM "&Tee Tagasi\tCtrl+Y", IDM_EDITREDO + MENUITEM SEPARATOR + MENUITEM "&Lõika\tCtrl+X", IDM_EDITCUT + MENUITEM "&Kopeeri\tCtrl+C", IDM_EDITCOPY + MENUITEM "K&leebi\tCtrl+V", IDM_EDITPASTE + MENUITEM "Kustuta &valik\tDel", IDM_EDITDELETESELECTION + MENUITEM "&Pööra valik", IDM_EDITINVERTSELECTION + MENUITEM "Vali k&õik\tCtrl+A", IDM_EDITSELECTALL + MENUITEM SEPARATOR + MENUITEM "Kopee&ri kuhu...", IDM_EDITCOPYTO + MENUITEM "Klee&bi kust...", IDM_EDITPASTEFROM + END + POPUP "&Vaade" + BEGIN + MENUITEM "&Tööriista kast\tCtrl+T", IDM_VIEWTOOLBOX, CHECKED + MENUITEM "&Värvipalett\tCtrl+L", IDM_VIEWCOLORPALETTE, CHECKED + MENUITEM "&Olekuriba", IDM_VIEWSTATUSBAR, CHECKED + MENUITEM "Teksti t&ööriistariba", IDM_FORMATICONBAR, CHECKED, GRAYED + MENUITEM SEPARATOR + POPUP "&Suum" + BEGIN + POPUP "&Kasutaja määratud" + BEGIN + MENUITEM "12.5%", IDM_VIEWZOOM125 + MENUITEM "25%", IDM_VIEWZOOM25 + MENUITEM "50%", IDM_VIEWZOOM50 + MENUITEM "100%", IDM_VIEWZOOM100 + MENUITEM "200%", IDM_VIEWZOOM200 + MENUITEM "400%", IDM_VIEWZOOM400 + MENUITEM "800%", IDM_VIEWZOOM800 + END + MENUITEM SEPARATOR + MENUITEM "Näita v&õrgustiku\tCtrl+G", IDM_VIEWSHOWGRID + MENUITEM "Näita miniatuurset", IDM_VIEWSHOWMINIATURE + END + MENUITEM "T&äisekraan\tCtrl+F", IDM_VIEWFULLSCREEN + END + POPUP "&Pilt" + BEGIN + MENUITEM "Pööra/&Peegelda...\tCtrl+R", IDM_IMAGEROTATEMIRROR + MENUITEM "&Venita/Kalluta...\tCtrl+W", IDM_IMAGESTRETCHSKEW + MENUITEM "&Kärbi", IDM_IMAGECROP + MENUITEM "&Pööra värvid\tCtrl+I", IDM_IMAGEINVERTCOLORS + MENUITEM "&Atribuudid...\tCtrl+E", IDM_IMAGEATTRIBUTES + MENUITEM "Kustuta pilt\tCtrl+Shft+N", IDM_IMAGEDELETEIMAGE + MENUITEM "&Joonista läbipaistmatult", IDM_IMAGEDRAWOPAQUE + END + POPUP "&Värvid" + BEGIN + MENUITEM "&Muuda paletti...", IDM_COLORSEDITPALETTE + MENUITEM SEPARATOR + MENUITEM "Modernne palett", IDM_COLORSMODERNPALETTE + MENUITEM "Vana palett", IDM_COLORSOLDPALETTE + END + POPUP "&Abi" + BEGIN + MENUITEM "&Abi Teemad", IDM_HELPHELPTOPICS + MENUITEM SEPARATOR + MENUITEM "&Info", IDM_HELPINFO + END +END + +ID_ACCELERATORS ACCELERATORS +BEGIN + "^N", IDM_FILENEW + "^O", IDM_FILEOPEN + "^S", IDM_FILESAVE + "^Z", IDM_EDITUNDO + "^Y", IDM_EDITREDO + "^X", IDM_EDITCUT + "^C", IDM_EDITCOPY + "^V", IDM_EDITPASTE + VK_DELETE, IDM_EDITDELETESELECTION, VIRTKEY + "^A", IDM_EDITSELECTALL + "^T", IDM_VIEWTOOLBOX + "^L", IDM_VIEWCOLORPALETTE + "^G", IDM_VIEWSHOWGRID + "^F", IDM_VIEWFULLSCREEN + "^R", IDM_IMAGEROTATEMIRROR + "^W", IDM_IMAGESTRETCHSKEW + "^I", IDM_IMAGEINVERTCOLORS + "^E", IDM_IMAGEATTRIBUTES + "N", IDM_IMAGEDELETEIMAGE, CONTROL, SHIFT, VIRTKEY +END + +IDD_MIRRORROTATE DIALOGEX 100, 100, 180, 100 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +CAPTION "Pööra ja peegelda pilti" +BEGIN + GROUPBOX "Pööra või peegelad", IDD_MIRRORROTATEGROUP, 6, 6, 112, 86 + AUTORADIOBUTTON "Peegelda &horisontaalselt", IDD_MIRRORROTATERB1, 12, 18, 100, 10, WS_GROUP + AUTORADIOBUTTON "Peegelda &vertikaalselt", IDD_MIRRORROTATERB2, 12, 30, 100, 10 + AUTORADIOBUTTON "&Pööra kraadiga", IDD_MIRRORROTATERB3, 12, 42, 100, 10 + AUTORADIOBUTTON "&90°", IDD_MIRRORROTATERB4, 42, 54, 50, 10, WS_GROUP | WS_DISABLED + AUTORADIOBUTTON "&180°", IDD_MIRRORROTATERB5, 42, 66, 50, 10, WS_DISABLED + AUTORADIOBUTTON "&270°", IDD_MIRRORROTATERB6, 42, 78, 50, 10, WS_DISABLED + DEFPUSHBUTTON "OK", IDOK, 125, 8, 48, 14 + PUSHBUTTON "Tühista", IDCANCEL, 125, 24, 48, 14 +END + +IDD_ATTRIBUTES DIALOGEX 100, 100, 225, 120 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +CAPTION "Atribuudid" +BEGIN + EDITTEXT IDD_ATTRIBUTESEDIT1, 48, 40, 35, 12 + EDITTEXT IDD_ATTRIBUTESEDIT2, 128, 40, 35, 12 + LTEXT "&Laius:", IDD_ATTRIBUTESTEXT1, 10, 40, 35, 10 + LTEXT "&Pikkus:", IDD_ATTRIBUTESTEXT2, 90, 40, 35, 10 + LTEXT "Faili &kuupäev:", IDD_ATTRIBUTESTEXT3, 10, 5, 60, 10 + LTEXT "Faili &suurus:", IDD_ATTRIBUTESTEXT4, 10, 15, 60, 10 + LTEXT "&Resolutsioon:", IDD_ATTRIBUTESTEXT5, 10, 25, 60, 10 + LTEXT "Pole saadaval", IDD_ATTRIBUTESTEXT6, 60, 5, 90, 10 + LTEXT "Pole saadaval", IDD_ATTRIBUTESTEXT7, 60, 15, 90, 10 + LTEXT "Pole saadaval", IDD_ATTRIBUTESTEXT8, 60, 25, 90, 10 + GROUPBOX "Ühikud", IDD_ATTRIBUTESGROUP1, 6, 57, 158, 27 + AUTORADIOBUTTON "&Tollid", IDD_ATTRIBUTESRB1, 12, 69, 45, 10, WS_GROUP + AUTORADIOBUTTON "c&m", IDD_ATTRIBUTESRB2, 62, 69, 45, 10 + AUTORADIOBUTTON "Piksl&id", IDD_ATTRIBUTESRB3, 112, 69, 45, 10 + GROUPBOX "Värvid", IDD_ATTRIBUTESGROUP2, 6, 88, 158, 27 + AUTORADIOBUTTON "&Mustvalge", IDD_ATTRIBUTESRB4, 12, 100, 70, 10, WS_GROUP + AUTORADIOBUTTON "&Värvid", IDD_ATTRIBUTESRB5, 92, 100, 35, 10 + DEFPUSHBUTTON "OK", IDOK, 170, 8, 48, 14 + PUSHBUTTON "Tühista", IDCANCEL, 170, 24, 48, 14 + PUSHBUTTON "Vaikimisi", IDD_ATTRIBUTESSTANDARD, 170, 40, 48, 14 +END + +IDD_STRETCHSKEW DIALOGEX 100, 100, 225, 150 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +CAPTION "Venita ja kalluta pilti" +BEGIN + GROUPBOX "Venita", IDD_STRETCHSKEWGROUPSTRETCH, 6, 6, 158, 66 + ICON IDI_HORZSTRETCH, IDD_STRETCHSKEWICONHSTRETCH, 12, 18, 32, 32 + LTEXT "Horisontaalselt:", IDD_STRETCHSKEWTEXTHSTRETCH, 45, 24, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSTRETCH, 90, 23, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTHPERCENT, 125, 24, 15, 10 + ICON IDI_VERTSTRETCH, IDD_STRETCHSKEWICONVSTRETCH, 12, 43, 32, 32 + LTEXT "Vertikaalselt:", IDD_STRETCHSKEWTEXTVSTRETCH, 45, 49, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSTRETCH, 90, 48, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTVPERCENT, 125, 49, 15, 10 + GROUPBOX "Kalluta", IDD_STRETCHSKEWGROUPSKEW, 6, 76, 158, 66 + ICON IDI_HORZSKEW, IDD_STRETCHSKEWICONHSKEW, 12, 88, 32, 32 + LTEXT "Horisontaalselt:", IDD_STRETCHSKEWTEXTHSKEW, 45, 94, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSKEW, 90, 93, 32, 12 + LTEXT "kraadi", IDD_STRETCHSKEWTEXTHDEG, 125, 94, 30, 10 + ICON IDI_VERTSKEW, IDD_STRETCHSKEWICONVSKEW, 12, 113, 32, 32 + LTEXT "Vertikaalselt:", IDD_STRETCHSKEWTEXTVSKEW, 45, 119, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSKEW, 90, 118, 32, 12 + LTEXT "kraadi", IDD_STRETCHSKEWTEXTVDEG, 125, 119, 30, 10 + DEFPUSHBUTTON "OK", IDOK, 170, 8, 48, 14 + PUSHBUTTON "Tühista", IDCANCEL, 170, 24, 48, 14 +END + +STRINGTABLE +BEGIN + IDS_PROGRAMNAME "Paint" + IDS_WINDOWTITLE "%s - Paint" + IDS_INFOTITLE "Paint ReactOS'ile" + IDS_INFOTEXT "Paint ReactOS'ile on saadaval ""GNU Lesser General Public License"" litsentsi all (LGPL, vaata
www.gnu.org
)" + IDS_SAVEPROMPTTEXT "Kas soovid salvesta muudatusi failis %s?" + IDS_DEFAULTFILENAME "Nimetu.bmp" + IDS_MINIATURETITLE "Miniatuur" + IDS_TOOLTIP1 "Vaba valik" + IDS_TOOLTIP2 "Valik" + IDS_TOOLTIP3 "Kustukumm" + IDS_TOOLTIP4 "Täida värviga" + IDS_TOOLTIP5 "Vali värv" + IDS_TOOLTIP6 "Suum" + IDS_TOOLTIP7 "Pliiats" + IDS_TOOLTIP8 "Pintsel" + IDS_TOOLTIP9 "Õhupintsel" + IDS_TOOLTIP10 "Tekst" + IDS_TOOLTIP11 "Joon" + IDS_TOOLTIP12 "Kumerjoon" + IDS_TOOLTIP13 "Ristkülik" + IDS_TOOLTIP14 "Hulknurk" + IDS_TOOLTIP15 "Ellips" + IDS_TOOLTIP16 "Ümardatud ristkülik" + IDS_ALLFILES "Kõik failid" + IDS_ALLPICTUREFILES "Kõik Pildifailid" + IDS_FILESIZE "%d baiti" + IDS_PRINTRES "%d x %d pikslit meetri kohta" + IDS_INTNUMBERS "Palun sisesta ainult terviklike numbreid!" + IDS_PERCENTAGE "Protsent peab 1 ja 500 vahemikus olema." + IDS_ANGLE "Nurk peab -89 ja 89 vahemikus olema." + IDS_LOADERRORTEXT "Faili %s ei suudetud laadida." + IDS_ENLARGEPROMPTTEXT "Pilt lõikelaual on suurem kui digitaalkujutis.\nKas soovid digitaalkujutist suurendada?" +END diff --git a/base/applications/mspaint/rsrc.rc b/base/applications/mspaint/rsrc.rc index 77e681972b..d237d385a9 100644 --- a/base/applications/mspaint/rsrc.rc +++ b/base/applications/mspaint/rsrc.rc @@ -62,6 +62,9 @@ IDI_VERTSKEW ICON "icons/vertskew.ico" #ifdef LANGUAGE_ES_ES #include "lang/es-ES.rc" #endif +#ifdef LANGUAGE_ET_EE + #include "lang/et-EE.rc" +#endif #ifdef LANGUAGE_EU_ES #include "lang/eu-ES.rc" #endif diff --git a/base/applications/notepad/lang/et-EE.rc b/base/applications/notepad/lang/et-EE.rc new file mode 100644 index 0000000000..d1d7b61b20 --- /dev/null +++ b/base/applications/notepad/lang/et-EE.rc @@ -0,0 +1,194 @@ +/* + * PROJECT: NOTEPAD for ReactOS + * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) + * FILE: base/applications/notepad/lang/et-EE.rc + * PURPOSE: Estonian Language resource file + * TRANSLATOR: Joann Mõndresku (joannmondresku at gmail dot com) + */ + +LANGUAGE LANG_ESTONIAN, SUBLANG_DEFAULT + +ID_ACCEL ACCELERATORS +BEGIN + "^A", CMD_SELECT_ALL + "^C", CMD_COPY + "^F", CMD_SEARCH + "^G", CMD_GOTO + "H", CMD_REPLACE, VIRTKEY, CONTROL + "^N", CMD_NEW + "^O", CMD_OPEN + "^P", CMD_PRINT + "^S", CMD_SAVE + "^V", CMD_PASTE + "^X", CMD_CUT + "^Z", CMD_UNDO + VK_F3, CMD_SEARCH_NEXT, VIRTKEY + VK_F5, CMD_TIME_DATE, VIRTKEY +END + +MAIN_MENU MENU +BEGIN + POPUP "&Fail" + BEGIN + MENUITEM "&Uus\tCtrl+N", CMD_NEW + MENUITEM "&Ava...\tCtrl+O", CMD_OPEN + MENUITEM "&Salvesta\tCtrl+S", CMD_SAVE + MENUITEM "Salvesta &Nimega...", CMD_SAVE_AS + MENUITEM SEPARATOR + MENUITEM "Lehe Ülese&hitus...", CMD_PAGE_SETUP + MENUITEM "&Prindi...\tCtrl+P", CMD_PRINT + MENUITEM SEPARATOR + MENUITEM "&Välju", CMD_EXIT + END + POPUP "&Redigeeri" + BEGIN + MENUITEM "&Võta Tagasi\tCtrl+Z", CMD_UNDO + MENUITEM SEPARATOR + MENUITEM "&Lõika\tCtrl+X", CMD_CUT + MENUITEM "&Kopeeri\tCtrl+C", CMD_COPY + MENUITEM "Kl&eebi\tCtrl+V", CMD_PASTE + MENUITEM "Kus&tuta\tDel", CMD_DELETE + MENUITEM SEPARATOR + MENUITEM "L&eia...\tCtrl+F", CMD_SEARCH + MENUITEM "Leia &Järgmine\tF3", CMD_SEARCH_NEXT + MENUITEM "Asen&da...\tCtrl+H", CMD_REPLACE + MENUITEM "&Mine Asukohta...\tCtrl+G", CMD_GOTO + MENUITEM SEPARATOR + MENUITEM "Vali Kõ&ik\tCtrl+A", CMD_SELECT_ALL + MENUITEM "Aeg/Ku&upäev\tF5", CMD_TIME_DATE + END + POPUP "F&ormaat" + BEGIN + MENUITEM "&Sõna Mähkimine", CMD_WRAP + MENUITEM "&Font...", CMD_FONT + END + POPUP "&Vaade" + BEGIN + MENUITEM "&Olekuriba", CMD_STATUSBAR + END + POPUP "&Abi" + BEGIN + MENUITEM "&Vaata Abi", CMD_HELP_CONTENTS + MENUITEM SEPARATOR + MENUITEM "&Teave Notepad'ist", CMD_ABOUT + MENUITEM "Inf&o", CMD_HELP_ABOUT_NOTEPAD + END +END + +/* Dialog 'Page setup' */ +DIALOG_PAGESETUP DIALOGEX 0, 0, 365, 193 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | DS_CONTEXTHELP +FONT 8, "MS Shell Dlg" +CAPTION "Lehe Ülesehitus" +BEGIN + GROUPBOX "Eelvaade", 0, 240, 6, 120, 153, BS_GROUPBOX + CONTROL "", rct1, "Static", SS_WHITERECT, 260, 42, 80, 80 + CONTROL "", rct2, "Static", SS_GRAYRECT, 340, 46, 4, 80 + CONTROL "", rct3, "Static", SS_GRAYRECT, 264, 122, 80, 4 + GROUPBOX "Paber", grp2, 8, 6, 224, 56, BS_GROUPBOX + LTEXT "&Suurus:", stc2, 16, 22, 36, 8 + COMBOBOX cmb2, 64, 20, 160, 160, CBS_SIMPLE | CBS_DROPDOWN | CBS_SORT | WS_GROUP | WS_TABSTOP | WS_VSCROLL + LTEXT "&Salv:", stc3, 16, 42, 36, 8 + COMBOBOX cmb3, 64, 40, 160, 160, CBS_SIMPLE | CBS_DROPDOWN | CBS_SORT | WS_GROUP | WS_TABSTOP | WS_VSCROLL + GROUPBOX "Orientatsioon", grp1, 8, 66, 64, 56, BS_GROUPBOX + AUTORADIOBUTTON "&Portree", rad1, 16, 80, 52, 12, BS_AUTORADIOBUTTON + AUTORADIOBUTTON "&Maastik", rad2, 16, 100, 52, 12, BS_AUTORADIOBUTTON + GROUPBOX "Ääred", grp4, 80, 66, 152, 56, BS_GROUPBOX + LTEXT "&Vasakult:", stc15, 88, 82, 30, 8 + EDITTEXT edt4, 119, 80, 36, 12, WS_TABSTOP | WS_GROUP | WS_BORDER + LTEXT "&Paremalt:", stc16, 159, 82, 30, 8 + EDITTEXT edt6, 190, 80, 36, 12, WS_TABSTOP | WS_GROUP | WS_BORDER + LTEXT "&Ülevalt:", stc17, 88, 102, 30, 8 + EDITTEXT edt5, 119, 100, 36, 12, WS_TABSTOP | WS_GROUP | WS_BORDER + LTEXT "&Alt:", stc18, 159, 102, 30, 8 + EDITTEXT edt7, 190, 100, 36, 12, WS_TABSTOP | WS_GROUP | WS_BORDER + LTEXT "&Päis:", 0x140, 8, 132, 40, 15 + EDITTEXT 0x141, 58, 130, 173, 12, WS_BORDER | WS_TABSTOP | ES_AUTOHSCROLL + LTEXT "&Jalus:", 0x142, 8, 149, 40, 15 + EDITTEXT 0x143, 58, 147, 173, 12, WS_BORDER | WS_TABSTOP | ES_AUTOHSCROLL + PUSHBUTTON "Abi", IDHELP, 8, 170, 50, 14 + DEFPUSHBUTTON "OK", IDOK, 198, 170, 50, 14, BS_PUSHBUTTON + PUSHBUTTON "Tühista", IDCANCEL, 254, 170, 50, 14 + PUSHBUTTON "P&rinter...", psh3, 310, 170, 50, 14 +END + +/* Dialog 'Encoding' */ +DIALOG_ENCODING DIALOGEX 0, 0, 256, 44 +STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +CAPTION "Kodeering" +BEGIN + COMBOBOX ID_ENCODING, 54, 0, 156, 80, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + LTEXT "Kodeering:", 0x155, 5, 2, 41, 12 + COMBOBOX ID_EOLN, 54, 18, 156, 80, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Endlines:", 0x156, 5, 20, 41, 12 +END + +/* Dialog 'Go To' */ +DIALOG_GOTO DIALOGEX 0, 0, 165, 50 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +CAPTION "Mine reale" +BEGIN + EDITTEXT ID_LINENUMBER, 54, 10, 106, 12, WS_CHILD | WS_BORDER | WS_TABSTOP + LTEXT "Rea number:", 0x155, 5, 12, 41, 12, WS_CHILD | WS_TABSTOP | ES_NUMBER + DEFPUSHBUTTON "OK", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP + PUSHBUTTON "Tühista", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP +END + +IDD_ABOUTBOX DIALOGEX 22, 16, 284, 170 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "Teave ReactOS Notepad'ist" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "ReactOS Notepad v1.0\r\nAutoriõigus 1997,98 Marcel Baur\r\nAutoriõigus 2000 Mike McCormack\r\nAutoriõigus 2002 Sylvain Petreolle\r\nAutoriõigus 2002 Andriy Palamarchuk\r\n", -1, "Static", SS_LEFTNOWORDWRAP | WS_GROUP, 46, 7, 232, 39 + CONTROL " ", -1, "Static", 0x50000000, 8, 48, 272, 11 + DEFPUSHBUTTON "Sulge", IDOK, 114, 149, 44, 15, WS_GROUP + ICON IDI_NPICON, -1, 12, 9, 20, 30 + EDITTEXT IDC_LICENSE, 8, 64, 272, 81, ES_MULTILINE | ES_READONLY | WS_VSCROLL +END + +STRINGTABLE +BEGIN + STRING_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more [...] +END + +STRINGTABLE +BEGIN + STRING_PAGESETUP_HEADERVALUE "&n" /* FIXME */ + STRING_PAGESETUP_FOOTERVALUE "Page &s" /* FIXME */ + STRING_PAGESETUP_LEFTVALUE "20 mm" /* FIXME */ + STRING_PAGESETUP_RIGHTVALUE "20 mm" /* FIXME */ + STRING_PAGESETUP_TOPVALUE "25 mm" /* FIXME */ + STRING_PAGESETUP_BOTTOMVALUE "25 mm" /* FIXME */ + STRING_NOTEPAD "Notepad" + STRING_ERROR "ERROR" + STRING_WARNING "HOIATUS" + STRING_INFO "Informatsioon" + STRING_UNTITLED "Nimetu" + STRING_ALL_FILES "Kõik failid (*.*)" + STRING_TEXT_FILES_TXT "Tekstifailid (*.txt)" + STRING_TOOLARGE "Fail '%s' on liiga suur Notepad'i jaoks.\n \ +Palun kasuta erinevat redigeerijat." + STRING_NOTEXT "Sa ei sisestanud midagi. \ +\nPalun kirjuta midagi ja proovi uuesti." + STRING_DOESNOTEXIST "Faili '%s'\nei ole olemas\n\n \ +Kas soovid uut faili koostada ?" + STRING_NOTSAVED "Faili '%s'\non redigeeritud\n\n \ +Kas soovid muudatused salvestada ?" + STRING_NOTFOUND "'%s' ei suudetud leida." + STRING_OUT_OF_MEMORY "Pole piisavalt mälu selle \ +käsu lõpetamiseks. \nSulge üks või enam rakendust, et suurendada \nvaba mälu hulka." + STRING_CANNOTFIND "Ei suuda leida '%s'" + STRING_ANSI "ANSI" + STRING_UNICODE "Unicode" + STRING_UNICODE_BE "Unicode (big endian)" + STRING_UTF8 "UTF-8" + STRING_CRLF "Windows (CR + LF)" + STRING_LF "Unix (LF)" + STRING_CR "Mac (CR)" + STRING_LINE_COLUMN "Rida %d, veerg %d" + STRING_PRINTERROR "Ei suuda printida faili '%s'.\n\nVeendu et printer on sisse lülitatud ja korralikult seadistatud." + + STRING_TEXT_DOCUMENT "Tekstidokument" +END diff --git a/base/applications/notepad/rsrc.rc b/base/applications/notepad/rsrc.rc index 524216fbce..8af6d8fa62 100644 --- a/base/applications/notepad/rsrc.rc +++ b/base/applications/notepad/rsrc.rc @@ -56,6 +56,9 @@ IDI_NPICON ICON "res/notepad.ico" #ifdef LANGUAGE_ES_ES #include "lang/es-ES.rc" #endif +#ifdef LANGUAGE_ET_EE + #include "lang/et-EE.rc" +#endif #ifdef LANGUAGE_EU_ES #include "lang/eu-ES.rc" #endif
6 years, 11 months
1
0
0
0
01/01: [PING] Fix error handling and response address decoding (#318)
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=906fdf9ccb075301a2ae8…
commit 906fdf9ccb075301a2ae85ab0979abf7a20bd2ab Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Fri Jan 26 21:38:47 2018 +0300 Commit: Ged Murphy <gedmurphy(a)reactos.org> CommitDate: Fri Jan 26 18:38:47 2018 +0000 [PING] Fix error handling and response address decoding (#318) - Host/net unreachable error should be obtained from EchoReply->Status - Use GetNameInfoW to decode actual response addresses (borrowed from tracert code) CORE-14241 #resolve --- base/applications/network/ping/ping.c | 67 ++++++++++++++++++++++++++++++----- 1 file changed, 58 insertions(+), 9 deletions(-) diff --git a/base/applications/network/ping/ping.c b/base/applications/network/ping/ping.c index bbeafa6c88..dd1262eac0 100644 --- a/base/applications/network/ping/ping.c +++ b/base/applications/network/ping/ping.c @@ -479,14 +479,6 @@ Ping(void) Status = GetLastError(); switch (Status) { - case IP_DEST_HOST_UNREACHABLE: - ConResPrintf(StdOut, IDS_DEST_HOST_UNREACHABLE); - break; - - case IP_DEST_NET_UNREACHABLE: - ConResPrintf(StdOut, IDS_DEST_NET_UNREACHABLE); - break; - case IP_REQ_TIMED_OUT: ConResPrintf(StdOut, IDS_REQUEST_TIMED_OUT); break; @@ -498,16 +490,40 @@ Ping(void) } else { + SOCKADDR_IN6 SockAddrIn6; + SOCKADDR_IN SockAddrIn; + PSOCKADDR SockAddr; + socklen_t Size; + EchosReceived++; - ConResPrintf(StdOut, IDS_REPLY_FROM, Address); + ZeroMemory(&SockAddrIn, sizeof(SockAddrIn)); + ZeroMemory(&SockAddrIn6, sizeof(SockAddrIn6)); if (Family == AF_INET6) { PICMPV6_ECHO_REPLY pEchoReply; + PIPV6_ADDRESS_EX Ipv6Addr; pEchoReply = (PICMPV6_ECHO_REPLY)ReplyBuffer; + Ipv6Addr = (PIPV6_ADDRESS_EX)&pEchoReply->Address; + SockAddrIn6.sin6_family = AF_INET6; + CopyMemory(SockAddrIn6.sin6_addr.u.Word, Ipv6Addr->sin6_addr, sizeof(SockAddrIn6.sin6_addr)); + //SockAddrIn6.sin6_addr = Ipv6Addr->sin6_addr; + SockAddr = (PSOCKADDR)&SockAddrIn6; + Size = sizeof(SOCKADDR_IN6); + + GetNameInfoW(SockAddr, + Size, + Address, + NI_MAXHOST, + NULL, + 0, + NI_NUMERICHOST); + + ConResPrintf(StdOut, IDS_REPLY_FROM, Address); + switch (pEchoReply->Status) { case IP_SUCCESS: @@ -531,6 +547,14 @@ Ping(void) break; } + case IP_DEST_NET_UNREACHABLE: + ConResPrintf(StdOut, IDS_DEST_NET_UNREACHABLE); + break; + + case IP_DEST_HOST_UNREACHABLE: + ConResPrintf(StdOut, IDS_DEST_HOST_UNREACHABLE); + break; + case IP_TTL_EXPIRED_TRANSIT: ConResPrintf(StdOut, IDS_TTL_EXPIRED); break; @@ -543,9 +567,26 @@ Ping(void) else { PICMP_ECHO_REPLY pEchoReply; + IPAddr *IP4Addr; pEchoReply = (PICMP_ECHO_REPLY)ReplyBuffer; + IP4Addr = (IPAddr *)&pEchoReply->Address; + SockAddrIn.sin_family = AF_INET; + SockAddrIn.sin_addr.S_un.S_addr = *IP4Addr; + SockAddr = (PSOCKADDR)&SockAddrIn; + Size = sizeof(SOCKADDR_IN); + + GetNameInfoW(SockAddr, + Size, + Address, + NI_MAXHOST, + NULL, + 0, + NI_NUMERICHOST); + + ConResPrintf(StdOut, IDS_REPLY_FROM, Address); + switch (pEchoReply->Status) { case IP_SUCCESS: @@ -571,6 +612,14 @@ Ping(void) break; } + case IP_DEST_NET_UNREACHABLE: + ConResPrintf(StdOut, IDS_DEST_NET_UNREACHABLE); + break; + + case IP_DEST_HOST_UNREACHABLE: + ConResPrintf(StdOut, IDS_DEST_HOST_UNREACHABLE); + break; + case IP_TTL_EXPIRED_TRANSIT: ConResPrintf(StdOut, IDS_TTL_EXPIRED); break;
6 years, 11 months
1
0
0
0
01/01: [TRACERT] Improve error handling and output (#319)
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=010c7bfc9bcf31dd232e8…
commit 010c7bfc9bcf31dd232e8e779658562fb418cd8a Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Fri Jan 26 21:37:43 2018 +0300 Commit: Ged Murphy <gedmurphy(a)reactos.org> CommitDate: Fri Jan 26 18:37:43 2018 +0000 [TRACERT] Improve error handling and output (#319) - Correctly interpret network error codes - Add output for generic transmit failure CORE-14242 #resolve --- base/applications/network/tracert/lang/bg-BG.rc | 9 +++++++-- base/applications/network/tracert/lang/cs-CZ.rc | 9 +++++++-- base/applications/network/tracert/lang/de-DE.rc | 9 +++++++-- base/applications/network/tracert/lang/en-US.rc | 9 +++++++-- base/applications/network/tracert/lang/es-ES.rc | 9 +++++++-- base/applications/network/tracert/lang/fr-FR.rc | 9 +++++++-- base/applications/network/tracert/lang/it-IT.rc | 9 +++++++-- base/applications/network/tracert/lang/pl-PL.rc | 9 +++++++-- base/applications/network/tracert/lang/ro-RO.rc | 9 +++++++-- base/applications/network/tracert/lang/ru-RU.rc | 9 +++++++-- base/applications/network/tracert/lang/sq-AL.rc | 9 +++++++-- base/applications/network/tracert/lang/sv-SE.rc | 9 +++++++-- base/applications/network/tracert/lang/tr-TR.rc | 9 +++++++-- base/applications/network/tracert/lang/uk-UA.rc | 9 +++++++-- base/applications/network/tracert/lang/zh-CN.rc | 9 +++++++-- base/applications/network/tracert/lang/zh-TW.rc | 9 +++++++-- base/applications/network/tracert/resource.h | 5 +++++ base/applications/network/tracert/tracert.cpp | 17 +++++++++++++++-- 18 files changed, 132 insertions(+), 34 deletions(-) diff --git a/base/applications/network/tracert/lang/bg-BG.rc b/base/applications/network/tracert/lang/bg-BG.rc index bf99e280f8..e6197573ef 100644 --- a/base/applications/network/tracert/lang/bg-BG.rc +++ b/base/applications/network/tracert/lang/bg-BG.rc @@ -20,13 +20,18 @@ Options:\r\n\ IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n" IDS_GEN_FAILURE "General failure.\r\n" + IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n" IDS_HOP_COUNT "%1!3lu! %0\r\n" IDS_HOP_TIME "%1!4lu! ms %0\r\n" IDS_HOP_ZERO, " <1 ms %0\r\n" IDS_TIMEOUT " * %0\r\n" - IDS_HOP_RES_INFO "%1 [%2]\r\n" - IDS_HOP_IP_INFO "%1\r\n" + IDS_HOP_RES_INFO "%1 [%2]" + IDS_HOP_IP_INFO "%1" + IDS_LINEBREAK "\r\n" IDS_REQ_TIMED_OUT "Request timed out.\r\n" + IDS_HOP_RESPONSE " reports: " + IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n" + IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n" END diff --git a/base/applications/network/tracert/lang/cs-CZ.rc b/base/applications/network/tracert/lang/cs-CZ.rc index 1c82fc5dc3..ea442cbf3d 100644 --- a/base/applications/network/tracert/lang/cs-CZ.rc +++ b/base/applications/network/tracert/lang/cs-CZ.rc @@ -20,13 +20,18 @@ Options:\r\n\ IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n" IDS_GEN_FAILURE "General failure.\r\n" + IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n" IDS_HOP_COUNT "%1!3lu! %0\r\n" IDS_HOP_TIME "%1!4lu! ms %0\r\n" IDS_HOP_ZERO, " <1 ms %0\r\n" IDS_TIMEOUT " * %0\r\n" - IDS_HOP_RES_INFO "%1 [%2]\r\n" - IDS_HOP_IP_INFO "%1\r\n" + IDS_HOP_RES_INFO "%1 [%2]" + IDS_HOP_IP_INFO "%1" + IDS_LINEBREAK "\r\n" IDS_REQ_TIMED_OUT "Request timed out.\r\n" + IDS_HOP_RESPONSE " reports: " + IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n" + IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n" END diff --git a/base/applications/network/tracert/lang/de-DE.rc b/base/applications/network/tracert/lang/de-DE.rc index bbe5e4dbec..dae8fce082 100644 --- a/base/applications/network/tracert/lang/de-DE.rc +++ b/base/applications/network/tracert/lang/de-DE.rc @@ -20,13 +20,18 @@ Options:\r\n\ IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n" IDS_GEN_FAILURE "General failure.\r\n" + IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n" IDS_HOP_COUNT "%1!3lu! %0\r\n" IDS_HOP_TIME "%1!4lu! ms %0\r\n" IDS_HOP_ZERO, " <1 ms %0\r\n" IDS_TIMEOUT " * %0\r\n" - IDS_HOP_RES_INFO "%1 [%2]\r\n" - IDS_HOP_IP_INFO "%1\r\n" + IDS_HOP_RES_INFO "%1 [%2]" + IDS_HOP_IP_INFO "%1" + IDS_LINEBREAK "\r\n" IDS_REQ_TIMED_OUT "Request timed out.\r\n" + IDS_HOP_RESPONSE " reports: " + IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n" + IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n" END diff --git a/base/applications/network/tracert/lang/en-US.rc b/base/applications/network/tracert/lang/en-US.rc index 27b5961ca9..f970a9139a 100644 --- a/base/applications/network/tracert/lang/en-US.rc +++ b/base/applications/network/tracert/lang/en-US.rc @@ -20,13 +20,18 @@ Options:\r\n\ IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n" IDS_GEN_FAILURE "General failure.\r\n" + IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n" IDS_HOP_COUNT "%1!3lu! %0\r\n" IDS_HOP_TIME "%1!4lu! ms %0\r\n" IDS_HOP_ZERO, " <1 ms %0\r\n" IDS_TIMEOUT " * %0\r\n" - IDS_HOP_RES_INFO "%1 [%2]\r\n" - IDS_HOP_IP_INFO "%1\r\n" + IDS_HOP_RES_INFO "%1 [%2]" + IDS_HOP_IP_INFO "%1" + IDS_LINEBREAK "\r\n" IDS_REQ_TIMED_OUT "Request timed out.\r\n" + IDS_HOP_RESPONSE " reports: " + IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n" + IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n" END diff --git a/base/applications/network/tracert/lang/es-ES.rc b/base/applications/network/tracert/lang/es-ES.rc index 8c69db16ac..5c44cb4e9c 100644 --- a/base/applications/network/tracert/lang/es-ES.rc +++ b/base/applications/network/tracert/lang/es-ES.rc @@ -20,13 +20,18 @@ Options:\r\n\ IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n" IDS_GEN_FAILURE "General failure.\r\n" + IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n" IDS_HOP_COUNT "%1!3lu! %0\r\n" IDS_HOP_TIME "%1!4lu! ms %0\r\n" IDS_HOP_ZERO, " <1 ms %0\r\n" IDS_TIMEOUT " * %0\r\n" - IDS_HOP_RES_INFO "%1 [%2]\r\n" - IDS_HOP_IP_INFO "%1\r\n" + IDS_HOP_RES_INFO "%1 [%2]" + IDS_HOP_IP_INFO "%1" + IDS_LINEBREAK "\r\n" IDS_REQ_TIMED_OUT "Request timed out.\r\n" + IDS_HOP_RESPONSE " reports: " + IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n" + IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n" END diff --git a/base/applications/network/tracert/lang/fr-FR.rc b/base/applications/network/tracert/lang/fr-FR.rc index 611a56490d..69c76b536f 100644 --- a/base/applications/network/tracert/lang/fr-FR.rc +++ b/base/applications/network/tracert/lang/fr-FR.rc @@ -20,13 +20,18 @@ Options:\r\n\ IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n" IDS_GEN_FAILURE "General failure.\r\n" + IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n" IDS_HOP_COUNT "%1!3lu! %0\r\n" IDS_HOP_TIME "%1!4lu! ms %0\r\n" IDS_HOP_ZERO, " <1 ms %0\r\n" IDS_TIMEOUT " * %0\r\n" - IDS_HOP_RES_INFO "%1 [%2]\r\n" - IDS_HOP_IP_INFO "%1\r\n" + IDS_HOP_RES_INFO "%1 [%2]" + IDS_HOP_IP_INFO "%1" + IDS_LINEBREAK "\r\n" IDS_REQ_TIMED_OUT "Request timed out.\r\n" + IDS_HOP_RESPONSE " reports: " + IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n" + IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n" END diff --git a/base/applications/network/tracert/lang/it-IT.rc b/base/applications/network/tracert/lang/it-IT.rc index 15b0ba30bf..a4e710b6a4 100644 --- a/base/applications/network/tracert/lang/it-IT.rc +++ b/base/applications/network/tracert/lang/it-IT.rc @@ -20,13 +20,18 @@ Options:\r\n\ IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n" IDS_GEN_FAILURE "General failure.\r\n" + IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n" IDS_HOP_COUNT "%1!3lu! %0\r\n" IDS_HOP_TIME "%1!4lu! ms %0\r\n" IDS_HOP_ZERO, " <1 ms %0\r\n" IDS_TIMEOUT " * %0\r\n" - IDS_HOP_RES_INFO "%1 [%2]\r\n" - IDS_HOP_IP_INFO "%1\r\n" + IDS_HOP_RES_INFO "%1 [%2]" + IDS_HOP_IP_INFO "%1" + IDS_LINEBREAK "\r\n" IDS_REQ_TIMED_OUT "Request timed out.\r\n" + IDS_HOP_RESPONSE " reports: " + IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n" + IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n" END diff --git a/base/applications/network/tracert/lang/pl-PL.rc b/base/applications/network/tracert/lang/pl-PL.rc index 94e5ba6ceb..673aa7552d 100644 --- a/base/applications/network/tracert/lang/pl-PL.rc +++ b/base/applications/network/tracert/lang/pl-PL.rc @@ -20,13 +20,18 @@ Options:\r\n\ IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n" IDS_GEN_FAILURE "General failure.\r\n" + IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n" IDS_HOP_COUNT "%1!3lu! %0\r\n" IDS_HOP_TIME "%1!4lu! ms %0\r\n" IDS_HOP_ZERO, " <1 ms %0\r\n" IDS_TIMEOUT " * %0\r\n" - IDS_HOP_RES_INFO "%1 [%2]\r\n" - IDS_HOP_IP_INFO "%1\r\n" + IDS_HOP_RES_INFO "%1 [%2]" + IDS_HOP_IP_INFO "%1" + IDS_LINEBREAK "\r\n" IDS_REQ_TIMED_OUT "Request timed out.\r\n" + IDS_HOP_RESPONSE " reports: " + IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n" + IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n" END diff --git a/base/applications/network/tracert/lang/ro-RO.rc b/base/applications/network/tracert/lang/ro-RO.rc index d5f2a88910..2811f1495e 100644 --- a/base/applications/network/tracert/lang/ro-RO.rc +++ b/base/applications/network/tracert/lang/ro-RO.rc @@ -20,13 +20,18 @@ Options:\r\n\ IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n" IDS_GEN_FAILURE "General failure.\r\n" + IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n" IDS_HOP_COUNT "%1!3lu! %0\r\n" IDS_HOP_TIME "%1!4lu! ms %0\r\n" IDS_HOP_ZERO, " <1 ms %0\r\n" IDS_TIMEOUT " * %0\r\n" - IDS_HOP_RES_INFO "%1 [%2]\r\n" - IDS_HOP_IP_INFO "%1\r\n" + IDS_HOP_RES_INFO "%1 [%2]" + IDS_HOP_IP_INFO "%1" + IDS_LINEBREAK "\r\n" IDS_REQ_TIMED_OUT "Request timed out.\r\n" + IDS_HOP_RESPONSE " reports: " + IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n" + IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n" END diff --git a/base/applications/network/tracert/lang/ru-RU.rc b/base/applications/network/tracert/lang/ru-RU.rc index 1a000627a1..d07b4f7e1d 100644 --- a/base/applications/network/tracert/lang/ru-RU.rc +++ b/base/applications/network/tracert/lang/ru-RU.rc @@ -20,13 +20,18 @@ Options:\r\n\ IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n" IDS_GEN_FAILURE "General failure.\r\n" + IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n" IDS_HOP_COUNT "%1!3lu! %0\r\n" IDS_HOP_TIME "%1!4lu! ms %0\r\n" IDS_HOP_ZERO, " <1 ms %0\r\n" IDS_TIMEOUT " * %0\r\n" - IDS_HOP_RES_INFO "%1 [%2]\r\n" - IDS_HOP_IP_INFO "%1\r\n" + IDS_HOP_RES_INFO "%1 [%2]" + IDS_HOP_IP_INFO "%1" + IDS_LINEBREAK "\r\n" IDS_REQ_TIMED_OUT "Request timed out.\r\n" + IDS_HOP_RESPONSE " reports: " + IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n" + IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n" END diff --git a/base/applications/network/tracert/lang/sq-AL.rc b/base/applications/network/tracert/lang/sq-AL.rc index d3dc494035..b38c9863c8 100644 --- a/base/applications/network/tracert/lang/sq-AL.rc +++ b/base/applications/network/tracert/lang/sq-AL.rc @@ -20,13 +20,18 @@ Options:\r\n\ IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n" IDS_GEN_FAILURE "General failure.\r\n" + IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n" IDS_HOP_COUNT "%1!3lu! %0\r\n" IDS_HOP_TIME "%1!4lu! ms %0\r\n" IDS_HOP_ZERO, " <1 ms %0\r\n" IDS_TIMEOUT " * %0\r\n" - IDS_HOP_RES_INFO "%1 [%2]\r\n" - IDS_HOP_IP_INFO "%1\r\n" + IDS_HOP_RES_INFO "%1 [%2]" + IDS_HOP_IP_INFO "%1" + IDS_LINEBREAK "\r\n" IDS_REQ_TIMED_OUT "Request timed out.\r\n" + IDS_HOP_RESPONSE " reports: " + IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n" + IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n" END diff --git a/base/applications/network/tracert/lang/sv-SE.rc b/base/applications/network/tracert/lang/sv-SE.rc index 6579325bdf..36ac1271a8 100644 --- a/base/applications/network/tracert/lang/sv-SE.rc +++ b/base/applications/network/tracert/lang/sv-SE.rc @@ -20,13 +20,18 @@ Options:\r\n\ IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n" IDS_GEN_FAILURE "General failure.\r\n" + IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n" IDS_HOP_COUNT "%1!3lu! %0\r\n" IDS_HOP_TIME "%1!4lu! ms %0\r\n" IDS_HOP_ZERO, " <1 ms %0\r\n" IDS_TIMEOUT " * %0\r\n" - IDS_HOP_RES_INFO "%1 [%2]\r\n" - IDS_HOP_IP_INFO "%1\r\n" + IDS_HOP_RES_INFO "%1 [%2]" + IDS_HOP_IP_INFO "%1" + IDS_LINEBREAK "\r\n" IDS_REQ_TIMED_OUT "Request timed out.\r\n" + IDS_HOP_RESPONSE " reports: " + IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n" + IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n" END diff --git a/base/applications/network/tracert/lang/tr-TR.rc b/base/applications/network/tracert/lang/tr-TR.rc index 0ee1a09845..ea7b8a09c1 100644 --- a/base/applications/network/tracert/lang/tr-TR.rc +++ b/base/applications/network/tracert/lang/tr-TR.rc @@ -20,13 +20,18 @@ Options:\r\n\ IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n" IDS_GEN_FAILURE "General failure.\r\n" + IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n" IDS_HOP_COUNT "%1!3lu! %0\r\n" IDS_HOP_TIME "%1!4lu! ms %0\r\n" IDS_HOP_ZERO, " <1 ms %0\r\n" IDS_TIMEOUT " * %0\r\n" - IDS_HOP_RES_INFO "%1 [%2]\r\n" - IDS_HOP_IP_INFO "%1\r\n" + IDS_HOP_RES_INFO "%1 [%2]" + IDS_HOP_IP_INFO "%1" + IDS_LINEBREAK "\r\n" IDS_REQ_TIMED_OUT "Request timed out.\r\n" + IDS_HOP_RESPONSE " reports: " + IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n" + IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n" END diff --git a/base/applications/network/tracert/lang/uk-UA.rc b/base/applications/network/tracert/lang/uk-UA.rc index 9a2903c251..794fb76746 100644 --- a/base/applications/network/tracert/lang/uk-UA.rc +++ b/base/applications/network/tracert/lang/uk-UA.rc @@ -20,13 +20,18 @@ Options:\r\n\ IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n" IDS_GEN_FAILURE "General failure.\r\n" + IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n" IDS_HOP_COUNT "%1!3lu! %0\r\n" IDS_HOP_TIME "%1!4lu! ms %0\r\n" IDS_HOP_ZERO, " <1 ms %0\r\n" IDS_TIMEOUT " * %0\r\n" - IDS_HOP_RES_INFO "%1 [%2]\r\n" - IDS_HOP_IP_INFO "%1\r\n" + IDS_HOP_RES_INFO "%1 [%2]" + IDS_HOP_IP_INFO "%1" + IDS_LINEBREAK "\r\n" IDS_REQ_TIMED_OUT "Request timed out.\r\n" + IDS_HOP_RESPONSE " reports: " + IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n" + IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n" END diff --git a/base/applications/network/tracert/lang/zh-CN.rc b/base/applications/network/tracert/lang/zh-CN.rc index 61966e02b8..2c303aad4f 100644 --- a/base/applications/network/tracert/lang/zh-CN.rc +++ b/base/applications/network/tracert/lang/zh-CN.rc @@ -20,13 +20,18 @@ Options:\r\n\ IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n" IDS_GEN_FAILURE "General failure.\r\n" + IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n" IDS_HOP_COUNT "%1!3lu! %0\r\n" IDS_HOP_TIME "%1!4lu! ms %0\r\n" IDS_HOP_ZERO, " <1 ms %0\r\n" IDS_TIMEOUT " * %0\r\n" - IDS_HOP_RES_INFO "%1 [%2]\r\n" - IDS_HOP_IP_INFO "%1\r\n" + IDS_HOP_RES_INFO "%1 [%2]" + IDS_HOP_IP_INFO "%1" + IDS_LINEBREAK "\r\n" IDS_REQ_TIMED_OUT "Request timed out.\r\n" + IDS_HOP_RESPONSE " reports: " + IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n" + IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n" END diff --git a/base/applications/network/tracert/lang/zh-TW.rc b/base/applications/network/tracert/lang/zh-TW.rc index 86ecc1c9f8..dc37c0388a 100644 --- a/base/applications/network/tracert/lang/zh-TW.rc +++ b/base/applications/network/tracert/lang/zh-TW.rc @@ -20,13 +20,18 @@ Options:\r\n\ IDS_UNABLE_RESOLVE "Unable to resolve target system name %1.\r\n" IDS_GEN_FAILURE "General failure.\r\n" + IDS_TRANSMIT_FAILED "Transmit failed. (Error %1!u!)\r\n" IDS_HOP_COUNT "%1!3lu! %0\r\n" IDS_HOP_TIME "%1!4lu! ms %0\r\n" IDS_HOP_ZERO, " <1 ms %0\r\n" IDS_TIMEOUT " * %0\r\n" - IDS_HOP_RES_INFO "%1 [%2]\r\n" - IDS_HOP_IP_INFO "%1\r\n" + IDS_HOP_RES_INFO "%1 [%2]" + IDS_HOP_IP_INFO "%1" + IDS_LINEBREAK "\r\n" IDS_REQ_TIMED_OUT "Request timed out.\r\n" + IDS_HOP_RESPONSE " reports: " + IDS_DEST_HOST_UNREACHABLE "Destination host unreachable.\r\n" + IDS_DEST_NET_UNREACHABLE "Destination network unreachable.\r\n" END diff --git a/base/applications/network/tracert/resource.h b/base/applications/network/tracert/resource.h index 5bb07ecd6e..01f68bbdba 100644 --- a/base/applications/network/tracert/resource.h +++ b/base/applications/network/tracert/resource.h @@ -6,6 +6,7 @@ #define IDS_TRACE_COMPLETE 103 #define IDS_UNABLE_RESOLVE 104 #define IDS_GEN_FAILURE 105 +#define IDS_TRANSMIT_FAILED 106 #define IDS_HOP_COUNT 107 #define IDS_HOP_TIME 108 @@ -14,3 +15,7 @@ #define IDS_HOP_RES_INFO 111 #define IDS_HOP_IP_INFO 112 #define IDS_REQ_TIMED_OUT 113 +#define IDS_LINEBREAK 114 +#define IDS_HOP_RESPONSE 115 +#define IDS_DEST_HOST_UNREACHABLE 116 +#define IDS_DEST_NET_UNREACHABLE 117 diff --git a/base/applications/network/tracert/tracert.cpp b/base/applications/network/tracert/tracert.cpp index ca14cc5345..1b52d56650 100644 --- a/base/applications/network/tracert/tracert.cpp +++ b/base/applications/network/tracert/tracert.cpp @@ -317,8 +317,19 @@ DecodeResponse( break; case IP_DEST_HOST_UNREACHABLE: - OutputText(IDS_TIMEOUT); - break; + case IP_DEST_NET_UNREACHABLE: + FoundTarget = true; + PrintHopInfo(AddressInfo); + OutputText(IDS_HOP_RESPONSE); + if (Status == IP_DEST_HOST_UNREACHABLE) + { + OutputText(IDS_DEST_HOST_UNREACHABLE); + } + else if (Status == IP_DEST_NET_UNREACHABLE) + { + OutputText(IDS_DEST_NET_UNREACHABLE); + } + return true; case IP_REQ_TIMED_OUT: OutputText(IDS_TIMEOUT); @@ -329,6 +340,7 @@ DecodeResponse( return false; default: + OutputText(IDS_TRANSMIT_FAILED, Status); return false; } @@ -341,6 +353,7 @@ DecodeResponse( if (Status == IP_TTL_EXPIRED_TRANSIT || Status == IP_SUCCESS) { PrintHopInfo(AddressInfo); + OutputText(IDS_LINEBREAK); } else if (Status == IP_REQ_TIMED_OUT) {
6 years, 11 months
1
0
0
0
02/02: [NTOSKRNL] Simplify (and speedup!) CcCanIWrite() using the dirty pages count in cache map.
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=dc85171674eaecb386ada…
commit dc85171674eaecb386adaf7037b977715b1529f3 Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Fri Jan 26 10:50:13 2018 +0100 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Fri Jan 26 10:50:13 2018 +0100 [NTOSKRNL] Simplify (and speedup!) CcCanIWrite() using the dirty pages count in cache map. --- ntoskrnl/cc/copy.c | 26 ++------------------------ ntoskrnl/cc/view.c | 7 +++---- 2 files changed, 5 insertions(+), 28 deletions(-) diff --git a/ntoskrnl/cc/copy.c b/ntoskrnl/cc/copy.c index db6f0f4920..e194074d59 100644 --- a/ntoskrnl/cc/copy.c +++ b/ntoskrnl/cc/copy.c @@ -376,9 +376,6 @@ CcCanIWrite ( IN BOOLEAN Wait, IN BOOLEAN Retrying) { - KIRQL OldIrql; - ULONG DirtyPages; - PLIST_ENTRY ListEntry; PFSRTL_COMMON_FCB_HEADER Fcb; PROS_SHARED_CACHE_MAP SharedCacheMap; @@ -409,27 +406,8 @@ CcCanIWrite ( return TRUE; } - /* There's a limit, start counting dirty pages */ - DirtyPages = 0; - KeAcquireSpinLock(&SharedCacheMap->CacheMapLock, &OldIrql); - for (ListEntry = SharedCacheMap->CacheMapVacbListHead.Flink; - ListEntry != &SharedCacheMap->CacheMapVacbListHead; - ListEntry = ListEntry->Flink) - { - PROS_VACB Vacb; - - Vacb = CONTAINING_RECORD(ListEntry, - ROS_VACB, - CacheMapVacbListEntry); - if (Vacb->Dirty) - { - DirtyPages += VACB_MAPPING_GRANULARITY / PAGE_SIZE; - } - } - KeReleaseSpinLock(&SharedCacheMap->CacheMapLock, OldIrql); - /* Is dirty page count above local threshold? */ - if (DirtyPages > SharedCacheMap->DirtyPageThreshold) + if (SharedCacheMap->DirtyPages > SharedCacheMap->DirtyPageThreshold) { return FALSE; } @@ -437,7 +415,7 @@ CcCanIWrite ( /* We cannot write if dirty pages count will bring use above * XXX: Might not be accurate */ - if (DirtyPages + (BytesToWrite / PAGE_SIZE) > SharedCacheMap->DirtyPageThreshold) + if (SharedCacheMap->DirtyPages + (BytesToWrite / PAGE_SIZE) > SharedCacheMap->DirtyPageThreshold) { return FALSE; } diff --git a/ntoskrnl/cc/view.c b/ntoskrnl/cc/view.c index b08210c241..0340c68407 100644 --- a/ntoskrnl/cc/view.c +++ b/ntoskrnl/cc/view.c @@ -1521,6 +1521,9 @@ ExpKdbgExtFileCache(ULONG Argc, PCHAR Argv[]) SharedCacheMap = CONTAINING_RECORD(ListEntry, ROS_SHARED_CACHE_MAP, SharedCacheMapLinks); + /* Dirty size */ + Dirty = (SharedCacheMap->DirtyPages * PAGE_SIZE) / 1024; + /* First, count for all the associated VACB */ for (Vacbs = SharedCacheMap->CacheMapVacbListHead.Flink; Vacbs != &SharedCacheMap->CacheMapVacbListHead; @@ -1529,10 +1532,6 @@ ExpKdbgExtFileCache(ULONG Argc, PCHAR Argv[]) PROS_VACB Vacb; Vacb = CONTAINING_RECORD(Vacbs, ROS_VACB, CacheMapVacbListEntry); - if (Vacb->Dirty) - { - Dirty += VACB_MAPPING_GRANULARITY / 1024; - } if (Vacb->Valid) { Valid += VACB_MAPPING_GRANULARITY / 1024;
6 years, 11 months
1
0
0
0
01/02: [NTOSKRNL] Store the total dirty pages per shared cache map in it.
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5cc0668b213b361f96ba7…
commit 5cc0668b213b361f96ba713ecaef5bc5274775d9 Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Fri Jan 26 10:40:05 2018 +0100 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Fri Jan 26 10:42:09 2018 +0100 [NTOSKRNL] Store the total dirty pages per shared cache map in it. --- ntoskrnl/cc/fs.c | 1 + ntoskrnl/cc/view.c | 6 ++++++ ntoskrnl/include/internal/cc.h | 3 ++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ntoskrnl/cc/fs.c b/ntoskrnl/cc/fs.c index d068f96eb2..9e9ff1a4dc 100644 --- a/ntoskrnl/cc/fs.c +++ b/ntoskrnl/cc/fs.c @@ -235,6 +235,7 @@ CcPurgeCacheSection ( { RemoveEntryList(&Vacb->DirtyVacbListEntry); CcTotalDirtyPages -= VACB_MAPPING_GRANULARITY / PAGE_SIZE; + Vacb->SharedCacheMap->DirtyPages -= VACB_MAPPING_GRANULARITY / PAGE_SIZE; } RemoveEntryList(&Vacb->CacheMapVacbListEntry); InsertHeadList(&FreeList, &Vacb->CacheMapVacbListEntry); diff --git a/ntoskrnl/cc/view.c b/ntoskrnl/cc/view.c index e8da9a51c8..b08210c241 100644 --- a/ntoskrnl/cc/view.c +++ b/ntoskrnl/cc/view.c @@ -175,6 +175,7 @@ CcRosFlushVacb ( Vacb->Dirty = FALSE; RemoveEntryList(&Vacb->DirtyVacbListEntry); CcTotalDirtyPages -= VACB_MAPPING_GRANULARITY / PAGE_SIZE; + Vacb->SharedCacheMap->DirtyPages -= VACB_MAPPING_GRANULARITY / PAGE_SIZE; CcRosVacbDecRefCount(Vacb); KeReleaseSpinLock(&Vacb->SharedCacheMap->CacheMapLock, oldIrql); @@ -535,6 +536,7 @@ CcRosReleaseVacb ( { InsertTailList(&DirtyVacbListHead, &Vacb->DirtyVacbListEntry); CcTotalDirtyPages += VACB_MAPPING_GRANULARITY / PAGE_SIZE; + Vacb->SharedCacheMap->DirtyPages += VACB_MAPPING_GRANULARITY / PAGE_SIZE; } if (Mapped) @@ -621,6 +623,7 @@ CcRosMarkDirtyVacb ( { InsertTailList(&DirtyVacbListHead, &Vacb->DirtyVacbListEntry); CcTotalDirtyPages += VACB_MAPPING_GRANULARITY / PAGE_SIZE; + Vacb->SharedCacheMap->DirtyPages += VACB_MAPPING_GRANULARITY / PAGE_SIZE; } else { @@ -698,6 +701,7 @@ CcRosUnmapVacb ( { InsertTailList(&DirtyVacbListHead, &Vacb->DirtyVacbListEntry); CcTotalDirtyPages += VACB_MAPPING_GRANULARITY / PAGE_SIZE; + Vacb->SharedCacheMap->DirtyPages += VACB_MAPPING_GRANULARITY / PAGE_SIZE; } CcRosVacbDecRefCount(Vacb); @@ -1162,6 +1166,7 @@ CcRosDeleteFileCache ( { RemoveEntryList(¤t->DirtyVacbListEntry); CcTotalDirtyPages -= VACB_MAPPING_GRANULARITY / PAGE_SIZE; + current->SharedCacheMap->DirtyPages -= VACB_MAPPING_GRANULARITY / PAGE_SIZE; DPRINT1("Freeing dirty VACB\n"); } InsertHeadList(&FreeList, ¤t->CacheMapVacbListEntry); @@ -1349,6 +1354,7 @@ CcRosInitializeFileCache ( SharedCacheMap->FileSize = FileSizes->FileSize; SharedCacheMap->PinAccess = PinAccess; SharedCacheMap->DirtyPageThreshold = 0; + SharedCacheMap->DirtyPages = 0; KeInitializeSpinLock(&SharedCacheMap->CacheMapLock); InitializeListHead(&SharedCacheMap->CacheMapVacbListHead); FileObject->SectionObjectPointer->SharedCacheMap = SharedCacheMap; diff --git a/ntoskrnl/include/internal/cc.h b/ntoskrnl/include/internal/cc.h index 913517a762..a85df9da61 100644 --- a/ntoskrnl/include/internal/cc.h +++ b/ntoskrnl/include/internal/cc.h @@ -159,8 +159,9 @@ typedef struct _ROS_SHARED_CACHE_MAP PVOID LazyWriteContext; KSPIN_LOCK CacheMapLock; ULONG OpenCount; - ULONG DirtyPageThreshold; + ULONG DirtyPages; LIST_ENTRY SharedCacheMapLinks; + ULONG DirtyPageThreshold; #if DBG BOOLEAN Trace; /* enable extra trace output for this cache map and it's VACBs */ #endif
6 years, 11 months
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
38
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
34
35
36
37
38
Results per page:
10
25
50
100
200