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
July 2010
----- 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
17 participants
467 discussions
Start a n
N
ew thread
[fireball] 48166: - Sync up to Wine-1.2.
by fireball@svn.reactos.org
Author: fireball Date: Wed Jul 21 19:53:00 2010 New Revision: 48166 URL:
http://svn.reactos.org/svn/reactos?rev=48166&view=rev
Log: - Sync up to Wine-1.2. Modified: branches/arwinss/reactos/dll/win32/user32/ (props changed) branches/arwinss/reactos/dll/win32/user32/resources/oic_bang.svg branches/arwinss/reactos/dll/win32/user32/resources/oic_hand.svg branches/arwinss/reactos/dll/win32/user32/resources/oic_note.svg branches/arwinss/reactos/dll/win32/user32/resources/oic_ques.svg branches/arwinss/reactos/dll/win32/user32/resources/oic_sample.svg branches/arwinss/reactos/dll/win32/user32/resources/user32_Uk.rc branches/arwinss/reactos/dll/win32/user32/sysparams.c branches/arwinss/reactos/dll/win32/winex11.drv/ (props changed) branches/arwinss/reactos/dll/win32/winex11.drv/event.c branches/arwinss/reactos/dll/win32/winex11.drv/keyboard.c branches/arwinss/reactos/dll/win32/winex11.drv/mouse.c branches/arwinss/reactos/dll/win32/winex11.drv/window.c branches/arwinss/reactos/dll/win32/winex11.drv/x11drv.h branches/arwinss/reactos/dll/win32/winex11.drv/x11drv_main.c branches/arwinss/reactos/dll/win32/winex11.drv/xrender.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/arwinss/reactos/dll/win32/user32/resources/oic_bang.svg URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
Modified: branches/arwinss/reactos/dll/win32/user32/resources/oic_hand.svg URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
Modified: branches/arwinss/reactos/dll/win32/user32/resources/oic_note.svg URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
Modified: branches/arwinss/reactos/dll/win32/user32/resources/oic_ques.svg URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
Modified: branches/arwinss/reactos/dll/win32/user32/resources/oic_sample.svg URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
Modified: branches/arwinss/reactos/dll/win32/user32/resources/user32_Uk.rc URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
Modified: branches/arwinss/reactos/dll/win32/user32/sysparams.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
Modified: branches/arwinss/reactos/dll/win32/winex11.drv/event.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
Modified: branches/arwinss/reactos/dll/win32/winex11.drv/keyboard.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
Modified: branches/arwinss/reactos/dll/win32/winex11.drv/mouse.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
Modified: branches/arwinss/reactos/dll/win32/winex11.drv/window.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
Modified: branches/arwinss/reactos/dll/win32/winex11.drv/x11drv.h URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
Modified: branches/arwinss/reactos/dll/win32/winex11.drv/x11drv_main.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
Modified: branches/arwinss/reactos/dll/win32/winex11.drv/xrender.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
14 years, 5 months
1
0
0
0
[akhaldi] 48165: [DDK/NDIS] - Add missing ntstatus.h inclusion. - Group some related definitions. - Add several missing ones.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Jul 21 19:12:14 2010 New Revision: 48165 URL:
http://svn.reactos.org/svn/reactos?rev=48165&view=rev
Log: [DDK/NDIS] - Add missing ntstatus.h inclusion. - Group some related definitions. - Add several missing ones. Modified: trunk/reactos/include/ddk/ndis.h Modified: trunk/reactos/include/ddk/ndis.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ndis.h?rev=481…
============================================================================== --- trunk/reactos/include/ddk/ndis.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/ndis.h [iso-8859-1] Wed Jul 21 19:12:14 2010 @@ -32,6 +32,10 @@ #ifndef __NDIS_H #define __NDIS_H +#ifndef NDIS_WDM +#define NDIS_WDM 0 +#endif + /* Helper macro to enable gcc's extension. */ #ifndef __GNU_EXTENSION #ifdef __GNUC__ @@ -42,10 +46,14 @@ #endif #include "ntddk.h" -#include "ntddndis.h" #include "netpnp.h" +#include "ntstatus.h" #include "netevent.h" #include <qos.h> + +typedef int NDIS_STATUS, *PNDIS_STATUS; + +#include "ntddndis.h" #if !defined(_WINDEF_H) typedef unsigned int UINT, *PUINT; @@ -54,6 +62,194 @@ #ifdef __cplusplus extern "C" { #endif + +#ifndef __NET_PNP__ +#define __NET_PNP__ + +typedef enum _NET_DEVICE_POWER_STATE { + NetDeviceStateUnspecified = 0, + NetDeviceStateD0, + NetDeviceStateD1, + NetDeviceStateD2, + NetDeviceStateD3, + NetDeviceStateMaximum +} NET_DEVICE_POWER_STATE, *PNET_DEVICE_POWER_STATE; + +typedef enum _NET_PNP_EVENT_CODE { + NetEventSetPower, + NetEventQueryPower, + NetEventQueryRemoveDevice, + NetEventCancelRemoveDevice, + NetEventReconfigure, + NetEventBindList, + NetEventBindsComplete, + NetEventPnPCapabilities, + NetEventPause, + NetEventRestart, + NetEventPortActivation, + NetEventPortDeactivation, + NetEventIMReEnableDevice, + NetEventMaximum +} NET_PNP_EVENT_CODE, *PNET_PNP_EVENT_CODE; + +typedef struct _NET_PNP_EVENT { + NET_PNP_EVENT_CODE NetEvent; + PVOID Buffer; + ULONG BufferLength; + ULONG_PTR NdisReserved[4]; + ULONG_PTR TransportReserved[4]; + ULONG_PTR TdiReserved[4]; + ULONG_PTR TdiClientReserved[4]; +} NET_PNP_EVENT, *PNET_PNP_EVENT; + +#endif /* __NET_PNP__ */ + +#if !defined(NDIS_WRAPPER) + +#if (defined(NDIS_MINIPORT_MAJOR_VERSION) || \ + (defined(NDIS_MINIPORT_MINOR_VERSION)) || \ + (defined(NDIS_PROTOCOL_MAJOR_VERSION)) || \ + (defined(NDIS_PROTOCOL_MINOR_VERSION)) || \ + (defined(NDIS_FILTER_MAJOR_VERSION)) || \ + (defined(NDIS_FILTER_MINOR_VERSION))) +#error "Driver should not redefine NDIS reserved macros" +#endif + +#if defined(NDIS_MINIPORT_DRIVER) + +#if defined(NDIS620_MINIPORT) +#define NDIS_MINIPORT_MAJOR_VERSION 6 +#define NDIS_MINIPORT_MINOR_VERSION 20 +#elif defined(NDIS61_MINIPORT) +#define NDIS_MINIPORT_MAJOR_VERSION 6 +#define NDIS_MINIPORT_MINOR_VERSION 1 +#elif defined(NDIS60_MINIPORT) +#define NDIS_MINIPORT_MAJOR_VERSION 6 +#define NDIS_MINIPORT_MINOR_VERSION 0 +#elif defined(NDIS51_MINIPORT) +#define NDIS_MINIPORT_MAJOR_VERSION 5 +#define NDIS_MINIPORT_MINOR_VERSION 1 +#elif defined(NDIS50_MINIPORT) +#define NDIS_MINIPORT_MAJOR_VERSION 5 +#define NDIS_MINIPORT_MINOR_VERSION 0 +#else +#error "Only NDIS miniport drivers with version >= 5 are supported" +#endif + +#if ((NDIS_MINIPORT_MAJOR_VERSION == 6) && \ + (NDIS_MINIPORT_MINOR_VERSION != 20) && \ + (NDIS_MINIPORT_MINOR_VERSION != 1) && \ + (NDIS_MINIPORT_MINOR_VERSION != 0)) +#error "Invalid miniport major/minor version combination" +#elif ((NDIS_MINIPORT_MAJOR_VERSION == 5) && \ + (NDIS_MINIPORT_MINOR_VERSION != 1) && \ + (NDIS_MINIPORT_MINOR_VERSION != 0)) +#error "Invalid miniport major/minor version combination" +#endif + +#if (NDIS_MINIPORT_MAJOR_VERSION == 6) && \ + ((NDIS_MINIPORT_MINOR_VERSION == 20 && NTDDI_VERSION < NTDDI_WIN7) || \ + (NDIS_MINIPORT_MINOR_VERSION == 1 && NTDDI_VERSION < NTDDI_VISTA) || \ + (NDIS_MINIPORT_MINOR_VERSION == 0 && NTDDI_VERSION < NTDDI_VISTA)) +#error "Wrong NDIS/DDI version" +#elif ((NDIS_MINIPORT_MAJOR_VERSION == 5) && \ + (((NDIS_MINIPORT_MINOR_VERSION == 1) && (NTDDI_VERSION < NTDDI_WINXP)) || \ + ((NDIS_MINIPORT_MINOR_VERSION == 0) && (NTDDI_VERSION < NTDDI_WIN2K)))) +#error "Wrong NDIS/DDI version" +#endif + + +#endif /* defined(NDIS_MINIPORT_DRIVER) */ + +#if defined(NDIS30) +#error "Only NDIS Protocol drivers version 4 or later are supported" +#endif + +#if defined(NDIS620) +#define NDIS_PROTOCOL_MAJOR_VERSION 6 +#define NDIS_PROTOCOL_MINOR_VERSION 20 +#define NDIS_FILTER_MAJOR_VERSION 6 +#define NDIS_FILTER_MINOR_VERSION 20 +#elif defined(NDIS61) +#define NDIS_PROTOCOL_MAJOR_VERSION 6 +#define NDIS_PROTOCOL_MINOR_VERSION 1 +#define NDIS_FILTER_MAJOR_VERSION 6 +#define NDIS_FILTER_MINOR_VERSION 1 +#elif defined(NDIS60) +#define NDIS_PROTOCOL_MAJOR_VERSION 6 +#define NDIS_PROTOCOL_MINOR_VERSION 0 +#define NDIS_FILTER_MAJOR_VERSION 6 +#define NDIS_FILTER_MINOR_VERSION 0 +#elif defined(NDIS51) +#define NDIS_PROTOCOL_MAJOR_VERSION 5 +#define NDIS_PROTOCOL_MINOR_VERSION 1 +#elif defined(NDIS50) +#define NDIS_PROTOCOL_MAJOR_VERSION 5 +#define NDIS_PROTOCOL_MINOR_VERSION 0 +#elif defined(NDIS40) +#define NDIS_PROTOCOL_MAJOR_VERSION 4 +#define NDIS_PROTOCOL_MINOR_VERSION 0 +#endif + +#if !defined(NDIS_MINIPORT_DRIVER) && !defined(NDIS_PROTOCOL_MAJOR_VERSION) +#define NDIS40 +#define NDIS_PROTOCOL_MAJOR_VERSION 4 +#define NDIS_PROTOCOL_MINOR_VERSION 0 +#endif + +#if defined(NDIS_FILTER_MAJOR_VERSION) + +#if ((NDIS_FILTER_MAJOR_VERSION == 6) && \ + (NDIS_FILTER_MINOR_VERSION != 20) && \ + (NDIS_FILTER_MINOR_VERSION != 1) && \ + (NDIS_FILTER_MINOR_VERSION != 0)) +#error "Invalid Filter version" +#endif + +#endif /* defined(NDIS_FILTER_MAJOR_VERSION) */ + + +#if defined(NDIS_PROTOCOL_MAJOR_VERSION) + +#if ((NDIS_PROTOCOL_MAJOR_VERSION == 6) && \ + (NDIS_PROTOCOL_MINOR_VERSION != 20) && \ + (NDIS_PROTOCOL_MINOR_VERSION != 1) && \ + (NDIS_PROTOCOL_MINOR_VERSION != 0)) +#error "Invalid Protocol version" +#elif ((NDIS_PROTOCOL_MAJOR_VERSION == 5) && \ + (NDIS_PROTOCOL_MINOR_VERSION != 1) && (NDIS_PROTOCOL_MINOR_VERSION != 0)) +#error "Invalid Protocol version" +#elif ((NDIS_PROTOCOL_MAJOR_VERSION == 4) && (NDIS_PROTOCOL_MINOR_VERSION != 0)) +#error "Invalid Protocol major/minor version" +#endif + +#if ((NDIS_PROTOCOL_MAJOR_VERSION == 6) && (NTDDI_VERSION < NTDDI_VISTA)) +#error "Wrong NDIS/DDI version" +#endif + +#endif /* defined(NDIS_PROTOCOL_MAJOR_VERSION) */ + +#endif /* !defined(NDIS_WRAPPER) */ + +#if !defined(NDIS_LEGACY_MINIPORT) + +#if ((defined(NDIS_MINIPORT_DRIVER) && (NDIS_MINIPORT_MAJOR_VERSION < 6)) || NDIS_WRAPPER) +#define NDIS_LEGACY_MINIPORT 1 +#else +#define NDIS_LEGACY_MINIPORT 0 +#endif + +#endif /* !defined(NDIS_LEGACY_MINIPORT) */ + +#if !defined(NDIS_LEGACY_PROTOCOL) + +#if ((defined(NDIS_PROTOCOL_MAJOR_VERSION) && (NDIS_PROTOCOL_MAJOR_VERSION < 6)) || NDIS_WRAPPER) +#define NDIS_LEGACY_PROTOCOL 1 +#else +#define NDIS_LEGACY_PROTOCOL 0 +#endif + +#endif /* !defined(NDIS_LEGACY_PROTOCOL) */ #if defined(NDIS_WRAPPER) #define NDISAPI @@ -111,7 +307,6 @@ } NDIS_EVENT, *PNDIS_EVENT; typedef PVOID NDIS_HANDLE, *PNDIS_HANDLE; -typedef int NDIS_STATUS, *PNDIS_STATUS; typedef ANSI_STRING NDIS_ANSI_STRING, *PNDIS_ANSI_STRING; typedef UNICODE_STRING NDIS_STRING, *PNDIS_STRING; @@ -279,8 +474,6 @@ KDPC Dpc; } NDIS_TIMER, *PNDIS_TIMER; - - /* Hardware */ typedef CM_MCA_POS_DATA NDIS_MCA_POS_DATA, *PNDIS_MCA_POS_DATA; @@ -689,14 +882,12 @@ #define NDIS_PROTOCOL_ID_MAX 0x0F #define NDIS_PROTOCOL_ID_MASK 0x0F - /* OID_GEN_TRANSPORT_HEADER_OFFSET */ typedef struct _TRANSPORT_HEADER_OFFSET { USHORT ProtocolType; USHORT HeaderOffset; } TRANSPORT_HEADER_OFFSET, *PTRANSPORT_HEADER_OFFSET; - /* OID_GEN_CO_LINK_SPEED / OID_GEN_CO_MINIMUM_LINK_SPEED */ typedef struct _NDIS_CO_LINK_SPEED { ULONG Outbound; @@ -704,6 +895,7 @@ } NDIS_CO_LINK_SPEED, *PNDIS_CO_LINK_SPEED; typedef ULONG NDIS_AF, *PNDIS_AF; + #define CO_ADDRESS_FAMILY_Q2931 ((NDIS_AF)0x1) #define CO_ADDRESS_FAMILY_PSCHED ((NDIS_AF)0x2) #define CO_ADDRESS_FAMILY_L2TP ((NDIS_AF)0x3)
14 years, 5 months
1
0
0
0
[sir_richard] 48164: [NTOS]: Handle faults on user-mode addresses, from user-mode processes, if they are owned by ARM3, so they can be forwarded to the VAD fault handler.
by sir_richard@svn.reactos.org
Author: sir_richard Date: Wed Jul 21 18:09:31 2010 New Revision: 48164 URL:
http://svn.reactos.org/svn/reactos?rev=48164&view=rev
Log: [NTOS]: Handle faults on user-mode addresses, from user-mode processes, if they are owned by ARM3, so they can be forwarded to the VAD fault handler. Modified: trunk/reactos/ntoskrnl/mm/mmfault.c Modified: trunk/reactos/ntoskrnl/mm/mmfault.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mmfault.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/mm/mmfault.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/mmfault.c [iso-8859-1] Wed Jul 21 18:09:31 2010 @@ -284,6 +284,11 @@ * can go away. */ MemoryArea = MmLocateMemoryAreaByAddress(MmGetKernelAddressSpace(), Address); + if (!(MemoryArea) && (Address <= MM_HIGHEST_VAD_ADDRESS)) + { + /* Could this be a VAD fault from user-mode? */ + MemoryArea = MmLocateMemoryAreaByAddress(MmGetCurrentAddressSpace(), Address); + } if ((!(MemoryArea) && ((ULONG_PTR)Address >= (ULONG_PTR)MmPagedPoolStart)) || ((MemoryArea) && (MemoryArea->Type == MEMORY_AREA_OWNED_BY_ARM3))) { @@ -292,7 +297,7 @@ // DPRINT("ARM3 fault %p\n", MemoryArea); return MmArmAccessFault(StoreInstruction, Address, Mode, TrapInformation); - } + } /* Keep same old ReactOS Behaviour */ if (StoreInstruction)
14 years, 5 months
1
0
0
0
[sir_richard] 48163: [NTOS]: If the memory area is owned by ARM3, and it's being freed, don't touch the pages, just unlink it and free the memory. This is useful for MAREAs being used by ARM3 to protect pieces of address space from the Ros Mm Allocator, but when we don't want it to start playing with our pages. When we do free those MAREAs, keep it away!
by sir_richard@svn.reactos.org
Author: sir_richard Date: Wed Jul 21 17:58:09 2010 New Revision: 48163 URL:
http://svn.reactos.org/svn/reactos?rev=48163&view=rev
Log: [NTOS]: If the memory area is owned by ARM3, and it's being freed, don't touch the pages, just unlink it and free the memory. This is useful for MAREAs being used by ARM3 to protect pieces of address space from the Ros Mm Allocator, but when we don't want it to start playing with our pages. When we do free those MAREAs, keep it away! Modified: trunk/reactos/ntoskrnl/mm/marea.c Modified: trunk/reactos/ntoskrnl/mm/marea.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/marea.c?rev=48…
============================================================================== --- trunk/reactos/ntoskrnl/mm/marea.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/marea.c [iso-8859-1] Wed Jul 21 17:58:09 2010 @@ -732,51 +732,55 @@ PMEMORY_AREA *ParentReplace; ULONG_PTR Address; PVOID EndAddress; - PEPROCESS CurrentProcess = PsGetCurrentProcess(); - PEPROCESS Process = MmGetAddressSpaceOwner(AddressSpace); - - if (Process != NULL && - Process != CurrentProcess) - { - KeAttachProcess(&Process->Pcb); - } - - EndAddress = MM_ROUND_UP(MemoryArea->EndingAddress, PAGE_SIZE); - for (Address = (ULONG_PTR)MemoryArea->StartingAddress; - Address < (ULONG_PTR)EndAddress; - Address += PAGE_SIZE) - { - if (MemoryArea->Type == MEMORY_AREA_IO_MAPPING) - { - MmRawDeleteVirtualMapping((PVOID)Address); - } - else - { - BOOLEAN Dirty = FALSE; - SWAPENTRY SwapEntry = 0; - PFN_NUMBER Page = 0; - - if (MmIsPageSwapEntry(Process, (PVOID)Address)) - { - MmDeletePageFileMapping(Process, (PVOID)Address, &SwapEntry); - } - else - { - MmDeleteVirtualMapping(Process, (PVOID)Address, FALSE, &Dirty, &Page); - } - if (FreePage != NULL) - { - FreePage(FreePageContext, MemoryArea, (PVOID)Address, - Page, SwapEntry, (BOOLEAN)Dirty); - } - } - } - - if (Process != NULL && - Process != CurrentProcess) - { - KeDetachProcess(); - } + + if (MemoryArea->Type != MEMORY_AREA_OWNED_BY_ARM3) + { + PEPROCESS CurrentProcess = PsGetCurrentProcess(); + PEPROCESS Process = MmGetAddressSpaceOwner(AddressSpace); + + if (Process != NULL && + Process != CurrentProcess) + { + KeAttachProcess(&Process->Pcb); + } + + EndAddress = MM_ROUND_UP(MemoryArea->EndingAddress, PAGE_SIZE); + for (Address = (ULONG_PTR)MemoryArea->StartingAddress; + Address < (ULONG_PTR)EndAddress; + Address += PAGE_SIZE) + { + if (MemoryArea->Type == MEMORY_AREA_IO_MAPPING) + { + MmRawDeleteVirtualMapping((PVOID)Address); + } + else + { + BOOLEAN Dirty = FALSE; + SWAPENTRY SwapEntry = 0; + PFN_NUMBER Page = 0; + + if (MmIsPageSwapEntry(Process, (PVOID)Address)) + { + MmDeletePageFileMapping(Process, (PVOID)Address, &SwapEntry); + } + else + { + MmDeleteVirtualMapping(Process, (PVOID)Address, FALSE, &Dirty, &Page); + } + if (FreePage != NULL) + { + FreePage(FreePageContext, MemoryArea, (PVOID)Address, + Page, SwapEntry, (BOOLEAN)Dirty); + } + } + } + + if (Process != NULL && + Process != CurrentProcess) + { + KeDetachProcess(); + } + } /* Remove the tree item. */ {
14 years, 5 months
1
0
0
0
[akhaldi] 48162: [CRT] - Improve NULL definition.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Jul 21 17:26:00 2010 New Revision: 48162 URL:
http://svn.reactos.org/svn/reactos?rev=48162&view=rev
Log: [CRT] - Improve NULL definition. Modified: trunk/reactos/include/crt/stdlib.h Modified: trunk/reactos/include/crt/stdlib.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/stdlib.h?rev=4…
============================================================================== --- trunk/reactos/include/crt/stdlib.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/stdlib.h [iso-8859-1] Wed Jul 21 17:26:00 2010 @@ -17,7 +17,11 @@ #ifndef NULL #ifdef __cplusplus +#ifndef _WIN64 #define NULL 0 +#else +#define NULL 0LL +#endif /* W64 */ #else #define NULL ((void *)0) #endif
14 years, 5 months
1
0
0
0
[tkreuzer] 48161: [CRT] - Add a number of amd64 specific math functions - add generic c versions of cos and sin - Remove leading underscores from amd64 symbols
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Jul 21 16:03:44 2010 New Revision: 48161 URL:
http://svn.reactos.org/svn/reactos?rev=48161&view=rev
Log: [CRT] - Add a number of amd64 specific math functions - add generic c versions of cos and sin - Remove leading underscores from amd64 symbols Added: trunk/reactos/lib/sdk/crt/math/amd64/ (with props) trunk/reactos/lib/sdk/crt/math/amd64/alldiv.S (with props) trunk/reactos/lib/sdk/crt/math/amd64/atan.S (with props) trunk/reactos/lib/sdk/crt/math/amd64/atan2.S (with props) trunk/reactos/lib/sdk/crt/math/amd64/ceil.S (with props) trunk/reactos/lib/sdk/crt/math/amd64/ceilf.S (with props) trunk/reactos/lib/sdk/crt/math/amd64/exp.S (with props) trunk/reactos/lib/sdk/crt/math/amd64/fabs.S (with props) trunk/reactos/lib/sdk/crt/math/amd64/floor.S (with props) trunk/reactos/lib/sdk/crt/math/amd64/floorf.S (with props) trunk/reactos/lib/sdk/crt/math/amd64/fmod.S (with props) trunk/reactos/lib/sdk/crt/math/amd64/fmodf.S (with props) trunk/reactos/lib/sdk/crt/math/amd64/ldexp.S (with props) trunk/reactos/lib/sdk/crt/math/amd64/log.S (with props) trunk/reactos/lib/sdk/crt/math/amd64/log10.S (with props) trunk/reactos/lib/sdk/crt/math/amd64/pow.S (with props) trunk/reactos/lib/sdk/crt/math/amd64/sqrt.S (with props) trunk/reactos/lib/sdk/crt/math/amd64/sqrtf.S (with props) trunk/reactos/lib/sdk/crt/math/amd64/tan.S (with props) trunk/reactos/lib/sdk/crt/math/cos.c (with props) trunk/reactos/lib/sdk/crt/math/cosf.c (with props) trunk/reactos/lib/sdk/crt/math/i386/ceilf.S (with props) trunk/reactos/lib/sdk/crt/math/i386/floorf.S (with props) trunk/reactos/lib/sdk/crt/math/i386/fmodf.c (with props) trunk/reactos/lib/sdk/crt/math/i386/sqrtf.c (with props) trunk/reactos/lib/sdk/crt/math/sin.c (with props) trunk/reactos/lib/sdk/crt/math/sinf.c (with props) Modified: trunk/reactos/lib/sdk/crt/crt.rbuild trunk/reactos/lib/sdk/crt/except/amd64/chkstk_asm.s trunk/reactos/lib/sdk/crt/except/amd64/seh.s trunk/reactos/lib/sdk/crt/libcntpr.rbuild Modified: trunk/reactos/lib/sdk/crt/crt.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/crt.rbuild?rev…
============================================================================== --- trunk/reactos/lib/sdk/crt/crt.rbuild [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/crt.rbuild [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -113,6 +113,7 @@ <file>adjust.c</file> <file>asin.c</file> <file>cabs.c</file> + <file>cosf.c</file> <file>cosh.c</file> <file>div.c</file> <file>fdivbug.c</file> @@ -123,6 +124,7 @@ <file>modf.c</file> <file>rand.c</file> <file>s_modf.c</file> + <file>sinf.c</file> <file>sinh.c</file> <file>tanh.c</file> <file>pow_asm.c</file> @@ -141,9 +143,11 @@ <file>aullrem_asm.s</file> <file>aullshr_asm.s</file> <file>ceil_asm.s</file> + <file>ceilf.S</file> <file>cos_asm.s</file> <file>fabs_asm.s</file> <file>floor_asm.s</file> + <file>floorf.S</file> <file>ftol_asm.s</file> <file>log_asm.s</file> <file>log10_asm.s</file> @@ -156,7 +160,9 @@ <file>ci.c</file> <file>exp.c</file> <file>fmod.c</file> + <file>fmodf.c</file> <file>ldexp.c</file> + <file>sqrtf.c</file> </directory> <!-- FIXME: we don't actually implement these... they recursively call themselves through an alias --> <!--<file>j0_y0.c</file> @@ -164,11 +170,27 @@ <file>jn_yn.c</file>--> </if> <if property="ARCH" value="amd64"> - <directory name="i386"> - <file>atan2.c</file> - <file>exp.c</file> - <file>fmod.c</file> - <file>ldexp.c</file> + <file>cos.c</file> + <file>sin.c</file> + <directory name="amd64"> + <file>alldiv.S</file> + <file>atan.S</file> + <file>atan2.S</file> + <file>ceil.S</file> + <file>ceilf.S</file> + <file>exp.S</file> + <file>fabs.S</file> + <file>floor.S</file> + <file>floorf.S</file> + <file>fmod.S</file> + <file>fmodf.S</file> + <file>ldexp.S</file> + <file>log.S</file> + <file>log10.S</file> + <file>pow.S</file> + <file>sqrt.S</file> + <file>sqrtf.S</file> + <file>tan.S</file> </directory> <!-- FIXME: we don't actually implement these... they recursively call themselves through an alias --> <!--<file>j0_y0.c</file> Modified: trunk/reactos/lib/sdk/crt/except/amd64/chkstk_asm.s URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/except/amd64/c…
============================================================================== --- trunk/reactos/lib/sdk/crt/except/amd64/chkstk_asm.s [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/except/amd64/chkstk_asm.s [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -8,24 +8,23 @@ /* INCLUDES ******************************************************************/ -#include <ndk/amd64/asm.h> -#include <ndk/amd64/asmmacro.S> +#include <reactos/asm.h> .intel_syntax noprefix -.global _MsgUnimplemented -_MsgUnimplemented: +.global MsgUnimplemented +MsgUnimplemented: .asciz "WARNING: %s at %s:%d is UNIMPLEMENTED!\n" .proc _chkstk UNIMPLEMENTED chkstk ret -.endproc +.endp .proc _alloca_probe UNIMPLEMENTED alloca_probe ret -.endproc +.endp /* EOF */ Modified: trunk/reactos/lib/sdk/crt/except/amd64/seh.s URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/except/amd64/s…
============================================================================== --- trunk/reactos/lib/sdk/crt/except/amd64/seh.s [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/except/amd64/seh.s [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -25,7 +25,7 @@ /* FUNCTIONS *****************************************************************/ -.func unwind_handler +.func _unwind_handler _unwind_handler: ret .endfunc Modified: trunk/reactos/lib/sdk/crt/libcntpr.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/libcntpr.rbuil…
============================================================================== --- trunk/reactos/lib/sdk/crt/libcntpr.rbuild [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/libcntpr.rbuild [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -8,6 +8,7 @@ <define name="_NTDLLBUILD_" /> <define name="_LIBCNT_" /> <define name="_CRTBLD" /> + <define name="__CRT__NO_INLINE" /> <if property="ARCH" value="i386"> <define name="__MINGW_IMPORT">"extern __attribute__ ((dllexport))"</define> </if> @@ -57,6 +58,26 @@ <file>sin_asm.s</file> <file>sqrt_asm.s</file> <file>tan_asm.s</file> + </directory> + </if> + <if property="ARCH" value="amd64"> + <file>cos.c</file> + <file>sin.c</file> + <directory name="amd64"> + <file>alldiv.S</file> + <file>atan.S</file> + <file>atan2.S</file> + <file>ceil.S</file> + <file>exp.S</file> + <file>fabs.S</file> + <file>floor.S</file> + <file>fmod.S</file> + <file>ldexp.S</file> + <file>log.S</file> + <file>log10.S</file> + <file>pow.S</file> + <file>sqrt.S</file> + <file>tan.S</file> </directory> </if> <file>abs.c</file> Propchange: trunk/reactos/lib/sdk/crt/math/amd64/ ------------------------------------------------------------------------------ --- bugtraq:logregex (added) +++ bugtraq:logregex Wed Jul 21 16:03:44 2010 @@ -1,0 +1,2 @@ +([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))? +(\d+) Propchange: trunk/reactos/lib/sdk/crt/math/amd64/ ------------------------------------------------------------------------------ bugtraq:message = See issue #%BUGID% for more details. Propchange: trunk/reactos/lib/sdk/crt/math/amd64/ ------------------------------------------------------------------------------ bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: trunk/reactos/lib/sdk/crt/math/amd64/ ------------------------------------------------------------------------------ tsvn:logminsize = 10 Added: trunk/reactos/lib/sdk/crt/math/amd64/alldiv.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/amd64/all…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/amd64/alldiv.S (added) +++ trunk/reactos/lib/sdk/crt/math/amd64/alldiv.S [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -1,0 +1,28 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * PURPOSE: Implementation of alldiv + * FILE: lib/sdk/crt/math/amd64/alldiv.S + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <reactos/asm.h> +#include <ndk/amd64/asm.h> + +/* DATA *********************************************************************/ + +PUBLIC _fltused +_fltused: + .long 0x9875 + +/* FUNCTIONS ****************************************************************/ + +.code64 + +.proc alldiv + UNIMPLEMENTED alldiv + ret + +.endp alldiv Propchange: trunk/reactos/lib/sdk/crt/math/amd64/alldiv.S ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/sdk/crt/math/amd64/atan.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/amd64/ata…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/amd64/atan.S (added) +++ trunk/reactos/lib/sdk/crt/math/amd64/atan.S [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -1,0 +1,21 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * PURPOSE: Implementation of atan + * FILE: lib/sdk/crt/math/amd64/atan.S + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <reactos/asm.h> +#include <ndk/amd64/asm.h> + +/* FUNCTIONS ****************************************************************/ + +.code64 + +PUBLIC atan +atan: + UNIMPLEMENTED atan + ret Propchange: trunk/reactos/lib/sdk/crt/math/amd64/atan.S ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/sdk/crt/math/amd64/atan2.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/amd64/ata…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/amd64/atan2.S (added) +++ trunk/reactos/lib/sdk/crt/math/amd64/atan2.S [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -1,0 +1,21 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * PURPOSE: Implementation of atan2 + * FILE: lib/sdk/crt/math/amd64/atan2.S + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <reactos/asm.h> +#include <ndk/amd64/asm.h> + +/* FUNCTIONS ****************************************************************/ + +.code64 + +PUBLIC atan2 +atan2: + UNIMPLEMENTED atan2 + ret Propchange: trunk/reactos/lib/sdk/crt/math/amd64/atan2.S ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/sdk/crt/math/amd64/ceil.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/amd64/cei…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/amd64/ceil.S (added) +++ trunk/reactos/lib/sdk/crt/math/amd64/ceil.S [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -1,0 +1,22 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * PURPOSE: Implementation of ceil + * FILE: lib/sdk/crt/math/amd64/ceil.S + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <reactos/asm.h> +#include <ndk/amd64/asm.h> + +/* FUNCTIONS ****************************************************************/ + +.code64 + +PUBLIC ceil +ceil: + UNIMPLEMENTED ceil + ret + Propchange: trunk/reactos/lib/sdk/crt/math/amd64/ceil.S ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/sdk/crt/math/amd64/ceilf.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/amd64/cei…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/amd64/ceilf.S (added) +++ trunk/reactos/lib/sdk/crt/math/amd64/ceilf.S [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -1,0 +1,40 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * PURPOSE: Implementation of tan + * FILE: lib/sdk/crt/math/amd64/ceilf.S + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <reactos/asm.h> +#include <ndk/amd64/asm.h> + +/* FUNCTIONS ****************************************************************/ + +.code64 + +PUBLIC ceilf +ceilf: + /* Put parameter on the stack */ + movss [rsp - 0x10], xmm0 + fld dword ptr [rsp] + + /* Change fpu control word to round up */ + fstcw [rsp - 0x10] + mov eax, [rsp - 0x10] + or eax, 0x00800 + and eax, 0x0fbff + mov [rsp - 0x08], eax + fldcw [rsp - 0x08] + + /* Round to integer */ + frndint + + /* Restore fpu control word */ + fldcw [rsp - 0x10] + + fstp dword ptr [rsp - 0x10] + movss xmm0, [rsp - 0x10] + ret Propchange: trunk/reactos/lib/sdk/crt/math/amd64/ceilf.S ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/sdk/crt/math/amd64/exp.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/amd64/exp…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/amd64/exp.S (added) +++ trunk/reactos/lib/sdk/crt/math/amd64/exp.S [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -1,0 +1,22 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * PURPOSE: Implementation of exp + * FILE: lib/sdk/crt/math/amd64/exp.S + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <reactos/asm.h> +#include <ndk/amd64/asm.h> + +/* FUNCTIONS ****************************************************************/ + +.code64 + +PUBLIC exp +exp: + UNIMPLEMENTED exp + ret + Propchange: trunk/reactos/lib/sdk/crt/math/amd64/exp.S ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/sdk/crt/math/amd64/fabs.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/amd64/fab…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/amd64/fabs.S (added) +++ trunk/reactos/lib/sdk/crt/math/amd64/fabs.S [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -1,0 +1,22 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * PURPOSE: Implementation of fabs + * FILE: lib/sdk/crt/math/amd64/fabs.S + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <reactos/asm.h> +#include <ndk/amd64/asm.h> + +/* FUNCTIONS ****************************************************************/ + +.code64 + +PUBLIC fabs +fabs: + UNIMPLEMENTED fabs + ret + Propchange: trunk/reactos/lib/sdk/crt/math/amd64/fabs.S ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/sdk/crt/math/amd64/floor.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/amd64/flo…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/amd64/floor.S (added) +++ trunk/reactos/lib/sdk/crt/math/amd64/floor.S [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -1,0 +1,21 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * PURPOSE: Implementation of floor + * FILE: lib/sdk/crt/math/amd64/floor.S + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <reactos/asm.h> +#include <ndk/amd64/asm.h> + +/* FUNCTIONS ****************************************************************/ + +.code64 + +PUBLIC floor +floor: + UNIMPLEMENTED floor + ret Propchange: trunk/reactos/lib/sdk/crt/math/amd64/floor.S ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/sdk/crt/math/amd64/floorf.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/amd64/flo…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/amd64/floorf.S (added) +++ trunk/reactos/lib/sdk/crt/math/amd64/floorf.S [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -1,0 +1,40 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * PURPOSE: Implementation of tan + * FILE: lib/sdk/crt/math/amd64/floorf.S + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <reactos/asm.h> +#include <ndk/amd64/asm.h> + +/* FUNCTIONS ****************************************************************/ + +.code64 + +PUBLIC floorf +floorf: + /* Put parameter on the stack */ + movss [rsp - 0x10], xmm0 + fld dword ptr [rsp] + + /* Change fpu control word to round down */ + fstcw [rsp - 0x10] + mov eax, [rsp - 0x10] + or eax, 0x00400 + and eax, 0x0f7ff + mov [rsp - 0x08], eax + fldcw [rsp - 0x08] + + /* Round to integer */ + frndint + + /* Restore fpu control word */ + fldcw [rsp - 0x10] + + fstp dword ptr [rsp - 0x10] + movss xmm0, [rsp - 0x10] + ret Propchange: trunk/reactos/lib/sdk/crt/math/amd64/floorf.S ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/sdk/crt/math/amd64/fmod.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/amd64/fmo…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/amd64/fmod.S (added) +++ trunk/reactos/lib/sdk/crt/math/amd64/fmod.S [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -1,0 +1,19 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * PURPOSE: Implementation of fmod + * FILE: lib/sdk/crt/math/amd64/fmod.S + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <reactos/asm.h> +#include <ndk/amd64/asm.h> + +/* DATA *********************************************************************/ + +PUBLIC fmod +fmod: + UNIMPLEMENTED fmod + ret Propchange: trunk/reactos/lib/sdk/crt/math/amd64/fmod.S ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/sdk/crt/math/amd64/fmodf.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/amd64/fmo…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/amd64/fmodf.S (added) +++ trunk/reactos/lib/sdk/crt/math/amd64/fmodf.S [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -1,0 +1,19 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * PURPOSE: Implementation of fmodf + * FILE: lib/sdk/crt/math/amd64/fmodf.S + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <reactos/asm.h> +#include <ndk/amd64/asm.h> + +/* DATA *********************************************************************/ + +PUBLIC fmodf +fmodf: + UNIMPLEMENTED fmodf + ret Propchange: trunk/reactos/lib/sdk/crt/math/amd64/fmodf.S ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/sdk/crt/math/amd64/ldexp.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/amd64/lde…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/amd64/ldexp.S (added) +++ trunk/reactos/lib/sdk/crt/math/amd64/ldexp.S [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -1,0 +1,19 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * PURPOSE: Implementation of ldexp + * FILE: lib/sdk/crt/math/amd64/ldexp.S + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <reactos/asm.h> +#include <ndk/amd64/asm.h> + +/* DATA *********************************************************************/ + +PUBLIC ldexp +ldexp: + UNIMPLEMENTED ldexp + ret Propchange: trunk/reactos/lib/sdk/crt/math/amd64/ldexp.S ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/sdk/crt/math/amd64/log.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/amd64/log…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/amd64/log.S (added) +++ trunk/reactos/lib/sdk/crt/math/amd64/log.S [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -1,0 +1,19 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * PURPOSE: Implementation of log + * FILE: lib/sdk/crt/math/amd64/log.S + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <reactos/asm.h> +#include <ndk/amd64/asm.h> + +/* DATA *********************************************************************/ + +PUBLIC log +log: + UNIMPLEMENTED log + ret Propchange: trunk/reactos/lib/sdk/crt/math/amd64/log.S ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/sdk/crt/math/amd64/log10.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/amd64/log…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/amd64/log10.S (added) +++ trunk/reactos/lib/sdk/crt/math/amd64/log10.S [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -1,0 +1,20 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * PURPOSE: Implementation of log10 + * FILE: lib/sdk/crt/math/amd64/log10.S + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <reactos/asm.h> +#include <ndk/amd64/asm.h> + +/* DATA *********************************************************************/ + +PUBLIC log10 +log10: + UNIMPLEMENTED log10 + ret + Propchange: trunk/reactos/lib/sdk/crt/math/amd64/log10.S ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/sdk/crt/math/amd64/pow.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/amd64/pow…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/amd64/pow.S (added) +++ trunk/reactos/lib/sdk/crt/math/amd64/pow.S [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -1,0 +1,20 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * PURPOSE: Implementation of pow + * FILE: lib/sdk/crt/math/amd64/pow.S + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <reactos/asm.h> +#include <ndk/amd64/asm.h> + +/* DATA *********************************************************************/ + +PUBLIC pow +pow: + UNIMPLEMENTED pow + ret + Propchange: trunk/reactos/lib/sdk/crt/math/amd64/pow.S ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/sdk/crt/math/amd64/sqrt.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/amd64/sqr…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/amd64/sqrt.S (added) +++ trunk/reactos/lib/sdk/crt/math/amd64/sqrt.S [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -1,0 +1,19 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * PURPOSE: Implementation of sqrt + * FILE: lib/sdk/crt/math/amd64/sqrt.S + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <reactos/asm.h> +#include <ndk/amd64/asm.h> + +/* DATA *********************************************************************/ + +PUBLIC sqrt +sqrt: + UNIMPLEMENTED sqrt + ret Propchange: trunk/reactos/lib/sdk/crt/math/amd64/sqrt.S ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/sdk/crt/math/amd64/sqrtf.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/amd64/sqr…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/amd64/sqrtf.S (added) +++ trunk/reactos/lib/sdk/crt/math/amd64/sqrtf.S [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -1,0 +1,19 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * PURPOSE: Implementation of tan + * FILE: lib/sdk/crt/math/amd64/sqrtf.S + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <reactos/asm.h> +#include <ndk/amd64/asm.h> + +/* DATA *********************************************************************/ + +PUBLIC sqrtf +sqrtf: + sqrtss xmm0, xmm0 + ret Propchange: trunk/reactos/lib/sdk/crt/math/amd64/sqrtf.S ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/sdk/crt/math/amd64/tan.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/amd64/tan…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/amd64/tan.S (added) +++ trunk/reactos/lib/sdk/crt/math/amd64/tan.S [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -1,0 +1,19 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * PURPOSE: Implementation of tan + * FILE: lib/sdk/crt/math/amd64/tan.S + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <reactos/asm.h> +#include <ndk/amd64/asm.h> + +/* DATA *********************************************************************/ + +PUBLIC tan +tan: + UNIMPLEMENTED tan + ret Propchange: trunk/reactos/lib/sdk/crt/math/amd64/tan.S ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/sdk/crt/math/cos.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/cos.c?rev…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/cos.c (added) +++ trunk/reactos/lib/sdk/crt/math/cos.c [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -1,0 +1,89 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS CRT + * FILE: lib/crt/math/cos.c + * PURPOSE: Generic C Implementation of cos + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +#define PRECISION 9 +#define M_PI 3.141592653589793238462643 + +static double cos_off_tbl[] = {0.0, -M_PI/2., 0, -M_PI/2.}; +static double cos_sign_tbl[] = {1,-1,-1,1}; + +double +cos(double x) +{ + int quadrant; + double x2, result; + + /* Calculate the quadrant */ + quadrant = x * (2./M_PI); + + /* Get offset inside quadrant */ + x = x - quadrant * (M_PI/2.); + + /* Normalize quadrant to [0..3] */ + quadrant = quadrant & 0x3; + + /* Fixup value for the generic function */ + x += cos_off_tbl[quadrant]; + + /* Calculate the negative of the square of x */ + x2 = - (x * x); + + /* This is an unrolled taylor series using <PRECISION> iterations + * Example with 4 iterations: + * result = 1 - x^2/2! + x^4/4! - x^6/6! + x^8/8! + * To save multiplications and to keep the precision high, it's performed + * like this: + * result = 1 - x^2 * (1/2! - x^2 * (1/4! - x^2 * (1/6! - x^2 * (1/8!)))) + */ + + /* Start with 0, compiler will optimize this away */ + result = 0; + +#if (PRECISION >= 10) + result += 1./(1.*2*3*4*5*6*7*8*9*10*11*12*13*14*15*16*17*18*19*20); + result *= x2; +#endif +#if (PRECISION >= 9) + result += 1./(1.*2*3*4*5*6*7*8*9*10*11*12*13*14*15*16*17*18); + result *= x2; +#endif +#if (PRECISION >= 8) + result += 1./(1.*2*3*4*5*6*7*8*9*10*11*12*13*14*15*16); + result *= x2; +#endif +#if (PRECISION >= 7) + result += 1./(1.*2*3*4*5*6*7*8*9*10*11*12*13*14); + result *= x2; +#endif +#if (PRECISION >= 6) + result += 1./(1.*2*3*4*5*6*7*8*9*10*11*12); + result *= x2; +#endif +#if (PRECISION >= 5) + result += 1./(1.*2*3*4*5*6*7*8*9*10); + result *= x2; +#endif + result += 1./(1.*2*3*4*5*6*7*8); + result *= x2; + + result += 1./(1.*2*3*4*5*6); + result *= x2; + + result += 1./(1.*2*3*4); + result *= x2; + + result += 1./(1.*2); + result *= x2; + + result += 1; + + /* Apply correct sign */ + result *= cos_sign_tbl[quadrant]; + + return result; +} Propchange: trunk/reactos/lib/sdk/crt/math/cos.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/sdk/crt/math/cosf.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/cosf.c?re…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/cosf.c (added) +++ trunk/reactos/lib/sdk/crt/math/cosf.c [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -1,0 +1,11 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ +#include <math.h> + +float cosf(float _X) +{ + return ((float)cos((double)_X)); +} Propchange: trunk/reactos/lib/sdk/crt/math/cosf.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/sdk/crt/math/i386/ceilf.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/i386/ceil…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/i386/ceilf.S (added) +++ trunk/reactos/lib/sdk/crt/math/i386/ceilf.S [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -1,0 +1,55 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ +#include <_mingw_mac.h> + + .file "ceilf.S" + .text + .align 4 +.globl __MINGW_USYMBOL(ceilf) + .def __MINGW_USYMBOL(ceilf); .scl 2; .type 32; .endef +__MINGW_USYMBOL(ceilf): +#ifdef _WIN64 + subq $24,%rsp + movss %xmm0,8(%rsp) + flds 8(%rsp) + + fstcw 4(%rsp) /* store fpu control word */ + + movl $0x0800,%edx /* round towards +oo */ + orl 4(%rsp),%edx + andl $0xfbff,%edx + movl %edx,(%rsp) + fldcw (%rsp) /* load modified control word */ + + frndint /* round */ + + fldcw 4(%rsp) /* restore original control word */ + fstps 8(%rsp) + movss 8(%rsp),%xmm0 + addq $24,%rsp + ret +#else + flds 4(%esp) + subl $8,%esp + + fstcw 4(%esp) /* store fpu control word */ + + /* We use here %edx although only the low 1 bits are defined. + But none of the operations should care and they are faster + than the 16 bit operations. */ + movl $0x0800,%edx /* round towards +oo */ + orl 4(%esp),%edx + andl $0xfbff,%edx + movl %edx,(%esp) + fldcw (%esp) /* load modified control word */ + + frndint /* round */ + + fldcw 4(%esp) /* restore original control word */ + + addl $8,%esp + ret +#endif Propchange: trunk/reactos/lib/sdk/crt/math/i386/ceilf.S ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/sdk/crt/math/i386/floorf.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/i386/floo…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/i386/floorf.S (added) +++ trunk/reactos/lib/sdk/crt/math/i386/floorf.S [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -1,0 +1,63 @@ +/* + * Written by J.T. Conklin <jtc(a)netbsd.org>. + * Public domain. + * + * Changes for long double by Ulrich Drepper <drepper(a)cygnus.com> + * + * Removed header file dependency for use in libmingwex.a by + * Danny Smith <dannysmith(a)users.sourceforge.net> + */ +#include <_mingw_mac.h> + + .file "floorf.S" + .text +#ifdef _WIN64 + .align 8 +#else + .align 4 +#endif +.globl __MINGW_USYMBOL(floorf) + .def __MINGW_USYMBOL(floorf); .scl 2; .type 32; .endef +__MINGW_USYMBOL(floorf): +#ifdef _WIN64 + subq $24,%rsp + movss %xmm0,8(%rsp) + flds 8(%rsp) + + fstcw 4(%rsp) /* store fpu control word */ + movl $0x400,%edx /* round towards -oo */ + orl 4(%rsp),%edx + andl $0xf7ff,%edx + movl %edx,(%rsp) + fldcw (%rsp) /* load modified control word */ + + frndint /* round */ + + fldcw 4(%rsp) /* restore original control word */ + + fstps 8(%rsp) + movss 8(%rsp),%xmm0 + addq $24,%rsp + ret +#else + flds 4(%esp) + subl $8,%esp + + fstcw 4(%esp) /* store fpu control word */ + + /* We use here %edx although only the low 1 bits are defined. + But none of the operations should care and they are faster + than the 16 bit operations. */ + movl $0x400,%edx /* round towards -oo */ + orl 4(%esp),%edx + andl $0xf7ff,%edx + movl %edx,(%esp) + fldcw (%esp) /* load modified control word */ + + frndint /* round */ + + fldcw 4(%esp) /* restore original control word */ + + addl $8,%esp + ret +#endif Propchange: trunk/reactos/lib/sdk/crt/math/i386/floorf.S ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/sdk/crt/math/i386/fmodf.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/i386/fmod…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/i386/fmodf.c (added) +++ trunk/reactos/lib/sdk/crt/math/i386/fmodf.c [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -1,0 +1,28 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ +/* + * Written by J.T. Conklin <jtc(a)netbsd.org>. + * Public domain. + * + * Adapted for float type by Danny Smith + * <dannysmith(a)users.sourceforge.net>. + */ + +#include <math.h> + +float +fmodf (float x, float y) +{ + float res = 0.0F; + + asm ("1:\tfprem\n\t" + "fstsw %%ax\n\t" + "sahf\n\t" + "jp 1b\n\t" + "fstp %%st(1)" + : "=t" (res) : "0" (x), "u" (y) : "ax", "st(1)"); + return res; +} Propchange: trunk/reactos/lib/sdk/crt/math/i386/fmodf.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/sdk/crt/math/i386/sqrtf.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/i386/sqrt…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/i386/sqrtf.c (added) +++ trunk/reactos/lib/sdk/crt/math/i386/sqrtf.c [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -1,0 +1,12 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ +#include <math.h> + +float +sqrtf(float x) +{ + return ((float)sqrt((double)x)); +} Propchange: trunk/reactos/lib/sdk/crt/math/i386/sqrtf.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/sdk/crt/math/sin.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/sin.c?rev…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/sin.c (added) +++ trunk/reactos/lib/sdk/crt/math/sin.c [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -1,0 +1,89 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS CRT + * FILE: lib/crt/math/sin.c + * PURPOSE: Generic C Implementation of sin + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +#define PRECISION 9 +#define M_PI 3.141592653589793238462643 + +static double sin_off_tbl[] = {0.0, -M_PI/2., 0, -M_PI/2.}; +static double sin_sign_tbl[] = {1,-1,-1,1}; + +double +sin(double x) +{ + int quadrant; + double x2, result; + + /* Calculate the quadrant */ + quadrant = x * (2./M_PI); + + /* Get offset inside quadrant */ + x = x - quadrant * (M_PI/2.); + + /* Normalize quadrant to [0..3] */ + quadrant = (quadrant - 1) & 0x3; + + /* Fixup value for the generic function */ + x += sin_off_tbl[quadrant]; + + /* Calculate the negative of the square of x */ + x2 = - (x * x); + + /* This is an unrolled taylor series using <PRECISION> iterations + * Example with 4 iterations: + * result = 1 - x^2/2! + x^4/4! - x^6/6! + x^8/8! + * To save multiplications and to keep the precision high, it's performed + * like this: + * result = 1 - x^2 * (1/2! - x^2 * (1/4! - x^2 * (1/6! - x^2 * (1/8!)))) + */ + + /* Start with 0, compiler will optimize this away */ + result = 0; + +#if (PRECISION >= 10) + result += 1./(1.*2*3*4*5*6*7*8*9*10*11*12*13*14*15*16*17*18*19*20); + result *= x2; +#endif +#if (PRECISION >= 9) + result += 1./(1.*2*3*4*5*6*7*8*9*10*11*12*13*14*15*16*17*18); + result *= x2; +#endif +#if (PRECISION >= 8) + result += 1./(1.*2*3*4*5*6*7*8*9*10*11*12*13*14*15*16); + result *= x2; +#endif +#if (PRECISION >= 7) + result += 1./(1.*2*3*4*5*6*7*8*9*10*11*12*13*14); + result *= x2; +#endif +#if (PRECISION >= 6) + result += 1./(1.*2*3*4*5*6*7*8*9*10*11*12); + result *= x2; +#endif +#if (PRECISION >= 5) + result += 1./(1.*2*3*4*5*6*7*8*9*10); + result *= x2; +#endif + result += 1./(1.*2*3*4*5*6*7*8); + result *= x2; + + result += 1./(1.*2*3*4*5*6); + result *= x2; + + result += 1./(1.*2*3*4); + result *= x2; + + result += 1./(1.*2); + result *= x2; + + result += 1; + + /* Apply correct sign */ + result *= sin_sign_tbl[quadrant]; + + return result; +} Propchange: trunk/reactos/lib/sdk/crt/math/sin.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/sdk/crt/math/sinf.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/sinf.c?re…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/sinf.c (added) +++ trunk/reactos/lib/sdk/crt/math/sinf.c [iso-8859-1] Wed Jul 21 16:03:44 2010 @@ -1,0 +1,11 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ +#include <math.h> + +float sinf(float _X) +{ + return ((float) sin ((double) _X)); +} Propchange: trunk/reactos/lib/sdk/crt/math/sinf.c ------------------------------------------------------------------------------ svn:eol-style = native
14 years, 5 months
1
0
0
0
[tkreuzer] 48160: [GDIPLUS] On amd64 builds link gdiplus to crt
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Jul 21 15:55:51 2010 New Revision: 48160 URL:
http://svn.reactos.org/svn/reactos?rev=48160&view=rev
Log: [GDIPLUS] On amd64 builds link gdiplus to crt Modified: trunk/reactos/dll/win32/gdiplus/gdiplus.rbuild Modified: trunk/reactos/dll/win32/gdiplus/gdiplus.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/gdiplus.…
============================================================================== --- trunk/reactos/dll/win32/gdiplus/gdiplus.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdiplus/gdiplus.rbuild [iso-8859-1] Wed Jul 21 15:55:51 2010 @@ -28,5 +28,8 @@ <library>gdi32</library> <library>windowscodecs</library> <library>ntdll</library> + <if property="ARCH" value="amd64"> + <library>crt</library> + </if> </module> </group>
14 years, 5 months
1
0
0
0
[ilardig] 48159: [DESK] - Implement theme quick preview. Patch by Katayama Hirofumi. See issue #5525 for more details.
by ilardig@svn.reactos.org
Author: ilardig Date: Wed Jul 21 12:20:18 2010 New Revision: 48159 URL:
http://svn.reactos.org/svn/reactos?rev=48159&view=rev
Log: [DESK] - Implement theme quick preview. Patch by Katayama Hirofumi. See issue #5525 for more details. Modified: trunk/reactos/dll/cpl/desk/appearance.c trunk/reactos/dll/cpl/desk/draw.c trunk/reactos/dll/cpl/desk/preview.c trunk/reactos/dll/cpl/desk/theme.c trunk/reactos/dll/cpl/desk/theme.h Modified: trunk/reactos/dll/cpl/desk/appearance.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/appearance.c?…
============================================================================== --- trunk/reactos/dll/cpl/desk/appearance.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/desk/appearance.c [iso-8859-1] Wed Jul 21 12:20:18 2010 @@ -36,7 +36,7 @@ g->hbmpColor[0] = g->hbmpColor[1] = g->hbmpColor[2] = NULL; g->bInitializing = FALSE; - TemplateCount = LoadThemeTemplates(strSelectedStyle); + TemplateCount = LoadThemePresetEntries(strSelectedStyle); hwndCombo = GetDlgItem(hwndDlg, IDC_APPEARANCE_COLORSCHEME); g->ThemeId = -1; @@ -105,7 +105,7 @@ g->ThemeId = -1; /* Customized */ SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_COLORSCHEME, CB_SETCURSEL, (WPARAM)-1, 0); SetDlgItemText(hwndDlg, IDC_APPEARANCE_COLORSCHEME, TEXT("")); - /* SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, PVM_UPDATETHEME, 0, (LPARAM)&g->Theme); */ + SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, PVM_UPDATETHEME, 0, (LPARAM)&g->Theme); } break; @@ -119,7 +119,7 @@ g->ThemeId = -1; /* Customized */ SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_COLORSCHEME, CB_SETCURSEL, (WPARAM)-1, 0); SetDlgItemText(hwndDlg, IDC_APPEARANCE_COLORSCHEME, TEXT("")); - /* SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, PVM_UPDATETHEME, 0, (LPARAM)&g->Theme); */ + SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, PVM_UPDATETHEME, 0, (LPARAM)&g->Theme); } break; @@ -134,7 +134,7 @@ { g->Theme = Theme; g->ThemeId = ThemeId; - /* SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, PVM_UPDATETHEME, 0, (LPARAM)&Theme); */ + SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, PVM_UPDATETHEME, 0, (LPARAM)&Theme); } } break; Modified: trunk/reactos/dll/cpl/desk/draw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/draw.c?rev=48…
============================================================================== --- trunk/reactos/dll/cpl/desk/draw.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/desk/draw.c [iso-8859-1] Wed Jul 21 12:20:18 2010 @@ -7,13 +7,11 @@ * PROGRAMMERS: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> */ -/* #define NTOS_MODE_USER */ -/* #define WIN32_NO_STATUS */ #include "desk.h" #include "theme.h" #include "draw.h" -/* #include <ndk/ntndk.h> */ -/* #include <win32k/ntuser.h> */ + +#define MENU_BAR_ITEMS_SPACE (12) /******************************************************************************/ @@ -43,6 +41,20 @@ COLOR_BTNSHADOW, COLOR_3DDKSHADOW, COLOR_BTNHIGHLIGHT, -1, COLOR_3DLIGHT, COLOR_3DDKSHADOW, COLOR_BTNHIGHLIGHT, -1, -1, COLOR_3DDKSHADOW, COLOR_BTNHIGHLIGHT, -1 +}; + +static const signed char LTRBOuterMono[] = { + -1, COLOR_WINDOWFRAME, COLOR_WINDOWFRAME, COLOR_WINDOWFRAME, + COLOR_WINDOW, COLOR_WINDOWFRAME, COLOR_WINDOWFRAME, COLOR_WINDOWFRAME, + COLOR_WINDOW, COLOR_WINDOWFRAME, COLOR_WINDOWFRAME, COLOR_WINDOWFRAME, + COLOR_WINDOW, COLOR_WINDOWFRAME, COLOR_WINDOWFRAME, COLOR_WINDOWFRAME, +}; + +static const signed char LTRBInnerMono[] = { + -1, -1, -1, -1, + -1, COLOR_WINDOW, COLOR_WINDOW, COLOR_WINDOW, + -1, COLOR_WINDOW, COLOR_WINDOW, COLOR_WINDOW, + -1, COLOR_WINDOW, COLOR_WINDOW, COLOR_WINDOW, }; static BOOL @@ -144,6 +156,24 @@ { MoveToEx(hdc, InnerRect.right-2, InnerRect.top+RTpenplus, NULL); LineTo(hdc, InnerRect.right-2, InnerRect.bottom-RBpenplus); + } + + if (uFlags & BF_ADJUST) + { + int add = (LTRBInnerMono[uType & (BDR_INNER|BDR_OUTER)] != -1 ? 1 : 0) + + (LTRBOuterMono[uType & (BDR_INNER|BDR_OUTER)] != -1 ? 1 : 0); + + if(uFlags & BF_LEFT) + InnerRect.left += add; + if(uFlags & BF_RIGHT) + InnerRect.right -= add; + if(uFlags & BF_TOP) + InnerRect.top += add; + if(uFlags & BF_BOTTOM) + InnerRect.bottom -= add; + + if(uFlags & BF_ADJUST) + *rc = InnerRect; } /* Cleanup */ @@ -409,8 +439,69 @@ BOOL MyDrawCaptionTemp(HWND hwnd, HDC hdc, const RECT *rect, HFONT hFont, HICON hIcon, LPCWSTR str, UINT uFlags, THEME *theme) { - /* FIXME */ - return DrawCaptionTemp(hwnd, hdc, rect, hFont, hIcon, str, uFlags); + ULONG Height; + UINT VCenter, Padding; + LONG ButtonWidth; + HBRUSH hbr; + HGDIOBJ hFontOld; + RECT rc; + + Height = theme->Size[SIZE_CAPTION_Y] - 1; + VCenter = (rect->bottom - rect->top) / 2; + Padding = VCenter - (Height / 2); + + ButtonWidth = theme->Size[SIZE_SIZE_X] - 2; + + if (uFlags & DC_GRADIENT) + { + GRADIENT_RECT gcap = {0, 1}; + TRIVERTEX vert[2]; + COLORREF Colors[2]; + + Colors[0] = theme->crColor[((uFlags & DC_ACTIVE) ? + COLOR_ACTIVECAPTION : COLOR_INACTIVECAPTION)]; + Colors[1] = theme->crColor[((uFlags & DC_ACTIVE) ? + COLOR_GRADIENTACTIVECAPTION : COLOR_GRADIENTINACTIVECAPTION)]; + + vert[0].x = rect->left; + vert[0].y = rect->top; + vert[0].Red = (WORD)Colors[0]<<8; + vert[0].Green = (WORD)Colors[0] & 0xFF00; + vert[0].Blue = (WORD)(Colors[0]>>8) & 0xFF00; + vert[0].Alpha = 0; + + vert[1].x = rect->right; + vert[1].y = rect->bottom; + vert[1].Red = (WORD)Colors[1]<<8; + vert[1].Green = (WORD)Colors[1] & 0xFF00; + vert[1].Blue = (WORD)(Colors[1]>>8) & 0xFF00; + vert[1].Alpha = 0; + + GradientFill(hdc, vert, 2, &gcap, 1, GRADIENT_FILL_RECT_H); + } + else + { + if (uFlags & DC_ACTIVE) + hbr = CreateSolidBrush(theme->crColor[COLOR_ACTIVECAPTION]); + else + hbr = CreateSolidBrush(theme->crColor[COLOR_INACTIVECAPTION]); + FillRect(hdc, rect, hbr); + DeleteObject(hbr); + } + + hFontOld = SelectObject(hdc, hFont); + SetBkMode(hdc, TRANSPARENT); + if (uFlags & DC_ACTIVE) + SetTextColor(hdc, theme->crColor[COLOR_CAPTIONTEXT]); + else + SetTextColor(hdc, theme->crColor[COLOR_INACTIVECAPTIONTEXT]); + rc.left = rect->left + 2; + rc.top = rect->top; + rc.right = rect->right; + rc.bottom = rect->bottom; + DrawTextW(hdc, str, -1, &rc, DT_SINGLELINE | DT_VCENTER); + SelectObject(hdc, hFontOld); + return TRUE; } /******************************************************************************/ @@ -418,6 +509,99 @@ DWORD MyDrawMenuBarTemp(HWND Wnd, HDC DC, LPRECT Rect, HMENU Menu, HFONT Font, THEME *theme) { - /* FIXME */ - return DrawMenuBarTemp(Wnd, DC, Rect, Menu, Font); -} + HBRUSH hbr; + HPEN hPen; + HGDIOBJ hPenOld, hFontOld; + BOOL flat_menu; + INT i, bkgnd, x; + RECT rect; + WCHAR Text[128]; + UINT uFormat = DT_CENTER | DT_VCENTER | DT_SINGLELINE; + + flat_menu = theme->bFlatMenus; + + if (flat_menu) + hbr = CreateSolidBrush(theme->crColor[COLOR_MENUBAR]); + else + hbr = CreateSolidBrush(theme->crColor[COLOR_MENU]); + FillRect(DC, Rect, hbr); + DeleteObject(hbr); + + hPen = CreatePen(PS_SOLID, 0, theme->crColor[COLOR_3DFACE]); + hPenOld = SelectObject(DC, hPen); + MoveToEx(DC, Rect->left, Rect->bottom - 1, NULL); + LineTo(DC, Rect->right, Rect->bottom - 1); + SelectObject(DC, hPenOld); + DeleteObject(hPen); + + bkgnd = (flat_menu ? COLOR_MENUBAR : COLOR_MENU); + x = Rect->left; + hFontOld = SelectObject(DC, Font); + for(i = 0; i < 3; i++) + { + GetMenuStringW(Menu, i, Text, 128, MF_BYPOSITION); + + rect.left = x; + rect.top = Rect->top; + DrawTextW(DC, Text, -1, &rect, DT_SINGLELINE | DT_CALCRECT); + + rect.bottom = Rect->bottom; + rect.right += MENU_BAR_ITEMS_SPACE; + x += rect.right - rect.left; + + if (i == 2) + { + if (flat_menu) + { + SetTextColor(DC, theme->crColor[COLOR_HIGHLIGHTTEXT]); + SetBkColor(DC, theme->crColor[COLOR_HIGHLIGHT]); + + InflateRect (&rect, -1, -1); + hbr = CreateSolidBrush(theme->crColor[COLOR_MENUHILIGHT]); + FillRect(DC, &rect, hbr); + DeleteObject(hbr); + + InflateRect (&rect, 1, 1); + hbr = CreateSolidBrush(theme->crColor[COLOR_HIGHLIGHT]); + FrameRect(DC, &rect, hbr); + DeleteObject(hbr); + } + else + { + SetTextColor(DC, theme->crColor[COLOR_MENUTEXT]); + SetBkColor(DC, theme->crColor[COLOR_MENU]); + DrawEdge(DC, &rect, BDR_SUNKENOUTER, BF_RECT); + } + } + else + { + if (i == 1) + SetTextColor(DC, theme->crColor[COLOR_GRAYTEXT]); + else + SetTextColor(DC, theme->crColor[COLOR_MENUTEXT]); + + SetBkColor(DC, theme->crColor[bkgnd]); + hbr = CreateSolidBrush(theme->crColor[bkgnd]); + FillRect(DC, &rect, hbr); + DeleteObject(hbr); + } + + SetBkMode(DC, TRANSPARENT); + + rect.left += MENU_BAR_ITEMS_SPACE / 2; + rect.right -= MENU_BAR_ITEMS_SPACE / 2; + + if (i == 1) + { + ++rect.left; ++rect.top; ++rect.right; ++rect.bottom; + SetTextColor(DC, RGB(0xff, 0xff, 0xff)); + DrawTextW(DC, Text, -1, &rect, uFormat); + --rect.left; --rect.top; --rect.right; --rect.bottom; + SetTextColor(DC, RGB(0x80, 0x80, 0x80)); + } + DrawTextW(DC, Text, -1, &rect, uFormat); + } + SelectObject(DC, hFontOld); + + return TRUE; +} Modified: trunk/reactos/dll/cpl/desk/preview.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/preview.c?rev…
============================================================================== --- trunk/reactos/dll/cpl/desk/preview.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/desk/preview.c [iso-8859-1] Wed Jul 21 12:20:18 2010 @@ -263,8 +263,8 @@ /* Inactive Window */ MyDrawEdge(hdc, &pPreviewData->rcInactiveFrame, EDGE_RAISED, BF_RECT | BF_MIDDLE, theme); SetTextColor(hdc, theme->crColor[COLOR_INACTIVECAPTIONTEXT]); - DrawCaptionTemp(NULL, hdc, &pPreviewData->rcInactiveCaption, pPreviewData->hCaptionFont, - NULL, pPreviewData->lpInAct, DC_GRADIENT | DC_ICON | DC_TEXT); + MyDrawCaptionTemp(NULL, hdc, &pPreviewData->rcInactiveCaption, pPreviewData->hCaptionFont, + NULL, pPreviewData->lpInAct, DC_GRADIENT | DC_ICON | DC_TEXT, theme); MyDrawCaptionButtons(hdc, &pPreviewData->rcInactiveCaption, TRUE, pPreviewData->cyCaption - 2, theme); /* Active Window */ @@ -290,7 +290,7 @@ rc.top += 2; SetTextColor(hdc, theme->crColor[COLOR_WINDOWTEXT]); hOldFont = SelectObject(hdc, pPreviewData->hCaptionFont); /* FIXME: client text is not caption text */ - DrawText(hdc, pPreviewData->lpWinTxt, lstrlen(pPreviewData->lpWinTxt), &rc, DT_LEFT); + DrawText(hdc, pPreviewData->lpWinTxt, -1, &rc, DT_LEFT); SelectObject(hdc, hOldFont); /* Draw the scroll bar */ @@ -307,9 +307,9 @@ CopyRect(&rc, &pPreviewData->rcDialogClient); rc.left += 4; rc.top += 2; - SetTextColor(hdc, RGB(0,0,0)); + SetTextColor(hdc, theme->crColor[COLOR_BTNTEXT]); hOldFont = SelectObject(hdc, pPreviewData->hMessageFont); - DrawText(hdc, pPreviewData->lpMessText, lstrlen(pPreviewData->lpMessText), &rc, DT_LEFT); + DrawText(hdc, pPreviewData->lpMessText, -1, &rc, DT_LEFT); SelectObject(hdc, hOldFont); /* Draw Button */ @@ -317,7 +317,7 @@ CopyRect(&rc, &pPreviewData->rcDialogButton); SetTextColor(hdc, theme->crColor[COLOR_BTNTEXT]); hOldFont = SelectObject(hdc, pPreviewData->hMessageFont); - DrawText(hdc, pPreviewData->lpButText, lstrlen(pPreviewData->lpButText), &rc, DT_VCENTER | DT_CENTER | DT_SINGLELINE); + DrawText(hdc, pPreviewData->lpButText, -1, &rc, DT_VCENTER | DT_CENTER | DT_SINGLELINE); SelectObject(hdc, hOldFont); EndPaint(hwnd, &ps); Modified: trunk/reactos/dll/cpl/desk/theme.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/theme.c?rev=4…
============================================================================== --- trunk/reactos/dll/cpl/desk/theme.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/desk/theme.c [iso-8859-1] Wed Jul 21 12:20:18 2010 @@ -10,7 +10,7 @@ #include "desk.h" #include "theme.h" -static BOOL g_TemplateLoaded = FALSE; +static BOOL g_PresetLoaded = FALSE; static INT g_TemplateCount = 0; static INT g_ColorList[NUM_COLORS]; @@ -141,8 +141,8 @@ DWORD dwType, dwLength; BOOL Ret = FALSE; - if (!g_TemplateLoaded) - LoadThemeTemplates(strSelectedStyle); + if (!g_PresetLoaded) + LoadThemePresetEntries(strSelectedStyle); if (ThemeId == -1) return FALSE; @@ -342,7 +342,7 @@ return FALSE; } -INT LoadThemeTemplates(LPTSTR pszSelectedStyle) +INT LoadThemePresetEntries(LPTSTR pszSelectedStyle) { HKEY hkNewSchemes, hkScheme, hkSizes, hkSize; FILETIME ftLastWriteTime; @@ -362,7 +362,7 @@ RegQueryValueEx(hkNewSchemes, g_SelectedStyle, NULL, &dwType, (LPBYTE)pszSelectedStyle, &dwLength); /* Check if already loaded */ - if (g_TemplateLoaded) + if (g_PresetLoaded) { RegCloseKey(hkNewSchemes); return g_TemplateCount; @@ -406,7 +406,7 @@ dwLength = MAX_TEMPLATENAMELENTGH; } RegCloseKey(hkNewSchemes); - g_TemplateLoaded = TRUE; + g_PresetLoaded = TRUE; g_TemplateCount = iTemplateIndex; } return iTemplateIndex; Modified: trunk/reactos/dll/cpl/desk/theme.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/theme.h?rev=4…
============================================================================== --- trunk/reactos/dll/cpl/desk/theme.h [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/desk/theme.h [iso-8859-1] Wed Jul 21 12:20:18 2010 @@ -86,4 +86,4 @@ BOOL LoadThemeFromReg(THEME* theme, INT ThemeId); VOID ApplyTheme(THEME* theme, INT ThemeId); BOOL SaveTheme(THEME* theme, LPCTSTR strLegacyName); -INT LoadThemeTemplates(LPTSTR pszSelectedStyle); +INT LoadThemePresetEntries(LPTSTR pszSelectedStyle);
14 years, 5 months
1
0
0
0
[tkreuzer] 48158: [MINGW] Remove broken _fmode declaration
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Jul 21 03:22:27 2010 New Revision: 48158 URL:
http://svn.reactos.org/svn/reactos?rev=48158&view=rev
Log: [MINGW] Remove broken _fmode declaration Modified: trunk/reactos/lib/3rdparty/mingw/crtexe.c Modified: trunk/reactos/lib/3rdparty/mingw/crtexe.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/crtexe.…
============================================================================== --- trunk/reactos/lib/3rdparty/mingw/crtexe.c [iso-8859-1] (original) +++ trunk/reactos/lib/3rdparty/mingw/crtexe.c [iso-8859-1] Wed Jul 21 03:22:27 2010 @@ -46,8 +46,6 @@ extern int * __MINGW_IMP_SYMBOL(_fmode); extern int * __MINGW_IMP_SYMBOL(_commode); -#undef _fmode -extern int _fmode; extern int * __MINGW_IMP_SYMBOL(_commode); #define _commode (* __MINGW_IMP_SYMBOL(_commode)) extern int _dowildcard;
14 years, 5 months
1
0
0
0
[tkreuzer] 48157: [stdlib.h] - Improve definition of __mb_cur_max and related - properly handle _M_CEE_PURE
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Jul 21 02:55:59 2010 New Revision: 48157 URL:
http://svn.reactos.org/svn/reactos?rev=48157&view=rev
Log: [stdlib.h] - Improve definition of __mb_cur_max and related - properly handle _M_CEE_PURE Modified: trunk/reactos/include/crt/stdlib.h Modified: trunk/reactos/include/crt/stdlib.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/stdlib.h?rev=4…
============================================================================== --- trunk/reactos/include/crt/stdlib.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/stdlib.h [iso-8859-1] Wed Jul 21 02:55:59 2010 @@ -92,22 +92,15 @@ #ifndef MB_CUR_MAX #define MB_CUR_MAX ___mb_cur_max_func() -#ifndef __mb_cur_max -#ifdef _MSVCRT_ - extern int __mb_cur_max; -#else -#define __mb_cur_max (*_imp____mb_cur_max) - extern int *_imp____mb_cur_max; -#endif -#endif -#ifdef _MSVCRT_ - extern int __mbcur_max; -#define ___mb_cur_max_func() (__mb_cur_max) -#else - extern int* _imp____mbcur_max; -#define ___mb_cur_max_func() (*_imp____mb_cur_max) -#endif -#endif +#ifdef _M_CEE_PURE + _CRTIMP int* __cdecl __p___mb_cur_max(); + #define __mb_cur_max (*__p___mb_cur_max()) +#else /* !_M_CEE_PURE */ + _CRTIMP extern int __mb_cur_max; +#endif /* !_M_CEE_PURE */ + _CRTIMP int __cdecl ___mb_cur_max_func(void); + _CRTIMP int __cdecl ___mb_cur_max_l_func(_locale_t); +#endif /* !MB_CUR_MAX */ #define __max(a,b) (((a) > (b)) ? (a) : (b)) #define __min(a,b) (((a) < (b)) ? (a) : (b)) @@ -152,7 +145,7 @@ _CRTIMP extern char *_sys_errlist[]; _CRTIMP extern int _sys_nerr; -//#if !defined(__x86_64) +#if defined(_DLL) && defined(_M_IX86) _CRTIMP int *__cdecl __p___argc(void); _CRTIMP char ***__cdecl __p___argv(void); _CRTIMP wchar_t ***__cdecl __p___wargv(void); @@ -160,133 +153,74 @@ _CRTIMP wchar_t ***__cdecl __p__wenviron(void); _CRTIMP char **__cdecl __p__pgmptr(void); _CRTIMP wchar_t **__cdecl __p__wpgmptr(void); -//#endif -#ifndef __argc -#ifdef _MSVCRT_ - extern int __argc; +#endif + +// FIXME: move inside _M_CEE_PURE section + _CRTIMP int *__cdecl __p___argc(); + _CRTIMP char ***__cdecl __p___argv(); + _CRTIMP wchar_t ***__cdecl __p___wargv(); + _CRTIMP char ***__cdecl __p__environ(); + _CRTIMP wchar_t ***__cdecl __p__wenviron(); + _CRTIMP char **__cdecl __p__pgmptr(); + _CRTIMP wchar_t **__cdecl __p__wpgmptr(); + +#ifdef _M_CEE_PURE + #define __argv (*__p___argv()) + #define __argc (*__p___argc()) + #define __wargv (*__p___wargv()) + #define _environ (*__p__environ()) + #define _wenviron (*__p__wenviron()) + #define _pgmptr (*__p__pgmptr()) + #define _wpgmptr (*__p__wpgmptr()) +#else /* !_M_CEE_PURE */ + _CRTIMP extern int __argc; + _CRTIMP extern char **__argv; + _CRTIMP extern wchar_t **__wargv; + _CRTIMP extern char **_environ; + _CRTIMP extern wchar_t **_wenviron; + _CRTIMP extern char *_pgmptr; + _CRTIMP extern wchar_t *_wpgmptr; +#endif /* !_M_CEE_PURE */ + + _CRTIMP errno_t __cdecl _get_environ(char***); + _CRTIMP errno_t __cdecl _get_wenviron(wchar_t***); + _CRTIMP errno_t __cdecl _get_pgmptr(char **_Value); + _CRTIMP errno_t __cdecl _get_wpgmptr(wchar_t **_Value); + +#ifdef _M_CEE_PURE + _CRTIMP int* __cdecl __p__fmode(); + #define _fmode (*__p__fmode()) #else -#define __argc (*_imp____argc) - extern int *_imp____argc; -#endif -#endif -#ifndef __argv -#ifdef _MSVCRT_ - extern char **__argv; -#else -#define __argv (*_imp____argv) - extern char ***_imp____argv; -#endif -#endif -#ifndef __wargv -#ifdef _MSVCRT_ - extern wchar_t **__wargv; -#else -#define __wargv (*_imp____wargv) - extern wchar_t ***_imp____wargv; -#endif -#endif - -#ifdef _POSIX_ - extern char **environ; -#else -#ifndef _environ -#ifdef _MSVCRT_ - extern char **_environ; -#else -#define _environ (*_imp___environ) - extern char ***_imp___environ; -#endif -#endif - -#ifndef _wenviron -#ifdef _MSVCRT_ - extern wchar_t **_wenviron; -#else -#define _wenviron (*_imp___wenviron) - extern wchar_t ***_imp___wenviron; -#endif -#endif -#endif -#ifndef _pgmptr -#ifdef _MSVCRT_ - extern char *_pgmptr; -#else -#define _pgmptr (*_imp___pgmptr) - extern char **_imp___pgmptr; -#endif -#endif - -#ifndef _wpgmptr -#ifdef _MSVCRT_ - extern wchar_t *_wpgmptr; -#else -#define _wpgmptr (*_imp___wpgmptr) - extern wchar_t **_imp___wpgmptr; -#endif -#endif - errno_t __cdecl _get_pgmptr(char **_Value); - errno_t __cdecl _get_wpgmptr(wchar_t **_Value); -#ifndef _fmode -#ifdef _MSVCRT_ - extern int _fmode; -#else -#define _fmode (*_imp___fmode) - extern int *_imp___fmode; -#endif -#endif + _CRTIMP extern int _fmode; +#endif /* !_M_CEE_PURE */ _CRTIMP errno_t __cdecl _set_fmode(int _Mode); _CRTIMP errno_t __cdecl _get_fmode(int *_PMode); -#ifndef _osplatform -#ifdef _MSVCRT_ - extern unsigned int _osplatform; -#else -#define _osplatform (*_imp___osplatform) - extern unsigned int *_imp___osplatform; -#endif -#endif - -#ifndef _osver -#ifdef _MSVCRT_ - extern unsigned int _osver; -#else -#define _osver (*_imp___osver) - extern unsigned int *_imp___osver; -#endif -#endif - -#ifndef _winver -#ifdef _MSVCRT_ - extern unsigned int _winver; -#else -#define _winver (*_imp___winver) - extern unsigned int *_imp___winver; -#endif -#endif - -#ifndef _winmajor -#ifdef _MSVCRT_ - extern unsigned int _winmajor; -#else -#define _winmajor (*_imp___winmajor) - extern unsigned int *_imp___winmajor; -#endif -#endif - -#ifndef _winminor -#ifdef _MSVCRT_ - extern unsigned int _winminor; -#else -#define _winminor (*_imp___winminor) - extern unsigned int *_imp___winminor; -#endif -#endif +#ifdef _M_CEE_PURE + _CRTIMP unsigned int* __cdecl __p__osplatform(); + _CRTIMP unsigned int* __cdecl __p__osver(); + _CRTIMP unsigned int* __cdecl __p__winver(); + _CRTIMP unsigned int* __cdecl __p__winmajor(); + _CRTIMP unsigned int* __cdecl __p__winminor(); +#define _osplatform (*__p__osplatform()) +#define _osver (*__p__osver()) +#define _winver (*__p__winver()) +#define _winmajor (*__p__winmajor()) +#define _winminor (*__p__winminor()) +#else /* !_M_CEE_PURE */ + _CRTIMP extern unsigned int _osplatform; + _CRTIMP extern unsigned int _osver; + _CRTIMP extern unsigned int _winver; + _CRTIMP extern unsigned int _winmajor; + _CRTIMP extern unsigned int _winminor; +#endif /* !_M_CEE_PURE */ errno_t __cdecl _get_osplatform(unsigned int *_Value); errno_t __cdecl _get_osver(unsigned int *_Value); errno_t __cdecl _get_winver(unsigned int *_Value); errno_t __cdecl _get_winmajor(unsigned int *_Value); errno_t __cdecl _get_winminor(unsigned int *_Value); + #ifndef _countof #ifndef __cplusplus #define _countof(_Array) (sizeof(_Array) / sizeof(_Array[0]))
14 years, 5 months
1
0
0
0
← Newer
1
...
20
21
22
23
24
25
26
...
47
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
39
40
41
42
43
44
45
46
47
Results per page:
10
25
50
100
200