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
August 2012
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
14 participants
198 discussions
Start a n
N
ew thread
[tkreuzer] 57028: [WIN32K] Return non-null value when a dc without a bitmap selected is passed to NtGdiSetDIBitsToDeviceInternal
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Thu Aug 2 10:06:08 2012 New Revision: 57028 URL:
http://svn.reactos.org/svn/reactos?rev=57028&view=rev
Log: [WIN32K] Return non-null value when a dc without a bitmap selected is passed to NtGdiSetDIBitsToDeviceInternal Modified: trunk/reactos/win32ss/gdi/ntgdi/dibobj.c Modified: trunk/reactos/win32ss/gdi/ntgdi/dibobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/dibobj.c…
============================================================================== --- trunk/reactos/win32ss/gdi/ntgdi/dibobj.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/dibobj.c [iso-8859-1] Thu Aug 2 10:06:08 2012 @@ -433,6 +433,8 @@ goto Exit2; } + ScanLines = min(ScanLines, abs(bmi->bmiHeader.biHeight) - StartScan); + pDC = DC_LockDc(hDC); if (!pDC) { @@ -440,16 +442,21 @@ goto Exit2; } - pSurf = pDC->dclevel.pSurface; - if ((pDC->dctype == DC_TYPE_INFO) || !pSurf) + if (pDC->dctype == DC_TYPE_INFO) { DC_UnlockDc(pDC); goto Exit2; } + pSurf = pDC->dclevel.pSurface; + if (!pSurf) + { + DC_UnlockDc(pDC); + ret = ScanLines; + goto Exit2; + } + pDestSurf = &pSurf->SurfObj; - - ScanLines = min(ScanLines, abs(bmi->bmiHeader.biHeight) - StartScan); rcDest.left = XDest; rcDest.top = YDest;
12 years, 4 months
1
0
0
0
[akhaldi] 57027: [WINETESTS] * Add several tests to the MSVC build.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Aug 2 00:36:26 2012 New Revision: 57027 URL:
http://svn.reactos.org/svn/reactos?rev=57027&view=rev
Log: [WINETESTS] * Add several tests to the MSVC build. Modified: trunk/rostests/winetests/CMakeLists.txt trunk/rostests/winetests/mshtml/CMakeLists.txt trunk/rostests/winetests/oleaut32/typelib.c Modified: trunk/rostests/winetests/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/CMakeLists.txt?…
============================================================================== --- trunk/rostests/winetests/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/winetests/CMakeLists.txt [iso-8859-1] Thu Aug 2 00:36:26 2012 @@ -3,9 +3,7 @@ add_subdirectory(advapi32) add_subdirectory(advpack) -if(NOT MSVC) - add_subdirectory(amstream) # FIXME: msvc build. -endif() +add_subdirectory(amstream) add_subdirectory(atl) add_subdirectory(avifil32) add_subdirectory(browseui) @@ -43,18 +41,13 @@ add_subdirectory(mscms) add_subdirectory(mscoree) add_subdirectory(msctf) -if(NOT MSVC) - # FIXME: msvc build. - add_subdirectory(mshtml) - add_subdirectory(msi) -endif() +add_subdirectory(mshtml) +add_subdirectory(msi) add_subdirectory(mstask) add_subdirectory(msvcrt) add_subdirectory(msvcrtd) add_subdirectory(msvfw32) -if(NOT MSVC) - add_subdirectory(msxml3) # FIXME: msvc build. -endif() +add_subdirectory(msxml3) add_subdirectory(netapi32) add_subdirectory(ntdll) add_subdirectory(ntdsapi) @@ -62,9 +55,7 @@ add_subdirectory(odbccp32) add_subdirectory(ole32) add_subdirectory(oleacc) -if(NOT MSVC) - add_subdirectory(oleaut32) # FIXME: msvc build. -endif() +add_subdirectory(oleaut32) add_subdirectory(opengl32) add_subdirectory(pdh) add_subdirectory(psapi) @@ -88,9 +79,7 @@ add_subdirectory(sti) add_subdirectory(sxs) add_subdirectory(twain_32) -if(NOT MSVC) - add_subdirectory(urlmon) # FIXME: msvc build. -endif() +add_subdirectory(urlmon) add_subdirectory(user32) add_subdirectory(userenv) add_subdirectory(usp10) Modified: trunk/rostests/winetests/mshtml/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mshtml/CMakeLis…
============================================================================== --- trunk/rostests/winetests/mshtml/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/winetests/mshtml/CMakeLists.txt [iso-8859-1] Thu Aug 2 00:36:26 2012 @@ -1,9 +1,5 @@ -set_rc_compiler() - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) +add_definitions(-D__ROS_LONG64__) list(APPEND SOURCE dom.c Modified: trunk/rostests/winetests/oleaut32/typelib.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oleaut32/typeli…
============================================================================== --- trunk/rostests/winetests/oleaut32/typelib.c [iso-8859-1] (original) +++ trunk/rostests/winetests/oleaut32/typelib.c [iso-8859-1] Thu Aug 2 00:36:26 2012 @@ -56,8 +56,8 @@ #define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error 0x%08x\n", hr) -static HRESULT WINAPI (*pRegisterTypeLibForUser)(ITypeLib*,OLECHAR*,OLECHAR*); -static HRESULT WINAPI (*pUnRegisterTypeLibForUser)(REFGUID,WORD,WORD,LCID,SYSKIND); +static HRESULT (WINAPI *pRegisterTypeLibForUser)(ITypeLib*,OLECHAR*,OLECHAR*); +static HRESULT (WINAPI *pUnRegisterTypeLibForUser)(REFGUID,WORD,WORD,LCID,SYSKIND); static const WCHAR wszStdOle2[] = {'s','t','d','o','l','e','2','.','t','l','b',0};
12 years, 4 months
1
0
0
0
[akhaldi] 57026: [D3D8THK] * Welcome to MSVC build.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Aug 2 00:23:07 2012 New Revision: 57026 URL:
http://svn.reactos.org/svn/reactos?rev=57026&view=rev
Log: [D3D8THK] * Welcome to MSVC build. Modified: trunk/reactos/dll/directx/CMakeLists.txt trunk/reactos/dll/directx/d3d8thk/CMakeLists.txt Modified: trunk/reactos/dll/directx/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/CMakeLists.txt…
============================================================================== --- trunk/reactos/dll/directx/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/directx/CMakeLists.txt [iso-8859-1] Thu Aug 2 00:23:07 2012 @@ -1,10 +1,6 @@ add_subdirectory(amstream) - -if (NOT MSVC) - add_subdirectory(d3d8thk) -endif() - +add_subdirectory(d3d8thk) #add_subdirectory(bdaplgin) #disabled in trunk #add_subdirectory(d3d8) #disabled in trunk, see wine subfolder #add_subdirectory(d3d9) #disabled in trunk, see wine subfolder Modified: trunk/reactos/dll/directx/d3d8thk/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/d3d8thk/CMakeL…
============================================================================== --- trunk/reactos/dll/directx/d3d8thk/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/directx/d3d8thk/CMakeLists.txt [iso-8859-1] Thu Aug 2 00:23:07 2012 @@ -1,12 +1,7 @@ spec2def(d3d8thk.dll d3d8thk.spec) - add_library(d3d8thk SHARED d3d8thk.rc ${CMAKE_CURRENT_BINARY_DIR}/d3d8thk.def) - set_entrypoint(d3d8thk 0) - add_importlibs(d3d8thk gdi32) - add_dependencies(d3d8thk psdk) - add_cd_file(TARGET d3d8thk DESTINATION reactos/system32 FOR all)
12 years, 4 months
1
0
0
0
[akhaldi] 57025: [AMSTREAM] * Welcome to MSVC build.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Aug 2 00:03:51 2012 New Revision: 57025 URL:
http://svn.reactos.org/svn/reactos?rev=57025&view=rev
Log: [AMSTREAM] * Welcome to MSVC build. Modified: trunk/reactos/dll/directx/CMakeLists.txt trunk/reactos/dll/directx/amstream/CMakeLists.txt Modified: trunk/reactos/dll/directx/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/CMakeLists.txt…
============================================================================== --- trunk/reactos/dll/directx/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/directx/CMakeLists.txt [iso-8859-1] Thu Aug 2 00:03:51 2012 @@ -1,8 +1,10 @@ + +add_subdirectory(amstream) if (NOT MSVC) -add_subdirectory(amstream) -add_subdirectory(d3d8thk) + add_subdirectory(d3d8thk) endif() + #add_subdirectory(bdaplgin) #disabled in trunk #add_subdirectory(d3d8) #disabled in trunk, see wine subfolder #add_subdirectory(d3d9) #disabled in trunk, see wine subfolder Modified: trunk/reactos/dll/directx/amstream/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/amstream/CMake…
============================================================================== --- trunk/reactos/dll/directx/amstream/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/directx/amstream/CMakeLists.txt [iso-8859-1] Thu Aug 2 00:03:51 2012 @@ -6,7 +6,6 @@ include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) -set_rc_compiler() spec2def(amstream.dll amstream.spec) add_library(amstream SHARED
12 years, 4 months
1
0
0
0
[akhaldi] 57024: [STDOLE32.TLB] * Welcome to MSVC build.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Aug 1 23:54:07 2012 New Revision: 57024 URL:
http://svn.reactos.org/svn/reactos?rev=57024&view=rev
Log: [STDOLE32.TLB] * Welcome to MSVC build. Modified: trunk/reactos/dll/win32/CMakeLists.txt trunk/reactos/dll/win32/stdole32.tlb/CMakeLists.txt Modified: trunk/reactos/dll/win32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/CMakeLists.txt?r…
============================================================================== --- trunk/reactos/dll/win32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/CMakeLists.txt [iso-8859-1] Wed Aug 1 23:54:07 2012 @@ -180,9 +180,7 @@ add_subdirectory(spoolss) add_subdirectory(srclient) add_subdirectory(stdole2.tlb) -if(NOT MSVC) - add_subdirectory(stdole32.tlb) # FIXME: msvc build. -endif() +add_subdirectory(stdole32.tlb) add_subdirectory(sti) add_subdirectory(sxs) add_subdirectory(syssetup) Modified: trunk/reactos/dll/win32/stdole32.tlb/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/stdole32.tlb/CMa…
============================================================================== --- trunk/reactos/dll/win32/stdole32.tlb/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/stdole32.tlb/CMakeLists.txt [iso-8859-1] Wed Aug 1 23:54:07 2012 @@ -4,7 +4,6 @@ add_typelib(std_ole_v1.idl) -set_rc_compiler() spec2def(stdole32.tlb stdole32.tlb.spec) list(APPEND SOURCE
12 years, 4 months
1
0
0
0
[tkreuzer] 57023: [WIN32K] - Implement CaptureUnicodeStringOrAtom, which handles user mode class names or atoms, and use it in some places. - Fix a number of format strings
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Aug 1 23:52:43 2012 New Revision: 57023 URL:
http://svn.reactos.org/svn/reactos?rev=57023&view=rev
Log: [WIN32K] - Implement CaptureUnicodeStringOrAtom, which handles user mode class names or atoms, and use it in some places. - Fix a number of format strings Modified: trunk/reactos/win32ss/user/ntuser/class.c trunk/reactos/win32ss/user/ntuser/class.h Modified: trunk/reactos/win32ss/user/ntuser/class.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/class.…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/class.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/class.c [iso-8859-1] Wed Aug 1 23:52:43 2012 @@ -110,6 +110,72 @@ return FALSE; } +_Must_inspect_result_ +NTSTATUS +NTAPI +CaptureUnicodeStringOrAtom( + _Out_ PUNICODE_STRING pustrOut, + __in_data_source(USER_MODE) _In_ PUNICODE_STRING pustrUnsafe) +{ + NTSTATUS Status = STATUS_SUCCESS; + + /* Default to NULL */ + pustrOut->Buffer = NULL; + + _SEH2_TRY + { + ProbeForRead(pustrUnsafe, sizeof(UNICODE_STRING), 1); + + /* Validate the string */ + if ((pustrUnsafe->Length & 1) || (pustrUnsafe->Buffer == NULL)) + { + /* This is not legal */ + _SEH2_YIELD(return STATUS_INVALID_PARAMETER); + } + + /* Check if this is an atom */ + if (IS_ATOM(pustrUnsafe->Buffer)) + { + /* Copy the atom, length is 0 */ + pustrOut->MaximumLength = pustrOut->Length = 0; + pustrOut->Buffer = pustrUnsafe->Buffer; + } + else + { + /* Get the length, maximum length includes zero termination */ + pustrOut->Length = pustrUnsafe->Length; + pustrOut->MaximumLength = pustrOut->Length + sizeof(WCHAR); + + /* Allocate a buffer */ + pustrOut->Buffer = ExAllocatePoolWithTag(PagedPool, + pustrOut->MaximumLength, + TAG_STRING); + if (!pustrOut->Buffer) + { + _SEH2_YIELD(return STATUS_INSUFFICIENT_RESOURCES); + } + + /* Copy the string and zero terminate it */ + ProbeForRead(pustrUnsafe->Buffer, pustrOut->Length, 1); + RtlCopyMemory(pustrOut->Buffer, pustrUnsafe->Buffer, pustrOut->Length); + pustrOut->Buffer[pustrOut->Length / sizeof(WCHAR)] = L'\0'; + } + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + /* Check if we already allocated a buffer */ + if (pustrOut->Buffer) + { + /* Free the buffer */ + ExFreePoolWithTag(pustrOut->Buffer, TAG_STRING); + Status = _SEH2_GetExceptionCode(); + } + } + _SEH2_END; + + return Status; +} + /* WINDOWCLASS ***************************************************************/ static VOID @@ -503,7 +569,7 @@ /* Simply clone the class */ RtlCopyMemory( Class, BaseClass, ClassSize); - TRACE("Clone Class 0x%x hM 0x%x\n %S\n",Class, Class->hModule, Class->lpszClientUnicodeMenuName); + TRACE("Clone Class 0x%p hM 0x%p\n %S\n",Class, Class->hModule, Class->lpszClientUnicodeMenuName); /* Restore module address if default user class Ref: Bug 4778 */ if ( Class->hModule != hModClient && @@ -511,7 +577,7 @@ Class->fnid >= FNID_BUTTON ) { Class->hModule = hModClient; - TRACE("Clone Class 0x%x Reset hM 0x%x\n",Class, Class->hModule); + TRACE("Clone Class 0x%p Reset hM 0x%p\n",Class, Class->hModule); } /* Update some pointers and link the class */ @@ -631,7 +697,7 @@ { ASSERT(Class->pclsBase == Class); - TRACE("IntDereferenceClass 0x%x\n", Class); + TRACE("IntDereferenceClass 0x%p\n", Class); /* Check if there are clones of the class on other desktops, link the first clone in if possible. If there are no clones then leave the class on the desktop heap. It will get moved @@ -669,7 +735,7 @@ } else { - TRACE("IntDereferenceClass1 0x%x\n", Class); + TRACE("IntDereferenceClass1 0x%p\n", Class); /* Locate the cloned class and unlink it */ PrevLink = &BaseClass->pclsClone; @@ -1032,7 +1098,7 @@ EngSetLastError(ERROR_NOT_ENOUGH_MEMORY); } - TRACE("Created class 0x%x with name %wZ and proc 0x%x for atom 0x%x and hInstance 0x%x, global %d\n", + TRACE("Created class 0x%p with name %wZ and proc 0x%p for atom 0x%x and hInstance 0x%p, global %u\n", Class, ClassName, Class->lpfnWndProc, Atom, Class->hModule, Class->Global); return Class; @@ -1068,8 +1134,10 @@ } BOOL -IntGetAtomFromStringOrAtom(IN PUNICODE_STRING ClassName, - OUT RTL_ATOM *Atom) +NTAPI +IntGetAtomFromStringOrAtom( + _In_ PUNICODE_STRING ClassName, + _Out_ RTL_ATOM *Atom) { BOOL Ret = FALSE; @@ -1078,6 +1146,8 @@ WCHAR szBuf[65]; PWSTR AtomName; NTSTATUS Status; + + *Atom = 0; /* NOTE: Caller has to protect the call with SEH! */ @@ -1134,11 +1204,12 @@ } RTL_ATOM -IntGetClassAtom(IN PUNICODE_STRING ClassName, - IN HINSTANCE hInstance OPTIONAL, - IN PPROCESSINFO pi OPTIONAL, - OUT PCLS *BaseClass OPTIONAL, - OUT PCLS **Link OPTIONAL) +IntGetClassAtom( + _In_ PUNICODE_STRING ClassName, + IN HINSTANCE hInstance OPTIONAL, + IN PPROCESSINFO pi OPTIONAL, + OUT PCLS *BaseClass OPTIONAL, + OUT PCLS **Link OPTIONAL) { RTL_ATOM Atom = (RTL_ATOM)0; @@ -1160,7 +1231,7 @@ &pi->pclsPrivateList, Link); if (Class != NULL) - { TRACE("Step 1: 0x%x\n",Class ); + { TRACE("Step 1: 0x%p\n",Class ); goto FoundClass; } @@ -1171,7 +1242,7 @@ &pi->pclsPublicList, Link); if (Class != NULL) - { TRACE("Step 2: 0x%x 0x%x\n",Class, Class->hModule); + { TRACE("Step 2: 0x%p 0x%p\n",Class, Class->hModule); goto FoundClass; } @@ -1181,7 +1252,7 @@ &pi->pclsPrivateList, Link); if (Class != NULL) - { TRACE("Step 3: 0x%x\n",Class ); + { TRACE("Step 3: 0x%p\n",Class ); goto FoundClass; } @@ -1194,7 +1265,7 @@ { EngSetLastError(ERROR_CLASS_DOES_NOT_EXIST); return (RTL_ATOM)0; - }else{TRACE("Step 4: 0x%x\n",Class );} + }else{TRACE("Step 4: 0x%p\n",Class );} FoundClass: *BaseClass = Class; @@ -1219,7 +1290,7 @@ /* Check the class. */ - TRACE("Finding Class %wZ for hInstance 0x%x\n", ClassName, hInstance); + TRACE("Finding Class %wZ for hInstance 0x%p\n", ClassName, hInstance); ClassAtom = IntGetClassAtom(ClassName, hInstance, @@ -1231,7 +1302,7 @@ { if (IS_ATOM(ClassName->Buffer)) { - ERR("Class 0x%p not found\n", (DWORD_PTR) ClassName->Buffer); + ERR("Class 0x%p not found\n", ClassName->Buffer); } else { @@ -1242,7 +1313,7 @@ return NULL; } - TRACE("Referencing Class 0x%x with atom 0x%x\n", Class, ClassAtom); + TRACE("Referencing Class 0x%p with atom 0x%x\n", Class, ClassAtom); Class = IntReferenceClass(Class, ClassLink, pti->rpdesk); @@ -1287,7 +1358,7 @@ if (Class != NULL && !Class->Global) { // Local class already exists - TRACE("Local Class 0x%p does already exist!\n", ClassAtom); + TRACE("Local Class 0x%x does already exist!\n", ClassAtom); EngSetLastError(ERROR_CLASS_ALREADY_EXISTS); return (RTL_ATOM)0; } @@ -1301,7 +1372,7 @@ if (Class != NULL && Class->Global) { - TRACE("Global Class 0x%p does already exist!\n", ClassAtom); + TRACE("Global Class 0x%x does already exist!\n", ClassAtom); EngSetLastError(ERROR_CLASS_ALREADY_EXISTS); return (RTL_ATOM)0; } @@ -1352,7 +1423,7 @@ pi = GetW32ProcessInfo(); - TRACE("UserUnregisterClass(%wZ, 0x%x)\n", ClassName, hInstance); + TRACE("UserUnregisterClass(%wZ, 0x%p)\n", ClassName, hInstance); /* NOTE: Accessing the buffer in ClassName may raise an exception! */ ClassAtom = IntGetClassAtom(ClassName, @@ -1371,7 +1442,7 @@ if (Class->cWndReferenceCount != 0 || Class->pclsClone != NULL) { - TRACE("UserUnregisterClass: Class has a Window. Ct %d : Clone 0x%x\n", Class->cWndReferenceCount, Class->pclsClone); + TRACE("UserUnregisterClass: Class has a Window. Ct %u : Clone 0x%p\n", Class->cWndReferenceCount, Class->pclsClone); EngSetLastError(ERROR_CLASS_HAS_WINDOWS); return FALSE; } @@ -1384,7 +1455,7 @@ if (NT_SUCCESS(IntDeregisterClassAtom(Class->atomClassName))) { - TRACE("Class 0x%x\n", Class); + TRACE("Class 0x%p\n", Class); TRACE("UserUnregisterClass: Good Exit!\n"); /* Finally free the resources */ IntDestroyClass(Class); @@ -2184,196 +2255,135 @@ return(0); } -BOOL APIENTRY -NtUserUnregisterClass(IN PUNICODE_STRING ClassNameOrAtom, - IN HINSTANCE hInstance, - OUT PCLSMENUNAME pClassMenuName) -{ - UNICODE_STRING CapturedClassName; - BOOL Ret = FALSE; +BOOL +APIENTRY +NtUserUnregisterClass( + IN PUNICODE_STRING ClassNameOrAtom, + IN HINSTANCE hInstance, + OUT PCLSMENUNAME pClassMenuName) +{ + UNICODE_STRING SafeClassName; + NTSTATUS Status; + BOOL Ret; + + Status = CaptureUnicodeStringOrAtom(&SafeClassName, ClassNameOrAtom); + if (!NT_SUCCESS(Status)) + { + ERR("Error capturing the class name\n"); + SetLastNtError(Status); + return FALSE; + } UserEnterExclusive(); - _SEH2_TRY - { - /* Probe the paramters */ - CapturedClassName = ProbeForReadUnicodeString(ClassNameOrAtom); - if (CapturedClassName.Length & 1) - { - goto InvalidParameter; - } - - if (CapturedClassName.Length != 0) - { - ProbeForRead(CapturedClassName.Buffer, - CapturedClassName.Length, - sizeof(WCHAR)); - } - else - { - if (!IS_ATOM(CapturedClassName.Buffer)) - { -InvalidParameter: - EngSetLastError(ERROR_INVALID_PARAMETER); - _SEH2_LEAVE; - } - } - - /* Unregister the class */ - Ret = UserUnregisterClass(&CapturedClassName, - hInstance, - NULL); // Null for now~ - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - SetLastNtError(_SEH2_GetExceptionCode()); - } - _SEH2_END; + /* Unregister the class */ + Ret = UserUnregisterClass(&SafeClassName, hInstance, NULL); // Null for now~ UserLeave(); + + if (SafeClassName.Buffer && !IS_ATOM(SafeClassName.Buffer)) + ExFreePoolWithTag(SafeClassName.Buffer, TAG_STRING); + return Ret; } + /* NOTE: For system classes hInstance is not NULL here, but User32Instance */ -BOOL APIENTRY +BOOL +APIENTRY NtUserGetClassInfo( HINSTANCE hInstance, PUNICODE_STRING ClassName, LPWNDCLASSEXW lpWndClassEx, LPWSTR *ppszMenuName, - BOOL Ansi) -{ - UNICODE_STRING CapturedClassName, SafeClassName; - WNDCLASSEXW Safewcexw; - PCLS Class; - RTL_ATOM ClassAtom = 0; - PPROCESSINFO ppi; - BOOL Ret = TRUE; - - /* NOTE: Need exclusive lock because getting the wndproc might require the - creation of a call procedure handle */ - UserEnterExclusive(); - - ppi = GetW32ProcessInfo(); - - if ( !(ppi->W32PF_flags & W32PF_CLASSESREGISTERED )) - { - UserRegisterSystemClasses(); - } - - _SEH2_TRY - { - /* Probe the paramters */ - CapturedClassName = ProbeForReadUnicodeString(ClassName); - - if (CapturedClassName.Length == 0) - { - TRACE("hInst %p atom %04X lpWndClassEx %p Ansi %d\n", hInstance, CapturedClassName.Buffer, lpWndClassEx, Ansi); - } - else - { - TRACE("hInst %p class %wZ lpWndClassEx %p Ansi %d\n", hInstance, &CapturedClassName, lpWndClassEx, Ansi); - } - - if (CapturedClassName.Length & 1) - { - EngSetLastError(ERROR_INVALID_PARAMETER); - Ret = FALSE; - _SEH2_LEAVE; - } - - if (CapturedClassName.Length != 0) - { - ProbeForRead( CapturedClassName.Buffer, - CapturedClassName.Length, - sizeof(WCHAR)); - - RtlInitUnicodeString( &SafeClassName, CapturedClassName.Buffer); - - SafeClassName.Buffer = ExAllocatePoolWithTag( PagedPool, - SafeClassName.MaximumLength, - TAG_STRING); - RtlCopyMemory( SafeClassName.Buffer, - CapturedClassName.Buffer, - SafeClassName.MaximumLength); - } - else - { - if (!IS_ATOM(CapturedClassName.Buffer)) - { - ERR("NtUserGetClassInfo() got ClassName instead of Atom!\n"); - EngSetLastError(ERROR_INVALID_PARAMETER); + BOOL bAnsi) +{ + UNICODE_STRING SafeClassName; + WNDCLASSEXW Safewcexw; + PCLS Class; + RTL_ATOM ClassAtom = 0; + PPROCESSINFO ppi; + BOOL Ret = TRUE; + NTSTATUS Status; + + _SEH2_TRY + { + ProbeForWrite( lpWndClassEx, sizeof(WNDCLASSEXW), sizeof(ULONG)); + RtlCopyMemory( &Safewcexw, lpWndClassEx, sizeof(WNDCLASSEXW)); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + SetLastNtError(_SEH2_GetExceptionCode()); + _SEH2_YIELD(return FALSE); + } + _SEH2_END; + + Status = CaptureUnicodeStringOrAtom(&SafeClassName, ClassName); + if (!NT_SUCCESS(Status)) + { + ERR("Error capturing the class name\n"); + SetLastNtError(Status); + return FALSE; + } + + // If null instance use client. + if (!hInstance) hInstance = hModClient; + + TRACE("GetClassInfo(%wZ, 0x%x)\n", SafeClassName, hInstance); + + /* NOTE: Need exclusive lock because getting the wndproc might require the + creation of a call procedure handle */ + UserEnterExclusive(); + + ppi = GetW32ProcessInfo(); + if (!(ppi->W32PF_flags & W32PF_CLASSESREGISTERED)) + { + UserRegisterSystemClasses(); + } + + ClassAtom = IntGetClassAtom(&SafeClassName, + hInstance, + ppi, + &Class, + NULL); + if (ClassAtom != (RTL_ATOM)0) + { + Ret = UserGetClassInfo(Class, &Safewcexw, bAnsi, hInstance); + } + else + { + EngSetLastError(ERROR_CLASS_DOES_NOT_EXIST); + Ret = FALSE; + } + + UserLeave(); + + if (Ret) + { + _SEH2_TRY + { + /* Emulate Function. */ + if (ppszMenuName) *ppszMenuName = (LPWSTR)Safewcexw.lpszMenuName; + + RtlCopyMemory(lpWndClassEx, &Safewcexw, sizeof(WNDCLASSEXW)); + + // From Wine: + /* We must return the atom of the class here instead of just TRUE. */ + /* Undocumented behavior! Return the class atom as a BOOL! */ + Ret = (BOOL)ClassAtom; + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + EngSetLastError(ERROR_CLASS_DOES_NOT_EXIST); Ret = FALSE; - _SEH2_LEAVE; - } - - SafeClassName.Buffer = CapturedClassName.Buffer; - SafeClassName.Length = 0; - SafeClassName.MaximumLength = 0; - } - - ProbeForWrite( lpWndClassEx, sizeof(WNDCLASSEXW), sizeof(ULONG)); - - RtlCopyMemory( &Safewcexw, lpWndClassEx, sizeof(WNDCLASSEXW)); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - SetLastNtError(_SEH2_GetExceptionCode()); - Ret = FALSE; - } - _SEH2_END; - - // If null instance use client. - if (!hInstance) hInstance = hModClient; - - if (Ret) - { - TRACE("GetClassInfo(%wZ, 0x%x)\n", SafeClassName, hInstance); - ClassAtom = IntGetClassAtom( &SafeClassName, - hInstance, - ppi, - &Class, - NULL); - if (ClassAtom != (RTL_ATOM)0) - { - if (hInstance == NULL) hInstance = hModClient; - - Ret = UserGetClassInfo( Class, - &Safewcexw, - Ansi, - hInstance); - } - else - { - EngSetLastError(ERROR_CLASS_DOES_NOT_EXIST); - Ret = FALSE; - } - } - _SEH2_TRY - { - if (Ret) - { - /* Emulate Function. */ - if (ppszMenuName) *ppszMenuName = (LPWSTR)Safewcexw.lpszMenuName; - - RtlCopyMemory(lpWndClassEx, &Safewcexw, sizeof(WNDCLASSEXW)); - - // From Wine: - /* We must return the atom of the class here instead of just TRUE. */ - /* Undocumented behavior! Return the class atom as a BOOL! */ - Ret = (BOOL)ClassAtom; - } - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - EngSetLastError(ERROR_CLASS_DOES_NOT_EXIST); - Ret = FALSE; - } - _SEH2_END; - - if (SafeClassName.Length) ExFreePoolWithTag(SafeClassName.Buffer, TAG_STRING); - UserLeave(); - return Ret; + } + _SEH2_END; + } + + if (!IS_ATOM(SafeClassName.Buffer)) + ExFreePoolWithTag(SafeClassName.Buffer, TAG_STRING); + + return Ret; } @@ -2430,78 +2440,49 @@ } /* Return Pointer to Class structure. */ -PCLS APIENTRY -NtUserGetWOWClass(HINSTANCE hInstance, - PUNICODE_STRING ClassName) -{ - UNICODE_STRING SafeClassName; - PPROCESSINFO pi; - PCLS Class = NULL; - RTL_ATOM ClassAtom = 0; - BOOL Hit = FALSE; - - UserEnterExclusive(); - - pi = GetW32ProcessInfo(); - - _SEH2_TRY - { - if (ClassName->Length != 0) - { - ProbeForRead( ClassName->Buffer, - ClassName->Length, - sizeof(WCHAR)); - - RtlInitUnicodeString( &SafeClassName, ClassName->Buffer); - - SafeClassName.Buffer = ExAllocatePoolWithTag( PagedPool, - SafeClassName.MaximumLength, - TAG_STRING); - RtlCopyMemory( SafeClassName.Buffer, - ClassName->Buffer, - SafeClassName.MaximumLength); - } - else - { - if (!IS_ATOM(ClassName->Buffer)) - { - ERR("NtUserGetWOWClass() got ClassName instead of Atom!\n"); - Hit = TRUE; - } - else - { - SafeClassName.Buffer = ClassName->Buffer; - SafeClassName.Length = 0; - SafeClassName.MaximumLength = 0; - } - } - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - EngSetLastError(ERROR_CLASS_DOES_NOT_EXIST); - Hit = TRUE; - } - _SEH2_END; - - if (!Hit) - { - ClassAtom = IntGetClassAtom( &SafeClassName, - hInstance, - pi, - &Class, - NULL); - if (!ClassAtom) - { +PCLS +APIENTRY +NtUserGetWOWClass( + HINSTANCE hInstance, + PUNICODE_STRING ClassName) +{ + UNICODE_STRING SafeClassName; + PPROCESSINFO pi; + PCLS Class = NULL; + RTL_ATOM ClassAtom = 0; + NTSTATUS Status; + + Status = CaptureUnicodeStringOrAtom(&SafeClassName, ClassName); + if (!NT_SUCCESS(Status)) + { + ERR("Error capturing the class name\n"); + SetLastNtError(Status); + return FALSE; + } + + UserEnterExclusive(); + + pi = GetW32ProcessInfo(); + + ClassAtom = IntGetClassAtom(&SafeClassName, + hInstance, + pi, + &Class, + NULL); + if (!ClassAtom) + { EngSetLastError(ERROR_CLASS_DOES_NOT_EXIST); - } - } - - if (SafeClassName.Length) ExFreePoolWithTag(SafeClassName.Buffer, TAG_STRING); - UserLeave(); + } + + + if (SafeClassName.Buffer && !IS_ATOM(SafeClassName.Buffer)) + ExFreePoolWithTag(SafeClassName.Buffer, TAG_STRING); + + UserLeave(); // // Don't forget to use DesktopPtrToUser( ? ) with return pointer in user space. // - return Class; + return Class; } /* EOF */ Modified: trunk/reactos/win32ss/user/ntuser/class.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/class.…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/class.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/class.h [iso-8859-1] Wed Aug 1 23:52:43 2012 @@ -48,8 +48,10 @@ IN PCALLPROCDATA CallProc); BOOL -IntGetAtomFromStringOrAtom(IN PUNICODE_STRING ClassName, - OUT RTL_ATOM *Atom); +NTAPI +IntGetAtomFromStringOrAtom( + _In_ PUNICODE_STRING ClassName, + _Out_ RTL_ATOM *Atom); BOOL IntCheckProcessDesktopClasses(IN PDESKTOP Desktop,
12 years, 4 months
1
0
0
0
[akhaldi] 57022: [MSIEXEC] * Welcome to MSVC build.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Aug 1 23:51:06 2012 New Revision: 57022 URL:
http://svn.reactos.org/svn/reactos?rev=57022&view=rev
Log: [MSIEXEC] * Welcome to MSVC build. Modified: trunk/reactos/base/system/CMakeLists.txt trunk/reactos/base/system/msiexec/CMakeLists.txt Modified: trunk/reactos/base/system/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/CMakeLists.txt…
============================================================================== --- trunk/reactos/base/system/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/base/system/CMakeLists.txt [iso-8859-1] Wed Aug 1 23:51:06 2012 @@ -5,9 +5,7 @@ add_subdirectory(expand) add_subdirectory(format) add_subdirectory(lsass) -if(NOT MSVC) - add_subdirectory(msiexec) # FIXME: msvc build. -endif() +add_subdirectory(msiexec) add_subdirectory(regsvr32) add_subdirectory(rundll32) add_subdirectory(runonce) Modified: trunk/reactos/base/system/msiexec/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/msiexec/CMakeL…
============================================================================== --- trunk/reactos/base/system/msiexec/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/base/system/msiexec/CMakeLists.txt [iso-8859-1] Wed Aug 1 23:51:06 2012 @@ -2,8 +2,6 @@ add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/wine) - -set_rc_compiler() add_executable(msiexec msiexec.c
12 years, 4 months
1
0
0
0
[akhaldi] 57021: [MSI] * Welcome to the MSVC build.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Aug 1 23:47:14 2012 New Revision: 57021 URL:
http://svn.reactos.org/svn/reactos?rev=57021&view=rev
Log: [MSI] * Welcome to the MSVC build. Modified: trunk/reactos/dll/win32/msi/CMakeLists.txt Modified: trunk/reactos/dll/win32/msi/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/CMakeLists.t…
============================================================================== --- trunk/reactos/dll/win32/msi/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/CMakeLists.txt [iso-8859-1] Wed Aug 1 23:47:14 2012 @@ -1,5 +1,3 @@ - -if(NOT MSVC) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) add_definitions(-D__WINESRC__ -DMSIRUNMODE=MSIRUNMODE_T) @@ -95,5 +93,3 @@ add_pch(msi msipriv.h) add_cd_file(TARGET msi DESTINATION reactos/system32 FOR all) - -endif(NOT MSVC)
12 years, 4 months
1
0
0
0
[akhaldi] 57020: * Addendum to r57019.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Aug 1 23:26:54 2012 New Revision: 57020 URL:
http://svn.reactos.org/svn/reactos?rev=57020&view=rev
Log: * Addendum to r57019. Modified: trunk/rostests/winetests/comctl32/CMakeLists.txt trunk/rostests/winetests/inetcomm/CMakeLists.txt trunk/rostests/winetests/itss/CMakeLists.txt trunk/rostests/winetests/jscript/CMakeLists.txt trunk/rostests/winetests/msctf/CMakeLists.txt trunk/rostests/winetests/mstask/CMakeLists.txt trunk/rostests/winetests/qmgr/CMakeLists.txt trunk/rostests/winetests/rpcrt4/CMakeLists.txt Modified: trunk/rostests/winetests/comctl32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/CMakeL…
============================================================================== --- trunk/rostests/winetests/comctl32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/winetests/comctl32/CMakeLists.txt [iso-8859-1] Wed Aug 1 23:26:54 2012 @@ -33,9 +33,7 @@ target_link_libraries(comctl32_winetest wine) -if(MSVC) - target_link_libraries(comctl32_winetest uuid) -else() +if(NOT MSVC) # FIXME:
http://www.cmake.org/Bug/view.php?id=12998
#add_target_compile_flags(comctl32_winetest "-Wno-format") set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-format") Modified: trunk/rostests/winetests/inetcomm/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/inetcomm/CMakeL…
============================================================================== --- trunk/rostests/winetests/inetcomm/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/winetests/inetcomm/CMakeLists.txt [iso-8859-1] Wed Aug 1 23:26:54 2012 @@ -8,11 +8,6 @@ add_executable(inetcomm_winetest ${SOURCE}) target_link_libraries(inetcomm_winetest wine) - -if(MSVC) - target_link_libraries(inetcomm_winetest uuid) -endif() - set_module_type(inetcomm_winetest win32cui) add_importlibs(inetcomm_winetest inetcomm oleaut32 ole32 msvcrt kernel32 ntdll) add_cd_file(TARGET inetcomm_winetest DESTINATION reactos/bin FOR all) Modified: trunk/rostests/winetests/itss/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/itss/CMakeLists…
============================================================================== --- trunk/rostests/winetests/itss/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/winetests/itss/CMakeLists.txt [iso-8859-1] Wed Aug 1 23:26:54 2012 @@ -1,15 +1,7 @@ add_definitions(-D__ROS_LONG64__) - -set_rc_compiler() - add_executable(itss_winetest protocol.c testlist.c rsrc.rc) target_link_libraries(itss_winetest wine) - -if(MSVC) - target_link_libraries(itss_winetest uuid) -endif() - set_module_type(itss_winetest win32cui) add_importlibs(itss_winetest ole32 msvcrt kernel32 ntdll) add_cd_file(TARGET itss_winetest DESTINATION reactos/bin FOR all) Modified: trunk/rostests/winetests/jscript/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/jscript/CMakeLi…
============================================================================== --- trunk/rostests/winetests/jscript/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/winetests/jscript/CMakeLists.txt [iso-8859-1] Wed Aug 1 23:26:54 2012 @@ -1,8 +1,5 @@ add_definitions(-D__ROS_LONG64__) - -set_rc_compiler() - list(APPEND SOURCE activex.c jscript.c @@ -12,11 +9,6 @@ add_executable(jscript_winetest ${SOURCE}) target_link_libraries(jscript_winetest wine) - -if(MSVC) - target_link_libraries(jscript_winetest uuid) -endif() - set_module_type(jscript_winetest win32cui) add_importlibs(jscript_winetest ole32 oleaut32 advapi32 msvcrt kernel32 ntdll) add_cd_file(TARGET jscript_winetest DESTINATION reactos/bin FOR all) Modified: trunk/rostests/winetests/msctf/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msctf/CMakeList…
============================================================================== --- trunk/rostests/winetests/msctf/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/winetests/msctf/CMakeLists.txt [iso-8859-1] Wed Aug 1 23:26:54 2012 @@ -1,13 +1,7 @@ add_definitions(-D__ROS_LONG64__) - add_executable(msctf_winetest inputprocessor.c testlist.c) target_link_libraries(msctf_winetest wine) - -if(MSVC) - target_link_libraries(msctf_winetest uuid) -endif() - set_module_type(msctf_winetest win32cui) add_importlibs(msctf_winetest ole32 user32 msvcrt kernel32 ntdll) add_cd_file(TARGET msctf_winetest DESTINATION reactos/bin FOR all) Modified: trunk/rostests/winetests/mstask/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mstask/CMakeLis…
============================================================================== --- trunk/rostests/winetests/mstask/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/winetests/mstask/CMakeLists.txt [iso-8859-1] Wed Aug 1 23:26:54 2012 @@ -9,11 +9,6 @@ add_executable(mstask_winetest ${SOURCE}) target_link_libraries(mstask_winetest wine) - -if(MSVC) - target_link_libraries(mstask_winetest uuid) -endif() - set_module_type(mstask_winetest win32cui) add_importlibs(mstask_winetest ole32 msvcrt kernel32 ntdll) add_cd_file(TARGET mstask_winetest DESTINATION reactos/bin FOR all) Modified: trunk/rostests/winetests/qmgr/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/qmgr/CMakeLists…
============================================================================== --- trunk/rostests/winetests/qmgr/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/winetests/qmgr/CMakeLists.txt [iso-8859-1] Wed Aug 1 23:26:54 2012 @@ -11,11 +11,6 @@ add_executable(qmgr_winetest ${SOURCE}) target_link_libraries(qmgr_winetest wine) - -if(MSVC) - target_link_libraries(qmgr_winetest uuid) -endif() - set_module_type(qmgr_winetest win32cui) add_importlibs(qmgr_winetest ole32 shlwapi user32 msvcrt kernel32 ntdll) add_cd_file(TARGET qmgr_winetest DESTINATION reactos/bin FOR all) Modified: trunk/rostests/winetests/rpcrt4/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/rpcrt4/CMakeLis…
============================================================================== --- trunk/rostests/winetests/rpcrt4/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/winetests/rpcrt4/CMakeLists.txt [iso-8859-1] Wed Aug 1 23:26:54 2012 @@ -5,11 +5,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) -if(MSVC) - set(IDL_FLAGS ${IDL_FLAGS} /prefix server s_ /app_config) -else() - set(IDL_FLAGS ${IDL_FLAGS} --prefix-server=s_) -endif() +set(IDL_FLAGS ${IDL_FLAGS} --prefix-server=s_) add_rpc_files(client server.idl) add_rpc_files(server server.idl)
12 years, 4 months
1
0
0
0
[akhaldi] 57019: [WIDL] * Set the attribute before the variable in write_func_param_struct(). Should be sent upstream. * Initialize in an MSVC compatible way. Should be sent upstream. [REACTOS/IDLS...
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Aug 1 23:25:06 2012 New Revision: 57019 URL:
http://svn.reactos.org/svn/reactos?rev=57019&view=rev
Log: [WIDL] * Set the attribute before the variable in write_func_param_struct(). Should be sent upstream. * Initialize in an MSVC compatible way. Should be sent upstream. [REACTOS/IDLS] * Use widl instead of midl in MSVC builds. Added: trunk/reactos/tools/widl/getopt.c (with props) Removed: trunk/reactos/dll/win32/msxml3/msvc_uuid.c trunk/reactos/dll/win32/sxs/msvchelper.h Modified: trunk/reactos/CMakeLists.txt trunk/reactos/dll/nls/idndl/CMakeLists.txt trunk/reactos/dll/win32/itss/CMakeLists.txt trunk/reactos/dll/win32/jscript/CMakeLists.txt trunk/reactos/dll/win32/mscoree/CMakeLists.txt trunk/reactos/dll/win32/msxml3/CMakeLists.txt trunk/reactos/dll/win32/ole32/compobj.c trunk/reactos/dll/win32/sxs/CMakeLists.txt trunk/reactos/include/psdk/hlguids.h trunk/reactos/include/reactos/wine/port.h trunk/reactos/tools/CMakeLists.txt trunk/reactos/tools/widl/CMakeLists.txt trunk/reactos/tools/widl/proxy.c trunk/reactos/tools/widl/typegen.c trunk/reactos/tools/wpp/CMakeLists.txt Modified: trunk/reactos/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/CMakeLists.txt?rev=57019&r…
============================================================================== --- trunk/reactos/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/CMakeLists.txt [iso-8859-1] Wed Aug 1 23:25:06 2012 @@ -66,7 +66,7 @@ if(NOT MSVC) export(TARGETS widl gendib cabman cdmake mkhive obj2bin spec2def geninc rsym mkshelllink FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- ) else() - export(TARGETS gendib cabman cdmake mkhive obj2bin spec2def geninc mkshelllink FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- ) + export(TARGETS widl gendib cabman cdmake mkhive obj2bin spec2def geninc mkshelllink FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- ) endif() else() @@ -169,11 +169,8 @@ include(cmake/CMakeMacros.cmake) # IDL macros for widl/midl - if (MSVC) - include(cmake/midl-support.cmake) - else() - include(cmake/widl-support.cmake) - endif() + # We're using widl now for both MSVC and GCC builds + include(cmake/widl-support.cmake) if(MSVC AND USE_WDK_HEADERS) include_directories( Modified: trunk/reactos/dll/nls/idndl/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/nls/idndl/CMakeLists.t…
============================================================================== --- trunk/reactos/dll/nls/idndl/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/nls/idndl/CMakeLists.txt [iso-8859-1] Wed Aug 1 23:25:06 2012 @@ -12,7 +12,7 @@ if(NOT MSVC) add_target_compile_flags(idndl "-fno-exceptions -fno-rtti") -endif(NOT MSVC) +endif() add_importlibs(idndl kernel32) Modified: trunk/reactos/dll/win32/itss/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/itss/CMakeLists.…
============================================================================== --- trunk/reactos/dll/win32/itss/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/itss/CMakeLists.txt [iso-8859-1] Wed Aug 1 23:25:06 2012 @@ -1,8 +1,6 @@ add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) - -set_rc_compiler() spec2def(itss.dll itss.spec) @@ -23,9 +21,8 @@ set_module_type(itss win32dll) target_link_libraries(itss uuid wine) -if(MSVC) - target_link_libraries(itss itss_guid) -else() + +if(NOT MSVC) # FIXME:
http://www.cmake.org/Bug/view.php?id=12998
#allow_warnings(itss) set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error") Modified: trunk/reactos/dll/win32/jscript/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/jscript/CMakeLis…
============================================================================== --- trunk/reactos/dll/win32/jscript/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/jscript/CMakeLists.txt [iso-8859-1] Wed Aug 1 23:25:06 2012 @@ -9,8 +9,6 @@ -D_USE_MATH_DEFINES) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) - -set_rc_compiler() spec2def(jscript.dll jscript.spec) @@ -38,26 +36,11 @@ ${CMAKE_CURRENT_BINARY_DIR}/jscript.def) add_library(jscript SHARED ${SOURCE}) - set_module_type(jscript win32dll) - target_link_libraries(jscript wine) -if(MSVC) - target_link_libraries(jscript uuid) -endif() - -add_importlibs(jscript - msvcrt - user32 - ole32 - oleaut32 - advapi32 - kernel32 - ntdll) - +add_importlibs(jscript user32 ole32 oleaut32 advapi32 msvcrt kernel32 ntdll) add_pch(jscript jscript.h) # jsglobal.tlb needs stdole2.tlb add_dependencies(jscript stdole2) add_cd_file(TARGET jscript DESTINATION reactos/system32 FOR all) - set_source_files_properties(rsrc.rc PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/jsglobal.tlb) Modified: trunk/reactos/dll/win32/mscoree/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mscoree/CMakeLis…
============================================================================== --- trunk/reactos/dll/win32/mscoree/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mscoree/CMakeLists.txt [iso-8859-1] Wed Aug 1 23:25:06 2012 @@ -20,13 +20,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/mscoree.def) add_library(mscoree SHARED ${SOURCE}) - set_module_type(mscoree win32dll) target_link_libraries(mscoree wine uuid) - -if(MSVC) - target_link_libraries(mscoree xml_uuids) -endif() - add_importlibs(mscoree dbghelp advapi32 shell32 ole32 shlwapi msvcrt kernel32 ntdll) add_cd_file(TARGET mscoree DESTINATION reactos/system32 FOR all) Modified: trunk/reactos/dll/win32/msxml3/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/CMakeList…
============================================================================== --- trunk/reactos/dll/win32/msxml3/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/CMakeLists.txt [iso-8859-1] Wed Aug 1 23:25:06 2012 @@ -9,11 +9,9 @@ if(MSVC) add_compile_flags("/FIwine/typeof.h /FImsvc.h") -endif(MSVC) +endif() include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) - -set_rc_compiler() spec2def(msxml3.dll msxml3.spec) @@ -50,43 +48,12 @@ ${CMAKE_CURRENT_BINARY_DIR}/msxml3_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/msxml3.def) -if(MSVC) - list(APPEND SOURCE msvc_uuid.c) -endif() +add_library(msxml3 SHARED ${SOURCE}) +set_module_type(msxml3 win32dll) +set_source_files_properties(version.rc PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/msxml3_v1.tlb) +target_link_libraries(msxml3 libxml2 uuid wine wineldr) -add_library(msxml3 SHARED ${SOURCE}) - -set_module_type(msxml3 win32dll) - -set_source_files_properties(version.rc PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/msxml3_v1.tlb) - -target_link_libraries(msxml3 - libxml2 - uuid - wine - wineldr) - -if(MSVC) - target_link_libraries(msxml3 xml_uuids) -endif() - -add_importlibs(msxml3 - msvcrt - urlmon - wininet - ws2_32 - comctl32 - shell32 - shlwapi - cabinet - oleaut32 - ole32 - version - user32 - gdi32 - advapi32 - kernel32 - ntdll) +add_importlibs(msxml3 urlmon wininet ws2_32 comctl32 shell32 shlwapi cabinet oleaut32 ole32 version user32 gdi32 advapi32 msvcrt kernel32 ntdll) # msxml3_v1.tlb needs stdole2.tlb add_dependencies(msxml3 stdole2) Removed: trunk/reactos/dll/win32/msxml3/msvc_uuid.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/msvc_uuid…
============================================================================== --- trunk/reactos/dll/win32/msxml3/msvc_uuid.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/msvc_uuid.c (removed) @@ -1,7 +1,0 @@ - -#define INITGUID -#include <guiddef.h> - -// This is actually CLSID_DOMDocument, but on gcc builds its defined to be like this -DEFINE_GUID(CLSID_DOMDocument2, 0x2933bf90, 0x7b36, 0x11d2, 0xb2,0x0e, 0x00,0xc0,0x4f,0x98,0x3e,0x60); - Modified: trunk/reactos/dll/win32/ole32/compobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/compobj.c?…
============================================================================== --- trunk/reactos/dll/win32/ole32/compobj.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/compobj.c [iso-8859-1] Wed Aug 1 23:25:06 2012 @@ -69,10 +69,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole); #define ARRAYSIZE(array) (sizeof(array)/sizeof((array)[0])) - -#ifdef _MSC_VER -DEFINE_GUID(CLSID_PSFactoryBuffer, 0x00000320, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46); -#endif /**************************************************************************** * This section defines variables internal to the COM module. Modified: trunk/reactos/dll/win32/sxs/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/sxs/CMakeLists.t…
============================================================================== --- trunk/reactos/dll/win32/sxs/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/sxs/CMakeLists.txt [iso-8859-1] Wed Aug 1 23:25:06 2012 @@ -13,15 +13,7 @@ add_library(sxs SHARED ${SOURCE}) set_module_type(sxs win32dll ENTRYPOINT 0 ) - target_link_libraries(sxs wine) - -if(MSVC) - set_source_files_properties(cache.c PROPERTIES COMPILE_FLAGS /FImsvchelper.h) - target_link_libraries(sxs uuid) -endif() - add_importlibs(sxs oleaut32 ole32 kernel32 ntdll) add_dependencies(sxs psdk) - add_cd_file(TARGET sxs DESTINATION reactos/system32 FOR all) Removed: trunk/reactos/dll/win32/sxs/msvchelper.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/sxs/msvchelper.h…
============================================================================== --- trunk/reactos/dll/win32/sxs/msvchelper.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/sxs/msvchelper.h (removed) @@ -1,2 +1,0 @@ -#include <guiddef.h> -const CLSID CLSID_DOMDocument2 = {0xf6d90f11, 0x9c73, 0x11d3, {0xb3, 0x2e, 0x00,0xc0, 0x4f, 0x99, 0x0b, 0xb4}}; Modified: trunk/reactos/include/psdk/hlguids.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/hlguids.h?rev…
============================================================================== --- trunk/reactos/include/psdk/hlguids.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/hlguids.h [iso-8859-1] Wed Aug 1 23:25:06 2012 @@ -27,9 +27,5 @@ 0x79eac9d1, 0xbaf9, 0x11ce, 0x8c, 0x82, 0x00, 0xaa,0x00,0x4b,0xa9,0x0b); DEFINE_GUID(CLSID_IID_IExtensionServices, 0x79eac9cb, 0xbaf9, 0x11ce, 0x8c, 0x82, 0x00, 0xaa,0x00,0x4b,0xa9,0x0b); -#ifndef __GNUC__ -DEFINE_GUID(IID_IBindStatusCallback, - 0x79eac9c1, 0xbaf9, 0x11ce, 0x8c, 0x82, 0x00, 0xaa,0x00,0x4b,0xa9,0x0b); -#endif #endif Modified: trunk/reactos/include/reactos/wine/port.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/port.…
============================================================================== --- trunk/reactos/include/reactos/wine/port.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/wine/port.h [iso-8859-1] Wed Aug 1 23:25:06 2012 @@ -153,7 +153,9 @@ /* Constructor functions */ -#ifdef __GNUC__ +#ifdef _MSC_VER +# define DECL_GLOBAL_CONSTRUCTOR(func) /* nothing */ +#elif defined(__GNUC__) # define DECL_GLOBAL_CONSTRUCTOR(func) \ static void func(void) __attribute__((constructor)); \ static void func(void) Modified: trunk/reactos/tools/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/CMakeLists.txt?rev=5…
============================================================================== --- trunk/reactos/tools/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/tools/CMakeLists.txt [iso-8859-1] Wed Aug 1 23:25:06 2012 @@ -14,9 +14,8 @@ add_subdirectory(spec2def) add_subdirectory(unicode) add_subdirectory(mkshelllink) - -if(NOT MSVC) -add_subdirectory(rsym) add_subdirectory(widl) add_subdirectory(wpp) +if(NOT MSVC) + add_subdirectory(rsym) endif() Modified: trunk/reactos/tools/widl/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/CMakeLists.txt?…
============================================================================== --- trunk/reactos/tools/widl/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/tools/widl/CMakeLists.txt [iso-8859-1] Wed Aug 1 23:25:06 2012 @@ -1,3 +1,8 @@ + +if(MSVC) + add_definitions(-Dsnprintf=_snprintf) + list(APPEND SOURCE getopt.c) +endif() list(APPEND SOURCE client.c Added: trunk/reactos/tools/widl/getopt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/getopt.c?rev=57…
============================================================================== --- trunk/reactos/tools/widl/getopt.c (added) +++ trunk/reactos/tools/widl/getopt.c [iso-8859-1] Wed Aug 1 23:25:06 2012 @@ -1,0 +1,436 @@ +/* + * Copyright (c) 1987, 1993, 1994, 1996 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include <assert.h> +#include <errno.h> +#include <stdlib.h> +#include <string.h> +#include <stdarg.h> +#include <stdio.h> + +extern int opterr; /* if error message should be printed */ +extern int optind; /* index into parent argv vector */ +extern int optopt; /* character checked for validity */ +extern int optreset; /* reset getopt */ +extern char *optarg; /* argument associated with option */ + +int getopt (int, char * const *, const char *); + +struct option { + const char *name; + int has_arg; + int *flag; + int val; +}; + +int getopt_long (int, char *const *, const char *, const struct option *, int *); + +#define no_argument 0 +#define required_argument 1 +#define optional_argument 2 + +#define REPLACE_GETOPT + +#define _DIAGASSERT(x) do {} while (0) + +#ifdef REPLACE_GETOPT +int opterr = 1; +int optind = 1; +int optopt = '?'; +int optreset; +char *optarg; +#endif + +#define __progname __argv[0] + +#define IGNORE_FIRST (*options == '-' || *options == '+') +#define PRINT_ERROR ((opterr) && ((*options != ':') || (IGNORE_FIRST && options[1] != ':'))) + +#ifndef IS_POSIXLY_CORRECT +#define IS_POSIXLY_CORRECT (getenv("POSIXLY_CORRECT") != NULL) +#endif + +#define PERMUTE (!IS_POSIXLY_CORRECT && !IGNORE_FIRST) + +#define IN_ORDER (!IS_POSIXLY_CORRECT && *options == '-') + +#define BADCH (int)'?' +#define BADARG ((IGNORE_FIRST && options[1] == ':') || (*options == ':') ? (int)':' : (int)'?') +#define INORDER (int)1 + +static char EMSG[1]; + +static int getopt_internal (int,char * const *,const char *); +static int gcd (int,int); +static void permute_args (int,int,int,char * const *); + +static char *place = EMSG; + +static int nonopt_start = -1; +static int nonopt_end = -1; + +static const char recargchar[] = "option requires an argument -- %c"; +static const char recargstring[] = "option requires an argument -- %s"; +static const char ambig[] = "ambiguous option -- %.*s"; +static const char noarg[] = "option doesn't take an argument -- %.*s"; +static const char illoptchar[] = "unknown option -- %c"; +static const char illoptstring[] = "unknown option -- %s"; + +static void +_vwarnx(const char *fmt,va_list ap) +{ + (void)fprintf(stderr,"%s: ",__progname); + if (fmt != NULL) + (void)vfprintf(stderr,fmt,ap); + (void)fprintf(stderr,"\n"); +} + +static void +warnx(const char *fmt,...) +{ + va_list ap; + va_start(ap,fmt); + _vwarnx(fmt,ap); + va_end(ap); +} + +static int +gcd(a,b) + int a; + int b; +{ + int c; + + c = a % b; + while (c != 0) { + a = b; + b = c; + c = a % b; + } + + return b; +} + +static void +permute_args(panonopt_start,panonopt_end,opt_end,nargv) + int panonopt_start; + int panonopt_end; + int opt_end; + char * const *nargv; +{ + int cstart,cyclelen,i,j,ncycle,nnonopts,nopts,pos; + char *swap; + + _DIAGASSERT(nargv != NULL); + + nnonopts = panonopt_end - panonopt_start; + nopts = opt_end - panonopt_end; + ncycle = gcd(nnonopts,nopts); + cyclelen = (opt_end - panonopt_start) / ncycle; + + for (i = 0; i < ncycle; i++) { + cstart = panonopt_end+i; + pos = cstart; + for (j = 0; j < cyclelen; j++) { + if (pos >= panonopt_end) + pos -= nnonopts; + else + pos += nopts; + swap = nargv[pos]; + + ((char **) nargv)[pos] = nargv[cstart]; + + ((char **)nargv)[cstart] = swap; + } + } +} + +static int +getopt_internal(nargc,nargv,options) + int nargc; + char * const *nargv; + const char *options; +{ + char *oli; + int optchar; + + _DIAGASSERT(nargv != NULL); + _DIAGASSERT(options != NULL); + + optarg = NULL; + + if (optind == 0) + optind = 1; + + if (optreset) + nonopt_start = nonopt_end = -1; +start: + if (optreset || !*place) { + optreset = 0; + if (optind >= nargc) { + place = EMSG; + if (nonopt_end != -1) { + + permute_args(nonopt_start,nonopt_end,optind,nargv); + optind -= nonopt_end - nonopt_start; + } + else if (nonopt_start != -1) { + + optind = nonopt_start; + } + nonopt_start = nonopt_end = -1; + return -1; + } + if ((*(place = nargv[optind]) != '-') + || (place[1] == '\0')) { + place = EMSG; + if (IN_ORDER) { + + optarg = nargv[optind++]; + return INORDER; + } + if (!PERMUTE) { + + return -1; + } + + if (nonopt_start == -1) + nonopt_start = optind; + else if (nonopt_end != -1) { + permute_args(nonopt_start,nonopt_end,optind,nargv); + nonopt_start = optind - + (nonopt_end - nonopt_start); + nonopt_end = -1; + } + optind++; + + goto start; + } + if (nonopt_start != -1 && nonopt_end == -1) + nonopt_end = optind; + if (place[1] && *++place == '-') { + place++; + return -2; + } + } + if ((optchar = (int)*place++) == (int)':' || + (oli = strchr(options + (IGNORE_FIRST ? 1 : 0),optchar)) == NULL) { + + if (!*place) + ++optind; + if (PRINT_ERROR) + warnx(illoptchar,optchar); + optopt = optchar; + return BADCH; + } + if (optchar == 'W' && oli[1] == ';') { + + if (*place) + return -2; + + if (++optind >= nargc) { + place = EMSG; + if (PRINT_ERROR) + warnx(recargchar,optchar); + optopt = optchar; + return BADARG; + } else + place = nargv[optind]; + + return -2; + } + if (*++oli != ':') { + if (!*place) + ++optind; + } else { + optarg = NULL; + if (*place) + optarg = place; + + else if (oli[1] != ':') { + if (++optind >= nargc) { + place = EMSG; + if (PRINT_ERROR) + warnx(recargchar,optchar); + optopt = optchar; + return BADARG; + } else + optarg = nargv[optind]; + } + place = EMSG; + ++optind; + } + + return optchar; +} + +#ifdef REPLACE_GETOPT + +int +getopt(nargc,nargv,options) + int nargc; + char * const *nargv; + const char *options; +{ + int retval; + + _DIAGASSERT(nargv != NULL); + _DIAGASSERT(options != NULL); + + if ((retval = getopt_internal(nargc,nargv,options)) == -2) { + ++optind; + + if (nonopt_end != -1) { + permute_args(nonopt_start,nonopt_end,optind,nargv); + optind -= nonopt_end - nonopt_start; + } + nonopt_start = nonopt_end = -1; + retval = -1; + } + return retval; +} +#endif + +int +getopt_long(nargc,nargv,options,long_options,idx) + int nargc; + char * const *nargv; + const char *options; + const struct option *long_options; + int *idx; +{ + int retval; + + _DIAGASSERT(nargv != NULL); + _DIAGASSERT(options != NULL); + _DIAGASSERT(long_options != NULL); + + if ((retval = getopt_internal(nargc,nargv,options)) == -2) { + char *current_argv,*has_equal; + size_t current_argv_len; + int i,match; + + current_argv = place; + match = -1; + + optind++; + place = EMSG; + + if (*current_argv == '\0') { + + if (nonopt_end != -1) { + permute_args(nonopt_start,nonopt_end,optind,nargv); + optind -= nonopt_end - nonopt_start; + } + nonopt_start = nonopt_end = -1; + return -1; + } + if ((has_equal = strchr(current_argv,'=')) != NULL) { + + current_argv_len = has_equal - current_argv; + has_equal++; + } else + current_argv_len = strlen(current_argv); + + for (i = 0; long_options[i].name; i++) { + + if (strncmp(current_argv,long_options[i].name,current_argv_len)) + continue; + + if (strlen(long_options[i].name) == + (unsigned)current_argv_len) { + + match = i; + break; + } + if (match == -1) + match = i; + else { + + if (PRINT_ERROR) + warnx(ambig,(int)current_argv_len,current_argv); + optopt = 0; + return BADCH; + } + } + if (match != -1) { + if (long_options[match].has_arg == no_argument + && has_equal) { + if (PRINT_ERROR) + warnx(noarg,(int)current_argv_len,current_argv); + + if (long_options[match].flag == NULL) + optopt = long_options[match].val; + else + optopt = 0; + return BADARG; + } + if (long_options[match].has_arg == required_argument || + long_options[match].has_arg == optional_argument) { + if (has_equal) + optarg = has_equal; + else if (long_options[match].has_arg == + required_argument) { + + optarg = nargv[optind++]; + } + } + if ((long_options[match].has_arg == required_argument) + && (optarg == NULL)) { + + if (PRINT_ERROR) + warnx(recargstring,current_argv); + + if (long_options[match].flag == NULL) + optopt = long_options[match].val; + else + optopt = 0; + --optind; + return BADARG; + } + } else { + if (PRINT_ERROR) + warnx(illoptstring,current_argv); + optopt = 0; + return BADCH; + } + if (long_options[match].flag) { + *long_options[match].flag = long_options[match].val; + retval = 0; + } else + retval = long_options[match].val; + if (idx) + *idx = match; + } + return retval; +} Propchange: trunk/reactos/tools/widl/getopt.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/tools/widl/proxy.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/proxy.c?rev=570…
============================================================================== --- trunk/reactos/tools/widl/proxy.c [iso-8859-1] (original) +++ trunk/reactos/tools/widl/proxy.c [iso-8859-1] Wed Aug 1 23:25:06 2012 @@ -485,14 +485,15 @@ return NULL; } -static void write_proxy_procformatstring_offsets( const type_t *iface, int skip ) +static int write_proxy_procformatstring_offsets( const type_t *iface, int skip ) { const statement_t *stmt; + int i = 0; if (type_iface_get_inherit(iface)) - write_proxy_procformatstring_offsets( type_iface_get_inherit(iface), need_delegation(iface)); + i = write_proxy_procformatstring_offsets( type_iface_get_inherit(iface), need_delegation(iface)); else - return; + return 0; STATEMENTS_FOR_EACH_FUNC( stmt, type_iface_get_stmts(iface) ) { @@ -512,7 +513,9 @@ print_proxy( "(unsigned short)-1, /* %s::%s */\n", iface->name, get_name(func)); else print_proxy( "%u, /* %s::%s */\n", func->procstring_offset, iface->name, get_name(func)); - } + i++; + } + return i; } static int write_proxy_methods(type_t *iface, int skip) @@ -645,7 +648,10 @@ print_proxy( "static const unsigned short %s_FormatStringOffsetTable[] =\n", iface->name ); print_proxy( "{\n" ); indent++; - write_proxy_procformatstring_offsets( iface, 0 ); + if (write_proxy_procformatstring_offsets( iface, 0 ) == 0) + { + print_proxy( "0\n" ); + } indent--; print_proxy( "};\n\n" ); @@ -719,7 +725,10 @@ print_proxy( "static const PRPC_STUB_FUNCTION %s_table[] =\n", iface->name); print_proxy( "{\n"); indent++; - write_stub_methods(iface, FALSE); + if (write_stub_methods(iface, FALSE) == 0) + { + fprintf(proxy, "0"); + } fprintf(proxy, "\n"); indent--; fprintf(proxy, "};\n\n"); Modified: trunk/reactos/tools/widl/typegen.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/typegen.c?rev=5…
============================================================================== --- trunk/reactos/tools/widl/typegen.c [iso-8859-1] (original) +++ trunk/reactos/tools/widl/typegen.c [iso-8859-1] Wed Aug 1 23:25:06 2012 @@ -4734,7 +4734,7 @@ if (align >= pointer_size) fprintf( file, "%s;\n", arg->name ); else - fprintf( file, "%s DECLSPEC_ALIGN(%u);\n", arg->name, pointer_size ); + fprintf( file, "DECLSPEC_ALIGN(%u) %s;\n", pointer_size, arg->name ); } if (add_retval && !is_void( rettype )) { Modified: trunk/reactos/tools/wpp/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/wpp/CMakeLists.txt?r…
============================================================================== --- trunk/reactos/tools/wpp/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/tools/wpp/CMakeLists.txt [iso-8859-1] Wed Aug 1 23:25:06 2012 @@ -1,3 +1,10 @@ + +if(MSVC) + add_definitions( + -Dsnprintf=_snprintf + -Dstrtoull=_strtoui64 + -Dstrtoll=_strtoi64) +endif() list(APPEND SOURCE lex.yy.c
12 years, 4 months
1
0
0
0
← Newer
1
...
16
17
18
19
20
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Results per page:
10
25
50
100
200