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
2025
January
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
November 2007
----- 2025 -----
January 2025
----- 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
20 participants
888 discussions
Start a n
N
ew thread
[hpoussin] 30379: Silent some MSVC warnings
by hpoussin@svn.reactos.org
Author: hpoussin Date: Mon Nov 12 13:06:05 2007 New Revision: 30379 URL:
http://svn.reactos.org/svn/reactos?rev=30379&view=rev
Log: Silent some MSVC warnings Modified: trunk/reactos/base/shell/explorer/utility/xmlstorage.h trunk/reactos/include/psdk/windef.h Modified: trunk/reactos/base/shell/explorer/utility/xmlstorage.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/utilit…
============================================================================== --- trunk/reactos/base/shell/explorer/utility/xmlstorage.h (original) +++ trunk/reactos/base/shell/explorer/utility/xmlstorage.h Mon Nov 12 13:06:05 2007 @@ -39,6 +39,9 @@ #ifndef _XMLSTORAGE_H +#ifndef __REACTOS__ +#include <strstream> +#endif #ifdef UNICODE #ifndef _UNICODE @@ -2242,7 +2245,7 @@ typedef std::char_traits<_E> _Tr; explicit fast_ostringbuffer() - {_Init(0, 0, std::_Noread);} // optimized for ios::out mode + {_Init(0, 0, /*std::_Noread*/4);} // optimized for ios::out mode virtual ~fast_ostringbuffer() {_Tidy();} @@ -2271,10 +2274,10 @@ else if (_ALSIZE < _Alsize) _Alsize = _ALSIZE; - if (_Strmode & std::_Allocated) + if (_Strmode & std::strstreambuf::_Allocated) _Al.deallocate(eback(), _Os); - _Strmode |= std::_Allocated; + _Strmode |= std::strstreambuf::_Allocated; if (_Os == 0) {_Seekhigh = _P; @@ -2288,24 +2291,24 @@ return _C;}} - void _Init(const _E *_S, size_t _N, std::_Strstate _M) + void _Init(const _E *_S, size_t _N, std::strstreambuf::_Strstate _M) {_Pendsave = 0, _Seekhigh = 0; _Alsize = _MINSIZE, _Strmode = _M; setg(0, 0, 0); setp(0, 0);} void _Tidy() - {if (_Strmode & std::_Allocated) + {if (_Strmode & std::strstreambuf::_Allocated) _Al.deallocate(eback(), (pptr() != 0 ? epptr() : egptr()) - eback()); _Seekhigh = 0; - _Strmode &= ~std::_Allocated;} + _Strmode &= ~std::strstreambuf::_Allocated;} private: enum {_ALSIZE = 65536/*512*/, _MINSIZE = 32768/*32*/}; // bigger buffer sizes _E *_Pendsave, *_Seekhigh; int _Alsize; - std::_Strstate _Strmode; + std::strstreambuf::_Strstate _Strmode; std::allocator<_E> _Al; }; Modified: trunk/reactos/include/psdk/windef.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/windef.h?rev=…
============================================================================== --- trunk/reactos/include/psdk/windef.h (original) +++ trunk/reactos/include/psdk/windef.h Mon Nov 12 13:06:05 2007 @@ -166,7 +166,7 @@ #define min __min #define max __max -#elif !defined(NOMINMAX) +#elif !defined(_MSC_VER) && !defined(NOMINMAX) #ifndef max #define max(a,b) ((a)>(b)?(a):(b))
17 years, 1 month
1
0
0
0
[hpoussin] 30378: Silent some MSVC warnings
by hpoussin@svn.reactos.org
Author: hpoussin Date: Mon Nov 12 13:03:04 2007 New Revision: 30378 URL:
http://svn.reactos.org/svn/reactos?rev=30378&view=rev
Log: Silent some MSVC warnings Modified: trunk/reactos/include/psdk/winbase.h Modified: trunk/reactos/include/psdk/winbase.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winbase.h?rev…
============================================================================== --- trunk/reactos/include/psdk/winbase.h (original) +++ trunk/reactos/include/psdk/winbase.h Mon Nov 12 13:03:04 2007 @@ -1100,7 +1100,9 @@ HFILE WINAPI _lopen(LPCSTR,int); UINT WINAPI _lread(HFILE,LPVOID,UINT); UINT WINAPI _lwrite(HFILE,LPCSTR,UINT); +#ifndef AbnormalTermination #define AbnormalTermination() FALSE +#endif BOOL WINAPI AccessCheck(PSECURITY_DESCRIPTOR,HANDLE,DWORD,PGENERIC_MAPPING,PPRIVILEGE_SET,PDWORD,PDWORD,PBOOL); BOOL WINAPI AccessCheckAndAuditAlarmA(LPCSTR,LPVOID,LPSTR,LPSTR,PSECURITY_DESCRIPTOR,DWORD,PGENERIC_MAPPING,BOOL,PDWORD,PBOOL,PBOOL); BOOL WINAPI AccessCheckAndAuditAlarmW(LPCWSTR,LPVOID,LPWSTR,LPWSTR,PSECURITY_DESCRIPTOR,DWORD,PGENERIC_MAPPING,BOOL,PDWORD,PBOOL,PBOOL);
17 years, 1 month
1
0
0
0
[hpoussin] 30377: Use NEXT_RESOURCE macro in acpi driver Move pci hack a little bit later
by hpoussin@svn.reactos.org
Author: hpoussin Date: Mon Nov 12 13:01:52 2007 New Revision: 30377 URL:
http://svn.reactos.org/svn/reactos?rev=30377&view=rev
Log: Use NEXT_RESOURCE macro in acpi driver Move pci hack a little bit later Modified: trunk/reactos/drivers/bus/acpi/ospm/fdo.c trunk/reactos/drivers/bus/pci/fdo.c Modified: trunk/reactos/drivers/bus/acpi/ospm/fdo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/ospm/fdo.…
============================================================================== --- trunk/reactos/drivers/bus/acpi/ospm/fdo.c (original) +++ trunk/reactos/drivers/bus/acpi/ospm/fdo.c Mon Nov 12 13:01:52 2007 @@ -209,7 +209,7 @@ break; } } - resource = (RESOURCE *) ((NATIVE_UINT) resource + (NATIVE_UINT) resource->length); + resource = NEXT_RESOURCE(resource); } /* Allocate memory */ @@ -350,7 +350,7 @@ break; } } - resource = (RESOURCE *) ((NATIVE_UINT) resource + (NATIVE_UINT) resource->length); + resource = NEXT_RESOURCE(resource); } acpi_rs_dump_resource_list(resource); Modified: trunk/reactos/drivers/bus/pci/fdo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pci/fdo.c?rev=…
============================================================================== --- trunk/reactos/drivers/bus/pci/fdo.c (original) +++ trunk/reactos/drivers/bus/pci/fdo.c Mon Nov 12 13:01:52 2007 @@ -368,16 +368,6 @@ DeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; AllocatedResources = IoGetCurrentIrpStackLocation(Irp)->Parameters.StartDevice.AllocatedResources; - /* HACK due to a bug in ACPI driver, which doesn't report the bus number */ - if (!FoundBuggyAllocatedResourcesList && - (!AllocatedResources || AllocatedResources->Count == 0)) - { - FoundBuggyAllocatedResourcesList = TRUE; - DPRINT1("No bus number resource found (bug in acpi.sys?), assuming bus number #0\n"); - DeviceExtension->BusNumber = 0; - goto next; - } - /* END HACK */ if (!AllocatedResources) { DPRINT("No allocated resources sent to driver\n"); @@ -412,6 +402,15 @@ DPRINT1("Unknown resource descriptor type 0x%x\n", ResourceDescriptor->Type); } } + /* HACK due to a bug in ACPI driver, which doesn't report the bus number */ + if (!FoundBuggyAllocatedResourcesList && !FoundBusNumber) + { + FoundBuggyAllocatedResourcesList = TRUE; + DPRINT1("No bus number resource found (bug in acpi.sys?), assuming bus number #0\n"); + DeviceExtension->BusNumber = 0; + goto next; + } + /* END HACK */ if (!FoundBusNumber) { DPRINT("Some required resources were not found in allocated resources list\n");
17 years, 1 month
1
0
0
0
[hpoussin] 30376: Display wrong path in case of error
by hpoussin@svn.reactos.org
Author: hpoussin Date: Mon Nov 12 12:59:52 2007 New Revision: 30376 URL:
http://svn.reactos.org/svn/reactos?rev=30376&view=rev
Log: Display wrong path in case of error Modified: trunk/reactos/dll/win32/kernel32/file/file.c Modified: trunk/reactos/dll/win32/kernel32/file/file.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/fi…
============================================================================== --- trunk/reactos/dll/win32/kernel32/file/file.c (original) +++ trunk/reactos/dll/win32/kernel32/file/file.c Mon Nov 12 12:59:52 2007 @@ -876,7 +876,7 @@ NULL, NULL)) { - DPRINT1 ("Invalid path\n"); + DPRINT1 ("Invalid path '%S'\n", lpFileName); SetLastError (ERROR_BAD_PATHNAME); return FALSE; }
17 years, 1 month
1
0
0
0
[hpoussin] 30375: Small cleanup
by hpoussin@svn.reactos.org
Author: hpoussin Date: Mon Nov 12 12:57:58 2007 New Revision: 30375 URL:
http://svn.reactos.org/svn/reactos?rev=30375&view=rev
Log: Small cleanup Modified: trunk/reactos/boot/freeldr/freeldr/freeldr.c trunk/reactos/boot/freeldr/freeldr/inifile/inifile.c trunk/reactos/boot/freeldr/freeldr/ui/noui.c Modified: trunk/reactos/boot/freeldr/freeldr/freeldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/freel…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/freeldr.c (original) +++ trunk/reactos/boot/freeldr/freeldr/freeldr.c Mon Nov 12 12:57:58 2007 @@ -32,8 +32,7 @@ if (!UiInitialize(FALSE)) { - printf("Press any key to reboot.\n"); - MachConsGetCh(); + UiMessageBoxCritical("Unable to initialize UI.\n"); return; } Modified: trunk/reactos/boot/freeldr/freeldr/inifile/inifile.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inifi…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/inifile/inifile.c (original) +++ trunk/reactos/boot/freeldr/freeldr/inifile/inifile.c Mon Nov 12 12:57:58 2007 @@ -26,9 +26,6 @@ DbgPrint((DPRINT_INIFILE, "IniOpenSection() SectionName = %s\n", SectionName)); - if (!IniFileSectionInitialized) - return FALSE; - // Loop through each section and find the one they want Section = CONTAINING_RECORD(IniFileSectionListHead.Flink, INI_SECTION, ListEntry); while (&Section->ListEntry != &IniFileSectionListHead) Modified: trunk/reactos/boot/freeldr/freeldr/ui/noui.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/ui/no…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/ui/noui.c (original) +++ trunk/reactos/boot/freeldr/freeldr/ui/noui.c Mon Nov 12 12:57:58 2007 @@ -43,7 +43,6 @@ VOID NoUiDrawStatusText(PCSTR StatusText) { - printf(StatusText); } VOID NoUiUpdateDateTime(VOID)
17 years, 1 month
1
0
0
0
[jimtabor] 30374: 3rd FIN.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Mon Nov 12 09:43:44 2007 New Revision: 30374 URL:
http://svn.reactos.org/svn/reactos?rev=30374&view=rev
Log: 3rd FIN. Modified: trunk/reactos/include/reactos/win32k/ntgdihdl.h trunk/reactos/subsystems/win32/win32k/include/dc.h trunk/reactos/subsystems/win32/win32k/ntuser/metric.c trunk/reactos/subsystems/win32/win32k/objects/color.c trunk/reactos/subsystems/win32/win32k/objects/coord.c trunk/reactos/subsystems/win32/win32k/objects/dc.c Modified: trunk/reactos/include/reactos/win32k/ntgdihdl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntg…
============================================================================== --- trunk/reactos/include/reactos/win32k/ntgdihdl.h (original) +++ trunk/reactos/include/reactos/win32k/ntgdihdl.h Mon Nov 12 09:43:44 2007 @@ -505,9 +505,7 @@ DC_ATTR Dc_Attr; HDC hNext; HDC hPrev; -// Old tymerz! Cant code? So just Haxzorcise it! -// How many pointers to devices do we need? - PGDIINFO GDIInfo; // In GDIDEVICE + UNICODE_STRING DriverName; CLIPOBJ *CombinedClip; Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/dc.h (original) +++ trunk/reactos/subsystems/win32/win32k/include/dc.h Mon Nov 12 09:43:44 2007 @@ -36,16 +36,25 @@ typedef struct { HANDLE Handle; + PVOID pvEntry; + ULONG lucExcLock; + ULONG Tid; + + PERESOURCE_XP hsemDevLock; + + PVOID pfnSync; + DHPDEV PDev; DEVMODEW DMW; HSURF FillPatterns[HS_DDI_MAX]; DEVINFO DevInfo; GDIINFO GDIInfo; + HANDLE hSpooler; + ULONG DisplayNumber; + PFILE_OBJECT VideoFileObject; BOOLEAN PreparedDriver; - ULONG DisplayNumber; - GDIPOINTER Pointer; /* Stuff to keep track of software cursors; win32k gdi part */ Modified: trunk/reactos/subsystems/win32/win32k/ntuser/metric.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/metric.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/metric.c Mon Nov 12 09:43:44 2007 @@ -167,8 +167,8 @@ ScreenDC = DC_LockDc(ScreenDCHandle); if (NULL != ScreenDC) { - Width = ScreenDC->GDIInfo->ulHorzRes; - Height = ScreenDC->GDIInfo->ulVertRes; + Width = ((PGDIDEVICE)ScreenDC->pPDev)->GDIInfo.ulHorzRes; + Height = ((PGDIDEVICE)ScreenDC->pPDev)->GDIInfo.ulVertRes; DC_UnlockDc(ScreenDC); } NtGdiDeleteObjectApp(ScreenDCHandle); Modified: trunk/reactos/subsystems/win32/win32k/objects/color.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/color.c (original) +++ trunk/reactos/subsystems/win32/win32k/objects/color.c Mon Nov 12 09:43:44 2007 @@ -451,7 +451,7 @@ } else { - Ret = dc->GDIInfo->ulNumPalReg; + Ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulNumPalReg; } } Modified: trunk/reactos/subsystems/win32/win32k/objects/coord.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/coord.c (original) +++ trunk/reactos/subsystems/win32/win32k/objects/coord.c Mon Nov 12 09:43:44 2007 @@ -37,8 +37,8 @@ void FASTCALL IntFixIsotropicMapping(PDC dc) { - ULONG xdim = EngMulDiv(dc->Dc_Attr.szlViewportExt.cx, dc->GDIInfo->ulHorzSize, dc->GDIInfo->ulHorzRes) / dc->Dc_Attr.szlWindowExt.cx; - ULONG ydim = EngMulDiv(dc->Dc_Attr.szlViewportExt.cy, dc->GDIInfo->ulVertSize, dc->GDIInfo->ulVertRes) / dc->Dc_Attr.szlWindowExt.cy; + ULONG xdim = EngMulDiv(dc->Dc_Attr.szlViewportExt.cx, ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzSize, ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzRes) / dc->Dc_Attr.szlWindowExt.cx; + ULONG ydim = EngMulDiv(dc->Dc_Attr.szlViewportExt.cy, ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertSize, ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertRes) / dc->Dc_Attr.szlWindowExt.cy; if (xdim > ydim) { @@ -639,38 +639,38 @@ case MM_LOMETRIC: case MM_ISOTROPIC: - dc->Dc_Attr.szlWindowExt.cx = dc->GDIInfo->ulHorzSize * 10; - dc->Dc_Attr.szlWindowExt.cy = dc->GDIInfo->ulVertSize * 10; - dc->Dc_Attr.szlViewportExt.cx = dc->GDIInfo->ulHorzRes; - dc->Dc_Attr.szlViewportExt.cy = -dc->GDIInfo->ulVertRes; + dc->Dc_Attr.szlWindowExt.cx = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzSize * 10; + dc->Dc_Attr.szlWindowExt.cy = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertSize * 10; + dc->Dc_Attr.szlViewportExt.cx = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzRes; + dc->Dc_Attr.szlViewportExt.cy = -((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertRes; break; case MM_HIMETRIC: - dc->Dc_Attr.szlWindowExt.cx = dc->GDIInfo->ulHorzSize * 100; - dc->Dc_Attr.szlWindowExt.cy = dc->GDIInfo->ulVertSize * 100; - dc->Dc_Attr.szlViewportExt.cx = dc->GDIInfo->ulHorzRes; - dc->Dc_Attr.szlViewportExt.cy = -dc->GDIInfo->ulVertRes; + dc->Dc_Attr.szlWindowExt.cx = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzSize * 100; + dc->Dc_Attr.szlWindowExt.cy = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertSize * 100; + dc->Dc_Attr.szlViewportExt.cx = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzRes; + dc->Dc_Attr.szlViewportExt.cy = -((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertRes; break; case MM_LOENGLISH: - dc->Dc_Attr.szlWindowExt.cx = EngMulDiv(1000, dc->GDIInfo->ulHorzSize, 254); - dc->Dc_Attr.szlWindowExt.cy = EngMulDiv(1000, dc->GDIInfo->ulVertSize, 254); - dc->Dc_Attr.szlViewportExt.cx = dc->GDIInfo->ulHorzRes; - dc->Dc_Attr.szlViewportExt.cy = -dc->GDIInfo->ulVertRes; + dc->Dc_Attr.szlWindowExt.cx = EngMulDiv(1000, ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzSize, 254); + dc->Dc_Attr.szlWindowExt.cy = EngMulDiv(1000, ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertSize, 254); + dc->Dc_Attr.szlViewportExt.cx = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzRes; + dc->Dc_Attr.szlViewportExt.cy = -((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertRes; break; case MM_HIENGLISH: - dc->Dc_Attr.szlWindowExt.cx = EngMulDiv(10000, dc->GDIInfo->ulHorzSize, 254); - dc->Dc_Attr.szlWindowExt.cy = EngMulDiv(10000, dc->GDIInfo->ulVertSize, 254); - dc->Dc_Attr.szlViewportExt.cx = dc->GDIInfo->ulHorzRes; - dc->Dc_Attr.szlViewportExt.cy = -dc->GDIInfo->ulVertRes; + dc->Dc_Attr.szlWindowExt.cx = EngMulDiv(10000, ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzSize, 254); + dc->Dc_Attr.szlWindowExt.cy = EngMulDiv(10000, ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertSize, 254); + dc->Dc_Attr.szlViewportExt.cx = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzRes; + dc->Dc_Attr.szlViewportExt.cy = -((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertRes; break; case MM_TWIPS: - dc->Dc_Attr.szlWindowExt.cx = EngMulDiv(14400, dc->GDIInfo->ulHorzSize, 254); - dc->Dc_Attr.szlWindowExt.cy = EngMulDiv(14400, dc->GDIInfo->ulVertSize, 254); - dc->Dc_Attr.szlViewportExt.cx = dc->GDIInfo->ulHorzRes; - dc->Dc_Attr.szlViewportExt.cy = -dc->GDIInfo->ulVertRes; + dc->Dc_Attr.szlWindowExt.cx = EngMulDiv(14400, ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzSize, 254); + dc->Dc_Attr.szlWindowExt.cy = EngMulDiv(14400, ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertSize, 254); + dc->Dc_Attr.szlViewportExt.cx = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzRes; + dc->Dc_Attr.szlViewportExt.cy = -((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertRes; break; case MM_ANISOTROPIC: Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/dc.c (original) +++ trunk/reactos/subsystems/win32/win32k/objects/dc.c Mon Nov 12 09:43:44 2007 @@ -210,7 +210,7 @@ NewDC->DC_Type = DC_Type; NewDC->PDev = OrigDC->PDev; - NewDC->GDIInfo = OrigDC->GDIInfo; + NewDC->w.bitsPerPixel = OrigDC->w.bitsPerPixel; /* DriverName is copied in the AllocDC routine */ @@ -903,13 +903,13 @@ NewDC->DC_Type = DC_TYPE_DIRECT; NewDC->IsIC = CreateAsIC; - NewDC->GDIInfo = &PrimarySurface.GDIInfo; NewDC->PDev = PrimarySurface.PDev; if(pUMdhpdev) pUMdhpdev = NewDC->PDev; NewDC->pPDev = (PVOID)&PrimarySurface; NewDC->w.hBitmap = PrimarySurface.Handle; - NewDC->w.bitsPerPixel = NewDC->GDIInfo->cBitsPixel * NewDC->GDIInfo->cPlanes; + NewDC->w.bitsPerPixel = ((PGDIDEVICE)NewDC->pPDev)->GDIInfo.cBitsPixel * + ((PGDIDEVICE)NewDC->pPDev)->GDIInfo.cPlanes; DPRINT("Bits per pel: %u\n", NewDC->w.bitsPerPixel); if (! CreateAsIC) @@ -920,8 +920,8 @@ DC_UnlockDc( NewDC ); - hVisRgn = NtGdiCreateRectRgn(0, 0, NewDC->GDIInfo->ulHorzRes, - NewDC->GDIInfo->ulVertRes); + hVisRgn = NtGdiCreateRectRgn(0, 0, ((PGDIDEVICE)NewDC->pPDev)->GDIInfo.ulHorzRes, + ((PGDIDEVICE)NewDC->pPDev)->GDIInfo.ulVertRes); IntGdiSelectVisRgn(hNewDC, hVisRgn); NtGdiDeleteObject(hVisRgn); @@ -1536,43 +1536,43 @@ switch (Index) { case DRIVERVERSION: - ret = dc->GDIInfo->ulVersion; + ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVersion; break; case TECHNOLOGY: - ret = dc->GDIInfo->ulTechnology; + ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulTechnology; break; case HORZSIZE: - ret = dc->GDIInfo->ulHorzSize; + ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzSize; break; case VERTSIZE: - ret = dc->GDIInfo->ulVertSize; + ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertSize; break; case HORZRES: - ret = dc->GDIInfo->ulHorzRes; + ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzRes; break; case VERTRES: - ret = dc->GDIInfo->ulVertRes; + ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertRes; break; case LOGPIXELSX: - ret = dc->GDIInfo->ulLogPixelsX; + ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulLogPixelsX; break; case LOGPIXELSY: - ret = dc->GDIInfo->ulLogPixelsY; + ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulLogPixelsY; break; case BITSPIXEL: - ret = dc->GDIInfo->cBitsPixel; + ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.cBitsPixel; break; case PLANES: - ret = dc->GDIInfo->cPlanes; + ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.cPlanes; break; case NUMBRUSHES: @@ -1588,19 +1588,19 @@ break; case NUMCOLORS: - ret = dc->GDIInfo->ulNumColors; + ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulNumColors; break; case ASPECTX: - ret = dc->GDIInfo->ulAspectX; + ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulAspectX; break; case ASPECTY: - ret = dc->GDIInfo->ulAspectY; + ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulAspectY; break; case ASPECTXY: - ret = dc->GDIInfo->ulAspectXY; + ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulAspectXY; break; case PDEVICESIZE: @@ -1612,7 +1612,7 @@ break; case SIZEPALETTE: - ret = dc->GDIInfo->ulNumPalReg; /* FIXME not sure */ + ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulNumPalReg; /* FIXME not sure */ break; case NUMRESERVED: @@ -1694,7 +1694,7 @@ break; case RASTERCAPS: - ret = dc->GDIInfo->flRaster; + ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.flRaster; break; case CURVECAPS: @@ -1710,7 +1710,7 @@ break; case TEXTCAPS: - ret = dc->GDIInfo->flTextCaps; + ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.flTextCaps; break; default:
17 years, 1 month
1
0
0
0
[jimtabor] 30373: 2nd Sort out gdi device mess.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Mon Nov 12 07:58:41 2007 New Revision: 30373 URL:
http://svn.reactos.org/svn/reactos?rev=30373&view=rev
Log: 2nd Sort out gdi device mess. Modified: trunk/reactos/include/reactos/win32k/ntgdihdl.h trunk/reactos/subsystems/win32/win32k/include/dc.h trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c trunk/reactos/subsystems/win32/win32k/objects/color.c trunk/reactos/subsystems/win32/win32k/objects/dc.c trunk/reactos/subsystems/win32/win32k/objects/dibobj.c trunk/reactos/subsystems/win32/win32k/objects/print.c Modified: trunk/reactos/include/reactos/win32k/ntgdihdl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntg…
============================================================================== --- trunk/reactos/include/reactos/win32k/ntgdihdl.h (original) +++ trunk/reactos/include/reactos/win32k/ntgdihdl.h Mon Nov 12 07:58:41 2007 @@ -495,10 +495,10 @@ ULONG lucExcLock; ULONG Tid; - DHPDEV PDev; // Handle GDIDEVICE? + DHPDEV PDev; // GDIDEVICE PDev INT DC_Type; INT DC_Flags; - PVOID pPDev; // PGDIDEVICE? + PVOID pPDev; // PGDIDEVICE FLONG flGraphics; FLONG flGraphics2; PDC_ATTR pDc_Attr; @@ -507,11 +507,7 @@ HDC hPrev; // Old tymerz! Cant code? So just Haxzorcise it! // How many pointers to devices do we need? - HSURF FillPatternSurfaces[HS_DDI_MAX]; // In GDIDEVICE PGDIINFO GDIInfo; // In GDIDEVICE - PDEVINFO DevInfo; // In GDIDEVICE - HDEV GDIDevice; // Should be PDev or pPDev? - DRIVER_FUNCTIONS DriverFunctions; // In GDIDEVICE UNICODE_STRING DriverName; CLIPOBJ *CombinedClip; Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/dc.h (original) +++ trunk/reactos/subsystems/win32/win32k/include/dc.h Mon Nov 12 07:58:41 2007 @@ -3,10 +3,6 @@ #define __WIN32K_DC_H #include "driver.h" - - - - /* DC flags */ #define DC_MEMORY 0x0001 /* It is a memory DC */ @@ -43,9 +39,9 @@ DHPDEV PDev; DEVMODEW DMW; HSURF FillPatterns[HS_DDI_MAX]; + DEVINFO DevInfo; GDIINFO GDIInfo; - DEVINFO DevInfo; - DRIVER_FUNCTIONS DriverFunctions; + PFILE_OBJECT VideoFileObject; BOOLEAN PreparedDriver; ULONG DisplayNumber; @@ -59,6 +55,7 @@ struct _EDD_DIRECTDRAW_GLOBAL * pEDDgpl; + DRIVER_FUNCTIONS DriverFunctions; } GDIDEVICE, *PGDIDEVICE; /* Internal functions */ Modified: trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c Mon Nov 12 07:58:41 2007 @@ -389,8 +389,7 @@ return 0; case 3: { -/* PGDIDEVICE GDIDevice = (PGDIDEVICE)pDC->PDev; //This one is right,, we have two.*/ - PGDIDEVICE GDIDevice = (PGDIDEVICE)pDC->GDIDevice; //Until now noone noticed. + PGDIDEVICE GDIDevice = (PGDIDEVICE)pDC->pPDev; pEDDgpl = GDIDevice->pEDDgpl; DC_UnlockDc(pDC); return (DWORD)pEDDgpl; Modified: trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c Mon Nov 12 07:58:41 2007 @@ -62,7 +62,7 @@ if (!(dc = DC_LockDc(hDC))) return FALSE; - GDIDevice = (GDIDEVICE *)dc->GDIDevice; + GDIDevice = (GDIDEVICE *)dc->pPDev; DC_UnlockDc(dc); loc->x = GDIDevice->Pointer.Pos.x; @@ -139,7 +139,7 @@ return Ret; } dcbmp = dc->w.hBitmap; - DevInfo = dc->DevInfo; + DevInfo = (PDEVINFO)&((GDIDEVICE *)dc->pPDev)->DevInfo; DC_UnlockDc(dc); BitmapObj = BITMAPOBJ_LockBitmap(dcbmp); Modified: trunk/reactos/subsystems/win32/win32k/objects/color.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/color.c (original) +++ trunk/reactos/subsystems/win32/win32k/objects/color.c Mon Nov 12 07:58:41 2007 @@ -552,14 +552,14 @@ { // Memory managed DC ASSERT(sysGDI->NumColors <= 256); - success = ((GDIDEVICE *)dc->GDIDevice)->DriverFunctions.SetPalette( + success = ((GDIDEVICE *)dc->pPDev)->DriverFunctions.SetPalette( dc->PDev, sysPtr, 0, 0, sysGDI->NumColors); } else { - if( ((GDIDEVICE *)dc->GDIDevice)->DriverFunctions.SetPalette) + if( ((GDIDEVICE *)dc->pPDev)->DriverFunctions.SetPalette) { ASSERT(palGDI->NumColors <= 256); - success = ((GDIDEVICE *)dc->GDIDevice)->DriverFunctions.SetPalette( + success = ((GDIDEVICE *)dc->pPDev)->DriverFunctions.SetPalette( dc->PDev, palPtr, 0, 0, palGDI->NumColors); } } Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/dc.c (original) +++ trunk/reactos/subsystems/win32/win32k/objects/dc.c Mon Nov 12 07:58:41 2007 @@ -210,11 +210,7 @@ NewDC->DC_Type = DC_Type; NewDC->PDev = OrigDC->PDev; - memcpy(NewDC->FillPatternSurfaces, - OrigDC->FillPatternSurfaces, - sizeof OrigDC->FillPatternSurfaces); NewDC->GDIInfo = OrigDC->GDIInfo; - NewDC->DevInfo = OrigDC->DevInfo; NewDC->w.bitsPerPixel = OrigDC->w.bitsPerPixel; /* DriverName is copied in the AllocDC routine */ @@ -242,7 +238,7 @@ NewDC->w.flags = DC_MEMORY; NewDC->w.hBitmap = hBitmap; NewDC->w.hFirstBitmap = hBitmap; - NewDC->GDIDevice = OrigDC->GDIDevice; + NewDC->pPDev = OrigDC->pPDev; NewDC->PalIndexed = OrigDC->PalIndexed; NewDC->w.hPalette = OrigDC->w.hPalette; @@ -906,14 +902,11 @@ NewDC->DC_Type = DC_TYPE_DIRECT; NewDC->IsIC = CreateAsIC; - NewDC->DevInfo = &PrimarySurface.DevInfo; + NewDC->GDIInfo = &PrimarySurface.GDIInfo; - memcpy(NewDC->FillPatternSurfaces, PrimarySurface.FillPatterns, - sizeof(NewDC->FillPatternSurfaces)); NewDC->PDev = PrimarySurface.PDev; if(pUMdhpdev) pUMdhpdev = NewDC->PDev; - NewDC->GDIDevice = (HDEV)&PrimarySurface; - NewDC->DriverFunctions = PrimarySurface.DriverFunctions; + NewDC->pPDev = (PVOID)&PrimarySurface; NewDC->w.hBitmap = PrimarySurface.Handle; NewDC->w.bitsPerPixel = NewDC->GDIInfo->cBitsPixel * NewDC->GDIInfo->cPlanes; @@ -922,7 +915,7 @@ if (! CreateAsIC) { NewDC->PalIndexed = NtGdiGetStockObject(DEFAULT_PALETTE); - NewDC->w.hPalette = NewDC->DevInfo->hpalDefault; + NewDC->w.hPalette = PrimarySurface.DevInfo.hpalDefault; NewDC->Dc_Attr.jROP2 = R2_COPYPEN; DC_UnlockDc( NewDC ); @@ -2119,7 +2112,7 @@ else { dc->w.bitsPerPixel = BitsPerFormat(pb->SurfObj.iBitmapFormat); - dc->w.hPalette = dc->DevInfo->hpalDefault; + dc->w.hPalette = ((DEVINFO)((GDIDEVICE *)dc->pPDev)->DevInfo).hpalDefault; } /* Reselect brush and pen to regenerate the XLATEOBJs. */ @@ -2735,7 +2728,7 @@ DesktopHDC = (HDC)UserGetWindowDC(DesktopObject); pDC = DC_LockDc(DesktopHDC); - *DisplayNumber = ((GDIDEVICE *)pDC->GDIDevice)->DisplayNumber; + *DisplayNumber = ((GDIDEVICE *)pDC->pPDev)->DisplayNumber; DC_UnlockDc(pDC); UserReleaseDC(DesktopObject, DesktopHDC, FALSE); @@ -3259,7 +3252,7 @@ { return FALSE; } - swprintf (szBuffer, L"\\\\.\\DISPLAY%lu", ((GDIDEVICE *)DC->GDIDevice)->DisplayNumber); + swprintf (szBuffer, L"\\\\.\\DISPLAY%lu", ((GDIDEVICE *)DC->pPDev)->DisplayNumber); DC_UnlockDc(DC); RtlInitUnicodeString(&InDeviceName, szBuffer); Modified: trunk/reactos/subsystems/win32/win32k/objects/dibobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/dibobj.c (original) +++ trunk/reactos/subsystems/win32/win32k/objects/dibobj.c Mon Nov 12 07:58:41 2007 @@ -209,7 +209,7 @@ } // Destination palette obtained from the hDC - hDCPalette = PALETTE_LockPalette(DC->DevInfo->hpalDefault); + hDCPalette = PALETTE_LockPalette(((DEVINFO)((GDIDEVICE *)DC->pPDev)->DevInfo).hpalDefault); if (NULL == hDCPalette) { EngUnlockSurface(SourceSurf); @@ -219,7 +219,7 @@ return 0; } DDB_Palette_Type = hDCPalette->Mode; - DDB_Palette = DC->DevInfo->hpalDefault; + DDB_Palette = ((DEVINFO)((GDIDEVICE *)DC->pPDev)->DevInfo).hpalDefault; PALETTE_UnlockPalette(hDCPalette); // Source palette obtained from the BITMAPINFO Modified: trunk/reactos/subsystems/win32/win32k/objects/print.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/print.c (original) +++ trunk/reactos/subsystems/win32/win32k/objects/print.c Mon Nov 12 07:58:41 2007 @@ -119,7 +119,7 @@ /* FIXME - Handle BitmapObj == NULL !!!!!! */ - if ( NULL == dc->DriverFunctions.Escape ) + if ( NULL == ((GDIDEVICE *)dc->pPDev)->DriverFunctions.Escape ) { Result = IntEngExtEscape( &BitmapObj->SurfObj, @@ -131,7 +131,7 @@ } else { - Result = dc->DriverFunctions.Escape( + Result = ((GDIDEVICE *)dc->pPDev)->DriverFunctions.Escape( &BitmapObj->SurfObj, Escape, InSize,
17 years, 1 month
1
0
0
0
[peterw] 30372: - Switch back to using the cygwin based ccache, the other doesn't work. - Give the RosBE a clear path to work with to avoid problems on Vista (plus some other problems as well).
by peterw@svn.reactos.org
Author: peterw Date: Mon Nov 12 07:20:23 2007 New Revision: 30372 URL:
http://svn.reactos.org/svn/reactos?rev=30372&view=rev
Log: - Switch back to using the cygwin based ccache, the other doesn't work. - Give the RosBE a clear path to work with to avoid problems on Vista (plus some other problems as well). Removed: trunk/tools/RosBE/Patches/ccache.CVS-11-10-2007-win32-Christophe.Gisquet.patch Modified: trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd trunk/tools/RosBE/RosBE-Windows/RosBE.nsi Removed: trunk/tools/RosBE/Patches/ccache.CVS-11-10-2007-win32-Christophe.Gisquet.patch URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/Patches/ccache.CVS-11-…
============================================================================== --- trunk/tools/RosBE/Patches/ccache.CVS-11-10-2007-win32-Christophe.Gisquet.patch (original) +++ trunk/tools/RosBE/Patches/ccache.CVS-11-10-2007-win32-Christophe.Gisquet.patch (removed) @@ -1,814 +1,0 @@ -Index: args.c -=================================================================== -RCS file: /cvsroot/ccache/args.c,v -retrieving revision 1.8 -diff -u -r1.8 args.c ---- args.c 6 Sep 2004 12:47:19 -0000 1.8 -+++ args.c 11 Nov 2007 02:06:25 -0000 -@@ -38,7 +38,7 @@ - void args_add(ARGS *args, const char *s) - { - args->argv = (char**)x_realloc(args->argv, (args->argc + 2) * sizeof(char *)); -- args->argv[args->argc] = x_strdup(s); -+ args->argv[args->argc] = x_quote_strdup(s); - args->argc++; - args->argv[args->argc] = NULL; - } -@@ -69,7 +69,7 @@ - args->argv = (char**)x_realloc(args->argv, (args->argc + 2) * sizeof(char *)); - memmove(&args->argv[1], &args->argv[0], - (args->argc+1) * sizeof(args->argv[0])); -- args->argv[0] = x_strdup(s); -+ args->argv[0] = x_quote_strdup(s); - args->argc++; - } - -Index: ccache.c -=================================================================== -RCS file: /cvsroot/ccache/ccache.c,v -retrieving revision 1.100 -diff -u -r1.100 ccache.c ---- ccache.c 28 Feb 2007 04:24:04 -0000 1.100 -+++ ccache.c 11 Nov 2007 02:24:44 -0000 -@@ -149,17 +149,31 @@ - return ret; - } - -+static int first_is_meh(const char* first) -+{ -+ const char* exe = strrchr(first, PATH_SEP_CHAR); -+ const size_t len = strlen(MYNAME); -+ -+ if (exe) exe++; -+ else exe=first; -+ return (strlen(exe) >= len && strncmp(exe, MYNAME, len) == 0 && -+ (exe[len]==0 || strcmp(exe+len, ".exe")==0) ); -+} -+ - - /* run the real compiler and put the result in cache */ - static void to_cache(ARGS *args) - { - char *path_stderr; - char *tmp_stdout, *tmp_stderr, *tmp_hashname; -- struct stat st1, st2; -+ struct stat st; - int status; -+ off_t size = 0; - -+ /* No quoting, unique arguments */ - x_asprintf(&tmp_stdout, "%s.tmp.stdout.%s", hashname, tmp_string()); - x_asprintf(&tmp_stderr, "%s.tmp.stderr.%s", hashname, tmp_string()); -+ /* Must be quoted as it will belong to a command-line */ - x_asprintf(&tmp_hashname, "%s.tmp.%s", hashname, tmp_string()); - - args_add(args, "-o"); -@@ -181,7 +195,7 @@ - status = execute(args->argv, tmp_stdout, tmp_stderr); - args_pop(args, 3); - -- if (stat(tmp_stdout, &st1) != 0 || st1.st_size != 0) { -+ if (stat(tmp_stdout, &st) != 0 || st.st_size != 0) { - cc_log("compiler produced stdout for %s\n", output_file); - stats_update(STATS_STDOUT); - unlink(tmp_stdout); -@@ -198,7 +212,7 @@ - - fd = open(tmp_stderr, O_RDONLY | O_BINARY); - if (fd != -1) { -- if (strcmp(output_file, "/dev/null") == 0 || -+ if (strcmp(output_file, DEV_NULL) == 0 || - rename(tmp_hashname, output_file) == 0 || errno == ENOENT) { - if (cpp_stderr) { - /* we might have some stderr from cpp */ -@@ -211,8 +225,7 @@ - } - } - -- /* we can use a quick method of -- getting the failed output */ -+ /* we can use a quick method of getting the failed output */ - copy_fd(fd, 2); - close(fd); - unlink(tmp_stderr); -@@ -228,19 +241,31 @@ - failed(); - } - -- x_asprintf(&path_stderr, "%s.stderr", hashname); -+ if (stat(tmp_hashname, &st) != 0 || rename(tmp_hashname, hashname) != 0) { -+ cc_log("failed to rename output: %s\n" -+ " '%s'\n" -+ " -> '%s': \n", -+ strerror(errno), tmp_hashname, hashname); -+ stats_update(STATS_ERROR); -+ failed(); -+ } -+ cc_log("Moved '%s' to '%s'\n", tmp_hashname, hashname); -+ size += file_size(&st); - -- if (stat(tmp_stderr, &st1) != 0 || -- stat(tmp_hashname, &st2) != 0 || -- rename(tmp_hashname, hashname) != 0 || -- rename(tmp_stderr, path_stderr) != 0) { -- cc_log("failed to rename tmp files - %s\n", strerror(errno)); -+ x_asprintf(&path_stderr, "%s.stderr", hashname); -+ if (stat(tmp_stderr, &st) != 0 || rename(tmp_stderr, path_stderr) != 0) { -+ cc_log("failed to rename stderr: %s\n" -+ " '%s'\n" -+ " -> '%s': \n", -+ strerror(errno), tmp_stderr, path_stderr); - stats_update(STATS_ERROR); - failed(); - } -+ cc_log("Moved '%s' to '%s'\n", tmp_stderr, path_stderr); -+ size += file_size(&st); - - cc_log("Placed %s into cache\n", output_file); -- stats_tocache(file_size(&st1) + file_size(&st2)); -+ stats_tocache(size); - - free(tmp_hashname); - free(tmp_stderr); -@@ -360,11 +385,11 @@ - input_base[10] = 0; - } - -- /* now the run */ -- x_asprintf(&path_stdout, "%s/%s.tmp.%s.%s", temp_dir, -- input_base, tmp_string(), -- i_extension); -- x_asprintf(&path_stderr, "%s/tmp.cpp_stderr.%s", temp_dir, tmp_string()); -+ /* now the run - path_std* are unique args => no quoting */ -+ x_asprintf(&path_stdout, "%s"PATH_SEP"%s.tmp.%s.%s", temp_dir, -+ input_base, tmp_string(), -+ i_extension); -+ x_asprintf(&path_stderr, "%s"PATH_SEP"tmp.cpp_stderr.%s", temp_dir, tmp_string()); - - if (!direct_i_file) { - /* run cpp on the input file to obtain the .i */ -@@ -426,18 +451,19 @@ - } - - /* we use a N level subdir for the cache path to reduce the impact -- on filesystems which are slow for large directories -+ on filesystems which are slow for large directories. -+ Quoting not necessary because unique argument, or not used yet. - */ - s = hash_result(); -- x_asprintf(&hash_dir, "%s/%c", cache_dir, s[0]); -- x_asprintf(&stats_file, "%s/stats", hash_dir); -+ x_asprintf(&hash_dir, "%s"PATH_SEP"%c", cache_dir, s[0]); -+ x_asprintf(&stats_file, "%s"PATH_SEP"stats", hash_dir); - for (i=1; i<nlevels; i++) { - char *p; - if (create_dir(hash_dir) != 0) { - cc_log("failed to create %s\n", hash_dir); - failed(); - } -- x_asprintf(&p, "%s/%c", hash_dir, s[i]); -+ x_asprintf(&p, "%s"PATH_SEP"%c", hash_dir, s[i]); - free(hash_dir); - hash_dir = p; - } -@@ -445,7 +471,7 @@ - cc_log("failed to create %s\n", hash_dir); - failed(); - } -- x_asprintf(&hashname, "%s/%s", hash_dir, s+nlevels); -+ x_asprintf(&hashname, "%s"PATH_SEP"%s", hash_dir, s+nlevels); - free(hash_dir); - } - -@@ -487,15 +513,19 @@ - - utime(stderr_file, NULL); - -- if (strcmp(output_file, "/dev/null") == 0) { -+ if (strcmp(output_file, DEV_NULL) == 0) { - ret = 0; - } else { - unlink(output_file); -+#ifdef _WIN32 -+ ret = copy_file(hashname, output_file); -+#else - if (getenv("CCACHE_HARDLINK")) { - ret = link(hashname, output_file); - } else { - ret = copy_file(hashname, output_file); - } -+#endif - } - - /* the hash file might have been deleted by some external process */ -@@ -566,10 +596,10 @@ - base = str_basename(argv[0]); - - /* we might be being invoked like "ccache gcc -c foo.c" */ -- if (strcmp(base, MYNAME) == 0) { -+ if (first_is_meh(argv[0])) { - args_remove_first(orig_args); - free(base); -- if (strchr(argv[1],'/')) { -+ if (strchr(argv[1],PATH_SEP_CHAR)) { - /* a full path was given */ - return; - } -@@ -821,7 +851,7 @@ - } - - /* cope with -o /dev/null */ -- if (strcmp(output_file,"/dev/null") != 0 && stat(output_file, &st) == 0 && !S_ISREG(st.st_mode)) { -+ if (strcmp(output_file, DEV_NULL) != 0 && stat(output_file, &st) == 0 && !S_ISREG(st.st_mode)) { - cc_log("Not a regular file %s\n", output_file); - stats_update(STATS_DEVICE); - failed(); -@@ -989,7 +1019,7 @@ - - cache_dir = getenv("CCACHE_DIR"); - if (!cache_dir) { -- x_asprintf(&cache_dir, "%s/.ccache", get_home_directory()); -+ x_asprintf(&cache_dir, "%s"PATH_SEP".ccache", get_home_directory()); - } - - temp_dir = getenv("CCACHE_TEMPDIR"); -@@ -1013,10 +1043,8 @@ - } - } - -- -- /* check if we are being invoked as "ccache" */ -- if (strlen(argv[0]) >= strlen(MYNAME) && -- strcmp(argv[0] + strlen(argv[0]) - strlen(MYNAME), MYNAME) == 0) { -+ if (first_is_meh(argv[0])) -+ { - if (argc < 2) { - usage(); - exit(1); -Index: ccache.h -=================================================================== -RCS file: /cvsroot/ccache/ccache.h,v -retrieving revision 1.54 -diff -u -r1.54 ccache.h ---- ccache.h 25 Jul 2005 07:05:46 -0000 1.54 -+++ ccache.h 11 Nov 2007 02:26:55 -0000 -@@ -1,6 +1,10 @@ - #define CCACHE_VERSION "2.4" - - #include "config.h" -+#define USUAL_PATH_SEP_CHAR '/' -+#define USUAL_PATH_SEP "/" -+#define WIN32_PATH_SEP_CHAR '\\' -+#define WIN32_PATH_SEP "\\" - - #include <stdio.h> - #include <unistd.h> -@@ -8,8 +12,20 @@ - #include <errno.h> - #include <sys/types.h> - #include <sys/stat.h> -+#ifdef _WIN32 -+#include <windows.h> -+#include <sys/locking.h> -+#define PATH_SEP WIN32_PATH_SEP -+#define PATH_SEP_CHAR WIN32_PATH_SEP_CHAR -+#define DEV_NULL "NUL" -+/* #define rename(a, b) !MoveFile(a, b) */ -+#else - #include <sys/wait.h> - #include <sys/mman.h> -+#define PATH_SEP USUAL_PATH_SEP -+#define PATH_SEP_CHAR USUAL_PATH_SEP_CHAR -+#define DEV_NULL "/dev/null" -+#endif - #include <fcntl.h> - #include <time.h> - #include <string.h> -@@ -83,6 +99,7 @@ - int create_dir(const char *dir); - void x_asprintf(char **ptr, const char *format, ...); - char *x_strdup(const char *s); -+char *x_quote_strdup(const char* s); - void *x_realloc(void *ptr, size_t size); - void *x_malloc(size_t size); - void traverse(const char *dir, void (*fn)(const char *, struct stat *)); -Index: cleanup.c -=================================================================== -RCS file: /cvsroot/ccache/cleanup.c,v -retrieving revision 1.7 -diff -u -r1.7 cleanup.c ---- cleanup.c 17 Jul 2006 01:09:56 -0000 1.7 -+++ cleanup.c 11 Nov 2007 02:28:59 -0000 -@@ -154,8 +154,9 @@ - int i; - - for (i=0;i<=0xF;i++) { -- x_asprintf(&dname, "%s/%1x", dir, i); -- x_asprintf(&sfile, "%s/%1x/stats", dir, i); -+ /* No need to quote, unique argument */ -+ x_asprintf(&dname, "%s"PATH_SEP"%1x", dir, i); -+ x_asprintf(&sfile, "%s"PATH_SEP"%1x"PATH_SEP"stats", dir, i); - - memset(counters, 0, sizeof(counters)); - stats_read(sfile, counters); -@@ -194,7 +195,7 @@ - int i; - - for (i=0;i<=0xF;i++) { -- x_asprintf(&dname, "%s/%1x", dir, i); -+ x_asprintf(&dname, "%s"PATH_SEP"%1x", dir, i); - traverse(dir, wipe_fn); - free(dname); - } -Index: execute.c -=================================================================== -RCS file: /cvsroot/ccache/execute.c,v -retrieving revision 1.10 -diff -u -r1.10 execute.c ---- execute.c 6 Sep 2004 13:11:15 -0000 1.10 -+++ execute.c 11 Nov 2007 02:31:01 -0000 -@@ -27,6 +27,7 @@ - const char *path_stdout, - const char *path_stderr) - { -+#ifndef _WIN32 - pid_t pid; - int status; - -@@ -64,8 +65,85 @@ - } - - return WEXITSTATUS(status); -+#else /* Should be portable */ -+ int status = -2; -+ int fd, std_od = -1, std_ed = -1; -+ -+ unlink(path_stdout); -+ std_od = _dup(1); -+ fd = _open(path_stdout, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL|O_BINARY, 0666); -+ if (fd == -1) { -+ status = STATUS_NOCACHE; -+ cc_log("stdout error: failed to open %s\n", path_stdout); -+ goto out; -+ } -+ _dup2(fd, 1); -+ _close(fd); -+ -+ unlink(path_stderr); -+ fd = _open(path_stderr, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL|O_BINARY, 0666); -+ std_ed = _dup(2); -+ if (fd == -1) { -+ status = STATUS_NOCACHE; -+ cc_log("stderr error: failed to open %s\n", path_stderr); -+ goto out; -+ } -+ _dup2(fd, 2); -+ _close(fd); -+ -+ /* Spawn process (_exec* familly doesn't return) */ -+ status = _spawnv(_P_WAIT, argv[0], argv); -+ -+ out: -+ cc_log("%s:\n stdout -> %s\n stderr -> %s\n process status=%i\n", -+ argv[0], path_stdout, path_stderr, status); -+ if (status == -1) cc_log("Error %i: %s\n", errno, strerror(errno)); -+ -+ /* Restore descriptors */ -+ if (std_od != -1) _dup2(std_od, 1); -+ if (std_ed != -1) _dup2(std_ed, 2); -+ _flushall(); -+ -+ return (status>0); -+#endif - } - -+/* -+ Check that the executable existss -+*/ -+char is_exec_file(const char *fname, const char *exclude_name) -+{ -+ struct stat st1, st2; -+ -+ if (access(fname, X_OK) == 0 && -+#ifndef _WIN32 /* Symlinks not used under windows */ -+ lstat(fname, &st1) == 0 && -+#endif -+ stat(fname, &st2) == 0 && -+ S_ISREG(st2.st_mode)) { -+#ifndef _WIN32 /* Symlinks not used under windows */ -+ /* if its a symlink then ensure it doesn't -+ point at something called exclude_name */ -+ if (S_ISLNK(st1.st_mode)) { -+ char *buf = x_realpath(fname); -+ if (buf) { -+ char *p = str_basename(buf); -+ if (strcmp(p, exclude_name) == 0) { -+ /* its a link to "ccache" ! */ -+ free(p); -+ free(buf); -+ return -1; -+ } -+ free(buf); -+ free(p); -+ } -+ } -+#endif -+ /* found it! */ -+ return 1; -+ } -+ return -1; -+} - - /* - find an executable by name in $PATH. Exclude any that are links to exclude_name -@@ -74,9 +152,9 @@ - { - char *path; - char *tok; -- struct stat st1, st2; -+ const char *sep = ":"; - -- if (*name == '/') { -+ if (*name == PATH_SEP_CHAR) { - return x_strdup(name); - } - -@@ -91,39 +169,36 @@ - - path = x_strdup(path); - -+ /* Determine path separator */ -+ if (strchr(path, ';')) sep = ";"; -+ - /* search the path looking for the first compiler of the right name - that isn't us */ -- for (tok=strtok(path,":"); tok; tok = strtok(NULL, ":")) { -+ for (tok=strtok(path, sep); tok; tok = strtok(NULL, sep)) { - char *fname; -- x_asprintf(&fname, "%s/%s", tok, name); -+ x_asprintf(&fname, "%s"PATH_SEP"%s", tok, name); -+ - /* look for a normal executable file */ -- if (access(fname, X_OK) == 0 && -- lstat(fname, &st1) == 0 && -- stat(fname, &st2) == 0 && -- S_ISREG(st2.st_mode)) { -- /* if its a symlink then ensure it doesn't -- point at something called exclude_name */ -- if (S_ISLNK(st1.st_mode)) { -- char *buf = x_realpath(fname); -- if (buf) { -- char *p = str_basename(buf); -- if (strcmp(p, exclude_name) == 0) { -- /* its a link to "ccache" ! */ -- free(p); -- free(buf); -- continue; -- } -- free(buf); -- free(p); -- } -+ if (is_exec_file(fname, exclude_name) > 0) -+ { -+ free(path); -+ return fname; - } -+ free(fname); -+ -+#ifdef _WIN32 /* Add .exe under win32 */ -+ x_asprintf(&fname, "%s"PATH_SEP"%s.exe", tok, name); - -- /* found it! */ -+ /* look for a normal executable file */ -+ if (is_exec_file(fname, exclude_name) > 0) -+ { - free(path); - return fname; - } - free(fname); -+#endif - } - -+ free(path); - return NULL; - } -Index: stats.c -=================================================================== -RCS file: /cvsroot/ccache/stats.c,v -retrieving revision 1.15 -diff -u -r1.15 stats.c ---- stats.c 6 Sep 2004 12:46:31 -0000 1.15 -+++ stats.c 11 Nov 2007 02:31:01 -0000 -@@ -126,7 +126,7 @@ - - if (!stats_file) { - if (!cache_dir) return; -- x_asprintf(&stats_file, "%s/stats", cache_dir); -+ x_asprintf(&stats_file, "%s"PATH_SEP"stats", cache_dir); - } - - /* open safely to try to prevent symlink races */ -@@ -215,9 +215,9 @@ - char *fname; - - if (dir == -1) { -- x_asprintf(&fname, "%s/stats", cache_dir); -+ x_asprintf(&fname, "%s"PATH_SEP"stats", cache_dir); - } else { -- x_asprintf(&fname, "%s/%1x/stats", cache_dir, dir); -+ x_asprintf(&fname, "%s"PATH_SEP"%1x"PATH_SEP"stats", cache_dir, dir); - } - - stats_read(fname, counters); -@@ -259,12 +259,12 @@ - char *fname; - unsigned counters[STATS_END]; - -- x_asprintf(&fname, "%s/stats", cache_dir); -+ x_asprintf(&fname, "%s"PATH_SEP"stats", cache_dir); - unlink(fname); - free(fname); - - for (dir=0;dir<=0xF;dir++) { -- x_asprintf(&fname, "%s/%1x/stats", cache_dir, dir); -+ x_asprintf(&fname, "%s"PATH_SEP"%1x"PATH_SEP"stats", cache_dir, dir); - fd = safe_open(fname); - if (fd == -1) { - free(fname); -@@ -305,9 +305,9 @@ - char *fname, *cdir; - int fd; - -- x_asprintf(&cdir, "%s/%1x", cache_dir, dir); -+ x_asprintf(&cdir, "%s"PATH_SEP"%1x", cache_dir, dir); - create_dir(cdir); -- x_asprintf(&fname, "%s/stats", cdir); -+ x_asprintf(&fname, "%s"PATH_SEP"stats", cdir); - free(cdir); - - memset(counters, 0, sizeof(counters)); -@@ -336,7 +336,7 @@ - char *stats_file; - - create_dir(dir); -- x_asprintf(&stats_file, "%s/stats", dir); -+ x_asprintf(&stats_file, "%s"PATH_SEP"stats", dir); - - memset(counters, 0, sizeof(counters)); - -Index: unify.c -=================================================================== -RCS file: /cvsroot/ccache/unify.c,v -retrieving revision 1.8 -diff -u -r1.8 unify.c ---- unify.c 6 Sep 2004 12:24:05 -0000 1.8 -+++ unify.c 11 Nov 2007 02:31:01 -0000 -@@ -249,6 +249,33 @@ - return -1; - } - -+#ifdef _WIN32 -+ /* win32 equivalent of mmap is ViewMapOfFile, but malloc+read -+ may be better */ -+ HANDLE view = CreateFileMapping((HANDLE)_get_osfhandle(fd), NULL, -+ PAGE_READONLY|SEC_COMMIT, 0,0 , NULL); -+ if (NULL == view) { -+ cc_log("Failed to create file mapping %s: %s\n", -+ fname, strerror(errno)); -+ stats_update(STATS_PREPROCESSOR); -+ return -1; -+ } -+ -+ map = MapViewOfFile(view, FILE_MAP_READ, 0, 0, st.st_size); -+ if (NULL == map) { -+ cc_log("Failed to map view of file %s: %s\n", -+ fname, strerror(errno)); -+ stats_update(STATS_PREPROCESSOR); -+ return -1; -+ } -+ -+ /* pass it through the unifier */ -+ unify((unsigned char *)map, st.st_size); -+ -+ UnmapViewOfFile(map); -+ CloseHandle(view); -+ close(fd); -+#else - /* we use mmap() to make it easy to handle arbitrarily long - lines in preprocessor output. I have seen lines of over - 100k in length, so this is well worth it */ -@@ -263,7 +290,7 @@ - unify((unsigned char *)map, st.st_size); - - munmap(map, st.st_size); -- -+#endif - return 0; - } - -Index: util.c -=================================================================== -RCS file: /cvsroot/ccache/util.c,v -retrieving revision 1.37 -diff -u -r1.37 util.c ---- util.c 17 Jul 2006 03:41:12 -0000 1.37 -+++ util.c 11 Nov 2007 02:31:02 -0000 -@@ -17,8 +17,28 @@ - */ - - #include "ccache.h" -+#include <strings.h> - - static FILE *logfile; -+#ifdef _WIN32 -+int fchmod(int fildes, mode_t mode) -+{ -+# warning "fchmod not implemented" -+ return 0; -+} -+# define mkdir(a,b) mkdir(a) -+# define lstat(a,b) stat(a,b) -+# define x_realpath(a) strdup(a) -+#endif -+ -+#ifndef HAVE_MKSTEMP -+/* cheap and nasty mkstemp replacement */ -+int mkstemp(char *template) -+{ -+ mktemp(template); -+ return open(template, O_RDWR|O_CREAT|O_EXCL|O_BINARY, 0600); -+} -+#endif - - /* log a message to the CCACHE_LOGFILE location */ - void cc_log(const char *format, ...) -@@ -168,6 +188,33 @@ - } - - /* -+ this is like strdup() but dies if the malloc fails and add quotes -+ around the argument if it contains spaces. -+*/ -+char* -+x_quote_strdup(const char* s) -+{ -+ /* Protect against args containing spaces in them - unicode-able ? */ -+ if (strchr(s, ' ') != NULL) { -+ size_t len = strlen(s); /* at least 1 as it holds ' ' */ -+ char *new_arg = x_malloc(len+2*1+1); /* Make room for quoting */ -+ -+ /* Quote */ -+ new_arg[0] = '"'; -+ memcpy(new_arg+1, s, len); -+ new_arg[len+1] = '"'; -+ new_arg[len+2] = 0; -+ -+ /* Done */ -+ cc_log("Quoted %s\n", new_arg); -+ return new_arg; -+ } -+ else -+ return x_strdup(s); -+} -+ -+ -+/* - this is like malloc() but dies if the malloc fails - */ - void *x_malloc(size_t size) -@@ -216,7 +263,8 @@ - - if (strlen(de->d_name) == 0) continue; - -- x_asprintf(&fname, "%s/%s", dir, de->d_name); -+ /* No need to quote, unique argument */ -+ x_asprintf(&fname, "%s"PATH_SEP"%s", dir, de->d_name); - if (lstat(fname, &st)) { - if (errno != ENOENT) { - perror(fname); -@@ -240,7 +288,7 @@ - /* return the base name of a file - caller frees */ - char *str_basename(const char *s) - { -- char *p = strrchr(s, '/'); -+ char *p = strrchr(s, PATH_SEP_CHAR); - if (p) { - return x_strdup(p+1); - } -@@ -253,15 +301,31 @@ - { - char *p; - s = x_strdup(s); -- p = strrchr(s, '/'); -+ p = strrchr(s, PATH_SEP_CHAR); - if (p) { - *p = 0; - } - return s; - } - -+/* -+
http://www.ecst.csuchico.edu/~beej/guide/ipc/flock.html
-+
http://cvs.php.net/viewcvs.cgi/php-src/win32/flock.c?revision=1.2&view=mark…
-+ Should return 0 for success, >0 otherwise -+ */ - int lock_fd(int fd) - { -+#ifdef _WIN32 -+# if 1 -+ return _locking(fd, _LK_NBLCK, 1); -+# else -+ HANDLE fl = (HANDLE)_get_osfhandle(fd); -+ OVERLAPPED o; -+ memset(&o, 0, sizeof(o)); -+ return (LockFileEx(fl, LOCKFILE_EXCLUSIVE_LOCK, 0, 1,0 /*len*/, &o)) -+ ? 0 : GetLastError(); -+# endif -+#else - struct flock fl; - int ret; - -@@ -277,17 +341,22 @@ - ret = fcntl(fd, F_SETLKW, &fl); - } while (ret == -1 && errno == EINTR); - return ret; -+#endif - } - - /* return size on disk of a file */ - size_t file_size(struct stat *st) - { -+#ifdef _WIN32 -+ return st->st_size; -+#else - size_t size = st->st_blocks * 512; - if ((size_t)st->st_size > size) { - /* probably a broken stat() call ... */ - size = (st->st_size + 1023) & ~1023; - } - return size; -+#endif - } - - -@@ -343,6 +412,7 @@ - } - - -+#ifndef _WIN32 - /* - a sane realpath() function, trying to cope with stupid path limits and - a broken API -@@ -385,6 +455,7 @@ - free(ret); - return NULL; - } -+#endif - - /* a getcwd that will returns an allocated buffer */ - char *gnu_getcwd(void) -@@ -404,16 +475,6 @@ - } - } - --#ifndef HAVE_MKSTEMP --/* cheap and nasty mkstemp replacement */ --int mkstemp(char *template) --{ -- mktemp(template); -- return open(template, O_RDWR | O_CREAT | O_EXCL | O_BINARY, 0600); --} --#endif -- -- - /* create an empty file */ - int create_empty_file(const char *fname) - { -@@ -430,9 +491,26 @@ - /* - return current users home directory or die - */ -+#ifdef _WIN32 -+ // To get SHGetSpecialFolderPath -+# define _WIN32_IE 0x500 -+# include <shlobj.h> -+#endif - const char *get_home_directory(void) - { -- const char *p = getenv("HOME"); -+ const char *p = NULL; -+ -+#ifdef _WIN32 -+ static TCHAR szPath[MAX_PATH]; -+ -+ // "Documents and Settings\user\Application Data" is CSIDL_APPDATA -+ if(SHGetSpecialFolderPath(NULL, szPath, CSIDL_PROFILE, FALSE)) -+ { -+ return szPath; -+ } -+#endif -+ -+ p = getenv("HOME"); - if (p) { - return p; - } Modified: trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Ros…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd (original) +++ trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd Mon Nov 12 07:20:23 2007 @@ -15,6 +15,7 @@ :: the options utility. :: color 0A +set PATH=%SystemRoot%\system32;%SystemRoot% set _ROSBE_VERSION=1.0 set _ROSBE_BASEDIR=%~dp0 set _ROSBE_BASEDIR=%_ROSBE_BASEDIR:~0,-1% Modified: trunk/tools/RosBE/RosBE-Windows/RosBE.nsi URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/RosBE.ns…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/RosBE.nsi (original) +++ trunk/tools/RosBE/RosBE-Windows/RosBE.nsi Mon Nov 12 07:20:23 2007 @@ -183,6 +183,7 @@ SetOutPath "$INSTDIR\4.1.3\bin" SetOverwrite try File /r Root\Tools\ccache.exe + File /r Root\Tools\cygwin1.dll SectionEnd Section "relAddr2Line Tool" SEC07
17 years, 1 month
1
0
0
0
[jimtabor] 30371: Removed unused DeviceDriver. Fix behavior for dcattr.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Mon Nov 12 06:22:12 2007 New Revision: 30371 URL:
http://svn.reactos.org/svn/reactos?rev=30371&view=rev
Log: Removed unused DeviceDriver. Fix behavior for dcattr. Modified: trunk/reactos/include/reactos/win32k/ntgdihdl.h trunk/reactos/subsystems/win32/win32k/objects/dc.c Modified: trunk/reactos/include/reactos/win32k/ntgdihdl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntg…
============================================================================== --- trunk/reactos/include/reactos/win32k/ntgdihdl.h (original) +++ trunk/reactos/include/reactos/win32k/ntgdihdl.h Mon Nov 12 06:22:12 2007 @@ -513,7 +513,6 @@ HDEV GDIDevice; // Should be PDev or pPDev? DRIVER_FUNCTIONS DriverFunctions; // In GDIDEVICE UNICODE_STRING DriverName; - HANDLE DeviceDriver; // ?DHPDEV? CLIPOBJ *CombinedClip; Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/dc.c (original) +++ trunk/reactos/subsystems/win32/win32k/objects/dc.c Mon Nov 12 06:22:12 2007 @@ -218,7 +218,6 @@ NewDC->w.bitsPerPixel = OrigDC->w.bitsPerPixel; /* DriverName is copied in the AllocDC routine */ - NewDC->DeviceDriver = OrigDC->DeviceDriver; NewDC->Dc_Attr.ptlWindowOrg.x = OrigDC->Dc_Attr.ptlWindowOrg.x; NewDC->Dc_Attr.ptlWindowOrg.y = OrigDC->Dc_Attr.ptlWindowOrg.y; NewDC->Dc_Attr.szlWindowExt.cx = OrigDC->Dc_Attr.szlWindowExt.cx; @@ -2534,6 +2533,7 @@ PDC pDC = DC_LockDc(DCToFree); if (pDC->pDc_Attr == &pDC->Dc_Attr) return; // Internal DC object! pDC->pDc_Attr = NULL; +// pDC->pDc_Attr = &pDC->Dc_Attr; // Correct behavior. DC_UnlockDc(pDC); KeEnterCriticalRegion();
17 years, 1 month
1
0
0
0
[jimtabor] 30370: 1st Sort out gdi device mess.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Mon Nov 12 04:26:32 2007 New Revision: 30370 URL:
http://svn.reactos.org/svn/reactos?rev=30370&view=rev
Log: 1st Sort out gdi device mess. Modified: trunk/reactos/include/reactos/win32k/ntgdihdl.h trunk/reactos/subsystems/win32/win32k/include/dc.h trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c Modified: trunk/reactos/include/reactos/win32k/ntgdihdl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntg…
============================================================================== --- trunk/reactos/include/reactos/win32k/ntgdihdl.h (original) +++ trunk/reactos/include/reactos/win32k/ntgdihdl.h Mon Nov 12 04:26:32 2007 @@ -495,28 +495,34 @@ ULONG lucExcLock; ULONG Tid; - DHPDEV PDev; + DHPDEV PDev; // Handle GDIDEVICE? INT DC_Type; INT DC_Flags; + PVOID pPDev; // PGDIDEVICE? + FLONG flGraphics; + FLONG flGraphics2; PDC_ATTR pDc_Attr; DC_ATTR Dc_Attr; - HDC hSelf; // Used only for MemoryDC & SaveDC. HDC hNext; - HSURF FillPatternSurfaces[HS_DDI_MAX]; - PGDIINFO GDIInfo; - PDEVINFO DevInfo; - HDEV GDIDevice; - + HDC hPrev; +// Old tymerz! Cant code? So just Haxzorcise it! +// How many pointers to devices do we need? + HSURF FillPatternSurfaces[HS_DDI_MAX]; // In GDIDEVICE + PGDIINFO GDIInfo; // In GDIDEVICE + PDEVINFO DevInfo; // In GDIDEVICE + HDEV GDIDevice; // Should be PDev or pPDev? + DRIVER_FUNCTIONS DriverFunctions; // In GDIDEVICE UNICODE_STRING DriverName; - HANDLE DeviceDriver; + HANDLE DeviceDriver; // ?DHPDEV? CLIPOBJ *CombinedClip; XLATEOBJ *XlateBrush; XLATEOBJ *XlatePen; - INT saveLevel; - BOOL IsIC; + INT saveLevel; // DCLEVEL lSaveDepth + HDC hSelf; // DCLEVEL hdcSave Used only for MemoryDC & SaveDC. + BOOL IsIC; // Use DC_Type HPALETTE PalIndexed; @@ -524,13 +530,6 @@ HANDLE hFile; LPENHMETAHEADER emh; - // This belongs in DHPDEV not in DC. 8^( - // So I'm putting it down here with the rest of misfits. - // DRIVER_FUNCTIONS does not belong in DC. It should go PVOID in dpdev. - DRIVER_FUNCTIONS DriverFunctions; - struct _EDD_DIRECTDRAW_GLOBAL * pEDDgpl; - // - } DC, *PDC; #endif Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/dc.h (original) +++ trunk/reactos/subsystems/win32/win32k/include/dc.h Mon Nov 12 04:26:32 2007 @@ -56,7 +56,10 @@ UINT SafetyRemoveLevel; /* at what level was the cursor removed? 0 for not removed */ UINT SafetyRemoveCount; -} GDIDEVICE; + + struct _EDD_DIRECTDRAW_GLOBAL * pEDDgpl; + +} GDIDEVICE, *PGDIDEVICE; /* Internal functions */ Modified: trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c Mon Nov 12 04:26:32 2007 @@ -388,10 +388,13 @@ UNIMPLEMENTED; return 0; case 3: - pEDDgpl = pDC->pEDDgpl; + { +/* PGDIDEVICE GDIDevice = (PGDIDEVICE)pDC->PDev; //This one is right,, we have two.*/ + PGDIDEVICE GDIDevice = (PGDIDEVICE)pDC->GDIDevice; //Until now noone noticed. + pEDDgpl = GDIDevice->pEDDgpl; DC_UnlockDc(pDC); return (DWORD)pEDDgpl; - + } default: UNIMPLEMENTED; break;
17 years, 1 month
1
0
0
0
← Newer
1
...
52
53
54
55
56
57
58
...
89
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
Results per page:
10
25
50
100
200