diff -Nru wine1.6-1.7.1-actually1.6/ANNOUNCE wine1.6-1.6.1/ANNOUNCE --- wine1.6-1.7.1-actually1.6/ANNOUNCE 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/ANNOUNCE 2013-11-15 19:30:24.000000000 +0000 @@ -1,19 +1,13 @@ -The Wine team is proud to announce that the stable release Wine 1.6 -is now available. +The Wine maintenance release 1.6.1 is now available. -This release represents 16 months of development effort and around -10,000 individual changes. The main highlights are the new Mac driver, -the full support for window transparency, and the new Mono package for -.NET applications support. - -It also contains a lot of improvements across the board, as well as -support for many new applications and games. See the release notes -below for a summary of the major changes. +What's new in this release (see below for details): + - Translation updates. + - Various bug fixes. The source is available from the following locations: - http://prdownloads.sourceforge.net/wine/wine-1.6.tar.bz2 - http://mirrors.ibiblio.org/wine/source/1.6/wine-1.6.tar.bz2 + http://prdownloads.sourceforge.net/wine/wine-1.6.1.tar.bz2 + http://mirrors.ibiblio.org/wine/source/1.6/wine-1.6.1.tar.bz2 Binary packages for various distributions will be available from: @@ -29,419 +23,381 @@ ---------------------------------------------------------------- -What's new in Wine 1.6 -====================== +Bugs fixed in 1.6.1 (total 58): + 2770 Powerbullet Presenter 1.44: Powerbullet.dll registration fails (Armadillo v4.x software protection fails at checkpoint L5, error 0x17) + 4473 WSAStartup not needed before socket() call + 18744 Mp3Tag: Column headers in list view incorrectly redrawn + 23839 Neverwinter Nights 2 can't detect video adapter properly, claiming: "Your video card has less than 128 MB of video memory" + 25754 Excel Workbook with Macros Is not Running : Getting Crashed. + 25994 Process Hacker 2.x needs ntdll.dll.NtCreateKeyedEvent + 27052 winedbg and its man page should use "wpid" consistently for Windows' process ID + 28423 ImmGetDescriptionW() from imm32 crashes with certain parameters + 28664 qedit/mediadet test crashes on FreeBSD9 + 29448 GameShield/SoftwareShield protected apps/games won't start (SetCurrentDirectoryA calling W API causes detours recursion) + 30485 MeGUI 2112 crashes after first update / restart (application XML settings can't be fully deserialized due to oleaut32 VarDecRound being a semi-stub) + 30797 wine(1) man page should mention running built-in programs like explorer.exe + 31487 kernel32.dll.InitOnceExecuteOnce needed for several MS installer (Office2013 / Windows Essentials 2012 / .NET Framework 4.5 / Skydrive / ARM Applications) + 31773 Torchlight 2 shadows are rendered incorrectly on some areas + 32922 iTunes 7 needs msvcr80.dll._wmktemp_s + 33378 measuring/painting strings needs better tests + 33523 .NET Framework 3.5 WPF 3.x apps need windowscodecsext.dll.DllGetClassObject + 33657 Garena didn't start with ADMINISTRATOR privileges + 33693 Spin Tires tech demo needs msvcr90.dll.wctomb_s + 33794 Arabic Entry Box Has Big Errors . + 33872 Pando (installer of LOL) can't load FAQ + 33890 Anno 1602 (demo): crash during startup + 34005 WS2_32.dll.WSASendMsg is unimplemented + 34013 Altium Designer 10 and its installer crash in InternetQueryOptionW + 34077 Sins of a Solar Empire Font Size Regression + 34102 It is not drawn when specify 0 for the width and height in GdipDrawString. + 34110 MS Excel 2010 escape/unescape problem in sheet names + 34142 Nullsoft installer appearance is broken + 34162 CGDirectPaletteRef has been deprecated so winemac.drv can't be compiled in Mavericks. + 34177 -pipe makes mingw-g++ work unreliably + 34188 crash when creating a new wineprefix with winemac.drv + 34190 number.c could not compile due to "dtoa" naming conflict in Cygwin + 34191 cabarc.c could not compile + 34209 fullscreen apps won't switch back to resolution after command-tabbing on OS X + 34211 strncpy C library function doesn't compliant C standard. + 34245 WMI query "select * from win32_Directory" via WMI crashes + 34275 Louisiana Adventure Demo fails with 'OLE error 80004001' (HTMLStyleSheet_GetIDsOfNames is a stub) + 34305 League of Legends 3.10.13_07_26_19_59: page fault in read_map() + 34329 Wine 1.6 fails to build with bison 3.0 + 34353 The Ur-Quan Masters fails to start + 34381 Rectangle rotation problem using GM_ADVANCED graphicmode + 34399 .NET 3.x/4.x WPF based installers/apps require windowscodecs.dll ComponentFactory_CreateBitmapFromHBITMAP implementation + 34401 QuiteRSS WinRT/ARM port needs msvcr110.dll.fabsf + 34417 Everquest character models invisible + 34418 regression: Finale NotePad 2012 installer splash screen appears as black box + 34442 Multiple applications ported to WinRT/ARM require msvcr110.dll.?before@type_info@@QBA_NABV1@@Z (Halite torrent client) + 34463 thai2english loads ok but crashes on startup + 34464 Jagged Alliance 2 fails to start (becomes unresponsive after startup) + 34486 __unDName cannot demangle a string and shows error + 34496 winhttp POST fails + 34514 an odd regression on an old video card + 34521 make: *** [dlls/msxml3] Error 2 + 34550 RTX server crashes at start + 34564 RTX Server fail to import user template database with builtin msvcp60 + 34567 qq 2012 installer crashes at 100% + 34570 Game crash because of improperly cloning MMIOINFO struct in MMIO_Open + 34571 EasiSlides v4 crashes when clicking a folder listbox item (GdipFillPath failure) + 34583 LINE (Powered by Naver) 3.2.0.76: Cannot work after Installation -*** User interface - -- Window transparency is supported, including both color keying and - alpha blending transparency. - -- All window rendering is done on the client-side using the DIB engine - (except for OpenGL rendering). This means that rendering to windows - or bitmaps gives identical results. - -- Common dialogs correctly scale with the screen DPI resolution. - -- In virtual desktop mode, shortcuts placed in the Desktop folder are - displayed on the desktop, and can be used to launch applications. - -- The HTML Help control has better support for non-ASCII characters, - and for multiple help windows. - -- Custom painting and images are better supported in listview - controls. - -- Input validation is improved in the date and calendar controls. - - -*** Mac driver - -- A native Mac OS X driver is implemented, for better integration with - the Mac desktop environment. The full range of driver features are - supported, including OpenGL, window management, clipboard, drag & - drop, system tray, etc. - -- X11 is no longer needed on Mac OS X, but the X11 driver is still - supported, e.g. when running remotely. - -Note: the Mac driver requires Mac OS X 10.6 or later, it cannot be - built or used on 10.5. - -- FontConfig is no longer needed on Mac OS X and is disabled by - default, system fonts are enumerated using the Core Text API - instead. - - -*** X11 driver - -- X11 server-side font rendering is no longer supported. All fonts are - rendered client-side using FreeType. - -- The big lock around all X11 calls has been removed, we rely on the X - libraries internal locking for thread safety. - -- XRandR versions 1.2 and 1.3 are supported. - - -*** Graphics - -- There are significant performance improvements in the DIB engine, - particularly for text rendering, bitmap stretching, alpha blending, - and gradients. - -- Bounds tracking is supported for all graphics primitives, to enable - copying only the modified portions of a bitmap. - -- OpenGL rendering is supported in device-independent bitmaps using libOSMesa. - -- Brush dithering is implemented in the DIB engine. - -- Path gradients are implemented in GdiPlus. - -- More image codecs features are implemented, including JPEG encoding, - palette formats, and meta-data support for various image types. - - -*** Text and fonts - -- Sub-pixel font anti-aliasing is supported in the DIB engine, using - the system anti-aliasing configuration from FontConfig. - -- Dynamic loading of scalable font resources is supported. - -- Text layout in Uniscribe supports character-specific position - adjustments. Right-to-left text handling is also improved. - -- There is an initial implementation of the DirectWrite text layout - engine. - -- Built-in fonts are more complete, with the addition of FixedSys and - Wingdings fonts, more high-resolution pixel fonts, and a wider range - of glyphs in the existing fonts, notably Arabic glyphs in Tahoma. - -- Bi-directional text support is improved in the RichEdit control. - - -*** Input devices - -- The raw input API is supported for keyboard and mouse input. - -- There is a joystick applet in the control panel, to allow - configuring joysticks and testing their behavior. - -- Force feedback is supported for Mac OS X joysticks. - - -*** Kernel - -- DOSBox is tried first when running a DOS application. The Wine DOS - support is only used as a fallback when DOSBox cannot be found, and - will be removed in a future release. - -- A monotonic time counter is used on platforms that support it, to - make timers more robust against system time changes. - -- File times are reported with nanosecond resolution. - -- Wine can be configured to report the Windows version as 'Windows 8'. - - -*** .NET support - -- The Mono runtime is packaged as an MSI file, and its installation - can be managed from the "Add/Remove Programs" control panel. It is - automatically installed on Wine prefix updates. - -- .NET mixed mode assemblies are supported. - -- The Microsoft .NET 4.0 runtime can be installed for cases where Mono - is not good enough yet. - - -*** OLE / COM - -- The typelib writer is reimplemented for better compatibility. - -- OLE DB supports more data types and conversions. - -- OLE automation manages a cache of string allocations for better - performance and compatibility. - - -*** Internet and networking - -- HTTPS connections use GnuTLS (or Secure Transport on Mac OS X). - OpenSSL is no longer used. - -- The TLS 1.1 and TLS 1.2 protocols are enabled by default, with - automatic fallback to TLS 1.0. The SSL2 protocol is disabled by - default. - -- Security certificate validation errors are handled better. - -- NTLM and Negotiate authentication protocols are supported. - -- ActiveX controls can be downloaded and installed automatically. - -- Internet proxy bypass is supported, and can be enabled either - through the registry or with the no_proxy environment variable. - -- Broadcast packets can be received on interface-bound sockets, which - is needed for some networked multi-player games. - -- The Server Name Indication TLS extension is supported. - -- Persistent cookies are supported, and URL cache files are managed - better. The Internet control panel allows clearing saved cookies and - cache files. - -- Punycode encoding for Internationalized Domain Names is supported. - -- JavaScript performance is improved. The built-in JavaScript engine - is preferred over the Gecko one in most cases. - -- Many more built-in functions of VBScript are implemented. Regular - expressions are also supported. - -- The Gecko engine is updated to the version from Firefox 21. - -- The Gecko and Mono installers are cached upon download, to allow - installation in multiple Wine prefixes without additional downloads. - - -*** Direct3D - -- The Direct3D 9Ex implementation is more complete. In particular: - - IDirect3DDevice9Ex::PresentEx is implemented. - - IDirect3DDevice9Ex::ResetEx is implemented. - - Various Direct3D 9Ex display mode handling functions are implemented. - - Direct3D 9Ex style video memory accounting is implemented. - -- Like the X11 driver, WineD3D no longer uses the big X11 lock when - making GL calls. - -- The WineD3D graphics card database is updated to recognize more - graphics cards. - -- The fallback card detection code for unrecognized graphics cards is - improved. This results in a more reasonable card being reported when - the graphics card is not already in the WineD3D database. - -- WineD3D has GLSL based implementations of Direct3D fixed-function - vertex and fragment processing. In some cases this allows - functionality that's not present in fixed-function OpenGL to be - implemented, in other cases it allows functionality to be - implemented in a more efficient way. - -- On drivers that support it, GL_ARB_debug_output is used to get more - detailed debugging output from the OpenGL driver. - -- On drivers that support it, GL_ARB_framebuffer_sRGB is used for - rendering to frame buffers in the sRGB color space. - -- On drivers that support it, GL_ARB_instanced_arrays is used for more - efficient instanced drawing. - -- On drivers that support it, and return useful information, - GL_ARB_internalformat_query2 is used for more accurate reporting of - surface / texture format capabilities. - -- There is an initial implementation of a HLSL compiler. - -- Improvements to various parts of the D3DX9 implementation, including: - - The surface and texture handling functions. This includes code for - loading, saving, filling, and rendering to surfaces and textures. - - The effects framework. - - The constant table implementation. - - A number of spherical harmonics functions have been implemented. - - Support for .x files. - -- Improvements to the Direct3D 10 implementation, including: - - Support for more shader model 4 opcodes and register types. - - Support for shader model 4 indirect addressing. - - Initial geometry shader support. - - Improved binary effect parsing. - - Support for Direct3D 10 style instanced draws, using - GL_ARB_draw_instanced. - - -*** DirectDraw - -- Vertex buffers are created with WINED3DUSAGE_DYNAMIC when locked with - DDLOCK_DISCARDCONTENTS, resulting in improved performance in some cases. - -- The 2D-only fallback in WineD3D for using DirectDraw without a - working OpenGL implementation is more robust. Note that this still - isn't a recommended configuration. - - -*** Audio and video - -- DirectSound has a better resampler. - -- Audio device enumeration is improved, and multi-channel devices are - better supported. - -- VMR-9 video rendering is implemented. - - -*** Printer support - -- The PPD files of already installed printers are automatically - refreshed when needed. - -- Printing resolution can be configured from the print dialog. - -- Simulated italic fonts can be printed. - -- On Mac OS X, the default paper size is retrieved from the system - configuration. - - -*** Internationalization - -- Japanese vertical text is correctly supported. - -- Translated font names are used when there is a match for the current - language. - -- Wine is translated to French, German, Spanish, Italian, Dutch, - Swedish, Finnish, Portuguese, Catalan, Hungarian, Polish, Danish, - Russian, Slovenian, Lithuanian, Chinese, Japanese, Korean, and - Arabic. It has partial translations for another fifteen languages. - -- Various additional Mac OS code pages are supported, namely Japanese, - Traditional Chinese, Korean, Simplified Chinese, Romanian, - Ukrainian, Thai, and Croatian code pages. This improves support for - loading translated font names from Mac OS font files. - - -*** Built-in applications - -- The new 'netstat' application displays information about active - network connections. - -- The 'cabarc' application supports multi-cabinet archives. - -- The 'attrib' application supports recursing in sub-directories. - -- The 'ipconfig' application can display IPv6 addresses. - -- The 'start' application allows setting process priority and affinity. - -- The 'cmd' application support arithmetic variable expansion, - comparison operators, and various extra features in 'for' loops. - -- All graphical built-in applications have a 256x256 icon for use with - the Mac driver. - - -*** Build environment - -- The configure script uses pkg-config when possible to find library - dependencies. Compiler and linker flags can be passed explicitly for - each dependency to override pkg-config where necessary. - -- The IDL compiler supports nameless structs and unions and generates - portable C code for them. - -- The IDL compiler generates the same header guards as the Microsoft - one for better header compatibility. - -- Generated assembler files are built by invoking the C compiler when - possible, for better compatibility with the Clang tool chain. - -- The Winedump tool can display the contents of typelib files. - -- The Fnt2bdf tool has been removed since X11 server-side fonts are no - longer used. - - -*** Platform-specific changes - -- On Linux, dynamic device management supports the UDisks2 service. - -- On Mac OS X, the Recycle Bin is mapped to the Mac OS Trash. - -- Debugging support for ARM platforms is improved, including the - ability to display ARM assembly in the Wine debugger, and support - for relay tracing. - -- Building Wine for the ARM64 platform is supported. - -- There is preliminary support for building Wine for Android using the - Android NDK. - -- The DragonFly FreeBSD variant is supported. - -- The Alpha and Sparc platforms are no longer supported. - - -*** Miscellaneous - -- XML namespaces are better supported. XML parsing is also implemented - in the XMLLite library. - -- Windows Management Instrumentation (WMI) is implemented, with a wide - range of WBEM system classes. - -- A number of forwarding libraries are added to support the API Sets - feature added in Windows 8. - -- More of the latest functions of the C runtime are implemented, - particularly the locale functions. Exception handling and RTTI are - supported on 64-bit. - -- The standard C++ class libraries are more complete, particularly the - math functions and the stream classes. - - -*** New external dependencies - -- LibOSMesa is used for OpenGL rendering to device-independent bitmaps. - - -*** Useful configuration options - -Note: More details about these and other configuration options can be - found at http://wiki.winehq.org/UsefulRegistryKeys - -- Client-side window rendering can be disabled if necessary by setting - "ClientSideGraphics" to "N" under HKCU\Software\Wine\X11 Driver. - -- On Mac OS X, in case an application doesn't work properly with the - Mac driver, it is possible to go back to the X11 driver by setting - "Graphics" to "x11" under HKCU\Software\Wine\Drivers. - -- Some X11 compositors do not cope properly with transparent windows - that use non-rectangular shapes. In that case, window shaping can be - disabled by setting "ShapeLayeredWindows" to "N" under - HKCU\Software\Wine\X11 Driver. +---------------------------------------------------------------- -- The "VertexShaderMode" and "PixelShaderMode" settings under - HKCU\Software\Wine\Direct3D have been replaced by the "MaxShaderModelVS", - "MaxShaderModelGS" and "MaxShaderModelPS" (DWORD) settings. These allow - limiting the maximum supported shader model version. Setting these to 0 - disables support for the corresponding shader type, like "VertexShaderMode" - and "PixelShaderMode" did. +Changes since 1.6: -- The default value for the "AlwaysOffscreen" setting under - HKCU\Software\Wine\Direct3D is "enabled". It can still be disabled - by setting it to "disabled". +Adam Bolte (1): + wined3d: Add support for nVidia GTX 660M. +Alexandre Julliard (35): + widl: Fix typo in man page. + jscript: Use bison directives instead of defines to specify extra lexer parameters. + msi: Use bison directives instead of defines to specify extra lexer parameters. + vbscript: Use bison directives instead of defines to specify extra lexer parameters. + wbemprox: Use bison directives instead of defines to specify extra lexer parameters. + widl: Remove non-bison compatibility code. + wrc: Remove non-bison compatibility code. + gdi32: Use Microsoft and Unicode encodings in priority for font names. + kernel32: Don't call from A to W function in Get/SetCurrentDirectory. + ntdll: Add the keyed events entry points. + server: Add support for keyed event objects. + server: Create the critical section keyed event object on startup. + server: Don't include SYNCHRONIZE in the keyed event access rights. + server: Map new handle access even when not checking it. + server: Add a structure to pass the parameters of a select request. + ntdll: Pass a select operation structure to NTDLL_wait_for_multiple_objects. + server: Make select on all handles a separate operation. + server: Make signal and wait a separate select operation. + ntdll: Rename NTDLL_wait_for_multiple_objects to server_select since it's more generic now. + ntdll: Move the select and APC support to server.c. + server: Store the wait structure in the wait entry and add an accessor function for the thread. + server: Pass a wait queue entry to the signaled/satisfied object functions. + server: Store abandoned state as a flag in the wait structure. + server: Implement waiting on keyed events. + ntdll: Implement the RunOnce functions. + kernel32: Implement the InitOnce functions. + ntdll: Actually return the mount point in get_device_mount_point on Mac OS. + ntdll: Add a configure check for the tcdrain function. + gdi32: Add more helpers for converting font sizes to logical coordinates. + gdi32: Add a check for overflow in DIB dimensions. + server: Trigger a repaint on layered windows the first time the attributes are set. + msxml3: Don't use libxslt without libxml. + wmc: Add support for long command-line options. + wmc: Load translations from mo files instead of po. + gdi32: Remove freetype compatibility cruft that doesn't compile. + +Alistair Leslie-Hughes (1): + windowscodecsext: Add stub DllGetClassObject. + +Andrew Cook (1): + ntdll: Implement NtQueryEvent. + +Andrew Eikum (6): + winmm: Don't count unused frames. + dsound: Allow multiple buffers to capture from the same device. + winmm: Increase mmdevapi buffer sizes. + oleaut32: Typelib strings of size -1 are NULL. + oleaut32: Don't crash on NULL string arguments. + oleaut32: Implement VarDecRound. + +André Hentschel (1): + msvcrt: Export fabsf on ARM and x86_64. + +Aric Stewart (5): + wineqtdecoder: Calculate AvgTimePerFrame for video tracks. + gdi32: GetCharWidth32A/W return positive widths for all layouts and various DC transforms. + gdi32: ABC value signs remain the same despite any changes in layout direction or viewport. + imm32: Fix ImmGetDescription behavior with a null HKL. + imm32: ImmGetCandidateWindow should not return unset data. + +Austin English (1): + dxdiagn: Add a few more stub properties. + +Bruno Jesus (2): + ws2_32: Do not allow socket creation if WSAStartup was not called. + ws2_32: Implement WSASendMsg(). + +Charles Davis (3): + winemac.drv: Also return the number of pixel formats if the caller didn't supply a PIXELFORMATDESCRIPTOR. + configure: Use a real header guard for config.h. + winemac.drv: Support the public UTF-16 type for Unicode text. + +Daniel Jelinski (1): + comctl32: Do not rearrange treeview when collapsing already collapsed item. + +Dmitry Timoshkov (7): + ntdll: NtAllocateVirtualMemory should fail to commit if an address range is already committed for a memory mapped file. + windowscodecs: Workaround libtiff bug when it defines toff_t as 32-bit for 32-bit builds. + cabarc: Fix compilation under Windows. + ntdll: Last parameter of NtSetIoCompletion is 64-bit on 64-bit platforms. + server: Store full-sized completion information on the server side. + windowscodecs: Implement CreateBitmapFromHBITMAP. + gdiplus: GdipTransformRegion should not fail for an empty path. + +Fabrice Bauzac (1): + winmm: Fix WOD_Open() WID_Open() WAVE_MAPPER no-device case. + +François Gouget (1): + loader: Fix the clean target to delete the generated wine_info.plist file. + +Frédéric Delanoy (14): + server: Fix manpage formatting. + loader: Fix wine manpage formatting. + loader: Fix invalid groff in Polish wine manpage. + loader: Update French translation of wine manpage. + server: Make wineserver manpage conform to common manpages conventions. + server: Update French translation of manpage. + winemaker: Make the manpage more concise. + winemaker: Make manpage conform to common manpages conventions. + winemaker: Update French translation of manpage. + winedbg: Fix manpage formatting. + winedbg: Use consistently wpid in documentation. + winedbg: Fix winedbg --help message formatting. + loader: Mention builtin executables in wine manpage. + loader: Update French translation of wine manpage. + +Gediminas Jakutis (1): + wined3d: Recognize Nvidia GeForce GTX 770. + +Hans Leidekker (14): + server: The token user SID must be present in the default DACL. + msi: Fix integer conversion in get_table_value_from_record. + wininet: Ignore INTERNET_FLAG_NO_CACHE_WRITE only for GET requests. + wininet: Handle NULL input string in str_to_buffer. + msi: Add support for the hyperlink control. + winhttp: Allow setting NULL username and password for NTLM, Passport and Negotiate. + winhttp: Fix invalid parameter handling in WinHttpQueryAuthSchemes. + wbemprox: Accept the root\default namespace. + wininet: Replacing a header with an empty value deletes it. + wininet: Fix calculation of content length from chunk size. + winhttp: Fix the base64 decoder. + wbemprox: Avoid a crash on file or directory queries with an empty WHERE clause. + wininet: Don't assume that end of chunk means end of stream. + winhttp: Don't assume that end of chunk means end of stream. + +Henri Verbeet (11): + wined3d: Use the "adapter" local variable in swapchain_init(). + wined3d: Store the original display mode in the swapchain. + wined3d: Get rid of the render target / overlay check in wined3d_surface_flip(). + wined3d: Return 1 instead of 0 for max_vertex_blend_matrices in glsl_vertex_pipe_vp_get_caps(). + wined3d: Add fallback depth format info for when ARB_depth_texture is not available. + wined3d: Don't bother downloading buffer contents on destruction. + wined3d: Only set fragment pipe uniforms if they're needed by the shader. + wined3d: Just update a range of constants in walk_constant_heap(). + wined3d: Avoid some redundant state_pscale() calls. + wined3d: Don't clamp texture lookups in the GLSL fixed function fragment pipe. + wined3d: Use clamp() instead of max() for calculating the clamped cosine in the ffp lighting calculations. + +Huw D. M. Davies (9): + gdi32: Ignore max_extent if nfit is NULL. + ieframe: DdeNameService returns NULL on error. + ntdll: Call the correct server request. + Revert "gdi32: Do not use VDMX for mapping of negative font heights, based on a test case.". + gdi32: Reset ppem to zero if we fail to find a matching height. + gdi32: Skip vdmx records with charset == 0. + fonts: Fix glyph names and advance widths. + fonts: Add a few more glyphs in wingding. + fonts: Add some box-type glyphs to wingdings. + +Hwang YunSong (황윤성) (1): + po: Update Korean translation. + +Jacek Caban (4): + wininet: Ignore missing status text in response headers. + mshtml: Better res protocol URL parsing. + mshtml: Added IDispatchEx support to HTMLStyleSheet object. + appwiz.cpl: Allow cancelling download of addons. + +Joško Nikolić (2): + po: Update Croatian translation. + po: Update Croatian translation. + +Ken Sharp (2): + po: Update English neutral resource. + kernel32: Correct log on / logon (noun / verb). + +Ken Thomases (47): + winemac: Make a file-scope variable static. + gdi32: Link against AppKit on the Mac to avoid later crash in the Mac driver. + winemac: Avoid using display palette API, which was deprecated with the 10.7 SDK. + winemac: Make cgrect_from_rect() preserve origin of empty rectangles. + winemac: Create 1x1 Cocoa window with empty shape for zero-sized Win32 window. + winemac: Remove a redundant memset of a struct. + winemac: Improve tracing in sync_window_position() to include adjusted frame. + winemac: Always trace arguments in macdrv_ShowWindow(). + winemac: Don't unminimize a window for SetFocus(). + winemac: Don't generate scroll wheel events for axes with 0 delta. + winemac: Don't reorder clicked window relative to sibling owned windows if it's in the right place. + winemac: On click, don't reorder Cocoa child window after siblings of higher level. + winemac: Skip minimized windows when looking for z-ordering neighbor. + winemac: Remove some duplicated code from -makeKeyAndOrderFront:. + winemac: Make -setMacDrvParentWindow: do nothing if new parent is same as latent parent. + winemac: Consolidate the code for managing the Cocoa parent/child window relationship. + winemac: Clear latent parent on window close to break potential retain cycle. + winemac: When a window becomes ineligible to be a parent, make the relationship latent in its children, too. + winemac: Track latent child windows (the inverse of the latent parent window relationship). + winemac: A window is ineligible to be a Cocoa parent or child while minimized. + winemac: Don't use Cocoa parent-child relationship when topmost state is enough to keep owned in front of owner. + winemac: When ordering sibling child windows, don't remove and re-add ones already in the right order. + winemac: Add support for mouse-move and right- and middle-click events on systray icons in the Mac status bar. + winemac: Don't allow dead-key state to repeat after characters are generated. + user32: Fix mouseRect computation for starting position when sizing window. + winemac: Restrict DescribePixelFormat() to displayable pixel formats. + winemac: Return failure from DescribePixelFormat() for invalid pixel format. + winemac: Trace the pixel format in DescribePixelFormat(). + winemac: At the start of a resize operation, get window min/max size info and pass it to Cocoa. + winemac: Move memory management of liveResizeDisplayTimer into property setter. + winemac: Send WM_ENTER/EXITSIZEMOVE messages at start/end of a resizing operation. + winemac: Use NSMouseInRect() instead of NSPointInRect() to compensate for Cocoa's off-by-one coordinate system. + winemac: When programmatically focusing a window, don't generate WINDOW_LOST_FOCUS event for previously focused window. + winemac: Let Wine always drive window minimization; Cocoa just requests it. + winemac: Remove a too-early attempt to set the process's Dock icon. + winemac: Reapply display modes when switching back to app after "escaping" with Command-Tab. + winemac: Allow zero-sized windows to be selected from the Mac Window menu. + winemac: Make clicking on the app's dock icon unminimize a window if there are only minimized windows. + winemac: Use unsigned type for bitfields. + winemac: Only update window minimized state when it has changed from what processed events told us it was. + winemac: Don't accidentally clear Cocoa window style mask bits. + winemac: Update the window min/max size info and enforce it when zooming. + winemac: If the app doesn't specify a custom max. tracking size, don't restrict Cocoa. + winemac: Tell Wine when Cocoa has brought a window to the front. + winemac: Make sure the same housekeeping is done when closing a window as is done when hiding it. + winemac: Add registry settings to make Option keys send Alt rather than accessing additional characters from the keyboard layout. + winemac: Implement support for Cocoa-style full-screen mode. + +Lu Jiashu (1): + winmm: Clone the whole adwInfo array in MMIO_Open. + +Marcus Meissner (1): + wined3d: Fixed sizeof() to HeapAlloc (Coverity). + +Matteo Bruni (2): + wined3d: Implement special fog behavior for orthogonal projection matrices. + wined3d: Add a missing destroy_dummy_textures() call. + +Michael Müller (2): + d3d9: Add headers for IDirect3DSwapChain9Ex interface. + d3d9: Partial implementation of IDirect3DSwapChain9Ex. + +Michael Stefaniuc (1): + windowscodecs: Silence a warning due to an API change in libpng 1.5. + +Nikolay Sivov (6): + msxml3: Unescape '&' back to '&' in attribute value. + comctl32: Properly handle repainting for HDF_OWNERDRAW items. + msxml3: Fix a warning in DTD dumping code on recent libxml2 versions. + msxml3: Fix a warning accessing internal buffer of xmlOutputBuffer. + server: Fix string length used with strncmpW(). + po: Tweak Russian strings for winecfg. + +Piotr Caban (22): + msvcrt: Fix _mktemp implementation. + msvcrt: Add _mktemp_s implementation. + msvcrt: Add _wmktemp_s implementation. + msvcrt: Add _wctomb_s_l implementation. + msvcrt: Add _wcstol_l implementation. + msvcrt: Added _swprintf_s_l implementation. + jscript: Fix compilation issues when dtoa is defined in headers. + msvcrt: Fix parameter validation in _stat64 function. + msvcp60: Fix locale::dtor implementation. + msvcp90: Fix string leak in locale__Locimp__Makeloc function. + msvcp60: Fix basic_filebuf::_Init implementation. + msvcrt: Add _wsetlocale implementation. + msvcrt: Improve setting standard handles flags. + msvcrt: Fix lookahead buffer usage on pipes. + msvcr110: Add forwards to type_info::before function. + msvcrt: Don't forward _wcsnicmp to ntdll. + msvcrt: Add support for vtordisp functions demangling. + msvcrt: Add _snwprintf_s_l implementation. + msvcp60: Don't call _Eos on allocation error or 0-length string in basic_string::reserve. + msvcp60: Fix char_traits::assign implementation. + msvcrt: Improve error handling in wcsrtombs function. + msvcr90: Don't forward exception constructors to msvcrt. + +Qian Hong (5): + imm32: Fixed ImmUnlockIMC. + imm32: Fixed ImmUnlockIMCC. + ntdll: Fixed parameter list in spec file for RtlpNtQueryValueKey. + imm32: Fixed IMCC implementation. + imm32: Validate input context in multiple IMC functions. + +Rafał Mużyło (1): + configure: Don't use X_PRE_LIBS. + +Ralf Habacker (1): + gdi32: Fixed Rectangle() rotation with GM_ADVANCED graphics mode in dib driver. + +Sebastian Lackner (3): + winex11: Added missing release_win_data() to create_foreign_window(). + winex11: Call destroy_gl_drawable before destroying the window. + winex11: Call sync_context for DC_GL_CHILD_WIN drawables before swapping buffers. + +Stefan Dösinger (4): + wined3d: Don't invert blits from offscreen surfaces. + ddraw: Gracefully handle recursive SetCooperativeLevel calls. + wined3d: Don't clamp texture lookups in the ARB fixed function fragment pipe. + wined3d: Use the ftoa helper function in the ARB shader backend. + +Thomas Faber (2): + comctl32: Fix build with MSVC. + mmdevapi: Fix build with MSVC. + +Vincent Povirk (4): + atl: Do not access m_pTermFuncs if the structure is too small. + riched20: Use \ulnone instead of \ul0 for no underline. + msvcrt: _[w]access_s returns an error code. + gdiplus: Only clip strings if rectangle width and height are positive. -*** Known issues +Volkan Gezer (1): + po: Updated Turkish translations. -- The addition of DirectWrite causes Steam to be unable to display - text. This can be fixed either by setting dwrite.dll to disabled for - steam.exe using Winecfg, or by running Steam with the -no-dwrite - option. +Wolfgang Walter (1): + ntdll: Call tcdrain for serial handles from NtFlushBuffersFile. -- The removal of the big X11 lock can reveal locking bugs in old Xlib - versions, notably on RHEL 5. The only solution is to upgrade the X - libraries. +Álvaro Nieto (1): + msvrct: Fix strncpy to fill the buffer. -- Alexandre Julliard diff -Nru wine1.6-1.7.1-actually1.6/AUTHORS wine1.6-1.6.1/AUTHORS --- wine1.6-1.7.1-actually1.6/AUTHORS 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/AUTHORS 2013-11-15 19:30:24.000000000 +0000 @@ -8,6 +8,7 @@ Abraham Sudhakar Achim Kaiser A C Hurst +Adam Bolte Adam D. Moss Adam Gundy Adam Martinson @@ -69,6 +70,7 @@ Alfons Hoogervorst Alistair Leslie-Hughes Allan Tong +Álvaro Nieto Américo José Melo Amine Khaldi Anand Kumria @@ -391,6 +393,7 @@ Fabian Bieler Fabian Cenedese Fabian Müntefering +Fabrice Bauzac Fabrice Ménard Farshad Agah Fatih Aşıcı @@ -429,6 +432,7 @@ Gaurav Jain Gautam Jain Gavriel State +Gediminas Jakutis Geoff Clare Geoffrey Hausheer Geoff Thorpe @@ -805,6 +809,7 @@ Luis Carlos Busquets Pérez Luis Javier Merino Luiz Otavio L. Zorzella +Lu Jiashu Łukasz Wojniłowicz Luke Benstead Luke Bratch @@ -909,6 +914,7 @@ Michael McCormack Michael Mc Donnell Michael Moss +Michael Müller Michael Patra Michael Ploujnikov Michael Poole @@ -1109,6 +1115,7 @@ Raimonds Praude Rajeev Jhangiani Ralf Beck +Ralf Habacker Ralf S. Engelschall Ramon Garcia Randy Weems @@ -1207,6 +1214,7 @@ Sean Sube Sean Young Sebastian Gasiorek +Sebastian Lackner Sébastien Ramage Sergei Butakov Sergei Ivanov diff -Nru wine1.6-1.7.1-actually1.6/Make.rules.in wine1.6-1.6.1/Make.rules.in --- wine1.6-1.7.1-actually1.6/Make.rules.in 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/Make.rules.in 2013-11-15 19:30:24.000000000 +0000 @@ -64,7 +64,7 @@ $(FLEX) $(LEXFLAGS) -o$@ $< .mc.res: - $(LDPATH) $(WMC) -U -O res -P $(top_srcdir)/po -o $@ $< + $(LDPATH) $(WMC) -U -O res $(PORCFLAGS) -o $@ $< .rc.res: $(LDPATH) $(WRC) $(RCFLAGS) -o $@ $< diff -Nru wine1.6-1.7.1-actually1.6/VERSION wine1.6-1.6.1/VERSION --- wine1.6-1.7.1-actually1.6/VERSION 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/VERSION 2013-11-15 19:30:24.000000000 +0000 @@ -1 +1 @@ -Wine version 1.6 +Wine version 1.6.1 diff -Nru wine1.6-1.7.1-actually1.6/configure wine1.6-1.6.1/configure --- wine1.6-1.7.1-actually1.6/configure 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/configure 2013-11-15 19:30:24.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Wine 1.6. +# Generated by GNU Autoconf 2.69 for Wine 1.6.1. # # Report bugs to . # @@ -580,8 +580,8 @@ # Identity of this package. PACKAGE_NAME='Wine' PACKAGE_TARNAME='wine' -PACKAGE_VERSION='1.6' -PACKAGE_STRING='Wine 1.6' +PACKAGE_VERSION='1.6.1' +PACKAGE_STRING='Wine 1.6.1' PACKAGE_BUGREPORT='wine-devel@winehq.org' PACKAGE_URL='http://www.winehq.org' @@ -690,6 +690,7 @@ SECURITYLIB DISKARBITRATIONLIB LDEXECFLAGS +APPKITLIB CORESERVICESLIB APPLICATIONSERVICESLIB FORCEFEEDBACKLIB @@ -1428,7 +1429,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Wine 1.6 to adapt to many kinds of systems. +\`configure' configures Wine 1.6.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1497,7 +1498,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Wine 1.6:";; + short | recursive ) echo "Configuration of Wine 1.6.1:";; esac cat <<\_ACEOF @@ -1676,7 +1677,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Wine configure 1.6 +Wine configure 1.6.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2194,7 +2195,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Wine $as_me 1.6, which was +It was created by Wine $as_me 1.6.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -6689,6 +6690,8 @@ CORESERVICESLIB="-framework CoreServices" + APPKITLIB="-framework AppKit" + case $host_os in darwin11*) LDEXECFLAGS="-image_base 0x7bf00000 -Wl,-macosx_version_min,10.6,-segaddr,WINE_DOS,0x00001000,-segaddr,WINE_SHAREDHEAP,0x7f000000,-sectcreate,__TEXT,__info_plist,wine_info.plist" @@ -9395,7 +9398,7 @@ $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lGLU $OPENGL_LIBS $X_LIBS $X_PRE_LIBS $XLIB -lm $X_EXTRA_LIBS $LIBS" +LIBS="-lGLU $OPENGL_LIBS $X_LIBS $XLIB -lm $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9447,7 +9450,7 @@ $as_echo_n "(cached) " >&6 else ac_check_soname_save_LIBS=$LIBS -LIBS="-lOSMesa $X_LIBS $X_PRE_LIBS $XLIB -lm $X_EXTRA_LIBS $LIBS" +LIBS="-lOSMesa $X_LIBS $XLIB -lm $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -13294,7 +13297,7 @@ strtoll \ strtoull \ symlink \ - tcgetattr \ + tcdrain \ thr_kill2 \ timegm \ usleep \ @@ -17057,7 +17060,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Wine $as_me 1.6, which was +This file was extended by Wine $as_me 1.6.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17128,7 +17131,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Wine config.status 1.6 +Wine config.status 1.6.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru wine1.6-1.7.1-actually1.6/configure.ac wine1.6-1.6.1/configure.ac --- wine1.6-1.7.1-actually1.6/configure.ac 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/configure.ac 2013-11-15 19:30:24.000000000 +0000 @@ -745,6 +745,7 @@ AC_SUBST(FORCEFEEDBACKLIB,"-framework ForceFeedback -framework CoreFoundation") AC_SUBST(APPLICATIONSERVICESLIB,"-framework ApplicationServices") AC_SUBST(CORESERVICESLIB,"-framework CoreServices") + AC_SUBST(APPKITLIB,"-framework AppKit") case $host_os in darwin11*) AC_SUBST(LDEXECFLAGS,["-image_base 0x7bf00000 -Wl,-macosx_version_min,10.6,-segaddr,WINE_DOS,0x00001000,-segaddr,WINE_SHAREDHEAP,0x7f000000,-sectcreate,__TEXT,__info_plist,wine_info.plist"]) ;; @@ -1221,14 +1222,14 @@ $X_LIBS $XLIB -lm $X_EXTRA_LIBS) if test "x$with_glu" != "xno" then - AC_CHECK_LIB(GLU,gluLookAt,[:],,[$OPENGL_LIBS $X_LIBS $X_PRE_LIBS $XLIB -lm $X_EXTRA_LIBS]) + AC_CHECK_LIB(GLU,gluLookAt,[:],,[$OPENGL_LIBS $X_LIBS $XLIB -lm $X_EXTRA_LIBS]) WINE_NOTICE_WITH(glu,[test "x$ac_cv_lib_GLU_gluLookAt" != xyes], [libGLU ${notice_platform}development files not found, GLU won't be supported.]) fi if test "x$with_osmesa" != "xno" then - WINE_CHECK_SONAME(OSMesa,glAccum,,,[$X_LIBS $X_PRE_LIBS $XLIB -lm $X_EXTRA_LIBS]) + WINE_CHECK_SONAME(OSMesa,glAccum,,,[$X_LIBS $XLIB -lm $X_EXTRA_LIBS]) WINE_NOTICE_WITH(osmesa,[test "x$ac_cv_lib_soname_OSMesa" = "x"], [libOSMesa ${notice_platform}development files not found (or too old), OpenGL rendering in bitmaps won't be supported.]) fi @@ -2066,7 +2067,7 @@ strtoll \ strtoull \ symlink \ - tcgetattr \ + tcdrain \ thr_kill2 \ timegm \ usleep \ @@ -2534,9 +2535,11 @@ dnl **** Generate output files **** -AH_TOP([#ifndef WINE_CROSSTEST -#define __WINE_CONFIG_H]) -AH_BOTTOM([#endif /* WINE_CROSSTEST */]) +AH_TOP([#ifndef __WINE_CONFIG_H +#define __WINE_CONFIG_H +#ifndef WINE_CROSSTEST]) +AH_BOTTOM([#endif /* WINE_CROSSTEST */ +#endif /* __WINE_CONFIG_H */]) AC_CONFIG_COMMANDS([include/stamp-h], [echo timestamp > include/stamp-h]) diff -Nru wine1.6-1.7.1-actually1.6/debian/changelog wine1.6-1.6.1/debian/changelog --- wine1.6-1.7.1-actually1.6/debian/changelog 2013-09-13 23:18:43.000000000 +0000 +++ wine1.6-1.6.1/debian/changelog 2013-12-19 00:17:49.000000000 +0000 @@ -1,3 +1,14 @@ +wine1.6 (1:1.6.1-0ubuntu1~ppa1~precise1) precise; urgency=low + + * New upstream release + - Translation updates. + - Various bug fixes. + * Fix version number with epoch + * Update CJK-Registry patch to include some localized font names for substitution + - Thanks to Qian Hong and this wiki page: http://wiki.winehq.org/FontReplacements + + -- Scott Ritchie Wed, 18 Dec 2013 16:14:25 -0800 + wine1.6 (1.7.1-actually1.6-0ubuntu1) precise; urgency=low * Revert to actual Wine 1.6. Wine 1.7.x is now in the wine1.7 package. diff -Nru wine1.6-1.7.1-actually1.6/debian/patches/CJK-registry wine1.6-1.6.1/debian/patches/CJK-registry --- wine1.6-1.7.1-actually1.6/debian/patches/CJK-registry 2012-04-14 11:48:41.000000000 +0000 +++ wine1.6-1.6.1/debian/patches/CJK-registry 2013-12-19 00:15:08.000000000 +0000 @@ -1,15 +1,25 @@ -Index: wine1.3-1.4~rc5/tools/wine.inf.in +Index: wine1.6-1.6.1/tools/wine.inf.in =================================================================== ---- wine1.3-1.4~rc5.orig/tools/wine.inf.in 2012-02-24 10:30:11.000000000 -0800 -+++ wine1.3-1.4~rc5/tools/wine.inf.in 2012-02-25 00:27:08.716406054 -0800 -@@ -617,6 +617,17 @@ +--- wine1.6-1.6.1.orig/tools/wine.inf.in 2013-12-17 16:49:44.911412097 -0800 ++++ wine1.6-1.6.1/tools/wine.inf.in 2013-12-17 16:50:23.151412716 -0800 +@@ -1,3 +1,6 @@ ++;; To support localized font name replacement, this file should be encoded in ++;; UTF-8 with BOM, be careful not to strip the BOM header! ++;; + ;; .INF script for the basic Wine configuration + ;; Version: @PACKAGE_STRING@ + ;; +@@ -562,6 +565,21 @@ HKLM,%FontSubStr%,"Times New Roman Greek,161",,"Times New Roman,161" HKLM,%FontSubStr%,"Times New Roman TUR,162",,"Times New Roman,162" HKLM,System\CurrentControlSet\Hardware Profiles\Current\Software\Fonts,"LogPixels",0x10003,0x00000060 +HKCU,Software\Wine\Fonts\Replacements,"SimSun",,"WenQuanYi Micro Hei" ++HKCU,Software\Wine\Fonts\Replacements,"宋体",,"WenQuanYi Micro Hei" +HKCU,Software\Wine\Fonts\Replacements,"PMingLiU",,"WenQuanYi Micro Hei" ++HKCU,Software\Wine\Fonts\Replacements,"新細明體",,"WenQuanYi Micro Hei" +HKCU,Software\Wine\Fonts\Replacements,"MS Gothic",,"Ume Gothic" +HKCU,Software\Wine\Fonts\Replacements,"MS PGothic",,"Ume P Gothic" ++HKCU,Software\Wine\Fonts\Replacements,"MSPゴシック",,"Ume P Gothic" +HKCU,Software\Wine\Fonts\Replacements,"MS UI Gothic",,"Ume UI Gothic" +HKCU,Software\Wine\Fonts\Replacements,"MS Mincho",,"Ume Mincho" +HKCU,Software\Wine\Fonts\Replacements,"MS PMincho",,"Ume P Mincho" @@ -17,6 +27,7 @@ +HKCU,Software\Wine\Fonts\Replacements,"Dotum",,"UnDotum" +HKCU,Software\Wine\Fonts\Replacements,"Gulim",,"UnDotum" +HKCU,Software\Wine\Fonts\Replacements,"Arial Unicode MS",,"Droid Sans Fallback" ++ [MCI] HKLM,%Mci32Str%,"AVIVideo",,"mciavi32.dll" diff -Nru wine1.6-1.7.1-actually1.6/dlls/appwiz.cpl/addons.c wine1.6-1.6.1/dlls/appwiz.cpl/addons.c --- wine1.6-1.7.1-actually1.6/dlls/appwiz.cpl/addons.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/appwiz.cpl/addons.c 2013-11-15 19:30:24.000000000 +0000 @@ -106,6 +106,7 @@ static HWND install_dialog = NULL; static LPWSTR url = NULL; +static IBinding *dwl_binding; static WCHAR * (CDECL *p_wine_get_dos_file_name)(const char*); static const WCHAR kernel32_dllW[] = {'k','e','r','n','e','l','3','2','.','d','l','l',0}; @@ -185,6 +186,8 @@ { ULONG res; + EnableWindow(GetDlgItem(install_dialog, IDCANCEL), 0); + res = MsiInstallProductW(file_name, NULL); if(res != ERROR_SUCCESS) { ERR("MsiInstallProduct failed: %u\n", res); @@ -437,6 +440,10 @@ DWORD dwReserved, IBinding *pib) { set_status(IDS_DOWNLOADING); + + IBinding_AddRef(pib); + dwl_binding = pib; + return S_OK; } @@ -468,8 +475,16 @@ static HRESULT WINAPI InstallCallback_OnStopBinding(IBindStatusCallback *iface, HRESULT hresult, LPCWSTR szError) { + if(dwl_binding) { + IBinding_Release(dwl_binding); + dwl_binding = NULL; + } + if(FAILED(hresult)) { - ERR("Binding failed %08x\n", hresult); + if(hresult == E_ABORT) + TRACE("Binding aborted\n"); + else + ERR("Binding failed %08x\n", hresult); return S_OK; } @@ -660,13 +675,14 @@ case WM_COMMAND: switch(wParam) { case IDCANCEL: + if(dwl_binding) + IBinding_Abort(dwl_binding); EndDialog(hwnd, 0); return FALSE; case ID_DWL_INSTALL: ShowWindow(GetDlgItem(hwnd, ID_DWL_PROGRESS), SW_SHOW); EnableWindow(GetDlgItem(hwnd, ID_DWL_INSTALL), 0); - EnableWindow(GetDlgItem(hwnd, IDCANCEL), 0); /* FIXME */ CloseHandle( CreateThread(NULL, 0, download_proc, NULL, 0, NULL)); return FALSE; } diff -Nru wine1.6-1.7.1-actually1.6/dlls/atl/atl_main.c wine1.6-1.6.1/dlls/atl/atl_main.c --- wine1.6-1.7.1-actually1.6/dlls/atl/atl_main.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/atl/atl_main.c 2013-11-15 19:30:24.000000000 +0000 @@ -123,15 +123,20 @@ HRESULT WINAPI AtlModuleTerm(_ATL_MODULE *pM) { - _ATL_TERMFUNC_ELEM *iter = pM->m_pTermFuncs, *tmp; + _ATL_TERMFUNC_ELEM *iter, *tmp; TRACE("(%p)\n", pM); - while(iter) { - iter->pFunc(iter->dw); - tmp = iter; - iter = iter->pNext; - HeapFree(GetProcessHeap(), 0, tmp); + if (pM->cbSize > ATLVer1Size) + { + iter = pM->m_pTermFuncs; + + while(iter) { + iter->pFunc(iter->dw); + tmp = iter; + iter = iter->pNext; + HeapFree(GetProcessHeap(), 0, tmp); + } } return S_OK; @@ -143,12 +148,15 @@ TRACE("(%p %p %ld)\n", pM, pFunc, dw); - termfunc_elem = HeapAlloc(GetProcessHeap(), 0, sizeof(_ATL_TERMFUNC_ELEM)); - termfunc_elem->pFunc = pFunc; - termfunc_elem->dw = dw; - termfunc_elem->pNext = pM->m_pTermFuncs; + if (pM->cbSize > ATLVer1Size) + { + termfunc_elem = HeapAlloc(GetProcessHeap(), 0, sizeof(_ATL_TERMFUNC_ELEM)); + termfunc_elem->pFunc = pFunc; + termfunc_elem->dw = dw; + termfunc_elem->pNext = pM->m_pTermFuncs; - pM->m_pTermFuncs = termfunc_elem; + pM->m_pTermFuncs = termfunc_elem; + } return S_OK; } diff -Nru wine1.6-1.7.1-actually1.6/dlls/comctl32/header.c wine1.6-1.6.1/dlls/comctl32/header.c --- wine1.6-1.7.1-actually1.6/dlls/comctl32/header.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/comctl32/header.c 2013-11-15 19:30:24.000000000 +0000 @@ -289,6 +289,41 @@ } } +static void +HEADER_FillItemFrame(HEADER_INFO *infoPtr, HDC hdc, RECT *r, const HEADER_ITEM *item, BOOL hottrack) +{ + HTHEME theme = GetWindowTheme (infoPtr->hwndSelf); + + if (theme) { + int state = (item->bDown) ? HIS_PRESSED : (hottrack ? HIS_HOT : HIS_NORMAL); + DrawThemeBackground (theme, hdc, HP_HEADERITEM, state, r, NULL); + GetThemeBackgroundContentRect (theme, hdc, HP_HEADERITEM, state, r, r); + } + else + { + HBRUSH hbr = CreateSolidBrush(GetBkColor(hdc)); + FillRect(hdc, r, hbr); + DeleteObject(hbr); + } +} + +static void +HEADER_DrawItemFrame(HEADER_INFO *infoPtr, HDC hdc, RECT *r, const HEADER_ITEM *item) +{ + if (GetWindowTheme(infoPtr->hwndSelf)) return; + + if (!(infoPtr->dwStyle & HDS_FLAT)) + { + if (infoPtr->dwStyle & HDS_BUTTONS) { + if (item->bDown) + DrawEdge (hdc, r, BDR_RAISEDOUTER, BF_RECT | BF_FLAT | BF_ADJUST); + else + DrawEdge (hdc, r, EDGE_RAISED, BF_RECT | BF_SOFT | BF_ADJUST); + } + else + DrawEdge (hdc, r, EDGE_ETCHED, BF_BOTTOM | BF_RIGHT | BF_ADJUST); + } +} static INT HEADER_DrawItem (HEADER_INFO *infoPtr, HDC hdc, INT iItem, BOOL bHotTrack, LRESULT lCDFlags) @@ -325,43 +360,13 @@ return phdi->rect.right; } - if (theme != NULL) { - int state = (phdi->bDown) ? HIS_PRESSED : - (bHotTrack ? HIS_HOT : HIS_NORMAL); - DrawThemeBackground (theme, hdc, HP_HEADERITEM, state, - &r, NULL); - GetThemeBackgroundContentRect (theme, hdc, HP_HEADERITEM, state, - &r, &r); - } - else { - HBRUSH hbr; + /* Fill background, owner could draw over it. */ + HEADER_FillItemFrame(infoPtr, hdc, &r, phdi, bHotTrack); - if (!(infoPtr->dwStyle & HDS_FLAT)) - { - if (infoPtr->dwStyle & HDS_BUTTONS) { - if (phdi->bDown) { - DrawEdge (hdc, &r, BDR_RAISEDOUTER, - BF_RECT | BF_FLAT | BF_MIDDLE | BF_ADJUST); - } - else - DrawEdge (hdc, &r, EDGE_RAISED, - BF_RECT | BF_SOFT | BF_MIDDLE | BF_ADJUST); - } - else - DrawEdge (hdc, &r, EDGE_ETCHED, BF_BOTTOM | BF_RIGHT | BF_ADJUST); - } - - hbr = CreateSolidBrush(GetBkColor(hdc)); - FillRect(hdc, &r, hbr); - DeleteObject(hbr); - } - if (phdi->bDown) { - r.left += 2; - r.top += 2; - } - - if (phdi->fmt & HDF_OWNERDRAW) { + if (phdi->fmt & HDF_OWNERDRAW) + { DRAWITEMSTRUCT dis; + BOOL ret; dis.CtlType = ODT_HEADER; dis.CtlID = GetWindowLongPtrW (infoPtr->hwndSelf, GWLP_ID); @@ -373,11 +378,32 @@ dis.rcItem = phdi->rect; dis.itemData = phdi->lParam; oldBkMode = SetBkMode(hdc, TRANSPARENT); - SendMessageW (infoPtr->hwndNotify, WM_DRAWITEM, dis.CtlID, (LPARAM)&dis); + ret = SendMessageW (infoPtr->hwndNotify, WM_DRAWITEM, dis.CtlID, (LPARAM)&dis); if (oldBkMode != TRANSPARENT) SetBkMode(hdc, oldBkMode); + + if (!ret) + HEADER_FillItemFrame(infoPtr, hdc, &r, phdi, bHotTrack); + + /* Edges are always drawn if we don't have attached theme. */ + HEADER_DrawItemFrame(infoPtr, hdc, &r, phdi); + /* If application processed WM_DRAWITEM we should skip label painting, + edges are drawn no matter what. */ + if (ret) return phdi->rect.right; } - else { + else + { + HEADER_FillItemFrame(infoPtr, hdc, &r, phdi, bHotTrack); + HEADER_DrawItemFrame(infoPtr, hdc, &r, phdi); + } + + if (phdi->bDown) { + r.left += 2; + r.top += 2; + } + + /* Now text and image */ + { UINT rw, rh, /* width and height of r */ *x = NULL, *w = NULL; /* x and width of the pic (bmp or img) which is part of cnt */ /* cnt,txt,img,bmp */ @@ -495,7 +521,7 @@ SetBkMode(hdc, oldBkMode); } HEADER_FreeCallbackItems(phdi); - }/*Ownerdrawn*/ + } return phdi->rect.right; } diff -Nru wine1.6-1.7.1-actually1.6/dlls/comctl32/trackbar.c wine1.6-1.6.1/dlls/comctl32/trackbar.c --- wine1.6-1.7.1-actually1.6/dlls/comctl32/trackbar.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/comctl32/trackbar.c 2013-11-15 19:30:24.000000000 +0000 @@ -616,8 +616,7 @@ TRACKBAR_FillThumb (const TRACKBAR_INFO *infoPtr, HDC hdc, HBRUSH hbrush) { const RECT *thumb = &infoPtr->rcThumb; - const int PointCount = 6; - POINT points[PointCount]; + POINT points[6]; int PointDepth; HBRUSH oldbr; @@ -698,7 +697,7 @@ oldbr = SelectObject(hdc, hbrush); SetPolyFillMode(hdc, WINDING); - Polygon(hdc, points, PointCount); + Polygon(hdc, points, sizeof(points) / sizeof(points[0])); SelectObject(hdc, oldbr); return PointDepth; diff -Nru wine1.6-1.7.1-actually1.6/dlls/comctl32/treeview.c wine1.6-1.6.1/dlls/comctl32/treeview.c --- wine1.6-1.7.1-actually1.6/dlls/comctl32/treeview.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/comctl32/treeview.c 2013-11-15 19:30:24.000000000 +0000 @@ -3296,6 +3296,8 @@ TREEVIEW_RemoveAllChildren(infoPtr, item); item->cChildren = old_cChildren; } + if (!wasExpanded) + return FALSE; if (item->firstChild) { diff -Nru wine1.6-1.7.1-actually1.6/dlls/d3d9/d3d9_private.h wine1.6-1.6.1/dlls/d3d9/d3d9_private.h --- wine1.6-1.7.1-actually1.6/dlls/d3d9/d3d9_private.h 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/d3d9/d3d9_private.h 2013-11-15 19:30:24.000000000 +0000 @@ -180,7 +180,7 @@ struct d3d9_swapchain { - IDirect3DSwapChain9 IDirect3DSwapChain9_iface; + IDirect3DSwapChain9Ex IDirect3DSwapChain9Ex_iface; LONG refcount; struct wined3d_swapchain *wined3d_swapchain; IDirect3DDevice9Ex *parent_device; @@ -311,4 +311,9 @@ HRESULT query_init(struct d3d9_query *query, struct d3d9_device *device, D3DQUERYTYPE type) DECLSPEC_HIDDEN; +static inline struct d3d9_device *impl_from_IDirect3DDevice9Ex(IDirect3DDevice9Ex *iface) +{ + return CONTAINING_RECORD(iface, struct d3d9_device, IDirect3DDevice9Ex_iface); +} + #endif /* __WINE_D3D9_PRIVATE_H */ diff -Nru wine1.6-1.7.1-actually1.6/dlls/d3d9/device.c wine1.6-1.6.1/dlls/d3d9/device.c --- wine1.6-1.7.1-actually1.6/dlls/d3d9/device.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/d3d9/device.c 2013-11-15 19:30:24.000000000 +0000 @@ -222,11 +222,6 @@ swapchain_desc->auto_restore_display_mode = TRUE; } -static inline struct d3d9_device *impl_from_IDirect3DDevice9Ex(IDirect3DDevice9Ex *iface) -{ - return CONTAINING_RECORD(iface, struct d3d9_device, IDirect3DDevice9Ex_iface); -} - static HRESULT WINAPI d3d9_device_QueryInterface(IDirect3DDevice9Ex *iface, REFIID riid, void **out) { TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out); @@ -500,7 +495,7 @@ wined3d_swapchain_desc_from_present_parameters(&desc, present_parameters); if (SUCCEEDED(hr = d3d9_swapchain_create(device, &desc, &object))) - *swapchain = &object->IDirect3DSwapChain9_iface; + *swapchain = (IDirect3DSwapChain9 *)&object->IDirect3DSwapChain9Ex_iface; present_parameters_from_wined3d_swapchain_desc(present_parameters, &desc); return hr; @@ -520,8 +515,8 @@ if ((wined3d_swapchain = wined3d_device_get_swapchain(device->wined3d_device, swapchain_idx))) { swapchain_impl = wined3d_swapchain_get_parent(wined3d_swapchain); - *swapchain = &swapchain_impl->IDirect3DSwapChain9_iface; - IDirect3DSwapChain9_AddRef(*swapchain); + *swapchain = (IDirect3DSwapChain9 *)&swapchain_impl->IDirect3DSwapChain9Ex_iface; + IDirect3DSwapChain9Ex_AddRef(*swapchain); hr = D3D_OK; } else @@ -3409,7 +3404,7 @@ *swapchain = d3d_swapchain->wined3d_swapchain; wined3d_swapchain_incref(*swapchain); - IDirect3DSwapChain9_Release(&d3d_swapchain->IDirect3DSwapChain9_iface); + IDirect3DSwapChain9Ex_Release(&d3d_swapchain->IDirect3DSwapChain9Ex_iface); return hr; } diff -Nru wine1.6-1.7.1-actually1.6/dlls/d3d9/swapchain.c wine1.6-1.6.1/dlls/d3d9/swapchain.c --- wine1.6-1.7.1-actually1.6/dlls/d3d9/swapchain.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/d3d9/swapchain.c 2013-11-15 19:30:24.000000000 +0000 @@ -25,19 +25,38 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d9); -static inline struct d3d9_swapchain *impl_from_IDirect3DSwapChain9(IDirect3DSwapChain9 *iface) +static inline struct d3d9_swapchain *impl_from_IDirect3DSwapChain9Ex(IDirect3DSwapChain9Ex *iface) { - return CONTAINING_RECORD(iface, struct d3d9_swapchain, IDirect3DSwapChain9_iface); + return CONTAINING_RECORD(iface, struct d3d9_swapchain, IDirect3DSwapChain9Ex_iface); } -static HRESULT WINAPI d3d9_swapchain_QueryInterface(IDirect3DSwapChain9 *iface, REFIID riid, void **out) +static HRESULT WINAPI d3d9_swapchain_QueryInterface(IDirect3DSwapChain9Ex *iface, REFIID riid, void **out) { TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out); if (IsEqualGUID(riid, &IID_IDirect3DSwapChain9) || IsEqualGUID(riid, &IID_IUnknown)) { - IDirect3DSwapChain9_AddRef(iface); + IDirect3DSwapChain9Ex_AddRef(iface); + *out = iface; + return S_OK; + } + + if (IsEqualGUID(riid, &IID_IDirect3DSwapChain9Ex)) + { + struct d3d9_swapchain *swapchain = impl_from_IDirect3DSwapChain9Ex(iface); + struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(swapchain->parent_device); + + /* Find out if the creating d3d9 interface was created with Direct3DCreate9Ex. + * It doesn't matter with which function the device was created. */ + if (!device->d3d_parent->extended) + { + WARN("IDirect3D9 instance wasn't created with CreateDirect3D9Ex, returning E_NOINTERFACE.\n"); + *out = NULL; + return E_NOINTERFACE; + } + + IDirect3DSwapChain9Ex_AddRef(iface); *out = iface; return S_OK; } @@ -48,9 +67,9 @@ return E_NOINTERFACE; } -static ULONG WINAPI d3d9_swapchain_AddRef(IDirect3DSwapChain9 *iface) +static ULONG WINAPI d3d9_swapchain_AddRef(IDirect3DSwapChain9Ex *iface) { - struct d3d9_swapchain *swapchain = impl_from_IDirect3DSwapChain9(iface); + struct d3d9_swapchain *swapchain = impl_from_IDirect3DSwapChain9Ex(iface); ULONG refcount = InterlockedIncrement(&swapchain->refcount); TRACE("%p increasing refcount to %u.\n", iface, refcount); @@ -68,9 +87,9 @@ return refcount; } -static ULONG WINAPI d3d9_swapchain_Release(IDirect3DSwapChain9 *iface) +static ULONG WINAPI d3d9_swapchain_Release(IDirect3DSwapChain9Ex *iface) { - struct d3d9_swapchain *swapchain = impl_from_IDirect3DSwapChain9(iface); + struct d3d9_swapchain *swapchain = impl_from_IDirect3DSwapChain9Ex(iface); ULONG refcount = InterlockedDecrement(&swapchain->refcount); TRACE("%p decreasing refcount to %u.\n", iface, refcount); @@ -91,11 +110,11 @@ return refcount; } -static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_swapchain_Present(IDirect3DSwapChain9 *iface, +static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_swapchain_Present(IDirect3DSwapChain9Ex *iface, const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, const RGNDATA *dirty_region, DWORD flags) { - struct d3d9_swapchain *swapchain = impl_from_IDirect3DSwapChain9(iface); + struct d3d9_swapchain *swapchain = impl_from_IDirect3DSwapChain9Ex(iface); HRESULT hr; TRACE("iface %p, src_rect %s, dst_rect %s, dst_window_override %p, dirty_region %p, flags %#x.\n", @@ -110,9 +129,9 @@ return hr; } -static HRESULT WINAPI d3d9_swapchain_GetFrontBufferData(IDirect3DSwapChain9 *iface, IDirect3DSurface9 *surface) +static HRESULT WINAPI d3d9_swapchain_GetFrontBufferData(IDirect3DSwapChain9Ex *iface, IDirect3DSurface9 *surface) { - struct d3d9_swapchain *swapchain = impl_from_IDirect3DSwapChain9(iface); + struct d3d9_swapchain *swapchain = impl_from_IDirect3DSwapChain9Ex(iface); struct d3d9_surface *dst = unsafe_impl_from_IDirect3DSurface9(surface); HRESULT hr; @@ -125,10 +144,10 @@ return hr; } -static HRESULT WINAPI d3d9_swapchain_GetBackBuffer(IDirect3DSwapChain9 *iface, +static HRESULT WINAPI d3d9_swapchain_GetBackBuffer(IDirect3DSwapChain9Ex *iface, UINT backbuffer_idx, D3DBACKBUFFER_TYPE backbuffer_type, IDirect3DSurface9 **backbuffer) { - struct d3d9_swapchain *swapchain = impl_from_IDirect3DSwapChain9(iface); + struct d3d9_swapchain *swapchain = impl_from_IDirect3DSwapChain9Ex(iface); struct wined3d_surface *wined3d_surface = NULL; struct d3d9_surface *surface_impl; HRESULT hr = D3D_OK; @@ -153,9 +172,9 @@ return hr; } -static HRESULT WINAPI d3d9_swapchain_GetRasterStatus(IDirect3DSwapChain9 *iface, D3DRASTER_STATUS *raster_status) +static HRESULT WINAPI d3d9_swapchain_GetRasterStatus(IDirect3DSwapChain9Ex *iface, D3DRASTER_STATUS *raster_status) { - struct d3d9_swapchain *swapchain = impl_from_IDirect3DSwapChain9(iface); + struct d3d9_swapchain *swapchain = impl_from_IDirect3DSwapChain9Ex(iface); HRESULT hr; TRACE("iface %p, raster_status %p.\n", iface, raster_status); @@ -168,9 +187,9 @@ return hr; } -static HRESULT WINAPI d3d9_swapchain_GetDisplayMode(IDirect3DSwapChain9 *iface, D3DDISPLAYMODE *mode) +static HRESULT WINAPI d3d9_swapchain_GetDisplayMode(IDirect3DSwapChain9Ex *iface, D3DDISPLAYMODE *mode) { - struct d3d9_swapchain *swapchain = impl_from_IDirect3DSwapChain9(iface); + struct d3d9_swapchain *swapchain = impl_from_IDirect3DSwapChain9Ex(iface); struct wined3d_display_mode wined3d_mode; HRESULT hr; @@ -191,9 +210,9 @@ return hr; } -static HRESULT WINAPI d3d9_swapchain_GetDevice(IDirect3DSwapChain9 *iface, IDirect3DDevice9 **device) +static HRESULT WINAPI d3d9_swapchain_GetDevice(IDirect3DSwapChain9Ex *iface, IDirect3DDevice9 **device) { - struct d3d9_swapchain *swapchain = impl_from_IDirect3DSwapChain9(iface); + struct d3d9_swapchain *swapchain = impl_from_IDirect3DSwapChain9Ex(iface); TRACE("iface %p, device %p.\n", iface, device); @@ -205,10 +224,10 @@ return D3D_OK; } -static HRESULT WINAPI d3d9_swapchain_GetPresentParameters(IDirect3DSwapChain9 *iface, +static HRESULT WINAPI d3d9_swapchain_GetPresentParameters(IDirect3DSwapChain9Ex *iface, D3DPRESENT_PARAMETERS *parameters) { - struct d3d9_swapchain *swapchain = impl_from_IDirect3DSwapChain9(iface); + struct d3d9_swapchain *swapchain = impl_from_IDirect3DSwapChain9Ex(iface); struct wined3d_swapchain_desc desc; TRACE("iface %p, parameters %p.\n", iface, parameters); @@ -221,12 +240,64 @@ return D3D_OK; } +static HRESULT WINAPI d3d9_swapchain_GetLastPresentCount(IDirect3DSwapChain9Ex *iface, + UINT *last_present_count) +{ + FIXME("iface %p, last_present_count %p, stub!\n", iface, last_present_count); + + if (last_present_count) + *last_present_count = 0; + + return D3D_OK; +} + +static HRESULT WINAPI d3d9_swapchain_GetPresentStatistics(IDirect3DSwapChain9Ex *iface, + D3DPRESENTSTATS *present_stats) +{ + FIXME("iface %p, present_stats %p, stub!\n", iface, present_stats); + + if (present_stats) + memset(present_stats, 0, sizeof(*present_stats)); + + return D3D_OK; +} + +static HRESULT WINAPI d3d9_swapchain_GetDisplayModeEx(IDirect3DSwapChain9Ex *iface, + D3DDISPLAYMODEEX *mode, D3DDISPLAYROTATION *rotation) +{ + struct d3d9_swapchain *swapchain = impl_from_IDirect3DSwapChain9Ex(iface); + struct wined3d_display_mode wined3d_mode; + HRESULT hr; + + TRACE("iface %p, mode %p, rotation %p.\n", iface, mode, rotation); + + if (mode->Size != sizeof(*mode)) + return D3DERR_INVALIDCALL; + + wined3d_mutex_lock(); + hr = wined3d_swapchain_get_display_mode(swapchain->wined3d_swapchain, &wined3d_mode, + (enum wined3d_display_rotation *)rotation); + wined3d_mutex_unlock(); + + if (SUCCEEDED(hr)) + { + mode->Width = wined3d_mode.width; + mode->Height = wined3d_mode.height; + mode->RefreshRate = wined3d_mode.refresh_rate; + mode->Format = d3dformat_from_wined3dformat(wined3d_mode.format_id); + mode->ScanLineOrdering = wined3d_mode.scanline_ordering; + } + + return hr; +} -static const struct IDirect3DSwapChain9Vtbl d3d9_swapchain_vtbl = +static const struct IDirect3DSwapChain9ExVtbl d3d9_swapchain_vtbl = { + /* IUnknown */ d3d9_swapchain_QueryInterface, d3d9_swapchain_AddRef, d3d9_swapchain_Release, + /* IDirect3DSwapChain9 */ d3d9_swapchain_Present, d3d9_swapchain_GetFrontBufferData, d3d9_swapchain_GetBackBuffer, @@ -234,6 +305,10 @@ d3d9_swapchain_GetDisplayMode, d3d9_swapchain_GetDevice, d3d9_swapchain_GetPresentParameters, + /* IDirect3DSwapChain9Ex */ + d3d9_swapchain_GetLastPresentCount, + d3d9_swapchain_GetPresentStatistics, + d3d9_swapchain_GetDisplayModeEx }; static void STDMETHODCALLTYPE d3d9_swapchain_wined3d_object_released(void *parent) @@ -252,7 +327,7 @@ HRESULT hr; swapchain->refcount = 1; - swapchain->IDirect3DSwapChain9_iface.lpVtbl = &d3d9_swapchain_vtbl; + swapchain->IDirect3DSwapChain9Ex_iface.lpVtbl = &d3d9_swapchain_vtbl; wined3d_mutex_lock(); hr = wined3d_swapchain_create(device->wined3d_device, desc, swapchain, diff -Nru wine1.6-1.7.1-actually1.6/dlls/ddraw/ddraw.c wine1.6-1.6.1/dlls/ddraw/ddraw.c --- wine1.6-1.7.1-actually1.6/dlls/ddraw/ddraw.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/ddraw/ddraw.c 2013-11-15 19:30:24.000000000 +0000 @@ -778,21 +778,29 @@ wined3d_mutex_lock(); + if (ddraw->flags & DDRAW_SCL_RECURSIVE) + { + WARN("Recursive call, returning DD_OK.\n"); + hr = DD_OK; + goto done; + } + ddraw->flags |= DDRAW_SCL_RECURSIVE; + /* Tests suggest that we need one of them: */ if(!(cooplevel & (DDSCL_SETFOCUSWINDOW | DDSCL_NORMAL | DDSCL_EXCLUSIVE ))) { TRACE("Incorrect cooplevel flags, returning DDERR_INVALIDPARAMS\n"); - wined3d_mutex_unlock(); - return DDERR_INVALIDPARAMS; + hr = DDERR_INVALIDPARAMS; + goto done; } if ((cooplevel & DDSCL_CREATEDEVICEWINDOW) && !(cooplevel & DDSCL_EXCLUSIVE)) { WARN("DDSCL_CREATEDEVICEWINDOW requires DDSCL_EXCLUSIVE.\n"); - wined3d_mutex_unlock(); - return DDERR_INVALIDPARAMS; + hr = DDERR_INVALIDPARAMS; + goto done; } /* Handle those levels first which set various hwnds */ @@ -810,13 +818,12 @@ | DDSCL_FULLSCREEN)) { WARN("Called with incompatible flags, returning DDERR_INVALIDPARAMS.\n"); - wined3d_mutex_unlock(); - return DDERR_INVALIDPARAMS; + hr = DDERR_INVALIDPARAMS; + goto done; } hr = ddraw_set_focus_window(ddraw, window); - wined3d_mutex_unlock(); - return hr; + goto done; } if (cooplevel & DDSCL_EXCLUSIVE) @@ -824,8 +831,8 @@ if (!(cooplevel & DDSCL_FULLSCREEN) || !(window || (cooplevel & DDSCL_CREATEDEVICEWINDOW))) { WARN("DDSCL_EXCLUSIVE requires DDSCL_FULLSCREEN and a window.\n"); - wined3d_mutex_unlock(); - return DDERR_INVALIDPARAMS; + hr = DDERR_INVALIDPARAMS; + goto done; } if (cooplevel & DDSCL_CREATEDEVICEWINDOW) @@ -835,8 +842,8 @@ if (!ddraw->focuswindow && !(cooplevel & DDSCL_SETFOCUSWINDOW)) { WARN("No focus window set.\n"); - wined3d_mutex_unlock(); - return DDERR_NOFOCUSWINDOW; + hr = DDERR_NOFOCUSWINDOW; + goto done; } device_window = CreateWindowExA(0, DDRAW_WINDOW_CLASS_NAME, "DirectDrawDeviceWnd", @@ -845,8 +852,8 @@ if (!device_window) { ERR("Failed to create window, last error %#x.\n", GetLastError()); - wined3d_mutex_unlock(); - return E_FAIL; + hr = E_FAIL; + goto done; } ShowWindow(device_window, SW_SHOW); @@ -861,15 +868,12 @@ { if (!window) { - wined3d_mutex_unlock(); - return DDERR_NOHWND; + hr = DDERR_NOHWND; + goto done; } if (FAILED(hr = ddraw_set_focus_window(ddraw, window))) - { - wined3d_mutex_unlock(); - return hr; - } + goto done; } window = device_window; @@ -910,8 +914,7 @@ if (FAILED(hr = wined3d_stateblock_create(ddraw->wined3d_device, WINED3D_SBT_ALL, &stateblock))) { ERR("Failed to create stateblock, hr %#x.\n", hr); - wined3d_mutex_unlock(); - return hr; + goto done; } wined3d_stateblock_capture(stateblock); @@ -968,8 +971,7 @@ if (FAILED(hr)) { ERR("Failed to acquire focus window, hr %#x.\n", hr); - wined3d_mutex_unlock(); - return hr; + goto done; } } @@ -991,9 +993,12 @@ ddraw->dest_window = window; TRACE("SetCooperativeLevel retuning DD_OK\n"); + hr = DD_OK; +done: + ddraw->flags &= ~DDRAW_SCL_RECURSIVE; wined3d_mutex_unlock(); - return DD_OK; + return hr; } static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND window, DWORD flags) diff -Nru wine1.6-1.7.1-actually1.6/dlls/ddraw/ddraw_private.h wine1.6-1.6.1/dlls/ddraw/ddraw_private.h --- wine1.6-1.7.1-actually1.6/dlls/ddraw/ddraw_private.h 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/ddraw/ddraw_private.h 2013-11-15 19:30:24.000000000 +0000 @@ -54,6 +54,7 @@ #define DDRAW_RESTORE_MODE 0x00000004 #define DDRAW_NO3D 0x00000008 #define DDRAW_SCL_DDRAW1 0x00000010 +#define DDRAW_SCL_RECURSIVE 0x00000020 struct ddraw { diff -Nru wine1.6-1.7.1-actually1.6/dlls/dsound/capture.c wine1.6-1.6.1/dlls/dsound/capture.c --- wine1.6-1.7.1-actually1.6/dlls/dsound/capture.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/dsound/capture.c 2013-11-15 19:30:24.000000000 +0000 @@ -986,14 +986,6 @@ EnterCriticalSection(&DSOUND_capturers_lock); - LIST_FOR_EACH_ENTRY(device, &DSOUND_capturers, DirectSoundCaptureDevice, entry){ - if(IsEqualGUID(&device->guid, &devGUID)){ - IMMDevice_Release(mmdevice); - LeaveCriticalSection(&DSOUND_capturers_lock); - return DSERR_ALLOCATED; - } - } - hr = DirectSoundCaptureDevice_Create(&device); if (hr != DS_OK) { WARN("DirectSoundCaptureDevice_Create failed\n"); diff -Nru wine1.6-1.7.1-actually1.6/dlls/dxdiagn/provider.c wine1.6-1.6.1/dlls/dxdiagn/provider.c --- wine1.6-1.7.1-actually1.6/dlls/dxdiagn/provider.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/dxdiagn/provider.c 2013-11-15 19:30:24.000000000 +0000 @@ -66,6 +66,9 @@ static const WCHAR szRevisionId[] = {'s','z','R','e','v','i','s','i','o','n','I','d',0}; static const WCHAR dwRefreshRate[] = {'d','w','R','e','f','r','e','s','h','R','a','t','e',0}; static const WCHAR szManufacturer[] = {'s','z','M','a','n','u','f','a','c','t','u','r','e','r',0}; +static const WCHAR szChipType[] = {'s','z','C','h','i','p','T','y','p','e',0}; +static const WCHAR szDACType[] = {'s','z','D','A','C','T','y','p','e',0}; +static const WCHAR szRevision[] = {'s','z','R','e','v','i','s','i','o','n',0}; struct IDxDiagProviderImpl { @@ -1016,6 +1019,18 @@ if (FAILED(hr)) goto cleanup; + hr = add_bstr_property(display_adapter, szChipType, szEmpty); + if (FAILED(hr)) + goto cleanup; + + hr = add_bstr_property(display_adapter, szDACType, szEmpty); + if (FAILED(hr)) + goto cleanup; + + hr = add_bstr_property(display_adapter, szRevision, szEmpty); + if (FAILED(hr)) + goto cleanup; + if (!get_texture_memory(&adapter_info.DeviceIdentifier, &available_mem)) WARN("get_texture_memory helper failed\n"); @@ -1042,7 +1057,7 @@ static const WCHAR *empty_properties[] = {szDeviceIdentifier, szVendorId, szDeviceId, szKeyDeviceKey, szKeyDeviceID, szDriverName, szDriverVersion, szSubSysId, szRevisionId, - szManufacturer}; + szManufacturer, szChipType, szDACType, szRevision}; IDxDiagContainerImpl_Container *display_adapter; HRESULT hr; diff -Nru wine1.6-1.7.1-actually1.6/dlls/gdi32/Makefile.in wine1.6-1.6.1/dlls/gdi32/Makefile.in --- wine1.6-1.7.1-actually1.6/dlls/gdi32/Makefile.in 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/gdi32/Makefile.in 2013-11-15 19:30:24.000000000 +0000 @@ -3,7 +3,7 @@ IMPORTLIB = gdi32 IMPORTS = advapi32 EXTRAINCL = @FREETYPE_CFLAGS@ @FONTCONFIGINCL@ -EXTRALIBS = @CARBONLIB@ +EXTRALIBS = @CARBONLIB@ @APPKITLIB@ DELAYIMPORTS = usp10 C_SRCS = \ diff -Nru wine1.6-1.7.1-actually1.6/dlls/gdi32/dib.c wine1.6-1.6.1/dlls/gdi32/dib.c --- wine1.6-1.7.1-actually1.6/dlls/gdi32/dib.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/gdi32/dib.c 2013-11-15 19:30:24.000000000 +0000 @@ -128,6 +128,11 @@ if (!info->biPlanes) return FALSE; + /* check for size overflow */ + if (!info->biBitCount) return FALSE; + if (UINT_MAX / info->biBitCount < info->biWidth) return FALSE; + if (UINT_MAX / get_dib_stride( info->biWidth, info->biBitCount ) < abs( info->biHeight )) return FALSE; + switch (info->biBitCount) { case 1: diff -Nru wine1.6-1.7.1-actually1.6/dlls/gdi32/dibdrv/graphics.c wine1.6-1.6.1/dlls/gdi32/dibdrv/graphics.c --- wine1.6-1.7.1-actually1.6/dlls/gdi32/dibdrv/graphics.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/gdi32/dibdrv/graphics.c 2013-11-15 19:30:24.000000000 +0000 @@ -1285,6 +1285,15 @@ TRACE("(%p, %d, %d, %d, %d)\n", dev, left, top, right, bottom); + if (GetGraphicsMode( dev->hdc ) == GM_ADVANCED) + { + pts[0].x = pts[3].x = left; + pts[0].y = pts[1].y = top; + pts[1].x = pts[2].x = right; + pts[2].y = pts[3].y = bottom; + return dibdrv_Polygon( dev, pts, 4 ); + } + if (!get_pen_device_rect( pdev, &rect, left, top, right, bottom )) return TRUE; if (pdev->pen_uses_region && !(outline = CreateRectRgn( 0, 0, 0, 0 ))) return FALSE; diff -Nru wine1.6-1.7.1-actually1.6/dlls/gdi32/font.c wine1.6-1.6.1/dlls/gdi32/font.c --- wine1.6-1.7.1-actually1.6/dlls/gdi32/font.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/gdi32/font.c 2013-11-15 19:30:24.000000000 +0000 @@ -69,6 +69,18 @@ return GDI_ROUND(floatHeight); } +/* scale width and height but don't mirror them */ + +static inline INT width_to_LP( DC *dc, INT width ) +{ + return GDI_ROUND( (double)width * fabs( dc->xformVport2World.eM11 )); +} + +static inline INT height_to_LP( DC *dc, INT height ) +{ + return GDI_ROUND( (double)height * fabs( dc->xformVport2World.eM22 )); +} + static inline INT INTERNAL_XWSTODS(DC *dc, INT width) { POINT pt[2]; @@ -1186,7 +1198,7 @@ for (i = 0; i < count; i++) { unsigned int dx = abs( INTERNAL_XDSTOWS( dc, pos[i] )) + (i + 1) * dc->charExtra; - if (dx > (unsigned int)max_ext) break; + if (nfit && dx > (unsigned int)max_ext) break; if (dxs) dxs[i] = dx; } if (nfit) *nfit = i; @@ -1323,7 +1335,7 @@ for (i = 0; i < count; i++) { unsigned int dx = abs( INTERNAL_XDSTOWS( dc, pos[i] )) + (i + 1) * dc->charExtra; - if (dx > (unsigned int)max_ext) break; + if (nfit && dx > (unsigned int)max_ext) break; if (dxs) dxs[i] = dx; } if (nfit) *nfit = i; @@ -1372,26 +1384,17 @@ metrics->tmDigitizedAspectX = GetDeviceCaps(hdc, LOGPIXELSX); metrics->tmDigitizedAspectY = GetDeviceCaps(hdc, LOGPIXELSY); - -#define WDPTOLP(x) ((x<0)? \ - (-abs(INTERNAL_XDSTOWS(dc, (x)))): \ - (abs(INTERNAL_XDSTOWS(dc, (x))))) -#define HDPTOLP(y) ((y<0)? \ - (-abs(INTERNAL_YDSTOWS(dc, (y)))): \ - (abs(INTERNAL_YDSTOWS(dc, (y))))) - - metrics->tmHeight = HDPTOLP(metrics->tmHeight); - metrics->tmAscent = HDPTOLP(metrics->tmAscent); - metrics->tmDescent = HDPTOLP(metrics->tmDescent); - metrics->tmInternalLeading = HDPTOLP(metrics->tmInternalLeading); - metrics->tmExternalLeading = HDPTOLP(metrics->tmExternalLeading); - metrics->tmAveCharWidth = WDPTOLP(metrics->tmAveCharWidth); - metrics->tmMaxCharWidth = WDPTOLP(metrics->tmMaxCharWidth); - metrics->tmOverhang = WDPTOLP(metrics->tmOverhang); + metrics->tmHeight = height_to_LP( dc, metrics->tmHeight ); + metrics->tmAscent = height_to_LP( dc, metrics->tmAscent ); + metrics->tmDescent = height_to_LP( dc, metrics->tmDescent ); + metrics->tmInternalLeading = height_to_LP( dc, metrics->tmInternalLeading ); + metrics->tmExternalLeading = height_to_LP( dc, metrics->tmExternalLeading ); + metrics->tmAveCharWidth = width_to_LP( dc, metrics->tmAveCharWidth ); + metrics->tmMaxCharWidth = width_to_LP( dc, metrics->tmMaxCharWidth ); + metrics->tmOverhang = width_to_LP( dc, metrics->tmOverhang ); ret = TRUE; -#undef WDPTOLP -#undef HDPTOLP - TRACE("text metrics:\n" + + TRACE("text metrics:\n" " Weight = %03i\t FirstChar = %i\t AveCharWidth = %i\n" " Italic = % 3i\t LastChar = %i\t\t MaxCharWidth = %i\n" " UnderLined = %01i\t DefaultChar = %i\t Overhang = %i\n" @@ -1622,46 +1625,38 @@ { output->otmTextMetrics.tmDigitizedAspectX = GetDeviceCaps(hdc, LOGPIXELSX); output->otmTextMetrics.tmDigitizedAspectY = GetDeviceCaps(hdc, LOGPIXELSY); - -#define WDPTOLP(x) ((x<0)? \ - (-abs(INTERNAL_XDSTOWS(dc, (x)))): \ - (abs(INTERNAL_XDSTOWS(dc, (x))))) -#define HDPTOLP(y) ((y<0)? \ - (-abs(INTERNAL_YDSTOWS(dc, (y)))): \ - (abs(INTERNAL_YDSTOWS(dc, (y))))) - - output->otmTextMetrics.tmHeight = HDPTOLP(output->otmTextMetrics.tmHeight); - output->otmTextMetrics.tmAscent = HDPTOLP(output->otmTextMetrics.tmAscent); - output->otmTextMetrics.tmDescent = HDPTOLP(output->otmTextMetrics.tmDescent); - output->otmTextMetrics.tmInternalLeading = HDPTOLP(output->otmTextMetrics.tmInternalLeading); - output->otmTextMetrics.tmExternalLeading = HDPTOLP(output->otmTextMetrics.tmExternalLeading); - output->otmTextMetrics.tmAveCharWidth = WDPTOLP(output->otmTextMetrics.tmAveCharWidth); - output->otmTextMetrics.tmMaxCharWidth = WDPTOLP(output->otmTextMetrics.tmMaxCharWidth); - output->otmTextMetrics.tmOverhang = WDPTOLP(output->otmTextMetrics.tmOverhang); - output->otmAscent = HDPTOLP(output->otmAscent); - output->otmDescent = HDPTOLP(output->otmDescent); - output->otmLineGap = abs(INTERNAL_YDSTOWS(dc,output->otmLineGap)); - output->otmsCapEmHeight = abs(INTERNAL_YDSTOWS(dc,output->otmsCapEmHeight)); - output->otmsXHeight = abs(INTERNAL_YDSTOWS(dc,output->otmsXHeight)); - output->otmrcFontBox.top = HDPTOLP(output->otmrcFontBox.top); - output->otmrcFontBox.bottom = HDPTOLP(output->otmrcFontBox.bottom); - output->otmrcFontBox.left = WDPTOLP(output->otmrcFontBox.left); - output->otmrcFontBox.right = WDPTOLP(output->otmrcFontBox.right); - output->otmMacAscent = HDPTOLP(output->otmMacAscent); - output->otmMacDescent = HDPTOLP(output->otmMacDescent); - output->otmMacLineGap = abs(INTERNAL_YDSTOWS(dc,output->otmMacLineGap)); - output->otmptSubscriptSize.x = WDPTOLP(output->otmptSubscriptSize.x); - output->otmptSubscriptSize.y = HDPTOLP(output->otmptSubscriptSize.y); - output->otmptSubscriptOffset.x = WDPTOLP(output->otmptSubscriptOffset.x); - output->otmptSubscriptOffset.y = HDPTOLP(output->otmptSubscriptOffset.y); - output->otmptSuperscriptSize.x = WDPTOLP(output->otmptSuperscriptSize.x); - output->otmptSuperscriptSize.y = HDPTOLP(output->otmptSuperscriptSize.y); - output->otmptSuperscriptOffset.x = WDPTOLP(output->otmptSuperscriptOffset.x); - output->otmptSuperscriptOffset.y = HDPTOLP(output->otmptSuperscriptOffset.y); - output->otmsStrikeoutSize = abs(INTERNAL_YDSTOWS(dc,output->otmsStrikeoutSize)); - output->otmsStrikeoutPosition = HDPTOLP(output->otmsStrikeoutPosition); - output->otmsUnderscoreSize = HDPTOLP(output->otmsUnderscoreSize); - output->otmsUnderscorePosition = HDPTOLP(output->otmsUnderscorePosition); + output->otmTextMetrics.tmHeight = height_to_LP( dc, output->otmTextMetrics.tmHeight ); + output->otmTextMetrics.tmAscent = height_to_LP( dc, output->otmTextMetrics.tmAscent ); + output->otmTextMetrics.tmDescent = height_to_LP( dc, output->otmTextMetrics.tmDescent ); + output->otmTextMetrics.tmInternalLeading = height_to_LP( dc, output->otmTextMetrics.tmInternalLeading ); + output->otmTextMetrics.tmExternalLeading = height_to_LP( dc, output->otmTextMetrics.tmExternalLeading ); + output->otmTextMetrics.tmAveCharWidth = width_to_LP( dc, output->otmTextMetrics.tmAveCharWidth ); + output->otmTextMetrics.tmMaxCharWidth = width_to_LP( dc, output->otmTextMetrics.tmMaxCharWidth ); + output->otmTextMetrics.tmOverhang = width_to_LP( dc, output->otmTextMetrics.tmOverhang ); + output->otmAscent = height_to_LP( dc, output->otmAscent); + output->otmDescent = height_to_LP( dc, output->otmDescent); + output->otmLineGap = abs(INTERNAL_YDSTOWS(dc,output->otmLineGap)); + output->otmsCapEmHeight = abs(INTERNAL_YDSTOWS(dc,output->otmsCapEmHeight)); + output->otmsXHeight = abs(INTERNAL_YDSTOWS(dc,output->otmsXHeight)); + output->otmrcFontBox.top = height_to_LP( dc, output->otmrcFontBox.top); + output->otmrcFontBox.bottom = height_to_LP( dc, output->otmrcFontBox.bottom); + output->otmrcFontBox.left = width_to_LP( dc, output->otmrcFontBox.left); + output->otmrcFontBox.right = width_to_LP( dc, output->otmrcFontBox.right); + output->otmMacAscent = height_to_LP( dc, output->otmMacAscent); + output->otmMacDescent = height_to_LP( dc, output->otmMacDescent); + output->otmMacLineGap = abs(INTERNAL_YDSTOWS(dc,output->otmMacLineGap)); + output->otmptSubscriptSize.x = width_to_LP( dc, output->otmptSubscriptSize.x); + output->otmptSubscriptSize.y = height_to_LP( dc, output->otmptSubscriptSize.y); + output->otmptSubscriptOffset.x = width_to_LP( dc, output->otmptSubscriptOffset.x); + output->otmptSubscriptOffset.y = height_to_LP( dc, output->otmptSubscriptOffset.y); + output->otmptSuperscriptSize.x = width_to_LP( dc, output->otmptSuperscriptSize.x); + output->otmptSuperscriptSize.y = height_to_LP( dc, output->otmptSuperscriptSize.y); + output->otmptSuperscriptOffset.x = width_to_LP( dc, output->otmptSuperscriptOffset.x); + output->otmptSuperscriptOffset.y = height_to_LP( dc, output->otmptSuperscriptOffset.y); + output->otmsStrikeoutSize = abs(INTERNAL_YDSTOWS(dc,output->otmsStrikeoutSize)); + output->otmsStrikeoutPosition = height_to_LP( dc, output->otmsStrikeoutPosition); + output->otmsUnderscoreSize = height_to_LP( dc, output->otmsUnderscoreSize); + output->otmsUnderscorePosition = height_to_LP( dc, output->otmsUnderscorePosition); #undef WDPTOLP #undef HDPTOLP if(output != lpOTM) @@ -1750,7 +1745,7 @@ { /* convert device units to logical */ for( i = firstChar; i <= lastChar; i++, buffer++ ) - *buffer = INTERNAL_XDSTOWS(dc, *buffer); + *buffer = width_to_LP( dc, *buffer ); } release_dc_ptr( dc ); return ret; @@ -2705,9 +2700,9 @@ { /* convert device units to logical */ for( i = firstChar; i <= lastChar; i++, abc++ ) { - abc->abcA = INTERNAL_XDSTOWS(dc, abc->abcA); - abc->abcB = INTERNAL_XDSTOWS(dc, abc->abcB); - abc->abcC = INTERNAL_XDSTOWS(dc, abc->abcC); + abc->abcA = width_to_LP(dc, abc->abcA); + abc->abcB = width_to_LP(dc, abc->abcB); + abc->abcC = width_to_LP(dc, abc->abcC); } } @@ -2757,9 +2752,9 @@ { /* convert device units to logical */ for( i = 0; i < count; i++, abc++ ) { - abc->abcA = INTERNAL_XDSTOWS(dc, abc->abcA); - abc->abcB = INTERNAL_XDSTOWS(dc, abc->abcB); - abc->abcC = INTERNAL_XDSTOWS(dc, abc->abcC); + abc->abcA = width_to_LP(dc, abc->abcA); + abc->abcB = width_to_LP(dc, abc->abcB); + abc->abcC = width_to_LP(dc, abc->abcC); } } @@ -3357,11 +3352,12 @@ if (ret) { /* convert device units to logical */ + FLOAT scale = fabs( dc->xformVport2World.eM11 ); for (i = first; i <= last; i++, abcf++) { - abcf->abcfA = abc[i - first].abcA * dc->xformVport2World.eM11; - abcf->abcfB = abc[i - first].abcB * dc->xformVport2World.eM11; - abcf->abcfC = abc[i - first].abcC * dc->xformVport2World.eM11; + abcf->abcfA = abc[i - first].abcA * scale; + abcf->abcfB = abc[i - first].abcB * scale; + abcf->abcfC = abc[i - first].abcC * scale; } } HeapFree( GetProcessHeap(), 0, abc ); diff -Nru wine1.6-1.7.1-actually1.6/dlls/gdi32/freetype.c wine1.6-1.6.1/dlls/gdi32/freetype.c --- wine1.6-1.7.1-actually1.6/dlls/gdi32/freetype.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/gdi32/freetype.c 2013-11-15 19:30:24.000000000 +0000 @@ -157,7 +157,6 @@ MAKE_FUNCPTR(FT_Done_Face); MAKE_FUNCPTR(FT_Get_Char_Index); MAKE_FUNCPTR(FT_Get_First_Char); -MAKE_FUNCPTR(FT_Get_Module); MAKE_FUNCPTR(FT_Get_Next_Char); MAKE_FUNCPTR(FT_Get_Sfnt_Name); MAKE_FUNCPTR(FT_Get_Sfnt_Name_Count); @@ -915,14 +914,6 @@ FT_TrueTypeEngineType type = pFT_Get_TrueType_Engine_Type(library); enabled = (type == FT_TRUETYPE_ENGINE_TYPE_PATENTED); } -#ifdef FT_DRIVER_HAS_HINTER - else - { - /* otherwise if we've been compiled with < 2.2.0 headers use the internal macro */ - FT_Module mod = pFT_Get_Module(library, "truetype"); - enabled = (mod && FT_DRIVER_HAS_HINTER(mod)); - } -#endif else enabled = FALSE; TRACE("hinting is %senabled\n", enabled ? "" : "NOT "); } @@ -1306,10 +1297,12 @@ static int match_name_table_language( const FT_SfntName *name, LANGID lang ) { LANGID name_lang; + int res = 0; switch (name->platform_id) { case TT_PLATFORM_MICROSOFT: + res += 5; /* prefer the Microsoft name */ switch (name->encoding_id) { case TT_MS_ID_UNICODE_CS: @@ -1326,6 +1319,7 @@ name_lang = mac_langid_table[name->language_id]; break; case TT_PLATFORM_APPLE_UNICODE: + res += 2; /* prefer Unicode encodings */ switch (name->encoding_id) { case TT_APPLE_ID_DEFAULT: @@ -1341,10 +1335,10 @@ default: return 0; } - if (name_lang == lang) return 3; - if (PRIMARYLANGID( name_lang ) == PRIMARYLANGID( lang )) return 2; - if (name_lang == MAKELANGID( LANG_ENGLISH, SUBLANG_DEFAULT )) return 1; - return 0; + if (name_lang == lang) res += 30; + else if (PRIMARYLANGID( name_lang ) == PRIMARYLANGID( lang )) res += 20; + else if (name_lang == MAKELANGID( LANG_ENGLISH, SUBLANG_DEFAULT )) res += 10; + return res; } static WCHAR *copy_name_table_string( const FT_SfntName *name ) @@ -3889,7 +3883,6 @@ LOAD_FUNCPTR(FT_Done_Face) LOAD_FUNCPTR(FT_Get_Char_Index) LOAD_FUNCPTR(FT_Get_First_Char) - LOAD_FUNCPTR(FT_Get_Module) LOAD_FUNCPTR(FT_Get_Next_Char) LOAD_FUNCPTR(FT_Get_Sfnt_Name) LOAD_FUNCPTR(FT_Get_Sfnt_Name_Count) @@ -4505,6 +4498,8 @@ TRACE("Ratios[%d] %d %d : %d -> %d\n", i, ratio.bCharSet, ratio.xRatio, ratio.yStartRatio, ratio.yEndRatio); + if (!ratio.bCharSet) continue; + if((ratio.xRatio == 0 && ratio.yStartRatio == 0 && ratio.yEndRatio == 0) || @@ -4519,10 +4514,7 @@ } } - if(offset == -1) { - FIXME("No suitable ratio found\n"); - return ppem; - } + if(offset == -1) return 0; if(get_font_data(font, MS_VDMX_TAG, offset, &group, 4) != GDI_ERROR) { USHORT recs; @@ -4570,6 +4562,31 @@ ppem = 0; TRACE("ppem not found for height %d\n", height); } + } else { + ppem = -height; + if(ppem < startsz || ppem > endsz) + { + ppem = 0; + goto end; + } + + for(i = 0; i < recs; i++) { + USHORT yPelHeight; + yPelHeight = GET_BE_WORD(vTable[i * 3]); + + if(yPelHeight > ppem) + { + ppem = 0; + break; /* failed */ + } + + if(yPelHeight == ppem) { + font->yMax = GET_BE_WORD(vTable[(i * 3) + 1]); + font->yMin = GET_BE_WORD(vTable[(i * 3) + 2]); + TRACE("ppem %d found; yMax=%d yMin=%d\n", ppem, font->yMax, font->yMin); + break; + } + } } end: HeapFree(GetProcessHeap(), 0, vTable); diff -Nru wine1.6-1.7.1-actually1.6/dlls/gdiplus/graphics.c wine1.6-1.6.1/dlls/gdiplus/graphics.c --- wine1.6-1.7.1-actually1.6/dlls/gdiplus/graphics.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/gdiplus/graphics.c 2013-11-15 19:30:24.000000000 +0000 @@ -4988,7 +4988,8 @@ if (scaled_rect.Height >= 1 << 23) scaled_rect.Height = 1 << 23; if (!(format_flags & StringFormatFlagsNoClip) && - scaled_rect.Width != 1 << 23 && scaled_rect.Height != 1 << 23) + scaled_rect.Width != 1 << 23 && scaled_rect.Height != 1 << 23 && + rect->Width > 0.0 && rect->Height > 0.0) { /* FIXME: If only the width or only the height is 0, we should probably still clip */ rgn = CreatePolygonRgn(corners, 4, ALTERNATE); diff -Nru wine1.6-1.7.1-actually1.6/dlls/gdiplus/region.c wine1.6-1.6.1/dlls/gdiplus/region.c --- wine1.6-1.7.1-actually1.6/dlls/gdiplus/region.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/gdiplus/region.c 2013-11-15 19:30:24.000000000 +0000 @@ -1310,6 +1310,9 @@ } /* Fall-through to do the actual conversion. */ case RegionDataPath: + if (!element->elementdata.pathdata.path->pathdata.Count) + return Ok; + stat = GdipTransformMatrixPoints(matrix, element->elementdata.pathdata.path->pathdata.Points, element->elementdata.pathdata.path->pathdata.Count); diff -Nru wine1.6-1.7.1-actually1.6/dlls/glu32/Makefile.in wine1.6-1.6.1/dlls/glu32/Makefile.in --- wine1.6-1.7.1-actually1.6/dlls/glu32/Makefile.in 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/glu32/Makefile.in 2013-11-15 19:30:24.000000000 +0000 @@ -1,7 +1,7 @@ MODULE = glu32.dll IMPORTLIB = glu32 EXTRAINCL = @X_CFLAGS@ -EXTRALIBS = -lGLU @OPENGL_LIBS@ @X_LIBS@ @X_PRE_LIBS@ @XLIB@ @X_EXTRA_LIBS@ +EXTRALIBS = -lGLU @OPENGL_LIBS@ @X_LIBS@ @XLIB@ @X_EXTRA_LIBS@ C_SRCS = \ glu.c diff -Nru wine1.6-1.7.1-actually1.6/dlls/ieframe/iexplore.c wine1.6-1.6.1/dlls/ieframe/iexplore.c --- wine1.6-1.7.1-actually1.6/dlls/ieframe/iexplore.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/ieframe/iexplore.c 2013-11-15 19:30:24.000000000 +0000 @@ -1008,9 +1008,8 @@ if(!ddestr_openurl) WARN("Failed to create string handle: %u\n", DdeGetLastError(dde_inst)); - res = HandleToULong(DdeNameService(dde_inst, ddestr_iexplore, 0, DNS_REGISTER)); - if(res != DMLERR_NO_ERROR) - WARN("DdeNameService failed: %u\n", res); + if(!DdeNameService(dde_inst, ddestr_iexplore, 0, DNS_REGISTER)) + WARN("DdeNameService failed\n"); } static void release_dde(void) diff -Nru wine1.6-1.7.1-actually1.6/dlls/imm32/imm.c wine1.6-1.6.1/dlls/imm32/imm.c --- wine1.6-1.7.1-actually1.6/dlls/imm32/imm.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/imm32/imm.c 2013-11-15 19:30:24.000000000 +0000 @@ -37,12 +37,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(imm); -typedef struct tagIMCCInternal -{ - DWORD dwLock; - DWORD dwSize; -} IMCCInternal; - #define MAKE_FUNCPTR(f) typeof(f) * p##f typedef struct _tagImmHkl{ struct list entry; @@ -80,8 +74,11 @@ ImmHkl *immKbd; UINT lastVK; + DWORD magic; } InputContextData; +#define WINE_IMC_VALID_MAGIC 0x56434D49 + typedef struct _tagTRANSMSG { UINT message; WPARAM wParam; @@ -431,16 +428,34 @@ return rc; } +static InputContextData* get_imc_data(HIMC hIMC) +{ + InputContextData *data = hIMC; + + if (hIMC == NULL) + return NULL; + + if(IsBadReadPtr(data, sizeof(InputContextData)) || data->magic != WINE_IMC_VALID_MAGIC) + { + SetLastError(ERROR_INVALID_HANDLE); + return NULL; + } + return data; +} + /*********************************************************************** * ImmAssociateContext (IMM32.@) */ HIMC WINAPI ImmAssociateContext(HWND hWnd, HIMC hIMC) { HIMC old = NULL; - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); TRACE("(%p, %p):\n", hWnd, hIMC); + if(hIMC && !data) + return NULL; + if (!IMM_GetThreadData()->defaultContext) IMM_GetThreadData()->defaultContext = ImmCreateContext(); @@ -621,6 +636,7 @@ InputContextData *new_context; LPGUIDELINE gl; LPCANDIDATEINFO ci; + int i; new_context = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(InputContextData)); @@ -648,6 +664,9 @@ gl->dwSize = sizeof(GUIDELINE); ImmUnlockIMCC(new_context->IMC.hGuideLine); + for (i = 0; i < sizeof(new_context->IMC.cfCandForm) / sizeof(CANDIDATEFORM); i++) + new_context->IMC.cfCandForm[i].dwIndex = ~0u; + /* Initialize the IME Private */ new_context->IMC.hPrivate = ImmCreateIMCC(new_context->immKbd->imeInfo.dwPrivateDataSize); @@ -662,29 +681,32 @@ new_context->immKbd->uSelected++; TRACE("Created context %p\n",new_context); + new_context->magic = WINE_IMC_VALID_MAGIC; return new_context; } static BOOL IMM_DestroyContext(HIMC hIMC) { - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); TRACE("Destroying %p\n",hIMC); - if (hIMC) - { - data->immKbd->uSelected --; - data->immKbd->pImeSelect(hIMC, FALSE); - SendMessageW(data->IMC.hWnd, WM_IME_SELECT, FALSE, (LPARAM)GetKeyboardLayout(0)); - - ImmDestroyIMCC(data->IMC.hCompStr); - ImmDestroyIMCC(data->IMC.hCandInfo); - ImmDestroyIMCC(data->IMC.hGuideLine); - ImmDestroyIMCC(data->IMC.hPrivate); - ImmDestroyIMCC(data->IMC.hMsgBuf); + if (!data) + return FALSE; + + data->immKbd->uSelected --; + data->immKbd->pImeSelect(hIMC, FALSE); + SendMessageW(data->IMC.hWnd, WM_IME_SELECT, FALSE, (LPARAM)GetKeyboardLayout(0)); + + ImmDestroyIMCC(data->IMC.hCompStr); + ImmDestroyIMCC(data->IMC.hCandInfo); + ImmDestroyIMCC(data->IMC.hGuideLine); + ImmDestroyIMCC(data->IMC.hPrivate); + ImmDestroyIMCC(data->IMC.hMsgBuf); + + data->magic = 0; + HeapFree(GetProcessHeap(),0,data); - HeapFree(GetProcessHeap(),0,data); - } return TRUE; } @@ -864,7 +886,7 @@ HIMC hIMC, DWORD dwIndex, LPCANDIDATELIST lpCandList, DWORD dwBufLen) { - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); LPCANDIDATEINFO candinfo; LPCANDIDATELIST candlist; DWORD ret = 0; @@ -903,7 +925,7 @@ DWORD WINAPI ImmGetCandidateListCountA( HIMC hIMC, LPDWORD lpdwListCount) { - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); LPCANDIDATEINFO candinfo; DWORD ret, count; @@ -935,7 +957,7 @@ DWORD WINAPI ImmGetCandidateListCountW( HIMC hIMC, LPDWORD lpdwListCount) { - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); LPCANDIDATEINFO candinfo; DWORD ret, count; @@ -968,7 +990,7 @@ HIMC hIMC, DWORD dwIndex, LPCANDIDATELIST lpCandList, DWORD dwBufLen) { - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); LPCANDIDATEINFO candinfo; LPCANDIDATELIST candlist; DWORD ret = 0; @@ -1007,7 +1029,7 @@ BOOL WINAPI ImmGetCandidateWindow( HIMC hIMC, DWORD dwIndex, LPCANDIDATEFORM lpCandidate) { - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); TRACE("%p, %d, %p\n", hIMC, dwIndex, lpCandidate); @@ -1017,6 +1039,9 @@ if ( dwIndex >= (sizeof(data->IMC.cfCandForm) / sizeof(CANDIDATEFORM)) ) return FALSE; + if (data->IMC.cfCandForm[dwIndex].dwIndex != dwIndex) + return FALSE; + *lpCandidate = data->IMC.cfCandForm[dwIndex]; return TRUE; @@ -1047,7 +1072,7 @@ */ BOOL WINAPI ImmGetCompositionFontW(HIMC hIMC, LPLOGFONTW lplf) { - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); TRACE("(%p, %p):\n", hIMC, lplf); @@ -1226,7 +1251,7 @@ DWORD dwBufLen, BOOL unicode) { LONG rc = 0; - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); LPCOMPOSITIONSTRING compstr; LPBYTE compdata; @@ -1338,7 +1363,7 @@ */ BOOL WINAPI ImmGetCompositionWindow(HIMC hIMC, LPCOMPOSITIONFORM lpCompForm) { - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); TRACE("(%p, %p)\n", hIMC, lpCompForm); @@ -1465,7 +1490,7 @@ BOOL WINAPI ImmGetConversionStatus( HIMC hIMC, LPDWORD lpfdwConversion, LPDWORD lpfdwSentence) { - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); TRACE("%p %p %p\n", hIMC, lpfdwConversion, lpfdwSentence); @@ -1505,6 +1530,8 @@ /* find out how many characters in the unicode buffer */ len = ImmGetDescriptionW( hKL, NULL, 0 ); + if (!len) + return 0; /* allocate a buffer of that size */ buf = HeapAlloc( GetProcessHeap(), 0, (len + 1) * sizeof (WCHAR) ); @@ -1532,6 +1559,7 @@ FIXME("(%p, %p, %d): semi stub\n", hKL, lpszDescription, uBufLen); + if (!hKL) return 0; if (!uBufLen) return lstrlenW( name ); lstrcpynW( lpszDescription, name, uBufLen ); return lstrlenW( lpszDescription ); @@ -1646,7 +1674,7 @@ */ BOOL WINAPI ImmGetOpenStatus(HIMC hIMC) { - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); static int i; if (!data) @@ -1749,7 +1777,7 @@ */ BOOL WINAPI ImmGetStatusWindowPos(HIMC hIMC, LPPOINT lpptPos) { - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); TRACE("(%p, %p)\n", hIMC, lpptPos); @@ -1945,13 +1973,21 @@ BOOL WINAPI ImmNotifyIME( HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue) { - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); TRACE("(%p, %d, %d, %d)\n", hIMC, dwAction, dwIndex, dwValue); + if (hIMC == NULL) + { + SetLastError(ERROR_SUCCESS); + return FALSE; + } + if (!data || ! data->immKbd->pNotifyIME) + { return FALSE; + } return data->immKbd->pNotifyIME(hIMC,dwAction,dwIndex,dwValue); } @@ -2035,9 +2071,11 @@ */ LRESULT WINAPI ImmRequestMessageA(HIMC hIMC, WPARAM wParam, LPARAM lParam) { - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); TRACE("%p %ld %ld\n", hIMC, wParam, wParam); + if (!data) + SetLastError(ERROR_INVALID_HANDLE); if (data && IsWindow(data->IMC.hWnd)) return SendMessageA(data->IMC.hWnd, WM_IME_REQUEST, wParam, lParam); @@ -2050,10 +2088,13 @@ */ LRESULT WINAPI ImmRequestMessageW(HIMC hIMC, WPARAM wParam, LPARAM lParam) { - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); TRACE("%p %ld %ld\n", hIMC, wParam, wParam); + if (!data) + SetLastError(ERROR_INVALID_HANDLE); + if (data && IsWindow(data->IMC.hWnd)) return SendMessageW(data->IMC.hWnd, WM_IME_REQUEST, wParam, lParam); @@ -2066,7 +2107,7 @@ BOOL WINAPI ImmSetCandidateWindow( HIMC hIMC, LPCANDIDATEFORM lpCandidate) { - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); TRACE("(%p, %p)\n", hIMC, lpCandidate); @@ -2094,11 +2135,14 @@ */ BOOL WINAPI ImmSetCompositionFontA(HIMC hIMC, LPLOGFONTA lplf) { - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); TRACE("(%p, %p)\n", hIMC, lplf); if (!data || !lplf) + { + SetLastError(ERROR_INVALID_HANDLE); return FALSE; + } memcpy(&data->IMC.lfFont.W,lplf,sizeof(LOGFONTA)); MultiByteToWideChar(CP_ACP, 0, lplf->lfFaceName, -1, data->IMC.lfFont.W.lfFaceName, @@ -2114,11 +2158,14 @@ */ BOOL WINAPI ImmSetCompositionFontW(HIMC hIMC, LPLOGFONTW lplf) { - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); TRACE("(%p, %p)\n", hIMC, lplf); if (!data || !lplf) + { + SetLastError(ERROR_INVALID_HANDLE); return FALSE; + } data->IMC.lfFont.W = *lplf; ImmNotifyIME(hIMC, NI_CONTEXTUPDATED, 0, IMC_SETCOMPOSITIONFONT); @@ -2140,7 +2187,7 @@ WCHAR *CompBuffer = NULL; WCHAR *ReadBuffer = NULL; BOOL rc; - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); TRACE("(%p, %d, %p, %d, %p, %d):\n", hIMC, dwIndex, lpComp, dwCompLen, lpRead, dwReadLen); @@ -2195,7 +2242,7 @@ CHAR *CompBuffer = NULL; CHAR *ReadBuffer = NULL; BOOL rc; - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); TRACE("(%p, %d, %p, %d, %p, %d):\n", hIMC, dwIndex, lpComp, dwCompLen, lpRead, dwReadLen); @@ -2248,7 +2295,7 @@ HIMC hIMC, LPCOMPOSITIONFORM lpCompForm) { BOOL reshow = FALSE; - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); TRACE("(%p, %p)\n", hIMC, lpCompForm); TRACE("\t%x, (%i,%i), (%i,%i - %i,%i)\n",lpCompForm->dwStyle, @@ -2256,7 +2303,10 @@ lpCompForm->rcArea.left, lpCompForm->rcArea.bottom, lpCompForm->rcArea.right); if (!data) + { + SetLastError(ERROR_INVALID_HANDLE); return FALSE; + } data->IMC.cfCompForm = *lpCompForm; @@ -2282,12 +2332,15 @@ HIMC hIMC, DWORD fdwConversion, DWORD fdwSentence) { DWORD oldConversion, oldSentence; - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); TRACE("%p %d %d\n", hIMC, fdwConversion, fdwSentence); if (!data) + { + SetLastError(ERROR_INVALID_HANDLE); return FALSE; + } if ( fdwConversion != data->IMC.fdwConversion ) { @@ -2312,12 +2365,15 @@ */ BOOL WINAPI ImmSetOpenStatus(HIMC hIMC, BOOL fOpen) { - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); TRACE("%p %d\n", hIMC, fOpen); if (!data) + { + SetLastError(ERROR_INVALID_HANDLE); return FALSE; + } if (data->immKbd->UIWnd == NULL) { @@ -2345,12 +2401,15 @@ */ BOOL WINAPI ImmSetStatusWindowPos(HIMC hIMC, LPPOINT lpptPos) { - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); TRACE("(%p, %p)\n", hIMC, lpptPos); if (!data || !lpptPos) + { + SetLastError(ERROR_INVALID_HANDLE); return FALSE; + } TRACE("\t(%i,%i)\n", lpptPos->x, lpptPos->y); @@ -2468,9 +2527,16 @@ LPIMEMENUITEMINFOA lpImeParentMenu, LPIMEMENUITEMINFOA lpImeMenu, DWORD dwSize) { - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); TRACE("(%p, %i, %i, %p, %p, %i):\n", hIMC, dwFlags, dwType, lpImeParentMenu, lpImeMenu, dwSize); + + if (!data) + { + SetLastError(ERROR_INVALID_HANDLE); + return 0; + } + if (data->immKbd->hIME && data->immKbd->pImeGetImeMenuItems) { if (!is_himc_ime_unicode(data) || (!lpImeParentMenu && !lpImeMenu)) @@ -2532,9 +2598,16 @@ LPIMEMENUITEMINFOW lpImeParentMenu, LPIMEMENUITEMINFOW lpImeMenu, DWORD dwSize) { - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); TRACE("(%p, %i, %i, %p, %p, %i):\n", hIMC, dwFlags, dwType, lpImeParentMenu, lpImeMenu, dwSize); + + if (!data) + { + SetLastError(ERROR_INVALID_HANDLE); + return 0; + } + if (data->immKbd->hIME && data->immKbd->pImeGetImeMenuItems) { if (is_himc_ime_unicode(data) || (!lpImeParentMenu && !lpImeMenu)) @@ -2592,7 +2665,7 @@ */ LPINPUTCONTEXT WINAPI ImmLockIMC(HIMC hIMC) { - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); if (!data) return NULL; @@ -2605,9 +2678,13 @@ */ BOOL WINAPI ImmUnlockIMC(HIMC hIMC) { - InputContextData *data = hIMC; - data->dwLock--; - return (data->dwLock!=0); + InputContextData *data = get_imc_data(hIMC); + + if (!data) + return FALSE; + if (data->dwLock) + data->dwLock--; + return TRUE; } /*********************************************************************** @@ -2615,7 +2692,9 @@ */ DWORD WINAPI ImmGetIMCLockCount(HIMC hIMC) { - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); + if (!data) + return 0; return data->dwLock; } @@ -2624,15 +2703,7 @@ */ HIMCC WINAPI ImmCreateIMCC(DWORD size) { - IMCCInternal *internal; - int real_size = size + sizeof(IMCCInternal); - - internal = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, real_size); - if (internal == NULL) - return NULL; - - internal->dwSize = size; - return internal; + return GlobalAlloc(GMEM_ZEROINIT | GMEM_MOVEABLE, size); } /*********************************************************************** @@ -2640,8 +2711,7 @@ */ HIMCC WINAPI ImmDestroyIMCC(HIMCC block) { - HeapFree(GetProcessHeap(),0,block); - return NULL; + return GlobalFree(block); } /*********************************************************************** @@ -2649,11 +2719,7 @@ */ LPVOID WINAPI ImmLockIMCC(HIMCC imcc) { - IMCCInternal *internal; - internal = imcc; - - internal->dwLock ++; - return internal + 1; + return GlobalLock(imcc); } /*********************************************************************** @@ -2661,11 +2727,7 @@ */ BOOL WINAPI ImmUnlockIMCC(HIMCC imcc) { - IMCCInternal *internal; - internal = imcc; - - internal->dwLock --; - return (internal->dwLock!=0); + return GlobalUnlock(imcc); } /*********************************************************************** @@ -2673,10 +2735,7 @@ */ DWORD WINAPI ImmGetIMCCLockCount(HIMCC imcc) { - IMCCInternal *internal; - internal = imcc; - - return internal->dwLock; + return GlobalFlags(imcc) & GMEM_LOCKCOUNT; } /*********************************************************************** @@ -2684,15 +2743,7 @@ */ HIMCC WINAPI ImmReSizeIMCC(HIMCC imcc, DWORD size) { - IMCCInternal *internal,*newone; - int real_size = size + sizeof(IMCCInternal); - - internal = imcc; - - newone = HeapReAlloc(GetProcessHeap(), 0, internal, real_size); - newone->dwSize = size; - - return newone; + return GlobalReAlloc(imcc, size, GMEM_ZEROINIT | GMEM_MOVEABLE); } /*********************************************************************** @@ -2700,10 +2751,7 @@ */ DWORD WINAPI ImmGetIMCCSize(HIMCC imcc) { - IMCCInternal *internal; - internal = imcc; - - return internal->dwSize; + return GlobalSize(imcc); } /*********************************************************************** @@ -2711,7 +2759,13 @@ */ BOOL WINAPI ImmGenerateMessage(HIMC hIMC) { - InputContextData *data = hIMC; + InputContextData *data = get_imc_data(hIMC); + + if (!data) + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } TRACE("%i messages queued\n",data->IMC.dwNumMsgBuf); if (data->IMC.dwNumMsgBuf > 0) diff -Nru wine1.6-1.7.1-actually1.6/dlls/jscript/number.c wine1.6-1.6.1/dlls/jscript/number.c --- wine1.6-1.7.1-actually1.6/dlls/jscript/number.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/jscript/number.c 2013-11-15 19:30:24.000000000 +0000 @@ -54,7 +54,7 @@ return is_vclass(jsthis, JSCLASS_NUMBER) ? number_from_vdisp(jsthis) : NULL; } -static inline void dtoa(double d, WCHAR *buf, int size, int *dec_point) +static inline void number_to_str(double d, WCHAR *buf, int size, int *dec_point) { ULONGLONG l; int i; @@ -113,7 +113,7 @@ if(buf_size > NUMBER_DTOA_SIZE) buf_size = NUMBER_DTOA_SIZE; - dtoa(val, buf, buf_size, &dec_point); + number_to_str(val, buf, buf_size, &dec_point); dec_point++; size = 0; if(neg) @@ -171,7 +171,7 @@ buf_size = prec+2; if(buf_size<2 || buf_size>NUMBER_DTOA_SIZE) buf_size = NUMBER_DTOA_SIZE; - dtoa(val, buf, buf_size, &dec_point); + number_to_str(val, buf, buf_size, &dec_point); buf_size--; if(prec == -1) for(; buf_size>1 && buf[buf_size-1]=='0'; buf_size--) diff -Nru wine1.6-1.7.1-actually1.6/dlls/jscript/parser.y wine1.6-1.6.1/dlls/jscript/parser.y --- wine1.6-1.7.1-actually1.6/dlls/jscript/parser.y 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/jscript/parser.y 2013-11-15 19:30:24.000000000 +0000 @@ -25,10 +25,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(jscript); -#define YYLEX_PARAM ctx -#define YYPARSE_PARAM ctx - -static int parser_error(const char*); +static int parser_error(parser_ctx_t*,const char*); static void set_error(parser_ctx_t*,UINT); static BOOL explicit_error(parser_ctx_t*,void*,WCHAR); static BOOL allow_auto_semicolon(parser_ctx_t*); @@ -139,7 +136,9 @@ %} -%pure_parser +%lex-param { parser_ctx_t *ctx } +%parse-param { parser_ctx_t *ctx } +%pure-parser %start Program %union { @@ -1386,7 +1385,7 @@ return &ret->expr; } -static int parser_error(const char *str) +static int parser_error(parser_ctx_t *ctx, const char *str) { return 0; } diff -Nru wine1.6-1.7.1-actually1.6/dlls/kernel32/kernel32.spec wine1.6-1.6.1/dlls/kernel32/kernel32.spec --- wine1.6-1.7.1-actually1.6/dlls/kernel32/kernel32.spec 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/kernel32/kernel32.spec 2013-11-15 19:30:24.000000000 +0000 @@ -745,12 +745,15 @@ @ stdcall IdnToNameprepUnicode(long wstr long ptr long) @ stdcall IdnToUnicode(long wstr long ptr long) @ stdcall InitAtomTable(long) -@ stdcall InitializeSRWLock(ptr) +@ stdcall InitOnceBeginInitialize(ptr long ptr ptr) +@ stdcall InitOnceComplete(ptr long ptr) +@ stdcall InitOnceExecuteOnce(ptr ptr ptr ptr) +@ stdcall InitOnceInitialize(ptr) ntdll.RtlRunOnceInitialize @ stdcall InitializeCriticalSection(ptr) @ stdcall InitializeCriticalSectionAndSpinCount(ptr long) @ stdcall InitializeCriticalSectionEx(ptr long long) @ stdcall InitializeSListHead(ptr) ntdll.RtlInitializeSListHead -@ stdcall InitOnceInitialize(ptr) ntdll.RtlRunOnceInitialize +@ stdcall InitializeSRWLock(ptr) @ stdcall -arch=i386 InterlockedCompareExchange (ptr long long) @ stdcall -arch=i386 -ret64 InterlockedCompareExchange64(ptr int64 int64) ntdll.RtlInterlockedCompareExchange64 @ stdcall -arch=i386 InterlockedDecrement(ptr) diff -Nru wine1.6-1.7.1-actually1.6/dlls/kernel32/path.c wine1.6-1.6.1/dlls/kernel32/path.c --- wine1.6-1.7.1-actually1.6/dlls/kernel32/path.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/kernel32/path.c 2013-11-15 19:30:24.000000000 +0000 @@ -1516,10 +1516,9 @@ return 0; } - ret = GetCurrentDirectoryW(MAX_PATH, bufferW); - + ret = RtlGetCurrentDirectory_U( sizeof(bufferW), bufferW ); if (!ret) return 0; - if (ret > MAX_PATH) + if (ret > sizeof(bufferW)) { SetLastError(ERROR_FILENAME_EXCED_RANGE); return 0; @@ -1538,12 +1537,8 @@ RtlInitUnicodeString( &dirW, dir ); status = RtlSetCurrentDirectory_U( &dirW ); - if (status != STATUS_SUCCESS) - { - SetLastError( RtlNtStatusToDosError(status) ); - return FALSE; - } - return TRUE; + if (status != STATUS_SUCCESS) SetLastError( RtlNtStatusToDosError(status) ); + return !status; } @@ -1553,9 +1548,14 @@ BOOL WINAPI SetCurrentDirectoryA( LPCSTR dir ) { WCHAR *dirW; + UNICODE_STRING strW; + NTSTATUS status; if (!(dirW = FILE_name_AtoW( dir, FALSE ))) return FALSE; - return SetCurrentDirectoryW( dirW ); + RtlInitUnicodeString( &strW, dirW ); + status = RtlSetCurrentDirectory_U( &strW ); + if (status != STATUS_SUCCESS) SetLastError( RtlNtStatusToDosError(status) ); + return !status; } diff -Nru wine1.6-1.7.1-actually1.6/dlls/kernel32/sync.c wine1.6-1.6.1/dlls/kernel32/sync.c --- wine1.6-1.7.1-actually1.6/dlls/kernel32/sync.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/kernel32/sync.c 2013-11-15 19:30:24.000000000 +0000 @@ -2237,6 +2237,35 @@ return FALSE; } +/*********************************************************************** + * InitOnceBeginInitialize (KERNEL32.@) + */ +BOOL WINAPI InitOnceBeginInitialize( INIT_ONCE *once, DWORD flags, BOOL *pending, void **context ) +{ + NTSTATUS status = RtlRunOnceBeginInitialize( once, flags, context ); + if (status >= 0) *pending = (status == STATUS_PENDING); + else SetLastError( RtlNtStatusToDosError(status) ); + return status >= 0; +} + +/*********************************************************************** + * InitOnceComplete (KERNEL32.@) + */ +BOOL WINAPI InitOnceComplete( INIT_ONCE *once, DWORD flags, void *context ) +{ + NTSTATUS status = RtlRunOnceComplete( once, flags, context ); + if (status != STATUS_SUCCESS) SetLastError( RtlNtStatusToDosError(status) ); + return !status; +} + +/*********************************************************************** + * InitOnceExecuteOnce (KERNEL32.@) + */ +BOOL WINAPI InitOnceExecuteOnce( INIT_ONCE *once, PINIT_ONCE_FN func, void *param, void **context ) +{ + return !RtlRunOnceExecuteOnce( once, (PRTL_RUN_ONCE_INIT_FN)func, param, context ); +} + #ifdef __i386__ /*********************************************************************** diff -Nru wine1.6-1.7.1-actually1.6/dlls/kernel32/winerror.mc wine1.6-1.6.1/dlls/kernel32/winerror.mc --- wine1.6-1.7.1-actually1.6/dlls/kernel32/winerror.mc 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/kernel32/winerror.mc 2013-11-15 19:30:24.000000000 +0000 @@ -3441,17 +3441,17 @@ MessageId=1807 SymbolicName=ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT Language=ENU -Can't logon with inter-domain trust account. +Can't log on with inter-domain trust account. . MessageId=1808 SymbolicName=ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT Language=ENU -Can't logon with workstation trust account. +Can't log on with workstation trust account. . MessageId=1809 SymbolicName=ERROR_NOLOGON_SERVER_TRUST_ACCOUNT Language=ENU -Can't logon with server trust account. +Can't log on with server trust account. . MessageId=1810 SymbolicName=ERROR_DOMAIN_TRUST_INCONSISTENT diff -Nru wine1.6-1.7.1-actually1.6/dlls/mmdevapi/devenum.c wine1.6-1.6.1/dlls/mmdevapi/devenum.c --- wine1.6-1.7.1-actually1.6/dlls/mmdevapi/devenum.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/mmdevapi/devenum.c 2013-11-15 19:30:24.000000000 +0000 @@ -569,7 +569,8 @@ { /* ::Load cannot assume the interface stays alive after the function returns, * so just create the interface on the stack, saves a lot of complicated code */ - IPropertyBagImpl bag = { { &PB_Vtbl }, This->devguid }; + IPropertyBagImpl bag = { { &PB_Vtbl } }; + bag.devguid = This->devguid; hr = IPersistPropertyBag_Load(ppb, &bag.IPropertyBag_iface, NULL); IPersistPropertyBag_Release(ppb); if (FAILED(hr)) diff -Nru wine1.6-1.7.1-actually1.6/dlls/mmdevapi/mmdevapi.h wine1.6-1.6.1/dlls/mmdevapi/mmdevapi.h --- wine1.6-1.7.1-actually1.6/dlls/mmdevapi/mmdevapi.h 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/mmdevapi/mmdevapi.h 2013-11-15 19:30:24.000000000 +0000 @@ -41,18 +41,18 @@ * If multiple drivers think they are valid, they will return a * priority value reflecting the likelihood that they are actually * valid. See enum _DriverPriority. */ - int WINAPI (*pGetPriority)(void); + int (WINAPI *pGetPriority)(void); /* ids gets an array of human-friendly endpoint names * keys gets an array of driver-specific stuff that is used * in GetAudioEndpoint to identify the endpoint * it is the caller's responsibility to free both arrays, and * all of the elements in both arrays with HeapFree() */ - HRESULT WINAPI (*pGetEndpointIDs)(EDataFlow flow, WCHAR ***ids, + HRESULT (WINAPI *pGetEndpointIDs)(EDataFlow flow, WCHAR ***ids, GUID **guids, UINT *num, UINT *default_index); - HRESULT WINAPI (*pGetAudioEndpoint)(void *key, IMMDevice *dev, + HRESULT (WINAPI *pGetAudioEndpoint)(void *key, IMMDevice *dev, IAudioClient **out); - HRESULT WINAPI (*pGetAudioSessionManager)(IMMDevice *device, + HRESULT (WINAPI *pGetAudioSessionManager)(IMMDevice *device, IAudioSessionManager2 **out); } DriverFuncs; diff -Nru wine1.6-1.7.1-actually1.6/dlls/mshtml/htmlstylesheet.c wine1.6-1.6.1/dlls/mshtml/htmlstylesheet.c --- wine1.6-1.7.1-actually1.6/dlls/mshtml/htmlstylesheet.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/mshtml/htmlstylesheet.c 2013-11-15 19:30:24.000000000 +0000 @@ -32,6 +32,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml); struct HTMLStyleSheet { + DispatchEx dispex; IHTMLStyleSheet IHTMLStyleSheet_iface; LONG ref; @@ -412,6 +413,8 @@ }else if(IsEqualGUID(&IID_IHTMLStyleSheet, riid)) { TRACE("(%p)->(IID_IHTMLStyleSheet %p)\n", This, ppv); *ppv = &This->IHTMLStyleSheet_iface; + }else if(dispex_query_interface(&This->dispex, riid, ppv)) { + return *ppv ? S_OK : E_NOINTERFACE; } if(*ppv) { @@ -449,16 +452,16 @@ static HRESULT WINAPI HTMLStyleSheet_GetTypeInfoCount(IHTMLStyleSheet *iface, UINT *pctinfo) { HTMLStyleSheet *This = impl_from_IHTMLStyleSheet(iface); - FIXME("(%p)->(%p)\n", This, pctinfo); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, pctinfo); + return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo); } static HRESULT WINAPI HTMLStyleSheet_GetTypeInfo(IHTMLStyleSheet *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) { HTMLStyleSheet *This = impl_from_IHTMLStyleSheet(iface); - FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo); - return E_NOTIMPL; + TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo); + return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo); } static HRESULT WINAPI HTMLStyleSheet_GetIDsOfNames(IHTMLStyleSheet *iface, REFIID riid, @@ -466,9 +469,8 @@ LCID lcid, DISPID *rgDispId) { HTMLStyleSheet *This = impl_from_IHTMLStyleSheet(iface); - FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, - lcid, rgDispId); - return E_NOTIMPL; + TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId); + return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames, lcid, rgDispId); } static HRESULT WINAPI HTMLStyleSheet_Invoke(IHTMLStyleSheet *iface, DISPID dispIdMember, @@ -476,9 +478,10 @@ VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) { HTMLStyleSheet *This = impl_from_IHTMLStyleSheet(iface); - FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid), + TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); - return E_NOTIMPL; + return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, pDispParams, + pVarResult, pExcepInfo, puArgErr); } static HRESULT WINAPI HTMLStyleSheet_put_title(IHTMLStyleSheet *iface, BSTR v) @@ -676,6 +679,17 @@ HTMLStyleSheet_get_rules }; +static const tid_t HTMLStyleSheet_iface_tids[] = { + IHTMLStyleSheet_tid, + 0 +}; +static dispex_static_data_t HTMLStyleSheet_dispex = { + NULL, + DispHTMLStyleSheet_tid, + NULL, + HTMLStyleSheet_iface_tids +}; + IHTMLStyleSheet *HTMLStyleSheet_Create(nsIDOMStyleSheet *nsstylesheet) { HTMLStyleSheet *ret = heap_alloc(sizeof(HTMLStyleSheet)); @@ -685,6 +699,8 @@ ret->ref = 1; ret->nsstylesheet = NULL; + init_dispex(&ret->dispex, (IUnknown*)&ret->IHTMLStyleSheet_iface, &HTMLStyleSheet_dispex); + if(nsstylesheet) { nsres = nsIDOMStyleSheet_QueryInterface(nsstylesheet, &IID_nsIDOMCSSStyleSheet, (void**)&ret->nsstylesheet); diff -Nru wine1.6-1.7.1-actually1.6/dlls/mshtml/mshtml_private.h wine1.6-1.6.1/dlls/mshtml/mshtml_private.h --- wine1.6-1.7.1-actually1.6/dlls/mshtml/mshtml_private.h 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/mshtml/mshtml_private.h 2013-11-15 19:30:24.000000000 +0000 @@ -106,6 +106,7 @@ XDIID(DispHTMLSelectElement) \ XDIID(DispHTMLStyle) \ XDIID(DispHTMLStyleElement) \ + XDIID(DispHTMLStyleSheet) \ XDIID(DispHTMLStyleSheetsCollection) \ XDIID(DispHTMLTable) \ XDIID(DispHTMLTableCell) \ @@ -178,6 +179,7 @@ XIID(IHTMLStyle5) \ XIID(IHTMLStyle6) \ XIID(IHTMLStyleElement) \ + XIID(IHTMLStyleSheet) \ XIID(IHTMLStyleSheetsCollection) \ XIID(IHTMLTable) \ XIID(IHTMLTable2) \ diff -Nru wine1.6-1.7.1-actually1.6/dlls/mshtml/protocol.c wine1.6-1.6.1/dlls/mshtml/protocol.c --- wine1.6-1.7.1-actually1.6/dlls/mshtml/protocol.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/mshtml/protocol.c 2013-11-15 19:30:24.000000000 +0000 @@ -631,31 +631,27 @@ } url_dll = url + sizeof(wszRes)/sizeof(wszRes[0]); - if(!(url_file = strrchrW(url_dll, '/'))) { + if(!(res_type = strchrW(url_dll, '/'))) { WARN("wrong url: %s\n", debugstr_w(url)); IInternetProtocolSink_ReportResult(pOIProtSink, MK_E_SYNTAX, 0, NULL); heap_free(url); return MK_E_SYNTAX; } - *url_file++ = 0; + *res_type++ = 0; + if ((url_file = strchrW(res_type, '/'))) { + *url_file++ = 0; + }else { + url_file = res_type; + res_type = MAKEINTRESOURCEW(RT_HTML); + } + hdll = LoadLibraryExW(url_dll, NULL, LOAD_LIBRARY_AS_DATAFILE); if(!hdll) { - if (!(res_type = strrchrW(url_dll, '/'))) { - WARN("Could not open dll: %s\n", debugstr_w(url_dll)); - IInternetProtocolSink_ReportResult(pOIProtSink, HRESULT_FROM_WIN32(GetLastError()), 0, NULL); - heap_free(url); - return HRESULT_FROM_WIN32(GetLastError()); - } - *res_type++ = 0; - - hdll = LoadLibraryExW(url_dll, NULL, LOAD_LIBRARY_AS_DATAFILE); - if(!hdll) { - WARN("Could not open dll: %s\n", debugstr_w(url_dll)); - IInternetProtocolSink_ReportResult(pOIProtSink, HRESULT_FROM_WIN32(GetLastError()), 0, NULL); - heap_free(url); - return HRESULT_FROM_WIN32(GetLastError()); - } + WARN("Could not open dll: %s\n", debugstr_w(url_dll)); + IInternetProtocolSink_ReportResult(pOIProtSink, HRESULT_FROM_WIN32(GetLastError()), 0, NULL); + heap_free(url); + return HRESULT_FROM_WIN32(GetLastError()); } TRACE("trying to find resource type %s, name %s\n", debugstr_w(res_type), debugstr_w(url_file)); @@ -665,7 +661,7 @@ LPWSTR endpoint = NULL; DWORD file_id = strtolW(url_file, &endpoint, 10); if(endpoint == url_file+strlenW(url_file)) - src = FindResourceW(hdll, MAKEINTRESOURCEW(file_id), MAKEINTRESOURCEW(RT_HTML)); + src = FindResourceW(hdll, MAKEINTRESOURCEW(file_id), res_type); if(!src) { WARN("Could not find resource\n"); diff -Nru wine1.6-1.7.1-actually1.6/dlls/msi/cond.y wine1.6-1.6.1/dlls/msi/cond.y --- wine1.6-1.7.1-actually1.6/dlls/msi/cond.y 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msi/cond.y 2013-11-15 19:30:24.000000000 +0000 @@ -42,11 +42,6 @@ #include "wine/unicode.h" #include "wine/list.h" -#define YYLEX_PARAM info -#define YYPARSE_PARAM info - -static int cond_error(const char *str); - WINE_DEFAULT_DEBUG_CHANNEL(msi); typedef struct tag_yyinput @@ -66,6 +61,7 @@ static LPWSTR COND_GetString( COND_input *info, const struct cond_str *str ); static LPWSTR COND_GetLiteral( COND_input *info, const struct cond_str *str ); static int cond_lex( void *COND_lval, COND_input *info); +static int cond_error( COND_input *info, const char *str); static void *cond_alloc( COND_input *cond, unsigned int sz ); static void *cond_track_mem( COND_input *cond, void *ptr, unsigned int sz ); @@ -110,6 +106,8 @@ %} +%lex-param { COND_input *info } +%parse-param { COND_input *info } %pure-parser %union @@ -798,7 +796,7 @@ } } -static int cond_error(const char *str) +static int cond_error( COND_input *info, const char *str ) { TRACE("%s\n", str ); return 0; diff -Nru wine1.6-1.7.1-actually1.6/dlls/msi/dialog.c wine1.6-1.6.1/dlls/msi/dialog.c --- wine1.6-1.7.1-actually1.6/dlls/msi/dialog.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msi/dialog.c 2013-11-15 19:30:24.000000000 +0000 @@ -39,6 +39,7 @@ #include "winreg.h" #include "shlwapi.h" #include "msiserver.h" +#include "shellapi.h" #include "wine/debug.h" #include "wine/unicode.h" @@ -144,6 +145,7 @@ static const WCHAR szSelectionDescription[] = {'S','e','l','e','c','t','i','o','n','D','e','s','c','r','i','p','t','i','o','n',0}; static const WCHAR szSelectionPath[] = {'S','e','l','e','c','t','i','o','n','P','a','t','h',0}; static const WCHAR szProperty[] = {'P','r','o','p','e','r','t','y',0}; +static const WCHAR szHyperLink[] = {'H','y','p','e','r','L','i','n','k',0}; /* dialog sequencing */ @@ -3306,6 +3308,80 @@ return ERROR_SUCCESS; } +static UINT msi_dialog_hyperlink_handler( msi_dialog *dialog, msi_control *control, WPARAM param ) +{ + static const WCHAR hrefW[] = {'h','r','e','f'}; + static const WCHAR openW[] = {'o','p','e','n',0}; + int len, len_href = sizeof(hrefW) / sizeof(hrefW[0]); + const WCHAR *p, *q; + WCHAR quote = 0; + LITEM item; + + item.mask = LIF_ITEMINDEX | LIF_URL; + item.iLink = 0; + item.szUrl[0] = 0; + + SendMessageW( control->hwnd, LM_GETITEM, 0, (LPARAM)&item ); + + p = item.szUrl; + while (*p && *p != '<') p++; + if (!*p++) return ERROR_SUCCESS; + if (toupperW( *p++ ) != 'A' || !isspaceW( *p++ )) return ERROR_SUCCESS; + while (*p && isspaceW( *p )) p++; + + len = strlenW( p ); + if (len > len_href && !memicmpW( p, hrefW, len_href )) + { + p += len_href; + while (*p && isspaceW( *p )) p++; + if (!*p || *p++ != '=') return ERROR_SUCCESS; + while (*p && isspaceW( *p )) p++; + + if (*p == '\"' || *p == '\'') quote = *p++; + q = p; + if (quote) + { + while (*q && *q != quote) q++; + if (*q != quote) return ERROR_SUCCESS; + } + else + { + while (*q && *q != '>' && !isspaceW( *q )) q++; + if (!*q) return ERROR_SUCCESS; + } + item.szUrl[q - item.szUrl] = 0; + ShellExecuteW( NULL, openW, p, NULL, NULL, SW_SHOWNORMAL ); + } + return ERROR_SUCCESS; +} + +static UINT msi_dialog_hyperlink( msi_dialog *dialog, MSIRECORD *rec ) +{ + msi_control *control; + DWORD style = WS_CHILD | WS_TABSTOP | WS_GROUP; + const WCHAR *text = MSI_RecordGetString( rec, 10 ); + int len = strlenW( text ); + LITEM item; + + control = msi_dialog_add_control( dialog, rec, WC_LINK, style ); + if (!control) + return ERROR_FUNCTION_FAILED; + + control->attributes = MSI_RecordGetInteger( rec, 8 ); + control->handler = msi_dialog_hyperlink_handler; + + item.mask = LIF_ITEMINDEX | LIF_STATE | LIF_URL; + item.iLink = 0; + item.state = LIS_ENABLED; + item.stateMask = LIS_ENABLED; + if (len < L_MAX_URL_LENGTH) strcpyW( item.szUrl, text ); + else item.szUrl[0] = 0; + + SendMessageW( control->hwnd, LM_SETITEM, 0, (LPARAM)&item ); + + return ERROR_SUCCESS; +} + static const struct control_handler msi_dialog_handler[] = { { szText, msi_dialog_text_control }, @@ -3328,6 +3404,7 @@ { szDirectoryList, msi_dialog_directory_list }, { szVolumeCostList, msi_dialog_volumecost_list }, { szVolumeSelectCombo, msi_dialog_volumeselect_combo }, + { szHyperLink, msi_dialog_hyperlink } }; #define NUM_CONTROL_TYPES (sizeof msi_dialog_handler/sizeof msi_dialog_handler[0]) diff -Nru wine1.6-1.7.1-actually1.6/dlls/msi/query.h wine1.6-1.6.1/dlls/msi/query.h --- wine1.6-1.7.1-actually1.6/dlls/msi/query.h 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msi/query.h 2013-11-15 19:30:24.000000000 +0000 @@ -96,6 +96,19 @@ } u; }; +typedef struct +{ + MSIDATABASE *db; + LPCWSTR command; + DWORD n, len; + UINT r; + MSIVIEW **view; /* View structure for the resulting query. This value + * tracks the view currently being created so we can free + * this view on syntax error. + */ + struct list *mem; +} SQL_input; + UINT MSI_ParseSQL( MSIDATABASE *db, LPCWSTR command, MSIVIEW **phview, struct list *mem ) DECLSPEC_HIDDEN; diff -Nru wine1.6-1.7.1-actually1.6/dlls/msi/sql.y wine1.6-1.6.1/dlls/msi/sql.y --- wine1.6-1.7.1-actually1.6/dlls/msi/sql.y 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msi/sql.y 2013-11-15 19:30:24.000000000 +0000 @@ -34,29 +34,12 @@ #include "wine/debug.h" #include "wine/unicode.h" -#define YYLEX_PARAM info -#define YYPARSE_PARAM info - -static int sql_error(const char *str); - WINE_DEFAULT_DEBUG_CHANNEL(msi); -typedef struct tag_SQL_input -{ - MSIDATABASE *db; - LPCWSTR command; - DWORD n, len; - UINT r; - MSIVIEW **view; /* View structure for the resulting query. This value - * tracks the view currently being created so we can free - * this view on syntax error. - */ - struct list *mem; -} SQL_input; - static UINT SQL_getstring( void *info, const struct sql_str *strdata, LPWSTR *str ); static INT SQL_getint( void *info ); static int sql_lex( void *SQL_lval, SQL_input *info ); +static int sql_error( SQL_input *info, const char *str); static LPWSTR parser_add_table( void *info, LPCWSTR list, LPCWSTR table ); static void *parser_alloc( void *info, unsigned int sz ); @@ -77,6 +60,8 @@ %} +%lex-param { SQL_input *info } +%parse-param { SQL_input *info } %pure-parser %union @@ -866,7 +851,7 @@ return r; } -static int sql_error( const char *str ) +static int sql_error( SQL_input *info, const char *str ) { return 0; } diff -Nru wine1.6-1.7.1-actually1.6/dlls/msi/table.c wine1.6-1.6.1/dlls/msi/table.c --- wine1.6-1.7.1-actually1.6/dlls/msi/table.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msi/table.c 2013-11-15 19:30:24.000000000 +0000 @@ -1259,6 +1259,7 @@ { MSICOLUMNINFO columninfo; UINT r; + int ival; if ( (iField <= 0) || (iField > tv->num_cols) || @@ -1285,16 +1286,21 @@ } else if ( bytes_per_column( tv->db, &columninfo, LONG_STR_BYTES ) == 2 ) { - *pvalue = 0x8000 + MSI_RecordGetInteger( rec, iField ); - if ( *pvalue & 0xffff0000 ) + ival = MSI_RecordGetInteger( rec, iField ); + if (ival == 0x80000000) *pvalue = 0x8000; + else { - ERR("field %u value %d out of range\n", iField, *pvalue - 0x8000); - return ERROR_FUNCTION_FAILED; + *pvalue = 0x8000 + MSI_RecordGetInteger( rec, iField ); + if (*pvalue & 0xffff0000) + { + ERR("field %u value %d out of range\n", iField, *pvalue - 0x8000); + return ERROR_FUNCTION_FAILED; + } } } else { - INT ival = MSI_RecordGetInteger( rec, iField ); + ival = MSI_RecordGetInteger( rec, iField ); *pvalue = ival ^ 0x80000000; } diff -Nru wine1.6-1.7.1-actually1.6/dlls/msvcp100/locale.c wine1.6-1.6.1/dlls/msvcp100/locale.c --- wine1.6-1.7.1-actually1.6/dlls/msvcp100/locale.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msvcp100/locale.c 2013-11-15 19:30:24.000000000 +0000 @@ -8460,7 +8460,7 @@ locale__Locimp__Makeushloc(locinfo, cat, locimp, loc); locimp->catmask |= cat; - _Yarn_char_copy_ctor(&locimp->name, &locinfo->newlocname); + _Yarn_char_op_assign(&locimp->name, &locinfo->newlocname); return locimp; } diff -Nru wine1.6-1.7.1-actually1.6/dlls/msvcp100/msvcp.h wine1.6-1.6.1/dlls/msvcp100/msvcp.h --- wine1.6-1.7.1-actually1.6/dlls/msvcp100/msvcp.h 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msvcp100/msvcp.h 2013-11-15 19:30:24.000000000 +0000 @@ -88,6 +88,7 @@ _Yarn_char* __thiscall _Yarn_char_copy_ctor(_Yarn_char*, const _Yarn_char*); const char* __thiscall _Yarn_char_c_str(const _Yarn_char*); void __thiscall _Yarn_char_dtor(_Yarn_char*); +_Yarn_char* __thiscall _Yarn_char_op_assign(_Yarn_char*, const _Yarn_char*); /* class locale::facet */ typedef struct { diff -Nru wine1.6-1.7.1-actually1.6/dlls/msvcp60/ios.c wine1.6-1.6.1/dlls/msvcp60/ios.c --- wine1.6-1.7.1-actually1.6/dlls/msvcp60/ios.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msvcp60/ios.c 2013-11-15 19:30:24.000000000 +0000 @@ -2310,7 +2310,8 @@ this->cvt = NULL; this->state0 = basic_filebuf_char__Init__Stinit; this->state = basic_filebuf_char__Init__Stinit; - this->str = NULL; + if(which == INITFL_new) + this->str = NULL; this->close = (which == INITFL_open); this->file = file; @@ -2802,7 +2803,8 @@ this->cvt = NULL; this->state0 = basic_filebuf_short__Init__Stinit; this->state = basic_filebuf_short__Init__Stinit; - this->str = NULL; + if(which == INITFL_new) + this->str = NULL; this->close = (which == INITFL_open); this->file = file; @@ -2819,7 +2821,8 @@ this->cvt = NULL; this->state0 = basic_filebuf_short__Init__Stinit; this->state = basic_filebuf_short__Init__Stinit; - this->str = NULL; + if(which == INITFL_new) + this->str = NULL; this->close = (which == INITFL_open); this->file = file; diff -Nru wine1.6-1.7.1-actually1.6/dlls/msvcp60/locale.c wine1.6-1.6.1/dlls/msvcp60/locale.c --- wine1.6-1.7.1-actually1.6/dlls/msvcp60/locale.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msvcp60/locale.c 2013-11-15 19:30:24.000000000 +0000 @@ -8110,7 +8110,7 @@ locale__Locimp__Makeushloc(locinfo, cat, locimp, loc); locimp->catmask |= cat; - basic_string_char_copy_ctor(&locimp->name, &locinfo->newlocname); + basic_string_char_assign(&locimp->name, &locinfo->newlocname); return locimp; } @@ -8278,7 +8278,7 @@ TRACE("(%p)\n", this); if(this->ptr && locale_facet__Decref(&this->ptr->facet)) { locale__Locimp_dtor(this->ptr); - MSVCRT_operator_delete(this); + MSVCRT_operator_delete(this->ptr); } } diff -Nru wine1.6-1.7.1-actually1.6/dlls/msvcp60/msvcp.h wine1.6-1.6.1/dlls/msvcp60/msvcp.h --- wine1.6-1.7.1-actually1.6/dlls/msvcp60/msvcp.h 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msvcp60/msvcp.h 2013-11-15 19:30:24.000000000 +0000 @@ -51,6 +51,7 @@ basic_string_char* __thiscall basic_string_char_append_ch(basic_string_char*, char); MSVCP_size_t __thiscall basic_string_char_length(const basic_string_char*); basic_string_char* __thiscall basic_string_char_append_len_ch(basic_string_char*, MSVCP_size_t, char); +basic_string_char* __thiscall basic_string_char_assign(basic_string_char*, const basic_string_char*); typedef struct { diff -Nru wine1.6-1.7.1-actually1.6/dlls/msvcp60/string.c wine1.6-1.6.1/dlls/msvcp60/string.c --- wine1.6-1.7.1-actually1.6/dlls/msvcp60/string.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msvcp60/string.c 2013-11-15 19:30:24.000000000 +0000 @@ -1714,8 +1714,8 @@ if(len > size) return; - basic_string_char__Grow(this, size, FALSE); - basic_string_char__Eos(this, len); + if(basic_string_char__Grow(this, size, FALSE)) + basic_string_char__Eos(this, len); } /* ?empty@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE_NXZ */ @@ -1809,9 +1809,15 @@ return wcslen((WCHAR*)str); } -static wchar_t* char_traits_wchar_assignn(wchar_t *str, MSVCP_size_t num, wchar_t c) +static wchar_t* char_traits_wchar_assignn(wchar_t *str, + MSVCP_size_t num, wchar_t c) { - return memset(str, c, num); + MSVCP_size_t i; + + for(i=0; i size) return; - basic_string_wchar__Grow(this, size, FALSE); - basic_string_wchar__Eos(this, len); + if(basic_string_wchar__Grow(this, size, FALSE)) + basic_string_wchar__Eos(this, len); } /* ?empty@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE_NXZ */ diff -Nru wine1.6-1.7.1-actually1.6/dlls/msvcp71/locale.c wine1.6-1.6.1/dlls/msvcp71/locale.c --- wine1.6-1.7.1-actually1.6/dlls/msvcp71/locale.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msvcp71/locale.c 2013-11-15 19:30:24.000000000 +0000 @@ -8651,7 +8651,7 @@ locale__Locimp__Makeushloc(locinfo, cat, locimp, loc); locimp->catmask |= cat; - MSVCP_basic_string_char_copy_ctor(&locimp->name, &locinfo->newlocname); + MSVCP_basic_string_char_assign(&locimp->name, &locinfo->newlocname); return locimp; } @@ -8810,7 +8810,7 @@ TRACE("(%p)\n", this); if(this->ptr && locale_facet__Decref(&this->ptr->facet)) { locale__Locimp_dtor(this->ptr); - MSVCRT_operator_delete(this); + MSVCRT_operator_delete(this->ptr); } } diff -Nru wine1.6-1.7.1-actually1.6/dlls/msvcp71/msvcp.h wine1.6-1.6.1/dlls/msvcp71/msvcp.h --- wine1.6-1.7.1-actually1.6/dlls/msvcp71/msvcp.h 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msvcp71/msvcp.h 2013-11-15 19:30:24.000000000 +0000 @@ -55,6 +55,7 @@ void __thiscall MSVCP_basic_string_char_clear(basic_string_char*); basic_string_char* __thiscall MSVCP_basic_string_char_append_ch(basic_string_char*, char); MSVCP_size_t __thiscall MSVCP_basic_string_char_length(const basic_string_char*); +basic_string_char* __thiscall MSVCP_basic_string_char_assign(basic_string_char*, const basic_string_char*); #define BUF_SIZE_WCHAR 8 typedef struct diff -Nru wine1.6-1.7.1-actually1.6/dlls/msvcp90/locale.c wine1.6-1.6.1/dlls/msvcp90/locale.c --- wine1.6-1.7.1-actually1.6/dlls/msvcp90/locale.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msvcp90/locale.c 2013-11-15 19:30:24.000000000 +0000 @@ -8949,7 +8949,7 @@ locale__Locimp__Makeushloc(locinfo, cat, locimp, loc); locimp->catmask |= cat; - MSVCP_basic_string_char_copy_ctor(&locimp->name, &locinfo->newlocname); + MSVCP_basic_string_char_assign(&locimp->name, &locinfo->newlocname); return locimp; } diff -Nru wine1.6-1.7.1-actually1.6/dlls/msvcp90/msvcp90.h wine1.6-1.6.1/dlls/msvcp90/msvcp90.h --- wine1.6-1.7.1-actually1.6/dlls/msvcp90/msvcp90.h 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msvcp90/msvcp90.h 2013-11-15 19:30:24.000000000 +0000 @@ -55,6 +55,7 @@ void __thiscall MSVCP_basic_string_char_clear(basic_string_char*); basic_string_char* __thiscall MSVCP_basic_string_char_append_ch(basic_string_char*, char); MSVCP_size_t __thiscall MSVCP_basic_string_char_length(const basic_string_char*); +basic_string_char* __thiscall MSVCP_basic_string_char_assign(basic_string_char*, const basic_string_char*); #define BUF_SIZE_WCHAR 8 typedef struct diff -Nru wine1.6-1.7.1-actually1.6/dlls/msvcr100/msvcr100.spec wine1.6-1.6.1/dlls/msvcr100/msvcr100.spec --- wine1.6-1.7.1-actually1.6/dlls/msvcr100/msvcr100.spec 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msvcr100/msvcr100.spec 2013-11-15 19:30:24.000000000 +0000 @@ -452,7 +452,7 @@ @ cdecl -arch=win64 ?_wopen@@YAHPEB_WHH@Z(wstr long long) msvcrt._wopen @ cdecl -arch=win32 ?_wsopen@@YAHPB_WHHH@Z(wstr long long long) msvcrt._wsopen @ cdecl -arch=win64 ?_wsopen@@YAHPEB_WHHH@Z(wstr long long long) msvcrt._wsopen -@ thiscall -arch=win32 ?before@type_info@@QBEHABV1@@Z(ptr ptr) msvcrt.?before@type_info@@QBEHABV1@@Z +@ thiscall -arch=i386 ?before@type_info@@QBEHABV1@@Z(ptr ptr) msvcrt.?before@type_info@@QBEHABV1@@Z @ cdecl -arch=win64 ?before@type_info@@QEBAHAEBV1@@Z(ptr ptr) msvcrt.?before@type_info@@QEBAHAEBV1@@Z @ stub -arch=win32 ?get_error_code@scheduler_resource_allocation_error@Concurrency@@QBEJXZ @ stub -arch=win64 ?get_error_code@scheduler_resource_allocation_error@Concurrency@@QEBAJXZ @@ -1204,7 +1204,7 @@ @ cdecl _mkgmtime32(ptr) msvcrt._mkgmtime32 @ cdecl _mkgmtime64(ptr) msvcrt._mkgmtime64 @ cdecl _mktemp(str) msvcrt._mktemp -@ stub _mktemp_s +@ cdecl _mktemp_s(str long) msvcrt._mktemp_s @ cdecl _mktime32(ptr) msvcrt._mktime32 @ cdecl _mktime64(ptr) msvcrt._mktime64 @ cdecl _msize(ptr) msvcrt._msize @@ -1296,7 +1296,7 @@ @ varargs _snwprintf(ptr long wstr) msvcrt._snwprintf @ varargs _snwprintf_l(ptr long wstr ptr) msvcrt._snwprintf_l @ varargs _snwprintf_s(ptr long long wstr) msvcrt._snwprintf_s -@ stub _snwprintf_s_l +@ varargs _snwprintf_s_l(ptr long long wstr ptr) msvcrt._snwprintf_s_l @ varargs _snwscanf(wstr long wstr) msvcrt._snwscanf @ varargs _snwscanf_l(wstr long wstr ptr) msvcrt._snwscanf_l @ varargs _snwscanf_s(wstr long wstr) msvcrt._snwscanf_s @@ -1371,7 +1371,7 @@ @ stub _swprintf_c_l @ stub _swprintf_p @ varargs _swprintf_p_l(ptr long wstr ptr) msvcrt._swprintf_p_l -@ stub _swprintf_s_l +@ varargs _swprintf_s_l(ptr long wstr ptr) msvcrt._swprintf_s_l @ varargs _swscanf_l(wstr wstr ptr) msvcrt._swscanf_l @ varargs _swscanf_s_l(wstr wstr ptr) msvcrt._swscanf_s_l @ extern _sys_errlist msvcrt._sys_errlist @@ -1505,7 +1505,7 @@ @ cdecl _wcstod_l(wstr ptr) msvcrt._wcstod_l @ cdecl -ret64 _wcstoi64(wstr ptr long) msvcrt._wcstoi64 @ cdecl -ret64 _wcstoi64_l(wstr ptr long ptr) msvcrt._wcstoi64_l -@ stub _wcstol_l +@ cdecl _wcstol_l(wstr ptr long ptr) msvcrt._wcstol_l @ cdecl _wcstombs_l(ptr ptr long ptr) msvcrt._wcstombs_l @ cdecl _wcstombs_s_l(ptr ptr long wstr long ptr) msvcrt._wcstombs_s_l @ cdecl -ret64 _wcstoui64(wstr ptr long) msvcrt._wcstoui64 @@ -1520,8 +1520,8 @@ @ stub _wctime32_s @ cdecl _wctime64(ptr) msvcrt._wctime64 @ stub _wctime64_s -@ stub _wctomb_l -@ stub _wctomb_s_l +@ cdecl _wctomb_l(ptr long ptr) msvcrt._wctomb_l +@ cdecl _wctomb_s_l(ptr ptr long long ptr) msvcrt._wctomb_s_l # extern _wctype @ cdecl _wdupenv_s(ptr ptr wstr) msvcrt._wdupenv_s @ extern _wenviron msvcrt._wenviron @@ -1557,7 +1557,7 @@ @ cdecl _wmakepath_s(ptr long wstr wstr wstr wstr) msvcrt._wmakepath_s @ cdecl _wmkdir(wstr) msvcrt._wmkdir @ cdecl _wmktemp(wstr) msvcrt._wmktemp -@ stub _wmktemp_s +@ cdecl _wmktemp_s(wstr long) msvcrt._wmktemp_s @ varargs _wopen(wstr long) msvcrt._wopen @ cdecl _wperror(wstr) msvcrt._wperror @ extern _wpgmptr msvcrt._wpgmptr @@ -1877,7 +1877,7 @@ @ cdecl wcsxfrm(ptr wstr long) msvcrt.wcsxfrm @ cdecl wctob(long) msvcrt.wctob @ cdecl wctomb(ptr long) msvcrt.wctomb -@ stub wctomb_s +@ cdecl wctomb_s(ptr ptr long long) msvcrt.wctomb_s @ cdecl wmemcpy_s(ptr long ptr long) @ cdecl wmemmove_s(ptr long ptr long) @ varargs wprintf(wstr) msvcrt.wprintf diff -Nru wine1.6-1.7.1-actually1.6/dlls/msvcr110/msvcr110.spec wine1.6-1.6.1/dlls/msvcr110/msvcr110.spec --- wine1.6-1.7.1-actually1.6/dlls/msvcr110/msvcr110.spec 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msvcr110/msvcr110.spec 2013-11-15 19:30:24.000000000 +0000 @@ -738,9 +738,9 @@ @ cdecl -arch=win64 ?_wopen@@YAHPEB_WHH@Z(wstr long long) msvcrt._wopen @ cdecl -arch=win32 ?_wsopen@@YAHPB_WHHH@Z(wstr long long long) msvcrt._wsopen @ cdecl -arch=win64 ?_wsopen@@YAHPEB_WHHH@Z(wstr long long long) msvcrt._wsopen -@ stub -arch=arm ?before@type_info@@QBA_NABV1@@Z -@ stub -arch=i386 ?before@type_info@@QBE_NABV1@@Z -@ stub -arch=win64 ?before@type_info@@QEBA_NAEBV1@@Z +@ cdecl -arch=arm ?before@type_info@@QBA_NABV1@@Z(ptr ptr) msvcrt.?before@type_info@@QBA_NABV1@@Z +@ thiscall -arch=i386 ?before@type_info@@QBE_NABV1@@Z(ptr ptr) msvcrt.?before@type_info@@QBEHABV1@@Z +@ cdecl -arch=win64 ?before@type_info@@QEBA_NAEBV1@@Z(ptr ptr) msvcrt.?before@type_info@@QEBAHAEBV1@@Z @ stub ?current@location@Concurrency@@SA?AV12@XZ @ stub ?from_numa_node@location@Concurrency@@SA?AV12@G@Z @ stub -arch=arm ?get_error_code@scheduler_resource_allocation_error@Concurrency@@QBAJXZ @@ -1566,7 +1566,7 @@ @ cdecl _mkgmtime32(ptr) msvcrt._mkgmtime32 @ cdecl _mkgmtime64(ptr) msvcrt._mkgmtime64 @ cdecl _mktemp(str) msvcrt._mktemp -@ stub _mktemp_s +@ cdecl _mktemp_s(str long) msvcrt._mktemp_s @ cdecl _mktime32(ptr) msvcrt._mktime32 @ cdecl _mktime64(ptr) msvcrt._mktime64 @ cdecl _msize(ptr) msvcrt._msize @@ -1658,7 +1658,7 @@ @ varargs _snwprintf(ptr long wstr) msvcrt._snwprintf @ varargs _snwprintf_l(ptr long wstr ptr) msvcrt._snwprintf_l @ varargs _snwprintf_s(ptr long long wstr) msvcrt._snwprintf_s -@ stub _snwprintf_s_l +@ varargs _snwprintf_s_l(ptr long long wstr ptr) msvcrt._snwprintf_s_l @ varargs _snwscanf(wstr long wstr) msvcrt._snwscanf @ varargs _snwscanf_l(wstr long wstr ptr) msvcrt._snwscanf_l @ varargs _snwscanf_s(wstr long wstr) msvcrt._snwscanf_s @@ -1733,7 +1733,7 @@ @ stub _swprintf_c_l @ stub _swprintf_p @ varargs _swprintf_p_l(ptr long wstr ptr) msvcrt._swprintf_p_l -@ stub _swprintf_s_l +@ varargs _swprintf_s_l(ptr long wstr ptr) msvcrt._swprintf_s_l @ varargs _swscanf_l(wstr wstr ptr) msvcrt._swscanf_l @ varargs _swscanf_s_l(wstr wstr ptr) msvcrt._swscanf_s_l @ extern _sys_errlist msvcrt._sys_errlist @@ -1868,7 +1868,7 @@ @ cdecl _wcstod_l(wstr ptr) msvcrt._wcstod_l @ cdecl -ret64 _wcstoi64(wstr ptr long) msvcrt._wcstoi64 @ cdecl -ret64 _wcstoi64_l(wstr ptr long ptr) msvcrt._wcstoi64_l -@ stub _wcstol_l +@ cdecl _wcstol_l(wstr ptr long ptr) msvcrt._wcstol_l @ cdecl _wcstombs_l(ptr ptr long ptr) msvcrt._wcstombs_l @ cdecl _wcstombs_s_l(ptr ptr long wstr long ptr) msvcrt._wcstombs_s_l @ cdecl -ret64 _wcstoui64(wstr ptr long) msvcrt._wcstoui64 @@ -1883,8 +1883,8 @@ @ stub _wctime32_s @ cdecl _wctime64(ptr) msvcrt._wctime64 @ stub _wctime64_s -@ stub _wctomb_l -@ stub _wctomb_s_l +@ cdecl _wctomb_l(ptr long ptr) msvcrt._wctomb_l +@ cdecl _wctomb_s_l(ptr ptr long long ptr) msvcrt._wctomb_s_l # extern _wctype @ cdecl _wdupenv_s(ptr ptr wstr) msvcrt._wdupenv_s @ extern _wenviron msvcrt._wenviron @@ -1919,7 +1919,7 @@ @ cdecl _wmakepath_s(ptr long wstr wstr wstr wstr) msvcrt._wmakepath_s @ cdecl _wmkdir(wstr) msvcrt._wmkdir @ cdecl _wmktemp(wstr) msvcrt._wmktemp -@ stub _wmktemp_s +@ cdecl _wmktemp_s(wstr long) msvcrt._wmktemp_s @ varargs _wopen(wstr long) msvcrt._wopen @ cdecl _wperror(wstr) msvcrt._wperror @ extern _wpgmptr msvcrt._wpgmptr @@ -2011,7 +2011,7 @@ @ cdecl exp(double) msvcrt.exp @ cdecl -arch=arm,x86_64 expf(float) msvcrt.expf @ cdecl fabs(double) msvcrt.fabs -@ stub -arch=arm fabsf +@ cdecl -arch=arm,x86_64 fabsf(float) msvcrt.fabsf @ cdecl fclose(ptr) msvcrt.fclose @ cdecl feof(ptr) msvcrt.feof @ cdecl ferror(ptr) msvcrt.ferror @@ -2240,7 +2240,7 @@ @ cdecl wcsxfrm(ptr wstr long) msvcrt.wcsxfrm @ cdecl wctob(long) msvcrt.wctob @ cdecl wctomb(ptr long) msvcrt.wctomb -@ stub wctomb_s +@ cdecl wctomb_s(ptr ptr long long) msvcrt.wctomb_s @ cdecl wmemcpy_s(ptr long ptr long) msvcr100.wmemcpy_s @ cdecl wmemmove_s(ptr long ptr long) msvcr100.wmemmove_s @ varargs wprintf(wstr) msvcrt.wprintf diff -Nru wine1.6-1.7.1-actually1.6/dlls/msvcr70/msvcr70.spec wine1.6-1.6.1/dlls/msvcr70/msvcr70.spec --- wine1.6-1.7.1-actually1.6/dlls/msvcr70/msvcr70.spec 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msvcr70/msvcr70.spec 2013-11-15 19:30:24.000000000 +0000 @@ -77,7 +77,7 @@ @ cdecl ?_set_new_mode@@YAHH@Z(long) msvcrt.?_set_new_mode@@YAHH@Z @ cdecl -arch=win32 ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z(ptr) msvcrt.?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z @ cdecl -arch=win64 ?_set_se_translator@@YAP6AXIPEAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z(ptr) msvcrt.?_set_se_translator@@YAP6AXIPEAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z -@ thiscall -arch=win32 ?before@type_info@@QBEHABV1@@Z(ptr ptr) msvcrt.?before@type_info@@QBEHABV1@@Z +@ thiscall -arch=i386 ?before@type_info@@QBEHABV1@@Z(ptr ptr) msvcrt.?before@type_info@@QBEHABV1@@Z @ cdecl -arch=win64 ?before@type_info@@QEBAHAEBV1@@Z(ptr ptr) msvcrt.?before@type_info@@QEBAHAEBV1@@Z @ thiscall -arch=win32 ?name@type_info@@QBEPBDXZ(ptr) msvcrt.?name@type_info@@QBEPBDXZ @ cdecl -arch=win64 ?name@type_info@@QEBAPEBDXZ(ptr) msvcrt.?name@type_info@@QEBAPEBDXZ diff -Nru wine1.6-1.7.1-actually1.6/dlls/msvcr71/msvcr71.spec wine1.6-1.6.1/dlls/msvcr71/msvcr71.spec --- wine1.6-1.7.1-actually1.6/dlls/msvcr71/msvcr71.spec 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msvcr71/msvcr71.spec 2013-11-15 19:30:24.000000000 +0000 @@ -67,7 +67,7 @@ @ cdecl ?_set_new_mode@@YAHH@Z(long) msvcrt.?_set_new_mode@@YAHH@Z @ cdecl -arch=win32 ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z(ptr) msvcrt.?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z @ cdecl -arch=win64 ?_set_se_translator@@YAP6AXIPEAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z(ptr) msvcrt.?_set_se_translator@@YAP6AXIPEAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z -@ thiscall -arch=win32 ?before@type_info@@QBEHABV1@@Z(ptr ptr) msvcrt.?before@type_info@@QBEHABV1@@Z +@ thiscall -arch=i386 ?before@type_info@@QBEHABV1@@Z(ptr ptr) msvcrt.?before@type_info@@QBEHABV1@@Z @ cdecl -arch=win64 ?before@type_info@@QEBAHAEBV1@@Z(ptr ptr) msvcrt.?before@type_info@@QEBAHAEBV1@@Z @ thiscall -arch=win32 ?name@type_info@@QBEPBDXZ(ptr) msvcrt.?name@type_info@@QBEPBDXZ @ cdecl -arch=win64 ?name@type_info@@QEBAPEBDXZ(ptr) msvcrt.?name@type_info@@QEBAPEBDXZ diff -Nru wine1.6-1.7.1-actually1.6/dlls/msvcr80/msvcr80.spec wine1.6-1.6.1/dlls/msvcr80/msvcr80.spec --- wine1.6-1.7.1-actually1.6/dlls/msvcr80/msvcr80.spec 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msvcr80/msvcr80.spec 2013-11-15 19:30:24.000000000 +0000 @@ -107,7 +107,7 @@ @ cdecl -arch=win64 ?_wopen@@YAHPEB_WHH@Z(wstr long long) msvcrt._wopen @ cdecl -arch=win32 ?_wsopen@@YAHPB_WHHH@Z(wstr long long long) msvcrt._wsopen @ cdecl -arch=win64 ?_wsopen@@YAHPEB_WHHH@Z(wstr long long long) msvcrt._wsopen -@ thiscall -arch=win32 ?before@type_info@@QBEHABV1@@Z(ptr ptr) msvcrt.?before@type_info@@QBEHABV1@@Z +@ thiscall -arch=i386 ?before@type_info@@QBEHABV1@@Z(ptr ptr) msvcrt.?before@type_info@@QBEHABV1@@Z @ cdecl -arch=win64 ?before@type_info@@QEBAHAEBV1@@Z(ptr ptr) msvcrt.?before@type_info@@QEBAHAEBV1@@Z @ stub -arch=win32 ?name@type_info@@QBEPBDPAU__type_info_node@@@Z # public: char const * __thiscall type_info::name(struct __type_info_node *)const @ stub -arch=win64 ?name@type_info@@QEBAPEBDPEAU__type_info_node@@@Z # public: char const * __ptr64 __cdecl type_info::name(struct __type_info_node * __ptr64)const __ptr64 @@ -875,7 +875,7 @@ @ cdecl _mkgmtime32(ptr) msvcrt._mkgmtime32 @ cdecl _mkgmtime64(ptr) msvcrt._mkgmtime64 @ cdecl _mktemp(str) msvcrt._mktemp -@ stub _mktemp_s +@ cdecl _mktemp_s(str long) msvcrt._mktemp_s @ cdecl _mktime32(ptr) msvcrt._mktime32 @ cdecl _mktime64(ptr) msvcrt._mktime64 @ cdecl _msize(ptr) msvcrt._msize @@ -975,7 +975,7 @@ @ varargs _snwprintf(ptr long wstr) msvcrt._snwprintf @ varargs _snwprintf_l(ptr long wstr ptr) msvcrt._snwprintf_l @ varargs _snwprintf_s(ptr long long wstr) msvcrt._snwprintf_s -@ stub _snwprintf_s_l +@ varargs _snwprintf_s_l(ptr long long wstr ptr) msvcrt._snwprintf_s_l @ varargs _snwscanf(wstr long wstr) msvcrt._snwscanf @ varargs _snwscanf_l(wstr long wstr ptr) msvcrt._snwscanf_l @ varargs _snwscanf_s(wstr long wstr) msvcrt._snwscanf_s @@ -1049,7 +1049,7 @@ @ stub _swprintf_c @ stub _swprintf_p @ varargs _swprintf_p_l(ptr long wstr ptr) msvcrt._swprintf_p_l -@ stub _swprintf_s_l +@ varargs _swprintf_s_l(ptr long wstr ptr) msvcrt._swprintf_s_l @ varargs _swscanf_l(wstr wstr ptr) msvcrt._swscanf_l @ varargs _swscanf_s_l(wstr wstr ptr) msvcrt._swscanf_s_l @ extern _sys_errlist msvcrt._sys_errlist @@ -1183,7 +1183,7 @@ @ cdecl _wcstod_l(wstr ptr) msvcrt._wcstod_l @ cdecl -ret64 _wcstoi64(wstr ptr long) msvcrt._wcstoi64 @ cdecl -ret64 _wcstoi64_l(wstr ptr long ptr) msvcrt._wcstoi64_l -@ stub _wcstol_l +@ cdecl _wcstol_l(wstr ptr long ptr) msvcrt._wcstol_l @ cdecl _wcstombs_l(ptr ptr long ptr) msvcrt._wcstombs_l @ cdecl _wcstombs_s_l(ptr ptr long wstr long ptr) msvcrt._wcstombs_s_l @ cdecl -ret64 _wcstoui64(wstr ptr long) msvcrt._wcstoui64 @@ -1198,8 +1198,8 @@ @ stub _wctime32_s @ cdecl _wctime64(ptr) msvcrt._wctime64 @ stub _wctime64_s -@ stub _wctomb_l -@ stub _wctomb_s_l +@ cdecl _wctomb_l(ptr long ptr) msvcrt._wctomb_l +@ cdecl _wctomb_s_l(ptr ptr long long ptr) msvcrt._wctomb_s_l # extern _wctype @ cdecl _wdupenv_s(ptr ptr wstr) msvcrt._wdupenv_s @ extern _wenviron msvcrt._wenviron @@ -1238,7 +1238,7 @@ @ cdecl _wmakepath_s(ptr long wstr wstr wstr wstr) msvcrt._wmakepath_s @ cdecl _wmkdir(wstr) msvcrt._wmkdir @ cdecl _wmktemp(wstr) msvcrt._wmktemp -@ stub _wmktemp_s +@ cdecl _wmktemp_s(wstr long) msvcrt._wmktemp_s @ varargs _wopen(wstr long) msvcrt._wopen @ cdecl _wperror(wstr) msvcrt._wperror @ extern _wpgmptr msvcrt._wpgmptr @@ -1556,7 +1556,7 @@ @ cdecl wcsxfrm(ptr wstr long) msvcrt.wcsxfrm @ cdecl wctob(long) msvcrt.wctob @ cdecl wctomb(ptr long) msvcrt.wctomb -@ stub wctomb_s +@ cdecl wctomb_s(ptr ptr long long) msvcrt.wctomb_s @ varargs wprintf(wstr) msvcrt.wprintf @ varargs wprintf_s(wstr) msvcrt.wprintf_s @ varargs wscanf(wstr) msvcrt.wscanf diff -Nru wine1.6-1.7.1-actually1.6/dlls/msvcr90/msvcr90.c wine1.6-1.6.1/dlls/msvcr90/msvcr90.c --- wine1.6-1.7.1-actually1.6/dlls/msvcr90/msvcr90.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msvcr90/msvcr90.c 2013-11-15 19:30:24.000000000 +0000 @@ -18,17 +18,58 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include + #include #include "stdio.h" #include "windef.h" #include "winbase.h" +#ifdef __i386__ + +#define THISCALL(func) __thiscall_ ## func +#define __thiscall __stdcall +#define DEFINE_THISCALL_WRAPPER(func,args) \ + extern void THISCALL(func)(void); \ + __ASM_GLOBAL_FUNC(__thiscall_ ## func, \ + "popl %eax\n\t" \ + "pushl %ecx\n\t" \ + "pushl %eax\n\t" \ + "jmp " __ASM_NAME(#func) __ASM_STDCALL(args) ) + +extern void *call_thiscall_func; +__ASM_GLOBAL_FUNC(call_thiscall_func, + "popl %eax\n\t" + "popl %edx\n\t" + "popl %ecx\n\t" + "pushl %eax\n\t" + "jmp *%edx\n\t") + +#define call_func1(func,this) ((void* (WINAPI*)(void*,void*))&call_thiscall_func)(func,this) +#define call_func2(func,this,a) ((void* (WINAPI*)(void*,void*,const void*))&call_thiscall_func)(func,this,(const void*)(a)) +#define call_func3(func,this,a,b) ((void* (WINAPI*)(void*,void*,const void*,const void*))&call_thiscall_func)(func,this,(const void*)(a),(const void*)(b)) + +#else /* __i386__ */ + +#define __thiscall __cdecl +#define DEFINE_THISCALL_WRAPPER(func,args) /* nothing */ + +#define call_func1(func,this) func(this) +#define call_func2(func,this,a) func(this,a) +#define call_func3(func,this,a,b) func(this,a,b) + +#endif /* __i386__ */ + typedef void (__cdecl *MSVCRT__se_translator_function)(unsigned int code, struct _EXCEPTION_POINTERS *info); static void* (__cdecl *MSVCRT_operator_new)(size_t); static void (__cdecl *MSVCRT_operator_delete)(void*); static MSVCRT__se_translator_function (__cdecl *MSVCRT__set_se_translator)(MSVCRT__se_translator_function); +static void* (__thiscall *MSVCRT_exception_ctor)(void*, const char**); +static void* (__thiscall *MSVCRT_exception_ctor_noalloc)(void*, char**, int); +static void* (__thiscall *MSVCRT_exception_copy_ctor)(void*, const void*); +static void (__thiscall *MSVCRT_exception_dtor)(void*); static void init_cxx_funcs(void) { @@ -40,6 +81,10 @@ MSVCRT_operator_delete = (void*)GetProcAddress(hmod, "??3@YAXPEAX@Z"); MSVCRT__set_se_translator = (void*)GetProcAddress(hmod, "?_set_se_translator@@YAP6AXIPEAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z"); + MSVCRT_exception_ctor = (void*)GetProcAddress(hmod, "??0exception@@QEAA@AEBQEBD@Z"); + MSVCRT_exception_ctor_noalloc = (void*)GetProcAddress(hmod, "??0exception@@QEAA@AEBQEBDH@Z"); + MSVCRT_exception_copy_ctor = (void*)GetProcAddress(hmod, "??0exception@@QEAA@AEBV0@@Z"); + MSVCRT_exception_dtor = (void*)GetProcAddress(hmod, "??1exception@@UEAA@XZ"); } else { @@ -47,6 +92,10 @@ MSVCRT_operator_delete = (void*)GetProcAddress(hmod, "??3@YAXPAX@Z"); MSVCRT__set_se_translator = (void*)GetProcAddress(hmod, "?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z"); + MSVCRT_exception_ctor = (void*)GetProcAddress(hmod, "??0exception@@QAE@ABQBD@Z"); + MSVCRT_exception_ctor_noalloc = (void*)GetProcAddress(hmod, "??0exception@@QAE@ABQBDH@Z"); + MSVCRT_exception_copy_ctor = (void*)GetProcAddress(hmod, "??0exception@@QAE@ABV0@@Z"); + MSVCRT_exception_dtor = (void*)GetProcAddress(hmod, "??1exception@@UAE@XZ"); } } @@ -116,3 +165,35 @@ { return MSVCRT__set_se_translator(func); } + +/* ??0exception@std@@QAE@ABQBD@Z */ +/* ??0exception@std@@QEAA@AEBQEBD@Z */ +DEFINE_THISCALL_WRAPPER(exception_ctor, 8) +void* __thiscall exception_ctor(void *this, const char **name) +{ + return call_func2(MSVCRT_exception_ctor, this, name); +} + +/* ??0exception@std@@QAE@ABQBDH@Z */ +/* ??0exception@std@@QEAA@AEBQEBDH@Z */ +DEFINE_THISCALL_WRAPPER(exception_ctor_noalloc, 12) +void* __thiscall exception_ctor_noalloc(void *this, char **name, int noalloc) +{ + return call_func3(MSVCRT_exception_ctor_noalloc, this, name, noalloc); +} + +/* ??0exception@std@@QAE@ABV01@@Z */ +/* ??0exception@std@@QEAA@AEBV01@@Z */ +DEFINE_THISCALL_WRAPPER(exception_copy_ctor, 8) +void* __thiscall exception_copy_ctor(void *this, const void *rhs) +{ + return call_func2(MSVCRT_exception_copy_ctor, this, rhs); +} + +/* ??1exception@std@@UAE@XZ */ +/* ??1exception@std@@UEAA@XZ */ +DEFINE_THISCALL_WRAPPER(exception_dtor, 4) +void __thiscall exception_dtor(void *this) +{ + call_func1(MSVCRT_exception_dtor, this); +} diff -Nru wine1.6-1.7.1-actually1.6/dlls/msvcr90/msvcr90.spec wine1.6-1.6.1/dlls/msvcr90/msvcr90.spec --- wine1.6-1.7.1-actually1.6/dlls/msvcr90/msvcr90.spec 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msvcr90/msvcr90.spec 2013-11-15 19:30:24.000000000 +0000 @@ -12,12 +12,12 @@ @ cdecl -arch=win64 ??0bad_typeid@std@@QEAA@AEBV01@@Z(ptr ptr) msvcrt.??0bad_typeid@@QEAA@AEBV0@@Z @ thiscall -arch=i386 ??0bad_typeid@std@@QAE@PBD@Z(ptr str) msvcrt.??0bad_typeid@@QAE@PBD@Z @ cdecl -arch=win64 ??0bad_typeid@std@@QEAA@PEBD@Z(ptr str) msvcrt.??0bad_typeid@@QEAA@PEBD@Z -@ thiscall -arch=i386 ??0exception@std@@QAE@ABQBD@Z(ptr ptr) msvcrt.??0exception@@QAE@ABQBD@Z -@ cdecl -arch=win64 ??0exception@std@@QEAA@AEBQEBD@Z(ptr ptr) msvcrt.??0exception@@QEAA@AEBQEBD@Z -@ thiscall -arch=i386 ??0exception@std@@QAE@ABQBDH@Z(ptr ptr long) msvcrt.??0exception@@QAE@ABQBDH@Z -@ cdecl -arch=win64 ??0exception@std@@QEAA@AEBQEBDH@Z(ptr ptr long) msvcrt.??0exception@@QEAA@AEBQEBDH@Z -@ thiscall -arch=i386 ??0exception@std@@QAE@ABV01@@Z(ptr ptr) msvcrt.??0exception@@QAE@ABV0@@Z -@ cdecl -arch=win64 ??0exception@std@@QEAA@AEBV01@@Z(ptr ptr) msvcrt.??0exception@@QEAA@AEBV0@@Z +@ thiscall -arch=i386 ??0exception@std@@QAE@ABQBD@Z(ptr ptr) exception_ctor +@ cdecl -arch=win64 ??0exception@std@@QEAA@AEBQEBD@Z(ptr ptr) exception_ctor +@ thiscall -arch=i386 ??0exception@std@@QAE@ABQBDH@Z(ptr ptr long) exception_ctor_noalloc +@ cdecl -arch=win64 ??0exception@std@@QEAA@AEBQEBDH@Z(ptr ptr long) exception_ctor_noalloc +@ thiscall -arch=i386 ??0exception@std@@QAE@ABV01@@Z(ptr ptr) exception_copy_ctor +@ cdecl -arch=win64 ??0exception@std@@QEAA@AEBV01@@Z(ptr ptr) exception_copy_ctor @ thiscall -arch=i386 ??0exception@std@@QAE@XZ(ptr) msvcrt.??0exception@@QAE@XZ @ cdecl -arch=win64 ??0exception@std@@QEAA@XZ(ptr) msvcrt.??0exception@@QEAA@XZ @ thiscall -arch=i386 ??1__non_rtti_object@std@@UAE@XZ(ptr) msvcrt.??1__non_rtti_object@@UAE@XZ @@ -26,8 +26,8 @@ @ cdecl -arch=win64 ??1bad_cast@std@@UEAA@XZ(ptr) msvcrt.??1bad_cast@@UEAA@XZ @ thiscall -arch=i386 ??1bad_typeid@std@@UAE@XZ(ptr) msvcrt.??1bad_typeid@@UAE@XZ @ cdecl -arch=win64 ??1bad_typeid@std@@UEAA@XZ(ptr) msvcrt.??1bad_typeid@@UEAA@XZ -@ thiscall -arch=i386 ??1exception@std@@UAE@XZ(ptr) msvcrt.??1exception@@UAE@XZ -@ cdecl -arch=win64 ??1exception@std@@UEAA@XZ(ptr) msvcrt.??1exception@@UEAA@XZ +@ thiscall -arch=i386 ??1exception@std@@UAE@XZ(ptr) exception_dtor +@ cdecl -arch=win64 ??1exception@std@@UEAA@XZ(ptr) exception_dtor @ thiscall -arch=i386 ??1type_info@@UAE@XZ(ptr) msvcrt.??1type_info@@UAE@XZ @ cdecl -arch=win64 ??1type_info@@UEAA@XZ(ptr) msvcrt.??1type_info@@UEAA@XZ @ cdecl -arch=win32 ??2@YAPAXI@Z(long) MSVCR90_operator_new @@ -107,7 +107,7 @@ @ cdecl -arch=win64 ?_wopen@@YAHPEB_WHH@Z(wstr long long) msvcrt._wopen @ cdecl -arch=win32 ?_wsopen@@YAHPB_WHHH@Z(wstr long long long) msvcrt._wsopen @ cdecl -arch=win64 ?_wsopen@@YAHPEB_WHHH@Z(wstr long long long) msvcrt._wsopen -@ thiscall -arch=win32 ?before@type_info@@QBEHABV1@@Z(ptr ptr) msvcrt.?before@type_info@@QBEHABV1@@Z +@ thiscall -arch=i386 ?before@type_info@@QBEHABV1@@Z(ptr ptr) msvcrt.?before@type_info@@QBEHABV1@@Z @ cdecl -arch=win64 ?before@type_info@@QEBAHAEBV1@@Z(ptr ptr) msvcrt.?before@type_info@@QEBAHAEBV1@@Z @ stub -arch=win32 ?name@type_info@@QBEPBDPAU__type_info_node@@@Z # public: char const * __thiscall type_info::name(struct __type_info_node *)const @ stub -arch=win64 ?name@type_info@@QEBAPEBDPEAU__type_info_node@@@Z # public: char const * __ptr64 __cdecl type_info::name(struct __type_info_node * __ptr64)const __ptr64 @@ -853,7 +853,7 @@ @ cdecl _mkgmtime32(ptr) msvcrt._mkgmtime32 @ cdecl _mkgmtime64(ptr) msvcrt._mkgmtime64 @ cdecl _mktemp(str) msvcrt._mktemp -@ stub _mktemp_s +@ cdecl _mktemp_s(str long) msvcrt._mktemp_s @ cdecl _mktime32(ptr) msvcrt._mktime32 @ cdecl _mktime64(ptr) msvcrt._mktime64 @ cdecl _msize(ptr) msvcrt._msize @@ -950,7 +950,7 @@ @ varargs _snwprintf(ptr long wstr) msvcrt._snwprintf @ varargs _snwprintf_l(ptr long wstr ptr) msvcrt._snwprintf_l @ varargs _snwprintf_s(ptr long long wstr) msvcrt._snwprintf_s -@ stub _snwprintf_s_l +@ varargs _snwprintf_s_l(ptr long long wstr ptr) msvcrt._snwprintf_s_l @ varargs _snwscanf(wstr long wstr) msvcrt._snwscanf @ varargs _snwscanf_l(wstr long wstr ptr) msvcrt._snwscanf_l @ varargs _snwscanf_s(wstr long wstr) msvcrt._snwscanf_s @@ -1025,7 +1025,7 @@ @ stub _swprintf_c_l @ stub _swprintf_p @ varargs _swprintf_p_l(ptr long wstr ptr) msvcrt._swprintf_p_l -@ stub _swprintf_s_l +@ varargs _swprintf_s_l(ptr long wstr ptr) msvcrt._swprintf_s_l @ varargs _swscanf_l(wstr wstr ptr) msvcrt._swscanf_l @ varargs _swscanf_s_l(wstr wstr ptr) msvcrt._swscanf_s_l @ extern _sys_errlist msvcrt._sys_errlist @@ -1159,7 +1159,7 @@ @ cdecl _wcstod_l(wstr ptr) msvcrt._wcstod_l @ cdecl -ret64 _wcstoi64(wstr ptr long) msvcrt._wcstoi64 @ cdecl -ret64 _wcstoi64_l(wstr ptr long ptr) msvcrt._wcstoi64_l -@ stub _wcstol_l +@ cdecl _wcstol_l(wstr ptr long ptr) msvcrt._wcstol_l @ cdecl _wcstombs_l(ptr ptr long ptr) msvcrt._wcstombs_l @ cdecl _wcstombs_s_l(ptr ptr long wstr long ptr) msvcrt._wcstombs_s_l @ cdecl -ret64 _wcstoui64(wstr ptr long) msvcrt._wcstoui64 @@ -1174,8 +1174,8 @@ @ stub _wctime32_s @ cdecl _wctime64(ptr) msvcrt._wctime64 @ stub _wctime64_s -@ stub _wctomb_l -@ stub _wctomb_s_l +@ cdecl _wctomb_l(ptr long ptr) msvcrt._wctomb_l +@ cdecl _wctomb_s_l(ptr ptr long long ptr) msvcrt._wctomb_s_l # extern _wctype @ cdecl _wdupenv_s(ptr ptr wstr) msvcrt._wdupenv_s @ extern _wenviron msvcrt._wenviron @@ -1211,7 +1211,7 @@ @ cdecl _wmakepath_s(ptr long wstr wstr wstr wstr) msvcrt._wmakepath_s @ cdecl _wmkdir(wstr) msvcrt._wmkdir @ cdecl _wmktemp(wstr) msvcrt._wmktemp -@ stub _wmktemp_s +@ cdecl _wmktemp_s(wstr long) msvcrt._wmktemp_s @ varargs _wopen(wstr long) msvcrt._wopen @ cdecl _wperror(wstr) msvcrt._wperror @ extern _wpgmptr msvcrt._wpgmptr @@ -1529,7 +1529,7 @@ @ cdecl wcsxfrm(ptr wstr long) msvcrt.wcsxfrm @ cdecl wctob(long) msvcrt.wctob @ cdecl wctomb(ptr long) msvcrt.wctomb -@ stub wctomb_s +@ cdecl wctomb_s(ptr ptr long long) msvcrt.wctomb_s @ varargs wprintf(wstr) msvcrt.wprintf @ varargs wprintf_s(wstr) msvcrt.wprintf_s @ varargs wscanf(wstr) msvcrt.wscanf diff -Nru wine1.6-1.7.1-actually1.6/dlls/msvcrt/file.c wine1.6-1.6.1/dlls/msvcrt/file.c --- wine1.6-1.7.1-actually1.6/dlls/msvcrt/file.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msvcrt/file.c 2013-11-15 19:30:24.000000000 +0000 @@ -65,6 +65,7 @@ #define WX_PIPE 0x08 #define WX_DONTINHERIT 0x10 #define WX_APPEND 0x20 +#define WX_NOSEEK 0x40 #define WX_TEXT 0x80 /* values for exflag - it's used differently in msvcr90.dll*/ @@ -347,7 +348,7 @@ } fdinfo->handle = hand; - fdinfo->wxflag = WX_OPEN | (flag & (WX_DONTINHERIT | WX_APPEND | WX_TEXT | WX_PIPE)); + fdinfo->wxflag = WX_OPEN | (flag & (WX_DONTINHERIT | WX_APPEND | WX_TEXT | WX_PIPE | WX_NOSEEK)); fdinfo->lookahead[0] = '\n'; fdinfo->lookahead[1] = '\n'; fdinfo->lookahead[2] = '\n'; @@ -515,16 +516,31 @@ } fdinfo = msvcrt_get_ioinfo(MSVCRT_STDIN_FILENO); - if (!(fdinfo->wxflag & WX_OPEN) || fdinfo->handle == INVALID_HANDLE_VALUE) - msvcrt_set_fd(GetStdHandle(STD_INPUT_HANDLE), WX_OPEN|WX_TEXT, MSVCRT_STDIN_FILENO); + if (!(fdinfo->wxflag & WX_OPEN) || fdinfo->handle == INVALID_HANDLE_VALUE) { + HANDLE h = GetStdHandle(STD_INPUT_HANDLE); + DWORD type = GetFileType(h); + + msvcrt_set_fd(h, WX_OPEN|WX_TEXT|((type&0xf)==FILE_TYPE_CHAR ? WX_NOSEEK : 0) + |((type&0xf)==FILE_TYPE_PIPE ? WX_PIPE : 0), MSVCRT_STDIN_FILENO); + } fdinfo = msvcrt_get_ioinfo(MSVCRT_STDOUT_FILENO); - if (!(fdinfo->wxflag & WX_OPEN) || fdinfo->handle == INVALID_HANDLE_VALUE) - msvcrt_set_fd(GetStdHandle(STD_OUTPUT_HANDLE), WX_OPEN|WX_TEXT, MSVCRT_STDOUT_FILENO); + if (!(fdinfo->wxflag & WX_OPEN) || fdinfo->handle == INVALID_HANDLE_VALUE) { + HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE); + DWORD type = GetFileType(h); + + msvcrt_set_fd(h, WX_OPEN|WX_TEXT|((type&0xf)==FILE_TYPE_CHAR ? WX_NOSEEK : 0) + |((type&0xf)==FILE_TYPE_PIPE ? WX_PIPE : 0), MSVCRT_STDOUT_FILENO); + } fdinfo = msvcrt_get_ioinfo(MSVCRT_STDERR_FILENO); - if (!(fdinfo->wxflag & WX_OPEN) || fdinfo->handle == INVALID_HANDLE_VALUE) - msvcrt_set_fd(GetStdHandle(STD_ERROR_HANDLE), WX_OPEN|WX_TEXT, MSVCRT_STDERR_FILENO); + if (!(fdinfo->wxflag & WX_OPEN) || fdinfo->handle == INVALID_HANDLE_VALUE) { + HANDLE h = GetStdHandle(STD_ERROR_HANDLE); + DWORD type = GetFileType(h); + + msvcrt_set_fd(h, WX_OPEN|WX_TEXT|((type&0xf)==FILE_TYPE_CHAR ? WX_NOSEEK : 0) + |((type&0xf)==FILE_TYPE_PIPE ? WX_PIPE : 0), MSVCRT_STDERR_FILENO); + } TRACE(":handles (%p)(%p)(%p)\n", msvcrt_get_ioinfo(MSVCRT_STDIN_FILENO)->handle, msvcrt_get_ioinfo(MSVCRT_STDOUT_FILENO)->handle, @@ -699,10 +715,12 @@ */ int CDECL _access_s(const char *filename, int mode) { - if (!MSVCRT_CHECK_PMT(filename != NULL)) return -1; - if (!MSVCRT_CHECK_PMT((mode & ~(MSVCRT_R_OK | MSVCRT_W_OK)) == 0)) return -1; + if (!MSVCRT_CHECK_PMT(filename != NULL)) return *MSVCRT__errno(); + if (!MSVCRT_CHECK_PMT((mode & ~(MSVCRT_R_OK | MSVCRT_W_OK)) == 0)) return *MSVCRT__errno(); - return MSVCRT__access(filename, mode); + if (MSVCRT__access(filename, mode) == -1) + return *MSVCRT__errno(); + return 0; } /********************************************************************* @@ -732,10 +750,12 @@ */ int CDECL _waccess_s(const MSVCRT_wchar_t *filename, int mode) { - if (!MSVCRT_CHECK_PMT(filename != NULL)) return -1; - if (!MSVCRT_CHECK_PMT((mode & ~(MSVCRT_R_OK | MSVCRT_W_OK)) == 0)) return -1; + if (!MSVCRT_CHECK_PMT(filename != NULL)) return *MSVCRT__errno(); + if (!MSVCRT_CHECK_PMT((mode & ~(MSVCRT_R_OK | MSVCRT_W_OK)) == 0)) return *MSVCRT__errno(); - return MSVCRT__waccess(filename, mode); + if (MSVCRT__waccess(filename, mode) == -1) + return *MSVCRT__errno(); + return 0; } /********************************************************************* @@ -1682,6 +1702,45 @@ } /********************************************************************* + * _mktemp_s (MSVCRT.@) + */ +int CDECL MSVCRT__mktemp_s(char *pattern, MSVCRT_size_t size) +{ + DWORD len, xno, id; + + if(!MSVCRT_CHECK_PMT(pattern!=NULL)) + return MSVCRT_EINVAL; + + for(len=0; len=6)) { + if(size) + pattern[0] = 0; + return MSVCRT_EINVAL; + } + + for(xno=1; xno<=6; xno++) + if(!MSVCRT_CHECK_PMT(pattern[len-xno] == 'X')) + return MSVCRT_EINVAL; + + id = GetCurrentProcessId(); + for(xno=1; xno<6; xno++) { + pattern[len-xno] = id%10 + '0'; + id /= 10; + } + + for(pattern[len-6]='a'; pattern[len-6]<='z'; pattern[len-6]++) { + if(GetFileAttributesA(pattern) == INVALID_FILE_ATTRIBUTES) + return 0; + } + + pattern[0] = 0; + *MSVCRT__errno() = MSVCRT_EEXIST; + return MSVCRT_EEXIST; +} + +/********************************************************************* * _mktemp (MSVCRT.@) */ char * CDECL MSVCRT__mktemp(char *pattern) @@ -1691,9 +1750,12 @@ int id; char letter = 'a'; + if(!pattern) + return NULL; + while(*pattern) numX = (*pattern++ == 'X')? numX + 1 : 0; - if (numX < 5) + if (numX < 6) return NULL; pattern--; id = GetCurrentProcessId(); @@ -1708,14 +1770,52 @@ do { *pattern = letter++; - if (GetFileAttributesA(retVal) == INVALID_FILE_ATTRIBUTES && - GetLastError() == ERROR_FILE_NOT_FOUND) + if (GetFileAttributesA(retVal) == INVALID_FILE_ATTRIBUTES) return retVal; } while(letter <= 'z'); return NULL; } /********************************************************************* + * _wmktemp_s (MSVCRT.@) + */ +int CDECL MSVCRT__wmktemp_s(MSVCRT_wchar_t *pattern, MSVCRT_size_t size) +{ + DWORD len, xno, id; + + if(!MSVCRT_CHECK_PMT(pattern!=NULL)) + return MSVCRT_EINVAL; + + for(len=0; len=6)) { + if(size) + pattern[0] = 0; + return MSVCRT_EINVAL; + } + + for(xno=1; xno<=6; xno++) + if(!MSVCRT_CHECK_PMT(pattern[len-xno] == 'X')) + return MSVCRT_EINVAL; + + id = GetCurrentProcessId(); + for(xno=1; xno<6; xno++) { + pattern[len-xno] = id%10 + '0'; + id /= 10; + } + + for(pattern[len-6]='a'; pattern[len-6]<='z'; pattern[len-6]++) { + if(GetFileAttributesW(pattern) == INVALID_FILE_ATTRIBUTES) + return 0; + } + + pattern[0] = 0; + *MSVCRT__errno() = MSVCRT_EEXIST; + return MSVCRT_EEXIST; +} + +/********************************************************************* * _wmktemp (MSVCRT.@) */ MSVCRT_wchar_t * CDECL MSVCRT__wmktemp(MSVCRT_wchar_t *pattern) @@ -1725,9 +1825,12 @@ int id; MSVCRT_wchar_t letter = 'a'; + if(!pattern) + return NULL; + while(*pattern) numX = (*pattern++ == 'X')? numX + 1 : 0; - if (numX < 5) + if (numX < 6) return NULL; pattern--; id = GetCurrentProcessId(); @@ -1741,8 +1844,7 @@ pattern++; do { - if (GetFileAttributesW(retVal) == INVALID_FILE_ATTRIBUTES && - GetLastError() == ERROR_FILE_NOT_FOUND) + if (GetFileAttributesW(retVal) == INVALID_FILE_ATTRIBUTES) return retVal; *pattern = letter++; } while(letter != '|'); @@ -2261,7 +2363,7 @@ buf[0] = '\n'; else { buf[0] = '\r'; - if(fdinfo->wxflag & WX_PIPE) + if(fdinfo->wxflag & (WX_PIPE | WX_NOSEEK)) fdinfo->lookahead[0] = lookahead; else SetFilePointer(fdinfo->handle, -1, NULL, FILE_CURRENT); @@ -2309,7 +2411,7 @@ if(char_len+i <= pos) i += char_len; - if(fdinfo->wxflag & WX_PIPE) { + if(fdinfo->wxflag & (WX_PIPE | WX_NOSEEK)) { if(i < pos) fdinfo->lookahead[0] = readbuf[i]; if(i+1 < pos) @@ -2337,7 +2439,7 @@ if(lookahead != '\n') readbuf[j++] = '\r'; - if(fdinfo->wxflag & WX_PIPE) + if(fdinfo->wxflag & (WX_PIPE | WX_NOSEEK)) fdinfo->lookahead[0] = lookahead; else SetFilePointer(fdinfo->handle, -1, NULL, FILE_CURRENT); @@ -2471,10 +2573,18 @@ if(utf16) bufstart[j++] = 0; } - if (fdinfo->wxflag & WX_PIPE) + if (fdinfo->wxflag & (WX_PIPE | WX_NOSEEK)) { - fdinfo->lookahead[0] = lookahead[0]; - fdinfo->lookahead[1] = lookahead[1]; + if (lookahead[0]=='\n' && (!utf16 || !lookahead[1])) + { + bufstart[j++] = '\n'; + if (utf16) bufstart[j++] = 0; + } + else + { + fdinfo->lookahead[0] = lookahead[0]; + fdinfo->lookahead[1] = lookahead[1]; + } } else SetFilePointer(fdinfo->handle, -1-utf16, NULL, FILE_CURRENT); @@ -2574,7 +2684,8 @@ while (plen && path[plen-1]==' ') plen--; - if (plen && (path[plen-1]=='\\' || path[plen-1]=='/')) + if (plen && (plen<2 || path[plen-2]!=':') && + (path[plen-1]==':' || path[plen-1]=='\\' || path[plen-1]=='/')) { *MSVCRT__errno() = MSVCRT_ENOENT; return -1; @@ -2674,7 +2785,8 @@ while (plen && path[plen-1]==' ') plen--; - if(plen && (path[plen-1]=='\\' || path[plen-1]=='/')) + if(plen && (plen<2 || path[plen-2]!=':') && + (path[plen-1]==':' || path[plen-1]=='\\' || path[plen-1]=='/')) { *MSVCRT__errno() = MSVCRT_ENOENT; return -1; diff -Nru wine1.6-1.7.1-actually1.6/dlls/msvcrt/locale.c wine1.6-1.6.1/dlls/msvcrt/locale.c --- wine1.6-1.7.1-actually1.6/dlls/msvcrt/locale.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msvcrt/locale.c 2013-11-15 19:30:24.000000000 +0000 @@ -407,20 +407,6 @@ /********************************************************************* - * wsetlocale (MSVCRT.@) - */ -MSVCRT_wchar_t* CDECL MSVCRT__wsetlocale(int category, const MSVCRT_wchar_t* locale) -{ - static MSVCRT_wchar_t fake[] = { - 'E','n','g','l','i','s','h','_','U','n','i','t','e','d',' ', - 'S','t','a','t','e','s','.','1','2','5','2',0 }; - - FIXME("%d %s\n", category, debugstr_w(locale)); - - return fake; -} - -/********************************************************************* * _Getdays (MSVCRT.@) */ char* CDECL _Getdays(void) @@ -1435,6 +1421,40 @@ return locinfo->lc_category[category].locale; } +/********************************************************************* + * _wsetlocale (MSVCRT.@) + */ +MSVCRT_wchar_t* CDECL MSVCRT__wsetlocale(int category, const MSVCRT_wchar_t* wlocale) +{ + static MSVCRT_wchar_t current_lc_all[MAX_LOCALE_LENGTH]; + + char *locale = NULL; + const char *ret; + MSVCRT_size_t len; + + if(wlocale) { + len = MSVCRT_wcstombs(NULL, wlocale, 0); + if(len == -1) + return NULL; + + locale = MSVCRT_malloc(++len); + if(!locale) + return NULL; + + MSVCRT_wcstombs(locale, wlocale, len); + } + + LOCK_LOCALE; + ret = MSVCRT_setlocale(category, locale); + MSVCRT_free(locale); + + if(ret && MSVCRT_mbstowcs(current_lc_all, ret, MAX_LOCALE_LENGTH)==-1) + ret = NULL; + + UNLOCK_LOCALE; + return ret ? current_lc_all : NULL; +} + /* _configthreadlocale - not exported in native msvcrt */ int CDECL _configthreadlocale(int type) { diff -Nru wine1.6-1.7.1-actually1.6/dlls/msvcrt/math.c wine1.6-1.6.1/dlls/msvcrt/math.c --- wine1.6-1.7.1-actually1.6/dlls/msvcrt/math.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msvcrt/math.c 2013-11-15 19:30:24.000000000 +0000 @@ -289,6 +289,14 @@ } /********************************************************************* + * fabsf (MSVCRT.@) + */ +float CDECL MSVCRT_fabsf( float x ) +{ + return fabsf(x); +} + +/********************************************************************* * floorf (MSVCRT.@) */ float CDECL MSVCRT_floorf( float x ) diff -Nru wine1.6-1.7.1-actually1.6/dlls/msvcrt/msvcrt.h wine1.6-1.6.1/dlls/msvcrt/msvcrt.h --- wine1.6-1.7.1-actually1.6/dlls/msvcrt/msvcrt.h 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msvcrt/msvcrt.h 2013-11-15 19:30:24.000000000 +0000 @@ -953,6 +953,7 @@ int __cdecl _ismbstrail(const unsigned char* start, const unsigned char* str); int __cdecl MSVCRT_mbtowc(MSVCRT_wchar_t*,const char*,MSVCRT_size_t); MSVCRT_size_t __cdecl MSVCRT_mbstowcs(MSVCRT_wchar_t*,const char*,MSVCRT_size_t); +MSVCRT_size_t __cdecl MSVCRT_wcstombs(char*,const MSVCRT_wchar_t*,MSVCRT_size_t); MSVCRT_intptr_t __cdecl MSVCRT__spawnve(int,const char*,const char* const *,const char* const *); MSVCRT_intptr_t __cdecl MSVRT__spawnvpe(int,const char*,const char* const *,const char* const *); MSVCRT_intptr_t __cdecl MSVCRT__wspawnve(int,const MSVCRT_wchar_t*,const MSVCRT_wchar_t* const *,const MSVCRT_wchar_t* const *); diff -Nru wine1.6-1.7.1-actually1.6/dlls/msvcrt/msvcrt.spec wine1.6-1.6.1/dlls/msvcrt/msvcrt.spec --- wine1.6-1.7.1-actually1.6/dlls/msvcrt/msvcrt.spec 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msvcrt/msvcrt.spec 2013-11-15 19:30:24.000000000 +0000 @@ -107,7 +107,8 @@ @ cdecl ?_set_new_mode@@YAHH@Z(long) MSVCRT__set_new_mode @ cdecl -arch=win32 ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z(ptr) MSVCRT__set_se_translator @ cdecl -arch=win64 ?_set_se_translator@@YAP6AXIPEAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z(ptr) MSVCRT__set_se_translator -@ thiscall -arch=win32 ?before@type_info@@QBEHABV1@@Z(ptr ptr) MSVCRT_type_info_before +@ cdecl -arch=arm ?before@type_info@@QBA_NABV1@@Z(ptr ptr) MSVCRT_type_info_before +@ thiscall -arch=i386 ?before@type_info@@QBEHABV1@@Z(ptr ptr) MSVCRT_type_info_before @ cdecl -arch=win64 ?before@type_info@@QEBAHAEBV1@@Z(ptr ptr) MSVCRT_type_info_before @ thiscall -arch=win32 ?name@type_info@@QBEPBDXZ(ptr) MSVCRT_type_info_name @ cdecl -arch=win64 ?name@type_info@@QEBAPEBDXZ(ptr) MSVCRT_type_info_name @@ -830,7 +831,7 @@ @ cdecl _mkgmtime32(ptr) MSVCRT__mkgmtime32 @ cdecl _mkgmtime64(ptr) MSVCRT__mkgmtime64 @ cdecl _mktemp(str) MSVCRT__mktemp -# stub _mktemp_s(str long) +@ cdecl _mktemp_s(str long) MSVCRT__mktemp_s @ cdecl _mktime32(ptr) MSVCRT__mktime32 @ cdecl _mktime64(ptr) MSVCRT__mktime64 @ cdecl _msize(ptr) @@ -921,7 +922,7 @@ @ varargs _snwprintf(ptr long wstr) MSVCRT__snwprintf @ varargs _snwprintf_l(ptr long wstr ptr) MSVCRT__snwprintf_l @ varargs _snwprintf_s(ptr long long wstr) MSVCRT__snwprintf_s -# stub _snwprintf_s_l(ptr long long wstr ptr) +@ varargs _snwprintf_s_l(ptr long long wstr ptr) MSVCRT__snwprintf_s_l @ varargs _snwscanf(wstr long wstr) MSVCRT__snwscanf @ varargs _snwscanf_l(wstr long wstr ptr) MSVCRT__snwscanf_l @ varargs _snwscanf_s(wstr long wstr) MSVCRT__snwscanf_s @@ -993,7 +994,7 @@ # stub _swprintf_c(ptr long str) # stub _swprintf_c_l(ptr long str ptr) @ varargs _swprintf_p_l(ptr long wstr ptr) MSVCRT_swprintf_p_l -# stub _swprintf_s_l(ptr long str ptr) +@ varargs _swprintf_s_l(ptr long wstr ptr) MSVCRT__swprintf_s_l @ varargs _swscanf_l(wstr wstr ptr) MSVCRT__swscanf_l @ varargs _swscanf_s_l(wstr wstr ptr) MSVCRT__swscanf_s_l @ extern _sys_errlist MSVCRT__sys_errlist @@ -1111,7 +1112,7 @@ # stub _wcslwr_s_l(wstr long ptr) @ cdecl _wcsncoll(wstr wstr long) MSVCRT__wcsncoll @ cdecl _wcsncoll_l(wstr wstr long ptr) MSVCRT__wcsncoll_l -@ cdecl _wcsnicmp(wstr wstr long) ntdll._wcsnicmp +@ cdecl _wcsnicmp(wstr wstr long) MSVCRT__wcsnicmp # stub _wcsnicmp_l(wstr wstr long ptr) @ cdecl _wcsnicoll(wstr wstr long) MSVCRT__wcsnicoll @ cdecl _wcsnicoll_l(wstr wstr long ptr) MSVCRT__wcsnicoll_l @@ -1123,7 +1124,7 @@ @ cdecl _wcstod_l(wstr ptr) MSVCRT__wcstod_l @ cdecl -ret64 _wcstoi64(wstr ptr long) MSVCRT__wcstoi64 @ cdecl -ret64 _wcstoi64_l(wstr ptr long ptr) MSVCRT__wcstoi64_l -# stub _wcstol_l(wstr ptr long ptr) +@ cdecl _wcstol_l(wstr ptr long ptr) MSVCRT__wcstol_l @ cdecl _wcstombs_l(ptr ptr long ptr) MSVCRT__wcstombs_l @ cdecl _wcstombs_s_l(ptr ptr long wstr long ptr) MSVCRT__wcstombs_s_l @ cdecl -ret64 _wcstoui64(wstr ptr long) MSVCRT__wcstoui64 @@ -1139,8 +1140,8 @@ # stub _wctime32_s(ptr long ptr) @ cdecl _wctime64(ptr) MSVCRT__wctime64 # stub _wctime64_s(ptr long ptr) -# stub _wctomb_l(ptr long ptr) -# stub _wctomb_s_l(ptr ptr long long ptr) +@ cdecl _wctomb_l(ptr long ptr) MSVCRT__wctomb_l +@ cdecl _wctomb_s_l(ptr ptr long long ptr) MSVCRT__wctomb_s_l # extern _wctype @ extern _wenviron MSVCRT__wenviron @ varargs _wexecl(wstr wstr) @@ -1180,7 +1181,7 @@ @ cdecl _wmakepath_s(ptr long wstr wstr wstr wstr) @ cdecl _wmkdir(wstr) MSVCRT__wmkdir @ cdecl _wmktemp(wstr) MSVCRT__wmktemp -# stub _wmktemp_s(wstr long) +@ cdecl _wmktemp_s(wstr long) MSVCRT__wmktemp_s @ varargs _wopen(wstr long) MSVCRT__wopen # stub _woutput_s @ stub _wperror(wstr) @@ -1276,6 +1277,7 @@ @ cdecl exp(double) MSVCRT_exp @ cdecl -arch=arm,x86_64 expf(float) MSVCRT_expf @ cdecl fabs(double) MSVCRT_fabs +@ cdecl -arch=arm,x86_64 fabsf(float) MSVCRT_fabsf @ cdecl fclose(ptr) MSVCRT_fclose @ cdecl feof(ptr) MSVCRT_feof @ cdecl ferror(ptr) MSVCRT_ferror @@ -1510,7 +1512,7 @@ @ stub wcsxfrm(ptr wstr long) @ cdecl wctob(long) MSVCRT_wctob @ cdecl wctomb(ptr long) MSVCRT_wctomb -# stub wctomb_s(ptr ptr long long) +@ cdecl wctomb_s(ptr ptr long long) MSVCRT_wctomb_s @ varargs wprintf(wstr) MSVCRT_wprintf @ varargs wprintf_s(wstr) MSVCRT_wprintf_s @ varargs wscanf(wstr) MSVCRT_wscanf diff -Nru wine1.6-1.7.1-actually1.6/dlls/msvcrt/string.c wine1.6-1.6.1/dlls/msvcrt/string.c --- wine1.6-1.7.1-actually1.6/dlls/msvcrt/string.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msvcrt/string.c 2013-11-15 19:30:24.000000000 +0000 @@ -581,6 +581,8 @@ for(i=0; icurrent != '@') return NULL; ptr = und_alloc(sym, 17); - sprintf(ptr, "%s%d", sgn ? "-" : "", ret); + sprintf(ptr, "%s%u", sgn ? "-" : "", ret); sym->current++; } else return NULL; @@ -1103,13 +1103,24 @@ * 'X' public: thunk * 'Y' * 'Z' + * "$0" private: thunk vtordisp + * "$1" private: thunk vtordisp + * "$2" protected: thunk vtordisp + * "$3" protected: thunk vtordisp + * "$4" public: thunk vtordisp + * "$5" public: thunk vtordisp */ accmem = *sym->current++; - if (accmem < 'A' || accmem > 'Z') goto done; + if (accmem == '$') + { + accmem = *sym->current++; + if (accmem < '0' || accmem > '5') goto done; + } + else if (accmem < 'A' || accmem > 'Z') goto done; if (!(sym->flags & UNDNAME_NO_ACCESS_SPECIFIERS)) { - switch ((accmem - 'A') / 8) + switch (accmem >= '0' && accmem <= '5' ? (accmem - '0') / 2 : (accmem - 'A') / 8) { case 0: access = "private: "; break; case 1: access = "protected: "; break; @@ -1118,7 +1129,12 @@ } if (!(sym->flags & UNDNAME_NO_MEMBER_TYPE)) { - if (accmem <= 'X') + if (accmem >= '0' && accmem <= '5') + { + access = str_printf(sym, "[thunk]:%s", access); + member_type = "virtual "; + } + else if (accmem <= 'X') { switch ((accmem - 'A') % 8) { @@ -1134,7 +1150,15 @@ name = get_class_string(sym, 0); - if ((accmem - 'A') % 8 == 6 || (accmem - '8') % 8 == 7) /* a thunk */ + if (accmem >= '0' && accmem <='5') /* vtordisp thunk */ + { + const char *n1 = get_number(sym); + const char *n2 = get_number(sym); + + if (!n1 || !n2) goto done; + name = str_printf(sym, "%s`vtordisp{%s,%s}' ", name, n1, n2); + } + else if ((accmem - 'A') % 8 == 6 || (accmem - 'A') % 8 == 7) /* a thunk */ name = str_printf(sym, "%s`adjustor{%s}' ", name, get_number(sym)); if (accmem <= 'X') @@ -1194,7 +1218,7 @@ } /****************************************************************** - * handle_template + * handle_template * Does the final parsing and handling for a name with templates */ static BOOL handle_template(struct parsed_symbol* sym) @@ -1443,10 +1467,10 @@ /* Function/Data type and access level */ if (*sym->current >= '0' && *sym->current <= '9') ret = handle_data(sym); - else if (*sym->current >= 'A' && *sym->current <= 'Z') - ret = handle_method(sym, do_after == 3); - else if (*sym->current == '$') + else if (sym->current[0] == '$' && (sym->current[1] < '0' || sym->current[1] > '9')) ret = handle_template(sym); + else if ((*sym->current >= 'A' && *sym->current <= 'Z') || *sym->current == '$') + ret = handle_method(sym, do_after == 3); else ret = FALSE; done: if (ret) assert(sym->result); diff -Nru wine1.6-1.7.1-actually1.6/dlls/msvcrt/wcs.c wine1.6-1.6.1/dlls/msvcrt/wcs.c --- wine1.6-1.7.1-actually1.6/dlls/msvcrt/wcs.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msvcrt/wcs.c 2013-11-15 19:30:24.000000000 +0000 @@ -86,6 +86,14 @@ } /********************************************************************* + * _wcsnicmp (MSVCRT.@) + */ +INT CDECL MSVCRT__wcsnicmp(const MSVCRT_wchar_t *str1, const MSVCRT_wchar_t *str2, INT n) +{ + return strncmpiW(str1, str2, n); +} + +/********************************************************************* * _wcsicoll_l (MSVCRT.@) */ int CDECL MSVCRT__wcsicoll_l(const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2, MSVCRT__locale_t locale) @@ -399,8 +407,10 @@ if(!mbstr) { tmp = WideCharToMultiByte(locinfo->lc_codepage, WC_NO_BEST_FIT_CHARS, *wcstr, -1, NULL, 0, NULL, &used_default)-1; - if(used_default) + if(!tmp || used_default) { + *MSVCRT__errno() = MSVCRT_EILSEQ; return -1; + } return tmp; } @@ -410,8 +420,10 @@ size = WideCharToMultiByte(locinfo->lc_codepage, WC_NO_BEST_FIT_CHARS, *wcstr, 1, buf, 3, NULL, &used_default); - if(used_default) + if(!size || used_default) { + *MSVCRT__errno() = MSVCRT_EILSEQ; return -1; + } if(tmp+size > count) return tmp; @@ -468,6 +480,8 @@ if(!mbstr && !size && wcstr) { conv = MSVCRT_wcsrtombs_l(NULL, wcstr, 0, locale); + if(conv == -1) + return *MSVCRT__errno(); if(ret) *ret = conv+1; return 0; @@ -484,7 +498,11 @@ conv = count; conv = MSVCRT_wcsrtombs_l(mbstr, wcstr, conv, locale); - if(conv0) { + if(len) + *len = 0; + return 0; + } + + if(len) + *len = -1; + + if(!MSVCRT_CHECK_PMT(size <= INT_MAX)) + return MSVCRT_EINVAL; + + if(!locale) + locinfo = get_locinfo(); + else + locinfo = locale->locinfo; + + if(!locinfo->lc_codepage) { + if(wch > 0xff) { + if(mbchar && size>0) + memset(mbchar, 0, size); + *MSVCRT__errno() = MSVCRT_EILSEQ; + return MSVCRT_EILSEQ; + } + + if(!MSVCRT_CHECK_PMT_ERR(size >= 1, MSVCRT_ERANGE)) + return MSVCRT_ERANGE; + + *mbchar = wch; + if(len) + *len = 1; + return 0; + } + + mblen = WideCharToMultiByte(locinfo->lc_codepage, 0, &wch, 1, mbchar, size, NULL, &error); + if(!mblen || error) { + if(!mblen && GetLastError()==ERROR_INSUFFICIENT_BUFFER) { + if(mbchar && size>0) + memset(mbchar, 0, size); + + MSVCRT_INVALID_PMT("insufficient buffer size", MSVCRT_ERANGE); + return MSVCRT_ERANGE; + } + + *MSVCRT__errno() = MSVCRT_EILSEQ; + return MSVCRT_EILSEQ; + } + + if(len) + *len = mblen; + return 0; +} + +/********************************************************************* + * wctomb_s (MSVCRT.@) + */ +int CDECL MSVCRT_wctomb_s(int *len, char *mbchar, MSVCRT_size_t size, MSVCRT_wchar_t wch) +{ + return MSVCRT__wctomb_s_l(len, mbchar, size, wch, NULL); +} + +/********************************************************************* + * _wctomb_l (MSVCRT.@) + */ +int CDECL MSVCRT__wctomb_l(char *dst, MSVCRT_wchar_t ch, MSVCRT__locale_t locale) +{ + int len; + + MSVCRT__wctomb_s_l(&len, dst, dst ? 6 : 0, ch, locale); + return len; +} + +/********************************************************************* + * wctomb (MSVCRT.@) + */ +INT CDECL MSVCRT_wctomb( char *dst, MSVCRT_wchar_t ch ) +{ + return MSVCRT__wctomb_l(dst, ch, NULL); +} + +/********************************************************************* * wctob (MSVCRT.@) */ INT CDECL MSVCRT_wctob( MSVCRT_wint_t wchar ) @@ -1165,22 +1303,6 @@ } /********************************************************************* - * wctomb (MSVCRT.@) - */ -INT CDECL MSVCRT_wctomb( char *dst, MSVCRT_wchar_t ch ) -{ - BOOL error; - INT size; - - size = WideCharToMultiByte(get_locinfo()->lc_codepage, 0, &ch, 1, dst, dst ? 6 : 0, NULL, &error); - if(!size || error) { - *MSVCRT__errno() = MSVCRT_EINVAL; - return MSVCRT_EOF; - } - return size; -} - -/********************************************************************* * wcrtomb (MSVCRT.@) */ MSVCRT_size_t CDECL MSVCRT_wcrtomb( char *dst, MSVCRT_wchar_t ch, MSVCRT_mbstate_t *s) @@ -1539,6 +1661,24 @@ } /********************************************************************* + * _wcstol_l (MSVCRT.@) + */ +MSVCRT_long CDECL MSVCRT__wcstol_l(const MSVCRT_wchar_t *s, + MSVCRT_wchar_t **end, int base, MSVCRT__locale_t locale) +{ + __int64 ret = MSVCRT__wcstoi64_l(s, end, base, locale); + + if(ret > MSVCRT_LONG_MAX) { + ret = MSVCRT_LONG_MAX; + *MSVCRT__errno() = MSVCRT_ERANGE; + }else if(ret < MSVCRT_LONG_MIN) { + ret = MSVCRT_LONG_MIN; + *MSVCRT__errno() = MSVCRT_ERANGE; + } + return ret; +} + +/********************************************************************* * _wtoi_l (MSVCRT.@) */ int __cdecl MSVCRT__wtoi_l(const MSVCRT_wchar_t *str, MSVCRT__locale_t locale) diff -Nru wine1.6-1.7.1-actually1.6/dlls/msvcrt40/msvcrt40.spec wine1.6-1.6.1/dlls/msvcrt40/msvcrt40.spec --- wine1.6-1.7.1-actually1.6/dlls/msvcrt40/msvcrt40.spec 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msvcrt40/msvcrt40.spec 2013-11-15 19:30:24.000000000 +0000 @@ -466,7 +466,7 @@ @ stub -arch=win32 ?base@streambuf@@IBEPADXZ @ stub -arch=win64 ?base@streambuf@@IEBAPEADXZ # @ extern ?basefield@ios@@2JB -@ thiscall -arch=win32 ?before@type_info@@QBEHABV1@@Z(ptr ptr) msvcrt.?before@type_info@@QBEHABV1@@Z +@ thiscall -arch=i386 ?before@type_info@@QBEHABV1@@Z(ptr ptr) msvcrt.?before@type_info@@QBEHABV1@@Z @ cdecl -arch=win64 ?before@type_info@@QEBAHAEBV1@@Z(ptr ptr) msvcrt.?before@type_info@@QEBAHAEBV1@@Z # @ extern ?binary@filebuf@@2HB @ stub ?bitalloc@ios@@SAJXZ diff -Nru wine1.6-1.7.1-actually1.6/dlls/msvcrtd/msvcrtd.spec wine1.6-1.6.1/dlls/msvcrtd/msvcrtd.spec --- wine1.6-1.7.1-actually1.6/dlls/msvcrtd/msvcrtd.spec 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msvcrtd/msvcrtd.spec 2013-11-15 19:30:24.000000000 +0000 @@ -67,7 +67,7 @@ @ cdecl ?_set_new_mode@@YAHH@Z(long) msvcrt.?_set_new_mode@@YAHH@Z @ cdecl -arch=win32 ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z(ptr) msvcrt.?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z @ cdecl -arch=win64 ?_set_se_translator@@YAP6AXIPEAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z(ptr) msvcrt.?_set_se_translator@@YAP6AXIPEAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z -@ thiscall -arch=win32 ?before@type_info@@QBEHABV1@@Z(ptr ptr) msvcrt.?before@type_info@@QBEHABV1@@Z +@ thiscall -arch=i386 ?before@type_info@@QBEHABV1@@Z(ptr ptr) msvcrt.?before@type_info@@QBEHABV1@@Z @ cdecl -arch=win64 ?before@type_info@@QEBAHAEBV1@@Z(ptr ptr) msvcrt.?before@type_info@@QEBAHAEBV1@@Z @ thiscall -arch=win32 ?name@type_info@@QBEPBDXZ(ptr) msvcrt.?name@type_info@@QBEPBDXZ @ cdecl -arch=win64 ?name@type_info@@QEBAPEBDXZ(ptr) msvcrt.?name@type_info@@QEBAPEBDXZ diff -Nru wine1.6-1.7.1-actually1.6/dlls/msxml3/main.c wine1.6-1.6.1/dlls/msxml3/main.c --- wine1.6-1.7.1-actually1.6/dlls/msxml3/main.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msxml3/main.c 2013-11-15 19:30:24.000000000 +0000 @@ -161,15 +161,6 @@ return CloseHandle(context) ? 0 : -1; } -#endif - - -HRESULT WINAPI DllCanUnloadNow(void) -{ - return S_FALSE; -} - - void* libxslt_handle = NULL; #ifdef SONAME_LIBXSLT # define DECL_FUNCPTR(f) typeof(f) * p##f = NULL @@ -209,6 +200,15 @@ #endif } +#endif /* HAVE_LIBXML2 */ + + +HRESULT WINAPI DllCanUnloadNow(void) +{ + return S_FALSE; +} + + BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID reserved) { MSXML_hInstance = hInstDLL; @@ -230,12 +230,13 @@ WARN("Failed to register callbacks\n"); schemasInit(); -#endif init_libxslt(); +#endif DisableThreadLibraryCalls(hInstDLL); break; case DLL_PROCESS_DETACH: if (reserved) break; +#ifdef HAVE_LIBXML2 #ifdef SONAME_LIBXSLT if (libxslt_handle) { @@ -243,7 +244,6 @@ wine_dlclose(libxslt_handle, NULL, 0); } #endif -#ifdef HAVE_LIBXML2 /* Restore default Callbacks */ xmlCleanupInputCallbacks(); xmlRegisterDefaultInputCallbacks(); diff -Nru wine1.6-1.7.1-actually1.6/dlls/msxml3/node.c wine1.6-1.6.1/dlls/msxml3/node.c --- wine1.6-1.7.1-actually1.6/dlls/msxml3/node.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msxml3/node.c 2013-11-15 19:30:24.000000000 +0000 @@ -896,6 +896,50 @@ return *ret ? S_OK : E_OUTOFMEMORY; } +/* duplicates xmlBufferWriteQuotedString() logic */ +static void xml_write_quotedstring(xmlOutputBufferPtr buf, const xmlChar *string) +{ + const xmlChar *cur, *base; + + if (xmlStrchr(string, '\"')) + { + if (xmlStrchr(string, '\'')) + { + xmlOutputBufferWrite(buf, 1, "\""); + base = cur = string; + + while (*cur) + { + if (*cur == '"') + { + if (base != cur) + xmlOutputBufferWrite(buf, cur-base, (const char*)base); + xmlOutputBufferWrite(buf, 6, """); + cur++; + base = cur; + } + else + cur++; + } + if (base != cur) + xmlOutputBufferWrite(buf, cur-base, (const char*)base); + xmlOutputBufferWrite(buf, 1, "\""); + } + else + { + xmlOutputBufferWrite(buf, 1, "\'"); + xmlOutputBufferWriteString(buf, (const char*)string); + xmlOutputBufferWrite(buf, 1, "\'"); + } + } + else + { + xmlOutputBufferWrite(buf, 1, "\""); + xmlOutputBufferWriteString(buf, (const char*)string); + xmlOutputBufferWrite(buf, 1, "\""); + } +} + static void htmldtd_dumpcontent(xmlOutputBufferPtr buf, xmlDocPtr doc) { xmlDtdPtr cur = doc->intSubset; @@ -905,17 +949,17 @@ if (cur->ExternalID) { xmlOutputBufferWriteString(buf, " PUBLIC "); - xmlBufferWriteQuotedString(buf->buffer, cur->ExternalID); + xml_write_quotedstring(buf, cur->ExternalID); if (cur->SystemID) { xmlOutputBufferWriteString(buf, " "); - xmlBufferWriteQuotedString(buf->buffer, cur->SystemID); + xml_write_quotedstring(buf, cur->SystemID); } } else if (cur->SystemID) { xmlOutputBufferWriteString(buf, " SYSTEM "); - xmlBufferWriteQuotedString(buf->buffer, cur->SystemID); + xml_write_quotedstring(buf, cur->SystemID); } xmlOutputBufferWriteString(buf, ">\n"); } @@ -943,6 +987,15 @@ doc->type = type; } +static const xmlChar *get_output_buffer_content(xmlOutputBufferPtr output) +{ +#ifdef LIBXML2_NEW_BUFFER + return xmlOutputBufferGetContent(output); +#else + return xmlBufferContent(output->buffer); +#endif +} + HRESULT node_transform_node(const xmlnode *This, IXMLDOMNode *stylesheet, BSTR *p) { #ifdef SONAME_LIBXSLT @@ -971,7 +1024,7 @@ if (output) { htmldoc_dumpcontent(output, result->doc); - content = xmlBufferContent(output->buffer); + content = get_output_buffer_content(output); *p = bstr_from_xmlChar(content); xmlOutputBufferClose(output); } diff -Nru wine1.6-1.7.1-actually1.6/dlls/msxml3/saxreader.c wine1.6-1.6.1/dlls/msxml3/saxreader.c --- wine1.6-1.7.1-actually1.6/dlls/msxml3/saxreader.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/msxml3/saxreader.c 2013-11-15 19:30:24.000000000 +0000 @@ -1265,6 +1265,49 @@ isaxattributes_getValueFromQName }; +/* Libxml2 escapes '&' back to char reference '&' in attribute value, + so when document has escaped value with '&' it's parsed to '&' and then + escaped to '&'. This function takes care of ampersands only. */ +static BSTR saxreader_get_unescaped_value(const xmlChar *buf, int len) +{ + static const WCHAR ampescW[] = {'&','#','3','8',';',0}; + WCHAR *dest, *ptrW, *str; + DWORD str_len; + BSTR bstr; + + if (!buf) + return NULL; + + str_len = MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)buf, len, NULL, 0); + if (len != -1) str_len++; + + str = heap_alloc(str_len*sizeof(WCHAR)); + if (!str) return NULL; + + MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)buf, len, str, str_len); + if (len != -1) str[str_len-1] = 0; + + ptrW = str; + while ((dest = strstrW(ptrW, ampescW))) + { + WCHAR *src; + + /* leave first '&' from a reference as a value */ + src = dest + (sizeof(ampescW)/sizeof(WCHAR) - 1); + dest++; + + /* move together with null terminator */ + memmove(dest, src, (strlenW(src) + 1)*sizeof(WCHAR)); + + ptrW++; + } + + bstr = SysAllocString(str); + heap_free(str); + + return bstr; +} + static HRESULT SAXAttributes_populate(saxlocator *locator, int nb_namespaces, const xmlChar **xmlNamespaces, int nb_attributes, const xmlChar **xmlAttributes) @@ -1317,8 +1360,7 @@ attrs[i].szURI = find_element_uri(locator, xmlAttributes[i*5+2]); attrs[i].szLocalname = bstr_from_xmlChar(xmlAttributes[i*5]); - attrs[i].szValue = bstr_from_xmlCharN(xmlAttributes[i*5+3], - xmlAttributes[i*5+4]-xmlAttributes[i*5+3]); + attrs[i].szValue = saxreader_get_unescaped_value(xmlAttributes[i*5+3], xmlAttributes[i*5+4]-xmlAttributes[i*5+3]); attrs[i].szQName = QName_from_xmlChar(xmlAttributes[i*5+1], xmlAttributes[i*5]); } diff -Nru wine1.6-1.7.1-actually1.6/dlls/ntdll/critsection.c wine1.6-1.6.1/dlls/ntdll/critsection.c --- wine1.6-1.7.1-actually1.6/dlls/ntdll/critsection.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/ntdll/critsection.c 2013-11-15 19:30:24.000000000 +0000 @@ -230,9 +230,12 @@ { HANDLE sem = get_semaphore( crit ); LARGE_INTEGER time; + select_op_t select_op; time.QuadPart = timeout * (LONGLONG)-10000000; - ret = NTDLL_wait_for_multiple_objects( 1, &sem, 0, &time, 0 ); + select_op.wait.op = SELECT_WAIT; + select_op.wait.handles[0] = wine_server_obj_handle( sem ); + ret = server_select( &select_op, offsetof( select_op_t, wait.handles[1] ), 0, &time ); } return ret; } diff -Nru wine1.6-1.7.1-actually1.6/dlls/ntdll/directory.c wine1.6-1.6.1/dlls/ntdll/directory.c --- wine1.6-1.7.1-actually1.6/dlls/ntdll/directory.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/ntdll/directory.c 2013-11-15 19:30:24.000000000 +0000 @@ -780,8 +780,8 @@ if (stat( entry[i].f_mntfromname, &st ) == -1) continue; if (S_ISBLK(st.st_mode) && st.st_rdev == dev) { - ret = RtlAllocateHeap( GetProcessHeap(), 0, strlen(entry[i].f_mntfromname) + 1 ); - if (ret) strcpy( ret, entry[i].f_mntfromname ); + ret = RtlAllocateHeap( GetProcessHeap(), 0, strlen(entry[i].f_mntonname) + 1 ); + if (ret) strcpy( ret, entry[i].f_mntonname ); break; } } diff -Nru wine1.6-1.7.1-actually1.6/dlls/ntdll/exception.c wine1.6-1.6.1/dlls/ntdll/exception.c --- wine1.6-1.7.1-actually1.6/dlls/ntdll/exception.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/ntdll/exception.c 2013-11-15 19:30:24.000000000 +0000 @@ -81,7 +81,7 @@ /* wait with 0 timeout, will only return once the thread is no longer suspended */ timeout.QuadPart = 0; - NTDLL_wait_for_multiple_objects( 0, NULL, SELECT_INTERRUPTIBLE, &timeout, 0 ); + server_select( NULL, 0, SELECT_INTERRUPTIBLE, &timeout ); /* retrieve the new context */ SERVER_START_REQ( get_suspend_context ) @@ -105,9 +105,10 @@ { NTSTATUS ret; DWORD i; - HANDLE handle = 0; + obj_handle_t handle = 0; client_ptr_t params[EXCEPTION_MAXIMUM_PARAMETERS]; context_t server_context; + select_op_t select_op; if (!NtCurrentTeb()->Peb->BeingDebugged) return 0; /* no debugger present */ @@ -126,16 +127,18 @@ req->len = i * sizeof(params[0]); wine_server_add_data( req, params, req->len ); wine_server_add_data( req, &server_context, sizeof(server_context) ); - if (!wine_server_call( req )) handle = wine_server_ptr_handle( reply->handle ); + if (!wine_server_call( req )) handle = reply->handle; } SERVER_END_REQ; if (!handle) return 0; - NTDLL_wait_for_multiple_objects( 1, &handle, SELECT_INTERRUPTIBLE, NULL, 0 ); + select_op.wait.op = SELECT_WAIT; + select_op.wait.handles[0] = handle; + server_select( &select_op, offsetof( select_op_t, wait.handles[1] ), SELECT_INTERRUPTIBLE, NULL ); SERVER_START_REQ( get_exception_status ) { - req->handle = wine_server_obj_handle( handle ); + req->handle = handle; wine_server_set_reply( req, &server_context, sizeof(server_context) ); ret = wine_server_call( req ); } diff -Nru wine1.6-1.7.1-actually1.6/dlls/ntdll/file.c wine1.6-1.6.1/dlls/ntdll/file.c --- wine1.6-1.7.1-actually1.6/dlls/ntdll/file.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/ntdll/file.c 2013-11-15 19:30:24.000000000 +0000 @@ -66,6 +66,9 @@ #ifdef HAVE_SYS_STATFS_H # include #endif +#ifdef HAVE_TERMIOS_H +#include +#endif #ifdef HAVE_VALGRIND_MEMCHECK_H # include #endif @@ -2749,19 +2752,32 @@ { NTSTATUS ret; HANDLE hEvent = NULL; + enum server_fd_type type; + int fd, needs_close; + + ret = server_get_unix_fd( hFile, FILE_WRITE_DATA, &fd, &needs_close, &type, NULL ); - SERVER_START_REQ( flush_file ) + if (!ret && type == FD_TYPE_SERIAL) { - req->handle = wine_server_obj_handle( hFile ); - ret = wine_server_call( req ); - hEvent = wine_server_ptr_handle( reply->event ); + ret = COMM_FlushBuffersFile( fd ); } - SERVER_END_REQ; - if (!ret && hEvent) + else { - ret = NtWaitForSingleObject( hEvent, FALSE, NULL ); - NtClose( hEvent ); + SERVER_START_REQ( flush_file ) + { + req->handle = wine_server_obj_handle( hFile ); + ret = wine_server_call( req ); + hEvent = wine_server_ptr_handle( reply->event ); + } + SERVER_END_REQ; + if (!ret && hEvent) + { + ret = NtWaitForSingleObject( hEvent, FALSE, NULL ); + NtClose( hEvent ); + } } + + if (needs_close) close( fd ); return ret; } diff -Nru wine1.6-1.7.1-actually1.6/dlls/ntdll/ntdll.spec wine1.6-1.6.1/dlls/ntdll/ntdll.spec --- wine1.6-1.7.1-actually1.6/dlls/ntdll/ntdll.spec 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/ntdll/ntdll.spec 2013-11-15 19:30:24.000000000 +0000 @@ -129,7 +129,7 @@ @ stdcall NtCreateJobObject(ptr long ptr) # @ stub NtCreateJobSet @ stdcall NtCreateKey(ptr long ptr long ptr long long) -# @ stub NtCreateKeyedEvent +@ stdcall NtCreateKeyedEvent(ptr long ptr long) @ stdcall NtCreateMailslotFile(long long long long long long long long) @ stdcall NtCreateMutant(ptr long ptr long) @ stdcall NtCreateNamedPipeFile(ptr long ptr ptr long long long long long long long long long ptr) @@ -212,7 +212,7 @@ @ stdcall NtOpenIoCompletion(ptr long ptr) @ stdcall NtOpenJobObject(ptr long ptr) @ stdcall NtOpenKey(ptr long ptr) -# @ stub NtOpenKeyedEvent +@ stdcall NtOpenKeyedEvent(ptr long ptr) @ stdcall NtOpenMutant(ptr long ptr) @ stub NtOpenObjectAuditAlarm @ stdcall NtOpenProcess(ptr long ptr ptr) @@ -283,7 +283,7 @@ @ stdcall NtReadVirtualMemory(long ptr ptr long ptr) @ stub NtRegisterNewDevice @ stdcall NtRegisterThreadTerminatePort(ptr) -# @ stub NtReleaseKeyedEvent +@ stdcall NtReleaseKeyedEvent(long ptr long ptr) @ stdcall NtReleaseMutant(long ptr) @ stub NtReleaseProcessMutant @ stdcall NtReleaseSemaphore(long long ptr) @@ -370,7 +370,7 @@ @ stub NtVdmControl @ stub NtW32Call # @ stub NtWaitForDebugEvent -# @ stub NtWaitForKeyedEvent +@ stdcall NtWaitForKeyedEvent(long ptr long ptr) @ stdcall NtWaitForMultipleObjects(long ptr long long ptr) @ stub NtWaitForProcessMutant @ stdcall NtWaitForSingleObject(long long long) @@ -815,6 +815,9 @@ @ stub RtlRevertMemoryStream @ stub RtlRunDecodeUnicodeString @ stub RtlRunEncodeUnicodeString +@ stdcall RtlRunOnceBeginInitialize(ptr long ptr) +@ stdcall RtlRunOnceComplete(ptr long ptr) +@ stdcall RtlRunOnceExecuteOnce(ptr ptr ptr ptr) @ stdcall RtlRunOnceInitialize(ptr) @ stdcall RtlSecondsSince1970ToTime(long ptr) @ stdcall RtlSecondsSince1980ToTime(long ptr) @@ -938,7 +941,7 @@ @ stdcall RtlpNtEnumerateSubKey(ptr ptr long) @ stdcall RtlpNtMakeTemporaryKey(ptr) @ stdcall RtlpNtOpenKey(ptr long ptr) -@ stdcall RtlpNtQueryValueKey(long ptr ptr ptr) +@ stdcall RtlpNtQueryValueKey(long ptr ptr ptr ptr) @ stdcall RtlpNtSetValueKey(ptr long ptr long) @ stdcall RtlpUnWaitCriticalSection(ptr) @ stdcall RtlpWaitForCriticalSection(ptr) @@ -990,7 +993,7 @@ @ stdcall ZwCreateJobObject(ptr long ptr) NtCreateJobObject # @ stub ZwCreateJobSet @ stdcall ZwCreateKey(ptr long ptr long ptr long long) NtCreateKey -# @ stub ZwCreateKeyedEvent +@ stdcall ZwCreateKeyedEvent(ptr long ptr long) NtCreateKeyedEvent @ stdcall ZwCreateMailslotFile(long long long long long long long long) NtCreateMailslotFile @ stdcall ZwCreateMutant(ptr long ptr long) NtCreateMutant @ stdcall ZwCreateNamedPipeFile(ptr long ptr ptr long long long long long long long long long ptr) NtCreateNamedPipeFile @@ -1071,7 +1074,7 @@ @ stdcall ZwOpenIoCompletion(ptr long ptr) NtOpenIoCompletion @ stdcall ZwOpenJobObject(ptr long ptr) NtOpenJobObject @ stdcall ZwOpenKey(ptr long ptr) NtOpenKey -# @ stub ZwOpenKeyedEvent +@ stdcall ZwOpenKeyedEvent(ptr long ptr) NtOpenKeyedEvent @ stdcall ZwOpenMutant(ptr long ptr) NtOpenMutant @ stub ZwOpenObjectAuditAlarm @ stdcall ZwOpenProcess(ptr long ptr ptr) NtOpenProcess @@ -1142,7 +1145,7 @@ @ stdcall ZwReadVirtualMemory(long ptr ptr long ptr) NtReadVirtualMemory @ stub ZwRegisterNewDevice @ stdcall ZwRegisterThreadTerminatePort(ptr) NtRegisterThreadTerminatePort -# @ stub ZwReleaseKeyedEvent +@ stdcall ZwReleaseKeyedEvent(long ptr long ptr) NtReleaseKeyedEvent @ stdcall ZwReleaseMutant(long ptr) NtReleaseMutant @ stub ZwReleaseProcessMutant @ stdcall ZwReleaseSemaphore(long long ptr) NtReleaseSemaphore @@ -1229,7 +1232,7 @@ @ stub ZwVdmControl @ stub ZwW32Call # @ stub ZwWaitForDebugEvent -# @ stub ZwWaitForKeyedEvent +@ stdcall ZwWaitForKeyedEvent(long ptr long ptr) NtWaitForKeyedEvent @ stdcall ZwWaitForMultipleObjects(long ptr long long ptr) NtWaitForMultipleObjects @ stub ZwWaitForProcessMutant @ stdcall ZwWaitForSingleObject(long long long) NtWaitForSingleObject diff -Nru wine1.6-1.7.1-actually1.6/dlls/ntdll/ntdll_misc.h wine1.6-1.6.1/dlls/ntdll/ntdll_misc.h --- wine1.6-1.7.1-actually1.6/dlls/ntdll/ntdll_misc.h 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/ntdll/ntdll_misc.h 2013-11-15 19:30:24.000000000 +0000 @@ -62,10 +62,6 @@ extern LPCSTR debugstr_us( const UNICODE_STRING *str ) DECLSPEC_HIDDEN; extern LPCSTR debugstr_ObjectAttributes(const OBJECT_ATTRIBUTES *oa) DECLSPEC_HIDDEN; -extern NTSTATUS NTDLL_queue_process_apc( HANDLE process, const apc_call_t *call, apc_result_t *result ) DECLSPEC_HIDDEN; -extern NTSTATUS NTDLL_wait_for_multiple_objects( UINT count, const HANDLE *handles, UINT flags, - const LARGE_INTEGER *timeout, HANDLE signal_object ) DECLSPEC_HIDDEN; - /* init routines */ extern NTSTATUS signal_alloc_thread( TEB **teb ) DECLSPEC_HIDDEN; extern void signal_free_thread( TEB *teb ) DECLSPEC_HIDDEN; @@ -87,14 +83,15 @@ extern void server_init_process(void) DECLSPEC_HIDDEN; extern NTSTATUS server_init_process_done(void) DECLSPEC_HIDDEN; extern size_t server_init_thread( void *entry_point ) DECLSPEC_HIDDEN; -extern void DECLSPEC_NORETURN server_protocol_error( const char *err, ... ) DECLSPEC_HIDDEN; -extern void DECLSPEC_NORETURN server_protocol_perror( const char *err ) DECLSPEC_HIDDEN; extern void DECLSPEC_NORETURN abort_thread( int status ) DECLSPEC_HIDDEN; extern void DECLSPEC_NORETURN terminate_thread( int status ) DECLSPEC_HIDDEN; extern void DECLSPEC_NORETURN exit_thread( int status ) DECLSPEC_HIDDEN; extern sigset_t server_block_set DECLSPEC_HIDDEN; extern void server_enter_uninterrupted_section( RTL_CRITICAL_SECTION *cs, sigset_t *sigset ) DECLSPEC_HIDDEN; extern void server_leave_uninterrupted_section( RTL_CRITICAL_SECTION *cs, sigset_t *sigset ) DECLSPEC_HIDDEN; +extern unsigned int server_select( const select_op_t *select_op, data_size_t size, + UINT flags, const LARGE_INTEGER *timeout ) DECLSPEC_HIDDEN; +extern unsigned int server_queue_process_apc( HANDLE process, const apc_call_t *call, apc_result_t *result ) DECLSPEC_HIDDEN; extern int server_remove_fd_from_cache( HANDLE handle ) DECLSPEC_HIDDEN; extern int server_get_unix_fd( HANDLE handle, unsigned int access, int *unix_fd, int *needs_close, enum server_fd_type *type, unsigned int *options ) DECLSPEC_HIDDEN; @@ -145,6 +142,7 @@ ULONG IoControlCode, LPVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, DWORD nOutBufferSize) DECLSPEC_HIDDEN; +extern NTSTATUS COMM_FlushBuffersFile( int fd ) DECLSPEC_HIDDEN; /* file I/O */ struct stat; @@ -244,6 +242,7 @@ } extern mode_t FILE_umask DECLSPEC_HIDDEN; +extern HANDLE keyed_event DECLSPEC_HIDDEN; /* Register functions */ diff -Nru wine1.6-1.7.1-actually1.6/dlls/ntdll/serial.c wine1.6-1.6.1/dlls/ntdll/serial.c --- wine1.6-1.7.1-actually1.6/dlls/ntdll/serial.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/ntdll/serial.c 2013-11-15 19:30:24.000000000 +0000 @@ -1338,3 +1338,29 @@ done: return status; } + +NTSTATUS COMM_FlushBuffersFile( int fd ) +{ +#ifdef HAVE_TCDRAIN + while (tcdrain( fd ) == -1) + { + if (errno != EINTR) return FILE_GetNtStatus(); + } + return STATUS_SUCCESS; +#elif defined(TIOCDRAIN) + while (ioctl( fd, TIOCDRAIN ) == -1) + { + if (errno != EINTR) return FILE_GetNtStatus(); + } + return STATUS_SUCCESS; +#elif defined(TCSBRK) + while (ioctl( fd, TCSBRK, 1 ) == -1) + { + if (errno != EINTR) return FILE_GetNtStatus(); + } + return STATUS_SUCCESS; +#else + ERR( "not supported\n" ); + return STATUS_NOT_IMPLEMENTED; +#endif +} diff -Nru wine1.6-1.7.1-actually1.6/dlls/ntdll/server.c wine1.6-1.6.1/dlls/ntdll/server.c --- wine1.6-1.7.1-actually1.6/dlls/ntdll/server.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/ntdll/server.c 2013-11-15 19:30:24.000000000 +0000 @@ -160,7 +160,7 @@ /*********************************************************************** * server_protocol_error */ -void server_protocol_error( const char *err, ... ) +static DECLSPEC_NORETURN void server_protocol_error( const char *err, ... ) { va_list args; @@ -175,7 +175,7 @@ /*********************************************************************** * server_protocol_perror */ -void server_protocol_perror( const char *err ) +static DECLSPEC_NORETURN void server_protocol_perror( const char *err ) { fprintf( stderr, "wine client error:%x: ", GetCurrentThreadId() ); perror( err ); @@ -319,6 +319,355 @@ /*********************************************************************** + * wait_select_reply + * + * Wait for a reply on the waiting pipe of the current thread. + */ +static int wait_select_reply( void *cookie ) +{ + int signaled; + struct wake_up_reply reply; + for (;;) + { + int ret; + ret = read( ntdll_get_thread_data()->wait_fd[0], &reply, sizeof(reply) ); + if (ret == sizeof(reply)) + { + if (!reply.cookie) abort_thread( reply.signaled ); /* thread got killed */ + if (wine_server_get_ptr(reply.cookie) == cookie) return reply.signaled; + /* we stole another reply, wait for the real one */ + signaled = wait_select_reply( cookie ); + /* and now put the wrong one back in the pipe */ + for (;;) + { + ret = write( ntdll_get_thread_data()->wait_fd[1], &reply, sizeof(reply) ); + if (ret == sizeof(reply)) break; + if (ret >= 0) server_protocol_error( "partial wakeup write %d\n", ret ); + if (errno == EINTR) continue; + server_protocol_perror("wakeup write"); + } + return signaled; + } + if (ret >= 0) server_protocol_error( "partial wakeup read %d\n", ret ); + if (errno == EINTR) continue; + server_protocol_perror("wakeup read"); + } +} + + +/*********************************************************************** + * invoke_apc + * + * Invoke a single APC. Return TRUE if a user APC has been run. + */ +static BOOL invoke_apc( const apc_call_t *call, apc_result_t *result ) +{ + BOOL user_apc = FALSE; + SIZE_T size; + void *addr; + + memset( result, 0, sizeof(*result) ); + + switch (call->type) + { + case APC_NONE: + break; + case APC_USER: + { + void (WINAPI *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR) = wine_server_get_ptr( call->user.func ); + func( call->user.args[0], call->user.args[1], call->user.args[2] ); + user_apc = TRUE; + break; + } + case APC_TIMER: + { + void (WINAPI *func)(void*, unsigned int, unsigned int) = wine_server_get_ptr( call->timer.func ); + func( wine_server_get_ptr( call->timer.arg ), + (DWORD)call->timer.time, (DWORD)(call->timer.time >> 32) ); + user_apc = TRUE; + break; + } + case APC_ASYNC_IO: + { + void *apc = NULL; + IO_STATUS_BLOCK *iosb = wine_server_get_ptr( call->async_io.sb ); + NTSTATUS (*func)(void *, IO_STATUS_BLOCK *, NTSTATUS, void **) = wine_server_get_ptr( call->async_io.func ); + result->type = call->type; + result->async_io.status = func( wine_server_get_ptr( call->async_io.user ), + iosb, call->async_io.status, &apc ); + if (result->async_io.status != STATUS_PENDING) + { + result->async_io.total = iosb->Information; + result->async_io.apc = wine_server_client_ptr( apc ); + } + break; + } + case APC_VIRTUAL_ALLOC: + result->type = call->type; + addr = wine_server_get_ptr( call->virtual_alloc.addr ); + size = call->virtual_alloc.size; + if ((ULONG_PTR)addr == call->virtual_alloc.addr && size == call->virtual_alloc.size) + { + result->virtual_alloc.status = NtAllocateVirtualMemory( NtCurrentProcess(), &addr, + call->virtual_alloc.zero_bits, &size, + call->virtual_alloc.op_type, + call->virtual_alloc.prot ); + result->virtual_alloc.addr = wine_server_client_ptr( addr ); + result->virtual_alloc.size = size; + } + else result->virtual_alloc.status = STATUS_WORKING_SET_LIMIT_RANGE; + break; + case APC_VIRTUAL_FREE: + result->type = call->type; + addr = wine_server_get_ptr( call->virtual_free.addr ); + size = call->virtual_free.size; + if ((ULONG_PTR)addr == call->virtual_free.addr && size == call->virtual_free.size) + { + result->virtual_free.status = NtFreeVirtualMemory( NtCurrentProcess(), &addr, &size, + call->virtual_free.op_type ); + result->virtual_free.addr = wine_server_client_ptr( addr ); + result->virtual_free.size = size; + } + else result->virtual_free.status = STATUS_INVALID_PARAMETER; + break; + case APC_VIRTUAL_QUERY: + { + MEMORY_BASIC_INFORMATION info; + result->type = call->type; + addr = wine_server_get_ptr( call->virtual_query.addr ); + if ((ULONG_PTR)addr == call->virtual_query.addr) + result->virtual_query.status = NtQueryVirtualMemory( NtCurrentProcess(), + addr, MemoryBasicInformation, &info, + sizeof(info), NULL ); + else + result->virtual_query.status = STATUS_WORKING_SET_LIMIT_RANGE; + + if (result->virtual_query.status == STATUS_SUCCESS) + { + result->virtual_query.base = wine_server_client_ptr( info.BaseAddress ); + result->virtual_query.alloc_base = wine_server_client_ptr( info.AllocationBase ); + result->virtual_query.size = info.RegionSize; + result->virtual_query.prot = info.Protect; + result->virtual_query.alloc_prot = info.AllocationProtect; + result->virtual_query.state = info.State >> 12; + result->virtual_query.alloc_type = info.Type >> 16; + } + break; + } + case APC_VIRTUAL_PROTECT: + result->type = call->type; + addr = wine_server_get_ptr( call->virtual_protect.addr ); + size = call->virtual_protect.size; + if ((ULONG_PTR)addr == call->virtual_protect.addr && size == call->virtual_protect.size) + { + result->virtual_protect.status = NtProtectVirtualMemory( NtCurrentProcess(), &addr, &size, + call->virtual_protect.prot, + &result->virtual_protect.prot ); + result->virtual_protect.addr = wine_server_client_ptr( addr ); + result->virtual_protect.size = size; + } + else result->virtual_protect.status = STATUS_INVALID_PARAMETER; + break; + case APC_VIRTUAL_FLUSH: + result->type = call->type; + addr = wine_server_get_ptr( call->virtual_flush.addr ); + size = call->virtual_flush.size; + if ((ULONG_PTR)addr == call->virtual_flush.addr && size == call->virtual_flush.size) + { + result->virtual_flush.status = NtFlushVirtualMemory( NtCurrentProcess(), + (const void **)&addr, &size, 0 ); + result->virtual_flush.addr = wine_server_client_ptr( addr ); + result->virtual_flush.size = size; + } + else result->virtual_flush.status = STATUS_INVALID_PARAMETER; + break; + case APC_VIRTUAL_LOCK: + result->type = call->type; + addr = wine_server_get_ptr( call->virtual_lock.addr ); + size = call->virtual_lock.size; + if ((ULONG_PTR)addr == call->virtual_lock.addr && size == call->virtual_lock.size) + { + result->virtual_lock.status = NtLockVirtualMemory( NtCurrentProcess(), &addr, &size, 0 ); + result->virtual_lock.addr = wine_server_client_ptr( addr ); + result->virtual_lock.size = size; + } + else result->virtual_lock.status = STATUS_INVALID_PARAMETER; + break; + case APC_VIRTUAL_UNLOCK: + result->type = call->type; + addr = wine_server_get_ptr( call->virtual_unlock.addr ); + size = call->virtual_unlock.size; + if ((ULONG_PTR)addr == call->virtual_unlock.addr && size == call->virtual_unlock.size) + { + result->virtual_unlock.status = NtUnlockVirtualMemory( NtCurrentProcess(), &addr, &size, 0 ); + result->virtual_unlock.addr = wine_server_client_ptr( addr ); + result->virtual_unlock.size = size; + } + else result->virtual_unlock.status = STATUS_INVALID_PARAMETER; + break; + case APC_MAP_VIEW: + result->type = call->type; + addr = wine_server_get_ptr( call->map_view.addr ); + size = call->map_view.size; + if ((ULONG_PTR)addr == call->map_view.addr && size == call->map_view.size) + { + LARGE_INTEGER offset; + offset.QuadPart = call->map_view.offset; + result->map_view.status = NtMapViewOfSection( wine_server_ptr_handle(call->map_view.handle), + NtCurrentProcess(), &addr, + call->map_view.zero_bits, 0, + &offset, &size, ViewShare, + call->map_view.alloc_type, call->map_view.prot ); + result->map_view.addr = wine_server_client_ptr( addr ); + result->map_view.size = size; + } + else result->map_view.status = STATUS_INVALID_PARAMETER; + NtClose( wine_server_ptr_handle(call->map_view.handle) ); + break; + case APC_UNMAP_VIEW: + result->type = call->type; + addr = wine_server_get_ptr( call->unmap_view.addr ); + if ((ULONG_PTR)addr == call->unmap_view.addr) + result->unmap_view.status = NtUnmapViewOfSection( NtCurrentProcess(), addr ); + else + result->unmap_view.status = STATUS_INVALID_PARAMETER; + break; + case APC_CREATE_THREAD: + { + CLIENT_ID id; + HANDLE handle; + SIZE_T reserve = call->create_thread.reserve; + SIZE_T commit = call->create_thread.commit; + void *func = wine_server_get_ptr( call->create_thread.func ); + void *arg = wine_server_get_ptr( call->create_thread.arg ); + + result->type = call->type; + if (reserve == call->create_thread.reserve && commit == call->create_thread.commit && + (ULONG_PTR)func == call->create_thread.func && (ULONG_PTR)arg == call->create_thread.arg) + { + result->create_thread.status = RtlCreateUserThread( NtCurrentProcess(), NULL, + call->create_thread.suspend, NULL, + reserve, commit, func, arg, &handle, &id ); + result->create_thread.handle = wine_server_obj_handle( handle ); + result->create_thread.tid = HandleToULong(id.UniqueThread); + } + else result->create_thread.status = STATUS_INVALID_PARAMETER; + break; + } + default: + server_protocol_error( "get_apc_request: bad type %d\n", call->type ); + break; + } + return user_apc; +} + + +/*********************************************************************** + * server_select + */ +unsigned int server_select( const select_op_t *select_op, data_size_t size, UINT flags, + const LARGE_INTEGER *timeout ) +{ + unsigned int ret; + int cookie; + BOOL user_apc = FALSE; + obj_handle_t apc_handle = 0; + apc_call_t call; + apc_result_t result; + timeout_t abs_timeout = timeout ? timeout->QuadPart : TIMEOUT_INFINITE; + + memset( &result, 0, sizeof(result) ); + + for (;;) + { + SERVER_START_REQ( select ) + { + req->flags = flags; + req->cookie = wine_server_client_ptr( &cookie ); + req->prev_apc = apc_handle; + req->timeout = abs_timeout; + wine_server_add_data( req, &result, sizeof(result) ); + wine_server_add_data( req, select_op, size ); + ret = wine_server_call( req ); + abs_timeout = reply->timeout; + apc_handle = reply->apc_handle; + call = reply->call; + } + SERVER_END_REQ; + if (ret == STATUS_PENDING) ret = wait_select_reply( &cookie ); + if (ret != STATUS_USER_APC) break; + if (invoke_apc( &call, &result )) + { + /* if we ran a user apc we have to check once more if an object got signaled, + * but we don't want to wait */ + abs_timeout = 0; + user_apc = TRUE; + } + + /* don't signal multiple times */ + if (size >= sizeof(select_op->signal_and_wait) && select_op->op == SELECT_SIGNAL_AND_WAIT) + size = offsetof( select_op_t, signal_and_wait.signal ); + } + + if (ret == STATUS_TIMEOUT && user_apc) ret = STATUS_USER_APC; + + /* A test on Windows 2000 shows that Windows always yields during + a wait, but a wait that is hit by an event gets a priority + boost as well. This seems to model that behavior the closest. */ + if (ret == STATUS_TIMEOUT) NtYieldExecution(); + + return ret; +} + + +/*********************************************************************** + * server_queue_process_apc + */ +unsigned int server_queue_process_apc( HANDLE process, const apc_call_t *call, apc_result_t *result ) +{ + for (;;) + { + unsigned int ret; + HANDLE handle = 0; + BOOL self = FALSE; + + SERVER_START_REQ( queue_apc ) + { + req->handle = wine_server_obj_handle( process ); + req->call = *call; + if (!(ret = wine_server_call( req ))) + { + handle = wine_server_ptr_handle( reply->handle ); + self = reply->self; + } + } + SERVER_END_REQ; + if (ret != STATUS_SUCCESS) return ret; + + if (self) + { + invoke_apc( call, result ); + } + else + { + NtWaitForSingleObject( handle, FALSE, NULL ); + + SERVER_START_REQ( get_apc_result ) + { + req->handle = wine_server_obj_handle( handle ); + if (!(ret = wine_server_call( req ))) *result = reply->result; + } + SERVER_END_REQ; + + if (!ret && result->type == APC_NONE) continue; /* APC didn't run, try again */ + if (ret) NtClose( handle ); + } + return ret; + } +} + + +/*********************************************************************** * wine_server_send_fd (NTDLL.@) * * Send a file descriptor to the server. diff -Nru wine1.6-1.7.1-actually1.6/dlls/ntdll/sync.c wine1.6-1.6.1/dlls/ntdll/sync.c --- wine1.6-1.7.1-actually1.6/dlls/ntdll/sync.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/ntdll/sync.c 2013-11-15 19:30:24.000000000 +0000 @@ -22,6 +22,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include @@ -60,6 +61,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(ntdll); +HANDLE keyed_event = NULL; + /* creates a struct security_descriptor and contained information in one contiguous piece of memory */ NTSTATUS NTDLL_create_struct_sd(PSECURITY_DESCRIPTOR nt_sd, struct security_descriptor **server_sd, data_size_t *server_sd_len) @@ -390,15 +393,34 @@ /****************************************************************************** * NtQueryEvent (NTDLL.@) */ -NTSTATUS WINAPI NtQueryEvent ( - IN HANDLE EventHandle, - IN EVENT_INFORMATION_CLASS EventInformationClass, - OUT PVOID EventInformation, - IN ULONG EventInformationLength, - OUT PULONG ReturnLength) +NTSTATUS WINAPI NtQueryEvent( HANDLE handle, EVENT_INFORMATION_CLASS class, + void *info, ULONG len, ULONG *ret_len ) { - FIXME("(%p)\n", EventHandle); - return STATUS_NOT_IMPLEMENTED; + NTSTATUS ret; + EVENT_BASIC_INFORMATION *out = info; + + if (class != EventBasicInformation) + { + FIXME("(%p, %d, %d) Unknown class\n", + handle, class, len); + return STATUS_INVALID_INFO_CLASS; + } + + if (len != sizeof(EVENT_BASIC_INFORMATION)) return STATUS_INFO_LENGTH_MISMATCH; + + SERVER_START_REQ( query_event ) + { + req->handle = wine_server_obj_handle( handle ); + if (!(ret = wine_server_call( req ))) + { + out->EventType = reply->manual_reset ? NotificationEvent : SynchronizationEvent; + out->EventState = reply->state; + if (ret_len) *ret_len = sizeof(EVENT_BASIC_INFORMATION); + } + } + SERVER_END_REQ; + + return ret; } /* @@ -792,356 +814,6 @@ } -/*********************************************************************** - * wait_reply - * - * Wait for a reply on the waiting pipe of the current thread. - */ -static int wait_reply( void *cookie ) -{ - int signaled; - struct wake_up_reply reply; - for (;;) - { - int ret; - ret = read( ntdll_get_thread_data()->wait_fd[0], &reply, sizeof(reply) ); - if (ret == sizeof(reply)) - { - if (!reply.cookie) abort_thread( reply.signaled ); /* thread got killed */ - if (wine_server_get_ptr(reply.cookie) == cookie) return reply.signaled; - /* we stole another reply, wait for the real one */ - signaled = wait_reply( cookie ); - /* and now put the wrong one back in the pipe */ - for (;;) - { - ret = write( ntdll_get_thread_data()->wait_fd[1], &reply, sizeof(reply) ); - if (ret == sizeof(reply)) break; - if (ret >= 0) server_protocol_error( "partial wakeup write %d\n", ret ); - if (errno == EINTR) continue; - server_protocol_perror("wakeup write"); - } - return signaled; - } - if (ret >= 0) server_protocol_error( "partial wakeup read %d\n", ret ); - if (errno == EINTR) continue; - server_protocol_perror("wakeup read"); - } -} - - -/*********************************************************************** - * invoke_apc - * - * Invoke a single APC. Return TRUE if a user APC has been run. - */ -static BOOL invoke_apc( const apc_call_t *call, apc_result_t *result ) -{ - BOOL user_apc = FALSE; - SIZE_T size; - void *addr; - - memset( result, 0, sizeof(*result) ); - - switch (call->type) - { - case APC_NONE: - break; - case APC_USER: - { - void (WINAPI *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR) = wine_server_get_ptr( call->user.func ); - func( call->user.args[0], call->user.args[1], call->user.args[2] ); - user_apc = TRUE; - break; - } - case APC_TIMER: - { - void (WINAPI *func)(void*, unsigned int, unsigned int) = wine_server_get_ptr( call->timer.func ); - func( wine_server_get_ptr( call->timer.arg ), - (DWORD)call->timer.time, (DWORD)(call->timer.time >> 32) ); - user_apc = TRUE; - break; - } - case APC_ASYNC_IO: - { - void *apc = NULL; - IO_STATUS_BLOCK *iosb = wine_server_get_ptr( call->async_io.sb ); - NTSTATUS (*func)(void *, IO_STATUS_BLOCK *, NTSTATUS, void **) = wine_server_get_ptr( call->async_io.func ); - result->type = call->type; - result->async_io.status = func( wine_server_get_ptr( call->async_io.user ), - iosb, call->async_io.status, &apc ); - if (result->async_io.status != STATUS_PENDING) - { - result->async_io.total = iosb->Information; - result->async_io.apc = wine_server_client_ptr( apc ); - } - break; - } - case APC_VIRTUAL_ALLOC: - result->type = call->type; - addr = wine_server_get_ptr( call->virtual_alloc.addr ); - size = call->virtual_alloc.size; - if ((ULONG_PTR)addr == call->virtual_alloc.addr && size == call->virtual_alloc.size) - { - result->virtual_alloc.status = NtAllocateVirtualMemory( NtCurrentProcess(), &addr, - call->virtual_alloc.zero_bits, &size, - call->virtual_alloc.op_type, - call->virtual_alloc.prot ); - result->virtual_alloc.addr = wine_server_client_ptr( addr ); - result->virtual_alloc.size = size; - } - else result->virtual_alloc.status = STATUS_WORKING_SET_LIMIT_RANGE; - break; - case APC_VIRTUAL_FREE: - result->type = call->type; - addr = wine_server_get_ptr( call->virtual_free.addr ); - size = call->virtual_free.size; - if ((ULONG_PTR)addr == call->virtual_free.addr && size == call->virtual_free.size) - { - result->virtual_free.status = NtFreeVirtualMemory( NtCurrentProcess(), &addr, &size, - call->virtual_free.op_type ); - result->virtual_free.addr = wine_server_client_ptr( addr ); - result->virtual_free.size = size; - } - else result->virtual_free.status = STATUS_INVALID_PARAMETER; - break; - case APC_VIRTUAL_QUERY: - { - MEMORY_BASIC_INFORMATION info; - result->type = call->type; - addr = wine_server_get_ptr( call->virtual_query.addr ); - if ((ULONG_PTR)addr == call->virtual_query.addr) - result->virtual_query.status = NtQueryVirtualMemory( NtCurrentProcess(), - addr, MemoryBasicInformation, &info, - sizeof(info), NULL ); - else - result->virtual_query.status = STATUS_WORKING_SET_LIMIT_RANGE; - - if (result->virtual_query.status == STATUS_SUCCESS) - { - result->virtual_query.base = wine_server_client_ptr( info.BaseAddress ); - result->virtual_query.alloc_base = wine_server_client_ptr( info.AllocationBase ); - result->virtual_query.size = info.RegionSize; - result->virtual_query.prot = info.Protect; - result->virtual_query.alloc_prot = info.AllocationProtect; - result->virtual_query.state = info.State >> 12; - result->virtual_query.alloc_type = info.Type >> 16; - } - break; - } - case APC_VIRTUAL_PROTECT: - result->type = call->type; - addr = wine_server_get_ptr( call->virtual_protect.addr ); - size = call->virtual_protect.size; - if ((ULONG_PTR)addr == call->virtual_protect.addr && size == call->virtual_protect.size) - { - result->virtual_protect.status = NtProtectVirtualMemory( NtCurrentProcess(), &addr, &size, - call->virtual_protect.prot, - &result->virtual_protect.prot ); - result->virtual_protect.addr = wine_server_client_ptr( addr ); - result->virtual_protect.size = size; - } - else result->virtual_protect.status = STATUS_INVALID_PARAMETER; - break; - case APC_VIRTUAL_FLUSH: - result->type = call->type; - addr = wine_server_get_ptr( call->virtual_flush.addr ); - size = call->virtual_flush.size; - if ((ULONG_PTR)addr == call->virtual_flush.addr && size == call->virtual_flush.size) - { - result->virtual_flush.status = NtFlushVirtualMemory( NtCurrentProcess(), - (const void **)&addr, &size, 0 ); - result->virtual_flush.addr = wine_server_client_ptr( addr ); - result->virtual_flush.size = size; - } - else result->virtual_flush.status = STATUS_INVALID_PARAMETER; - break; - case APC_VIRTUAL_LOCK: - result->type = call->type; - addr = wine_server_get_ptr( call->virtual_lock.addr ); - size = call->virtual_lock.size; - if ((ULONG_PTR)addr == call->virtual_lock.addr && size == call->virtual_lock.size) - { - result->virtual_lock.status = NtLockVirtualMemory( NtCurrentProcess(), &addr, &size, 0 ); - result->virtual_lock.addr = wine_server_client_ptr( addr ); - result->virtual_lock.size = size; - } - else result->virtual_lock.status = STATUS_INVALID_PARAMETER; - break; - case APC_VIRTUAL_UNLOCK: - result->type = call->type; - addr = wine_server_get_ptr( call->virtual_unlock.addr ); - size = call->virtual_unlock.size; - if ((ULONG_PTR)addr == call->virtual_unlock.addr && size == call->virtual_unlock.size) - { - result->virtual_unlock.status = NtUnlockVirtualMemory( NtCurrentProcess(), &addr, &size, 0 ); - result->virtual_unlock.addr = wine_server_client_ptr( addr ); - result->virtual_unlock.size = size; - } - else result->virtual_unlock.status = STATUS_INVALID_PARAMETER; - break; - case APC_MAP_VIEW: - result->type = call->type; - addr = wine_server_get_ptr( call->map_view.addr ); - size = call->map_view.size; - if ((ULONG_PTR)addr == call->map_view.addr && size == call->map_view.size) - { - LARGE_INTEGER offset; - offset.QuadPart = call->map_view.offset; - result->map_view.status = NtMapViewOfSection( wine_server_ptr_handle(call->map_view.handle), - NtCurrentProcess(), &addr, - call->map_view.zero_bits, 0, - &offset, &size, ViewShare, - call->map_view.alloc_type, call->map_view.prot ); - result->map_view.addr = wine_server_client_ptr( addr ); - result->map_view.size = size; - } - else result->map_view.status = STATUS_INVALID_PARAMETER; - NtClose( wine_server_ptr_handle(call->map_view.handle) ); - break; - case APC_UNMAP_VIEW: - result->type = call->type; - addr = wine_server_get_ptr( call->unmap_view.addr ); - if ((ULONG_PTR)addr == call->unmap_view.addr) - result->unmap_view.status = NtUnmapViewOfSection( NtCurrentProcess(), addr ); - else - result->unmap_view.status = STATUS_INVALID_PARAMETER; - break; - case APC_CREATE_THREAD: - { - CLIENT_ID id; - HANDLE handle; - SIZE_T reserve = call->create_thread.reserve; - SIZE_T commit = call->create_thread.commit; - void *func = wine_server_get_ptr( call->create_thread.func ); - void *arg = wine_server_get_ptr( call->create_thread.arg ); - - result->type = call->type; - if (reserve == call->create_thread.reserve && commit == call->create_thread.commit && - (ULONG_PTR)func == call->create_thread.func && (ULONG_PTR)arg == call->create_thread.arg) - { - result->create_thread.status = RtlCreateUserThread( NtCurrentProcess(), NULL, - call->create_thread.suspend, NULL, - reserve, commit, func, arg, &handle, &id ); - result->create_thread.handle = wine_server_obj_handle( handle ); - result->create_thread.tid = HandleToULong(id.UniqueThread); - } - else result->create_thread.status = STATUS_INVALID_PARAMETER; - break; - } - default: - server_protocol_error( "get_apc_request: bad type %d\n", call->type ); - break; - } - return user_apc; -} - -/*********************************************************************** - * NTDLL_queue_process_apc - */ -NTSTATUS NTDLL_queue_process_apc( HANDLE process, const apc_call_t *call, apc_result_t *result ) -{ - for (;;) - { - NTSTATUS ret; - HANDLE handle = 0; - BOOL self = FALSE; - - SERVER_START_REQ( queue_apc ) - { - req->handle = wine_server_obj_handle( process ); - req->call = *call; - if (!(ret = wine_server_call( req ))) - { - handle = wine_server_ptr_handle( reply->handle ); - self = reply->self; - } - } - SERVER_END_REQ; - if (ret != STATUS_SUCCESS) return ret; - - if (self) - { - invoke_apc( call, result ); - } - else - { - NtWaitForSingleObject( handle, FALSE, NULL ); - - SERVER_START_REQ( get_apc_result ) - { - req->handle = wine_server_obj_handle( handle ); - if (!(ret = wine_server_call( req ))) *result = reply->result; - } - SERVER_END_REQ; - - if (!ret && result->type == APC_NONE) continue; /* APC didn't run, try again */ - if (ret) NtClose( handle ); - } - return ret; - } -} - - -/*********************************************************************** - * NTDLL_wait_for_multiple_objects - * - * Implementation of NtWaitForMultipleObjects - */ -NTSTATUS NTDLL_wait_for_multiple_objects( UINT count, const HANDLE *handles, UINT flags, - const LARGE_INTEGER *timeout, HANDLE signal_object ) -{ - NTSTATUS ret; - UINT i; - int cookie; - BOOL user_apc = FALSE; - obj_handle_t obj_handles[MAXIMUM_WAIT_OBJECTS]; - obj_handle_t apc_handle = 0; - apc_call_t call; - apc_result_t result; - timeout_t abs_timeout = timeout ? timeout->QuadPart : TIMEOUT_INFINITE; - - memset( &result, 0, sizeof(result) ); - for (i = 0; i < count; i++) obj_handles[i] = wine_server_obj_handle( handles[i] ); - - for (;;) - { - SERVER_START_REQ( select ) - { - req->flags = flags; - req->cookie = wine_server_client_ptr( &cookie ); - req->signal = wine_server_obj_handle( signal_object ); - req->prev_apc = apc_handle; - req->timeout = abs_timeout; - wine_server_add_data( req, &result, sizeof(result) ); - wine_server_add_data( req, obj_handles, count * sizeof(*obj_handles) ); - ret = wine_server_call( req ); - abs_timeout = reply->timeout; - apc_handle = reply->apc_handle; - call = reply->call; - } - SERVER_END_REQ; - if (ret == STATUS_PENDING) ret = wait_reply( &cookie ); - if (ret != STATUS_USER_APC) break; - if (invoke_apc( &call, &result )) - { - /* if we ran a user apc we have to check once more if an object got signaled, - * but we don't want to wait */ - abs_timeout = 0; - user_apc = TRUE; - } - signal_object = 0; /* don't signal it multiple times */ - } - - if (ret == STATUS_TIMEOUT && user_apc) ret = STATUS_USER_APC; - - /* A test on Windows 2000 shows that Windows always yields during - a wait, but a wait that is hit by an event gets a priority - boost as well. This seems to model that behavior the closest. */ - if (ret == STATUS_TIMEOUT) NtYieldExecution(); - - return ret; -} - /* wait operations */ @@ -1152,13 +824,15 @@ BOOLEAN wait_all, BOOLEAN alertable, const LARGE_INTEGER *timeout ) { - UINT flags = SELECT_INTERRUPTIBLE; + select_op_t select_op; + UINT i, flags = SELECT_INTERRUPTIBLE; if (!count || count > MAXIMUM_WAIT_OBJECTS) return STATUS_INVALID_PARAMETER_1; - if (wait_all) flags |= SELECT_ALL; if (alertable) flags |= SELECT_ALERTABLE; - return NTDLL_wait_for_multiple_objects( count, handles, flags, timeout, 0 ); + select_op.wait.op = wait_all ? SELECT_WAIT_ALL : SELECT_WAIT; + for (i = 0; i < count; i++) select_op.wait.handles[i] = wine_server_obj_handle( handles[i] ); + return server_select( &select_op, offsetof( select_op_t, wait.handles[count] ), flags, timeout ); } @@ -1177,11 +851,16 @@ NTSTATUS WINAPI NtSignalAndWaitForSingleObject( HANDLE hSignalObject, HANDLE hWaitObject, BOOLEAN alertable, const LARGE_INTEGER *timeout ) { + select_op_t select_op; UINT flags = SELECT_INTERRUPTIBLE; if (!hSignalObject) return STATUS_INVALID_HANDLE; + if (alertable) flags |= SELECT_ALERTABLE; - return NTDLL_wait_for_multiple_objects( 1, &hWaitObject, flags, timeout, hSignalObject ); + select_op.signal_and_wait.op = SELECT_SIGNAL_AND_WAIT; + select_op.signal_and_wait.wait = wine_server_obj_handle( hWaitObject ); + select_op.signal_and_wait.signal = wine_server_obj_handle( hSignalObject ); + return server_select( &select_op, sizeof(select_op.signal_and_wait), flags, timeout ); } @@ -1206,8 +885,7 @@ { /* if alertable, we need to query the server */ if (alertable) - return NTDLL_wait_for_multiple_objects( 0, NULL, SELECT_INTERRUPTIBLE | SELECT_ALERTABLE, - timeout, 0 ); + return server_select( NULL, 0, SELECT_INTERRUPTIBLE | SELECT_ALERTABLE, timeout ); if (!timeout || timeout->QuadPart == TIMEOUT_INFINITE) /* sleep forever */ { @@ -1242,6 +920,102 @@ return STATUS_SUCCESS; } + +/****************************************************************************** + * NtCreateKeyedEvent (NTDLL.@) + */ +NTSTATUS WINAPI NtCreateKeyedEvent( HANDLE *handle, ACCESS_MASK access, + const OBJECT_ATTRIBUTES *attr, ULONG flags ) +{ + DWORD len = attr && attr->ObjectName ? attr->ObjectName->Length : 0; + NTSTATUS ret; + struct security_descriptor *sd = NULL; + struct object_attributes objattr; + + if (len >= MAX_PATH * sizeof(WCHAR)) return STATUS_NAME_TOO_LONG; + + objattr.rootdir = wine_server_obj_handle( attr ? attr->RootDirectory : 0 ); + objattr.sd_len = 0; + objattr.name_len = len; + if (attr) + { + ret = NTDLL_create_struct_sd( attr->SecurityDescriptor, &sd, &objattr.sd_len ); + if (ret != STATUS_SUCCESS) return ret; + } + + SERVER_START_REQ( create_keyed_event ) + { + req->access = access; + req->attributes = attr ? attr->Attributes : 0; + wine_server_add_data( req, &objattr, sizeof(objattr) ); + if (objattr.sd_len) wine_server_add_data( req, sd, objattr.sd_len ); + if (len) wine_server_add_data( req, attr->ObjectName->Buffer, len ); + ret = wine_server_call( req ); + *handle = wine_server_ptr_handle( reply->handle ); + } + SERVER_END_REQ; + + NTDLL_free_struct_sd( sd ); + return ret; +} + +/****************************************************************************** + * NtOpenKeyedEvent (NTDLL.@) + */ +NTSTATUS WINAPI NtOpenKeyedEvent( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr ) +{ + DWORD len = attr && attr->ObjectName ? attr->ObjectName->Length : 0; + NTSTATUS ret; + + if (len >= MAX_PATH * sizeof(WCHAR)) return STATUS_NAME_TOO_LONG; + + SERVER_START_REQ( open_keyed_event ) + { + req->access = access; + req->attributes = attr ? attr->Attributes : 0; + req->rootdir = wine_server_obj_handle( attr ? attr->RootDirectory : 0 ); + if (len) wine_server_add_data( req, attr->ObjectName->Buffer, len ); + ret = wine_server_call( req ); + *handle = wine_server_ptr_handle( reply->handle ); + } + SERVER_END_REQ; + return ret; +} + +/****************************************************************************** + * NtWaitForKeyedEvent (NTDLL.@) + */ +NTSTATUS WINAPI NtWaitForKeyedEvent( HANDLE handle, const void *key, + BOOLEAN alertable, const LARGE_INTEGER *timeout ) +{ + select_op_t select_op; + UINT flags = SELECT_INTERRUPTIBLE; + + if ((ULONG_PTR)key & 1) return STATUS_INVALID_PARAMETER_1; + if (alertable) flags |= SELECT_ALERTABLE; + select_op.keyed_event.op = SELECT_KEYED_EVENT_WAIT; + select_op.keyed_event.handle = wine_server_obj_handle( handle ); + select_op.keyed_event.key = wine_server_client_ptr( key ); + return server_select( &select_op, sizeof(select_op.keyed_event), flags, timeout ); +} + +/****************************************************************************** + * NtReleaseKeyedEvent (NTDLL.@) + */ +NTSTATUS WINAPI NtReleaseKeyedEvent( HANDLE handle, const void *key, + BOOLEAN alertable, const LARGE_INTEGER *timeout ) +{ + select_op_t select_op; + UINT flags = SELECT_INTERRUPTIBLE; + + if ((ULONG_PTR)key & 1) return STATUS_INVALID_PARAMETER_1; + if (alertable) flags |= SELECT_ALERTABLE; + select_op.keyed_event.op = SELECT_KEYED_EVENT_RELEASE; + select_op.keyed_event.handle = wine_server_obj_handle( handle ); + select_op.keyed_event.key = wine_server_client_ptr( key ); + return server_select( &select_op, sizeof(select_op.keyed_event), flags, timeout ); +} + /****************************************************************** * NtCreateIoCompletion (NTDLL.@) * ZwCreateIoCompletion (NTDLL.@) @@ -1297,11 +1071,11 @@ */ NTSTATUS WINAPI NtSetIoCompletion( HANDLE CompletionPort, ULONG_PTR CompletionKey, ULONG_PTR CompletionValue, NTSTATUS Status, - ULONG NumberOfBytesTransferred ) + SIZE_T NumberOfBytesTransferred ) { NTSTATUS status; - TRACE("(%p, %lx, %lx, %x, %d)\n", CompletionPort, CompletionKey, + TRACE("(%p, %lx, %lx, %x, %lx)\n", CompletionPort, CompletionKey, CompletionValue, Status, NumberOfBytesTransferred); SERVER_START_REQ( add_completion ) @@ -1465,7 +1239,117 @@ return status; } -VOID NTAPI RtlRunOnceInitialize(PRTL_RUN_ONCE initonce) +/****************************************************************** + * RtlRunOnceInitialize (NTDLL.@) + */ +void WINAPI RtlRunOnceInitialize( RTL_RUN_ONCE *once ) { - initonce->Ptr = NULL; + once->Ptr = NULL; +} + +/****************************************************************** + * RtlRunOnceBeginInitialize (NTDLL.@) + */ +DWORD WINAPI RtlRunOnceBeginInitialize( RTL_RUN_ONCE *once, ULONG flags, void **context ) +{ + if (flags & RTL_RUN_ONCE_CHECK_ONLY) + { + ULONG_PTR val = (ULONG_PTR)once->Ptr; + + if (flags & RTL_RUN_ONCE_ASYNC) return STATUS_INVALID_PARAMETER; + if ((val & 3) != 2) return STATUS_UNSUCCESSFUL; + if (context) *context = (void *)(val & ~3); + return STATUS_SUCCESS; + } + + for (;;) + { + ULONG_PTR next, val = (ULONG_PTR)once->Ptr; + + switch (val & 3) + { + case 0: /* first time */ + if (!interlocked_cmpxchg_ptr( &once->Ptr, + (flags & RTL_RUN_ONCE_ASYNC) ? (void *)3 : (void *)1, 0 )) + return STATUS_PENDING; + break; + + case 1: /* in progress, wait */ + if (flags & RTL_RUN_ONCE_ASYNC) return STATUS_INVALID_PARAMETER; + next = val & ~3; + if (interlocked_cmpxchg_ptr( &once->Ptr, (void *)((ULONG_PTR)&next | 1), + (void *)val ) == (void *)val) + NtWaitForKeyedEvent( keyed_event, &next, FALSE, NULL ); + break; + + case 2: /* done */ + if (context) *context = (void *)(val & ~3); + return STATUS_SUCCESS; + + case 3: /* in progress, async */ + if (!(flags & RTL_RUN_ONCE_ASYNC)) return STATUS_INVALID_PARAMETER; + return STATUS_PENDING; + } + } +} + +/****************************************************************** + * RtlRunOnceComplete (NTDLL.@) + */ +DWORD WINAPI RtlRunOnceComplete( RTL_RUN_ONCE *once, ULONG flags, void *context ) +{ + if ((ULONG_PTR)context & 3) return STATUS_INVALID_PARAMETER; + + if (flags & RTL_RUN_ONCE_INIT_FAILED) + { + if (context) return STATUS_INVALID_PARAMETER; + if (flags & RTL_RUN_ONCE_ASYNC) return STATUS_INVALID_PARAMETER; + } + else context = (void *)((ULONG_PTR)context | 2); + + for (;;) + { + ULONG_PTR val = (ULONG_PTR)once->Ptr; + + switch (val & 3) + { + case 1: /* in progress */ + if (interlocked_cmpxchg_ptr( &once->Ptr, context, (void *)val ) != (void *)val) break; + val &= ~3; + while (val) + { + ULONG_PTR next = *(ULONG_PTR *)val; + NtReleaseKeyedEvent( keyed_event, (void *)val, FALSE, NULL ); + val = next; + } + return STATUS_SUCCESS; + + case 3: /* in progress, async */ + if (!(flags & RTL_RUN_ONCE_ASYNC)) return STATUS_INVALID_PARAMETER; + if (interlocked_cmpxchg_ptr( &once->Ptr, context, (void *)val ) != (void *)val) break; + return STATUS_SUCCESS; + + default: + return STATUS_UNSUCCESSFUL; + } + } +} + +/****************************************************************** + * RtlRunOnceExecuteOnce (NTDLL.@) + */ +DWORD WINAPI RtlRunOnceExecuteOnce( RTL_RUN_ONCE *once, PRTL_RUN_ONCE_INIT_FN func, + void *param, void **context ) +{ + DWORD ret = RtlRunOnceBeginInitialize( once, 0, context ); + + if (ret != STATUS_PENDING) return ret; + + if (!func( once, param, context )) + { + RtlRunOnceComplete( once, RTL_RUN_ONCE_INIT_FAILED, NULL ); + return STATUS_UNSUCCESSFUL; + } + + return RtlRunOnceComplete( once, 0, context ? *context : NULL ); } diff -Nru wine1.6-1.7.1-actually1.6/dlls/ntdll/thread.c wine1.6-1.6.1/dlls/ntdll/thread.c --- wine1.6-1.7.1-actually1.6/dlls/ntdll/thread.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/ntdll/thread.c 2013-11-15 19:30:24.000000000 +0000 @@ -308,6 +308,8 @@ fill_cpu_info(); + NtCreateKeyedEvent( &keyed_event, GENERIC_READ | GENERIC_WRITE, NULL, 0 ); + return exe_file; } @@ -449,7 +451,7 @@ call.create_thread.reserve = stack_reserve; call.create_thread.commit = stack_commit; call.create_thread.suspend = suspended; - status = NTDLL_queue_process_apc( process, &call, &result ); + status = server_queue_process_apc( process, &call, &result ); if (status != STATUS_SUCCESS) return status; if (result.create_thread.status == STATUS_SUCCESS) diff -Nru wine1.6-1.7.1-actually1.6/dlls/ntdll/virtual.c wine1.6-1.6.1/dlls/ntdll/virtual.c --- wine1.6-1.7.1-actually1.6/dlls/ntdll/virtual.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/ntdll/virtual.c 2013-11-15 19:30:24.000000000 +0000 @@ -1893,7 +1893,7 @@ call.virtual_alloc.zero_bits = zero_bits; call.virtual_alloc.op_type = type; call.virtual_alloc.prot = protect; - status = NTDLL_queue_process_apc( process, &call, &result ); + status = server_queue_process_apc( process, &call, &result ); if (status != STATUS_SUCCESS) return status; if (result.virtual_alloc.status == STATUS_SUCCESS) @@ -1974,6 +1974,7 @@ else /* commit the pages */ { if (!(view = VIRTUAL_FindView( base, size ))) status = STATUS_NOT_MAPPED_VIEW; + else if (view->mapping && (view->protect & VPROT_COMMITTED)) status = STATUS_ALREADY_COMMITTED; else if (!VIRTUAL_SetProt( view, base, size, vprot )) status = STATUS_ACCESS_DENIED; else if (view->mapping && !(view->protect & VPROT_COMMITTED)) { @@ -2025,7 +2026,7 @@ call.virtual_free.addr = wine_server_client_ptr( addr ); call.virtual_free.size = size; call.virtual_free.op_type = type; - status = NTDLL_queue_process_apc( process, &call, &result ); + status = server_queue_process_apc( process, &call, &result ); if (status != STATUS_SUCCESS) return status; if (result.virtual_free.status == STATUS_SUCCESS) @@ -2139,7 +2140,7 @@ call.virtual_protect.addr = wine_server_client_ptr( addr ); call.virtual_protect.size = size; call.virtual_protect.prot = new_prot; - status = NTDLL_queue_process_apc( process, &call, &result ); + status = server_queue_process_apc( process, &call, &result ); if (status != STATUS_SUCCESS) return status; if (result.virtual_protect.status == STATUS_SUCCESS) @@ -2275,7 +2276,7 @@ call.virtual_query.type = APC_VIRTUAL_QUERY; call.virtual_query.addr = wine_server_client_ptr( addr ); - status = NTDLL_queue_process_apc( process, &call, &result ); + status = server_queue_process_apc( process, &call, &result ); if (status != STATUS_SUCCESS) return status; if (result.virtual_query.status == STATUS_SUCCESS) @@ -2398,7 +2399,7 @@ call.virtual_lock.type = APC_VIRTUAL_LOCK; call.virtual_lock.addr = wine_server_client_ptr( *addr ); call.virtual_lock.size = *size; - status = NTDLL_queue_process_apc( process, &call, &result ); + status = server_queue_process_apc( process, &call, &result ); if (status != STATUS_SUCCESS) return status; if (result.virtual_lock.status == STATUS_SUCCESS) @@ -2435,7 +2436,7 @@ call.virtual_unlock.type = APC_VIRTUAL_UNLOCK; call.virtual_unlock.addr = wine_server_client_ptr( *addr ); call.virtual_unlock.size = *size; - status = NTDLL_queue_process_apc( process, &call, &result ); + status = server_queue_process_apc( process, &call, &result ); if (status != STATUS_SUCCESS) return status; if (result.virtual_unlock.status == STATUS_SUCCESS) @@ -2600,7 +2601,7 @@ call.map_view.zero_bits = zero_bits; call.map_view.alloc_type = alloc_type; call.map_view.prot = protect; - res = NTDLL_queue_process_apc( process, &call, &result ); + res = server_queue_process_apc( process, &call, &result ); if (res != STATUS_SUCCESS) return res; if ((NTSTATUS)result.map_view.status >= 0) @@ -2741,7 +2742,7 @@ call.unmap_view.type = APC_UNMAP_VIEW; call.unmap_view.addr = wine_server_client_ptr( addr ); - status = NTDLL_queue_process_apc( process, &call, &result ); + status = server_queue_process_apc( process, &call, &result ); if (status == STATUS_SUCCESS) status = result.unmap_view.status; return status; } @@ -2779,7 +2780,7 @@ call.virtual_flush.type = APC_VIRTUAL_FLUSH; call.virtual_flush.addr = wine_server_client_ptr( addr ); call.virtual_flush.size = *size_ptr; - status = NTDLL_queue_process_apc( process, &call, &result ); + status = server_queue_process_apc( process, &call, &result ); if (status != STATUS_SUCCESS) return status; if (result.virtual_flush.status == STATUS_SUCCESS) diff -Nru wine1.6-1.7.1-actually1.6/dlls/oleaut32/typelib.c wine1.6-1.6.1/dlls/oleaut32/typelib.c --- wine1.6-1.7.1-actually1.6/dlls/oleaut32/typelib.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/oleaut32/typelib.c 2013-11-15 19:30:24.000000000 +0000 @@ -1885,6 +1885,9 @@ { TLBString *str; + if(!new_str) + return NULL; + LIST_FOR_EACH_ENTRY(str, string_list, TLBString, entry) { if (strcmpW(str->str, new_str) == 0) return str; @@ -2139,24 +2142,17 @@ case VT_BSTR :{ char * ptr; MSFT_ReadLEDWords(&size, sizeof(INT), pcx, DO_NOT_SEEK ); - if(size < 0) { - char next; - DWORD origPos = MSFT_Tell(pcx), nullPos; - - do { - MSFT_Read(&next, 1, pcx, DO_NOT_SEEK); - } while (next); - nullPos = MSFT_Tell(pcx); - size = nullPos - origPos; - MSFT_Seek(pcx, origPos); - } - ptr = heap_alloc_zero(size);/* allocate temp buffer */ - MSFT_Read(ptr, size, pcx, DO_NOT_SEEK);/* read string (ANSI) */ - V_BSTR(pVar)=SysAllocStringLen(NULL,size); - /* FIXME: do we need a AtoW conversion here? */ - V_UNION(pVar, bstrVal[size])='\0'; - while(size--) V_UNION(pVar, bstrVal[size])=ptr[size]; - heap_free(ptr); + if(size == -1){ + V_BSTR(pVar) = NULL; + }else{ + ptr = heap_alloc_zero(size); + MSFT_Read(ptr, size, pcx, DO_NOT_SEEK); + V_BSTR(pVar)=SysAllocStringLen(NULL,size); + /* FIXME: do we need a AtoW conversion here? */ + V_UNION(pVar, bstrVal[size])='\0'; + while(size--) V_UNION(pVar, bstrVal[size])=ptr[size]; + heap_free(ptr); + } } size=-4; break; /* FIXME: this will not work AT ALL when the variant contains a pointer */ diff -Nru wine1.6-1.7.1-actually1.6/dlls/oleaut32/vartype.c wine1.6-1.6.1/dlls/oleaut32/vartype.c --- wine1.6-1.7.1-actually1.6/dlls/oleaut32/vartype.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/oleaut32/vartype.c 2013-11-15 19:30:24.000000000 +0000 @@ -5137,7 +5137,7 @@ in case of quotient overflow. */ static HRESULT VARIANT_DI_div(const VARIANT_DI * dividend, const VARIANT_DI * divisor, - VARIANT_DI * quotient) + VARIANT_DI * quotient, BOOL round_remainder) { HRESULT r_overflow = S_OK; @@ -5180,8 +5180,21 @@ underflow = VARIANT_int_addlossy( quotient->bitsnum, "ientscale, sizeof(quotient->bitsnum) / sizeof(DWORD), remainderplusquotient, &tempquotientscale, 4); - VARIANT_int_mulbychar(remainderplusquotient + 4, 4, 10); - memcpy(remainderplusquotient, remainderplusquotient + 4, 4 * sizeof(DWORD)); + if (round_remainder) { + if(remainderplusquotient[4] >= 5){ + unsigned int i; + unsigned char remainder = 1; + for (i = 0; i < sizeof(quotient->bitsnum) / sizeof(DWORD) && remainder; i++) { + ULONGLONG digit = quotient->bitsnum[i] + 1; + remainder = (digit > 0xFFFFFFFF) ? 1 : 0; + quotient->bitsnum[i] = digit & 0xFFFFFFFF; + } + } + memset(remainderplusquotient, 0, sizeof(remainderplusquotient)); + } else { + VARIANT_int_mulbychar(remainderplusquotient + 4, 4, 10); + memcpy(remainderplusquotient, remainderplusquotient + 4, 4 * sizeof(DWORD)); + } tempquotientscale = ++remainderscale; } while (!underflow && !VARIANT_int_iszero(remainderplusquotient + 4, 4)); @@ -5485,31 +5498,16 @@ return hres; } -/************************************************************************ - * VarDecDiv (OLEAUT32.178) - * - * Divide one DECIMAL by another. - * - * PARAMS - * pDecLeft [I] Source - * pDecRight [I] Value to divide by - * pDecOut [O] Destination - * - * RETURNS - * Success: S_OK. - * Failure: DISP_E_OVERFLOW, if the value will not fit in the destination - */ -HRESULT WINAPI VarDecDiv(const DECIMAL* pDecLeft, const DECIMAL* pDecRight, DECIMAL* pDecOut) +static HRESULT VARIANT_do_division(const DECIMAL *pDecLeft, const DECIMAL *pDecRight, DECIMAL *pDecOut, + BOOL round) { HRESULT hRet = S_OK; VARIANT_DI di_left, di_right, di_result; HRESULT divresult; - if (!pDecLeft || !pDecRight || !pDecOut) return E_INVALIDARG; - VARIANT_DIFromDec(pDecLeft, &di_left); VARIANT_DIFromDec(pDecRight, &di_right); - divresult = VARIANT_DI_div(&di_left, &di_right, &di_result); + divresult = VARIANT_DI_div(&di_left, &di_right, &di_result, round); if (divresult != S_OK) { /* division actually overflowed */ @@ -5557,6 +5555,27 @@ } /************************************************************************ + * VarDecDiv (OLEAUT32.178) + * + * Divide one DECIMAL by another. + * + * PARAMS + * pDecLeft [I] Source + * pDecRight [I] Value to divide by + * pDecOut [O] Destination + * + * RETURNS + * Success: S_OK. + * Failure: DISP_E_OVERFLOW, if the value will not fit in the destination + */ +HRESULT WINAPI VarDecDiv(const DECIMAL* pDecLeft, const DECIMAL* pDecRight, DECIMAL* pDecOut) +{ + if (!pDecLeft || !pDecRight || !pDecOut) return E_INVALIDARG; + + return VARIANT_do_division(pDecLeft, pDecRight, pDecOut, FALSE); +} + +/************************************************************************ * VarDecMul (OLEAUT32.179) * * Multiply one DECIMAL by another. @@ -5765,6 +5784,10 @@ */ HRESULT WINAPI VarDecRound(const DECIMAL* pDecIn, int cDecimals, DECIMAL* pDecOut) { + DECIMAL divisor, tmp; + HRESULT hr; + unsigned int i; + if (cDecimals < 0 || (DEC_SIGN(pDecIn) & ~DECIMAL_NEG) || DEC_SCALE(pDecIn) > DEC_MAX_SCALE) return E_INVALIDARG; @@ -5774,9 +5797,26 @@ return S_OK; } - FIXME("semi-stub!\n"); + /* truncate significant digits and rescale */ + memset(&divisor, 0, sizeof(divisor)); + DEC_LO64(&divisor) = 1; - return DISP_E_OVERFLOW; + memset(&tmp, 0, sizeof(tmp)); + DEC_LO64(&tmp) = 10; + for (i = 0; i < DEC_SCALE(pDecIn) - cDecimals; ++i) + { + hr = VarDecMul(&divisor, &tmp, &divisor); + if (FAILED(hr)) + return hr; + } + + hr = VARIANT_do_division(pDecIn, &divisor, pDecOut, TRUE); + if (FAILED(hr)) + return hr; + + DEC_SCALE(pDecOut) = cDecimals; + + return S_OK; } /************************************************************************ diff -Nru wine1.6-1.7.1-actually1.6/dlls/riched20/writer.c wine1.6-1.6.1/dlls/riched20/writer.c --- wine1.6-1.7.1-actually1.6/dlls/riched20/writer.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/riched20/writer.c 2013-11-15 19:30:24.000000000 +0000 @@ -680,7 +680,7 @@ break; case CFU_UNDERLINENONE: default: - strcat(props, "\\ul0"); + strcat(props, "\\ulnone"); break; } else if (fmt->dwEffects & CFE_UNDERLINE) diff -Nru wine1.6-1.7.1-actually1.6/dlls/user32/winpos.c wine1.6-1.6.1/dlls/user32/winpos.c --- wine1.6-1.7.1-actually1.6/dlls/user32/winpos.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/user32/winpos.c 2013-11-15 19:30:24.000000000 +0000 @@ -2677,23 +2677,23 @@ if (ON_LEFT_BORDER(hittest)) { - mouseRect.left = max( mouseRect.left, sizingRect.right-maxTrack.x ); - mouseRect.right = min( mouseRect.right, sizingRect.right-minTrack.x ); + mouseRect.left = max( mouseRect.left, sizingRect.right-maxTrack.x+capturePoint.x-sizingRect.left ); + mouseRect.right = min( mouseRect.right, sizingRect.right-minTrack.x+capturePoint.x-sizingRect.left ); } else if (ON_RIGHT_BORDER(hittest)) { - mouseRect.left = max( mouseRect.left, sizingRect.left+minTrack.x ); - mouseRect.right = min( mouseRect.right, sizingRect.left+maxTrack.x ); + mouseRect.left = max( mouseRect.left, sizingRect.left+minTrack.x+capturePoint.x-sizingRect.right ); + mouseRect.right = min( mouseRect.right, sizingRect.left+maxTrack.x+capturePoint.x-sizingRect.right ); } if (ON_TOP_BORDER(hittest)) { - mouseRect.top = max( mouseRect.top, sizingRect.bottom-maxTrack.y ); - mouseRect.bottom = min( mouseRect.bottom,sizingRect.bottom-minTrack.y); + mouseRect.top = max( mouseRect.top, sizingRect.bottom-maxTrack.y+capturePoint.y-sizingRect.top ); + mouseRect.bottom = min( mouseRect.bottom,sizingRect.bottom-minTrack.y+capturePoint.y-sizingRect.top); } else if (ON_BOTTOM_BORDER(hittest)) { - mouseRect.top = max( mouseRect.top, sizingRect.top+minTrack.y ); - mouseRect.bottom = min( mouseRect.bottom, sizingRect.top+maxTrack.y ); + mouseRect.top = max( mouseRect.top, sizingRect.top+minTrack.y+capturePoint.y-sizingRect.bottom ); + mouseRect.bottom = min( mouseRect.bottom, sizingRect.top+maxTrack.y+capturePoint.y-sizingRect.bottom ); } /* Retrieve a default cache DC (without using the window style) */ diff -Nru wine1.6-1.7.1-actually1.6/dlls/vbscript/parser.y wine1.6-1.6.1/dlls/vbscript/parser.y --- wine1.6-1.7.1-actually1.6/dlls/vbscript/parser.y 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/vbscript/parser.y 2013-11-15 19:30:24.000000000 +0000 @@ -25,10 +25,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(vbscript); -#define YYLEX_PARAM ctx -#define YYPARSE_PARAM ctx - -static int parser_error(const char*); +static int parser_error(parser_ctx_t *,const char*); static void parse_complete(parser_ctx_t*,BOOL); @@ -82,7 +79,9 @@ %} -%pure_parser +%lex-param { parser_ctx_t *ctx } +%parse-param { parser_ctx_t *ctx } +%pure-parser %start Program %union { @@ -426,7 +425,7 @@ | tPROPERTY { $$ = propertyW; } %% -static int parser_error(const char *str) +static int parser_error(parser_ctx_t *ctx, const char *str) { return 0; } diff -Nru wine1.6-1.7.1-actually1.6/dlls/wbemprox/builtin.c wine1.6-1.6.1/dlls/wbemprox/builtin.c --- wine1.6-1.7.1-actually1.6/dlls/wbemprox/builtin.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/wbemprox/builtin.c 2013-11-15 19:30:24.000000000 +0000 @@ -1085,9 +1085,12 @@ /* optimize queries of the form WHERE Name='...' [OR Name='...']* */ static UINT seed_dirs( struct dirstack *dirstack, const struct expr *cond, WCHAR root, UINT *count ) { - const struct expr *left = cond->u.expr.left, *right = cond->u.expr.right; + const struct expr *left, *right; - if (cond->type != EXPR_COMPLEX) return *count = 0; + if (!cond || cond->type != EXPR_COMPLEX) return *count = 0; + + left = cond->u.expr.left; + right = cond->u.expr.right; if (cond->u.expr.op == OP_EQ) { UINT len; diff -Nru wine1.6-1.7.1-actually1.6/dlls/wbemprox/wbemlocator.c wine1.6-1.6.1/dlls/wbemprox/wbemlocator.c --- wine1.6-1.7.1-actually1.6/dlls/wbemprox/wbemlocator.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/wbemprox/wbemlocator.c 2013-11-15 19:30:24.000000000 +0000 @@ -101,6 +101,7 @@ { static const WCHAR rootW[] = {'R','O','O','T'}; static const WCHAR cimv2W[] = {'C','I','M','V','2'}; + static const WCHAR defaultW[] = {'D','E','F','A','U','L','T'}; HRESULT hr = WBEM_E_INVALID_NAMESPACE; const WCHAR *p, *q; unsigned int len; @@ -138,7 +139,9 @@ goto done; } q++; - if ((len = strlenW( q )) != sizeof(cimv2W) / sizeof(cimv2W[0]) || memicmpW( q, cimv2W, len )) + len = strlenW( q ); + if ((len != sizeof(cimv2W) / sizeof(cimv2W[0]) || memicmpW( q, cimv2W, len )) && + (len != sizeof(defaultW) / sizeof(defaultW[0]) || memicmpW( q, defaultW, len ))) goto done; if (!(*namespace = heap_alloc( (len + 1) * sizeof(WCHAR) ))) hr = E_OUTOFMEMORY; else diff -Nru wine1.6-1.7.1-actually1.6/dlls/wbemprox/wql.y wine1.6-1.6.1/dlls/wbemprox/wql.y --- wine1.6-1.7.1-actually1.6/dlls/wbemprox/wql.y 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/wbemprox/wql.y 2013-11-15 19:30:24.000000000 +0000 @@ -30,11 +30,6 @@ #include "wine/debug.h" #include "wine/unicode.h" -#define YYLEX_PARAM ctx -#define YYPARSE_PARAM ctx -#define YYERROR_DEBUG 1 -#define YYERROR_VERBOSE 1 - WINE_DEFAULT_DEBUG_CHANNEL(wbemprox); struct parser @@ -181,7 +176,7 @@ return e; } -static int wql_error( const char *str ); +static int wql_error( struct parser *parser, const char *str ); static int wql_lex( void *val, struct parser *parser ); #define PARSER_BUBBLE_UP_VIEW( parser, result, current_view ) \ @@ -190,6 +185,9 @@ %} +%lex-param { struct parser *ctx } +%parse-param { struct parser *ctx } +%error-verbose %pure-parser %union @@ -691,7 +689,7 @@ return token; } -static int wql_error( const char *str ) +static int wql_error( struct parser *parser, const char *str ) { ERR("%s\n", str); return 0; diff -Nru wine1.6-1.7.1-actually1.6/dlls/windowscodecs/imgfactory.c wine1.6-1.6.1/dlls/windowscodecs/imgfactory.c --- wine1.6-1.7.1-actually1.6/dlls/windowscodecs/imgfactory.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/windowscodecs/imgfactory.c 2013-11-15 19:30:24.000000000 +0000 @@ -603,12 +603,153 @@ return BitmapImpl_Create(width, height, stride, size, buffer, format, WICBitmapCacheOnLoad, bitmap); } +static BOOL get_16bpp_format(HBITMAP hbm, WICPixelFormatGUID *format) +{ + BOOL ret = TRUE; + BITMAPV4HEADER bmh; + HDC hdc; + + hdc = CreateCompatibleDC(0); + + memset(&bmh, 0, sizeof(bmh)); + bmh.bV4Size = sizeof(bmh); + bmh.bV4Width = 1; + bmh.bV4Height = 1; + bmh.bV4V4Compression = BI_BITFIELDS; + bmh.bV4BitCount = 16; + + GetDIBits(hdc, hbm, 0, 0, NULL, (BITMAPINFO *)&bmh, DIB_RGB_COLORS); + + if (bmh.bV4RedMask == 0x7c00 && + bmh.bV4GreenMask == 0x3e0 && + bmh.bV4BlueMask == 0x1f) + { + *format = GUID_WICPixelFormat16bppBGR555; + } + else if (bmh.bV4RedMask == 0xf800 && + bmh.bV4GreenMask == 0x7e0 && + bmh.bV4BlueMask == 0x1f) + { + *format = GUID_WICPixelFormat16bppBGR565; + } + else + { + FIXME("unrecognized bitfields %x,%x,%x\n", bmh.bV4RedMask, + bmh.bV4GreenMask, bmh.bV4BlueMask); + ret = FALSE; + } + + DeleteDC(hdc); + return ret; +} + static HRESULT WINAPI ComponentFactory_CreateBitmapFromHBITMAP(IWICComponentFactory *iface, - HBITMAP hBitmap, HPALETTE hPalette, WICBitmapAlphaChannelOption options, - IWICBitmap **ppIBitmap) + HBITMAP hbm, HPALETTE hpal, WICBitmapAlphaChannelOption option, IWICBitmap **bitmap) { - FIXME("(%p,%p,%p,%u,%p): stub\n", iface, hBitmap, hPalette, options, ppIBitmap); - return E_NOTIMPL; + BITMAP bm; + HRESULT hr; + WICPixelFormatGUID format; + IWICBitmapLock *lock; + UINT size, num_palette_entries = 0; + PALETTEENTRY entry[256]; + + TRACE("(%p,%p,%p,%u,%p)\n", iface, hbm, hpal, option, bitmap); + + if (!bitmap) return E_INVALIDARG; + + if (GetObjectW(hbm, sizeof(bm), &bm) != sizeof(bm)) + return WINCODEC_ERR_WIN32ERROR; + + if (hpal) + { + num_palette_entries = GetPaletteEntries(hpal, 0, 256, entry); + if (!num_palette_entries) + return WINCODEC_ERR_WIN32ERROR; + } + + /* TODO: Figure out the correct format for 16, 32, 64 bpp */ + switch(bm.bmBitsPixel) + { + case 1: + format = GUID_WICPixelFormat1bppIndexed; + break; + case 4: + format = GUID_WICPixelFormat4bppIndexed; + break; + case 8: + format = GUID_WICPixelFormat8bppIndexed; + break; + case 16: + if (!get_16bpp_format(hbm, &format)) + return E_INVALIDARG; + break; + case 24: + format = GUID_WICPixelFormat24bppBGR; + break; + case 32: + format = GUID_WICPixelFormat32bppBGR; + break; + case 48: + format = GUID_WICPixelFormat48bppRGB; + break; + default: + FIXME("unsupported %d bpp\n", bm.bmBitsPixel); + return E_INVALIDARG; + } + + hr = BitmapImpl_Create(bm.bmWidth, bm.bmHeight, bm.bmWidthBytes, 0, NULL, &format, option, bitmap); + if (hr != S_OK) return hr; + + hr = IWICBitmap_Lock(*bitmap, NULL, WICBitmapLockWrite, &lock); + if (hr == S_OK) + { + BYTE *buffer; + HDC hdc; + char bmibuf[FIELD_OFFSET(BITMAPINFO, bmiColors[256])]; + BITMAPINFO *bmi = (BITMAPINFO *)bmibuf; + + IWICBitmapLock_GetDataPointer(lock, &size, &buffer); + + hdc = CreateCompatibleDC(0); + + bmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + bmi->bmiHeader.biBitCount = 0; + GetDIBits(hdc, hbm, 0, 0, NULL, bmi, DIB_RGB_COLORS); + bmi->bmiHeader.biHeight = -bm.bmHeight; + GetDIBits(hdc, hbm, 0, bm.bmHeight, buffer, bmi, DIB_RGB_COLORS); + + DeleteDC(hdc); + IWICBitmapLock_Release(lock); + + if (num_palette_entries) + { + IWICPalette *palette; + WICColor colors[256]; + UINT i; + + hr = PaletteImpl_Create(&palette); + if (hr == S_OK) + { + for (i = 0; i < num_palette_entries; i++) + colors[i] = 0xff000000 | entry[i].peRed << 16 | + entry[i].peGreen << 8 | entry[i].peBlue; + + hr = IWICPalette_InitializeCustom(palette, colors, num_palette_entries); + if (hr == S_OK) + hr = IWICBitmap_SetPalette(*bitmap, palette); + + IWICPalette_Release(palette); + } + } + } + + if (hr != S_OK) + { + IWICBitmap_Release(*bitmap); + *bitmap = NULL; + } + + return hr; } static HRESULT WINAPI ComponentFactory_CreateBitmapFromHICON(IWICComponentFactory *iface, diff -Nru wine1.6-1.7.1-actually1.6/dlls/windowscodecs/pngformat.c wine1.6-1.6.1/dlls/windowscodecs/pngformat.c --- wine1.6-1.7.1-actually1.6/dlls/windowscodecs/pngformat.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/windowscodecs/pngformat.c 2013-11-15 19:30:24.000000000 +0000 @@ -866,7 +866,8 @@ UINT cCount, IWICColorContext **ppIColorContexts, UINT *pcActualCount) { PngDecoder *This = impl_from_IWICBitmapFrameDecode(iface); - png_charp name, profile; + png_charp name; + BYTE *profile; png_uint_32 len; int compression_type; HRESULT hr; @@ -877,11 +878,11 @@ EnterCriticalSection(&This->lock); - if (ppng_get_iCCP(This->png_ptr, This->info_ptr, &name, &compression_type, &profile, &len)) + if (ppng_get_iCCP(This->png_ptr, This->info_ptr, &name, &compression_type, (void *)&profile, &len)) { if (cCount && ppIColorContexts) { - hr = IWICColorContext_InitializeFromMemory(*ppIColorContexts, (const BYTE *)profile, len); + hr = IWICColorContext_InitializeFromMemory(*ppIColorContexts, profile, len); if (FAILED(hr)) { LeaveCriticalSection(&This->lock); diff -Nru wine1.6-1.7.1-actually1.6/dlls/windowscodecs/tiffformat.c wine1.6-1.6.1/dlls/windowscodecs/tiffformat.c --- wine1.6-1.7.1-actually1.6/dlls/windowscodecs/tiffformat.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/windowscodecs/tiffformat.c 2013-11-15 19:30:24.000000000 +0000 @@ -44,6 +44,16 @@ #ifdef SONAME_LIBTIFF +/* Workaround for broken libtiff 4.x headers on some 64-bit hosts which + * define TIFF_UINT64_T/toff_t as 32-bit for 32-bit builds, while they + * are supposed to be always 64-bit. + * TIFF_UINT64_T doesn't exist in libtiff 3.x, it was introduced in 4.x. + */ +#ifdef TIFF_UINT64_T +# undef toff_t +# define toff_t UINT64 +#endif + static CRITICAL_SECTION init_tiff_cs; static CRITICAL_SECTION_DEBUG init_tiff_cs_debug = { @@ -209,8 +219,8 @@ IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); return pTIFFClientOpen("", mode, stream, tiff_stream_read, - tiff_stream_write, tiff_stream_seek, tiff_stream_close, - tiff_stream_size, tiff_stream_map, tiff_stream_unmap); + tiff_stream_write, (void *)tiff_stream_seek, tiff_stream_close, + (void *)tiff_stream_size, (void *)tiff_stream_map, (void *)tiff_stream_unmap); } typedef struct { diff -Nru wine1.6-1.7.1-actually1.6/dlls/windowscodecsext/main.c wine1.6-1.6.1/dlls/windowscodecsext/main.c --- wine1.6-1.7.1-actually1.6/dlls/windowscodecsext/main.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/windowscodecsext/main.c 2013-11-15 19:30:24.000000000 +0000 @@ -48,6 +48,16 @@ return TRUE; } +/****************************************************************** + * DllGetClassObject + */ +HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) +{ + FIXME("(%s,%s,%p) stub\n", debugstr_guid(rclsid), debugstr_guid(iid), ppv); + + return CLASS_E_CLASSNOTAVAILABLE; +} + HRESULT WINAPI WICCreateColorTransform_Proxy(IWICColorTransform **ppIWICColorTransform) { HRESULT hr, init; diff -Nru wine1.6-1.7.1-actually1.6/dlls/windowscodecsext/windowscodecsext.spec wine1.6-1.6.1/dlls/windowscodecsext/windowscodecsext.spec --- wine1.6-1.7.1-actually1.6/dlls/windowscodecsext/windowscodecsext.spec 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/windowscodecsext/windowscodecsext.spec 2013-11-15 19:30:24.000000000 +0000 @@ -1,3 +1,3 @@ -@ stub DllGetClassObject +@ stdcall -private DllGetClassObject(ptr ptr ptr) @ stdcall IWICColorTransform_Initialize_Proxy(ptr ptr ptr ptr ptr) IWICColorTransform_Initialize_Proxy_W @ stdcall WICCreateColorTransform_Proxy(ptr) diff -Nru wine1.6-1.7.1-actually1.6/dlls/wined3d/arb_program_shader.c wine1.6-1.6.1/dlls/wined3d/arb_program_shader.c --- wine1.6-1.7.1-actually1.6/dlls/wined3d/arb_program_shader.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/wined3d/arb_program_shader.c 2013-11-15 19:30:24.000000000 +0000 @@ -39,13 +39,6 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d_constants); WINE_DECLARE_DEBUG_CHANNEL(d3d); -/* sRGB correction constants */ -static const float srgb_cmp = 0.0031308f; -static const float srgb_mul_low = 12.92f; -static const float srgb_pow = 0.41666f; -static const float srgb_mul_high = 1.055f; -static const float srgb_sub_high = 0.055f; - static BOOL shader_is_pshader_version(enum wined3d_shader_type type) { return type == WINED3D_SHADER_TYPE_PIXEL; @@ -758,6 +751,17 @@ priv->highest_dirty_ps_const = max(priv->highest_dirty_ps_const, start + count); } +static void shader_arb_append_imm_vec4(struct wined3d_shader_buffer *buffer, const float *values) +{ + char str[4][16]; + + wined3d_ftoa(values[0], str[0]); + wined3d_ftoa(values[1], str[1]); + wined3d_ftoa(values[2], str[2]); + wined3d_ftoa(values[3], str[3]); + shader_addline(buffer, "{%s, %s, %s, %s}", str[0], str[1], str[2], str[3]); +} + /* Generate the variable & register declarations for the ARB_vertex_program output target */ static void shader_generate_arb_declarations(const struct wined3d_shader *shader, const struct wined3d_shader_reg_maps *reg_maps, struct wined3d_shader_buffer *buffer, @@ -862,8 +866,9 @@ { const float *value; value = (const float *)lconst->value; - shader_addline(buffer, "PARAM C%u = {%.8e, %.8e, %.8e, %.8e};\n", lconst->idx, - value[0], value[1], value[2], value[3]); + shader_addline(buffer, "PARAM C%u = ", lconst->idx); + shader_arb_append_imm_vec4(buffer, value); + shader_addline(buffer, ";\n"); } } @@ -3436,29 +3441,29 @@ if(condcode) { /* Sigh. MOVC CC doesn't work, so use one of the temps as dummy dest */ - shader_addline(buffer, "SUBC %s, %s.x, srgb_consts1.y;\n", tmp1, fragcolor); + shader_addline(buffer, "SUBC %s, %s.x, srgb_consts1.x;\n", tmp1, fragcolor); /* Calculate the > 0.0031308 case */ - shader_addline(buffer, "POW %s.x (GE), %s.x, srgb_consts1.z;\n", fragcolor, fragcolor); - shader_addline(buffer, "POW %s.y (GE), %s.y, srgb_consts1.z;\n", fragcolor, fragcolor); - shader_addline(buffer, "POW %s.z (GE), %s.z, srgb_consts1.z;\n", fragcolor, fragcolor); - shader_addline(buffer, "MUL %s.xyz (GE), %s, srgb_consts1.w;\n", fragcolor, fragcolor); - shader_addline(buffer, "SUB %s.xyz (GE), %s, srgb_consts2.x;\n", fragcolor, fragcolor); + shader_addline(buffer, "POW %s.x (GE), %s.x, srgb_consts0.x;\n", fragcolor, fragcolor); + shader_addline(buffer, "POW %s.y (GE), %s.y, srgb_consts0.x;\n", fragcolor, fragcolor); + shader_addline(buffer, "POW %s.z (GE), %s.z, srgb_consts0.x;\n", fragcolor, fragcolor); + shader_addline(buffer, "MUL %s.xyz (GE), %s, srgb_consts0.y;\n", fragcolor, fragcolor); + shader_addline(buffer, "SUB %s.xyz (GE), %s, srgb_consts0.z;\n", fragcolor, fragcolor); /* Calculate the < case */ - shader_addline(buffer, "MUL %s.xyz (LT), srgb_consts1.x, %s;\n", fragcolor, fragcolor); + shader_addline(buffer, "MUL %s.xyz (LT), srgb_consts0.w, %s;\n", fragcolor, fragcolor); } else { /* Calculate the > 0.0031308 case */ - shader_addline(buffer, "POW %s.x, %s.x, srgb_consts1.z;\n", tmp1, fragcolor); - shader_addline(buffer, "POW %s.y, %s.y, srgb_consts1.z;\n", tmp1, fragcolor); - shader_addline(buffer, "POW %s.z, %s.z, srgb_consts1.z;\n", tmp1, fragcolor); - shader_addline(buffer, "MUL %s, %s, srgb_consts1.w;\n", tmp1, tmp1); - shader_addline(buffer, "SUB %s, %s, srgb_consts2.x;\n", tmp1, tmp1); + shader_addline(buffer, "POW %s.x, %s.x, srgb_consts0.x;\n", tmp1, fragcolor); + shader_addline(buffer, "POW %s.y, %s.y, srgb_consts0.x;\n", tmp1, fragcolor); + shader_addline(buffer, "POW %s.z, %s.z, srgb_consts0.x;\n", tmp1, fragcolor); + shader_addline(buffer, "MUL %s, %s, srgb_consts0.y;\n", tmp1, tmp1); + shader_addline(buffer, "SUB %s, %s, srgb_consts0.z;\n", tmp1, tmp1); /* Calculate the < case */ - shader_addline(buffer, "MUL %s, srgb_consts1.x, %s;\n", tmp2, fragcolor); + shader_addline(buffer, "MUL %s, srgb_consts0.w, %s;\n", tmp2, fragcolor); /* Get 1.0 / 0.0 masks for > 0.0031308 and < 0.0031308 */ - shader_addline(buffer, "SLT %s, srgb_consts1.y, %s;\n", tmp3, fragcolor); - shader_addline(buffer, "SGE %s, srgb_consts1.y, %s;\n", tmp4, fragcolor); + shader_addline(buffer, "SLT %s, srgb_consts1.x, %s;\n", tmp3, fragcolor); + shader_addline(buffer, "SGE %s, srgb_consts1.x, %s;\n", tmp4, fragcolor); /* Store the components > 0.0031308 in the destination */ shader_addline(buffer, "MUL %s.xyz, %s, %s;\n", fragcolor, tmp1, tmp3); /* Add the components that are < 0.0031308 */ @@ -3587,6 +3592,7 @@ BOOL custom_linear_fog = FALSE; char srgbtmp[4][4]; + char ftoa_tmp[16]; unsigned int i, found = 0; for (i = 0, map = reg_maps->temporary; map; map >>= 1, ++i) @@ -3712,7 +3718,8 @@ if(dcl_td) shader_addline(buffer, "TEMP TD;\n"); /* Used for sRGB writing */ shader_addline(buffer, "PARAM coefdiv = { 0.5, 0.25, 0.125, 0.0625 };\n"); shader_addline(buffer, "PARAM coefmul = { 2, 4, 8, 16 };\n"); - shader_addline(buffer, "PARAM ps_helper_const = { 0.0, 1.0, %1.10f, 0.0 };\n", eps); + wined3d_ftoa(eps, ftoa_tmp); + shader_addline(buffer, "PARAM ps_helper_const = { 0.0, 1.0, %s, 0.0 };\n", ftoa_tmp); if (reg_maps->shader_version.major < 2) { @@ -3736,11 +3743,14 @@ } } - if(args->super.srgb_correction) { - shader_addline(buffer, "PARAM srgb_consts1 = {%f, %f, %f, %f};\n", - srgb_mul_low, srgb_cmp, srgb_pow, srgb_mul_high); - shader_addline(buffer, "PARAM srgb_consts2 = {%f, %f, %f, %f};\n", - srgb_sub_high, 0.0, 0.0, 0.0); + if (args->super.srgb_correction) + { + shader_addline(buffer, "PARAM srgb_consts0 = "); + shader_arb_append_imm_vec4(buffer, wined3d_srgb_const0); + shader_addline(buffer, ";\n"); + shader_addline(buffer, "PARAM srgb_consts1 = "); + shader_arb_append_imm_vec4(buffer, wined3d_srgb_const1); + shader_addline(buffer, ";\n"); } /* Base Declarations */ @@ -3966,7 +3976,7 @@ TRACE("Found existing signature %u\n", found_sig->idx); return found_sig->idx; } - found_sig = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*sig)); + found_sig = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*found_sig)); found_sig->sig = clone_sig(sig); found_sig->idx = priv->ps_sig_number++; TRACE("New signature stored and assigned number %u\n", found_sig->idx); @@ -4197,7 +4207,9 @@ shader_addline(buffer, "TEMP TMP_FOGCOORD;\n"); if (need_helper_const(shader_data, reg_maps, gl_info)) { - shader_addline(buffer, "PARAM helper_const = { 0.0, 1.0, 2.0, %1.10f};\n", eps); + char ftoa_tmp[16]; + wined3d_ftoa(eps, ftoa_tmp); + shader_addline(buffer, "PARAM helper_const = { 0.0, 1.0, 2.0, %s};\n", ftoa_tmp); } if (need_rel_addr_const(shader_data, reg_maps, gl_info)) { @@ -6159,7 +6171,7 @@ BOOL luminance_used[MAX_TEXTURES] = {FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE}; UINT lowest_disabled_stage; const char *textype; - const char *instr, *sat; + const char *instr; char colorcor_dst[8]; GLuint ret; DWORD arg0, arg1, arg2; @@ -6274,11 +6286,14 @@ } shader_addline(&buffer, "PARAM specular_enable = program.env[%u];\n", ARB_FFP_CONST_SPECULAR_ENABLE); - if(settings->sRGB_write) { - shader_addline(&buffer, "PARAM srgb_consts1 = {%f, %f, %f, %f};\n", - srgb_mul_low, srgb_cmp, srgb_pow, srgb_mul_high); - shader_addline(&buffer, "PARAM srgb_consts2 = {%f, %f, %f, %f};\n", - srgb_sub_high, 0.0, 0.0, 0.0); + if (settings->sRGB_write) + { + shader_addline(&buffer, "PARAM srgb_consts0 = "); + shader_arb_append_imm_vec4(&buffer, wined3d_srgb_const0); + shader_addline(&buffer, ";\n"); + shader_addline(&buffer, "PARAM srgb_consts1 = "); + shader_arb_append_imm_vec4(&buffer, wined3d_srgb_const1); + shader_addline(&buffer, ";\n"); } if (lowest_disabled_stage < 7 && settings->emul_clipplanes) @@ -6299,12 +6314,6 @@ default: textype = "unexpected_textype"; break; } - if (settings->op[stage].cop == WINED3D_TOP_BUMPENVMAP - || settings->op[stage].cop == WINED3D_TOP_BUMPENVMAP_LUMINANCE) - sat = ""; - else - sat = "_SAT"; - if(settings->op[stage].projected == proj_none) { instr = "TEX"; } else if(settings->op[stage].projected == proj_count4 || @@ -6339,8 +6348,8 @@ shader_addline(&buffer, "ADD ret, ret, fragment.texcoord[%u];\n", stage); } - shader_addline(&buffer, "%s%s tex%u, ret, texture[%u], %s;\n", - instr, sat, stage, stage, textype); + shader_addline(&buffer, "%s tex%u, ret, texture[%u], %s;\n", + instr, stage, stage, textype); if (settings->op[stage - 1].cop == WINED3D_TOP_BUMPENVMAP_LUMINANCE) { shader_addline(&buffer, "MAD_SAT ret.x, tex%u.z, luminance%u.x, luminance%u.y;\n", @@ -6350,11 +6359,11 @@ } else if(settings->op[stage].projected == proj_count3) { shader_addline(&buffer, "MOV ret, fragment.texcoord[%u];\n", stage); shader_addline(&buffer, "MOV ret.w, ret.z;\n"); - shader_addline(&buffer, "%s%s tex%u, ret, texture[%u], %s;\n", - instr, sat, stage, stage, textype); + shader_addline(&buffer, "%s tex%u, ret, texture[%u], %s;\n", + instr, stage, stage, textype); } else { - shader_addline(&buffer, "%s%s tex%u, fragment.texcoord[%u], texture[%u], %s;\n", - instr, sat, stage, stage, stage, textype); + shader_addline(&buffer, "%s tex%u, fragment.texcoord[%u], texture[%u], %s;\n", + instr, stage, stage, stage, textype); } sprintf(colorcor_dst, "tex%u", stage); @@ -6878,6 +6887,8 @@ static BOOL gen_yv12_read(struct wined3d_shader_buffer *buffer, GLenum textype, char *luminance) { const char *tex; + static const float yv12_coef[] + = {2.0f / 3.0f, 1.0f / 6.0f, (2.0f / 3.0f) + (1.0f / 6.0f), 1.0f / 3.0f}; switch(textype) { case GL_TEXTURE_2D: tex = "2D"; break; @@ -6925,8 +6936,9 @@ * When reading from rectangle textures, keep in mind that the input y coordinates * go from 0 to d3d_height, whereas the opengl texture height is 1.5 * d3d_height */ - shader_addline(buffer, "PARAM yv12_coef = {%f, %f, %f, %f};\n", - 2.0f / 3.0f, 1.0f / 6.0f, (2.0f / 3.0f) + (1.0f / 6.0f), 1.0f / 3.0f); + shader_addline(buffer, "PARAM yv12_coef = "); + shader_arb_append_imm_vec4(buffer, yv12_coef); + shader_addline(buffer, ";\n"); shader_addline(buffer, "MOV texcrd, fragment.texcoord[0];\n"); /* the chroma planes have only half the width */ @@ -7443,7 +7455,8 @@ /* Now load the surface */ if (wined3d_settings.offscreen_rendering_mode != ORM_FBO - && (src_surface->flags & (SFLAG_INTEXTURE | SFLAG_INDRAWABLE)) == SFLAG_INDRAWABLE) + && (src_surface->flags & (SFLAG_INTEXTURE | SFLAG_INDRAWABLE)) == SFLAG_INDRAWABLE + && !surface_is_offscreen(src_surface)) { /* Without FBO blits transferring from the drawable to the texture is * expensive, because we have to flip the data in sysmem. Since we can diff -Nru wine1.6-1.7.1-actually1.6/dlls/wined3d/buffer.c wine1.6-1.6.1/dlls/wined3d/buffer.c --- wine1.6-1.7.1-actually1.6/dlls/wined3d/buffer.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/wined3d/buffer.c 2013-11-15 19:30:24.000000000 +0000 @@ -551,12 +551,21 @@ ULONG CDECL wined3d_buffer_decref(struct wined3d_buffer *buffer) { ULONG refcount = InterlockedDecrement(&buffer->resource.ref); + struct wined3d_context *context; TRACE("%p decreasing refcount to %u.\n", buffer, refcount); if (!refcount) { - buffer_unload(&buffer->resource); + if (buffer->buffer_object) + { + context = context_acquire(buffer->resource.device, NULL); + delete_gl_buffer(buffer, context->gl_info); + context_release(context); + + HeapFree(GetProcessHeap(), 0, buffer->conversion_map); + } + resource_cleanup(&buffer->resource); buffer->resource.parent_ops->wined3d_object_destroyed(buffer->resource.parent); HeapFree(GetProcessHeap(), 0, buffer->maps); diff -Nru wine1.6-1.7.1-actually1.6/dlls/wined3d/device.c wine1.6-1.6.1/dlls/wined3d/device.c --- wine1.6-1.7.1-actually1.6/dlls/wined3d/device.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/wined3d/device.c 2013-11-15 19:30:24.000000000 +0000 @@ -1329,6 +1329,7 @@ /* Destroy the shader backend. Note that this has to happen after all shaders are destroyed. */ device->blitter->free_private(device); device->shader_backend->shader_free_private(device); + destroy_dummy_textures(device, gl_info); /* Release the buffers (with sanity checks)*/ if (device->onscreen_depth_stencil) @@ -5033,11 +5034,7 @@ } else if (swapchain_desc->windowed) { - m.width = swapchain->orig_width; - m.height = swapchain->orig_height; - m.refresh_rate = 0; - m.format_id = swapchain->desc.backbuffer_format; - m.scanline_ordering = WINED3D_SCANLINE_ORDERING_UNKNOWN; + m = swapchain->original_mode; } else { diff -Nru wine1.6-1.7.1-actually1.6/dlls/wined3d/directx.c wine1.6-1.6.1/dlls/wined3d/directx.c --- wine1.6-1.7.1-actually1.6/dlls/wined3d/directx.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/wined3d/directx.c 2013-11-15 19:30:24.000000000 +0000 @@ -1266,11 +1266,13 @@ {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX650, "NVIDIA GeForce GTX 650", DRIVER_NVIDIA_GEFORCE6, 1024}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX650TI, "NVIDIA GeForce GTX 650 Ti", DRIVER_NVIDIA_GEFORCE6, 1024}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX660, "NVIDIA GeForce GTX 660", DRIVER_NVIDIA_GEFORCE6, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX660M, "NVIDIA GeForce GTX 660M", DRIVER_NVIDIA_GEFORCE6, 2048}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX660TI, "NVIDIA GeForce GTX 660 Ti", DRIVER_NVIDIA_GEFORCE6, 2048}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX670, "NVIDIA GeForce GTX 670", DRIVER_NVIDIA_GEFORCE6, 2048}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX670MX, "NVIDIA GeForce GTX 670MX", DRIVER_NVIDIA_GEFORCE6, 3072}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX680, "NVIDIA GeForce GTX 680", DRIVER_NVIDIA_GEFORCE6, 2048}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX770M, "NVIDIA GeForce GTX 770M", DRIVER_NVIDIA_GEFORCE6, 3072}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX770, "NVIDIA GeForce GTX 770", DRIVER_NVIDIA_GEFORCE6, 2048}, /* AMD cards */ {HW_VENDOR_AMD, CARD_AMD_RAGE_128PRO, "ATI Rage Fury", DRIVER_AMD_RAGE_128PRO, 16 }, @@ -1674,10 +1676,12 @@ cards[] = { {"GTX 770M", CARD_NVIDIA_GEFORCE_GTX770M}, /* Geforce 700 - midend high mobile */ + {"GTX 770", CARD_NVIDIA_GEFORCE_GTX770}, /* Geforce 700 - highend */ {"GTX 680", CARD_NVIDIA_GEFORCE_GTX680}, /* Geforce 600 - highend */ {"GTX 670MX", CARD_NVIDIA_GEFORCE_GTX670MX}, /* Geforce 600 - highend */ {"GTX 670", CARD_NVIDIA_GEFORCE_GTX670}, /* Geforce 600 - midend high */ {"GTX 660 Ti", CARD_NVIDIA_GEFORCE_GTX660TI}, /* Geforce 600 - midend high */ + {"GTX 660M", CARD_NVIDIA_GEFORCE_GTX660M}, /* Geforce 600 - midend high mobile */ {"GTX 660", CARD_NVIDIA_GEFORCE_GTX660}, /* Geforce 600 - midend high */ {"GTX 650 Ti", CARD_NVIDIA_GEFORCE_GTX650TI}, /* Geforce 600 - lowend */ {"GTX 650", CARD_NVIDIA_GEFORCE_GTX650}, /* Geforce 600 - lowend */ diff -Nru wine1.6-1.7.1-actually1.6/dlls/wined3d/glsl_shader.c wine1.6-1.6.1/dlls/wined3d/glsl_shader.c --- wine1.6-1.7.1-actually1.6/dlls/wined3d/glsl_shader.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/wined3d/glsl_shader.c 2013-11-15 19:30:24.000000000 +0000 @@ -47,9 +47,6 @@ #define WINED3D_GLSL_SAMPLE_LOD 0x4 #define WINED3D_GLSL_SAMPLE_GRAD 0x8 -static const float srgb_const0[] = {0.41666f, 1.055f, 0.055f, 12.92f}; /* pow, mul_high, sub_high, mul_low */ -static const float srgb_const1[] = {0.0031308f, 0.0f, 0.0f, 0.0f}; /* cmp */ - struct glsl_dst_param { char reg_name[150]; @@ -245,61 +242,14 @@ } } -/* This should be equivalent to using the %.8e format specifier, but always - * using '.' as decimal separator. This doesn't handle +/-INF or NAN, since - * the GLSL parser wouldn't be able to handle those anyway. */ -static void shader_glsl_ftoa(float value, char *s) -{ - int x, frac, exponent; - const char *sign = ""; - double d; - - d = value; - if (copysignf(1.0f, value) < 0.0f) - { - d = -d; - sign = "-"; - } - - if (d == 0.0f) - { - x = 0; - frac = 0; - exponent = 0; - } - else - { - double t, diff; - - exponent = floorf(log10f(d)); - d /= pow(10.0, exponent); - - x = d; - t = (d - x) * 100000000; - frac = t; - diff = t - frac; - - if ((diff > 0.5) || (diff == 0.5 && (frac & 1))) - { - if (++frac >= 100000000) - { - frac = 0; - ++x; - } - } - } - - sprintf(s, "%s%d.%08de%+03d", sign, x, frac, exponent); -} - static void shader_glsl_append_imm_vec4(struct wined3d_shader_buffer *buffer, const float *values) { char str[4][16]; - shader_glsl_ftoa(values[0], str[0]); - shader_glsl_ftoa(values[1], str[1]); - shader_glsl_ftoa(values[2], str[2]); - shader_glsl_ftoa(values[3], str[3]); + wined3d_ftoa(values[0], str[0]); + wined3d_ftoa(values[1], str[1]); + wined3d_ftoa(values[2], str[2]); + wined3d_ftoa(values[3], str[3]); shader_addline(buffer, "vec4(%s, %s, %s, %s)", str[0], str[1], str[2], str[3]); } @@ -506,6 +456,7 @@ static inline void walk_constant_heap(const struct wined3d_gl_info *gl_info, const float *constants, const GLint *constant_locations, const struct constant_heap *heap, unsigned char *stack, DWORD version) { + unsigned int start = ~0U, end = 0; int stack_idx = 0; unsigned int heap_idx = 1; unsigned int idx; @@ -513,7 +464,8 @@ if (heap->entries[heap_idx].version <= version) return; idx = heap->entries[heap_idx].idx; - if (constant_locations[idx] != -1) GL_EXTCALL(glUniform4fvARB(constant_locations[idx], 1, &constants[idx * 4])); + if (constant_locations[idx] != -1) + start = end = idx; stack[stack_idx] = HEAP_NODE_TRAVERSE_LEFT; while (stack_idx >= 0) @@ -529,7 +481,12 @@ heap_idx = left_idx; idx = heap->entries[heap_idx].idx; if (constant_locations[idx] != -1) - GL_EXTCALL(glUniform4fvARB(constant_locations[idx], 1, &constants[idx * 4])); + { + if (start > idx) + start = idx; + if (end < idx) + end = idx; + } stack[stack_idx++] = HEAP_NODE_TRAVERSE_RIGHT; stack[stack_idx] = HEAP_NODE_TRAVERSE_LEFT; @@ -545,7 +502,12 @@ heap_idx = right_idx; idx = heap->entries[heap_idx].idx; if (constant_locations[idx] != -1) - GL_EXTCALL(glUniform4fvARB(constant_locations[idx], 1, &constants[idx * 4])); + { + if (start > idx) + start = idx; + if (end < idx) + end = idx; + } stack[stack_idx++] = HEAP_NODE_POP; stack[stack_idx] = HEAP_NODE_TRAVERSE_LEFT; @@ -559,6 +521,8 @@ break; } } + if (start <= end) + GL_EXTCALL(glUniform4fvARB(constant_locations[start], end - start + 1, &constants[start * 4])); checkGLcall("walk_constant_heap()"); } @@ -908,16 +872,26 @@ for (i = 0; i < MAX_TEXTURES; ++i) { + if (prog->ps.bumpenv_mat_location[i] == -1) + continue; + GL_EXTCALL(glUniformMatrix2fvARB(prog->ps.bumpenv_mat_location[i], 1, 0, - (const float *)&state->texture_states[i][WINED3D_TSS_BUMPENV_MAT00])); - GL_EXTCALL(glUniform1fARB(prog->ps.bumpenv_lum_scale_location[i], - *(const float *)&state->texture_states[i][WINED3D_TSS_BUMPENV_LSCALE])); - GL_EXTCALL(glUniform1fARB(prog->ps.bumpenv_lum_offset_location[i], - *(const float *)&state->texture_states[i][WINED3D_TSS_BUMPENV_LOFFSET])); + (const float *)&state->texture_states[i][WINED3D_TSS_BUMPENV_MAT00])); + + if (prog->ps.bumpenv_lum_scale_location[i] != -1) + { + GL_EXTCALL(glUniform1fvARB(prog->ps.bumpenv_lum_scale_location[i], 1, + (const float *)&state->texture_states[i][WINED3D_TSS_BUMPENV_LSCALE])); + GL_EXTCALL(glUniform1fvARB(prog->ps.bumpenv_lum_offset_location[i], 1, + (const float *)&state->texture_states[i][WINED3D_TSS_BUMPENV_LOFFSET])); + } } - D3DCOLORTOGLFLOAT4(state->render_states[WINED3D_RS_TEXTUREFACTOR], col); - GL_EXTCALL(glUniform4fARB(prog->ps.tex_factor_location, col[0], col[1], col[2], col[3])); + if (prog->ps.tex_factor_location != -1) + { + D3DCOLORTOGLFLOAT4(state->render_states[WINED3D_RS_TEXTUREFACTOR], col); + GL_EXTCALL(glUniform4fvARB(prog->ps.tex_factor_location, 1, col)); + } if (state->render_states[WINED3D_RS_SPECULARENABLE]) GL_EXTCALL(glUniform4fARB(prog->ps.specular_enable_location, 1.0f, 1.0f, 1.0f, 0.0f)); @@ -1268,10 +1242,10 @@ if (ps_args->srgb_correction) { shader_addline(buffer, "const vec4 srgb_const0 = "); - shader_glsl_append_imm_vec4(buffer, srgb_const0); + shader_glsl_append_imm_vec4(buffer, wined3d_srgb_const0); shader_addline(buffer, ";\n"); shader_addline(buffer, "const vec4 srgb_const1 = "); - shader_glsl_append_imm_vec4(buffer, srgb_const1); + shader_glsl_append_imm_vec4(buffer, wined3d_srgb_const1); shader_addline(buffer, ";\n"); } if (reg_maps->vpos || reg_maps->usesdsy) @@ -1654,7 +1628,7 @@ switch (reg->data_type) { case WINED3D_DATA_FLOAT: - shader_glsl_ftoa(*(const float *)reg->immconst_data, register_name); + wined3d_ftoa(*(const float *)reg->immconst_data, register_name); break; case WINED3D_DATA_INT: sprintf(register_name, "%#x", reg->immconst_data[0]); @@ -1674,10 +1648,10 @@ switch (reg->data_type) { case WINED3D_DATA_FLOAT: - shader_glsl_ftoa(*(const float *)®->immconst_data[0], imm_str[0]); - shader_glsl_ftoa(*(const float *)®->immconst_data[1], imm_str[1]); - shader_glsl_ftoa(*(const float *)®->immconst_data[2], imm_str[2]); - shader_glsl_ftoa(*(const float *)®->immconst_data[3], imm_str[3]); + wined3d_ftoa(*(const float *)®->immconst_data[0], imm_str[0]); + wined3d_ftoa(*(const float *)®->immconst_data[1], imm_str[1]); + wined3d_ftoa(*(const float *)®->immconst_data[2], imm_str[2]); + wined3d_ftoa(*(const float *)®->immconst_data[3], imm_str[3]); sprintf(register_name, "vec4(%s, %s, %s, %s)", imm_str[0], imm_str[1], imm_str[2], imm_str[3]); break; @@ -4934,7 +4908,7 @@ if (!settings->normal) break; shader_addline(buffer, "dir = normalize(dir);\n"); - shader_addline(buffer, "diffuse += (max(0.0, dot(dir, normal))" + shader_addline(buffer, "diffuse += (clamp(dot(dir, normal), 0.0, 1.0)" " * gl_LightSource[%u].diffuse.xyz) / att;\n", i); if (settings->localviewer) shader_addline(buffer, "t = dot(normal, normalize(dir - normalize(ec_pos.xyz)));\n"); @@ -4959,7 +4933,7 @@ shader_addline(buffer, "ambient += gl_LightSource[%u].ambient.xyz * att;\n", i); if (!settings->normal) break; - shader_addline(buffer, "diffuse += (max(0.0, dot(dir, normal))" + shader_addline(buffer, "diffuse += (clamp(dot(dir, normal), 0.0, 1.0)" " * gl_LightSource[%u].diffuse.xyz) * att;\n", i); if (settings->localviewer) shader_addline(buffer, "t = dot(normal, normalize(dir - normalize(ec_pos.xyz)));\n"); @@ -4974,7 +4948,8 @@ if (!settings->normal) break; shader_addline(buffer, "dir = normalize(gl_LightSource[%u].position.xyz);\n", i); - shader_addline(buffer, "diffuse += max(0.0, dot(dir, normal)) * gl_LightSource[%u].diffuse.xyz;\n", i); + shader_addline(buffer, "diffuse += clamp(dot(dir, normal), 0.0, 1.0)" + " * gl_LightSource[%u].diffuse.xyz;\n", i); shader_addline(buffer, "t = dot(normal, gl_LightSource[%u].halfVector.xyz);\n", i); shader_addline(buffer, "if (t > 0.0) specular += pow(t, gl_FrontMaterial.shininess)" " * gl_LightSource[%u].specular;\n", i); @@ -5082,7 +5057,11 @@ break; case WINED3D_FFP_VS_FOG_DEPTH: - shader_addline(buffer, "gl_FogFragCoord = ec_pos.z;\n"); + if (settings->ortho_fog) + /* Need to undo the [0.0 - 1.0] -> [-1.0 - 1.0] transformation from D3D to GL coordinates. */ + shader_addline(buffer, "gl_FogFragCoord = gl_Position.z * 0.5 + 0.5;\n"); + else + shader_addline(buffer, "gl_FogFragCoord = ec_pos.z;\n"); break; default: @@ -5480,10 +5459,10 @@ if (settings->sRGB_write) { shader_addline(buffer, "const vec4 srgb_const0 = "); - shader_glsl_append_imm_vec4(buffer, srgb_const0); + shader_glsl_append_imm_vec4(buffer, wined3d_srgb_const0); shader_addline(buffer, ";\n"); shader_addline(buffer, "const vec4 srgb_const1 = "); - shader_glsl_append_imm_vec4(buffer, srgb_const1); + shader_glsl_append_imm_vec4(buffer, wined3d_srgb_const1); shader_addline(buffer, ";\n"); } @@ -5497,7 +5476,7 @@ { const char *texture_function, *coord_mask; char tex_reg_name[8]; - BOOL proj, clamp; + BOOL proj; if (!(tex_map & (1 << stage))) continue; @@ -5517,12 +5496,6 @@ proj = TRUE; } - if (settings->op[stage].cop == WINED3D_TOP_BUMPENVMAP - || settings->op[stage].cop == WINED3D_TOP_BUMPENVMAP_LUMINANCE) - clamp = FALSE; - else - clamp = TRUE; - switch (settings->op[stage].tex_type) { case tex_1d: @@ -5614,12 +5587,8 @@ shader_addline(buffer, "ret = gl_TexCoord[%u] + ret.xyxy;\n", stage); } - if (clamp) - shader_addline(buffer, "tex%u = clamp(%s(ps_sampler%u, ret.%s), 0.0, 1.0);\n", - stage, texture_function, stage, coord_mask); - else - shader_addline(buffer, "tex%u = %s(ps_sampler%u, ret.%s);\n", - stage, texture_function, stage, coord_mask); + shader_addline(buffer, "tex%u = %s(ps_sampler%u, ret.%s);\n", + stage, texture_function, stage, coord_mask); if (settings->op[stage - 1].cop == WINED3D_TOP_BUMPENVMAP_LUMINANCE) shader_addline(buffer, "tex%u *= clamp(tex%u.z * bumpenv_lum_scale%u + bumpenv_lum_offset%u, 0.0, 1.0);\n", @@ -5627,21 +5596,13 @@ } else if (settings->op[stage].projected == proj_count3) { - if (clamp) - shader_addline(buffer, "tex%u = clamp(%s(ps_sampler%u, gl_TexCoord[%u].xyz), 0.0, 1.0);\n", - stage, texture_function, stage, stage); - else - shader_addline(buffer, "tex%u = %s(ps_sampler%u, gl_TexCoord[%u].xyz);\n", - stage, texture_function, stage, stage); + shader_addline(buffer, "tex%u = %s(ps_sampler%u, gl_TexCoord[%u].xyz);\n", + stage, texture_function, stage, stage); } else { - if (clamp) - shader_addline(buffer, "tex%u = clamp(%s(ps_sampler%u, gl_TexCoord[%u].%s), 0.0, 1.0);\n", - stage, texture_function, stage, stage, coord_mask); - else - shader_addline(buffer, "tex%u = %s(ps_sampler%u, gl_TexCoord[%u].%s);\n", - stage, texture_function, stage, stage, coord_mask); + shader_addline(buffer, "tex%u = %s(ps_sampler%u, gl_TexCoord[%u].%s);\n", + stage, texture_function, stage, stage, coord_mask); } sprintf(tex_reg_name, "tex%u", stage); @@ -6745,7 +6706,7 @@ { caps->xyzrhw = TRUE; caps->max_active_lights = gl_info->limits.lights; - caps->max_vertex_blend_matrices = 0; + caps->max_vertex_blend_matrices = 1; caps->max_vertex_blend_matrix_index = 0; caps->vertex_processing_caps = WINED3DVTXPCAPS_TEXGEN | WINED3DVTXPCAPS_MATERIALSOURCE7 @@ -6814,6 +6775,16 @@ context->select_shader = 1; } +static void glsl_vertex_pipe_projection(struct wined3d_context *context, + const struct wined3d_state *state, DWORD state_id) +{ + /* Table fog behavior depends on the projection matrix. */ + if (state->render_states[WINED3D_RS_FOGENABLE] + && state->render_states[WINED3D_RS_FOGTABLEMODE] != WINED3D_FOG_NONE) + context->select_shader = 1; + transform_projection(context, state, state_id); +} + static const struct StateEntryTemplate glsl_vertex_pipe_vp_states[] = { {STATE_VDECL, {STATE_VDECL, vertexdeclaration }, WINED3D_GL_EXT_NONE }, @@ -6867,7 +6838,7 @@ {STATE_VIEWPORT, {STATE_VIEWPORT, viewport_vertexpart }, WINED3D_GL_EXT_NONE }, /* Transform states */ {STATE_TRANSFORM(WINED3D_TS_VIEW), {STATE_TRANSFORM(WINED3D_TS_VIEW), transform_view }, WINED3D_GL_EXT_NONE }, - {STATE_TRANSFORM(WINED3D_TS_PROJECTION), {STATE_TRANSFORM(WINED3D_TS_PROJECTION), transform_projection }, WINED3D_GL_EXT_NONE }, + {STATE_TRANSFORM(WINED3D_TS_PROJECTION), {STATE_TRANSFORM(WINED3D_TS_PROJECTION), glsl_vertex_pipe_projection}, WINED3D_GL_EXT_NONE }, {STATE_TRANSFORM(WINED3D_TS_TEXTURE0), {STATE_TEXTURESTAGE(0, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), NULL }, WINED3D_GL_EXT_NONE }, {STATE_TRANSFORM(WINED3D_TS_TEXTURE1), {STATE_TEXTURESTAGE(1, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), NULL }, WINED3D_GL_EXT_NONE }, {STATE_TRANSFORM(WINED3D_TS_TEXTURE2), {STATE_TEXTURESTAGE(2, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), NULL }, WINED3D_GL_EXT_NONE }, diff -Nru wine1.6-1.7.1-actually1.6/dlls/wined3d/shader.c wine1.6-1.6.1/dlls/wined3d/shader.c --- wine1.6-1.7.1-actually1.6/dlls/wined3d/shader.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/wined3d/shader.c 2013-11-15 19:30:24.000000000 +0000 @@ -33,6 +33,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_shader); +/* pow, mul_high, sub_high, mul_low */ +const float wined3d_srgb_const0[] = {0.41666f, 1.055f, 0.055f, 12.92f}; +/* cmp */ +const float wined3d_srgb_const1[] = {0.0031308f, 0.0f, 0.0f, 0.0f}; + static const char * const shader_opcode_names[] = { /* WINED3DSIH_ABS */ "abs", diff -Nru wine1.6-1.7.1-actually1.6/dlls/wined3d/state.c wine1.6-1.6.1/dlls/wined3d/state.c --- wine1.6-1.7.1-actually1.6/dlls/wined3d/state.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/wined3d/state.c 2013-11-15 19:30:24.000000000 +0000 @@ -4700,10 +4700,6 @@ gl_info->gl_ops.gl.p_glViewport(vp.x, (height - (vp.y + vp.height)), vp.width, vp.height); } - - if (!isStateDirty(context, STATE_RENDER(WINED3D_RS_POINTSCALEENABLE))) - state_pscale(context, state, STATE_RENDER(WINED3D_RS_POINTSCALEENABLE)); - checkGLcall("glViewport"); } @@ -4711,7 +4707,8 @@ { if (!isStateDirty(context, STATE_TRANSFORM(WINED3D_TS_PROJECTION))) transform_projection(context, state, STATE_TRANSFORM(WINED3D_TS_PROJECTION)); - if (!isStateDirty(context, STATE_RENDER(WINED3D_RS_POINTSCALEENABLE))) + if (!isStateDirty(context, STATE_RENDER(WINED3D_RS_POINTSCALEENABLE)) + && state->render_states[WINED3D_RS_POINTSCALEENABLE]) state_pscale(context, state, STATE_RENDER(WINED3D_RS_POINTSCALEENABLE)); /* Update the position fixup. */ context->load_constants = 1; diff -Nru wine1.6-1.7.1-actually1.6/dlls/wined3d/surface.c wine1.6-1.6.1/dlls/wined3d/surface.c --- wine1.6-1.7.1-actually1.6/dlls/wined3d/surface.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/wined3d/surface.c 2013-11-15 19:30:24.000000000 +0000 @@ -4065,13 +4065,6 @@ return WINEDDERR_NOTFLIPPABLE; } - /* Flipping is only supported on render targets and overlays. */ - if (!(surface->resource.usage & (WINED3DUSAGE_RENDERTARGET | WINED3DUSAGE_OVERLAY))) - { - WARN("Tried to flip a non-render target, non-overlay surface.\n"); - return WINEDDERR_NOTFLIPPABLE; - } - flip_surface(surface, override); /* Update overlays if they're visible. */ diff -Nru wine1.6-1.7.1-actually1.6/dlls/wined3d/swapchain.c wine1.6-1.6.1/dlls/wined3d/swapchain.c --- wine1.6-1.7.1-actually1.6/dlls/wined3d/swapchain.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/wined3d/swapchain.c 2013-11-15 19:30:24.000000000 +0000 @@ -30,7 +30,6 @@ /* Do not call while under the GL lock. */ static void swapchain_cleanup(struct wined3d_swapchain *swapchain) { - struct wined3d_display_mode mode; HRESULT hr; UINT i; @@ -76,13 +75,8 @@ * orig_height will be equal to the modes in the presentation params. */ if (!swapchain->desc.windowed && swapchain->desc.auto_restore_display_mode) { - mode.width = swapchain->orig_width; - mode.height = swapchain->orig_height; - mode.refresh_rate = 0; - mode.format_id = swapchain->orig_fmt; - mode.scanline_ordering = WINED3D_SCANLINE_ORDERING_UNKNOWN; if (FAILED(hr = wined3d_set_adapter_display_mode(swapchain->device->wined3d, - swapchain->device->adapter->ordinal, &mode))) + swapchain->device->adapter->ordinal, &swapchain->original_mode))) ERR("Failed to restore display mode, hr %#x.\n", hr); } @@ -818,8 +812,6 @@ { const struct wined3d_adapter *adapter = device->adapter; struct wined3d_resource_desc surface_desc; - const struct wined3d_format *format; - struct wined3d_display_mode mode; BOOL displaymode_set = FALSE; RECT client_rect; HWND window; @@ -853,11 +845,12 @@ swapchain->win_handle = window; swapchain->device_window = window; - wined3d_get_adapter_display_mode(device->wined3d, adapter->ordinal, &mode, NULL); - swapchain->orig_width = mode.width; - swapchain->orig_height = mode.height; - swapchain->orig_fmt = mode.format_id; - format = wined3d_get_format(&adapter->gl_info, mode.format_id); + if (FAILED(hr = wined3d_get_adapter_display_mode(device->wined3d, + adapter->ordinal, &swapchain->original_mode, NULL))) + { + ERR("Failed to get current display mode, hr %#x.\n", hr); + goto err; + } GetClientRect(window, &client_rect); if (desc->windowed @@ -879,8 +872,8 @@ if (desc->backbuffer_format == WINED3DFMT_UNKNOWN) { - desc->backbuffer_format = swapchain->orig_fmt; - TRACE("Updating format to %s.\n", debug_d3dformat(swapchain->orig_fmt)); + desc->backbuffer_format = swapchain->original_mode.format_id; + TRACE("Updating format to %s.\n", debug_d3dformat(swapchain->original_mode.format_id)); } } swapchain->desc = *desc; @@ -925,7 +918,7 @@ mode.refresh_rate = desc->refresh_rate; mode.scanline_ordering = WINED3D_SCANLINE_ORDERING_UNKNOWN; - if (FAILED(hr = wined3d_set_adapter_display_mode(device->wined3d, device->adapter->ordinal, &mode))) + if (FAILED(hr = wined3d_set_adapter_display_mode(device->wined3d, adapter->ordinal, &mode))) { WARN("Failed to set display mode, hr %#x.\n", hr); goto err; @@ -944,7 +937,7 @@ WINED3DFMT_S1_UINT_D15_UNORM }; - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + const struct wined3d_gl_info *gl_info = &adapter->gl_info; swapchain->context = HeapAlloc(GetProcessHeap(), 0, sizeof(*swapchain->context)); if (!swapchain->context) @@ -1040,18 +1033,10 @@ err: if (displaymode_set) { - DEVMODEW devmode; - + if (FAILED(wined3d_set_adapter_display_mode(device->wined3d, + adapter->ordinal, &swapchain->original_mode))) + ERR("Failed to restore display mode.\n"); ClipCursor(NULL); - - /* Change the display settings */ - memset(&devmode, 0, sizeof(devmode)); - devmode.dmSize = sizeof(devmode); - devmode.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT; - devmode.dmBitsPerPel = format->byte_count * CHAR_BIT; - devmode.dmPelsWidth = swapchain->orig_width; - devmode.dmPelsHeight = swapchain->orig_height; - ChangeDisplaySettingsExW(adapter->DeviceName, &devmode, NULL, CDS_FULLSCREEN, NULL); } if (swapchain->back_buffers) diff -Nru wine1.6-1.7.1-actually1.6/dlls/wined3d/utils.c wine1.6-1.6.1/dlls/wined3d/utils.c --- wine1.6-1.7.1-actually1.6/dlls/wined3d/utils.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/wined3d/utils.c 2013-11-15 19:30:24.000000000 +0000 @@ -27,6 +27,8 @@ #include "config.h" #include "wine/port.h" +#include + #include "wined3d_private.h" WINE_DEFAULT_DEBUG_CHANNEL(d3d); @@ -837,10 +839,18 @@ | WINED3DFMT_FLAG_BUMPMAP, NV_TEXTURE_SHADER, NULL}, /* Depth stencil formats */ + {WINED3DFMT_D16_LOCKABLE, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT, 0, + GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, 0, + WINED3DFMT_FLAG_DEPTH, + WINED3D_GL_EXT_NONE, NULL}, {WINED3DFMT_D16_LOCKABLE, GL_DEPTH_COMPONENT24_ARB, GL_DEPTH_COMPONENT24_ARB, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, 0, WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_SHADOW, ARB_DEPTH_TEXTURE, NULL}, + {WINED3DFMT_D32_UNORM, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT, 0, + GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, 0, + WINED3DFMT_FLAG_DEPTH, + WINED3D_GL_EXT_NONE, NULL}, {WINED3DFMT_D32_UNORM, GL_DEPTH_COMPONENT32_ARB, GL_DEPTH_COMPONENT32_ARB, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, 0, WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_SHADOW, @@ -872,6 +882,10 @@ WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL | WINED3DFMT_FLAG_SHADOW, ARB_FRAMEBUFFER_OBJECT, NULL}, + {WINED3DFMT_X8D24_UNORM, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT, 0, + GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, 0, + WINED3DFMT_FLAG_DEPTH, + WINED3D_GL_EXT_NONE, NULL}, {WINED3DFMT_X8D24_UNORM, GL_DEPTH_COMPONENT24_ARB, GL_DEPTH_COMPONENT24_ARB, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, 0, WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING @@ -889,6 +903,10 @@ GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, 4, WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL | WINED3DFMT_FLAG_SHADOW, ARB_FRAMEBUFFER_OBJECT, convert_s4x4_uint_d24_unorm}, + {WINED3DFMT_D16_UNORM, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT, 0, + GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, 0, + WINED3DFMT_FLAG_DEPTH, + WINED3D_GL_EXT_NONE, NULL}, {WINED3DFMT_D16_UNORM, GL_DEPTH_COMPONENT24_ARB, GL_DEPTH_COMPONENT24_ARB, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, 0, WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING @@ -3614,10 +3632,19 @@ & WINED3D_FFP_LIGHT_TYPE_MASK) << WINED3D_FFP_LIGHT_TYPE_SHIFT(i); } + settings->ortho_fog = 0; if (!state->render_states[WINED3D_RS_FOGENABLE]) settings->fog_mode = WINED3D_FFP_VS_FOG_OFF; else if (state->render_states[WINED3D_RS_FOGTABLEMODE] != WINED3D_FOG_NONE) + { settings->fog_mode = WINED3D_FFP_VS_FOG_DEPTH; + + if (state->transforms[WINED3D_TS_PROJECTION].u.m[0][3] == 0.0f + && state->transforms[WINED3D_TS_PROJECTION].u.m[1][3] == 0.0f + && state->transforms[WINED3D_TS_PROJECTION].u.m[2][3] == 0.0f + && state->transforms[WINED3D_TS_PROJECTION].u.m[3][3] == 1.0f) + settings->ortho_fog = 1; + } else if (state->render_states[WINED3D_RS_FOGVERTEXMODE] == WINED3D_FOG_NONE) settings->fog_mode = WINED3D_FFP_VS_FOG_FOGCOORD; else if (state->render_states[WINED3D_RS_RANGEFOGENABLE]) @@ -3703,3 +3730,50 @@ if (state->render_states[WINED3D_RS_SCISSORTESTENABLE]) IntersectRect(rect, rect, &state->scissor_rect); } + +/* This should be equivalent to using the %.8e format specifier, but always + * using '.' as decimal separator. This doesn't handle +/-INF or NAN, since + * the GLSL and ARB parsers wouldn't be able to handle those anyway. */ +void wined3d_ftoa(float value, char *s) +{ + int x, frac, exponent; + const char *sign = ""; + double d; + + d = value; + if (copysignf(1.0f, value) < 0.0f) + { + d = -d; + sign = "-"; + } + + if (d == 0.0f) + { + x = 0; + frac = 0; + exponent = 0; + } + else + { + double t, diff; + + exponent = floorf(log10f(d)); + d /= pow(10.0, exponent); + + x = d; + t = (d - x) * 100000000; + frac = t; + diff = t - frac; + + if ((diff > 0.5) || (diff == 0.5 && (frac & 1))) + { + if (++frac >= 100000000) + { + frac = 0; + ++x; + } + } + } + + sprintf(s, "%s%d.%08de%+03d", sign, x, frac, exponent); +} diff -Nru wine1.6-1.7.1-actually1.6/dlls/wined3d/wined3d_private.h wine1.6-1.6.1/dlls/wined3d/wined3d_private.h --- wine1.6-1.7.1-actually1.6/dlls/wined3d/wined3d_private.h 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/wined3d/wined3d_private.h 2013-11-15 19:30:24.000000000 +0000 @@ -1462,11 +1462,13 @@ CARD_NVIDIA_GEFORCE_GTX650 = 0x0fc6, CARD_NVIDIA_GEFORCE_GTX650TI = 0x11c6, CARD_NVIDIA_GEFORCE_GTX660 = 0x11c0, + CARD_NVIDIA_GEFORCE_GTX660M = 0x0fd4, CARD_NVIDIA_GEFORCE_GTX660TI = 0x1183, CARD_NVIDIA_GEFORCE_GTX670 = 0x1189, CARD_NVIDIA_GEFORCE_GTX670MX = 0x11a1, CARD_NVIDIA_GEFORCE_GTX680 = 0x1180, CARD_NVIDIA_GEFORCE_GTX770M = 0x11e0, + CARD_NVIDIA_GEFORCE_GTX770 = 0x1184, CARD_INTEL_830M = 0x3577, CARD_INTEL_855GM = 0x3582, @@ -1705,6 +1707,10 @@ const struct ffp_frag_settings *settings) DECLSPEC_HIDDEN; void add_ffp_frag_shader(struct wine_rb_tree *shaders, struct ffp_frag_desc *desc) DECLSPEC_HIDDEN; void wined3d_get_draw_rect(const struct wined3d_state *state, RECT *rect) DECLSPEC_HIDDEN; +void wined3d_ftoa(float value, char *s) DECLSPEC_HIDDEN; + +extern const float wined3d_srgb_const0[] DECLSPEC_HIDDEN; +extern const float wined3d_srgb_const1[] DECLSPEC_HIDDEN; enum wined3d_ffp_vs_fog_mode { @@ -1737,7 +1743,8 @@ DWORD point_size : 1; DWORD fog_mode : 2; DWORD texcoords : 8; /* MAX_TEXTURES */ - DWORD padding : 15; + DWORD ortho_fog : 1; + DWORD padding : 14; BYTE texgen[MAX_TEXTURES]; }; @@ -2532,8 +2539,7 @@ struct wined3d_surface **back_buffers; struct wined3d_surface *front_buffer; struct wined3d_swapchain_desc desc; - DWORD orig_width, orig_height; - enum wined3d_format_id orig_fmt; + struct wined3d_display_mode original_mode; struct wined3d_gamma_ramp orig_gamma; BOOL render_to_fbo; const struct wined3d_format *ds_format; diff -Nru wine1.6-1.7.1-actually1.6/dlls/winemac.drv/clipboard.c wine1.6-1.6.1/dlls/winemac.drv/clipboard.c --- wine1.6-1.7.1-actually1.6/dlls/winemac.drv/clipboard.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/winemac.drv/clipboard.c 2013-11-15 19:30:24.000000000 +0000 @@ -82,14 +82,20 @@ static HANDLE import_utf8_to_oemtext(CFDataRef data); static HANDLE import_utf8_to_text(CFDataRef data); static HANDLE import_utf8_to_unicodetext(CFDataRef data); +static HANDLE import_utf16_to_oemtext(CFDataRef data); +static HANDLE import_utf16_to_text(CFDataRef data); +static HANDLE import_utf16_to_unicodetext(CFDataRef data); static CFDataRef export_clipboard_data(HANDLE data); static CFDataRef export_bitmap_to_bmp(HANDLE data); static CFDataRef export_dib_to_bmp(HANDLE data); static CFDataRef export_hdrop_to_filenames(HANDLE data); static CFDataRef export_oemtext_to_utf8(HANDLE data); +static CFDataRef export_oemtext_to_utf16(HANDLE data); static CFDataRef export_text_to_utf8(HANDLE data); +static CFDataRef export_text_to_utf16(HANDLE data); static CFDataRef export_unicodetext_to_utf8(HANDLE data); +static CFDataRef export_unicodetext_to_utf16(HANDLE data); /************************************************************************** @@ -180,6 +186,10 @@ { CF_TEXT, CFSTR("public.utf8-plain-text"), import_utf8_to_text, export_text_to_utf8, TRUE }, { CF_OEMTEXT, CFSTR("public.utf8-plain-text"), import_utf8_to_oemtext, export_oemtext_to_utf8, TRUE }, + { CF_UNICODETEXT, CFSTR("public.utf16-plain-text"), import_utf16_to_unicodetext, export_unicodetext_to_utf16,TRUE }, + { CF_TEXT, CFSTR("public.utf16-plain-text"), import_utf16_to_text, export_text_to_utf16, TRUE }, + { CF_OEMTEXT, CFSTR("public.utf16-plain-text"), import_utf16_to_oemtext, export_oemtext_to_utf16, TRUE }, + { CF_DIB, CFSTR("org.winehq.builtin.dib"), import_clipboard_data, export_clipboard_data, FALSE }, { CF_DIB, CFSTR("com.microsoft.bmp"), import_bmp_to_dib, export_dib_to_bmp, TRUE }, @@ -953,6 +963,78 @@ /************************************************************************** + * import_utf16_to_oemtext + * + * Import a UTF-16 string, converting the string to CF_OEMTEXT. + */ +static HANDLE import_utf16_to_oemtext(CFDataRef data) +{ + HANDLE unicode_handle = import_utf16_to_unicodetext(data); + HANDLE ret = convert_unicodetext_to_codepage(unicode_handle, CP_OEMCP); + + GlobalFree(unicode_handle); + return ret; +} + + +/************************************************************************** + * import_utf16_to_text + * + * Import a UTF-16 string, converting the string to CF_TEXT. + */ +static HANDLE import_utf16_to_text(CFDataRef data) +{ + HANDLE unicode_handle = import_utf16_to_unicodetext(data); + HANDLE ret = convert_unicodetext_to_codepage(unicode_handle, CP_ACP); + + GlobalFree(unicode_handle); + return ret; +} + + +/************************************************************************** + * import_utf16_to_unicodetext + * + * Import a UTF-8 string, converting the string to CF_UNICODETEXT. + */ +static HANDLE import_utf16_to_unicodetext(CFDataRef data) +{ + const WCHAR *src; + unsigned long data_len; + unsigned long new_lines = 0; + LPWSTR dst; + unsigned long i, j; + HANDLE unicode_handle; + + src = (const WCHAR *)CFDataGetBytePtr(data); + data_len = CFDataGetLength(data); + for (i = 0; i < data_len; i++) + { + if (src[i] == '\n') + new_lines++; + } + + if ((unicode_handle = GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE, (data_len + new_lines + 1) * sizeof(WCHAR)))) + { + dst = GlobalLock(unicode_handle); + + for (i = 0, j = 0; i < data_len; i++) + { + if (src[i] == '\n') + dst[j++] = '\r'; + + dst[j++] = src[i]; + } + dst[j] = 0; + + GlobalUnlock(unicode_handle); + } + + return unicode_handle; +} + + +/************************************************************************** * export_clipboard_data * * Generic export clipboard data routine. @@ -1020,6 +1102,30 @@ /************************************************************************** + * export_codepage_to_utf16 + * + * Export string data in a specified codepage to UTF-16. + */ +static CFDataRef export_codepage_to_utf16(HANDLE data, UINT cp) +{ + CFDataRef ret = NULL; + const char* str; + + if ((str = GlobalLock(data))) + { + HANDLE unicode = convert_text(str, GlobalSize(data), cp, -1); + + ret = export_unicodetext_to_utf16(unicode); + + GlobalFree(unicode); + GlobalUnlock(data); + } + + return ret; +} + + +/************************************************************************** * export_dib_to_bmp * * Export CF_DIB to BMP file format. This just entails prepending a BMP @@ -1162,6 +1268,17 @@ /************************************************************************** + * export_oemtext_to_utf16 + * + * Export CF_OEMTEXT to UTF-16. + */ +static CFDataRef export_oemtext_to_utf16(HANDLE data) +{ + return export_codepage_to_utf16(data, CP_OEMCP); +} + + +/************************************************************************** * export_text_to_utf8 * * Export CF_TEXT to UTF-8. @@ -1173,6 +1290,17 @@ /************************************************************************** + * export_text_to_utf16 + * + * Export CF_TEXT to UTF-16. + */ +static CFDataRef export_text_to_utf16(HANDLE data) +{ + return export_codepage_to_utf16(data, CP_ACP); +} + + +/************************************************************************** * export_unicodetext_to_utf8 * * Export CF_UNICODETEXT to UTF-8. @@ -1215,6 +1343,47 @@ /************************************************************************** + * export_unicodetext_to_utf16 + * + * Export CF_UNICODETEXT to UTF-16. + */ +static CFDataRef export_unicodetext_to_utf16(HANDLE data) +{ + CFMutableDataRef ret; + const WCHAR *src; + INT dst_len; + + src = GlobalLock(data); + if (!src) return NULL; + + dst_len = GlobalSize(data) / sizeof(WCHAR); + if (dst_len) dst_len--; /* Leave off null terminator. */ + ret = CFDataCreateMutable(NULL, dst_len); + if (ret) + { + LPWSTR dst; + int i, j; + + CFDataSetLength(ret, dst_len); + dst = (LPWSTR)CFDataGetMutableBytePtr(ret); + + /* Remove carriage returns */ + for (i = 0, j = 0; i < dst_len; i++) + { + if (src[i] == '\r' && + (i + 1 >= dst_len || src[i + 1] == '\n' || src[i + 1] == '\0')) + continue; + dst[j++] = src[i]; + } + CFDataSetLength(ret, j); + } + GlobalUnlock(data); + + return ret; +} + + +/************************************************************************** * get_clipboard_info */ static BOOL get_clipboard_info(LPCLIPBOARDINFO cbinfo) diff -Nru wine1.6-1.7.1-actually1.6/dlls/winemac.drv/cocoa_app.h wine1.6-1.6.1/dlls/winemac.drv/cocoa_app.h --- wine1.6-1.7.1-actually1.6/dlls/winemac.drv/cocoa_app.h 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/winemac.drv/cocoa_app.h 2013-11-15 19:30:24.000000000 +0000 @@ -67,6 +67,7 @@ NSUInteger unmatchedMouseDowns; NSMutableDictionary* originalDisplayModes; + NSMutableDictionary* latentDisplayModes; BOOL displaysCapturedForFullscreen; NSArray* cursorFrames; diff -Nru wine1.6-1.7.1-actually1.6/dlls/winemac.drv/cocoa_app.m wine1.6-1.6.1/dlls/winemac.drv/cocoa_app.m --- wine1.6-1.7.1-actually1.6/dlls/winemac.drv/cocoa_app.m 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/winemac.drv/cocoa_app.m 2013-11-15 19:30:24.000000000 +0000 @@ -149,11 +149,12 @@ keyWindows = [[NSMutableArray alloc] init]; originalDisplayModes = [[NSMutableDictionary alloc] init]; + latentDisplayModes = [[NSMutableDictionary alloc] init]; warpRecords = [[NSMutableArray alloc] init]; if (!requests || !requestsManipQueue || !eventQueues || !eventQueuesLock || - !keyWindows || !originalDisplayModes || !warpRecords) + !keyWindows || !originalDisplayModes || !latentDisplayModes || !warpRecords) { [self release]; return nil; @@ -176,6 +177,7 @@ [warpRecords release]; [cursorTimer release]; [cursorFrames release]; + [latentDisplayModes release]; [originalDisplayModes release]; [keyWindows release]; [eventQueues release]; @@ -237,6 +239,11 @@ submenu = [[[NSMenu alloc] initWithTitle:@"Window"] autorelease]; [submenu addItemWithTitle:@"Minimize" action:@selector(performMiniaturize:) keyEquivalent:@""]; [submenu addItemWithTitle:@"Zoom" action:@selector(performZoom:) keyEquivalent:@""]; + if ([NSWindow instancesRespondToSelector:@selector(toggleFullScreen:)]) + { + item = [submenu addItemWithTitle:@"Enter Full Screen" action:@selector(toggleFullScreen:) keyEquivalent:@"f"]; + [item setKeyEquivalentModifierMask:NSCommandKeyMask | NSAlternateKeyMask | NSControlKeyMask]; + } [submenu addItem:[NSMenuItem separatorItem]]; [submenu addItemWithTitle:@"Bring All to Front" action:@selector(arrangeInFront:) keyEquivalent:@""]; item = [[[NSMenuItem alloc] init] autorelease]; @@ -686,10 +693,14 @@ - (BOOL) setMode:(CGDisplayModeRef)mode forDisplay:(CGDirectDisplayID)displayID { BOOL ret = FALSE; + BOOL active = [NSApp isActive]; NSNumber* displayIDKey = [NSNumber numberWithUnsignedInt:displayID]; - CGDisplayModeRef currentMode, originalMode; + CGDisplayModeRef currentMode = NULL, originalMode; - currentMode = CGDisplayCopyDisplayMode(displayID); + if (!active) + currentMode = CGDisplayModeRetain((CGDisplayModeRef)[latentDisplayModes objectForKey:displayIDKey]); + if (!currentMode) + currentMode = CGDisplayCopyDisplayMode(displayID); if (!currentMode) // Invalid display ID return FALSE; @@ -714,34 +725,47 @@ { if ([originalDisplayModes count] == 1) // If this is the last changed display, do a blanket reset { - CGRestorePermanentDisplayConfiguration(); - if (!displaysCapturedForFullscreen) - CGReleaseAllDisplays(); + if (active) + { + CGRestorePermanentDisplayConfiguration(); + if (!displaysCapturedForFullscreen) + CGReleaseAllDisplays(); + } [originalDisplayModes removeAllObjects]; + [latentDisplayModes removeAllObjects]; ret = TRUE; } else // ... otherwise, try to restore just the one display { - if (CGDisplaySetDisplayMode(displayID, mode, NULL) == CGDisplayNoErr) + if (active) + ret = (CGDisplaySetDisplayMode(displayID, mode, NULL) == CGDisplayNoErr); + else { - [originalDisplayModes removeObjectForKey:displayIDKey]; + [latentDisplayModes removeObjectForKey:displayIDKey]; ret = TRUE; } + if (ret) + [originalDisplayModes removeObjectForKey:displayIDKey]; } } else { if ([originalDisplayModes count] || displaysCapturedForFullscreen || - CGCaptureAllDisplays() == CGDisplayNoErr) + !active || CGCaptureAllDisplays() == CGDisplayNoErr) { - if (CGDisplaySetDisplayMode(displayID, mode, NULL) == CGDisplayNoErr) + if (active) + ret = (CGDisplaySetDisplayMode(displayID, mode, NULL) == CGDisplayNoErr); + else { - [originalDisplayModes setObject:(id)originalMode forKey:displayIDKey]; + [latentDisplayModes setObject:(id)mode forKey:displayIDKey]; ret = TRUE; } + if (ret) + [originalDisplayModes setObject:(id)originalMode forKey:displayIDKey]; else if (![originalDisplayModes count]) { CGRestorePermanentDisplayConfiguration(); + [latentDisplayModes removeAllObjects]; if (!displaysCapturedForFullscreen) CGReleaseAllDisplays(); } @@ -878,7 +902,6 @@ } self.applicationIcon = nsimage; - [NSApp setApplicationIconImage:nsimage]; } - (void) handleCommandTab @@ -891,6 +914,14 @@ if ([originalDisplayModes count] || displaysCapturedForFullscreen) { + NSNumber* displayID; + for (displayID in originalDisplayModes) + { + CGDisplayModeRef mode = CGDisplayCopyDisplayMode([displayID unsignedIntValue]); + [latentDisplayModes setObject:(id)mode forKey:displayID]; + CGDisplayModeRelease(mode); + } + CGRestorePermanentDisplayConfiguration(); CGReleaseAllDisplays(); [originalDisplayModes removeAllObjects]; @@ -1480,8 +1511,52 @@ // respect to its siblings, but we want it to. We have to do it // manually. NSWindow* parent = [window parentWindow]; - [parent removeChildWindow:window]; - [parent addChildWindow:window ordered:NSWindowAbove]; + NSInteger level = [window level]; + __block BOOL needReorder = FALSE; + NSMutableArray* higherLevelSiblings = [NSMutableArray array]; + + // If the window is already the last child or if it's only below + // children with higher window level, then no need to reorder it. + [[parent childWindows] enumerateObjectsWithOptions:NSEnumerationReverse + usingBlock:^(id obj, NSUInteger idx, BOOL *stop){ + WineWindow* child = obj; + if (child == window) + *stop = TRUE; + else if ([child level] <= level) + { + needReorder = TRUE; + *stop = TRUE; + } + else + [higherLevelSiblings insertObject:child atIndex:0]; + }]; + + if (needReorder) + { + WineWindow* sibling; + + NSDisableScreenUpdates(); + + [parent removeChildWindow:window]; + for (sibling in higherLevelSiblings) + [parent removeChildWindow:sibling]; + + [parent addChildWindow:window ordered:NSWindowAbove]; + for (sibling in higherLevelSiblings) + { + // Setting a window as a child can reset its level to be + // the same as the parent, so save it and restore it. + // The call to -setLevel: puts the window at the front + // of its level but testing shows that that's what Cocoa + // does when you click on any window in an ownership + // hierarchy, anyway. + level = [sibling level]; + [parent addChildWindow:sibling ordered:NSWindowAbove]; + [sibling setLevel:level]; + } + + NSEnableScreenUpdates(); + } } } @@ -1506,7 +1581,7 @@ // Test if the click was in the window's content area. NSPoint nspoint = [self flippedMouseLocation:NSPointFromCGPoint(pt)]; NSRect contentRect = [window contentRectForFrameRect:[window frame]]; - process = NSPointInRect(nspoint, contentRect); + process = NSMouseInRect(nspoint, contentRect, NO); if (process && [window styleMask] & NSResizableWindowMask) { // Ignore clicks in the grow box (resize widget). @@ -1529,7 +1604,7 @@ NSMinY(contentRect), bounds.size.width, bounds.size.height); - process = !NSPointInRect(nspoint, growBox); + process = !NSMouseInRect(nspoint, growBox, NO); } } } @@ -1559,8 +1634,12 @@ macdrv_release_event(event); } - else if (broughtWindowForward && ![window isKeyWindow]) - [self windowGotFocus:window]; + else if (broughtWindowForward) + { + [[window ancestorWineWindow] postBroughtForwardEvent]; + if (![window isKeyWindow]) + [self windowGotFocus:window]; + } } // Since mouse button events deliver absolute cursor position, the @@ -1599,7 +1678,7 @@ // Only process the event if it was in the window's content area. NSPoint nspoint = [self flippedMouseLocation:NSPointFromCGPoint(pt)]; NSRect contentRect = [window contentRectForFrameRect:[window frame]]; - process = NSPointInRect(nspoint, contentRect); + process = NSMouseInRect(nspoint, contentRect, NO); } if (process) @@ -1843,18 +1922,9 @@ } } - - /* - * ---------- NSApplicationDelegate methods ---------- - */ - - (void)applicationDidBecomeActive:(NSNotification *)notification + - (void) unminimizeWindowIfNoneVisible { - [self activateCursorClipping]; - - [self updateFullscreenWindows]; - [self adjustWindowLevels:YES]; - - if (beenActive && ![self frontWineWindow]) + if (![self frontWineWindow]) { for (WineWindow* window in [NSApp windows]) { @@ -1865,6 +1935,30 @@ } } } + } + + + /* + * ---------- NSApplicationDelegate methods ---------- + */ + - (void)applicationDidBecomeActive:(NSNotification *)notification + { + NSNumber* displayID; + + for (displayID in latentDisplayModes) + { + CGDisplayModeRef mode = (CGDisplayModeRef)[latentDisplayModes objectForKey:displayID]; + [self setMode:mode forDisplay:[displayID unsignedIntValue]]; + } + [latentDisplayModes removeAllObjects]; + + [self activateCursorClipping]; + + [self updateFullscreenWindows]; + [self adjustWindowLevels:YES]; + + if (beenActive) + [self unminimizeWindowIfNoneVisible]; beenActive = TRUE; // If a Wine process terminates abruptly while it has the display captured @@ -1916,6 +2010,14 @@ [self releaseMouseCapture]; } + - (BOOL) applicationShouldHandleReopen:(NSApplication*)theApplication hasVisibleWindows:(BOOL)flag + { + // Note that "flag" is often wrong. WineWindows are NSPanels and NSPanels + // don't count as "visible windows" for this purpose. + [self unminimizeWindowIfNoneVisible]; + return YES; + } + - (NSApplicationTerminateReply) applicationShouldTerminate:(NSApplication *)sender { NSApplicationTerminateReply ret = NSTerminateNow; diff -Nru wine1.6-1.7.1-actually1.6/dlls/winemac.drv/cocoa_status_item.m wine1.6-1.6.1/dlls/winemac.drv/cocoa_status_item.m --- wine1.6-1.7.1-actually1.6/dlls/winemac.drv/cocoa_status_item.m 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/winemac.drv/cocoa_status_item.m 2013-11-15 19:30:24.000000000 +0000 @@ -24,34 +24,44 @@ #import "cocoa_event.h" -@interface WineStatusItem : NSObject +@interface WineStatusItem : NSView { NSStatusItem* item; WineEventQueue* queue; + NSTrackingArea* trackingArea; + NSImage* image; } @property (retain, nonatomic) NSStatusItem* item; @property (assign, nonatomic) WineEventQueue* queue; +@property (retain, nonatomic) NSImage* image; @end @implementation WineStatusItem -@synthesize item, queue; +@synthesize item, queue, image; - (id) initWithEventQueue:(WineEventQueue*)inQueue { - self = [super init]; + NSStatusBar* statusBar = [NSStatusBar systemStatusBar]; + CGFloat thickness = [statusBar thickness]; + + self = [super initWithFrame:NSMakeRect(0, 0, thickness, thickness)]; if (self) { - NSStatusBar* statusBar = [NSStatusBar systemStatusBar]; item = [[statusBar statusItemWithLength:NSSquareStatusItemLength] retain]; - [item setTarget:self]; - [item setAction:@selector(clicked:)]; - [item setDoubleAction:@selector(doubleClicked:)]; + // This is a retain cycle which is broken in -removeFromStatusBar. + [item setView:self]; queue = inQueue; + + trackingArea = [[NSTrackingArea alloc] initWithRect:[self bounds] + options:NSTrackingMouseMoved | NSTrackingActiveAlways | NSTrackingInVisibleRect + owner:self + userInfo:nil]; + [self addTrackingArea:trackingArea]; } return self; } @@ -64,37 +74,129 @@ [statusBar removeStatusItem:item]; [item release]; } + [image release]; + [trackingArea release]; [super dealloc]; } + - (void) setImage:(NSImage*)inImage + { + if (image != inImage) + { + [image release]; + image = [inImage retain]; + [self setNeedsDisplay:YES]; + } + } + - (void) removeFromStatusBar { if (item) { NSStatusBar* statusBar = [NSStatusBar systemStatusBar]; [statusBar removeStatusItem:item]; + [item setView:nil]; self.item = nil; } } - - (void) postClickedEventWithCount:(int)count + - (void) postMouseButtonEvent:(NSEvent*)nsevent; { macdrv_event* event; - event = macdrv_create_event(STATUS_ITEM_CLICKED, nil); - event->status_item_clicked.item = (macdrv_status_item)self; - event->status_item_clicked.count = count; + NSUInteger typeMask = NSEventMaskFromType([nsevent type]); + + event = macdrv_create_event(STATUS_ITEM_MOUSE_BUTTON, nil); + event->status_item_mouse_button.item = (macdrv_status_item)self; + event->status_item_mouse_button.button = [nsevent buttonNumber]; + event->status_item_mouse_button.down = (typeMask & (NSLeftMouseDownMask | NSRightMouseDownMask | NSOtherMouseDownMask)) != 0; + event->status_item_mouse_button.count = [nsevent clickCount]; [queue postEvent:event]; macdrv_release_event(event); } - - (void) clicked:(id)sender + + /* + * ---------- NSView methods ---------- + */ + - (void) drawRect:(NSRect)rect + { + [item drawStatusBarBackgroundInRect:[self bounds] withHighlight:NO]; + + if (image) + { + NSSize imageSize = [image size]; + NSRect bounds = [self bounds]; + NSPoint imageOrigin = NSMakePoint(NSMidX(bounds) - imageSize.width / 2, + NSMidY(bounds) - imageSize.height / 2); + + imageOrigin = [self convertPointToBase:imageOrigin]; + imageOrigin.x = floor(imageOrigin.x); + imageOrigin.y = floor(imageOrigin.y); + imageOrigin = [self convertPointFromBase:imageOrigin]; + + [image drawAtPoint:imageOrigin + fromRect:NSZeroRect + operation:NSCompositeSourceOver + fraction:1]; + } + } + + + /* + * ---------- NSResponder methods ---------- + */ + - (void) mouseDown:(NSEvent*)event + { + [self postMouseButtonEvent:event]; + } + + - (void) mouseDragged:(NSEvent*)event + { + [self mouseMoved:event]; + } + + - (void) mouseMoved:(NSEvent*)nsevent + { + macdrv_event* event; + event = macdrv_create_event(STATUS_ITEM_MOUSE_MOVE, nil); + event->status_item_mouse_move.item = (macdrv_status_item)self; + [queue postEvent:event]; + macdrv_release_event(event); + } + + - (void) mouseUp:(NSEvent*)event + { + [self postMouseButtonEvent:event]; + } + + - (void) otherMouseDown:(NSEvent*)event + { + [self postMouseButtonEvent:event]; + } + + - (void) otherMouseDragged:(NSEvent*)event + { + [self mouseMoved:event]; + } + + - (void) otherMouseUp:(NSEvent*)event + { + [self postMouseButtonEvent:event]; + } + + - (void) rightMouseDown:(NSEvent*)event + { + [self postMouseButtonEvent:event]; + } + + - (void) rightMouseDragged:(NSEvent*)event { - [self postClickedEventWithCount:1]; + [self mouseMoved:event]; } - - (void) doubleClicked:(id)sender + - (void) rightMouseUp:(NSEvent*)event { - [self postClickedEventWithCount:2]; + [self postMouseButtonEvent:event]; } @end @@ -165,7 +267,7 @@ if (changed) [image setSize:size]; } - [statusItem.item setImage:image]; + statusItem.image = image; [image release]; }); } @@ -183,6 +285,6 @@ if (![tip length]) tip = nil; OnMainThreadAsync(^{ - [statusItem.item setToolTip:tip]; + [statusItem setToolTip:tip]; }); } diff -Nru wine1.6-1.7.1-actually1.6/dlls/winemac.drv/cocoa_window.h wine1.6-1.6.1/dlls/winemac.drv/cocoa_window.h --- wine1.6-1.7.1-actually1.6/dlls/winemac.drv/cocoa_window.h 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/winemac.drv/cocoa_window.h 2013-11-15 19:30:24.000000000 +0000 @@ -32,6 +32,7 @@ BOOL fullscreen; BOOL pendingMinimize; WineWindow* latentParentWindow; + NSMutableArray* latentChildWindows; void* hwnd; WineEventQueue* queue; @@ -54,8 +55,14 @@ void* imeData; BOOL commandDone; - BOOL causing_becomeKeyWindow; - BOOL ignore_windowMiniaturize; + NSSize savedContentMinSize; + NSSize savedContentMaxSize; + + BOOL enteringFullScreen; + BOOL exitingFullScreen; + NSRect nonFullscreenFrame; + NSTimeInterval enteredFullScreenTime; + BOOL ignore_windowDeminiaturize; } @@ -69,5 +76,8 @@ - (void) updateFullscreen; - (void) postKeyEvent:(NSEvent *)theEvent; + - (void) postBroughtForwardEvent; + + - (WineWindow*) ancestorWineWindow; @end diff -Nru wine1.6-1.7.1-actually1.6/dlls/winemac.drv/cocoa_window.m wine1.6-1.6.1/dlls/winemac.drv/cocoa_window.m --- wine1.6-1.7.1-actually1.6/dlls/winemac.drv/cocoa_window.m 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/winemac.drv/cocoa_window.m 2013-11-15 19:30:24.000000000 +0000 @@ -28,6 +28,20 @@ #import "cocoa_opengl.h" +#if !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 +enum { + NSWindowCollectionBehaviorFullScreenPrimary = 1 << 7, + NSWindowCollectionBehaviorFullScreenAuxiliary = 1 << 8, + NSWindowFullScreenButton = 7, + NSFullScreenWindowMask = 1 << 14, +}; + +@interface NSWindow (WineFullScreenExtensions) + - (void) toggleFullScreen:(id)sender; +@end +#endif + + /* Additional Mac virtual keycode, to complement those in Carbon's . */ enum { kVK_RightCommand = 0x36, /* Invented for Wine; was unused */ @@ -117,6 +131,24 @@ *modifiers &= ~NX_ALTERNATEMASK; } +static inline NSUInteger adjusted_modifiers_for_option_behavior(NSUInteger modifiers) +{ + fix_device_modifiers_by_generic(&modifiers); + if (left_option_is_alt && (modifiers & NX_DEVICELALTKEYMASK)) + { + modifiers |= NX_DEVICELCMDKEYMASK; + modifiers &= ~NX_DEVICELALTKEYMASK; + } + if (right_option_is_alt && (modifiers & NX_DEVICERALTKEYMASK)) + { + modifiers |= NX_DEVICERCMDKEYMASK; + modifiers &= ~NX_DEVICERALTKEYMASK; + } + fix_generic_modifiers_by_device(&modifiers); + + return modifiers; +} + @interface WineContentView : NSView { @@ -158,8 +190,13 @@ @property (assign, nonatomic) void* imeData; @property (nonatomic) BOOL commandDone; +@property (retain, nonatomic) NSTimer* liveResizeDisplayTimer; + - (void) updateColorSpace; + - (BOOL) becameEligibleParentOrChild; + - (void) becameIneligibleChild; + @end @@ -459,12 +496,15 @@ @implementation WineWindow + static WineWindow* causing_becomeKeyWindow; + @synthesize disabled, noActivate, floating, fullscreen, latentParentWindow, hwnd, queue; @synthesize surface, surface_mutex; @synthesize shape, shapeChangedSinceLastDraw; @synthesize colorKeyed, colorKeyRed, colorKeyGreen, colorKeyBlue; @synthesize usePerPixelAlpha; @synthesize imeData, commandDone; + @synthesize liveResizeDisplayTimer; + (WineWindow*) createWindowWithFeatures:(const struct macdrv_window_features*)wf windowFrame:(NSRect)window_frame @@ -497,6 +537,8 @@ [window setDelegate:window]; window.hwnd = hwnd; window.queue = queue; + window->savedContentMinSize = NSZeroSize; + window->savedContentMaxSize = NSMakeSize(FLT_MAX, FLT_MAX); [window registerForDraggedTypes:[NSArray arrayWithObjects:(NSString*)kUTTypeData, (NSString*)kUTTypeContent, @@ -537,6 +579,7 @@ [liveResizeDisplayTimer invalidate]; [liveResizeDisplayTimer release]; [queue release]; + [latentChildWindows release]; [latentParentWindow release]; [shape release]; [super dealloc]; @@ -552,12 +595,47 @@ [[self standardWindowButton:NSWindowMiniaturizeButton] setEnabled:!self.disabled]; if (style & NSResizableWindowMask) [[self standardWindowButton:NSWindowZoomButton] setEnabled:!self.disabled]; + if ([self respondsToSelector:@selector(toggleFullScreen:)]) + { + if ([self collectionBehavior] & NSWindowCollectionBehaviorFullScreenPrimary) + [[self standardWindowButton:NSWindowFullScreenButton] setEnabled:!self.disabled]; + } + } + + - (void) adjustFullScreenBehavior:(NSWindowCollectionBehavior)behavior + { + if ([self respondsToSelector:@selector(toggleFullScreen:)]) + { + NSUInteger style = [self styleMask]; + + if (behavior & NSWindowCollectionBehaviorParticipatesInCycle && + style & NSResizableWindowMask && !(style & NSUtilityWindowMask)) + { + behavior |= NSWindowCollectionBehaviorFullScreenPrimary; + behavior &= ~NSWindowCollectionBehaviorFullScreenAuxiliary; + } + else + { + behavior &= ~NSWindowCollectionBehaviorFullScreenPrimary; + behavior |= NSWindowCollectionBehaviorFullScreenAuxiliary; + if (style & NSFullScreenWindowMask) + [self toggleFullScreen:nil]; + } + } + + if (behavior != [self collectionBehavior]) + { + [self setCollectionBehavior:behavior]; + [self adjustFeaturesForState]; + } } - (void) setWindowFeatures:(const struct macdrv_window_features*)wf { + static const NSUInteger usedStyles = NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | + NSResizableWindowMask | NSUtilityWindowMask | NSBorderlessWindowMask; NSUInteger currentStyle = [self styleMask]; - NSUInteger newStyle = style_mask_for_features(wf); + NSUInteger newStyle = style_mask_for_features(wf) | (currentStyle & ~usedStyles); if (newStyle != currentStyle) { @@ -573,6 +651,7 @@ [self setStyleMask:newStyle ^ NSClosableWindowMask]; } [self setStyleMask:newStyle]; + [self adjustFullScreenBehavior:[self collectionBehavior]]; } [self adjustFeaturesForState]; @@ -615,6 +694,19 @@ return level; } + - (void) postDidUnminimizeEvent + { + macdrv_event* event; + + /* Coalesce events by discarding any previous ones still in the queue. */ + [queue discardEventsMatchingMask:event_mask_for_type(WINDOW_DID_UNMINIMIZE) + forWindow:self]; + + event = macdrv_create_event(WINDOW_DID_UNMINIMIZE, self); + [queue postEvent:event]; + macdrv_release_event(event); + } + - (void) setMacDrvState:(const struct macdrv_window_state*)state { NSWindowCollectionBehavior behavior; @@ -625,6 +717,31 @@ if (self.floating != state->floating) { self.floating = state->floating; + if (state->floating) + { + // Became floating. If child of non-floating window, make that + // relationship latent. + WineWindow* parent = (WineWindow*)[self parentWindow]; + if (parent && !parent.floating) + [self becameIneligibleChild]; + } + else + { + // Became non-floating. If parent of floating children, make that + // relationship latent. + WineWindow* child; + for (child in [[[self childWindows] copy] autorelease]) + { + if (child.floating) + [child becameIneligibleChild]; + } + } + + // Check our latent relationships. If floating status was the only + // reason they were latent, then make them active. + if ([self isVisible]) + [self becameEligibleParentOrChild]; + [[WineApplicationController sharedController] adjustWindowLevels]; } @@ -645,29 +762,164 @@ if ([self isOrderedIn]) [NSApp addWindowsItem:self title:[self title] filename:NO]; } - [self setCollectionBehavior:behavior]; + [self adjustFullScreenBehavior:behavior]; - pendingMinimize = FALSE; - if (state->minimized && ![self isMiniaturized]) + if (state->minimized_valid) { - if ([self isVisible]) + BOOL discardUnminimize = TRUE; + + pendingMinimize = FALSE; + if (state->minimized && ![self isMiniaturized]) { - ignore_windowMiniaturize = TRUE; - [self miniaturize:nil]; + if ([self isVisible]) + { + if ([self styleMask] & NSFullScreenWindowMask) + { + [self postDidUnminimizeEvent]; + discardUnminimize = FALSE; + } + else + [super miniaturize:nil]; + } + else + pendingMinimize = TRUE; + } + else if (!state->minimized && [self isMiniaturized]) + { + ignore_windowDeminiaturize = TRUE; + [self deminiaturize:nil]; + } + + if (discardUnminimize) + { + /* Whatever events regarding minimization might have been in the queue are now stale. */ + [queue discardEventsMatchingMask:event_mask_for_type(WINDOW_DID_UNMINIMIZE) + forWindow:self]; } - else - pendingMinimize = TRUE; } - else if (!state->minimized && [self isMiniaturized]) + } + + - (BOOL) addChildWineWindow:(WineWindow*)child assumeVisible:(BOOL)assumeVisible + { + BOOL reordered = FALSE; + + if ([self isVisible] && (assumeVisible || [child isVisible]) && (self.floating || !child.floating)) { - ignore_windowDeminiaturize = TRUE; - [self deminiaturize:nil]; + if ([self level] > [child level]) + [child setLevel:[self level]]; + [self addChildWindow:child ordered:NSWindowAbove]; + [latentChildWindows removeObjectIdenticalTo:child]; + child.latentParentWindow = nil; + reordered = TRUE; + } + else + { + if (!latentChildWindows) + latentChildWindows = [[NSMutableArray alloc] init]; + if (![latentChildWindows containsObject:child]) + [latentChildWindows addObject:child]; + child.latentParentWindow = self; } - /* Whatever events regarding minimization might have been in the queue are now stale. */ - [queue discardEventsMatchingMask:event_mask_for_type(WINDOW_DID_MINIMIZE) | - event_mask_for_type(WINDOW_DID_UNMINIMIZE) - forWindow:self]; + return reordered; + } + + - (BOOL) addChildWineWindow:(WineWindow*)child + { + return [self addChildWineWindow:child assumeVisible:FALSE]; + } + + - (void) removeChildWineWindow:(WineWindow*)child + { + [self removeChildWindow:child]; + if (child.latentParentWindow == self) + child.latentParentWindow = nil; + [latentChildWindows removeObjectIdenticalTo:child]; + } + + - (BOOL) becameEligibleParentOrChild + { + BOOL reordered = FALSE; + NSUInteger count; + + if (latentParentWindow.floating || !self.floating) + { + // If we aren't visible currently, we assume that we should be and soon + // will be. So, if the latent parent is visible that's enough to assume + // we can establish the parent-child relationship in Cocoa. That will + // actually make us visible, which is fine. + if ([latentParentWindow addChildWineWindow:self assumeVisible:TRUE]) + reordered = TRUE; + } + + // Here, though, we may not actually be visible yet and adding a child + // won't make us visible. The caller will have to call this method + // again after actually making us visible. + if ([self isVisible] && (count = [latentChildWindows count])) + { + NSMutableIndexSet* indexesToRemove = [NSMutableIndexSet indexSet]; + NSUInteger i; + + for (i = 0; i < count; i++) + { + WineWindow* child = [latentChildWindows objectAtIndex:i]; + if ([child isVisible] && (self.floating || !child.floating)) + { + if (child.latentParentWindow == self) + { + if ([self level] > [child level]) + [child setLevel:[self level]]; + [self addChildWindow:child ordered:NSWindowAbove]; + child.latentParentWindow = nil; + reordered = TRUE; + } + else + ERR(@"shouldn't happen: %@ thinks %@ is a latent child, but it doesn't agree\n", self, child); + [indexesToRemove addIndex:i]; + } + } + + [latentChildWindows removeObjectsAtIndexes:indexesToRemove]; + } + + return reordered; + } + + - (void) becameIneligibleChild + { + WineWindow* parent = (WineWindow*)[self parentWindow]; + if (parent) + { + if (!parent->latentChildWindows) + parent->latentChildWindows = [[NSMutableArray alloc] init]; + [parent->latentChildWindows insertObject:self atIndex:0]; + self.latentParentWindow = parent; + [parent removeChildWindow:self]; + } + } + + - (void) becameIneligibleParentOrChild + { + NSArray* childWindows = [self childWindows]; + + [self becameIneligibleChild]; + + if ([childWindows count]) + { + WineWindow* child; + + childWindows = [[childWindows copy] autorelease]; + for (child in childWindows) + { + child.latentParentWindow = self; + [self removeChildWindow:child]; + } + + if (latentChildWindows) + [latentChildWindows replaceObjectsInRange:NSMakeRange(0, 0) withObjectsFromArray:childWindows]; + else + latentChildWindows = [childWindows mutableCopy]; + } } // Determine if, among Wine windows, this window is directly above or below @@ -723,7 +975,8 @@ { NSMutableArray* windowNumbers; NSNumber* childWindowNumber; - NSUInteger otherIndex; + NSUInteger otherIndex, limit; + NSArray* origChildren; NSMutableArray* children; // Get the z-order from the window server and modify it to reflect the @@ -736,7 +989,8 @@ // Get our child windows and sort them in the reverse of the desired // z-order (back-to-front). - children = [[[self childWindows] mutableCopy] autorelease]; + origChildren = [self childWindows]; + children = [[origChildren mutableCopy] autorelease]; [children sortWithOptions:NSSortStable usingComparator:^NSComparisonResult(id obj1, id obj2){ NSNumber* window1Number = [NSNumber numberWithInteger:[obj1 windowNumber]]; @@ -760,6 +1014,16 @@ return NSOrderedSame; }]; + // If the current and desired children arrays match up to a point, leave + // those matching children alone. + limit = MIN([origChildren count], [children count]); + for (otherIndex = 0; otherIndex < limit; otherIndex++) + { + if ([origChildren objectAtIndex:otherIndex] != [children objectAtIndex:otherIndex]) + break; + } + [children removeObjectsInRange:NSMakeRange(0, otherIndex)]; + // Remove all of the child windows and re-add them back-to-front so they // are in the desired order. for (other in children) @@ -786,14 +1050,9 @@ NSDisableScreenUpdates(); - if (latentParentWindow) - { - if ([latentParentWindow level] > [self level]) - [self setLevel:[latentParentWindow level]]; - [latentParentWindow addChildWindow:self ordered:NSWindowAbove]; - self.latentParentWindow = nil; + if ([self becameEligibleParentOrChild]) needAdjustWindowLevels = TRUE; - } + if (prev || next) { WineWindow* other = [prev isVisible] ? prev : next; @@ -831,6 +1090,10 @@ [self orderFront:nil]; needAdjustWindowLevels = TRUE; } + + if ([self becameEligibleParentOrChild]) + needAdjustWindowLevels = TRUE; + if (needAdjustWindowLevels) { if (!wasVisible && fullscreen && [self isOnActiveSpace]) @@ -840,8 +1103,7 @@ if (pendingMinimize) { - ignore_windowMiniaturize = TRUE; - [self miniaturize:nil]; + [super miniaturize:nil]; pendingMinimize = FALSE; } @@ -867,8 +1129,8 @@ if ([self isMiniaturized]) pendingMinimize = TRUE; - self.latentParentWindow = [self parentWindow]; - [latentParentWindow removeChildWindow:self]; + + [self becameIneligibleParentOrChild]; [self orderOut:nil]; if (wasVisible && wasOnActiveSpace && fullscreen) [controller updateFullscreenWindows]; @@ -879,7 +1141,7 @@ - (void) updateFullscreen { NSRect contentRect = [self contentRectForFrameRect:[self frame]]; - BOOL nowFullscreen = (screen_covered_by_rect(contentRect, [NSScreen screens]) != nil); + BOOL nowFullscreen = !([self styleMask] & NSFullScreenWindowMask) && screen_covered_by_rect(contentRect, [NSScreen screens]); if (nowFullscreen != fullscreen) { @@ -933,6 +1195,10 @@ [self updateColorSpace]; } + if (!enteringFullScreen && + [[NSProcessInfo processInfo] systemUptime] - enteredFullScreenTime > 1.0) + nonFullscreenFrame = frame; + [self updateFullscreen]; if (on_screen) @@ -949,19 +1215,13 @@ - (void) setMacDrvParentWindow:(WineWindow*)parent { - if ([self parentWindow] != parent) + WineWindow* oldParent = (WineWindow*)[self parentWindow]; + if ((oldParent && oldParent != parent) || (!oldParent && latentParentWindow != parent)) { - [[self parentWindow] removeChildWindow:self]; - self.latentParentWindow = nil; - if ([self isVisible] && parent) - { - if ([parent level] > [self level]) - [self setLevel:[parent level]]; - [parent addChildWindow:self ordered:NSWindowAbove]; + [oldParent removeChildWineWindow:self]; + [latentParentWindow removeChildWineWindow:self]; + if ([parent addChildWineWindow:self]) [[WineApplicationController sharedController] adjustWindowLevels]; - } - else - self.latentParentWindow = parent; } } @@ -974,14 +1234,14 @@ if (disabled) { - NSSize size = [self frame].size; - [self setMinSize:size]; - [self setMaxSize:size]; + NSSize size = [self contentRectForFrameRect:[self frame]].size; + [self setContentMinSize:size]; + [self setContentMaxSize:size]; } else { - [self setMaxSize:NSMakeSize(FLT_MAX, FLT_MAX)]; - [self setMinSize:NSZeroSize]; + [self setContentMaxSize:savedContentMaxSize]; + [self setContentMinSize:savedContentMinSize]; } } } @@ -1024,69 +1284,23 @@ [self checkTransparency]; } - - (void) makeFocused:(BOOL)activate + - (void) setLiveResizeDisplayTimer:(NSTimer*)newTimer { - WineApplicationController* controller = [WineApplicationController sharedController]; - NSArray* screens; - WineWindow* front; - BOOL wasVisible = [self isVisible]; - - [controller transformProcessToForeground]; - - /* If a borderless window is offscreen, orderFront: won't move - it onscreen like it would for a titled window. Do that ourselves. */ - screens = [NSScreen screens]; - if (!([self styleMask] & NSTitledWindowMask) && ![self isOrderedIn] && - !frame_intersects_screens([self frame], screens)) - { - NSScreen* primaryScreen = [screens objectAtIndex:0]; - NSRect frame = [primaryScreen frame]; - [self setFrameTopLeftPoint:NSMakePoint(NSMinX(frame), NSMaxY(frame))]; - frame = [self constrainFrameRect:[self frame] toScreen:primaryScreen]; - [self setFrame:frame display:YES]; - [self updateColorSpace]; - } - - if (activate) - [NSApp activateIgnoringOtherApps:YES]; - - NSDisableScreenUpdates(); - - if (latentParentWindow) - { - if ([latentParentWindow level] > [self level]) - [self setLevel:[latentParentWindow level]]; - [latentParentWindow addChildWindow:self ordered:NSWindowAbove]; - self.latentParentWindow = nil; - } - front = [controller frontWineWindow]; - if (front && [self level] < [front level]) - [self setLevel:[front level]]; - [self orderFront:nil]; - if (!wasVisible && fullscreen && [self isOnActiveSpace]) - [controller updateFullscreenWindows]; - [controller adjustWindowLevels]; - - if (pendingMinimize) + if (newTimer != liveResizeDisplayTimer) { - ignore_windowMiniaturize = TRUE; - [self miniaturize:nil]; - pendingMinimize = FALSE; + [liveResizeDisplayTimer invalidate]; + [liveResizeDisplayTimer release]; + liveResizeDisplayTimer = [newTimer retain]; } + } - NSEnableScreenUpdates(); + - (void) makeFocused:(BOOL)activate + { + [self orderBelow:nil orAbove:nil activate:activate]; - causing_becomeKeyWindow = TRUE; + causing_becomeKeyWindow = self; [self makeKeyWindow]; - causing_becomeKeyWindow = FALSE; - - if (![self isExcludedFromWindowsMenu]) - [NSApp addWindowsItem:self title:[self title] filename:NO]; - - /* Cocoa may adjust the frame when the window is ordered onto the screen. - Generate a frame-changed event just in case. The back end will ignore - it if nothing actually changed. */ - [self windowDidResize:nil]; + causing_becomeKeyWindow = nil; } - (void) postKey:(uint16_t)keyCode @@ -1126,17 +1340,49 @@ [self flagsChanged:theEvent]; [self postKey:[theEvent keyCode] pressed:[theEvent type] == NSKeyDown - modifiers:[theEvent modifierFlags] + modifiers:adjusted_modifiers_for_option_behavior([theEvent modifierFlags]) event:theEvent]; } + - (void) setWineMinSize:(NSSize)minSize maxSize:(NSSize)maxSize + { + savedContentMinSize = minSize; + savedContentMaxSize = maxSize; + if (!self.disabled) + { + [self setContentMinSize:minSize]; + [self setContentMaxSize:maxSize]; + } + } + + - (WineWindow*) ancestorWineWindow + { + WineWindow* ancestor = self; + for (;;) + { + WineWindow* parent = (WineWindow*)[ancestor parentWindow]; + if ([parent isKindOfClass:[WineWindow class]]) + ancestor = parent; + else + break; + } + return ancestor; + } + + - (void) postBroughtForwardEvent + { + macdrv_event* event = macdrv_create_event(WINDOW_BROUGHT_FORWARD, self); + [queue postEvent:event]; + macdrv_release_event(event); + } + /* * ---------- NSWindow method overrides ---------- */ - (BOOL) canBecomeKeyWindow { - if (causing_becomeKeyWindow) return YES; + if (causing_becomeKeyWindow == self) return YES; if (self.disabled || self.noActivate) return NO; return [self isKeyWindow]; } @@ -1168,6 +1414,8 @@ if ([menuItem action] == @selector(makeKeyAndOrderFront:)) ret = [self isKeyWindow] || (!self.disabled && !self.noActivate); + if ([menuItem action] == @selector(toggleFullScreen:) && self.disabled) + ret = NO; return ret; } @@ -1175,26 +1423,13 @@ /* We don't call this. It's the action method of the items in the Window menu. */ - (void) makeKeyAndOrderFront:(id)sender { - WineApplicationController* controller = [WineApplicationController sharedController]; - WineWindow* front = [controller frontWineWindow]; - BOOL wasVisible = [self isVisible]; + if ([self isMiniaturized]) + [self deminiaturize:nil]; + [self orderBelow:nil orAbove:nil activate:NO]; + [[self ancestorWineWindow] postBroughtForwardEvent]; if (![self isKeyWindow] && !self.disabled && !self.noActivate) - [controller windowGotFocus:self]; - - if (front && [self level] < [front level]) - [self setLevel:[front level]]; - [self orderFront:nil]; - if (!wasVisible && fullscreen && [self isOnActiveSpace]) - [controller updateFullscreenWindows]; - [controller adjustWindowLevels]; - - if (pendingMinimize) - { - ignore_windowMiniaturize = TRUE; - [self miniaturize:nil]; - pendingMinimize = FALSE; - } + [[WineApplicationController sharedController] windowGotFocus:self]; } - (void) sendEvent:(NSEvent*)event @@ -1209,6 +1444,19 @@ [super sendEvent:event]; } + - (void) miniaturize:(id)sender + { + macdrv_event* event = macdrv_create_event(WINDOW_MINIMIZE_REQUESTED, self); + [queue postEvent:event]; + macdrv_release_event(event); + } + + - (void) toggleFullScreen:(id)sender + { + if (!self.disabled) + [super toggleFullScreen:sender]; + } + // We normally use the generic/calibrated RGB color space for the window, // rather than the device color space, to avoid expensive color conversion // which slows down drawing. However, for windows displaying OpenGL, having @@ -1263,7 +1511,7 @@ { NX_DEVICERCMDKEYMASK, kVK_RightCommand }, }; - NSUInteger modifierFlags = [theEvent modifierFlags]; + NSUInteger modifierFlags = adjusted_modifiers_for_option_behavior([theEvent modifierFlags]); NSUInteger changed; int i, last_changed; @@ -1312,6 +1560,25 @@ /* * ---------- NSWindowDelegate methods ---------- */ + - (NSSize) window:(NSWindow*)window willUseFullScreenContentSize:(NSSize)proposedSize + { + macdrv_query* query; + NSSize size; + + query = macdrv_create_query(); + query->type = QUERY_MIN_MAX_INFO; + query->window = (macdrv_window)[self retain]; + [self.queue query:query timeout:0.5]; + macdrv_release_query(query); + + size = [self contentMaxSize]; + if (proposedSize.width < size.width) + size.width = proposedSize.width; + if (proposedSize.height < size.height) + size.height = proposedSize.height; + return size; + } + - (void)windowDidBecomeKey:(NSNotification *)notification { WineApplicationController* controller = [WineApplicationController sharedController]; @@ -1319,7 +1586,7 @@ if (event) [self flagsChanged:event]; - if (causing_becomeKeyWindow) return; + if (causing_becomeKeyWindow == self) return; [controller windowGotFocus:self]; } @@ -1329,30 +1596,23 @@ WineApplicationController* controller = [WineApplicationController sharedController]; if (!ignore_windowDeminiaturize) - { - macdrv_event* event; - - /* Coalesce events by discarding any previous ones still in the queue. */ - [queue discardEventsMatchingMask:event_mask_for_type(WINDOW_DID_MINIMIZE) | - event_mask_for_type(WINDOW_DID_UNMINIMIZE) - forWindow:self]; - - event = macdrv_create_event(WINDOW_DID_UNMINIMIZE, self); - [queue postEvent:event]; - macdrv_release_event(event); - } - + [self postDidUnminimizeEvent]; ignore_windowDeminiaturize = FALSE; + [self becameEligibleParentOrChild]; + if (fullscreen && [self isOnActiveSpace]) [controller updateFullscreenWindows]; [controller adjustWindowLevels]; + if (![self parentWindow]) + [self postBroughtForwardEvent]; + if (!self.disabled && !self.noActivate) { - causing_becomeKeyWindow = TRUE; + causing_becomeKeyWindow = self; [self makeKeyWindow]; - causing_becomeKeyWindow = FALSE; + causing_becomeKeyWindow = nil; [controller windowGotFocus:self]; } @@ -1361,9 +1621,39 @@ - (void) windowDidEndLiveResize:(NSNotification *)notification { - [liveResizeDisplayTimer invalidate]; - [liveResizeDisplayTimer release]; - liveResizeDisplayTimer = nil; + macdrv_query* query = macdrv_create_query(); + query->type = QUERY_RESIZE_END; + query->window = (macdrv_window)[self retain]; + + [self.queue query:query timeout:0.3]; + macdrv_release_query(query); + + self.liveResizeDisplayTimer = nil; + } + + - (void) windowDidEnterFullScreen:(NSNotification*)notification + { + enteringFullScreen = FALSE; + enteredFullScreenTime = [[NSProcessInfo processInfo] systemUptime]; + } + + - (void) windowDidExitFullScreen:(NSNotification*)notification + { + exitingFullScreen = FALSE; + [self setFrame:nonFullscreenFrame display:YES animate:NO]; + [self windowDidResize:nil]; + } + + - (void) windowDidFailToEnterFullScreen:(NSWindow*)window + { + enteringFullScreen = FALSE; + enteredFullScreenTime = 0; + } + + - (void) windowDidFailToExitFullScreen:(NSWindow*)window + { + exitingFullScreen = FALSE; + [self windowDidResize:nil]; } - (void)windowDidMiniaturize:(NSNotification *)notification @@ -1391,16 +1681,16 @@ - (void)windowDidResize:(NSNotification *)notification { macdrv_event* event; - NSRect frame = [self frame]; + NSRect frame = [self contentRectForFrameRect:[self frame]]; + + if (exitingFullScreen) return; if (self.disabled) { - NSSize size = frame.size; - [self setMinSize:size]; - [self setMaxSize:size]; + [self setContentMinSize:frame.size]; + [self setContentMaxSize:frame.size]; } - frame = [self contentRectForFrameRect:frame]; [[WineApplicationController sharedController] flipRect:&frame]; /* Coalesce events by discarding any previous ones still in the queue. */ @@ -1409,6 +1699,7 @@ event = macdrv_create_event(WINDOW_FRAME_CHANGED, self); event->window_frame_changed.frame = NSRectToCGRect(frame); + event->window_frame_changed.fullscreen = ([self styleMask] & NSFullScreenWindowMask) != 0; [queue postEvent:event]; macdrv_release_event(event); @@ -1424,27 +1715,49 @@ return NO; } - - (void)windowWillMiniaturize:(NSNotification *)notification + - (void) windowWillClose:(NSNotification*)notification { - if (!ignore_windowMiniaturize) - { - macdrv_event* event; + WineWindow* child; - /* Coalesce events by discarding any previous ones still in the queue. */ - [queue discardEventsMatchingMask:event_mask_for_type(WINDOW_DID_MINIMIZE) | - event_mask_for_type(WINDOW_DID_UNMINIMIZE) - forWindow:self]; + if (latentParentWindow) + { + [latentParentWindow->latentChildWindows removeObjectIdenticalTo:self]; + self.latentParentWindow = nil; + } - event = macdrv_create_event(WINDOW_DID_MINIMIZE, self); - [queue postEvent:event]; - macdrv_release_event(event); + for (child in latentChildWindows) + { + if (child.latentParentWindow == self) + child.latentParentWindow = nil; } + [latentChildWindows removeAllObjects]; + } + + - (void) windowWillEnterFullScreen:(NSNotification*)notification + { + enteringFullScreen = TRUE; + nonFullscreenFrame = [self frame]; + } - ignore_windowMiniaturize = FALSE; + - (void) windowWillExitFullScreen:(NSNotification*)notification + { + exitingFullScreen = TRUE; + } + + - (void)windowWillMiniaturize:(NSNotification *)notification + { + [self becameIneligibleParentOrChild]; } - (void) windowWillStartLiveResize:(NSNotification *)notification { + macdrv_query* query = macdrv_create_query(); + query->type = QUERY_RESIZE_START; + query->window = (macdrv_window)[self retain]; + + [self.queue query:query timeout:0.3]; + macdrv_release_query(query); + // There's a strange restriction in window redrawing during Cocoa- // managed window resizing. Only calls to -[NSView setNeedsDisplay...] // that happen synchronously when Cocoa tells us that our window size @@ -1460,17 +1773,56 @@ // // We address this by "manually" asking our windows to check if they need // redrawing every so often (during live resize only). - [self windowDidEndLiveResize:nil]; - liveResizeDisplayTimer = [NSTimer scheduledTimerWithTimeInterval:1.0/30.0 - target:self - selector:@selector(displayIfNeeded) - userInfo:nil - repeats:YES]; - [liveResizeDisplayTimer retain]; + self.liveResizeDisplayTimer = [NSTimer scheduledTimerWithTimeInterval:1.0/30.0 + target:self + selector:@selector(displayIfNeeded) + userInfo:nil + repeats:YES]; [[NSRunLoop currentRunLoop] addTimer:liveResizeDisplayTimer forMode:NSRunLoopCommonModes]; } + - (NSRect) windowWillUseStandardFrame:(NSWindow*)window defaultFrame:(NSRect)proposedFrame + { + macdrv_query* query; + NSRect currentContentRect, proposedContentRect, newContentRect, screenRect; + NSSize maxSize; + + query = macdrv_create_query(); + query->type = QUERY_MIN_MAX_INFO; + query->window = (macdrv_window)[self retain]; + [self.queue query:query timeout:0.5]; + macdrv_release_query(query); + + currentContentRect = [self contentRectForFrameRect:[self frame]]; + proposedContentRect = [self contentRectForFrameRect:proposedFrame]; + + maxSize = [self contentMaxSize]; + newContentRect.size.width = MIN(NSWidth(proposedContentRect), maxSize.width); + newContentRect.size.height = MIN(NSHeight(proposedContentRect), maxSize.height); + + // Try to keep the top-left corner where it is. + newContentRect.origin.x = NSMinX(currentContentRect); + newContentRect.origin.y = NSMaxY(currentContentRect) - NSHeight(newContentRect); + + // If that pushes the bottom or right off the screen, pull it up and to the left. + screenRect = [self contentRectForFrameRect:[[self screen] visibleFrame]]; + if (NSMaxX(newContentRect) > NSMaxX(screenRect)) + newContentRect.origin.x = NSMaxX(screenRect) - NSWidth(newContentRect); + if (NSMinY(newContentRect) < NSMinY(screenRect)) + newContentRect.origin.y = NSMinY(screenRect); + + // If that pushes the top or left off the screen, push it down and the right + // again. Do this last because the top-left corner is more important than the + // bottom-right. + if (NSMinX(newContentRect) < NSMinX(screenRect)) + newContentRect.origin.x = NSMinX(screenRect); + if (NSMaxY(newContentRect) > NSMaxY(screenRect)) + newContentRect.origin.y = NSMaxY(screenRect) - NSHeight(newContentRect); + + return [self frameRectForContentRect:newContentRect]; + } + /* * ---------- NSPasteboardOwner methods ---------- @@ -1590,8 +1942,11 @@ NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; WineWindow* window = (WineWindow*)w; + OnMainThread(^{ + [window doOrderOut]; + [window close]; + }); [window.queue discardEventsMatchingMask:-1 forWindow:window]; - [window close]; [window release]; [pool release]; @@ -1902,6 +2257,20 @@ } /*********************************************************************** + * macdrv_set_window_min_max_sizes + * + * Sets the window's minimum and maximum content sizes. + */ +void macdrv_set_window_min_max_sizes(macdrv_window w, CGSize min_size, CGSize max_size) +{ + WineWindow* window = (WineWindow*)w; + + OnMainThread(^{ + [window setWineMinSize:NSSizeFromCGSize(min_size) maxSize:NSSizeFromCGSize(max_size)]; + }); +} + +/*********************************************************************** * macdrv_create_view * * Creates and returns a view in the specified rect of the window. The diff -Nru wine1.6-1.7.1-actually1.6/dlls/winemac.drv/event.c wine1.6-1.6.1/dlls/winemac.drv/event.c --- wine1.6-1.7.1-actually1.6/dlls/winemac.drv/event.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/winemac.drv/event.c 2013-11-15 19:30:24.000000000 +0000 @@ -45,13 +45,15 @@ "MOUSE_SCROLL", "QUERY_EVENT", "RELEASE_CAPTURE", - "STATUS_ITEM_CLICKED", + "STATUS_ITEM_MOUSE_BUTTON", + "STATUS_ITEM_MOUSE_MOVE", + "WINDOW_BROUGHT_FORWARD", "WINDOW_CLOSE_REQUESTED", - "WINDOW_DID_MINIMIZE", "WINDOW_DID_UNMINIMIZE", "WINDOW_FRAME_CHANGED", "WINDOW_GOT_FOCUS", "WINDOW_LOST_FOCUS", + "WINDOW_MINIMIZE_REQUESTED", }; if (0 <= type && type < NUM_EVENT_TYPES) return event_names[type]; @@ -93,9 +95,9 @@ event_mask |= event_mask_for_type(APP_QUIT_REQUESTED); event_mask |= event_mask_for_type(DISPLAYS_CHANGED); event_mask |= event_mask_for_type(IM_SET_TEXT); - event_mask |= event_mask_for_type(STATUS_ITEM_CLICKED); + event_mask |= event_mask_for_type(STATUS_ITEM_MOUSE_BUTTON); + event_mask |= event_mask_for_type(STATUS_ITEM_MOUSE_MOVE); event_mask |= event_mask_for_type(WINDOW_CLOSE_REQUESTED); - event_mask |= event_mask_for_type(WINDOW_DID_MINIMIZE); event_mask |= event_mask_for_type(WINDOW_DID_UNMINIMIZE); event_mask |= event_mask_for_type(WINDOW_FRAME_CHANGED); event_mask |= event_mask_for_type(WINDOW_GOT_FOCUS); @@ -106,6 +108,8 @@ { event_mask |= event_mask_for_type(QUERY_EVENT); event_mask |= event_mask_for_type(RELEASE_CAPTURE); + event_mask |= event_mask_for_type(WINDOW_BROUGHT_FORWARD); + event_mask |= event_mask_for_type(WINDOW_MINIMIZE_REQUESTED); } return event_mask; @@ -144,6 +148,18 @@ TRACE("QUERY_PASTEBOARD_DATA\n"); success = query_pasteboard_data(hwnd, query->pasteboard_data.type); break; + case QUERY_RESIZE_END: + TRACE("QUERY_RESIZE_END\n"); + success = query_resize_end(hwnd); + break; + case QUERY_RESIZE_START: + TRACE("QUERY_RESIZE_START\n"); + success = query_resize_start(hwnd); + break; + case QUERY_MIN_MAX_INFO: + TRACE("QUERY_MIN_MAX_INFO\n"); + success = query_min_max_info(hwnd); + break; default: FIXME("unrecognized query type %d\n", query->type); break; @@ -207,20 +223,23 @@ case RELEASE_CAPTURE: macdrv_release_capture(hwnd, event); break; - case STATUS_ITEM_CLICKED: - macdrv_status_item_clicked(event); + case STATUS_ITEM_MOUSE_BUTTON: + macdrv_status_item_mouse_button(event); + break; + case STATUS_ITEM_MOUSE_MOVE: + macdrv_status_item_mouse_move(event); + break; + case WINDOW_BROUGHT_FORWARD: + macdrv_window_brought_forward(hwnd); break; case WINDOW_CLOSE_REQUESTED: macdrv_window_close_requested(hwnd); break; - case WINDOW_DID_MINIMIZE: - macdrv_window_did_minimize(hwnd); - break; case WINDOW_DID_UNMINIMIZE: macdrv_window_did_unminimize(hwnd); break; case WINDOW_FRAME_CHANGED: - macdrv_window_frame_changed(hwnd, event->window_frame_changed.frame); + macdrv_window_frame_changed(hwnd, event); break; case WINDOW_GOT_FOCUS: macdrv_window_got_focus(hwnd, event); @@ -228,6 +247,9 @@ case WINDOW_LOST_FOCUS: macdrv_window_lost_focus(hwnd, event); break; + case WINDOW_MINIMIZE_REQUESTED: + macdrv_window_minimize_requested(hwnd); + break; default: TRACE(" ignoring\n"); break; diff -Nru wine1.6-1.7.1-actually1.6/dlls/winemac.drv/gdi.c wine1.6-1.6.1/dlls/winemac.drv/gdi.c --- wine1.6-1.7.1-actually1.6/dlls/winemac.drv/gdi.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/winemac.drv/gdi.c 2013-11-15 19:30:24.000000000 +0000 @@ -49,7 +49,6 @@ static int desktop_horz_res; /* width in pixels of virtual desktop */ static int desktop_vert_res; /* height in pixels of virtual desktop */ static int bits_per_pixel; /* pixel depth of screen */ -static int palette_size; /* number of color entries in palette */ static int device_data_valid; /* do the above variables have up-to-date values? */ static CRITICAL_SECTION device_data_section; @@ -141,7 +140,6 @@ CGDirectDisplayID mainDisplay = CGMainDisplayID(); CGSize size_mm = CGDisplayScreenSize(mainDisplay); CGDisplayModeRef mode = CGDisplayCopyDisplayMode(mainDisplay); - CGDirectPaletteRef palette; /* Initialize device caps */ log_pixels_x = log_pixels_y = get_dpi(); @@ -187,15 +185,6 @@ desktop_horz_res = desktop_rect.size.width; desktop_vert_res = desktop_rect.size.height; - palette = CGPaletteCreateWithDisplay(mainDisplay); - if (palette) - { - palette_size = CGPaletteGetNumberOfSamples(palette); - CGPaletteRelease(palette); - } - else - palette_size = 0; - device_data_valid = TRUE; } @@ -368,7 +357,7 @@ case RASTERCAPS: ret = (RC_BITBLT | RC_BANDING | RC_SCALING | RC_BITMAP64 | RC_DI_BITMAP | RC_DIBTODEV | RC_BIGFONT | RC_STRETCHBLT | RC_STRETCHDIB | RC_DEVBITS | - (palette_size ? RC_PALETTE : 0)); + (bits_per_pixel <= 8 ? RC_PALETTE : 0)); break; case SHADEBLENDCAPS: ret = (SB_GRAD_RECT | SB_GRAD_TRI | SB_CONST_ALPHA | SB_PIXEL_ALPHA); @@ -393,7 +382,7 @@ ret = 0; break; case SIZEPALETTE: - ret = palette_size; + ret = bits_per_pixel <= 8 ? 1 << bits_per_pixel : 0; break; case NUMRESERVED: case PHYSICALWIDTH: diff -Nru wine1.6-1.7.1-actually1.6/dlls/winemac.drv/keyboard.c wine1.6-1.6.1/dlls/winemac.drv/keyboard.c --- wine1.6-1.7.1-actually1.6/dlls/winemac.drv/keyboard.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/winemac.drv/keyboard.c 2013-11-15 19:30:24.000000000 +0000 @@ -1394,7 +1394,10 @@ } if (!is_menu) { - thread_data->dead_key_state = deadKeyState; + if (keyAction != kUCKeyActionUp && len > 0 && deadKeyState == thread_data->dead_key_state) + thread_data->dead_key_state = 0; + else + thread_data->dead_key_state = deadKeyState; if (keyAction == kUCKeyActionUp) goto done; diff -Nru wine1.6-1.7.1-actually1.6/dlls/winemac.drv/macdrv.h wine1.6-1.6.1/dlls/winemac.drv/macdrv.h --- wine1.6-1.7.1-actually1.6/dlls/winemac.drv/macdrv.h 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/winemac.drv/macdrv.h 2013-11-15 19:30:24.000000000 +0000 @@ -44,9 +44,7 @@ static inline CGRect cgrect_from_rect(RECT rect) { - if (rect.left >= rect.right || rect.top >= rect.bottom) - return CGRectNull; - return CGRectMake(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top); + return CGRectMake(rect.left, rect.top, max(0, rect.right - rect.left), max(0, rect.bottom - rect.top)); } static inline RECT rect_from_cgrect(CGRect cgrect) @@ -133,12 +131,12 @@ macdrv_view gl_view; /* view for GL */ RECT gl_rect; /* GL view rectangle relative to whole_rect */ COLORREF color_key; /* color key for layered window; CLR_INVALID is not color keyed */ - BOOL on_screen : 1; /* is window ordered in? (minimized or not) */ - BOOL shaped : 1; /* is window using a custom region shape? */ - BOOL layered : 1; /* is window layered and with valid attributes? */ - BOOL ulw_layered : 1; /* has UpdateLayeredWindow() been called for window? */ - BOOL per_pixel_alpha : 1; /* is window using per-pixel alpha? */ - BOOL minimized : 1; /* is window minimized? */ + unsigned int on_screen : 1; /* is window ordered in? (minimized or not) */ + unsigned int shaped : 1; /* is window using a custom region shape? */ + unsigned int layered : 1; /* is window layered and with valid attributes? */ + unsigned int ulw_layered : 1; /* has UpdateLayeredWindow() been called for window? */ + unsigned int per_pixel_alpha : 1; /* is window using per-pixel alpha? */ + unsigned int minimized : 1; /* is window minimized? */ struct window_surface *surface; struct window_surface *unminimized_surface; }; @@ -156,13 +154,17 @@ extern void macdrv_handle_event(const macdrv_event *event) DECLSPEC_HIDDEN; extern void macdrv_window_close_requested(HWND hwnd) DECLSPEC_HIDDEN; -extern void macdrv_window_frame_changed(HWND hwnd, CGRect frame) DECLSPEC_HIDDEN; +extern void macdrv_window_frame_changed(HWND hwnd, const macdrv_event *event) DECLSPEC_HIDDEN; extern void macdrv_window_got_focus(HWND hwnd, const macdrv_event *event) DECLSPEC_HIDDEN; extern void macdrv_window_lost_focus(HWND hwnd, const macdrv_event *event) DECLSPEC_HIDDEN; extern void macdrv_app_deactivated(void) DECLSPEC_HIDDEN; extern void macdrv_app_quit_requested(const macdrv_event *event) DECLSPEC_HIDDEN; -extern void macdrv_window_did_minimize(HWND hwnd) DECLSPEC_HIDDEN; +extern void macdrv_window_minimize_requested(HWND hwnd) DECLSPEC_HIDDEN; extern void macdrv_window_did_unminimize(HWND hwnd) DECLSPEC_HIDDEN; +extern void macdrv_window_brought_forward(HWND hwnd) DECLSPEC_HIDDEN; +extern BOOL query_resize_end(HWND hwnd) DECLSPEC_HIDDEN; +extern BOOL query_resize_start(HWND hwnd) DECLSPEC_HIDDEN; +extern BOOL query_min_max_info(HWND hwnd) DECLSPEC_HIDDEN; extern void macdrv_mouse_button(HWND hwnd, const macdrv_event *event) DECLSPEC_HIDDEN; extern void macdrv_mouse_moved(HWND hwnd, const macdrv_event *event) DECLSPEC_HIDDEN; @@ -197,7 +199,8 @@ extern CGImageRef create_cgimage_from_icon(HANDLE icon, int width, int height) DECLSPEC_HIDDEN; extern CFArrayRef create_app_icon_images(void) DECLSPEC_HIDDEN; -extern void macdrv_status_item_clicked(const macdrv_event *event) DECLSPEC_HIDDEN; +extern void macdrv_status_item_mouse_button(const macdrv_event *event) DECLSPEC_HIDDEN; +extern void macdrv_status_item_mouse_move(const macdrv_event *event) DECLSPEC_HIDDEN; /************************************************************************** diff -Nru wine1.6-1.7.1-actually1.6/dlls/winemac.drv/macdrv_cocoa.h wine1.6-1.6.1/dlls/winemac.drv/macdrv_cocoa.h --- wine1.6-1.7.1-actually1.6/dlls/winemac.drv/macdrv_cocoa.h 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/winemac.drv/macdrv_cocoa.h 2013-11-15 19:30:24.000000000 +0000 @@ -137,6 +137,8 @@ extern int macdrv_err_on; extern int topmost_float_inactive DECLSPEC_HIDDEN; extern int capture_displays_for_fullscreen DECLSPEC_HIDDEN; +extern int left_option_is_alt DECLSPEC_HIDDEN; +extern int right_option_is_alt DECLSPEC_HIDDEN; extern int macdrv_start_cocoa_app(unsigned long long tickcount) DECLSPEC_HIDDEN; extern void macdrv_window_rejected_focus(const struct macdrv_event *event) DECLSPEC_HIDDEN; @@ -176,13 +178,15 @@ MOUSE_SCROLL, QUERY_EVENT, RELEASE_CAPTURE, - STATUS_ITEM_CLICKED, + STATUS_ITEM_MOUSE_BUTTON, + STATUS_ITEM_MOUSE_MOVE, + WINDOW_BROUGHT_FORWARD, WINDOW_CLOSE_REQUESTED, - WINDOW_DID_MINIMIZE, WINDOW_DID_UNMINIMIZE, WINDOW_FRAME_CHANGED, WINDOW_GOT_FOCUS, WINDOW_LOST_FOCUS, + WINDOW_MINIMIZE_REQUESTED, NUM_EVENT_TYPES }; @@ -248,10 +252,16 @@ } query_event; struct { macdrv_status_item item; + int button; + int down; int count; - } status_item_clicked; + } status_item_mouse_button; struct { - CGRect frame; + macdrv_status_item item; + } status_item_mouse_move; + struct { + CGRect frame; + int fullscreen; } window_frame_changed; struct { unsigned long serial; @@ -266,6 +276,9 @@ QUERY_DRAG_OPERATION, QUERY_IME_CHAR_RECT, QUERY_PASTEBOARD_DATA, + QUERY_RESIZE_END, + QUERY_RESIZE_START, + QUERY_MIN_MAX_INFO, NUM_QUERY_TYPES }; @@ -338,6 +351,7 @@ unsigned int excluded_by_expose:1; unsigned int excluded_by_cycle:1; unsigned int minimized:1; + unsigned int minimized_valid:1; }; extern macdrv_window macdrv_create_cocoa_window(const struct macdrv_window_features* wf, @@ -367,6 +381,7 @@ extern void macdrv_clear_window_color_key(macdrv_window w) DECLSPEC_HIDDEN; extern void macdrv_window_use_per_pixel_alpha(macdrv_window w, int use_per_pixel_alpha) DECLSPEC_HIDDEN; extern void macdrv_give_cocoa_window_focus(macdrv_window w, int activate) DECLSPEC_HIDDEN; +extern void macdrv_set_window_min_max_sizes(macdrv_window w, CGSize min_size, CGSize max_size) DECLSPEC_HIDDEN; extern macdrv_view macdrv_create_view(macdrv_window w, CGRect rect) DECLSPEC_HIDDEN; extern void macdrv_dispose_view(macdrv_view v) DECLSPEC_HIDDEN; extern void macdrv_set_view_window_and_frame(macdrv_view v, macdrv_window w, CGRect rect) DECLSPEC_HIDDEN; diff -Nru wine1.6-1.7.1-actually1.6/dlls/winemac.drv/macdrv_main.c wine1.6-1.6.1/dlls/winemac.drv/macdrv_main.c --- wine1.6-1.7.1-actually1.6/dlls/winemac.drv/macdrv_main.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/winemac.drv/macdrv_main.c 2013-11-15 19:30:24.000000000 +0000 @@ -50,6 +50,8 @@ BOOL skip_single_buffer_flushes = FALSE; BOOL allow_vsync = TRUE; BOOL allow_set_gamma = TRUE; +int left_option_is_alt = 0; +int right_option_is_alt = 0; /************************************************************************** @@ -168,6 +170,11 @@ if (!get_config_key(hkey, appkey, "AllowSetGamma", buffer, sizeof(buffer))) allow_set_gamma = IS_OPTION_TRUE(buffer[0]); + if (!get_config_key(hkey, appkey, "LeftOptionIsAlt", buffer, sizeof(buffer))) + left_option_is_alt = IS_OPTION_TRUE(buffer[0]); + if (!get_config_key(hkey, appkey, "RightOptionIsAlt", buffer, sizeof(buffer))) + right_option_is_alt = IS_OPTION_TRUE(buffer[0]); + if (appkey) RegCloseKey(appkey); if (hkey) RegCloseKey(hkey); } diff -Nru wine1.6-1.7.1-actually1.6/dlls/winemac.drv/mouse.c wine1.6-1.6.1/dlls/winemac.drv/mouse.c --- wine1.6-1.7.1-actually1.6/dlls/winemac.drv/mouse.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/winemac.drv/mouse.c 2013-11-15 19:30:24.000000000 +0000 @@ -911,12 +911,14 @@ event->mouse_scroll.x, event->mouse_scroll.y, event->mouse_scroll.time_ms, (GetTickCount() - event->mouse_scroll.time_ms)); - send_mouse_input(hwnd, event->window, MOUSEEVENTF_WHEEL | MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE, - event->mouse_scroll.x, event->mouse_scroll.y, - event->mouse_scroll.y_scroll, FALSE, event->mouse_scroll.time_ms); - send_mouse_input(hwnd, event->window, MOUSEEVENTF_HWHEEL | MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE, - event->mouse_scroll.x, event->mouse_scroll.y, - event->mouse_scroll.x_scroll, FALSE, event->mouse_scroll.time_ms); + if (event->mouse_scroll.y_scroll) + send_mouse_input(hwnd, event->window, MOUSEEVENTF_WHEEL | MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE, + event->mouse_scroll.x, event->mouse_scroll.y, + event->mouse_scroll.y_scroll, FALSE, event->mouse_scroll.time_ms); + if (event->mouse_scroll.x_scroll) + send_mouse_input(hwnd, event->window, MOUSEEVENTF_HWHEEL | MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE, + event->mouse_scroll.x, event->mouse_scroll.y, + event->mouse_scroll.x_scroll, FALSE, event->mouse_scroll.time_ms); } diff -Nru wine1.6-1.7.1-actually1.6/dlls/winemac.drv/opengl.c wine1.6-1.6.1/dlls/winemac.drv/opengl.c --- wine1.6-1.7.1-actually1.6/dlls/winemac.drv/opengl.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/winemac.drv/opengl.c 2013-11-15 19:30:24.000000000 +0000 @@ -3275,16 +3275,16 @@ */ int macdrv_wglDescribePixelFormat(HDC hdc, int fmt, UINT size, PIXELFORMATDESCRIPTOR *descr) { - int ret = nb_formats; const pixel_format *pf; const struct color_mode *mode; TRACE("hdc %p fmt %d size %u descr %p\n", hdc, fmt, size, descr); - if (fmt <= 0 || fmt > ret) return ret; + if (!descr) return nb_displayable_formats; if (size < sizeof(*descr)) return 0; - pf = &pixel_formats[fmt - 1]; + if (!(pf = get_pixel_format(fmt, FALSE))) + return 0; memset(descr, 0, sizeof(*descr)); descr->nSize = sizeof(*descr); @@ -3331,7 +3331,9 @@ descr->cStencilBits = pf->stencil_bits; descr->cAuxBuffers = pf->aux_buffers; descr->iLayerType = PFD_MAIN_PLANE; - return ret; + + TRACE("%s\n", debugstr_pf(pf)); + return nb_displayable_formats; } /*********************************************************************** diff -Nru wine1.6-1.7.1-actually1.6/dlls/winemac.drv/systray.c wine1.6-1.6.1/dlls/winemac.drv/systray.c --- wine1.6-1.7.1-actually1.6/dlls/winemac.drv/systray.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/winemac.drv/systray.c 2013-11-15 19:30:24.000000000 +0000 @@ -308,22 +308,38 @@ /*********************************************************************** - * macdrv_status_item_clicked + * macdrv_status_item_mouse_button * - * Handle STATUS_ITEM_CLICKED events. + * Handle STATUS_ITEM_MOUSE_BUTTON events. */ -void macdrv_status_item_clicked(const macdrv_event *event) +void macdrv_status_item_mouse_button(const macdrv_event *event) { struct tray_icon *icon; - TRACE("item %p count %d\n", event->status_item_clicked.item, - event->status_item_clicked.count); + TRACE("item %p button %d down %d count %d\n", event->status_item_mouse_button.item, + event->status_item_mouse_button.button, event->status_item_mouse_button.down, + event->status_item_mouse_button.count); LIST_FOR_EACH_ENTRY(icon, &icon_list, struct tray_icon, entry) { - if (icon->status_item == event->status_item_clicked.item) + if (icon->status_item == event->status_item_mouse_button.item) { - UINT down; + UINT msg; + + switch (event->status_item_mouse_button.button) + { + case 0: msg = WM_LBUTTONDOWN; break; + case 1: msg = WM_RBUTTONDOWN; break; + case 2: msg = WM_MBUTTONDOWN; break; + default: + TRACE("ignoring button beyond the third\n"); + return; + } + + if (!event->status_item_mouse_button.down) + msg += WM_LBUTTONUP - WM_LBUTTONDOWN; + else if (event->status_item_mouse_button.count % 2 == 0) + msg += WM_LBUTTONDBLCLK - WM_LBUTTONDOWN; if (!SendMessageW(icon->owner, WM_MACDRV_ACTIVATE_ON_FOLLOWING_FOCUS, 0, 0) && GetLastError() == ERROR_INVALID_WINDOW_HANDLE) @@ -333,18 +349,8 @@ return; } - if (event->status_item_clicked.count == 1) - { - down = WM_LBUTTONDOWN; - TRACE("posting WM_LBUTTONDOWN to hwnd %p id 0x%x\n", icon->owner, icon->id); - } - else - { - down = WM_LBUTTONDBLCLK; - TRACE("posting WM_LBUTTONDBLCLK to hwnd %p id 0x%x\n", icon->owner, icon->id); - } - - if (!PostMessageW(icon->owner, icon->callback_message, icon->id, down) && + TRACE("posting msg 0x%04x to hwnd %p id 0x%x\n", msg, icon->owner, icon->id); + if (!PostMessageW(icon->owner, icon->callback_message, icon->id, msg) && GetLastError() == ERROR_INVALID_WINDOW_HANDLE) { WARN("window %p was destroyed, removing icon 0x%x\n", icon->owner, icon->id); @@ -352,12 +358,33 @@ return; } - TRACE("posting WM_LBUTTONUP to hwnd %p id 0x%x\n", icon->owner, icon->id); - if (!PostMessageW(icon->owner, icon->callback_message, icon->id, WM_LBUTTONUP) && + break; + } + } +} + + +/*********************************************************************** + * macdrv_status_item_mouse_move + * + * Handle STATUS_ITEM_MOUSE_MOVE events. + */ +void macdrv_status_item_mouse_move(const macdrv_event *event) +{ + struct tray_icon *icon; + + TRACE("item %p\n", event->status_item_mouse_move.item); + + LIST_FOR_EACH_ENTRY(icon, &icon_list, struct tray_icon, entry) + { + if (icon->status_item == event->status_item_mouse_move.item) + { + if (!PostMessageW(icon->owner, icon->callback_message, icon->id, WM_MOUSEMOVE) && GetLastError() == ERROR_INVALID_WINDOW_HANDLE) { WARN("window %p was destroyed, removing icon 0x%x\n", icon->owner, icon->id); delete_icon(icon); + return; } break; diff -Nru wine1.6-1.7.1-actually1.6/dlls/winemac.drv/window.c wine1.6-1.6.1/dlls/winemac.drv/window.c --- wine1.6-1.7.1-actually1.6/dlls/winemac.drv/window.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/winemac.drv/window.c 2013-11-15 19:30:24.000000000 +0000 @@ -42,7 +42,7 @@ static CFMutableDictionaryRef win_datas; -DWORD activate_on_focus_time; +static DWORD activate_on_focus_time; void CDECL macdrv_SetFocus(HWND hwnd); @@ -89,13 +89,11 @@ static inline BOOL can_activate_window(HWND hwnd) { LONG style = GetWindowLongW(hwnd, GWL_STYLE); - RECT rect; if (!(style & WS_VISIBLE)) return FALSE; if ((style & (WS_POPUP|WS_CHILD)) == WS_CHILD) return FALSE; if (GetWindowLongW(hwnd, GWL_EXSTYLE) & WS_EX_NOACTIVATE) return FALSE; if (hwnd == GetDesktopWindow()) return FALSE; - if (GetWindowRect(hwnd, &rect) && IsRectEmpty(&rect)) return FALSE; return !(style & WS_DISABLED); } @@ -112,9 +110,12 @@ state->no_activate = !can_activate_window(data->hwnd); state->floating = (ex_style & WS_EX_TOPMOST) != 0; state->excluded_by_expose = state->excluded_by_cycle = - !(ex_style & WS_EX_APPWINDOW) && - (GetWindow(data->hwnd, GW_OWNER) || (ex_style & (WS_EX_TOOLWINDOW | WS_EX_NOACTIVATE))); + (!(ex_style & WS_EX_APPWINDOW) && + (GetWindow(data->hwnd, GW_OWNER) || (ex_style & (WS_EX_TOOLWINDOW | WS_EX_NOACTIVATE)))); + if (IsRectEmpty(&data->window_rect)) + state->excluded_by_expose = TRUE; state->minimized = (style & WS_MINIMIZE) != 0; + state->minimized_valid = state->minimized != data->minimized; } @@ -312,7 +313,8 @@ get_cocoa_window_state(data, style, ex_style, &state); macdrv_set_cocoa_window_state(data->cocoa_window, &state); - data->minimized = state.minimized; + if (state.minimized_valid) + data->minimized = state.minimized; } @@ -331,6 +333,13 @@ if (!data->cocoa_window) return; data->shaped = FALSE; + if (IsRectEmpty(&data->window_rect)) /* set an empty shape */ + { + TRACE("win %p/%p setting empty shape for zero-sized window\n", data->hwnd, data->cocoa_window); + macdrv_set_window_shape(data->cocoa_window, &CGRectZero, 1); + return; + } + if (hrgn == (HRGN)1) /* hack: win_region == 1 means retrieve region from server */ { if (!(hrgn = CreateRectRgn(0, 0, 0, 0))) return; @@ -456,6 +465,137 @@ } +/*********************************************************************** + * sync_window_min_max_info + */ +static void sync_window_min_max_info(HWND hwnd) +{ + LONG style = GetWindowLongW(hwnd, GWL_STYLE); + LONG exstyle = GetWindowLongW(hwnd, GWL_EXSTYLE); + RECT win_rect, primary_monitor_rect; + MINMAXINFO minmax; + LONG adjustedStyle; + INT xinc, yinc; + WINDOWPLACEMENT wpl; + HMONITOR monitor; + struct macdrv_win_data *data; + + TRACE("win %p\n", hwnd); + + if (!macdrv_get_cocoa_window(hwnd, FALSE)) return; + + GetWindowRect(hwnd, &win_rect); + minmax.ptReserved.x = win_rect.left; + minmax.ptReserved.y = win_rect.top; + + if ((style & WS_CAPTION) == WS_CAPTION) + adjustedStyle = style & ~WS_BORDER; /* WS_CAPTION = WS_DLGFRAME | WS_BORDER */ + else + adjustedStyle = style; + + primary_monitor_rect.left = primary_monitor_rect.top = 0; + primary_monitor_rect.right = GetSystemMetrics(SM_CXSCREEN); + primary_monitor_rect.bottom = GetSystemMetrics(SM_CYSCREEN); + AdjustWindowRectEx(&primary_monitor_rect, adjustedStyle, ((style & WS_POPUP) && GetMenu(hwnd)), exstyle); + + xinc = -primary_monitor_rect.left; + yinc = -primary_monitor_rect.top; + + minmax.ptMaxSize.x = primary_monitor_rect.right - primary_monitor_rect.left; + minmax.ptMaxSize.y = primary_monitor_rect.bottom - primary_monitor_rect.top; + minmax.ptMaxPosition.x = -xinc; + minmax.ptMaxPosition.y = -yinc; + if (style & (WS_DLGFRAME | WS_BORDER)) + { + minmax.ptMinTrackSize.x = GetSystemMetrics(SM_CXMINTRACK); + minmax.ptMinTrackSize.y = GetSystemMetrics(SM_CYMINTRACK); + } + else + { + minmax.ptMinTrackSize.x = 2 * xinc; + minmax.ptMinTrackSize.y = 2 * yinc; + } + minmax.ptMaxTrackSize.x = GetSystemMetrics(SM_CXMAXTRACK); + minmax.ptMaxTrackSize.y = GetSystemMetrics(SM_CYMAXTRACK); + + wpl.length = sizeof(wpl); + if (GetWindowPlacement(hwnd, &wpl) && (wpl.ptMaxPosition.x != -1 || wpl.ptMaxPosition.y != -1)) + { + minmax.ptMaxPosition = wpl.ptMaxPosition; + + /* Convert from GetWindowPlacement's workspace coordinates to screen coordinates. */ + minmax.ptMaxPosition.x -= wpl.rcNormalPosition.left - win_rect.left; + minmax.ptMaxPosition.y -= wpl.rcNormalPosition.top - win_rect.top; + } + + TRACE("initial ptMaxSize %s ptMaxPosition %s ptMinTrackSize %s ptMaxTrackSize %s\n", wine_dbgstr_point(&minmax.ptMaxSize), + wine_dbgstr_point(&minmax.ptMaxPosition), wine_dbgstr_point(&minmax.ptMinTrackSize), wine_dbgstr_point(&minmax.ptMaxTrackSize)); + + SendMessageW(hwnd, WM_GETMINMAXINFO, 0, (LPARAM)&minmax); + + TRACE("app's ptMaxSize %s ptMaxPosition %s ptMinTrackSize %s ptMaxTrackSize %s\n", wine_dbgstr_point(&minmax.ptMaxSize), + wine_dbgstr_point(&minmax.ptMaxPosition), wine_dbgstr_point(&minmax.ptMinTrackSize), wine_dbgstr_point(&minmax.ptMaxTrackSize)); + + /* if the app didn't change the values, adapt them for the window's monitor */ + if ((monitor = MonitorFromWindow(hwnd, MONITOR_DEFAULTTOPRIMARY))) + { + MONITORINFO mon_info; + RECT monitor_rect; + + mon_info.cbSize = sizeof(mon_info); + GetMonitorInfoW(monitor, &mon_info); + + if ((style & WS_MAXIMIZEBOX) && ((style & WS_CAPTION) == WS_CAPTION || !(style & WS_POPUP))) + monitor_rect = mon_info.rcWork; + else + monitor_rect = mon_info.rcMonitor; + + if (minmax.ptMaxSize.x == primary_monitor_rect.right - primary_monitor_rect.left && + minmax.ptMaxSize.y == primary_monitor_rect.bottom - primary_monitor_rect.top) + { + minmax.ptMaxSize.x = (monitor_rect.right - monitor_rect.left) + 2 * xinc; + minmax.ptMaxSize.y = (monitor_rect.bottom - monitor_rect.top) + 2 * yinc; + } + if (minmax.ptMaxPosition.x == -xinc && minmax.ptMaxPosition.y == -yinc) + { + minmax.ptMaxPosition.x = monitor_rect.left - xinc; + minmax.ptMaxPosition.y = monitor_rect.top - yinc; + } + } + + minmax.ptMaxTrackSize.x = max(minmax.ptMaxTrackSize.x, minmax.ptMinTrackSize.x); + minmax.ptMaxTrackSize.y = max(minmax.ptMaxTrackSize.y, minmax.ptMinTrackSize.y); + + TRACE("adjusted ptMaxSize %s ptMaxPosition %s ptMinTrackSize %s ptMaxTrackSize %s\n", wine_dbgstr_point(&minmax.ptMaxSize), + wine_dbgstr_point(&minmax.ptMaxPosition), wine_dbgstr_point(&minmax.ptMinTrackSize), wine_dbgstr_point(&minmax.ptMaxTrackSize)); + + if ((data = get_win_data(hwnd)) && data->cocoa_window) + { + RECT min_rect, max_rect; + CGSize min_size, max_size; + + SetRect(&min_rect, 0, 0, minmax.ptMinTrackSize.x, minmax.ptMinTrackSize.y); + macdrv_window_to_mac_rect(data, style, &min_rect); + min_size = CGSizeMake(min_rect.right - min_rect.left, min_rect.bottom - min_rect.top); + + if (minmax.ptMaxTrackSize.x == GetSystemMetrics(SM_CXMAXTRACK) && + minmax.ptMaxTrackSize.y == GetSystemMetrics(SM_CYMAXTRACK)) + max_size = CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX); + else + { + SetRect(&max_rect, 0, 0, minmax.ptMaxTrackSize.x, minmax.ptMaxTrackSize.y); + macdrv_window_to_mac_rect(data, style, &max_rect); + max_size = CGSizeMake(max_rect.right - max_rect.left, max_rect.bottom - max_rect.top); + } + + TRACE("min_size (%g,%g) max_size (%g,%g)\n", min_size.width, min_size.height, max_size.width, max_size.height); + macdrv_set_window_min_max_sizes(data->cocoa_window, min_size, max_size); + } + + release_win_data(data); +} + + /********************************************************************** * create_cocoa_window * @@ -487,11 +627,12 @@ data->whole_rect = data->window_rect; macdrv_window_to_mac_rect(data, style, &data->whole_rect); - memset(&wf, 0, sizeof(wf)); get_cocoa_window_features(data, style, ex_style, &wf); frame = cgrect_from_rect(data->whole_rect); constrain_window_frame(&frame); + if (frame.size.width < 1 || frame.size.height < 1) + frame.size.width = frame.size.height = 1; TRACE("creating %p window %s whole %s client %s\n", data->hwnd, wine_dbgstr_rect(&data->window_rect), wine_dbgstr_rect(&data->whole_rect), wine_dbgstr_rect(&data->client_rect)); @@ -506,7 +647,7 @@ macdrv_set_cocoa_window_title(data->cocoa_window, text, strlenW(text)); /* set the window region */ - if (win_rgn) sync_window_region(data, win_rgn); + if (win_rgn || IsRectEmpty(&data->window_rect)) sync_window_region(data, win_rgn); /* set the window opacity */ if (!GetLayeredWindowAttributes(data->hwnd, &key, &alpha, &layered_flags)) layered_flags = 0; @@ -591,14 +732,14 @@ /* find window that this one must be after */ prev = GetWindow(data->hwnd, GW_HWNDPREV); - while (prev && !((GetWindowLongW(prev, GWL_STYLE) & WS_VISIBLE) && + while (prev && !((GetWindowLongW(prev, GWL_STYLE) & (WS_VISIBLE | WS_MINIMIZE)) == WS_VISIBLE && (prev_window = macdrv_get_cocoa_window(prev, TRUE)))) prev = GetWindow(prev, GW_HWNDPREV); if (!prev_window) { /* find window that this one must be before */ next = GetWindow(data->hwnd, GW_HWNDNEXT); - while (next && !((GetWindowLongW(next, GWL_STYLE) & WS_VISIBLE) && + while (next && !((GetWindowLongW(next, GWL_STYLE) & (WS_VISIBLE | WS_MINIMIZE)) == WS_VISIBLE && (next_window = macdrv_get_cocoa_window(next, TRUE)))) next = GetWindow(next, GW_HWNDNEXT); } @@ -704,7 +845,7 @@ * * Synchronize the Mac window position with the Windows one */ -static void sync_window_position(struct macdrv_win_data *data, UINT swp_flags) +static void sync_window_position(struct macdrv_win_data *data, UINT swp_flags, const RECT *old_window_rect) { CGRect frame; @@ -712,12 +853,15 @@ frame = cgrect_from_rect(data->whole_rect); constrain_window_frame(&frame); + if (frame.size.width < 1 || frame.size.height < 1) + frame.size.width = frame.size.height = 1; data->on_screen = macdrv_set_cocoa_window_frame(data->cocoa_window, &frame); - if (data->shaped) sync_window_region(data, (HRGN)1); + if (old_window_rect && IsRectEmpty(old_window_rect) != IsRectEmpty(&data->window_rect)) + sync_window_region(data, (HRGN)1); - TRACE("win %p/%p pos %s\n", data->hwnd, data->cocoa_window, - wine_dbgstr_rect(&data->whole_rect)); + TRACE("win %p/%p whole_rect %s frame %s\n", data->hwnd, data->cocoa_window, + wine_dbgstr_rect(&data->whole_rect), wine_dbgstr_cgrect(frame)); if (data->on_screen && (!(swp_flags & SWP_NOZORDER) || (swp_flags & SWP_SHOWWINDOW))) show_window(data); @@ -1014,6 +1158,9 @@ struct macdrv_win_data *data = get_win_data(hwnd); CGRect frame; + TRACE("win %p/%p cmd %d at %s flags %08x\n", + hwnd, data ? data->cocoa_window : NULL, cmd, wine_dbgstr_rect(rect), swp); + if (!data || !data->cocoa_window) goto done; if (IsRectEmpty(rect)) goto done; if (GetWindowLongW(hwnd, GWL_STYLE) & WS_MINIMIZE) @@ -1033,13 +1180,9 @@ goto done; if (thread_data->current_event->type != WINDOW_FRAME_CHANGED && - thread_data->current_event->type != WINDOW_DID_MINIMIZE && thread_data->current_event->type != WINDOW_DID_UNMINIMIZE) goto done; - TRACE("win %p/%p cmd %d at %s flags %08x\n", - hwnd, data->cocoa_window, cmd, wine_dbgstr_rect(rect), swp); - macdrv_get_cocoa_window_frame(data->cocoa_window, &frame); *rect = rect_from_cgrect(frame); macdrv_mac_to_window_rect(data, rect); @@ -1236,7 +1379,7 @@ if ((data = get_win_data(hwnd))) { if (data->cocoa_window && data->on_screen) - sync_window_position(data, SWP_NOZORDER | SWP_NOACTIVATE); + sync_window_position(data, SWP_NOZORDER | SWP_NOACTIVATE, NULL); release_win_data(data); } SendMessageW(hwnd, WM_DISPLAYCHANGE, wp, lp); @@ -1419,10 +1562,9 @@ if (!thread_data || !thread_data->current_event || thread_data->current_event->window != data->cocoa_window || (thread_data->current_event->type != WINDOW_FRAME_CHANGED && - thread_data->current_event->type != WINDOW_DID_MINIMIZE && thread_data->current_event->type != WINDOW_DID_UNMINIMIZE)) { - sync_window_position(data, swp_flags); + sync_window_position(data, swp_flags, &old_window_rect); set_cocoa_window_properties(data); } @@ -1496,7 +1638,7 @@ * * Handler for WINDOW_FRAME_CHANGED events. */ -void macdrv_window_frame_changed(HWND hwnd, CGRect frame) +void macdrv_window_frame_changed(HWND hwnd, const macdrv_event *event) { struct macdrv_win_data *data; RECT rect; @@ -1516,9 +1658,10 @@ parent = GetAncestor(hwnd, GA_PARENT); - TRACE("win %p/%p new Cocoa frame %s\n", hwnd, data->cocoa_window, wine_dbgstr_cgrect(frame)); + TRACE("win %p/%p new Cocoa frame %s\n", hwnd, data->cocoa_window, + wine_dbgstr_cgrect(event->window_frame_changed.frame)); - rect = rect_from_cgrect(frame); + rect = rect_from_cgrect(event->window_frame_changed.frame); macdrv_mac_to_window_rect(data, &rect); MapWindowPoints(0, parent, (POINT *)&rect, 2); @@ -1533,7 +1676,7 @@ if ((data->window_rect.right - data->window_rect.left == width && data->window_rect.bottom - data->window_rect.top == height) || - (IsRectEmpty(&data->window_rect) && width <= 0 && height <= 0)) + (IsRectEmpty(&data->window_rect) && width == 1 && height == 1)) flags |= SWP_NOSIZE; else TRACE("%p resizing from (%dx%d) to (%dx%d)\n", hwnd, data->window_rect.right - data->window_rect.left, @@ -1541,6 +1684,8 @@ release_win_data(data); + if (event->window_frame_changed.fullscreen) + flags |= SWP_NOSENDCHANGING; if (!(flags & SWP_NOSIZE) || !(flags & SWP_NOMOVE)) SetWindowPos(hwnd, 0, rect.left, rect.top, width, height, flags); } @@ -1617,34 +1762,57 @@ /*********************************************************************** - * macdrv_window_did_minimize + * macdrv_window_minimize_requested * - * Handler for WINDOW_DID_MINIMIZE events. + * Handler for WINDOW_MINIMIZE_REQUESTED events. */ -void macdrv_window_did_minimize(HWND hwnd) +void macdrv_window_minimize_requested(HWND hwnd) { - struct macdrv_win_data *data; DWORD style; - - TRACE("win %p\n", hwnd); - - if (!(data = get_win_data(hwnd))) return; - if (data->minimized) goto done; + HMENU hSysMenu; style = GetWindowLongW(hwnd, GWL_STYLE); - - data->minimized = TRUE; - if ((style & WS_MINIMIZEBOX) && !(style & WS_DISABLED)) + if (!(style & WS_MINIMIZEBOX) || (style & (WS_DISABLED | WS_MINIMIZE))) { - TRACE("minimizing win %p/%p\n", hwnd, data->cocoa_window); - release_win_data(data); - SendMessageW(hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0); + TRACE("not minimizing win %p style 0x%08x\n", hwnd, style); return; } - TRACE("not minimizing win %p/%p style %08x\n", hwnd, data->cocoa_window, style); -done: - release_win_data(data); + hSysMenu = GetSystemMenu(hwnd, FALSE); + if (hSysMenu) + { + UINT state = GetMenuState(hSysMenu, SC_MINIMIZE, MF_BYCOMMAND); + if (state == 0xFFFFFFFF || (state & (MF_DISABLED | MF_GRAYED))) + { + TRACE("not minimizing win %p menu state 0x%08x\n", hwnd, state); + return; + } + } + + if (GetActiveWindow() != hwnd) + { + LRESULT ma = SendMessageW(hwnd, WM_MOUSEACTIVATE, (WPARAM)GetAncestor(hwnd, GA_ROOT), + MAKELPARAM(HTMINBUTTON, WM_NCLBUTTONDOWN)); + switch (ma) + { + case MA_NOACTIVATEANDEAT: + case MA_ACTIVATEANDEAT: + TRACE("not minimizing win %p mouse-activate result %ld\n", hwnd, ma); + return; + case MA_NOACTIVATE: + break; + case MA_ACTIVATE: + case 0: + SetActiveWindow(hwnd); + break; + default: + WARN("unknown WM_MOUSEACTIVATE code %ld\n", ma); + break; + } + } + + TRACE("minimizing win %p\n", hwnd); + SendMessageW(hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0); } @@ -1681,6 +1849,18 @@ } +/*********************************************************************** + * macdrv_window_brought_forward + * + * Handler for WINDOW_BROUGHT_FORWARD events. + */ +void macdrv_window_brought_forward(HWND hwnd) +{ + TRACE("win %p\n", hwnd); + SetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); +} + + struct quit_info { HWND *wins; UINT capacity; @@ -1846,3 +2026,45 @@ } macdrv_quit_reply(FALSE); } + + +/*********************************************************************** + * query_resize_start + * + * Handler for QUERY_RESIZE_START query. + */ +BOOL query_resize_start(HWND hwnd) +{ + TRACE("hwnd %p\n", hwnd); + + sync_window_min_max_info(hwnd); + SendMessageW(hwnd, WM_ENTERSIZEMOVE, 0, 0); + + return TRUE; +} + + +/*********************************************************************** + * query_resize_end + * + * Handler for QUERY_RESIZE_END query. + */ +BOOL query_resize_end(HWND hwnd) +{ + TRACE("hwnd %p\n", hwnd); + SendMessageW(hwnd, WM_EXITSIZEMOVE, 0, 0); + return TRUE; +} + + +/*********************************************************************** + * query_min_max_info + * + * Handler for QUERY_MIN_MAX_INFO query. + */ +BOOL query_min_max_info(HWND hwnd) +{ + TRACE("hwnd %p\n", hwnd); + sync_window_min_max_info(hwnd); + return TRUE; +} diff -Nru wine1.6-1.7.1-actually1.6/dlls/wineqtdecoder/qtsplitter.c wine1.6-1.6.1/dlls/wineqtdecoder/qtsplitter.c --- wine1.6-1.7.1-actually1.6/dlls/wineqtdecoder/qtsplitter.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/wineqtdecoder/qtsplitter.c 2013-11-15 19:30:24.000000000 +0000 @@ -884,6 +884,10 @@ int t; DWORD outputWidth, outputHeight, outputDepth; Fixed trackWidth, trackHeight; + Media videoMedia; + long sampleCount; + TimeValue64 duration; + TimeScale timeScale; ZeroMemory(&amt, sizeof(amt)); amt.formattype = FORMAT_VideoInfo; @@ -952,6 +956,12 @@ return E_FAIL; } + videoMedia = GetTrackMedia(trk); + sampleCount = GetMediaSampleCount(videoMedia); + timeScale = GetMediaTimeScale(videoMedia); + duration = GetMediaDisplayDuration(videoMedia); + pvi->AvgTimePerFrame = (100000.0 * sampleCount * timeScale) / duration; + piOutput.dir = PINDIR_OUTPUT; piOutput.pFilter = &filter->filter.IBaseFilter_iface; lstrcpyW(piOutput.achName,szwVideoOut); diff -Nru wine1.6-1.7.1-actually1.6/dlls/winex11.drv/Makefile.in wine1.6-1.6.1/dlls/winex11.drv/Makefile.in --- wine1.6-1.7.1-actually1.6/dlls/winex11.drv/Makefile.in 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/winex11.drv/Makefile.in 2013-11-15 19:30:24.000000000 +0000 @@ -2,7 +2,7 @@ IMPORTS = uuid user32 gdi32 advapi32 DELAYIMPORTS = comctl32 ole32 shell32 imm32 EXTRAINCL = @X_CFLAGS@ -EXTRALIBS = @X_LIBS@ @X_PRE_LIBS@ @XLIB@ @X_EXTRA_LIBS@ +EXTRALIBS = @X_LIBS@ @XLIB@ @X_EXTRA_LIBS@ C_SRCS = \ bitblt.c \ diff -Nru wine1.6-1.7.1-actually1.6/dlls/winex11.drv/opengl.c wine1.6-1.6.1/dlls/winex11.drv/opengl.c --- wine1.6-1.7.1-actually1.6/dlls/winex11.drv/opengl.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/winex11.drv/opengl.c 2013-11-15 19:30:24.000000000 +0000 @@ -3157,6 +3157,7 @@ pglXSwapBuffers(gdi_display, gl->drawable); break; case DC_GL_CHILD_WIN: + if (ctx) sync_context( ctx ); escape.gl_drawable = gl->drawable; /* fall through */ default: diff -Nru wine1.6-1.7.1-actually1.6/dlls/winex11.drv/window.c wine1.6-1.6.1/dlls/winex11.drv/window.c --- wine1.6-1.7.1-actually1.6/dlls/winex11.drv/window.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/winex11.drv/window.c 2013-11-15 19:30:24.000000000 +0000 @@ -1598,6 +1598,8 @@ struct x11drv_thread_data *thread_data = x11drv_thread_data(); struct x11drv_win_data *data; + destroy_gl_drawable( hwnd ); + if (!(data = get_win_data( hwnd ))) return; destroy_whole_window( data, FALSE ); @@ -1609,7 +1611,6 @@ XDeleteContext( gdi_display, (XID)hwnd, win_data_context ); release_win_data( data ); HeapFree( GetProcessHeap(), 0, data ); - destroy_gl_drawable( hwnd ); } @@ -1897,11 +1898,12 @@ SetPropA( hwnd, foreign_window_prop, (HANDLE)xwin ); XSaveContext( display, xwin, winContext, (char *)data->hwnd ); - ShowWindow( hwnd, SW_SHOW ); - TRACE( "win %lx parent %p style %08x %s -> hwnd %p\n", xwin, parent, style, wine_dbgstr_rect(&data->window_rect), hwnd ); + release_win_data( data ); + + ShowWindow( hwnd, SW_SHOW ); return hwnd; } diff -Nru wine1.6-1.7.1-actually1.6/dlls/winhttp/request.c wine1.6-1.6.1/dlls/winhttp/request.c --- wine1.6-1.7.1-actually1.6/dlls/winhttp/request.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/winhttp/request.c 2013-11-15 19:30:24.000000000 +0000 @@ -25,6 +25,7 @@ #include "wine/debug.h" #include +#include #ifdef HAVE_ARPA_INET_H # include #endif @@ -1005,6 +1006,8 @@ done: request->read_pos = request->read_size = 0; request->read_chunked = FALSE; + request->read_chunked_size = ~0u; + request->read_chunked_eof = FALSE; heap_free( addressW ); return TRUE; } @@ -1131,7 +1134,7 @@ request->optional_len = optional_len; len += optional_len; } - send_callback( &request->hdr, WINHTTP_CALLBACK_STATUS_REQUEST_SENT, &len, sizeof(DWORD) ); + send_callback( &request->hdr, WINHTTP_CALLBACK_STATUS_REQUEST_SENT, &len, sizeof(len) ); end: if (async) @@ -1270,12 +1273,14 @@ return FALSE; } scheme = auth_scheme_from_header( buffer ); + heap_free( buffer ); + if (!scheme) break; + if (first && index == 1) *first = *supported = scheme; else *supported |= scheme; - heap_free( buffer ); ret = TRUE; } return ret; @@ -1302,6 +1307,13 @@ set_last_error( ERROR_WINHTTP_INCORRECT_HANDLE_TYPE ); return FALSE; } + if (!supported || !first || !target) + { + release_object( &request->hdr ); + set_last_error( ERROR_INVALID_PARAMETER ); + return FALSE; + + } if (query_auth_schemes( request, WINHTTP_QUERY_WWW_AUTHENTICATE, supported, first )) { @@ -1375,7 +1387,7 @@ char c0, c1, c2, c3; const WCHAR *p = base64; - while (len >= 4) + while (len > 4) { if ((c0 = decode_char( p[0] )) > 63) return 0; if ((c1 = decode_char( p[1] )) > 63) return 0; @@ -1413,6 +1425,21 @@ } i += 2; } + else + { + if ((c0 = decode_char( p[0] )) > 63) return 0; + if ((c1 = decode_char( p[1] )) > 63) return 0; + if ((c2 = decode_char( p[2] )) > 63) return 0; + if ((c3 = decode_char( p[3] )) > 63) return 0; + + if (buf) + { + buf[i + 0] = (c0 << 2) | (c1 >> 4); + buf[i + 1] = (c1 << 4) | (c2 >> 2); + buf[i + 2] = (c2 << 6) | c3; + } + i += 3; + } return i; } @@ -1668,7 +1695,8 @@ static BOOL set_credentials( request_t *request, DWORD target, DWORD scheme, const WCHAR *username, const WCHAR *password ) { - if (!username || !password) + if ((scheme == WINHTTP_AUTH_SCHEME_BASIC || scheme == WINHTTP_AUTH_SCHEME_DIGEST) && + (!username || !password)) { set_last_error( ERROR_INVALID_PARAMETER ); return FALSE; @@ -1678,17 +1706,23 @@ case WINHTTP_AUTH_TARGET_SERVER: { heap_free( request->connect->username ); - if (!(request->connect->username = strdupW( username ))) return FALSE; + if (!username) request->connect->username = NULL; + else if (!(request->connect->username = strdupW( username ))) return FALSE; + heap_free( request->connect->password ); - if (!(request->connect->password = strdupW( password ))) return FALSE; + if (!password) request->connect->password = NULL; + else if (!(request->connect->password = strdupW( password ))) return FALSE; break; } case WINHTTP_AUTH_TARGET_PROXY: { heap_free( request->connect->session->proxy_username ); - if (!(request->connect->session->proxy_username = strdupW( username ))) return FALSE; + if (!username) request->connect->session->proxy_username = NULL; + else if (!(request->connect->session->proxy_username = strdupW( username ))) return FALSE; + heap_free( request->connect->session->proxy_password ); - if (!(request->connect->session->proxy_password = strdupW( password ))) return FALSE; + if (!password) request->connect->session->proxy_password = NULL; + else if (!(request->connect->session->proxy_password = strdupW( password ))) return FALSE; break; } default: @@ -1777,15 +1811,20 @@ { request->content_length = ~0u; request->read_chunked = TRUE; + request->read_chunked_size = ~0u; + request->read_chunked_eof = FALSE; } request->content_read = 0; return request->content_length; } /* read some more data into the read buffer */ -static BOOL read_more_data( request_t *request, int maxlen ) +static BOOL read_more_data( request_t *request, int maxlen, BOOL notify ) { int len; + BOOL ret; + + if (request->read_chunked_eof) return FALSE; if (request->read_size && request->read_pos) { @@ -1794,10 +1833,16 @@ request->read_pos = 0; } if (maxlen == -1) maxlen = sizeof(request->read_buf); - if (!netconn_recv( &request->netconn, request->read_buf + request->read_size, - maxlen - request->read_size, 0, &len )) return FALSE; + + if (notify) send_callback( &request->hdr, WINHTTP_CALLBACK_STATUS_RECEIVING_RESPONSE, NULL, 0 ); + + ret = netconn_recv( &request->netconn, request->read_buf + request->read_size, + maxlen - request->read_size, 0, &len ); + + if (notify) send_callback( &request->hdr, WINHTTP_CALLBACK_STATUS_RESPONSE_RECEIVED, &len, sizeof(len) ); + request->read_size += len; - return TRUE; + return ret; } /* remove some amount of data from the read buffer */ @@ -1827,7 +1872,7 @@ remove_data( request, bytes_read ); if (eol) break; - if (!read_more_data( request, -1 )) return FALSE; + if (!read_more_data( request, -1, TRUE )) return FALSE; if (!request->read_size) { *len = 0; @@ -1846,7 +1891,7 @@ } /* discard data contents until we reach end of line */ -static BOOL discard_eol( request_t *request ) +static BOOL discard_eol( request_t *request, BOOL notify ) { do { @@ -1857,24 +1902,23 @@ break; } request->read_pos = request->read_size = 0; /* discard everything */ - if (!read_more_data( request, -1 )) return FALSE; + if (!read_more_data( request, -1, notify )) return FALSE; } while (request->read_size); return TRUE; } /* read the size of the next chunk */ -static BOOL start_next_chunk( request_t *request ) +static BOOL start_next_chunk( request_t *request, BOOL notify ) { DWORD chunk_size = 0; - if (!request->content_length) return TRUE; - if (request->content_length == request->content_read) - { - /* read terminator for the previous chunk */ - if (!discard_eol( request )) return FALSE; - request->content_length = ~0u; - request->content_read = 0; - } + assert(!request->read_chunked_size || request->read_chunked_size == ~0u); + + if (request->read_chunked_eof) return FALSE; + + /* read terminator for the previous chunk */ + if (!request->read_chunked_size && !discard_eol( request, notify )) return FALSE; + for (;;) { while (request->read_size) @@ -1886,17 +1930,22 @@ else if (ch == ';' || ch == '\r' || ch == '\n') { TRACE("reading %u byte chunk\n", chunk_size); - request->content_length = chunk_size; - request->content_read = 0; - if (!discard_eol( request )) return FALSE; - return TRUE; + + if (request->content_length == ~0u) request->content_length = chunk_size; + else request->content_length += chunk_size; + + request->read_chunked_size = chunk_size; + if (!chunk_size) request->read_chunked_eof = TRUE; + + return discard_eol( request, notify ); } remove_data( request, 1 ); } - if (!read_more_data( request, -1 )) return FALSE; + if (!read_more_data( request, -1, notify )) return FALSE; if (!request->read_size) { request->content_length = request->content_read = 0; + request->read_chunked_size = 0; return TRUE; } } @@ -1905,32 +1954,34 @@ /* return the size of data available to be read immediately */ static DWORD get_available_data( request_t *request ) { - if (request->read_chunked && - (request->content_length == ~0u || request->content_length == request->content_read)) - return 0; - return min( request->read_size, request->content_length - request->content_read ); + if (request->read_chunked) return min( request->read_chunked_size, request->read_size ); + return request->read_size; } /* check if we have reached the end of the data to read */ static BOOL end_of_read_data( request_t *request ) { - if (request->read_chunked) return (request->content_length == 0); + if (request->read_chunked) return request->read_chunked_eof; if (request->content_length == ~0u) return FALSE; return (request->content_length == request->content_read); } -static BOOL refill_buffer( request_t *request ) +static BOOL refill_buffer( request_t *request, BOOL notify ) { int len = sizeof(request->read_buf); - if (request->read_chunked && - (request->content_length == ~0u || request->content_length == request->content_read)) + if (request->read_chunked) { - if (!start_next_chunk( request )) return FALSE; + if (request->read_chunked_eof) return FALSE; + if (request->read_chunked_size == ~0u || !request->read_chunked_size) + { + if (!start_next_chunk( request, notify )) return FALSE; + } } - if (request->content_length != ~0u) len = min( len, request->content_length - request->content_read ); + if (!request->read_chunked && request->content_length != ~0u) + len = min( len, request->content_length - request->content_read ); if (len <= request->read_size) return TRUE; - if (!read_more_data( request, len )) return FALSE; + if (!read_more_data( request, len, notify )) return FALSE; if (!request->read_size) request->content_length = request->content_read = 0; return TRUE; } @@ -1950,8 +2001,6 @@ if (!netconn_connected( &request->netconn )) return FALSE; - send_callback( &request->hdr, WINHTTP_CALLBACK_STATUS_RECEIVING_RESPONSE, NULL, 0 ); - received_len = 0; do { @@ -2007,7 +2056,7 @@ header_t *header; buflen = MAX_REPLY_LEN; - if (!read_line( request, buffer, &buflen )) goto end; + if (!read_line( request, buffer, &buflen )) return TRUE; received_len += buflen; if (!*buffer) break; @@ -2032,9 +2081,6 @@ } TRACE("raw headers: %s\n", debugstr_w(raw_headers)); - -end: - send_callback( &request->hdr, WINHTTP_CALLBACK_STATUS_RESPONSE_RECEIVED, &received_len, sizeof(DWORD) ); return TRUE; } @@ -2058,46 +2104,35 @@ static BOOL read_data( request_t *request, void *buffer, DWORD size, DWORD *read, BOOL async ) { - BOOL ret = TRUE; - int len, bytes_read = 0; + int count, bytes_read = 0; - if (request->read_chunked && - (request->content_length == ~0u || request->content_length == request->content_read)) - { - if (!start_next_chunk( request )) goto done; - } - if (request->content_length != ~0u) size = min( size, request->content_length - request->content_read ); + if (end_of_read_data( request )) goto done; - if (request->read_size) - { - bytes_read = min( request->read_size, size ); - memcpy( buffer, request->read_buf + request->read_pos, bytes_read ); - remove_data( request, bytes_read ); - } - if (size > bytes_read && (!bytes_read || !async)) + while (size) { - if ((ret = netconn_recv( &request->netconn, (char *)buffer + bytes_read, size - bytes_read, - async ? 0 : MSG_WAITALL, &len ))) - bytes_read += len; + if (!(count = get_available_data( request ))) + { + if (!refill_buffer( request, async )) goto done; + if (!(count = get_available_data( request ))) goto done; + } + count = min( count, size ); + memcpy( (char *)buffer + bytes_read, request->read_buf + request->read_pos, count ); + remove_data( request, count ); + if (request->read_chunked) request->read_chunked_size -= count; + size -= count; + bytes_read += count; + request->content_read += count; + if (end_of_read_data( request )) goto done; } + if (request->read_chunked && !request->read_chunked_size) refill_buffer( request, async ); done: - request->content_read += bytes_read; TRACE( "retrieved %u bytes (%u/%u)\n", bytes_read, request->content_read, request->content_length ); - if (async) - { - if (ret) send_callback( &request->hdr, WINHTTP_CALLBACK_STATUS_READ_COMPLETE, buffer, bytes_read ); - else - { - WINHTTP_ASYNC_RESULT result; - result.dwResult = API_READ_DATA; - result.dwError = get_last_error(); - send_callback( &request->hdr, WINHTTP_CALLBACK_STATUS_REQUEST_ERROR, &result, sizeof(result) ); - } - } + + if (async) send_callback( &request->hdr, WINHTTP_CALLBACK_STATUS_READ_COMPLETE, buffer, bytes_read ); if (read) *read = bytes_read; - if (!bytes_read && request->content_read == request->content_length) finished_reading( request ); - return ret; + if (end_of_read_data( request )) finished_reading( request ); + return TRUE; } /* read any content returned by the server so that the connection can be reused */ @@ -2106,11 +2141,6 @@ DWORD bytes_read; char buffer[2048]; - if (request->content_length == ~0u) - { - finished_reading( request ); - return; - } for (;;) { if (!read_data( request, buffer, sizeof(buffer), &bytes_read, FALSE ) || !bytes_read) return; @@ -2212,6 +2242,7 @@ if (!(ret = netconn_init( &request->netconn ))) goto end; request->read_pos = request->read_size = 0; request->read_chunked = FALSE; + request->read_chunked_eof = FALSE; } if (!(ret = add_host_header( request, WINHTTP_ADDREQ_FLAG_REPLACE ))) goto end; if (!(ret = open_connection( request ))) goto end; @@ -2294,6 +2325,8 @@ break; } + if (ret) refill_buffer( request, FALSE ); + if (async) { if (ret) send_callback( &request->hdr, WINHTTP_CALLBACK_STATUS_HEADERS_AVAILABLE, NULL, 0 ); @@ -2356,45 +2389,12 @@ static BOOL query_data_available( request_t *request, DWORD *available, BOOL async ) { - BOOL ret = TRUE; - DWORD count; + DWORD count = get_available_data( request ); - if (!(count = get_available_data( request ))) - { - if (end_of_read_data( request )) - { - if (available) *available = 0; - return TRUE; - } - } - refill_buffer( request ); - count = get_available_data( request ); - - if (count == sizeof(request->read_buf)) /* check if we have even more pending in the socket */ - { - DWORD extra; - if ((ret = netconn_query_data_available( &request->netconn, &extra ))) - { - count = min( count + extra, request->content_length - request->content_read ); - } - } - if (async) - { - if (ret) send_callback( &request->hdr, WINHTTP_CALLBACK_STATUS_DATA_AVAILABLE, &count, sizeof(count) ); - else - { - WINHTTP_ASYNC_RESULT result; - result.dwResult = API_QUERY_DATA_AVAILABLE; - result.dwError = get_last_error(); - send_callback( &request->hdr, WINHTTP_CALLBACK_STATUS_REQUEST_ERROR, &result, sizeof(result) ); - } - } - if (ret) - { - TRACE("%u bytes available\n", count); - if (available) *available = count; - } - return ret; + if (async) send_callback( &request->hdr, WINHTTP_CALLBACK_STATUS_DATA_AVAILABLE, &count, sizeof(count) ); + TRACE("%u bytes available\n", count); + if (available) *available = count; + return TRUE; } static void task_query_data_available( task_header_t *task ) @@ -2502,7 +2502,7 @@ if (async) { - if (ret) send_callback( &request->hdr, WINHTTP_CALLBACK_STATUS_WRITE_COMPLETE, &num_bytes, sizeof(DWORD) ); + if (ret) send_callback( &request->hdr, WINHTTP_CALLBACK_STATUS_WRITE_COMPLETE, &num_bytes, sizeof(num_bytes) ); else { WINHTTP_ASYNC_RESULT result; diff -Nru wine1.6-1.7.1-actually1.6/dlls/winhttp/winhttp_private.h wine1.6-1.6.1/dlls/winhttp/winhttp_private.h --- wine1.6-1.7.1-actually1.6/dlls/winhttp/winhttp_private.h 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/winhttp/winhttp_private.h 2013-11-15 19:30:24.000000000 +0000 @@ -187,9 +187,11 @@ int send_timeout; int recv_timeout; LPWSTR status_text; - DWORD content_length; /* total number of bytes to be read (per chunk) */ + DWORD content_length; /* total number of bytes to be read */ DWORD content_read; /* bytes read so far */ BOOL read_chunked; /* are we reading in chunked mode? */ + BOOL read_chunked_eof; /* end of stream in chunked mode */ + BOOL read_chunked_size; /* chunk size remaining */ DWORD read_pos; /* current read position in read_buf */ DWORD read_size; /* valid data size in read_buf */ char read_buf[4096]; /* buffer for already read but not returned data */ diff -Nru wine1.6-1.7.1-actually1.6/dlls/wininet/http.c wine1.6-1.6.1/dlls/wininet/http.c --- wine1.6-1.7.1-actually1.6/dlls/wininet/http.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/wininet/http.c 2013-11-15 19:30:24.000000000 +0000 @@ -141,6 +141,8 @@ static const WCHAR szWarning[] = { 'W','a','r','n','i','n','g',0 }; static const WCHAR szWWW_Authenticate[] = { 'W','W','W','-','A','u','t','h','e','n','t','i','c','a','t','e',0 }; +static const WCHAR emptyW[] = {0}; + #define HTTP_REFERER szReferer #define HTTP_ACCEPT szAccept #define HTTP_USERAGENT szUser_Agent @@ -398,6 +400,7 @@ DWORD buf_size; DWORD buf_pos; DWORD chunk_size; + BOOL end_of_data; } chunked_stream_t; static inline void destroy_data_stream(data_stream_t *stream) @@ -2030,24 +2033,35 @@ int len; if (unicode) { - len = strlenW(str); + WCHAR *buf = buffer; + + if (str) len = strlenW(str); + else len = 0; if (*size < (len + 1) * sizeof(WCHAR)) { *size = (len + 1) * sizeof(WCHAR); return ERROR_INSUFFICIENT_BUFFER; } - strcpyW(buffer, str); + if (str) strcpyW(buf, str); + else buf[0] = 0; + *size = len; return ERROR_SUCCESS; } else { - len = WideCharToMultiByte(CP_ACP, 0, str, -1, buffer, *size, NULL, NULL); + char *buf = buffer; + + if (str) len = WideCharToMultiByte(CP_ACP, 0, str, -1, NULL, 0, NULL, NULL); + else len = 1; if (*size < len) { *size = len; return ERROR_INSUFFICIENT_BUFFER; } + if (str) WideCharToMultiByte(CP_ACP, 0, str, -1, buf, *size, NULL, NULL); + else buf[0] = 0; + *size = len - 1; return ERROR_SUCCESS; } @@ -2684,6 +2698,8 @@ DWORD res; int len; + assert(!stream->end_of_data); + if (stream->buf_pos) { /* move existing data to the start of the buffer */ @@ -2731,10 +2747,14 @@ /* read the size of the next chunk (the read section must be held) */ static DWORD start_next_chunk(chunked_stream_t *stream, http_request_t *req) { - /* TODOO */ DWORD chunk_size = 0, res; - if(stream->chunk_size != ~0u && (res = discard_chunked_eol(stream, req)) != ERROR_SUCCESS) + assert(!stream->chunk_size || stream->chunk_size == ~0u); + + if (stream->end_of_data) return ERROR_NO_MORE_FILES; + + /* read terminator for the previous chunk */ + if(!stream->chunk_size && (res = discard_chunked_eol(stream, req)) != ERROR_SUCCESS) return res; for (;;) @@ -2749,7 +2769,10 @@ { TRACE( "reading %u byte chunk\n", chunk_size ); stream->chunk_size = chunk_size; - req->contentLength += chunk_size; + if (req->contentLength == ~0u) req->contentLength = chunk_size; + else req->contentLength += chunk_size; + + if (!chunk_size) stream->end_of_data = TRUE; return discard_chunked_eol(stream, req); } remove_chunked_data(stream, 1); @@ -2772,7 +2795,7 @@ static BOOL chunked_end_of_data(data_stream_t *stream, http_request_t *req) { chunked_stream_t *chunked_stream = (chunked_stream_t*)stream; - return !chunked_stream->chunk_size; + return chunked_stream->end_of_data; } static DWORD chunked_read(data_stream_t *stream, http_request_t *req, BYTE *buf, DWORD size, @@ -2781,13 +2804,13 @@ chunked_stream_t *chunked_stream = (chunked_stream_t*)stream; DWORD read_bytes = 0, ret_read = 0, res = ERROR_SUCCESS; - if(chunked_stream->chunk_size == ~0u) { + if(!chunked_stream->chunk_size || chunked_stream->chunk_size == ~0u) { res = start_next_chunk(chunked_stream, req); if(res != ERROR_SUCCESS) return res; } - while(size && chunked_stream->chunk_size) { + while(size && chunked_stream->chunk_size && !chunked_stream->end_of_data) { if(chunked_stream->buf_size) { read_bytes = min(size, min(chunked_stream->buf_size, chunked_stream->chunk_size)); @@ -2821,7 +2844,7 @@ chunked_stream->chunk_size -= read_bytes; size -= read_bytes; ret_read += read_bytes; - if(!chunked_stream->chunk_size) { + if(size && !chunked_stream->chunk_size) { assert(read_mode != READMODE_NOBLOCK); res = start_next_chunk(chunked_stream, req); if(res != ERROR_SUCCESS) @@ -2841,8 +2864,8 @@ { chunked_stream_t *chunked_stream = (chunked_stream_t*)stream; - /* FIXME: we can do better */ - return !chunked_stream->chunk_size; + remove_chunked_data(chunked_stream, chunked_stream->buf_size); + return chunked_stream->end_of_data; } static void chunked_destroy(data_stream_t *stream) @@ -2891,6 +2914,7 @@ chunked_stream->data_stream.vtbl = &chunked_stream_vtbl; chunked_stream->buf_size = chunked_stream->buf_pos = 0; chunked_stream->chunk_size = ~0u; + chunked_stream->end_of_data = FALSE; if(request->read_size) { memcpy(chunked_stream->buf, request->read_buf+request->read_pos, request->read_size); @@ -3874,6 +3898,8 @@ DWORD len; WCHAR* bufferW; + TRACE("%p %x\n", hHttpRequest, dwInfoLevel); + if((dwInfoLevel & HTTP_QUERY_FLAG_NUMBER) || (dwInfoLevel & HTTP_QUERY_FLAG_SYSTEMTIME)) { @@ -4828,7 +4854,6 @@ LPWSTR requestString = NULL; INT responseLen; BOOL loop_next; - static const WCHAR szPost[] = { 'P','O','S','T',0 }; static const WCHAR szContentLength[] = { 'C','o','n','t','e','n','t','-','L','e','n','g','t','h',':',' ','%','l','i','\r','\n',0 }; WCHAR contentLengthStr[sizeof szContentLength/2 /* includes \r\n */ + 20 /* int */ ]; @@ -4866,7 +4891,7 @@ static const WCHAR pragma_nocache[] = {'P','r','a','g','m','a',':',' ','n','o','-','c','a','c','h','e','\r','\n',0}; HTTP_HttpAddRequestHeadersW(request, pragma_nocache, strlenW(pragma_nocache), HTTP_ADDREQ_FLAG_ADD_IF_NEW); } - if ((request->hdr.dwFlags & INTERNET_FLAG_NO_CACHE_WRITE) && !strcmpW(request->verb, szPost)) + if ((request->hdr.dwFlags & INTERNET_FLAG_NO_CACHE_WRITE) && strcmpW(request->verb, szGET)) { static const WCHAR cache_control[] = {'C','a','c','h','e','-','C','o','n','t','r','o','l',':', ' ','n','o','-','c','a','c','h','e','\r','\n',0}; @@ -5857,9 +5882,8 @@ /* split the status code from the status text */ status_text = strchrW( status_code, ' ' ); - if( !status_text ) - goto lend; - *status_text++=0; + if( status_text ) + *status_text++=0; request->status_code = atoiW(status_code); @@ -5891,11 +5915,12 @@ heap_free(request->statusText); request->version = heap_strdupW(buffer); - request->statusText = heap_strdupW(status_text); + request->statusText = heap_strdupW(status_text ? status_text : emptyW); /* Restore the spaces */ *(status_code-1) = ' '; - *(status_text-1) = ' '; + if (status_text) + *(status_text-1) = ' '; /* Parse each response line */ do @@ -6048,7 +6073,7 @@ { HTTP_DeleteCustomHeader( request, index ); - if (value) + if (value && value[0]) { HTTPHEADERW hdr; diff -Nru wine1.6-1.7.1-actually1.6/dlls/winmm/mmio.c wine1.6-1.6.1/dlls/winmm/mmio.c --- wine1.6-1.7.1-actually1.6/dlls/winmm/mmio.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/winmm/mmio.c 2013-11-15 19:30:24.000000000 +0000 @@ -664,7 +664,7 @@ wm->bBufferLoaded = TRUE; /* see mmioDosIOProc for that one */ - wm->info.adwInfo[0] = refmminfo->adwInfo[0]; + memcpy( wm->info.adwInfo, refmminfo->adwInfo, sizeof(wm->info.adwInfo) ); /* call IO proc to actually open file */ refmminfo->wErrorRet = send_message(wm->ioProc, &wm->info, MMIOM_OPEN, diff -Nru wine1.6-1.7.1-actually1.6/dlls/winmm/waveform.c wine1.6-1.6.1/dlls/winmm/waveform.c --- wine1.6-1.7.1-actually1.6/dlls/winmm/waveform.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/winmm/waveform.c 2013-11-15 19:30:24.000000000 +0000 @@ -68,8 +68,8 @@ * - We must be able to identify bad devices without crashing. */ -/* buffer size = 10 * 100000 (100 ns) = 0.1 seconds */ -#define AC_BUFLEN (10 * 100000) +/* buffer size = 100 * 100000 (100 ns) = 1 second */ +#define AC_BUFLEN (100 * 100000) #define MAX_DEVICES 256 #define MAPPER_INDEX 0x3F @@ -1228,6 +1228,8 @@ WINMM_MMDevice *mmdevice; if(WINMM_IsMapper(info->req_device)){ + if (g_outmmdevices_count == 0) + return MMSYSERR_BADDEVICEID; devices = g_out_mapper_devices; mmdevice = read_map(g_out_map, 0); lock = &g_devthread_lock; @@ -1317,6 +1319,8 @@ HRESULT hr; if(WINMM_IsMapper(info->req_device)){ + if (g_inmmdevices_count == 0) + return MMSYSERR_BADDEVICEID; devices = g_in_mapper_devices; mmdevice = read_map(g_in_map, 0); lock = &g_devthread_lock; @@ -1901,7 +1905,7 @@ if(packet > 0) WARN("losing %u frames\n", packet); - device->played_frames += packet_len; + device->played_frames += packet_len - packet; } exit: diff -Nru wine1.6-1.7.1-actually1.6/dlls/ws2_32/socket.c wine1.6-1.6.1/dlls/ws2_32/socket.c --- wine1.6-1.7.1-actually1.6/dlls/ws2_32/socket.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/ws2_32/socket.c 2013-11-15 19:30:24.000000000 +0000 @@ -2126,6 +2126,24 @@ } /*********************************************************************** + * WSASendMsg + */ +int WINAPI WSASendMsg( SOCKET s, LPWSAMSG msg, DWORD dwFlags, LPDWORD lpNumberOfBytesSent, + LPWSAOVERLAPPED lpOverlapped, + LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine) +{ + if (!msg) + { + SetLastError( WSAEFAULT ); + return SOCKET_ERROR; + } + + return WS2_sendto( s, msg->lpBuffers, msg->dwBufferCount, lpNumberOfBytesSent, + dwFlags, msg->name, msg->namelen, + lpOverlapped, lpCompletionRoutine ); +} + +/*********************************************************************** * WSARecvMsg * * Perform a receive operation that is capable of returning message @@ -3540,7 +3558,8 @@ } else if ( IsEqualGUID(&wsasendmsg_guid, in_buff) ) { - FIXME("SIO_GET_EXTENSION_FUNCTION_POINTER: unimplemented WSASendMsg\n"); + *(LPFN_WSASENDMSG *)out_buff = WSASendMsg; + break; } else FIXME("SIO_GET_EXTENSION_FUNCTION_POINTER %s: stub\n", debugstr_guid(in_buff)); @@ -5538,6 +5557,9 @@ TRACE("af=%d type=%d protocol=%d protocol_info=%p group=%d flags=0x%x\n", af, type, protocol, lpProtocolInfo, g, dwFlags ); + if (!num_startup) + return WSANOTINITIALISED; + /* hack for WSADuplicateSocket */ if (lpProtocolInfo && lpProtocolInfo->dwServiceFlags4 == 0xff00ff00) { ret = lpProtocolInfo->dwCatalogEntryId; diff -Nru wine1.6-1.7.1-actually1.6/dlls/ws2_32/ws2_32.spec wine1.6-1.6.1/dlls/ws2_32/ws2_32.spec --- wine1.6-1.7.1-actually1.6/dlls/ws2_32/ws2_32.spec 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/dlls/ws2_32/ws2_32.spec 2013-11-15 19:30:24.000000000 +0000 @@ -97,6 +97,7 @@ @ stdcall WSAResetEvent(long) kernel32.ResetEvent @ stdcall WSASend(long ptr long ptr long ptr ptr) @ stdcall WSASendDisconnect(long ptr) +@ stdcall WSASendMsg(long ptr long ptr ptr ptr) @ stdcall WSASendTo(long ptr long ptr long ptr long ptr ptr) @ stdcall WSASetEvent(long) kernel32.SetEvent @ stdcall WSASetServiceA(ptr long long) diff -Nru wine1.6-1.7.1-actually1.6/fonts/wingding.sfd wine1.6-1.6.1/fonts/wingding.sfd --- wine1.6-1.7.1-actually1.6/fonts/wingding.sfd 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/fonts/wingding.sfd 2013-11-15 19:30:24.000000000 +0000 @@ -13,7 +13,6 @@ LayerCount: 2 Layer: 0 1 "Back" 1 Layer: 1 1 "Fore" 0 -NeedsXUIDChange: 1 FSType: 0 OS2Version: 0 OS2_WeightWidthSlopeOnly: 0 @@ -52,7 +51,7 @@ FitToEm: 1 WinInfo: 0 33 12 TeXData: 1 0 0 708670 354335 236222 1342177 -2147484 236222 783286 444596 497025 792723 393216 433062 380633 303038 157286 324010 404750 52429 2506097 1059062 262144 -BeginChars: 256 4 +BeginChars: 256 30 StartChar: f020 Encoding: 0 61472 0 @@ -75,9 +74,17 @@ EndSplineSet EndChar -StartChar: ogonek -Encoding: 254 731 1 -Width: 1896 +StartChar: space +Encoding: 32 32 1 +Width: 2048 +VWidth: 0 +Flags: W +LayerCount: 2 +EndChar + +StartChar: boxcheckbld +Encoding: 254 731 2 +Width: 1826 Flags: W LayerCount: 2 Fore @@ -104,9 +111,9 @@ EndSplineSet EndChar -StartChar: registered -Encoding: 168 174 2 -Width: 1884 +StartChar: box2 +Encoding: 168 174 3 +Width: 1825 Flags: W LayerCount: 2 Fore @@ -124,10 +131,10 @@ EndSplineSet EndChar -StartChar: G -Encoding: 71 71 3 -Width: 1581 -Flags: HW +StartChar: handptup +Encoding: 71 71 4 +Width: 1124 +Flags: W LayerCount: 2 Fore SplineSet @@ -162,5 +169,522 @@ 408 776 408 776 408 428 c 0,18,19 EndSplineSet EndChar + +StartChar: circle6 +Encoding: 108 955 5 +Width: 1529 +Flags: W +LayerCount: 2 +Fore +SplineSet +173 739 m 0,0,1 + 173 976 173 976 357.5 1155 c 128,-1,2 + 542 1334 542 1334 787 1334 c 0,3,4 + 1024 1334 1024 1334 1191 1167 c 128,-1,5 + 1358 1000 1358 1000 1358 743 c 0,6,7 + 1358 490 1358 490 1183 319.5 c 128,-1,8 + 1008 149 1008 149 763 149 c 0,9,10 + 526 149 526 149 349.5 323.5 c 128,-1,11 + 173 498 173 498 173 739 c 0,0,1 +EndSplineSet +EndChar + +StartChar: square6 +Encoding: 110 957 6 +Width: 1529 +Flags: W +LayerCount: 2 +Fore +SplineSet +1357 148 m 1,0,-1 + 1357 1332 l 1,1,-1 + 173 1332 l 1,2,-1 + 173 148 l 1,3,-1 + 1357 148 l 1,0,-1 +EndSplineSet +EndChar + +StartChar: lozenge4 +Encoding: 115 963 7 +Width: 937 +Flags: W +LayerCount: 2 +Fore +SplineSet +465 1155 m 1,0,-1 + 755 736 l 1,1,-1 + 465 318 l 1,2,-1 + 176 736 l 1,3,-1 + 465 1155 l 1,0,-1 +EndSplineSet +EndChar + +StartChar: lozenge6 +Encoding: 116 964 8 +Width: 1529 +Flags: W +LayerCount: 2 +Fore +SplineSet +765 1555 m 1,0,-1 + 1347 734 l 1,1,-1 + 765 -86 l 1,2,-1 + 184 734 l 1,3,-1 + 765 1555 l 1,0,-1 +EndSplineSet +EndChar + +StartChar: rhombus6 +Encoding: 117 965 9 +Width: 2020 +Flags: W +LayerCount: 2 +Fore +SplineSet +1008 1559 m 1,0,-1 + 1842 725 l 1,1,-1 + 1008 -110 l 1,2,-1 + 173 725 l 1,3,-1 + 1008 1559 l 1,0,-1 +EndSplineSet +EndChar + +StartChar: xrhombus +Encoding: 118 982 10 +Width: 1825 +Flags: W +LayerCount: 2 +Fore +SplineSet +773 740 m 1,0,-1 + 473 1040 l 1,1,-1 + 173 740 l 1,2,-1 + 473 440 l 1,3,-1 + 773 740 l 1,0,-1 +1212 300 m 1,4,-1 + 912 600 l 1,5,-1 + 612 300 l 1,6,-1 + 912 0 l 1,7,-1 + 1212 300 l 1,4,-1 +1654 740 m 1,8,-1 + 1353 1041 l 1,9,-1 + 1052 740 l 1,10,-1 + 1353 439 l 1,11,-1 + 1654 740 l 1,8,-1 +1212 1180 m 1,12,-1 + 912 1480 l 1,13,-1 + 612 1180 l 1,14,-1 + 912 880 l 1,15,-1 + 1212 1180 l 1,12,-1 +EndSplineSet +EndChar + +StartChar: rhombus4 +Encoding: 119 969 11 +Width: 1183 +Flags: W +LayerCount: 2 +Fore +SplineSet +605 1118 m 1,0,-1 + 1040 682 l 1,1,-1 + 605 246 l 1,2,-1 + 169 682 l 1,3,-1 + 605 1118 l 1,0,-1 +EndSplineSet +EndChar + +StartChar: circle2 +Encoding: 158 158 12 +Width: 641 +Flags: W +LayerCount: 2 +Fore +SplineSet +173 740 m 0,0,1 + 173 799 173 799 219.5 843.5 c 128,-1,2 + 266 888 266 888 327 888 c 0,3,4 + 387 888 387 888 428 846.5 c 128,-1,5 + 469 805 469 805 469 741 c 0,6,7 + 469 678 469 678 425.5 635 c 128,-1,8 + 382 592 382 592 321 592 c 0,9,10 + 261 592 261 592 217 636 c 128,-1,11 + 173 680 173 680 173 740 c 0,0,1 +EndSplineSet +EndChar + +StartChar: circle4 +Encoding: 159 159 13 +Width: 937 +Flags: W +LayerCount: 2 +Fore +SplineSet +173 739 m 0,0,1 + 173 857 173 857 265.5 946.5 c 128,-1,2 + 358 1036 358 1036 480 1036 c 0,3,4 + 598 1036 598 1036 681.5 952.5 c 128,-1,5 + 765 869 765 869 765 741 c 0,6,7 + 765 615 765 615 677.5 529.5 c 128,-1,8 + 590 444 590 444 468 444 c 0,9,10 + 350 444 350 444 261.5 531.5 c 128,-1,11 + 173 619 173 619 173 739 c 0,0,1 +EndSplineSet +EndChar + +StartChar: sqaure2 +Encoding: 160 160 14 +Width: 641 +Flags: W +LayerCount: 2 +Fore +SplineSet +469 592 m 1,0,-1 + 469 888 l 1,1,-1 + 173 888 l 1,2,-1 + 173 592 l 1,3,-1 + 469 592 l 1,0,-1 +EndSplineSet +EndChar + +StartChar: ring2 +Encoding: 161 978 15 +Width: 1825 +Flags: W +LayerCount: 2 +Fore +SplineSet +498.5 311.5 m 128,-1,1 + 675 137 675 137 912 137 c 0,2,3 + 1157 137 1157 137 1332 307.5 c 128,-1,4 + 1507 478 1507 478 1507 731 c 0,5,6 + 1507 988 1507 988 1340 1155 c 128,-1,7 + 1173 1322 1173 1322 936 1322 c 0,8,9 + 691 1322 691 1322 506.5 1143 c 128,-1,10 + 322 964 322 964 322 727 c 0,11,0 + 322 486 322 486 498.5 311.5 c 128,-1,1 +1430.5 1245.5 m 128,-1,13 + 1644 1032 1644 1032 1644 730 c 256,14,15 + 1644 428 1644 428 1430.5 214 c 128,-1,16 + 1217 0 1217 0 914 0 c 0,17,18 + 612 0 612 0 398.5 214 c 128,-1,19 + 185 428 185 428 185 730 c 256,20,21 + 185 1032 185 1032 398.5 1245.5 c 128,-1,22 + 612 1459 612 1459 914 1459 c 0,23,12 + 1217 1459 1217 1459 1430.5 1245.5 c 128,-1,13 +EndSplineSet +EndChar + +StartChar: ring4 +Encoding: 162 8242 16 +Width: 1825 +Flags: W +LayerCount: 2 +Fore +SplineSet +573 387 m 128,-1,1 + 718 244 718 244 912 244 c 0,2,3 + 1113 244 1113 244 1256.5 384 c 128,-1,4 + 1400 524 1400 524 1400 731 c 0,5,6 + 1400 942 1400 942 1263 1079 c 128,-1,7 + 1126 1216 1126 1216 932 1216 c 0,8,9 + 731 1216 731 1216 579.5 1069 c 128,-1,10 + 428 922 428 922 428 728 c 0,11,0 + 428 530 428 530 573 387 c 128,-1,1 +1430.5 1245.5 m 128,-1,13 + 1644 1032 1644 1032 1644 730 c 256,14,15 + 1644 428 1644 428 1430.5 214 c 128,-1,16 + 1217 0 1217 0 914 0 c 0,17,18 + 612 0 612 0 398.5 214 c 128,-1,19 + 185 428 185 428 185 730 c 256,20,21 + 185 1032 185 1032 398.5 1245.5 c 128,-1,22 + 612 1459 612 1459 914 1459 c 0,23,12 + 1217 1459 1217 1459 1430.5 1245.5 c 128,-1,13 +EndSplineSet +EndChar + +StartChar: ring6 +Encoding: 163 8804 17 +Width: 1825 +Flags: W +LayerCount: 2 +Fore +SplineSet +1430.5 1245.5 m 128,-1,1 + 1644 1032 1644 1032 1644 730 c 256,2,3 + 1644 428 1644 428 1430.5 214 c 128,-1,4 + 1217 0 1217 0 914 0 c 0,5,6 + 612 0 612 0 398.5 214 c 128,-1,7 + 185 428 185 428 185 730 c 256,8,9 + 185 1032 185 1032 398.5 1245.5 c 128,-1,10 + 612 1459 612 1459 914 1459 c 0,11,0 + 1217 1459 1217 1459 1430.5 1245.5 c 128,-1,1 +706.5 521.5 m 128,-1,13 + 795 434 795 434 913 434 c 0,14,15 + 1035 434 1035 434 1122.5 519.5 c 128,-1,16 + 1210 605 1210 605 1210 731 c 0,17,18 + 1210 859 1210 859 1126.5 942.5 c 128,-1,19 + 1043 1026 1043 1026 925 1026 c 0,20,21 + 803 1026 803 1026 710.5 936.5 c 128,-1,22 + 618 847 618 847 618 729 c 0,23,12 + 618 609 618 609 706.5 521.5 c 128,-1,13 +EndSplineSet +EndChar + +StartChar: ringbutton2 +Encoding: 164 8260 18 +Width: 1825 +Flags: W +LayerCount: 2 +Fore +SplineSet +498.5 311.5 m 128,-1,1 + 675 137 675 137 912 137 c 0,2,3 + 1157 137 1157 137 1332 307.5 c 128,-1,4 + 1507 478 1507 478 1507 731 c 0,5,6 + 1507 988 1507 988 1340 1155 c 128,-1,7 + 1173 1322 1173 1322 936 1322 c 0,8,9 + 691 1322 691 1322 506.5 1143 c 128,-1,10 + 322 964 322 964 322 727 c 0,11,0 + 322 486 322 486 498.5 311.5 c 128,-1,1 +1430.5 1245.5 m 128,-1,13 + 1644 1032 1644 1032 1644 730 c 256,14,15 + 1644 428 1644 428 1430.5 214 c 128,-1,16 + 1217 0 1217 0 914 0 c 0,17,18 + 612 0 612 0 398.5 214 c 128,-1,19 + 185 428 185 428 185 730 c 256,20,21 + 185 1032 185 1032 398.5 1245.5 c 128,-1,22 + 612 1459 612 1459 914 1459 c 0,23,12 + 1217 1459 1217 1459 1430.5 1245.5 c 128,-1,13 +618 729 m 0,24,25 + 618 847 618 847 710.5 936.5 c 128,-1,26 + 803 1026 803 1026 925 1026 c 0,27,28 + 1043 1026 1043 1026 1126.5 942.5 c 128,-1,29 + 1210 859 1210 859 1210 731 c 0,30,31 + 1210 605 1210 605 1122.5 519.5 c 128,-1,32 + 1035 434 1035 434 913 434 c 0,33,34 + 795 434 795 434 706.5 521.5 c 128,-1,35 + 618 609 618 609 618 729 c 0,24,25 +EndSplineSet +EndChar + +StartChar: target +Encoding: 165 8734 19 +Width: 1825 +Flags: W +LayerCount: 2 +Fore +SplineSet +498.5 311.5 m 128,-1,1 + 675 137 675 137 912 137 c 0,2,3 + 1157 137 1157 137 1332 307.5 c 128,-1,4 + 1507 478 1507 478 1507 731 c 0,5,6 + 1507 988 1507 988 1340 1155 c 128,-1,7 + 1173 1322 1173 1322 936 1322 c 0,8,9 + 691 1322 691 1322 506.5 1143 c 128,-1,10 + 322 964 322 964 322 727 c 0,11,0 + 322 486 322 486 498.5 311.5 c 128,-1,1 +1430.5 1245.5 m 128,-1,13 + 1644 1032 1644 1032 1644 730 c 256,14,15 + 1644 428 1644 428 1430.5 214 c 128,-1,16 + 1217 0 1217 0 914 0 c 0,17,18 + 612 0 612 0 398.5 214 c 128,-1,19 + 185 428 185 428 185 730 c 256,20,21 + 185 1032 185 1032 398.5 1245.5 c 128,-1,22 + 612 1459 612 1459 914 1459 c 0,23,12 + 1217 1459 1217 1459 1430.5 1245.5 c 128,-1,13 +706.5 521.5 m 128,-1,25 + 795 434 795 434 913 434 c 0,26,27 + 1035 434 1035 434 1122.5 519.5 c 128,-1,28 + 1210 605 1210 605 1210 731 c 0,29,30 + 1210 859 1210 859 1126.5 942.5 c 128,-1,31 + 1043 1026 1043 1026 925 1026 c 0,32,33 + 803 1026 803 1026 710.5 936.5 c 128,-1,34 + 618 847 618 847 618 729 c 0,35,24 + 618 609 618 609 706.5 521.5 c 128,-1,25 +766 730 m 0,36,37 + 766 789 766 789 812.5 833.5 c 128,-1,38 + 859 878 859 878 920 878 c 0,39,40 + 980 878 980 878 1021 836.5 c 128,-1,41 + 1062 795 1062 795 1062 731 c 0,42,43 + 1062 668 1062 668 1018.5 625 c 128,-1,44 + 975 582 975 582 914 582 c 0,45,46 + 854 582 854 582 810 626 c 128,-1,47 + 766 670 766 670 766 730 c 0,36,37 +448 728 m 0,48,49 + 448 914 448 914 593 1055 c 128,-1,50 + 738 1196 738 1196 931 1196 c 0,51,52 + 1118 1196 1118 1196 1249.5 1064.5 c 128,-1,53 + 1381 933 1381 933 1381 731 c 0,54,55 + 1381 532 1381 532 1243 397.5 c 128,-1,56 + 1105 263 1105 263 912 263 c 0,57,58 + 726 263 726 263 587 400.5 c 128,-1,59 + 448 538 448 538 448 728 c 0,48,49 +EndSplineSet +EndChar + +StartChar: square4 +Encoding: 167 9827 20 +Width: 937 +Flags: W +LayerCount: 2 +Fore +SplineSet +765 444 m 1,0,-1 + 765 1036 l 1,1,-1 + 173 1036 l 1,2,-1 + 173 444 l 1,3,-1 + 765 444 l 1,0,-1 +EndSplineSet +EndChar + +StartChar: head2left +Encoding: 215 8901 21 +Width: 1627 +Flags: W +LayerCount: 2 +Fore +SplineSet +1455 0 m 1,0,-1 + 173 740 l 1,1,-1 + 1455 1480 l 1,2,-1 + 1028 740 l 1,3,-1 + 1455 0 l 1,0,-1 +272 741 m 1,4,-1 + 971 741 l 1,5,-1 + 1321 1346 l 1,6,-1 + 272 741 l 1,4,-1 +EndSplineSet +EndChar + +StartChar: head2right +Encoding: 216 255 22 +Width: 1627 +Flags: W +LayerCount: 2 +Fore +Refer: 21 8901 N -1 0 0 1 1628 0 2 +EndChar + +StartChar: head2up +Encoding: 217 376 23 +Width: 1825 +Flags: W +LayerCount: 2 +Fore +Refer: 21 8901 N 0 -1 1 0 173 1653 2 +EndChar + +StartChar: head2down +Encoding: 218 8260 24 +Width: 1825 +Flags: W +LayerCount: 2 +Fore +Refer: 21 8901 N 0 1 -1 0 1653 -173 2 +EndChar + +StartChar: checkbld +Encoding: 252 63740 25 +Width: 1609 +Flags: W +LayerCount: 2 +Fore +SplineSet +1497 1560 m 1,0,1 + 1522 1510 l 1,2,-1 + 1533 1510 l 1,3,4 + 862.197 987 862.197 987 667 398 c 1,5,-1 + 465 252 l 1,6,7 + 330 696 330 696 155 768 c 1,8,9 + 254 882 254 882 353 882 c 0,10,11 + 439 882 439 882 555 602 c 1,12,13 + 735.665 1141 735.665 1141 1497 1560 c 1,0,1 +EndSplineSet +EndChar + +StartChar: boxshadowdwn +Encoding: 113 952 26 +Width: 1825 +Flags: W +LayerCount: 2 +Fore +SplineSet +300 300 m 1,0,-1 + 1300 300 l 1,1,-1 + 1300 1300 l 1,2,-1 + 300 1300 l 1,3,-1 + 300 300 l 1,0,-1 +400 0 m 1,4,-1 + 200 200 l 1,5,-1 + 200 1400 l 1,6,-1 + 1400 1400 l 1,7,-1 + 1600 1200 l 1,8,-1 + 1600 0 l 1,9,-1 + 400 0 l 1,4,-1 +EndSplineSet +EndChar + +StartChar: boxshadowup +Encoding: 114 961 27 +Width: 1825 +Flags: W +LayerCount: 2 +Fore +SplineSet +1300 100 m 1,0,-1 + 1300 1100 l 1,1,-1 + 300 1100 l 1,2,-1 + 300 100 l 1,3,-1 + 1300 100 l 1,0,-1 +1600 200 m 1,4,-1 + 1400 0 l 1,5,-1 + 200 0 l 1,6,-1 + 200 1200 l 1,7,-1 + 400 1400 l 1,8,-1 + 1600 1400 l 1,9,-1 + 1600 200 l 1,4,-1 +EndSplineSet +EndChar + +StartChar: box3 +Encoding: 111 959 28 +Width: 1825 +Flags: W +LayerCount: 2 +Fore +SplineSet +372 200 m 1,0,-1 + 1452 200 l 1,1,-1 + 1452 1280 l 1,2,-1 + 372 1280 l 1,3,-1 + 372 200 l 1,0,-1 +172 0 m 1,4,-1 + 172 1480 l 1,5,-1 + 1652 1480 l 1,6,-1 + 1652 0 l 1,7,-1 + 172 0 l 1,4,-1 +EndSplineSet +EndChar + +StartChar: box4 +Encoding: 112 960 29 +Width: 1825 +Flags: W +LayerCount: 2 +Fore +SplineSet +472 300 m 1,0,-1 + 1352 300 l 1,1,-1 + 1352 1180 l 1,2,-1 + 472 1180 l 1,3,-1 + 472 300 l 1,0,-1 +172 0 m 1,4,-1 + 172 1480 l 1,5,-1 + 1652 1480 l 1,6,-1 + 1652 0 l 1,7,-1 + 172 0 l 1,4,-1 +EndSplineSet +EndChar EndChars EndSplineFont Binary files /tmp/400JPlQJyX/wine1.6-1.7.1-actually1.6/fonts/wingding.ttf and /tmp/orSsOyEO8s/wine1.6-1.6.1/fonts/wingding.ttf differ diff -Nru wine1.6-1.7.1-actually1.6/include/config.h.in wine1.6-1.6.1/include/config.h.in --- wine1.6-1.7.1-actually1.6/include/config.h.in 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/include/config.h.in 2013-11-15 19:30:24.000000000 +0000 @@ -1,7 +1,8 @@ /* include/config.h.in. Generated from configure.ac by autoheader. */ -#ifndef WINE_CROSSTEST +#ifndef __WINE_CONFIG_H #define __WINE_CONFIG_H +#ifndef WINE_CROSSTEST /* Define to a function attribute for Microsoft hotpatch assembly prefix. */ #undef DECLSPEC_HOTPATCH @@ -1055,8 +1056,8 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_WAIT_H -/* Define to 1 if you have the `tcgetattr' function. */ -#undef HAVE_TCGETATTR +/* Define to 1 if you have the `tcdrain' function. */ +#undef HAVE_TCDRAIN /* Define to 1 if you have the header file. */ #undef HAVE_TERMIOS_H @@ -1369,3 +1370,4 @@ #endif #endif /* WINE_CROSSTEST */ +#endif /* __WINE_CONFIG_H */ diff -Nru wine1.6-1.7.1-actually1.6/include/d3d9.h wine1.6-1.6.1/include/d3d9.h --- wine1.6-1.7.1-actually1.6/include/d3d9.h 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/include/d3d9.h 2013-11-15 19:30:24.000000000 +0000 @@ -394,17 +394,17 @@ DECLARE_INTERFACE_(IDirect3DSwapChain9,IUnknown) { /*** IUnknown methods ***/ - STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE; STDMETHOD_(ULONG,AddRef)(THIS) PURE; STDMETHOD_(ULONG,Release)(THIS) PURE; /*** IDirect3DSwapChain9 methods ***/ - STDMETHOD(Present)(THIS_ CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion, DWORD dwFlags) PURE; - STDMETHOD(GetFrontBufferData)(THIS_ struct IDirect3DSurface9* pDestSurface) PURE; - STDMETHOD(GetBackBuffer)(THIS_ UINT iBackBuffer, D3DBACKBUFFER_TYPE Type, struct IDirect3DSurface9** ppBackBuffer) PURE; - STDMETHOD(GetRasterStatus)(THIS_ D3DRASTER_STATUS* pRasterStatus) PURE; - STDMETHOD(GetDisplayMode)(THIS_ D3DDISPLAYMODE* pMode) PURE; - STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9** ppDevice) PURE; - STDMETHOD(GetPresentParameters)(THIS_ D3DPRESENT_PARAMETERS* pPresentationParameters) PURE; + STDMETHOD(Present)(THIS_ CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion, DWORD dwFlags) PURE; + STDMETHOD(GetFrontBufferData)(THIS_ struct IDirect3DSurface9 *pDestSurface) PURE; + STDMETHOD(GetBackBuffer)(THIS_ UINT iBackBuffer, D3DBACKBUFFER_TYPE Type, struct IDirect3DSurface9 **ppBackBuffer) PURE; + STDMETHOD(GetRasterStatus)(THIS_ D3DRASTER_STATUS *pRasterStatus) PURE; + STDMETHOD(GetDisplayMode)(THIS_ D3DDISPLAYMODE *pMode) PURE; + STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9 **ppDevice) PURE; + STDMETHOD(GetPresentParameters)(THIS_ D3DPRESENT_PARAMETERS *pPresentationParameters) PURE; }; #undef INTERFACE @@ -437,6 +437,67 @@ #endif /***************************************************************************** + * IDirect3DSwapChain9Ex interface + */ +#define INTERFACE IDirect3DSwapChain9Ex +DECLARE_INTERFACE_(IDirect3DSwapChain9Ex,IDirect3DSwapChain9) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirect3DSwapChain9 methods ***/ + STDMETHOD(Present)(THIS_ CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion, DWORD dwFlags) PURE; + STDMETHOD(GetFrontBufferData)(THIS_ struct IDirect3DSurface9 *pDestSurface) PURE; + STDMETHOD(GetBackBuffer)(THIS_ UINT iBackBuffer, D3DBACKBUFFER_TYPE Type, struct IDirect3DSurface9 **ppBackBuffer) PURE; + STDMETHOD(GetRasterStatus)(THIS_ D3DRASTER_STATUS *pRasterStatus) PURE; + STDMETHOD(GetDisplayMode)(THIS_ D3DDISPLAYMODE *pMode) PURE; + STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9 **ppDevice) PURE; + STDMETHOD(GetPresentParameters)(THIS_ D3DPRESENT_PARAMETERS *pPresentationParameters) PURE; + /*** IDirect3DSwapChain9Ex methods ***/ + STDMETHOD(GetLastPresentCount)(THIS_ UINT *pLastPresentCount) PURE; + STDMETHOD(GetPresentStats)(THIS_ D3DPRESENTSTATS *pPresentationStatistics) PURE; + STDMETHOD(GetDisplayModeEx)(THIS_ D3DDISPLAYMODEEX *pMode, D3DDISPLAYROTATION *pRotation) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirect3DSwapChain9Ex_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DSwapChain9Ex_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DSwapChain9Ex_Release(p) (p)->lpVtbl->Release(p) +/*** IDirect3DSwapChain9 methods ***/ +#define IDirect3DSwapChain9Ex_Present(p,a,b,c,d,e) (p)->lpVtbl->Present(p,a,b,c,d,e) +#define IDirect3DSwapChain9Ex_GetFrontBufferData(p,a) (p)->lpVtbl->GetFrontBufferData(p,a) +#define IDirect3DSwapChain9EX_GetBackBuffer(p,a,b,c) (p)->lpVtbl->GetBackBuffer(p,a,b,c) +#define IDirect3DSwapChain9EX_GetRasterStatus(p,a) (p)->lpVtbl->GetRasterStatus(p,a) +#define IDirect3DSwapChain9Ex_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a) +#define IDirect3DSwapChain9Ex_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a) +#define IDirect3DSwapChain9Ex_GetPresentParameters(p,a) (p)->lpVtbl->GetPresentParameters(p,a) +/*** IDirect3DSwapChain9Ex methods ***/ +#define IDirect3DSwapChain9Ex_GetLastPresentCount(p,a) (p)->lpVtbl->GetLastPresentCount(p,a) +#define IDirect3DSwapChain9Ex_GetPresentStats(p,a) (p)->lpVtbl->GetPresentStats(p,a) +#define IDirect3DSwapChain9Ex_GetDisplayModeEx(p,a,b) (p)->lpVtbl->GetDisplayModeEx(p,a,b) +#else +/*** IUnknown methods ***/ +#define IDirect3DSwapChain9Ex_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DSwapChain9Ex_AddRef(p) (p)->AddRef() +#define IDirect3DSwapChain9Ex_Release(p) (p)->Release() +/*** IDirect3DSwapChain9 methods ***/ +#define IDirect3DSwapChain9Ex_Present(p,a,b,c,d,e) (p)->Present(a,b,c,d,e) +#define IDirect3DSwapChain9Ex_GetFrontBufferData(p,a) (p)->GetFrontBufferData(a) +#define IDirect3DSwapChain9Ex_GetBackBuffer(p,a,b,c) (p)->GetBackBuffer(a,b,c) +#define IDirect3DSwapChain9Ex_GetRasterStatus(p,a) (p)->GetRasterStatus(a) +#define IDirect3DSwapChain9Ex_GetDisplayMode(p,a) (p)->GetDisplayMode(a) +#define IDirect3DSwapChain9Ex_GetDevice(p,a) (p)->GetDevice(a) +#define IDirect3DSwapChain9Ex_GetPresentParameters(p,a) (p)->GetPresentParameters(a) +/*** IDirect3DSwapChain9Ex methods ***/ +#define IDirect3DSwapChain9Ex_GetLastPresentCount(p,a) (p)->GetLastPresentCount(a) +#define IDirect3DSwapChain9Ex_GetPresentStats(p,a) (p)->GetPresentStats(a) +#define IDirect3DSwapChain9Ex_GetDisplayModeEx(p,a,b) (p)->GetDisplayModeEx(a,b) +#endif + +/***************************************************************************** * IDirect3DResource9 interface */ #define INTERFACE IDirect3DResource9 diff -Nru wine1.6-1.7.1-actually1.6/include/d3d9types.h wine1.6-1.6.1/include/d3d9types.h --- wine1.6-1.7.1-actually1.6/include/d3d9types.h 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/include/d3d9types.h 2013-11-15 19:30:24.000000000 +0000 @@ -1559,6 +1559,16 @@ D3DCOMPOSERECTS_NEG, D3DCOMPOSERECTS_FORCE_DWORD = 0x7fffffff } D3DCOMPOSERECTSOP; + +typedef struct _D3DPRESENTSTATS +{ + UINT PresentCount; + UINT PresentRefreshCount; + UINT SyncRefreshCount; + LARGE_INTEGER SyncQPCTime; + LARGE_INTEGER SyncGPUTime; +} D3DPRESENTSTATS; + #endif /* D3D_DISABLE_9EX */ typedef enum _D3DSHADER_COMPARISON diff -Nru wine1.6-1.7.1-actually1.6/include/msvcrt/io.h wine1.6-1.6.1/include/msvcrt/io.h --- wine1.6-1.7.1-actually1.6/include/msvcrt/io.h 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/include/msvcrt/io.h 2013-11-15 19:30:24.000000000 +0000 @@ -108,6 +108,7 @@ __msvcrt_long __cdecl _lseek(int,__msvcrt_long,int); __int64 __cdecl _lseeki64(int,__int64,int); char* __cdecl _mktemp(char*); +int __cdecl _mktemp_s(char*,size_t); int __cdecl _open(const char*,int,...); int __cdecl _open_osfhandle(intptr_t,int); int __cdecl _pipe(int*,unsigned int,int); diff -Nru wine1.6-1.7.1-actually1.6/include/wine/server_protocol.h wine1.6-1.6.1/include/wine/server_protocol.h --- wine1.6-1.7.1-actually1.6/include/wine/server_protocol.h 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/include/wine/server_protocol.h 2013-11-15 19:30:24.000000000 +0000 @@ -404,6 +404,38 @@ }; +enum select_op +{ + SELECT_NONE, + SELECT_WAIT, + SELECT_WAIT_ALL, + SELECT_SIGNAL_AND_WAIT, + SELECT_KEYED_EVENT_WAIT, + SELECT_KEYED_EVENT_RELEASE +}; + +typedef union +{ + enum select_op op; + struct + { + enum select_op op; + obj_handle_t handles[MAXIMUM_WAIT_OBJECTS]; + } wait; + struct + { + enum select_op op; + obj_handle_t wait; + obj_handle_t signal; + } signal_and_wait; + struct + { + enum select_op op; + obj_handle_t handle; + client_ptr_t key; + } keyed_event; +} select_op_t; + enum apc_type { APC_NONE, @@ -1052,11 +1084,11 @@ struct request_header __header; int flags; client_ptr_t cookie; - obj_handle_t signal; - obj_handle_t prev_apc; timeout_t timeout; + obj_handle_t prev_apc; /* VARARG(result,apc_result); */ - /* VARARG(handles,handles); */ + /* VARARG(data,select_op); */ + char __pad_36[4]; }; struct select_reply { @@ -1066,9 +1098,8 @@ obj_handle_t apc_handle; char __pad_60[4]; }; -#define SELECT_ALL 1 -#define SELECT_ALERTABLE 2 -#define SELECT_INTERRUPTIBLE 4 +#define SELECT_ALERTABLE 1 +#define SELECT_INTERRUPTIBLE 2 @@ -1103,6 +1134,17 @@ }; enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT }; +struct query_event_request +{ + struct request_header __header; + obj_handle_t handle; +}; +struct query_event_reply +{ + struct reply_header __header; + int manual_reset; + int state; +}; struct open_event_request @@ -1122,6 +1164,39 @@ +struct create_keyed_event_request +{ + struct request_header __header; + unsigned int access; + unsigned int attributes; + /* VARARG(objattr,object_attributes); */ + char __pad_20[4]; +}; +struct create_keyed_event_reply +{ + struct reply_header __header; + obj_handle_t handle; + char __pad_12[4]; +}; + + +struct open_keyed_event_request +{ + struct request_header __header; + unsigned int access; + unsigned int attributes; + obj_handle_t rootdir; + /* VARARG(name,unicode_str); */ +}; +struct open_keyed_event_reply +{ + struct reply_header __header; + obj_handle_t handle; + char __pad_12[4]; +}; + + + struct create_mutex_request { struct request_header __header; @@ -4753,8 +4828,9 @@ obj_handle_t handle; apc_param_t ckey; apc_param_t cvalue; - unsigned int information; + apc_param_t information; unsigned int status; + char __pad_44[4]; }; struct add_completion_reply { @@ -4773,8 +4849,9 @@ struct reply_header __header; apc_param_t ckey; apc_param_t cvalue; - unsigned int information; + apc_param_t information; unsigned int status; + char __pad_36[4]; }; @@ -4813,8 +4890,9 @@ struct request_header __header; obj_handle_t handle; apc_param_t cvalue; + apc_param_t information; unsigned int status; - unsigned int information; + char __pad_36[4]; }; struct add_fd_completion_reply { @@ -4981,7 +5059,10 @@ REQ_select, REQ_create_event, REQ_event_op, + REQ_query_event, REQ_open_event, + REQ_create_keyed_event, + REQ_open_keyed_event, REQ_create_mutex, REQ_release_mutex, REQ_open_mutex, @@ -5237,7 +5318,10 @@ struct select_request select_request; struct create_event_request create_event_request; struct event_op_request event_op_request; + struct query_event_request query_event_request; struct open_event_request open_event_request; + struct create_keyed_event_request create_keyed_event_request; + struct open_keyed_event_request open_keyed_event_request; struct create_mutex_request create_mutex_request; struct release_mutex_request release_mutex_request; struct open_mutex_request open_mutex_request; @@ -5491,7 +5575,10 @@ struct select_reply select_reply; struct create_event_reply create_event_reply; struct event_op_reply event_op_reply; + struct query_event_reply query_event_reply; struct open_event_reply open_event_reply; + struct create_keyed_event_reply create_keyed_event_reply; + struct open_keyed_event_reply open_keyed_event_reply; struct create_mutex_reply create_mutex_reply; struct release_mutex_reply release_mutex_reply; struct open_mutex_reply open_mutex_reply; @@ -5715,6 +5802,6 @@ struct set_suspend_context_reply set_suspend_context_reply; }; -#define SERVER_PROTOCOL_VERSION 440 +#define SERVER_PROTOCOL_VERSION 447 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff -Nru wine1.6-1.7.1-actually1.6/include/winnt.h wine1.6-1.6.1/include/winnt.h --- wine1.6-1.7.1-actually1.6/include/winnt.h 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/include/winnt.h 2013-11-15 19:30:24.000000000 +0000 @@ -5163,7 +5163,7 @@ typedef RTL_RUN_ONCE_INIT_FN *PRTL_RUN_ONCE_INIT_FN; NTSYSAPI VOID WINAPI RtlRunOnceInitialize(PRTL_RUN_ONCE); NTSYSAPI DWORD WINAPI RtlRunOnceExecuteOnce(PRTL_RUN_ONCE,PRTL_RUN_ONCE_INIT_FN,PVOID,PVOID*); -NTSYSAPI DWORD WINAPI RtlRunOnceBeginInitialize(PRTL_RUN_ONCE, DWORD, PBOOL, PVOID*); +NTSYSAPI DWORD WINAPI RtlRunOnceBeginInitialize(PRTL_RUN_ONCE, DWORD, PVOID*); NTSYSAPI DWORD WINAPI RtlRunOnceComplete(PRTL_RUN_ONCE, DWORD, PVOID); #include diff -Nru wine1.6-1.7.1-actually1.6/include/winternl.h wine1.6-1.6.1/include/winternl.h --- wine1.6-1.7.1-actually1.6/include/winternl.h 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/include/winternl.h 2013-11-15 19:30:24.000000000 +0000 @@ -2054,6 +2054,7 @@ NTSYSAPI NTSTATUS WINAPI NtCreateIoCompletion(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,ULONG); NTSYSAPI NTSTATUS WINAPI NtCreateJobObject(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*); NTSYSAPI NTSTATUS WINAPI NtCreateKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,PULONG); +NTSYSAPI NTSTATUS WINAPI NtCreateKeyedEvent(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG); NTSYSAPI NTSTATUS WINAPI NtCreateMailslotFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG,ULONG,PLARGE_INTEGER); NTSYSAPI NTSTATUS WINAPI NtCreateMutant(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,BOOLEAN); NTSYSAPI NTSTATUS WINAPI NtCreateNamedPipeFile(PHANDLE,ULONG,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,PLARGE_INTEGER); @@ -2113,6 +2114,7 @@ NTSYSAPI NTSTATUS WINAPI NtOpenIoCompletion(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES); NTSYSAPI NTSTATUS WINAPI NtOpenJobObject(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*); NTSYSAPI NTSTATUS WINAPI NtOpenKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *); +NTSYSAPI NTSTATUS WINAPI NtOpenKeyedEvent(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*); NTSYSAPI NTSTATUS WINAPI NtOpenMutant(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*); NTSYSAPI NTSTATUS WINAPI NtOpenObjectAuditAlarm(PUNICODE_STRING,PHANDLE,PUNICODE_STRING,PUNICODE_STRING,PSECURITY_DESCRIPTOR,HANDLE,ACCESS_MASK,ACCESS_MASK,PPRIVILEGE_SET,BOOLEAN,BOOLEAN,PBOOLEAN); NTSYSAPI NTSTATUS WINAPI NtOpenProcess(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const CLIENT_ID*); @@ -2175,6 +2177,7 @@ NTSYSAPI NTSTATUS WINAPI NtReadRequestData(HANDLE,PLPC_MESSAGE,ULONG,PVOID,ULONG,PULONG); NTSYSAPI NTSTATUS WINAPI NtReadVirtualMemory(HANDLE,const void*,void*,SIZE_T,SIZE_T*); NTSYSAPI NTSTATUS WINAPI NtRegisterThreadTerminatePort(HANDLE); +NTSYSAPI NTSTATUS WINAPI NtReleaseKeyedEvent(HANDLE,const void*,BOOLEAN,const LARGE_INTEGER*); NTSYSAPI NTSTATUS WINAPI NtReleaseMutant(HANDLE,PLONG); NTSYSAPI NTSTATUS WINAPI NtReleaseSemaphore(HANDLE,ULONG,PULONG); NTSYSAPI NTSTATUS WINAPI NtRemoveIoCompletion(HANDLE,PULONG_PTR,PULONG_PTR,PIO_STATUS_BLOCK,PLARGE_INTEGER); @@ -2208,7 +2211,7 @@ NTSYSAPI NTSTATUS WINAPI NtSetInformationThread(HANDLE,THREADINFOCLASS,LPCVOID,ULONG); NTSYSAPI NTSTATUS WINAPI NtSetInformationToken(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,ULONG); NTSYSAPI NTSTATUS WINAPI NtSetIntervalProfile(ULONG,KPROFILE_SOURCE); -NTSYSAPI NTSTATUS WINAPI NtSetIoCompletion(HANDLE,ULONG_PTR,ULONG_PTR,NTSTATUS,ULONG); +NTSYSAPI NTSTATUS WINAPI NtSetIoCompletion(HANDLE,ULONG_PTR,ULONG_PTR,NTSTATUS,SIZE_T); NTSYSAPI NTSTATUS WINAPI NtSetLdtEntries(ULONG,LDT_ENTRY,ULONG,LDT_ENTRY); NTSYSAPI NTSTATUS WINAPI NtSetLowEventPair(HANDLE); NTSYSAPI NTSTATUS WINAPI NtSetLowWaitHighEventPair(HANDLE); @@ -2239,6 +2242,7 @@ NTSYSAPI NTSTATUS WINAPI NtUnlockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG); NTSYSAPI NTSTATUS WINAPI NtUnmapViewOfSection(HANDLE,PVOID); NTSYSAPI NTSTATUS WINAPI NtVdmControl(ULONG,PVOID); +NTSYSAPI NTSTATUS WINAPI NtWaitForKeyedEvent(HANDLE,const void*,BOOLEAN,const LARGE_INTEGER*); NTSYSAPI NTSTATUS WINAPI NtWaitForSingleObject(HANDLE,BOOLEAN,const LARGE_INTEGER*); NTSYSAPI NTSTATUS WINAPI NtWaitForMultipleObjects(ULONG,const HANDLE*,BOOLEAN,BOOLEAN,const LARGE_INTEGER*); NTSYSAPI NTSTATUS WINAPI NtWaitHighEventPair(HANDLE); diff -Nru wine1.6-1.7.1-actually1.6/loader/Makefile.in wine1.6-1.6.1/loader/Makefile.in --- wine1.6-1.7.1-actually1.6/loader/Makefile.in 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/loader/Makefile.in 2013-11-15 19:30:24.000000000 +0000 @@ -66,3 +66,6 @@ $(RM) $(DESTDIR)$(mandir)/de.UTF-8/man$(prog_manext)/wine.$(prog_manext) $(RM) $(DESTDIR)$(mandir)/fr.UTF-8/man$(prog_manext)/wine.$(prog_manext) $(RM) $(DESTDIR)$(mandir)/pl.UTF-8/man$(prog_manext)/wine.$(prog_manext) + +clean:: + $(RM) wine_info.plist diff -Nru wine1.6-1.7.1-actually1.6/loader/wine.fr.man.in wine1.6-1.6.1/loader/wine.fr.man.in --- wine1.6-1.7.1-actually1.6/loader/wine.fr.man.in 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/loader/wine.fr.man.in 2013-11-15 19:30:24.000000000 +0000 @@ -1,10 +1,9 @@ -.\" -*- nroff -*- -.TH WINE 1 "juin 2013" "@PACKAGE_STRING@" "Windows sur Unix" +.TH WINE 1 "juillet 2013" "@PACKAGE_STRING@" "Windows sur Unix" .SH NOM wine \- exécuter des programmes Windows sur Unix .SH SYNOPSIS -.BI "wine " programme -[arguments ... ] +.B wine +.IR "programme " [ arguments ] .br .B wine --help .br @@ -17,7 +16,7 @@ .SH DESCRIPTION .B wine charge et exécute le programme indiqué, qui peut être un exécutable DOS, Windows -3.x ou Win32 (binaires x86 uniquement). +3.x, Win32 ou Win64 (sur les systèmes 64 bits). .PP Pour déboguer wine, utilisez plutôt .BR winedbg . @@ -45,28 +44,30 @@ Vous pouvez passer des arguments au programme exécuté en les ajoutant à la fin de la ligne de commande invoquant .B wine -(par exemple : wine notepad C:\(rs\(rsTEMP\(rs\(rsLISEZMOI.TXT). +(par exemple : \fIwine notepad C:\(rs\(rsTEMP\(rs\(rsLISEZMOI.TXT\fR). Notez que vous devrez protéger les caractères spéciaux (et les espaces) en utilisant un '\(rs' lorsque vous invoquez Wine depuis un shell, par exemple : .PP wine C:\(rs\(rsProgram\(rs Files\(rs\(rsMonProg\(rs\(rstest.exe .PP -.SH VARIABLES D'ENVIRONNEMENT -.B wine -passe les variables d'environnement du shell depuis lequel +Il peut également s'agir d'un des exécutables Windows livrés avec Wine, +auquel cas la spécification d'un chemin complet n'est pas obligatoire, +p.ex. \fIwine explorer\fR ou \fIwine notepad\fR. +.PP +.SH ENVIRONNEMENT .B wine +passe les variables d'environnement du shell depuis lequel il est lancé au processus Windows/DOS exécuté. Utilisez donc la syntaxe appropriée à votre shell pour déclarer les variables d'environnement dont vous avez besoin. .TP -.I WINEPREFIX +.B WINEPREFIX Si définie, le contenu de cette variable est pris comme le nom du répertoire où -.B wine -stocke ses données (la valeur par défaut est +Wine stocke ses données (la valeur par défaut est .IR $HOME/.wine ). Ce répertoire est également utilisé pour identifier le socket utilisé pour communiquer avec -.IR wineserver . +.BR wineserver . Tous les processus .B wine utilisant le même @@ -74,33 +75,33 @@ (c'est-à-dire le même utilisateur) partagent certains éléments comme la base de registre, la mémoire partagée et les objets du noyau. En donnant à -.I WINEPREFIX +.B WINEPREFIX une valeur spécifique pour différents processus .BR wine , il est possible d'exécuter plusieurs sessions de .B wine totalement indépendantes. .TP -.I WINESERVER +.B WINESERVER Spécifie le chemin et le nom de l'exécutable .BR wineserver . Si cette variable n'est pas définie, Wine essaiera de charger -.B @bindir@/wineserver +.I @bindir@/wineserver ou, à défaut, un fichier nommé « wineserver » dans le chemin système ou quelques autres emplacements potentiels. .TP -.I WINELOADER +.B WINELOADER Spécifie le chemin et le nom de l'exécutable .B wine à utiliser pour exécuter de nouveaux processus Windows. Si pas définie, Wine essaiera de charger -.B @bindir@/wine +.I @bindir@/wine ou, à défaut, un fichier nommé « wine » dans le chemin système ou quelques autres emplacements potentiels. .TP -.I WINEDEBUG +.B WINEDEBUG Active ou désactive les messages de débogage. La syntaxe est : -.RI [ classe ][+/-] canal [,[ classe2 ][+/-] canal2 ]. +.RI [ classe ][\fB+\fR|\fB-\fR] canal [,[ classe2 ][\fB+\fR|\fB-\fR] canal2 ] .RS +7 .PP La @@ -113,12 +114,11 @@ .BR trace . Si elle n'est pas spécifiée, tous les messages de débogage pour le canal associé seront activés. Chaque canal imprimera des messages à propos -d'un composant particulier de -.BR wine . -Le caractère suivant peut être + ou - pour activer/désactiver +d'un composant particulier de Wine. +Le caractère suivant peut être \fB+\fR ou \fB-\fR pour activer/désactiver le canal spécifié. Si aucune .I classe -n'est spécifiée, le caractère + peut être omis. Notez que les espaces ne sont pas +n'est spécifiée, le caractère \fB+\fR peut être omis. Notez que les espaces ne sont pas autorisées dans cette chaîne de caractères. .PP Exemples : @@ -147,25 +147,22 @@ du guide de l'utilisateur de Wine. .RE .TP -.I WINEDLLPATH +.B WINEDLLPATH Spécifie le(s) chemin(s) où chercher les DLL intégrées et les applications Winelib. C'est une liste de répertoires séparés par des « : ». En plus des répertoires spécifiés dans -.IR WINEDLLPATH , +.BR WINEDLLPATH , Wine utilisera aussi le répertoire -.BR @dlldir@ . +.IR @dlldir@ . .TP -.I WINEDLLOVERRIDES +.B WINEDLLOVERRIDES Définit le type de remplacement et l'ordre de chargement des DLL utilisées lors du processus de chargement d'une DLL. Deux types de bibliothèques peuvent actuellement être chargés dans l'espace d'adressage d'un processus : les DLL natives de Windows -.RI ( native ), -et les DLL intégrées à -.B wine -.RI ( builtin ). +.RI ( native ") et les DLL intégrées à Wine (" builtin ). Le type peut être abrégé avec la première lettre du type -.RI ( n ", " b ). +.RI ( n " ou " b ). La bibliothèque peut également être désactivée (''). Les séquences d'ordres doivent être séparées par des virgules. .RS @@ -181,8 +178,8 @@ L'ordre de chargement pour une DLL 16 bits est toujours défini par l'ordre de chargement de la DLL 32 bits qui la contient (qui peut être identifié en observant le lien symbolique du fichier .dll.so 16 bits). Par exemple, si -ole32.dll est configurée comme builtin, storage.dll sera également chargée comme -builtin puisque la DLL 32 bits ole32.dll contient la DLL 16 bits storage.dll. +\fIole32.dll\fR est configurée comme builtin, \fIstorage.dll\fR sera également chargée comme +builtin puisque la DLL 32 bits \fIole32.dll\fR contient la DLL 16 bits \fIstorage.dll\fR. .PP Exemples : .TP @@ -194,17 +191,17 @@ WINEDLLOVERRIDES="comdlg32,shell32=n;c:\(rs\(rsfoo\(rs\(rsbar\(rs\(rsbaz=b" .br Charge les bibliothèques windows natives comdlg32 et shell32. De plus, si une -application demande le chargement de c:\(rsfoo\(rsbar\(rsbaz.dll, charge la -bibliothèque intégrée baz. +application demande le chargement de \fIc:\(rsfoo\(rsbar\(rsbaz.dll\fR, charge la +bibliothèque intégrée \fIbaz\fR. .TP WINEDLLOVERRIDES="comdlg32=b,n;shell32=b;comctl32=n;oleaut32=" .br Charge la bibliothèque intégrée comdlg32, ou la version native en cas d'échec ; charge la version intégrée de shell32 et la version native de -comctl32. Oleaut32 sera désactivée. +comctl32 ; oleaut32 sera désactivée. .RE .TP -.I WINEARCH +.B WINEARCH Spécifie l'architecture Windows à prendre en charge. Peut être .B win32 (prise en charge des applications 32 bits uniquement), ou @@ -215,112 +212,86 @@ au moment de sa création et ne peut être modifiée ultérieurement. Si vous exécutez Wine avec un préfixe préexistant, il refusera de démarrer si -.I WINEARCH +.B WINEARCH ne correspond pas à l'architecture du préfixe. .TP -.I DISPLAY +.B DISPLAY Spécifie l'affichage X11 à utiliser. .TP -Variables de configuration du pilote audio OSS +Variables de configuration du pilote audio OSS : .TP -.I AUDIODEV +.B AUDIODEV Définit le périphérique pour les entrées/sorties audio, par défaut -.BR /dev/dsp . +.IR /dev/dsp . .TP -.I MIXERDEV +.B MIXERDEV Définit le périphérique pour les contrôles du mixeur, par défaut -.BR /dev/mixer . +.IR /dev/mixer . .TP -.I MIDIDEV +.B MIDIDEV Définit le périphérique pour le séquenceur MIDI, par défaut -.BR /dev/sequencer . +.IR /dev/sequencer . .SH FICHIERS .TP .I @bindir@/wine -Le chargeur de programme de -.BR wine . +Le chargeur de programme de Wine. .TP .I @bindir@/wineconsole -Le chargeur de programme de -.B wine -pour les applications en mode console (CUI). +Le chargeur de programme de Wine pour les applications en mode console (CUI). .TP .I @bindir@/wineserver -Le serveur -.BR wine . +Le serveur Wine. .TP .I @bindir@/winedbg -Le débogueur de -.BR wine . +Le débogueur de Wine. .TP .I @dlldir@ -Répertoire contenant les bibliothèques partagées de -.BR wine . +Répertoire contenant les bibliothèques partagées de Wine. .TP .I $WINEPREFIX/dosdevices Répertoire contenant le mapping des périphériques DOS. Chaque fichier dans ce répertoire est un lien symbolique vers le fichier périphérique Unix qui implémente -un périphérique donné. Par exemple, si COM1 est mappé sur /dev/ttyS0, vous aurez un -lien symbolique de la forme $WINEPREFIX/dosdevices/com1 -> /dev/ttyS0. +un périphérique donné. Par exemple, si COM1 est mappé sur \fI/dev/ttyS0\fR, vous aurez un +lien symbolique de la forme \fI$WINEPREFIX/dosdevices/com1\fR -> \fI/dev/ttyS0\fR. .br Les lecteurs DOS sont aussi définis à l'aide de liens symboliques ; par exemple, si le -lecteur D: correspond au CDROM monté sur /mnt/cdrom, vous aurez un lien symbolique -$WINEPREFIX/dosdevices/d: -> /mnt/cdrom. Le périphérique Unix correspondant à un lecteur +lecteur D: correspond au CDROM monté sur \fI/mnt/cdrom\fR, vous aurez un lien symbolique +\fI$WINEPREFIX/dosdevices/d:\fR -> \fI/mnt/cdrom\fR. Le périphérique Unix correspondant à un lecteur DOS peut être spécifié de la même façon, à l'exception du fait qu'il faut utiliser « :: » à la place de « : ». Dans l'exemple précédent, si le lecteur CDROM est monté depuis /dev/hdc, -le lien symbolique correspondant sera -$WINEPREFIX/dosdevices/d:: -> /dev/hdc. +le lien symbolique correspondant sera \fI$WINEPREFIX/dosdevices/d::\fR -> \fI/dev/hdc\fR. .SH AUTEURS -.B wine -est disponible grâce au travail de nombreux développeurs. Pour une liste +Wine est disponible grâce au travail de nombreux développeurs. Pour une liste des auteurs, référez-vous au fichier -.B AUTHORS +.I AUTHORS à la racine de la distribution des sources. .SH COPYRIGHT -.B wine -peut être distribué sous les termes de la licence LGPL. Une copie de cette +Wine peut être distribué selon les termes de la licence LGPL. Une copie de cette licence se trouve dans le fichier -.B COPYING.LIB +.I COPYING.LIB à la racine de la distribution des sources. -.SH BOGUES +.SH BUGS .PP -Un rapport sur la compatibilité de nombreuses applications est disponible sur -.IR http://appdb.winehq.org . +Un rapport sur la compatibilité de nombreuses applications est disponible sur la +.UR http://appdb.winehq.org +.B base de données d'applications de Wine +.UE . N'hésitez pas à y ajouter des entrées pour les applications que vous -exécutez actuellement, s'il n'y en a pas déjà. -.PP -Les rapports de bogues peuvent être soumis (en anglais) sur le Bugzilla de Wine -.IR http://bugs.winehq.org . -Pour plus d'informations, consultez -.IR http://wiki.winehq.org/Bugs . +exécutez actuellement, si nécessaire. .PP -Les problèmes et suggestions concernant cette page du manuel peuvent également être rapportés sur -.IR http://bugs.winehq.org . +Les bugs peuvent être signalés (en anglais) sur le +.UR http://bugs.winehq.org +.B système de suivi des problèmes de Wine +.UE . .SH DISPONIBILITÉ -La version publique la plus récente de -.B wine -peut être téléchargée depuis -.IR http://www.winehq.org/download . -.PP -Le code source le plus récent peut être obtenu en utilisant -.IR git . -Pour des informations détaillées, voyez -.IR http://www.winehq.org/site/git . -.PP -WineHQ, le quartier général du développement de -.B wine -est situé sur -.IR http://www.winehq.org . -Le site Web contient de nombreuses informations sur -.BR wine . -.PP -Pour plus d'informations sur le développement de -.BR wine , -vous pouvez vous inscrire sur les listes de diffusion de -.B wine -sur -.IR http://www.winehq.org/forums . - +La version publique la plus récente de Wine est disponible sur WineHQ, le +.UR http://www.winehq.org/ +.B quartier général du développement de Wine +.UE . .SH "VOIR AUSSI" .BR wineserver (1), -.BR winedbg (1) +.BR winedbg (1), +.br +.UR http://www.winehq.org/help +.B Documentation et support de Wine +.UE . diff -Nru wine1.6-1.7.1-actually1.6/loader/wine.man.in wine1.6-1.6.1/loader/wine.man.in --- wine1.6-1.7.1-actually1.6/loader/wine.man.in 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/loader/wine.man.in 2013-11-15 19:30:24.000000000 +0000 @@ -2,8 +2,8 @@ .SH NAME wine \- run Windows programs on Unix .SH SYNOPSIS -.BI "wine " program -[arguments ... ] +.B wine +.IR "program " [ arguments ] .br .B wine --help .br @@ -47,27 +47,29 @@ You may pass arguments to the program being executed by adding them to the end of the command line invoking .B wine -(such as: wine notepad C:\(rs\(rsTEMP\(rs\(rsREADME.TXT). +(such as: \fIwine notepad C:\(rs\(rsTEMP\(rs\(rsREADME.TXT\fR). Note that you need to '\(rs' escape special characters (and spaces) when invoking Wine via a shell, e.g. .PP wine C:\(rs\(rsProgram\(rs Files\(rs\(rsMyPrg\(rs\(rstest.exe .PP -.SH ENVIRONMENT VARIABLES -.B wine -makes the environment variables of the shell from which +It can also be one of the Windows executables shipped with Wine, in +which case specifying the full path is not mandatory, e.g. \fIwine +explorer\fR or \fIwine notepad\fR. +.PP +.SH ENVIRONMENT .B wine -is started accessible to the windows/dos processes started. So use the +makes the environment variables of the shell from which it +is started accessible to the Windows/DOS processes started. So use the appropriate syntax for your shell to enter environment variables you need. .TP -.I WINEPREFIX -If set, the content of this variable is taken as the name of the directory where -.B wine -stores its data (the default is +.B WINEPREFIX +If set, the contents of this variable is taken as the name of the directory where +Wine stores its data (the default is .IR $HOME/.wine ). This directory is also used to identify the socket which is used to communicate with the -.IR wineserver . +.BR wineserver . All .B wine processes using the same @@ -75,34 +77,34 @@ (i.e.: same user) share certain things like registry, shared memory, and config file. By setting -.I WINEPREFIX +.B WINEPREFIX to different values for different .B wine processes, it is possible to run a number of truly independent .B wine processes. .TP -.I WINESERVER +.B WINESERVER Specifies the path and name of the .B wineserver binary. If not set, Wine will try to load -.BR @bindir@/wineserver , +.IR @bindir@/wineserver , and if this doesn't exist it will then look for a file named "wineserver" in the path and in a few other likely locations. .TP -.I WINELOADER +.B WINELOADER Specifies the path and name of the .B wine binary to use to launch new Windows processes. If not set, Wine will try to load -.BR @bindir@/wine , +.IR @bindir@/wine , and if this doesn't exist it will then look for a file named "wine" in the path and in a few other likely locations. .TP -.I WINEDEBUG +.B WINEDEBUG Turns debugging messages on or off. The syntax of the variable is of the form -.RI [ class ][+/-] channel [,[ class2 ][+/-] channel2 ]. +.RI [ class ][\fB+\fR|\fB-\fR] channel [,[ class2 ][\fB+\fR|\fB-\fR] channel2 ] .RS +7 .PP .I class @@ -116,12 +118,11 @@ .I class is not specified, all debugging messages for the specified channel are turned on. Each channel will print messages about a particular -component of -.BR wine . -The following character can be either + or - to switch the specified +component of Wine. +The following character can be either \fB+\fR or \fB-\fR to switch the specified channel on or off respectively. If there is no .I class -part before it, a leading + can be omitted. Note that spaces are not +part before it, a leading \fB+\fR\fR can be omitted. Note that spaces are not allowed anywhere in the string. .PP Examples: @@ -150,24 +151,21 @@ chapter of the Wine User Guide. .RE .TP -.I WINEDLLPATH +.B WINEDLLPATH Specifies the path(s) in which to search for builtin dlls and Winelib applications. This is a list of directories separated by ":". In addition to any directory specified in -.IR WINEDLLPATH , +.BR WINEDLLPATH , Wine will also look in -.BR @dlldir@ . +.IR @dlldir@ . .TP -.I WINEDLLOVERRIDES +.B WINEDLLOVERRIDES Defines the override type and load order of dlls used in the loading process for any dll. There are currently two types of libraries that can be loaded -into a process' address space: native windows dlls -.RI ( native ), -.B wine -internal dlls -.RI ( builtin ). +into a process address space: native windows dlls +.RI ( native ") and Wine internal dlls (" builtin ). The type may be abbreviated with the first letter of the type -.RI ( n ", " b ). +.RI ( n " or " b ). The library may also be disabled (''). Each sequence of orders must be separated by commas. .RS .PP @@ -181,9 +179,9 @@ The load order for a 16-bit dll is always defined by the load order of the 32-bit dll that contains it (which can be identified by looking at the symbolic link of the 16-bit .dll.so file). For instance if -ole32.dll is configured as builtin, storage.dll will be loaded as -builtin too, since the 32-bit ole32.dll contains the 16-bit -storage.dll. +\fIole32.dll\fR is configured as builtin, \fIstorage.dll\fR will be loaded as +builtin too, since the 32-bit \fIole32.dll\fR contains the 16-bit +\fIstorage.dll\fR. .PP Examples: .TP @@ -195,16 +193,16 @@ WINEDLLOVERRIDES="comdlg32,shell32=n;c:\(rs\(rsfoo\(rs\(rsbar\(rs\(rsbaz=b" .br Try to load the libraries comdlg32 and shell32 as native windows dlls. Furthermore, if -an application request to load c:\(rsfoo\(rsbar\(rsbaz.dll load the builtin library baz. +an application request to load \fIc:\(rsfoo\(rsbar\(rsbaz.dll\fR load the builtin library \fIbaz\fR. .TP WINEDLLOVERRIDES="comdlg32=b,n;shell32=b;comctl32=n;oleaut32=" .br Try to load comdlg32 as builtin first and try the native version if the builtin load fails; load shell32 always as builtin and comctl32 -always as native. Oleaut32 will be disabled. +always as native; oleaut32 will be disabled. .RE .TP -.I WINEARCH +.B WINEARCH Specifies the Windows architecture to support. It can be set either to .B win32 (support only 32-bit applications), or to @@ -214,76 +212,64 @@ The architecture supported by a given Wine prefix is set at prefix creation time and cannot be changed afterwards. When running with an existing prefix, Wine will refuse to start if -.I WINEARCH +.B WINEARCH doesn't match the prefix architecture. .TP -.I DISPLAY +.B DISPLAY Specifies the X11 display to use. .TP -OSS sound driver configuration variables +OSS sound driver configuration variables: .TP -.I AUDIODEV +.B AUDIODEV Set the device for audio input / output. Default -.BR /dev/dsp . +.IR /dev/dsp . .TP -.I MIXERDEV +.B MIXERDEV Set the device for mixer controls. Default -.BR /dev/mixer . +.IR /dev/mixer . .TP -.I MIDIDEV +.B MIDIDEV Set the MIDI (sequencer) device. Default -.BR /dev/sequencer . +.IR /dev/sequencer . .SH FILES .TP .I @bindir@/wine -The -.B wine -program loader. +The Wine program loader. .TP .I @bindir@/wineconsole -The -.B wine -program loader for CUI (console) applications. +The Wine program loader for CUI (console) applications. .TP .I @bindir@/wineserver -The -.B wine -server -.TP +The Wine server +.TP .I @bindir@/winedbg -The -.B wine -debugger -.TP +The Wine debugger +.TP .I @dlldir@ -Directory containing -.BR wine -shared libraries +Directory containing Wine shared libraries .TP .I $WINEPREFIX/dosdevices Directory containing the DOS device mappings. Each file in that directory is a symlink to the Unix device file implementing a given -device. For instance, if COM1 is mapped to /dev/ttyS0 you'd have a -symlink of the form $WINEPREFIX/dosdevices/com1 -> /dev/ttyS0. +device. For instance, if COM1 is mapped to \fI/dev/ttyS0\fR you'd have a +symlink of the form \fI$WINEPREFIX/dosdevices/com1\fR -> \fI/dev/ttyS0\fR. .br DOS drives are also specified with symlinks; for instance if drive D: -corresponds to the CDROM mounted at /mnt/cdrom, you'd have a symlink -$WINEPREFIX/dosdevices/d: -> /mnt/cdrom. The Unix device corresponding +corresponds to the CDROM mounted at \fI/mnt/cdrom\fR, you'd have a symlink +\fI$WINEPREFIX/dosdevices/d:\fR -> \fI/mnt/cdrom\fR. The Unix device corresponding to a DOS drive can be specified the same way, except with '::' instead of ':'. So for the previous example, if the CDROM device is mounted -from /dev/hdc, the corresponding symlink would be -$WINEPREFIX/dosdevices/d:: -> /dev/hdc. +from \fI/dev/hdc\fR, the corresponding symlink would be +\fI$WINEPREFIX/dosdevices/d::\fR -> \fI/dev/hdc\fR. .SH AUTHORS -.B wine -is available thanks to the work of many developers. For a listing -of the authors, please see the file -.B AUTHORS +Wine is available thanks to the work of many developers. For a listing +of the authors, please see the file +.I AUTHORS in the top-level directory of the source distribution. .SH COPYRIGHT -.B wine -can be distributed under the terms of the LGPL license. A copy of the +Wine can be distributed under the terms of the LGPL license. A copy of the license is in the file -.B COPYING.LIB +.I COPYING.LIB in the top-level directory of the source distribution. .SH BUGS .PP diff -Nru wine1.6-1.7.1-actually1.6/loader/wine.pl.man.in wine1.6-1.6.1/loader/wine.pl.man.in --- wine1.6-1.7.1-actually1.6/loader/wine.pl.man.in 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/loader/wine.pl.man.in 2013-11-15 19:30:24.000000000 +0000 @@ -79,13 +79,12 @@ na inne wartości dla różnych procesów .B wine jest możliwe uruchamianie kilka prawdziwie niezależnych procesów -.B wine -. +.BR wine . .TP .I WINESERVER Określa ścieżkę i nazwę programu binarnego .B wineserver -. Jeżeli nie ustawione, Wine będzie próbował załadować +Jeżeli nie ustawione, Wine będzie próbował załadować .BR @bindir@/wineserver i jeśli zakończy się to niepowodzeniem to będzie szukał pliku o nazwie "wineserver" w podanej ścieżce i kilku innych miejscach prawdopodobnego występowania. diff -Nru wine1.6-1.7.1-actually1.6/po/ar.po wine1.6-1.6.1/po/ar.po --- wine1.6-1.7.1-actually1.6/po/ar.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/ar.po 2013-11-15 19:30:24.000000000 +0000 @@ -6328,15 +6328,15 @@ msgstr "لا يوجد مرابط إضافية.\n" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "لم يتمكن من الولوج إلى الرابط الداخلي مع حساب موثوق.\n" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "لم يتمكن من الولوج إلى المحطة مع حساب موثوق.\n" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "لم يتمكن من الولوج إلى الخادوم مع حساب موثوق.\n" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/bg.po wine1.6-1.6.1/po/bg.po --- wine1.6-1.7.1-actually1.6/po/bg.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/bg.po 2013-11-15 19:30:24.000000000 +0000 @@ -6452,15 +6452,15 @@ msgstr "" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/ca.po wine1.6-1.6.1/po/ca.po --- wine1.6-1.7.1-actually1.6/po/ca.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/ca.po 2013-11-15 19:30:24.000000000 +0000 @@ -6402,17 +6402,17 @@ msgstr "No hi ha més lligaments.\n" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "" "No es pot iniciar la sessió amb compte de confiança de diversos dominis.\n" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "" "No es pot iniciar la sessió amb compte de confiança d'estació de treball.\n" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "No es pot iniciar la sessió amb compte de confiança de servidor.\n" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/cs.po wine1.6-1.6.1/po/cs.po --- wine1.6-1.7.1-actually1.6/po/cs.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/cs.po 2013-11-15 19:30:24.000000000 +0000 @@ -6291,15 +6291,15 @@ msgstr "" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/da.po wine1.6-1.6.1/po/da.po --- wine1.6-1.7.1-actually1.6/po/da.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/da.po 2013-11-15 19:30:24.000000000 +0000 @@ -6372,15 +6372,15 @@ msgstr "Ikke flere bindinger.\n" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "Kan ikke logge på med inter-domæne tillids konto.\n" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "Kan ikke logge på med arbejdsstationens tillids konto.\n" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "Kan ikke logge på med serverens tillids konto.\n" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/de.po wine1.6-1.6.1/po/de.po --- wine1.6-1.7.1-actually1.6/po/de.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/de.po 2013-11-15 19:30:24.000000000 +0000 @@ -6357,15 +6357,15 @@ msgstr "Keine weiteren Bindungen.\n" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "Kann nicht mit Interdomänen-Vertrauens-Account einloggen.\n" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "Kann nicht mit Arbeitsplatz-Vertrauens-Account einloggen.\n" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "Kann nicht mit Server-Vertrauens-Account einloggen.\n" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/el.po wine1.6-1.6.1/po/el.po --- wine1.6-1.7.1-actually1.6/po/el.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/el.po 2013-11-15 19:30:24.000000000 +0000 @@ -6363,15 +6363,15 @@ msgstr "" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/en.po wine1.6-1.6.1/po/en.po --- wine1.6-1.7.1-actually1.6/po/en.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/en.po 2013-11-15 19:30:24.000000000 +0000 @@ -969,7 +969,7 @@ "Please reenter margins." msgstr "" "Margins overlap or fall outside Paper boundaries.\n" -"Please reenter margins." +"Please re-enter margins." #: comdlg32.rc:60 msgid "The 'Number of copies' field cannot be empty." @@ -6347,16 +6347,16 @@ msgstr "No more bindings.\n" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" -msgstr "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" +msgstr "Can't log on with inter-domain trust account.\n" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" -msgstr "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" +msgstr "Can't log on with workstation trust account.\n" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" -msgstr "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" +msgstr "Can't log on with server trust account.\n" #: winerror.mc:3461 msgid "Domain trust information inconsistent.\n" @@ -8689,7 +8689,7 @@ "device name is spelled correctly." msgstr "" "Cannot find the specified device. Make sure it is installed or that the " -"device name is spelled correctly." +"device name is spelt correctly." #: winmm.rc:83 msgid "" diff -Nru wine1.6-1.7.1-actually1.6/po/en_US.po wine1.6-1.6.1/po/en_US.po --- wine1.6-1.7.1-actually1.6/po/en_US.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/en_US.po 2013-11-15 19:30:24.000000000 +0000 @@ -6347,16 +6347,16 @@ msgstr "No more bindings.\n" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" -msgstr "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" +msgstr "Can't log on with inter-domain trust account.\n" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" -msgstr "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" +msgstr "Can't log on with workstation trust account.\n" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" -msgstr "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" +msgstr "Can't log on with server trust account.\n" #: winerror.mc:3461 msgid "Domain trust information inconsistent.\n" diff -Nru wine1.6-1.7.1-actually1.6/po/eo.po wine1.6-1.6.1/po/eo.po --- wine1.6-1.7.1-actually1.6/po/eo.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/eo.po 2013-11-15 19:30:24.000000000 +0000 @@ -6268,15 +6268,15 @@ msgstr "" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/es.po wine1.6-1.6.1/po/es.po --- wine1.6-1.7.1-actually1.6/po/es.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/es.po 2013-11-15 19:30:24.000000000 +0000 @@ -6385,16 +6385,16 @@ msgstr "No hay más enlaces.\n" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "No se puede loguear con una cuenta de confianza ínter-dominio.\n" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "" "No se puede loguear con una cuenta de confianza del puesto de trabajo.\n" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "No se puede loguear con una cuenta de confianza del servidor.\n" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/fa.po wine1.6-1.6.1/po/fa.po --- wine1.6-1.7.1-actually1.6/po/fa.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/fa.po 2013-11-15 19:30:24.000000000 +0000 @@ -6346,15 +6346,15 @@ msgstr "" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/fi.po wine1.6-1.6.1/po/fi.po --- wine1.6-1.7.1-actually1.6/po/fi.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/fi.po 2013-11-15 19:30:24.000000000 +0000 @@ -6342,15 +6342,15 @@ msgstr "Ei enempää sidoksia.\n" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "Toimialueiden välisellä luottamustilillä ei voi kirjautua.\n" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "Tietokoneen luottamustilillä ei voi kirjautua.\n" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "Palvelimen luottamustilillä ei voi kirjautua.\n" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/fr.po wine1.6-1.6.1/po/fr.po --- wine1.6-1.7.1-actually1.6/po/fr.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/fr.po 2013-11-15 19:30:24.000000000 +0000 @@ -6377,16 +6377,16 @@ msgstr "Il n'y a plus de liaisons.\n" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "Ne peut se connecter avec un compte d'approbation inter-domaines.\n" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "" "Ne peut se connecter avec un compte d'approbation de station de travail.\n" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "Ne peut se connecter avec un compte d'approbation de serveur.\n" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/he.po wine1.6-1.6.1/po/he.po --- wine1.6-1.7.1-actually1.6/po/he.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/he.po 2013-11-15 19:30:24.000000000 +0000 @@ -6581,15 +6581,15 @@ msgstr "" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/hi.po wine1.6-1.6.1/po/hi.po --- wine1.6-1.7.1-actually1.6/po/hi.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/hi.po 2013-11-15 19:30:24.000000000 +0000 @@ -6257,15 +6257,15 @@ msgstr "" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/hr.po wine1.6-1.6.1/po/hr.po --- wine1.6-1.7.1-actually1.6/po/hr.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/hr.po 2013-11-15 19:30:24.000000000 +0000 @@ -1072,7 +1072,7 @@ #: comdlg32.rc:88 msgid "I/O Active; " -msgstr "I/O aktivan; " +msgstr "U/I aktivan; " #: comdlg32.rc:89 msgid "Busy; " @@ -1413,10 +1413,8 @@ msgstr "Prezime" #: crypt32.rc:78 -#, fuzzy -#| msgid "Unknown component.\n" msgid "Domain Component" -msgstr "Nepoznata komponenta.\n" +msgstr "" #: crypt32.rc:79 msgid "Street Address" @@ -1604,7 +1602,7 @@ #: crypt32.rc:125 msgid "Recipient Nonce" -msgstr "Nuncija primatelja" +msgstr "Nuncij primatelja" #: crypt32.rc:126 msgid "Reg Info" @@ -2103,7 +2101,7 @@ #: cryptui.rc:221 msgid "Disclaimer" -msgstr "" +msgstr "Izjava o odgovornosti" #: cryptui.rc:228 msgid "More &Info" @@ -4082,11 +4080,11 @@ #: winerror.mc:611 msgid "Already a SUBST target.\n" -msgstr "" +msgstr "Već je SUBST meta.\n" #: winerror.mc:616 msgid "System trace not specified or disallowed.\n" -msgstr "" +msgstr "Sistemski trag nije naveden ili odbijen.\n" #: winerror.mc:621 msgid "Event count for DosMuxSemWait incorrect.\n" @@ -4106,7 +4104,7 @@ #: winerror.mc:641 msgid "Too many TCBs.\n" -msgstr "Previše TCBs.\n" +msgstr "Previše TCBa.\n" #: winerror.mc:646 msgid "Signal refused.\n" @@ -4214,7 +4212,7 @@ #: winerror.mc:776 msgid "IOPL not enabled.\n" -msgstr "IDPL nije omogućeno.\n" +msgstr "IOPL nije omogućen.\n" #: winerror.mc:781 msgid "Invalid SEGDPL in %1.\n" @@ -4390,15 +4388,15 @@ #: winerror.mc:996 msgid "I/O operation aborted.\n" -msgstr "I/O operacija prekinuta.\n" +msgstr "U/I operacija prekinuta.\n" #: winerror.mc:1001 msgid "Overlapped I/O incomplete.\n" -msgstr "Preklapajući I/O nepotpun.\n" +msgstr "Preklapajući U/I nepotpun.\n" #: winerror.mc:1006 msgid "Overlapped I/O pending.\n" -msgstr "Preklapajući I/O u tijeku.\n" +msgstr "Preklapajući U/I u tijeku.\n" #: winerror.mc:1011 msgid "No access to memory location.\n" @@ -4470,7 +4468,7 @@ #: winerror.mc:1096 msgid "I/O to registry failed.\n" -msgstr "I/O u registar neuspio.\n" +msgstr "U/I u registar neuspio.\n" #: winerror.mc:1101 msgid "Not registry file.\n" @@ -4674,7 +4672,7 @@ #: winerror.mc:1351 msgid "I/O bus reset.\n" -msgstr "Reset I/O sabirnice.\n" +msgstr "Reset U/I sabirnice.\n" #: winerror.mc:1356 msgid "No media in drive.\n" @@ -4698,7 +4696,7 @@ #: winerror.mc:1381 msgid "I/O device error.\n" -msgstr "Greška I/O uređaja.\n" +msgstr "Greška U/I uređaja.\n" #: winerror.mc:1386 msgid "No serial devices found.\n" @@ -4710,11 +4708,11 @@ #: winerror.mc:1396 msgid "Serial I/O completed.\n" -msgstr "Serijski I/O završen.\n" +msgstr "Serijski U/I završen.\n" #: winerror.mc:1401 msgid "Serial I/O counter timeout.\n" -msgstr "Istek vremena serijskog I/O brojača.\n" +msgstr "Istek vremena serijskog U/I brojača.\n" #: winerror.mc:1406 msgid "Floppy ID address mark not found.\n" @@ -5382,7 +5380,7 @@ #: winerror.mc:2241 msgid "Cannot impersonate.\n" -msgstr "" +msgstr "Ne mogu oponašati.\n" #: winerror.mc:2246 msgid "Invalid transaction state.\n" @@ -6337,15 +6335,15 @@ msgstr "Nema više vezivanja.\n" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "" #: winerror.mc:3461 @@ -6742,7 +6740,7 @@ msgstr "" "Windows instalacija programa %s\n" "\n" -"Upotreba:\n" +"Uporaba:\n" "msiexec naredba {obavezan parametar} [neobavezan parametar]\n" "\n" "Instalacija proizvoda:\n" @@ -8447,15 +8445,15 @@ #: winmm.rc:37 msgid "An error number was specified that is not defined in the system." -msgstr "" +msgstr "Broj greške je naveden koji nije definiran u sistemu." #: winmm.rc:38 msgid "An invalid flag was passed to a system function." -msgstr "" +msgstr "Neispravna zastavica je predata funkciji sistema." #: winmm.rc:39 msgid "An invalid parameter was passed to a system function." -msgstr "" +msgstr "Neispravan parametar je predat funkciji sistema." #: winmm.rc:42 msgid "" @@ -9228,34 +9226,36 @@ "CD is the short version of CHDIR. It changes the current\n" "default directory.\n" msgstr "" +"CD je kraća verzija CHDIR. Mijenja trenutan podrazumijevan\n" +"direktorij.\n" #: cmd.rc:41 msgid "CHDIR changes the current default directory.\n" -msgstr "" +msgstr "CHDIR mijenja trenutan podrazumijevan direktorij.\n" #: cmd.rc:43 msgid "CLS clears the console screen.\n" -msgstr "" +msgstr "CLS briše ekran konzole.\n" #: cmd.rc:45 msgid "COPY copies a file.\n" -msgstr "" +msgstr "COPY kopira datoteku.\n" #: cmd.rc:46 msgid "CTTY changes the input/output device.\n" -msgstr "" +msgstr "CTTY mijenja U/I uređaj.\n" #: cmd.rc:47 msgid "DATE shows or changes the system date.\n" -msgstr "" +msgstr "DATE prikazuje ili mijenja vrijeme sustava.\n" #: cmd.rc:48 msgid "DEL deletes a file or set of files.\n" -msgstr "" +msgstr "DEL briše datoteku ili skup datoteka.\n" #: cmd.rc:49 msgid "DIR lists the contents of a directory.\n" -msgstr "" +msgstr "DIR ispisuje sadržaj direktorija.\n" #: cmd.rc:59 msgid "" @@ -9271,7 +9271,7 @@ #: cmd.rc:61 msgid "ERASE deletes a file or set of files.\n" -msgstr "" +msgstr "ERASE briše datoteku ili skup datoteka.\n" #: cmd.rc:66 msgid "" @@ -9299,6 +9299,8 @@ "HELP shows brief help details on a topic.\n" "HELP without an argument shows all CMD built-in commands.\n" msgstr "" +"HELP prikazuje kratku pomoć o temi.\n" +"HELP bez argumenta prikazuje sve CMD ugrađene naredbe.\n" #: cmd.rc:91 msgid "" @@ -9323,11 +9325,11 @@ #: cmd.rc:100 msgid "MD is the short version of MKDIR. It creates a subdirectory.\n" -msgstr "" +msgstr "MD je kraća verzija MKDIR. Stvara poddirektorij.\n" #: cmd.rc:101 msgid "MKDIR creates a subdirectory.\n" -msgstr "" +msgstr "MKDIR stvara poddirektorij.\n" #: cmd.rc:108 msgid "" @@ -9392,19 +9394,19 @@ #: cmd.rc:153 msgid "REN is the short version of RENAME. It renames a file.\n" -msgstr "" +msgstr "REN je kraća verzija RENAME. Preimenuje datoteku.\n" #: cmd.rc:154 msgid "RENAME renames a file.\n" -msgstr "" +msgstr "RENAME preimenuje datoteku.\n" #: cmd.rc:156 msgid "RD is the short version of RMDIR. It deletes a subdirectory.\n" -msgstr "" +msgstr "RD je kraća verzija RMDIR. Briše poddirektorij.\n" #: cmd.rc:157 msgid "RMDIR deletes a subdirectory.\n" -msgstr "" +msgstr "RMDIR briše poddirektorij.\n" #: cmd.rc:201 msgid "" @@ -9465,11 +9467,11 @@ #: cmd.rc:208 msgid "TIME sets or shows the current system time.\n" -msgstr "" +msgstr "TIME postavlja ili prikazuje trenutno vrijeme sistema.\n" #: cmd.rc:210 msgid "TITLE sets the window title for the cmd window.\n" -msgstr "" +msgstr "TITLE postavlja naslov prozora za cmd prozor.\n" #: cmd.rc:214 msgid "" @@ -9490,7 +9492,7 @@ #: cmd.rc:226 msgid "VER displays the version of cmd you are running.\n" -msgstr "" +msgstr "VER prikazuje verziju cmd koju izvodite.\n" #: cmd.rc:228 msgid "VOL shows the volume label of a disk device.\n" @@ -9609,7 +9611,7 @@ #: cmd.rc:314 msgid "Are you sure?" -msgstr "" +msgstr "Da li ste sigurni?" #: cmd.rc:315 xcopy.rc:40 msgctxt "Yes key" @@ -9643,11 +9645,11 @@ #: cmd.rc:323 msgid "Argument missing\n" -msgstr "" +msgstr "Nedostaje argument\n" #: cmd.rc:324 msgid "Syntax error\n" -msgstr "" +msgstr "Sintaksna greška\n" #: cmd.rc:326 msgid "No help available for %1\n" @@ -9663,23 +9665,23 @@ #: cmd.rc:329 msgid "Current Time is %1\n" -msgstr "" +msgstr "Trenutno vrijeme je %1\n" #: cmd.rc:330 msgid "Enter new date: " -msgstr "" +msgstr "Unesite novi datum: " #: cmd.rc:331 msgid "Enter new time: " -msgstr "" +msgstr "Unesite novo vrijeme: " #: cmd.rc:332 msgid "Environment variable %1 not defined\n" -msgstr "" +msgstr "Varijabla okruženja %1 nije definirana\n" #: cmd.rc:333 xcopy.rc:38 msgid "Failed to open '%1'\n" -msgstr "" +msgstr "Neuspjelo otvaranje '%1'\n" #: cmd.rc:334 msgid "Cannot call batch label outside of a batch script\n" @@ -9708,7 +9710,7 @@ #: cmd.rc:340 msgid "Parameter error\n" -msgstr "" +msgstr "Greška parametra\n" #: cmd.rc:341 msgid "" @@ -9722,11 +9724,11 @@ #: cmd.rc:343 msgid "PATH not found\n" -msgstr "" +msgstr "PATH nije nađen\n" #: cmd.rc:344 msgid "Press any key to continue... " -msgstr "" +msgstr "Pritisnite bilo koju tipku za nastavak... " #: cmd.rc:345 msgid "Wine Command Prompt" @@ -9734,15 +9736,15 @@ #: cmd.rc:346 msgid "Wine CMD Version %1!S!\n" -msgstr "" +msgstr "Wine CMD verzija %1!S!\n" #: cmd.rc:347 msgid "More? " -msgstr "" +msgstr "Više? " #: cmd.rc:348 msgid "The input line is too long.\n" -msgstr "" +msgstr "Ulazni redak je predugačak.\n" #: cmd.rc:349 msgid "Volume in drive %1!c! is %2\n" @@ -9767,19 +9769,19 @@ #: cmd.rc:354 msgid "Division by zero error.\n" -msgstr "" +msgstr "Greška dijeljenja sa nulom.\n" #: cmd.rc:355 msgid "Expected an operand.\n" -msgstr "" +msgstr "Očekivan operand.\n" #: cmd.rc:356 msgid "Expected an operator.\n" -msgstr "" +msgstr "Očekivan operator.\n" #: cmd.rc:357 msgid "Mismatch in parentheses.\n" -msgstr "" +msgstr "Nepodudaranje u zagradama.\n" #: cmd.rc:358 msgid "" @@ -9789,11 +9791,12 @@ #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" -msgstr "" +msgstr "DirectX Dijagnostički Alat" #: dxdiag.rc:28 msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]" msgstr "" +"Uporaba: dxdiag [/whql:off | /whql:on] [/t imeDatoteke | /x imeDatoteke]" #: explorer.rc:28 msgid "Wine Explorer" @@ -9801,11 +9804,11 @@ #: hostname.rc:27 msgid "Usage: hostname\n" -msgstr "" +msgstr "Uporaba: hostname\n" #: hostname.rc:28 msgid "Error: Invalid option '%c'.\n" -msgstr "" +msgstr "Greška: Neispravna opcija '%c'.\n" #: hostname.rc:29 msgid "" @@ -9815,7 +9818,7 @@ #: ipconfig.rc:27 msgid "Usage: ipconfig [ /? | /all ]\n" -msgstr "Upotreba: ipconfig [ /? | /all ]\n" +msgstr "Uporaba: ipconfig [ /? | /sve ]\n" #: ipconfig.rc:28 msgid "Error: Unknown or invalid command line parameters specified\n" @@ -9824,7 +9827,7 @@ #: ipconfig.rc:29 msgid "%1 adapter %2\n" -msgstr "" +msgstr "%1 adapter %2\n" #: ipconfig.rc:30 msgid "Ethernet" @@ -9892,6 +9895,13 @@ "\n" "Where 'command' is one of HELP, START, STOP or USE.\n" msgstr "" +"Sintaksa ove naredbe je:\n" +"\n" +"NET naredba [argumenti]\n" +" -ili-\n" +"NET naredba /HELP\n" +"\n" +"Gdje 'naredba' je jedno od HELP, START, STOP ili USE.\n" #: net.rc:28 msgid "" @@ -9902,6 +9912,12 @@ "Displays the list of running services if 'service' is omitted. Otherwise " "'service' is the name of the service to start.\n" msgstr "" +"Sintaksa ove naredbe je:\n" +"\n" +"NET START [servis]\n" +"\n" +"Prikazuje popis servisa koji se izvode ukoliko se 'servis' izostavi. Inače " +"'servis' je ime servisa koji će se pokrenuti.\n" #: net.rc:29 msgid "" @@ -9911,6 +9927,11 @@ "\n" "Where 'service' is the name of the service to stop.\n" msgstr "" +"Sintaksa ove naredbe je:\n" +"\n" +"NET STOP servis\n" +"\n" +"Gdje je 'servis' ime servisa koji će se zaustaviti.\n" #: net.rc:30 msgid "Stopping dependent service: %1\n" @@ -9930,31 +9951,31 @@ #: net.rc:34 msgid "The %1 service is starting.\n" -msgstr "" +msgstr "Servis %1 se pokreće.\n" #: net.rc:35 msgid "The %1 service was started successfully.\n" -msgstr "" +msgstr "Servis %1 je uspješno pokrenut.\n" #: net.rc:36 msgid "The %1 service failed to start.\n" -msgstr "" +msgstr "Servis %1 nije uspješno pokrenut.\n" #: net.rc:37 msgid "The %1 service is stopping.\n" -msgstr "" +msgstr "Servis %1 se zaustavlja.\n" #: net.rc:38 msgid "The %1 service was stopped successfully.\n" -msgstr "" +msgstr "Servis %1 je uspješno zaustavljen.\n" #: net.rc:39 msgid "The %1 service failed to stop.\n" -msgstr "" +msgstr "Servis %1 nije uspješno zaustavljen.\n" #: net.rc:41 msgid "There are no entries in the list.\n" -msgstr "" +msgstr "Nema unosa u listi.\n" #: net.rc:42 msgid "" @@ -9962,10 +9983,13 @@ "Status Local Remote\n" "---------------------------------------------------------------\n" msgstr "" +"\n" +"Status Lokalno Udaljeno\n" +"---------------------------------------------------------------\n" #: net.rc:43 msgid "%1 %2 %3 Open resources: %4!u!\n" -msgstr "" +msgstr "%1 %2 %3 Otvoreni resursi: %4!u!\n" #: net.rc:45 msgid "Paused" @@ -9977,19 +10001,19 @@ #: net.rc:47 msgid "A network error occurred" -msgstr "" +msgstr "Dogodila se mrežna pogreška" #: net.rc:48 msgid "Connection is being made" -msgstr "" +msgstr "Veza se stvara" #: net.rc:49 msgid "Reconnecting" -msgstr "" +msgstr "Ponovno povezivanje" #: net.rc:40 msgid "The following services are running:\n" -msgstr "" +msgstr "Sljedeći servisi se izvode:\n" #: netstat.rc:27 msgid "Active Connections" @@ -9997,15 +10021,15 @@ #: netstat.rc:28 msgid "Proto" -msgstr "" +msgstr "Proto" #: netstat.rc:29 msgid "Local Address" -msgstr "" +msgstr "Lokalna adresa" #: netstat.rc:30 msgid "Foreign Address" -msgstr "" +msgstr "Strana adresa" #: netstat.rc:31 msgid "State" @@ -10013,15 +10037,15 @@ #: netstat.rc:32 msgid "Interface Statistics" -msgstr "" +msgstr "Statistike sučelja" #: netstat.rc:33 msgid "Sent" -msgstr "" +msgstr "Poslano" #: netstat.rc:34 msgid "Received" -msgstr "" +msgstr "Primljeno" #: netstat.rc:35 msgid "Bytes" @@ -10029,15 +10053,15 @@ #: netstat.rc:36 msgid "Unicast packets" -msgstr "" +msgstr "Unicast paketi" #: netstat.rc:37 msgid "Non-unicast packets" -msgstr "" +msgstr "Ne-Unicast paketi" #: netstat.rc:38 msgid "Discards" -msgstr "" +msgstr "Odbačaji" #: netstat.rc:39 msgid "Errors" @@ -10049,7 +10073,7 @@ #: netstat.rc:41 msgid "TCP Statistics for IPv4" -msgstr "" +msgstr "TCP statistike za IPv4" #: netstat.rc:42 msgid "Active Opens" @@ -10061,7 +10085,7 @@ #: netstat.rc:44 msgid "Failed Connection Attempts" -msgstr "" +msgstr "Neuspjele uspostave veze" #: netstat.rc:45 msgid "Reset Connections" @@ -10069,27 +10093,27 @@ #: netstat.rc:46 msgid "Current Connections" -msgstr "" +msgstr "Trenutne veze" #: netstat.rc:47 msgid "Segments Received" -msgstr "" +msgstr "Primljeni segmenti" #: netstat.rc:48 msgid "Segments Sent" -msgstr "" +msgstr "Poslani segmenti" #: netstat.rc:49 msgid "Segments Retransmitted" -msgstr "" +msgstr "Ponovno poslani segmenti" #: netstat.rc:50 msgid "UDP Statistics for IPv4" -msgstr "" +msgstr "UDP statistike za IPv4" #: netstat.rc:51 msgid "Datagrams Received" -msgstr "" +msgstr "Primljeni satagrami" #: netstat.rc:52 msgid "No Ports" @@ -10097,11 +10121,11 @@ #: netstat.rc:53 msgid "Receive Errors" -msgstr "Greška u primanju" +msgstr "Greške u primanju" #: netstat.rc:54 msgid "Datagrams Sent" -msgstr "" +msgstr "Poslani datagrami" #: notepad.rc:27 msgid "&New\tCtrl+N" @@ -10309,7 +10333,7 @@ #: notepad.rc:80 msgid "'%s' could not be found." -msgstr "Datoteka '%s' nije pronađena." +msgstr "'%s' nije pronađeno." #: notepad.rc:82 msgid "Unicode (UTF-16)" @@ -10391,7 +10415,7 @@ #: oleview.rc:53 msgid "Copy C&LSID to clipboard" -msgstr "" +msgstr "Kopiraj C&LSID u ostavu" #: oleview.rc:54 msgid "Copy &HTML object Tag to clipboard" @@ -10407,11 +10431,11 @@ #: oleview.rc:64 oleview.rc:86 winefile.rc:62 wordpad.rc:68 wordpad.rc:261 msgid "&Toolbar" -msgstr "" +msgstr "&Alatna traka" #: oleview.rc:65 oleview.rc:87 winefile.rc:64 wordpad.rc:71 wordpad.rc:264 msgid "&Status Bar" -msgstr "" +msgstr "&Statusna traka" #: oleview.rc:67 regedit.rc:69 winefile.rc:76 msgid "&Refresh\tF5" @@ -10431,11 +10455,11 @@ #: oleview.rc:154 msgid "Connect to another machine" -msgstr "" +msgstr "Poveži se s drugim uređajem" #: oleview.rc:157 msgid "&Machine name:" -msgstr "" +msgstr "&Ime uređaja:" #: oleview.rc:165 msgid "System Configuration" @@ -10447,21 +10471,23 @@ #: oleview.rc:169 msgid "&Enable Distributed COM" -msgstr "" +msgstr "&Omogući distribuirani COM" #: oleview.rc:170 msgid "Enable &Remote Connections (Win95 only)" -msgstr "" +msgstr "Omogući &udaljene veze (samo Win95)" #: oleview.rc:171 msgid "" "These settings change only registry values.\n" "They have no effect on Wine performance." msgstr "" +"Ove postavke mijenjaju samo vrijednosti registra.\n" +"Nemaju nikakav utjecaj na performanse Wine-a." #: oleview.rc:178 msgid "Default Interface Viewer" -msgstr "" +msgstr "Pretpostavljeni preglednik sučelja" #: oleview.rc:181 msgid "Interface" @@ -10469,7 +10495,7 @@ #: oleview.rc:183 msgid "IID:" -msgstr "" +msgstr "IID:" #: oleview.rc:186 msgid "&View Type Info" @@ -10477,19 +10503,19 @@ #: oleview.rc:191 msgid "IPersist Interface Viewer" -msgstr "" +msgstr "IPersist preglednik sučelja" #: oleview.rc:194 oleview.rc:206 msgid "Class Name:" -msgstr "" +msgstr "Ime klase:" #: oleview.rc:196 oleview.rc:208 msgid "CLSID:" -msgstr "" +msgstr "CLSID:" #: oleview.rc:203 msgid "IPersistStream Interface Viewer" -msgstr "" +msgstr "IPersistStream preglednik sučelja" #: oleview.rc:93 oleview.rc:94 msgid "OleView" @@ -10497,11 +10523,11 @@ #: oleview.rc:98 msgid "ITypeLib viewer" -msgstr "" +msgstr "ITypeLib preglednik" #: oleview.rc:96 msgid "OleView - OLE/COM Object Viewer" -msgstr "" +msgstr "OleView - OLE/COM preglednik objekata" #: oleview.rc:97 msgid "version 1.0" @@ -10509,7 +10535,7 @@ #: oleview.rc:100 msgid "TypeLib files (*.tlb; *.olb; *.dll; *.ocx; *.exe)" -msgstr "" +msgstr "TypeLib datoteke (*.tlb; *.olb; *.dll; *.ocx; *.exe)" #: oleview.rc:103 msgid "Bind to file via a File Moniker" @@ -10517,15 +10543,15 @@ #: oleview.rc:104 msgid "Open a TypeLib file and view the contents" -msgstr "" +msgstr "Otvori TypeLib datoteku i prikaži sadržaj" #: oleview.rc:105 msgid "Change machine wide Distributed COM settings" -msgstr "" +msgstr "Promijeni distribuirane COM postavke uređaja" #: oleview.rc:106 msgid "Run the Wine registry editor" -msgstr "" +msgstr "Pokreni Wine uređivač registra" #: oleview.rc:107 msgid "Quit the application. Prompts to save changes" @@ -10533,11 +10559,11 @@ #: oleview.rc:108 msgid "Create an instance of the selected object" -msgstr "" +msgstr "Stvori instancu odabranog objekta" #: oleview.rc:109 msgid "Create an instance of the selected object on a specific machine" -msgstr "" +msgstr "Stvori isntancu odabranog objekta na specifičnom uređaju" #: oleview.rc:110 msgid "Release the currently selected object instance" @@ -10549,7 +10575,7 @@ #: oleview.rc:112 msgid "Display the viewer for the selected item" -msgstr "" +msgstr "Prikaži preglednik za odabran predmet" #: oleview.rc:117 msgid "Toggle between expert and novice display mode" @@ -10562,15 +10588,15 @@ #: oleview.rc:119 msgid "Show or hide the toolbar" -msgstr "" +msgstr "Prikaži ili sakrij alatnu traku" #: oleview.rc:120 msgid "Show or hide the status bar" -msgstr "" +msgstr "Prikaži ili sakrij statusnu traku" #: oleview.rc:121 msgid "Refresh all lists" -msgstr "" +msgstr "Osvježi sve liste" #: oleview.rc:122 msgid "Display program information, version number and copyright" @@ -10630,7 +10656,7 @@ #: oleview.rc:138 msgid "Registry" -msgstr "" +msgstr "Registar" #: oleview.rc:139 msgid "Implementation" @@ -10654,7 +10680,7 @@ #: oleview.rc:148 msgid "LoadTypeLib( %1 ) failed ($%2!x!)" -msgstr "" +msgstr "LoadTypeLib( %1 ) neuspio ($%2!x!)" #: oleview.rc:149 msgid "Inherited Interfaces" @@ -10678,11 +10704,11 @@ #: progman.rc:31 msgid "O&pen\tEnter" -msgstr "" +msgstr "O&tvori\tEnter" #: progman.rc:32 winefile.rc:27 msgid "&Move...\tF7" -msgstr "" +msgstr "P&remjesti...\tF7" #: progman.rc:33 winefile.rc:28 msgid "&Copy...\tF8" @@ -10706,7 +10732,7 @@ #: progman.rc:42 msgid "&Arrange automatically" -msgstr "" +msgstr "R&asporedi automatski" #: progman.rc:43 msgid "&Minimize on run" @@ -10714,11 +10740,11 @@ #: progman.rc:44 winefile.rc:67 msgid "&Save settings on exit" -msgstr "" +msgstr "&Spremi postavke na izlasku" #: progman.rc:46 taskmgr.rc:78 taskmgr.rc:255 msgid "&Windows" -msgstr "" +msgstr "&Prozori" #: progman.rc:47 msgid "&Overlapped\tShift+F5" @@ -10730,7 +10756,7 @@ #: progman.rc:49 msgid "&Arrange Icons" -msgstr "" +msgstr "Raspor&edi ikone" #: progman.rc:54 msgid "&About Program Manager" @@ -10830,11 +10856,11 @@ #: progman.rc:65 msgid "Delete group `%s'?" -msgstr "" +msgstr "Izbrisati grupu `%s'?" #: progman.rc:66 msgid "Delete program `%s'?" -msgstr "" +msgstr "Izbrisati program `%s'?" #: progman.rc:67 msgid "Not implemented" @@ -10842,11 +10868,11 @@ #: progman.rc:68 msgid "Error reading `%s'." -msgstr "" +msgstr "Greška prilikom čitanja `%s'." #: progman.rc:69 msgid "Error writing `%s'." -msgstr "" +msgstr "Greška prilikom pisanja `%s'." #: progman.rc:72 msgid "" @@ -10860,27 +10886,27 @@ #: progman.rc:75 msgid "Unknown feature in %s" -msgstr "" +msgstr "Nepoznato svojstvo u %s" #: progman.rc:76 msgid "File `%s' exists. Not overwritten." -msgstr "" +msgstr "Datoteka `%s' postoji. Nije prepisana." #: progman.rc:77 msgid "Save group as `%s to prevent overwriting original files." -msgstr "" +msgstr "Spremi grupi kao `%s' kako " #: progman.rc:81 msgid "Libraries (*.dll)" -msgstr "" +msgstr "Biblioteke (*.dll)" #: progman.rc:82 msgid "Icon files" -msgstr "" +msgstr "Datoteke ikona" #: progman.rc:83 msgid "Icons (*.ico)" -msgstr "" +msgstr "Ikone (*.ico)" #: reg.rc:27 msgid "" @@ -10889,28 +10915,34 @@ "REG [ ADD | DELETE | QUERY ]\n" "REG command /?\n" msgstr "" +"Sintaksa ove naredbe je:\n" +"\n" +"REG [ ADD | DELETE | QUERY ]\n" +"REG naredba /?\n" #: reg.rc:28 msgid "" "REG ADD key_name [/v value_name | /ve] [/t type] [/s separator] [/d data] [/" "f]\n" msgstr "" +"REG ADD ime_ključa [/v ime_vrijednosti | /ve] [/t vrsta] [/s separator] [/d " +"podaci] [/f]\n" #: reg.rc:29 msgid "REG DELETE key_name [/v value_name | /ve | /va] [/f]\n" -msgstr "" +msgstr "REG DELETE ime_ključa [/v ime_vrijednosti | /ve | /va] [/f]\n" #: reg.rc:30 msgid "REG QUERY key_name [/v value_name | /ve] [/s]\n" -msgstr "" +msgstr "REG QUERY ime_ključa [/v ime_vrijednosti | /ve] [/s]\n" #: reg.rc:31 msgid "The operation completed successfully\n" -msgstr "" +msgstr "Operacija uspješno dovršena\n" #: reg.rc:32 msgid "Error: Invalid key name\n" -msgstr "" +msgstr "Greška: Neispravan naziv ključa\n" #: reg.rc:33 msgid "Error: Invalid command line parameters\n" @@ -10925,30 +10957,31 @@ msgid "" "Error: The system was unable to find the specified registry key or value\n" msgstr "" +"Greška: Sustav nije mogao pronaći navedeni ključ ili vrijednost u registru.\n" #: regedit.rc:31 msgid "&Registry" -msgstr "" +msgstr "&Registar" #: regedit.rc:33 msgid "&Import Registry File..." -msgstr "" +msgstr "&Uvoz datoteke registra..." #: regedit.rc:34 msgid "&Export Registry File..." -msgstr "" +msgstr "&Izvoz datoteke registra..." #: regedit.rc:46 regedit.rc:97 msgid "&Key" -msgstr "" +msgstr "&Ključ" #: regedit.rc:48 regedit.rc:99 msgid "&String Value" -msgstr "" +msgstr "&Znakovna vrijednost" #: regedit.rc:49 regedit.rc:100 msgid "&Binary Value" -msgstr "" +msgstr "&Binarna vrijednost" #: regedit.rc:50 regedit.rc:101 msgid "&DWORD Value" @@ -10968,7 +11001,7 @@ #: regedit.rc:58 regedit.rc:110 msgid "&Copy Key Name" -msgstr "" +msgstr "&Kopiraj ime ključa" #: regedit.rc:60 regedit.rc:112 wordpad.rc:50 msgid "&Find...\tCtrl+F" @@ -10976,15 +11009,15 @@ #: regedit.rc:61 msgid "Find Ne&xt\tF3" -msgstr "" +msgstr "Nađi slje&deći\tF3" #: regedit.rc:65 msgid "Status &Bar" -msgstr "linija stanja" +msgstr "Statusna &traka" #: regedit.rc:67 winefile.rc:46 msgid "Sp&lit" -msgstr "" +msgstr "P&odijeli" #: regedit.rc:74 msgid "&Remove Favorite..." @@ -11008,23 +11041,23 @@ #: regedit.rc:226 msgid "Find:" -msgstr "" +msgstr "Pronađi:" #: regedit.rc:228 msgid "Find in:" -msgstr "" +msgstr "Pronađi u:" #: regedit.rc:229 msgid "Keys" -msgstr "" +msgstr "Ključevi" #: regedit.rc:230 msgid "Value names" -msgstr "" +msgstr "Imena vrijednosti" #: regedit.rc:231 msgid "Value content" -msgstr "" +msgstr "Sadržaj vrijednosti" #: regedit.rc:232 msgid "Whole string only" @@ -11048,11 +11081,11 @@ #: regedit.rc:264 regedit.rc:277 regedit.rc:293 regedit.rc:306 msgid "Value name:" -msgstr "" +msgstr "Ime vrijednosti:" #: regedit.rc:266 regedit.rc:279 regedit.rc:295 regedit.rc:308 msgid "Value data:" -msgstr "" +msgstr "Podaci vrijednosti:" #: regedit.rc:274 msgid "Edit DWORD" @@ -11060,15 +11093,15 @@ #: regedit.rc:281 msgid "Base" -msgstr "" +msgstr "Baza" #: regedit.rc:282 msgid "Hexadecimal" -msgstr "" +msgstr "Heksadecimalno" #: regedit.rc:283 msgid "Decimal" -msgstr "" +msgstr "Decimalno" #: regedit.rc:290 msgid "Edit Binary" @@ -11105,7 +11138,7 @@ #: regedit.rc:124 msgid "Data" -msgstr "" +msgstr "Podaci" #: regedit.rc:129 msgid "Registry Editor" @@ -11121,7 +11154,7 @@ #: regedit.rc:193 msgid "Registry files (*.reg)" -msgstr "" +msgstr "Datotoeke registra (*.reg)" #: regedit.rc:194 msgid "Win9x/NT4 Registry files (REGEDIT4)" @@ -11157,7 +11190,7 @@ #: regedit.rc:163 msgid "Shows or hides the status bar" -msgstr "" +msgstr "Prikazuje ili skriva statusnu traku" #: regedit.rc:164 msgid "Change position of split between two panes" @@ -11233,7 +11266,7 @@ #: regedit.rc:180 msgid "Value is too big (%u)" -msgstr "" +msgstr "Vrijednost je prevelika (%u)" #: regedit.rc:181 msgid "Confirm Value Delete" @@ -11253,11 +11286,11 @@ #: regedit.rc:184 msgid "New Key #%d" -msgstr "" +msgstr "Novi ključ #%d" #: regedit.rc:185 msgid "New Value #%d" -msgstr "" +msgstr "Nova vrijednost #%d" #: regedit.rc:177 msgid "Can't query key '%s'" @@ -11277,14 +11310,17 @@ "specified file.\n" "ShellExecuteEx failed" msgstr "" +"Aplikacija se nije mogla pokrenuti, ili nema aplikacije asocirane sa " +"navedenom datotekom.\n" +"ShellExecuteEx nije uspio" #: start.rc:54 msgid "Could not translate the specified Unix filename to a DOS filename." -msgstr "" +msgstr "Navedeno Unix ime datoteke ne mogu prevesti u DOS ime datoteke." #: taskkill.rc:27 msgid "Usage: taskkill [/?] [/f] [/im ProcessName | /pid ProcessID]\n" -msgstr "" +msgstr "Uporaba: taskkill [/?] [/f] [/im ImeProcesa | /pid IDProcesa]\n" #: taskkill.rc:28 msgid "Error: Unknown or invalid command line option specified.\n" @@ -11341,7 +11377,7 @@ #: taskmgr.rc:37 taskmgr.rc:108 msgid "&New Task (Run...)" -msgstr "" +msgstr "&Novi zadatak (Pokreni...)" #: taskmgr.rc:39 msgid "E&xit Task Manager" @@ -11357,7 +11393,7 @@ #: taskmgr.rc:49 taskmgr.rc:257 msgid "&Show 16-bit tasks" -msgstr "" +msgstr "&Prikaži 16-bitne zadatke" #: taskmgr.rc:54 msgid "&Refresh Now" @@ -11365,39 +11401,39 @@ #: taskmgr.rc:55 msgid "&Update Speed" -msgstr "" +msgstr "&Brzina osvježavanja" #: taskmgr.rc:57 taskmgr.rc:158 msgid "&High" -msgstr "" +msgstr "&Visoka" #: taskmgr.rc:58 taskmgr.rc:162 msgid "&Normal" -msgstr "" +msgstr "&Normalna" #: taskmgr.rc:60 taskmgr.rc:166 msgid "&Low" -msgstr "" +msgstr "&Niska" #: taskmgr.rc:61 msgid "&Paused" -msgstr "" +msgstr "&Pauzirana" #: taskmgr.rc:68 taskmgr.rc:256 msgid "&Select Columns..." -msgstr "" +msgstr "&Odaberi stupce..." #: taskmgr.rc:69 taskmgr.rc:258 msgid "&CPU History" -msgstr "" +msgstr "&CPU povijest" #: taskmgr.rc:71 taskmgr.rc:259 msgid "&One Graph, All CPUs" -msgstr "" +msgstr "&Jedan graf, svi CPU-i" #: taskmgr.rc:73 taskmgr.rc:260 msgid "One Graph &Per CPU" -msgstr "" +msgstr "Jedan graf po &CPU" #: taskmgr.rc:76 taskmgr.rc:261 msgid "&Show Kernel Times" @@ -11433,19 +11469,19 @@ #: taskmgr.rc:129 taskmgr.rc:353 msgid "&End Task" -msgstr "" +msgstr "&Zaustavi zadatak" #: taskmgr.rc:130 msgid "&Go To Process" -msgstr "" +msgstr "&Idi na proces" #: taskmgr.rc:149 taskmgr.rc:363 msgid "&End Process" -msgstr "" +msgstr "&Završi proces" #: taskmgr.rc:150 msgid "End Process &Tree" -msgstr "" +msgstr "Završi &stablo procesa" #: taskmgr.rc:152 winedbg.rc:29 msgid "&Debug" @@ -11481,23 +11517,23 @@ #: taskmgr.rc:351 msgid "&New Task..." -msgstr "" +msgstr "&Novi zadatak..." #: taskmgr.rc:364 msgid "&Show processes from all users" -msgstr "" +msgstr "&Prikaži procese svih korisnika" #: taskmgr.rc:372 msgid "CPU usage" -msgstr "" +msgstr "CPU upotreba" #: taskmgr.rc:373 msgid "Mem usage" -msgstr "" +msgstr "Mem upotreba" #: taskmgr.rc:374 msgid "Totals" -msgstr "" +msgstr "Ukupno" #: taskmgr.rc:375 msgid "Commit charge (K)" @@ -11517,23 +11553,23 @@ #: taskmgr.rc:379 taskmgr.rc:291 msgid "Threads" -msgstr "" +msgstr "Niti" #: taskmgr.rc:380 taskmgr.rc:263 msgid "Processes" -msgstr "" +msgstr "Procesa" #: taskmgr.rc:387 taskmgr.rc:396 taskmgr.rc:405 msgid "Total" -msgstr "" +msgstr "Ukupno" #: taskmgr.rc:388 msgid "Limit" -msgstr "" +msgstr "Ograničenje" #: taskmgr.rc:389 msgid "Peak" -msgstr "" +msgstr "Vršno" #: taskmgr.rc:398 msgid "System Cache" @@ -11541,19 +11577,19 @@ #: taskmgr.rc:406 msgid "Paged" -msgstr "" +msgstr "Straničeno" #: taskmgr.rc:407 msgid "Nonpaged" -msgstr "" +msgstr "Nestraničeno" #: taskmgr.rc:414 msgid "CPU usage history" -msgstr "" +msgstr "Povijest CPU uporabe" #: taskmgr.rc:415 msgid "Memory usage history" -msgstr "" +msgstr "Povijest memorijske uporabe" #: taskmgr.rc:428 taskmgr.rc:327 msgid "Debug Channels" @@ -11561,7 +11597,7 @@ #: taskmgr.rc:439 msgid "Processor Affinity" -msgstr "" +msgstr "Afinitet procesora" #: taskmgr.rc:444 msgid "" @@ -11712,27 +11748,27 @@ #: taskmgr.rc:523 msgid "&PID (Process Identifier)" -msgstr "" +msgstr "&PID (Identifikator procesa)" #: taskmgr.rc:525 msgid "&CPU Usage" -msgstr "" +msgstr "&CPU uporaba" #: taskmgr.rc:527 msgid "CPU Tim&e" -msgstr "" +msgstr "&CPU vri&jeme" #: taskmgr.rc:529 msgid "&Memory Usage" -msgstr "" +msgstr "&Memorijska uporaba" #: taskmgr.rc:531 msgid "Memory Usage &Delta" -msgstr "" +msgstr "Delta memorijske &uporabe" #: taskmgr.rc:533 msgid "Pea&k Memory Usage" -msgstr "" +msgstr "&Vršna uporaba memorije" #: taskmgr.rc:535 msgid "Page &Faults" @@ -11740,23 +11776,23 @@ #: taskmgr.rc:537 msgid "&USER Objects" -msgstr "" +msgstr "&USER objekti" #: taskmgr.rc:539 taskmgr.rc:281 msgid "I/O Reads" -msgstr "" +msgstr "U/I čitanja" #: taskmgr.rc:541 taskmgr.rc:282 msgid "I/O Read Bytes" -msgstr "" +msgstr "U/I okteti čitanja" #: taskmgr.rc:543 msgid "&Session ID" -msgstr "" +msgstr "&ID sjednice" #: taskmgr.rc:545 msgid "User &Name" -msgstr "" +msgstr "Korisničko &ime" #: taskmgr.rc:547 msgid "Page F&aults Delta" @@ -11764,7 +11800,7 @@ #: taskmgr.rc:549 msgid "&Virtual Memory Size" -msgstr "" +msgstr "Vel&ičina virtualne memorije" #: taskmgr.rc:551 msgid "Pa&ged Pool" @@ -11776,7 +11812,7 @@ #: taskmgr.rc:555 msgid "Base P&riority" -msgstr "" +msgstr "Osnovni p&rioritet" #: taskmgr.rc:557 msgid "&Handle Count" @@ -11784,35 +11820,35 @@ #: taskmgr.rc:559 msgid "&Thread Count" -msgstr "" +msgstr "Broj &niti" #: taskmgr.rc:561 taskmgr.rc:292 msgid "GDI Objects" -msgstr "" +msgstr "GDI objekti" #: taskmgr.rc:563 taskmgr.rc:293 msgid "I/O Writes" -msgstr "" +msgstr "U/I pisanja" #: taskmgr.rc:565 taskmgr.rc:294 msgid "I/O Write Bytes" -msgstr "" +msgstr "U/I okteti pisanja" #: taskmgr.rc:567 taskmgr.rc:295 msgid "I/O Other" -msgstr "I/O ostalo" +msgstr "U/I ostalo" #: taskmgr.rc:569 taskmgr.rc:296 msgid "I/O Other Bytes" -msgstr "" +msgstr "U/I drugi okteti" #: taskmgr.rc:182 msgid "Create New Task" -msgstr "" +msgstr "Stvori novi tadatak" #: taskmgr.rc:187 msgid "Runs a new program" -msgstr "" +msgstr "Pokreće novi program" #: taskmgr.rc:188 msgid "Task Manager remains in front of all other windows unless minimized" @@ -11832,31 +11868,31 @@ #: taskmgr.rc:193 msgid "Displays tasks by using large icons" -msgstr "" +msgstr "Prikazuje zadatke koristeći velike ikone" #: taskmgr.rc:194 msgid "Displays tasks by using small icons" -msgstr "" +msgstr "Prikazuje zadatke koristeći male ikone" #: taskmgr.rc:195 msgid "Displays information about each task" -msgstr "" +msgstr "Prikazuje informacije o svakom zadatku" #: taskmgr.rc:196 msgid "Updates the display twice per second" -msgstr "" +msgstr "Osvježava prikaz dva puta u sekundi" #: taskmgr.rc:197 msgid "Updates the display every two seconds" -msgstr "" +msgstr "Osvježava prikaz svake dvije sekunde" #: taskmgr.rc:198 msgid "Updates the display every four seconds" -msgstr "" +msgstr "Osvježava prikaz svake četiri sekunde" #: taskmgr.rc:203 msgid "Does not automatically update" -msgstr "" +msgstr "Ne osvježava prikaz automatski" #: taskmgr.rc:205 msgid "Tiles the windows horizontally on the desktop" @@ -11980,15 +12016,15 @@ #: taskmgr.rc:265 msgid "CPU Usage: %3d%%" -msgstr "" +msgstr "CPU uporaba: %3d%%" #: taskmgr.rc:266 msgid "Processes: %d" -msgstr "" +msgstr "Procesi: %d" #: taskmgr.rc:267 msgid "Mem Usage: %1!u!kB / %2!u!kB" -msgstr "" +msgstr "Mem uporaba: %1!u!kB / %2!u!kB" #: taskmgr.rc:272 msgid "Image Name" @@ -11996,27 +12032,27 @@ #: taskmgr.rc:273 msgid "PID" -msgstr "" +msgstr "PID" #: taskmgr.rc:274 msgid "CPU" -msgstr "" +msgstr "CPU" #: taskmgr.rc:275 msgid "CPU Time" -msgstr "" +msgstr "CPU vrijeme" #: taskmgr.rc:276 msgid "Mem Usage" -msgstr "" +msgstr "Mem uporaba" #: taskmgr.rc:277 msgid "Mem Delta" -msgstr "" +msgstr "Mem delta" #: taskmgr.rc:278 msgid "Peak Mem Usage" -msgstr "" +msgstr "Vršna mem uporaba" #: taskmgr.rc:279 msgid "Page Faults" @@ -12024,11 +12060,11 @@ #: taskmgr.rc:280 msgid "USER Objects" -msgstr "" +msgstr "USER objektis" #: taskmgr.rc:283 msgid "Session ID" -msgstr "" +msgstr "ID sjednice" #: taskmgr.rc:284 msgid "Username" @@ -12040,7 +12076,7 @@ #: taskmgr.rc:286 msgid "VM Size" -msgstr "" +msgstr "VM veličina" #: taskmgr.rc:287 msgid "Paged Pool" @@ -12110,19 +12146,19 @@ #: taskmgr.rc:323 msgid "Not Responding" -msgstr "" +msgstr "Ne reagira" #: taskmgr.rc:324 msgid "Running" -msgstr "" +msgstr "Izvodi se" #: taskmgr.rc:325 msgid "Task" -msgstr "" +msgstr "Zadatak" #: uninstaller.rc:26 msgid "Wine Application Uninstaller" -msgstr "Wine deinstalacioni program" +msgstr "Wine deinstalacijski program" #: uninstaller.rc:27 msgid "" @@ -12273,8 +12309,8 @@ "(provided by Wine) or native (taken from Windows or provided by the " "application)." msgstr "" -"Biblioteke mogu biti podešene zasebno da budu ili builtin (omogućene od Wine-" -"a) ili native (uzete od Windowsa ili od aplikacije)." +"Biblioteke mogu biti podešene zasebno da budu ili ugrađene (omogućene od " +"Wine-a) ili nativne (uzete od Windowsa ili od aplikacije)." #: winecfg.rc:185 msgid "&New override for library:" @@ -12530,7 +12566,7 @@ #: winecfg.rc:57 msgid "disabled" -msgstr "isključen" +msgstr "onemogućen" #: winecfg.rc:58 msgid "Default Settings" @@ -12927,7 +12963,7 @@ "Options:\n" msgstr "" "\n" -"Korištenje:\n" +"Uporaba:\n" " wineconsole [opcije] \n" "\n" "Opcije:\n" @@ -12942,7 +12978,7 @@ #: wineconsole.rc:50 msgid " The Wine program to launch in the console.\n" -msgstr "" +msgstr " Wine program za pokrenuti u konzoli.\n" #: wineconsole.rc:51 msgid "" @@ -12952,6 +12988,11 @@ "Starts the Wine command prompt in a Wine console.\n" "\n" msgstr "" +"\n" +"Primjer:\n" +" wineconsole cmd\n" +"Pokreće Wine naredbenu liniju u Wine konzoli\n" +"\n" #: winedbg.rc:46 msgid "Program Error" @@ -12966,17 +13007,14 @@ "se zbog neugodnosti." #: winedbg.rc:55 -#, fuzzy msgid "" "This can be caused by a problem in the program or a deficiency in Wine. You " "may want to check the Application " "Database for tips about running this application." msgstr "" "Uzrok ovome može biti problem u programu ili nedostatak u Wine-u. Provjerite " -"http://appdb.winehq.org za savjete o pokretanju ovog programa.\n" -"\n" -"Ako ovaj problem nije prisutan pod Windows-om i još uvijek nije prijavljen, " -"prijavite ga na http://bugs.winehq.org." +"bazu aplikacijaza savjete o " +"pokretanju ovog programa." #: winedbg.rc:58 msgid "Show &Details" @@ -13204,22 +13242,16 @@ msgstr "Nije još implementirano" #: winefile.rc:106 -#, fuzzy -#| msgid "Creation failed.\n" msgid "Creation date" -msgstr "Stvaranje neuspjelo.\n" +msgstr "Datum stvaranja" #: winefile.rc:107 -#, fuzzy -#| msgid "Access denied.\n" msgid "Access date" -msgstr "Pristup odbijen.\n" +msgstr "Datum pristupa" #: winefile.rc:108 -#, fuzzy -#| msgid "Certification Path" msgid "Modification date" -msgstr "Putanja certifikacije" +msgstr "Datum promjene" #: winefile.rc:109 msgid "Index/Inode" @@ -13374,7 +13406,7 @@ #: winhlp32.rc:55 msgid "Always on &top" -msgstr "Uvek na &vrhu" +msgstr "Uvijek na &vrhu" #: winhlp32.rc:56 msgid "&About Wine Help" @@ -13849,12 +13881,12 @@ #: xcopy.rc:43 msgctxt "File key" msgid "F" -msgstr "" +msgstr "F" #: xcopy.rc:44 msgctxt "Directory key" msgid "D" -msgstr "" +msgstr "D" #: xcopy.rc:77 msgid "" diff -Nru wine1.6-1.7.1-actually1.6/po/hu.po wine1.6-1.6.1/po/hu.po --- wine1.6-1.7.1-actually1.6/po/hu.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/hu.po 2013-11-15 19:30:24.000000000 +0000 @@ -6389,15 +6389,15 @@ msgstr "Nincs több bind kötés.\n" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "Nem lehet bejelentkezni a belső domain biztonsági fiókból.\n" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "Nem lehet bejelentkezni a munkaállomás biztonsági fiókból.\n" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "Nem lehet bejelentkezni a szerver biztonsági fiókból.\n" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/it.po wine1.6-1.6.1/po/it.po --- wine1.6-1.7.1-actually1.6/po/it.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/it.po 2013-11-15 19:30:24.000000000 +0000 @@ -6403,15 +6403,15 @@ msgstr "Nessun legame più.\n" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "Logon impossibile con account di fiducia interdominio.\n" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "Logon impossibile con account di fiducia workstation.\n" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "Logon impossibile con account di fiducia server.\n" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/ja.po wine1.6-1.6.1/po/ja.po --- wine1.6-1.7.1-actually1.6/po/ja.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/ja.po 2013-11-15 19:30:24.000000000 +0000 @@ -6341,15 +6341,15 @@ msgstr "これ以上のバインディングはありません。\n" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "ドメイン間信頼アカウントではログオンできません。\n" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "ワークステーション信頼アカウントではログオンできません。\n" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "サーバ信頼アカウントではログオンできません。\n" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/ko.po wine1.6-1.6.1/po/ko.po --- wine1.6-1.7.1-actually1.6/po/ko.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/ko.po 2013-11-15 19:30:24.000000000 +0000 @@ -1270,7 +1270,7 @@ #: crypt32.rc:42 msgid "Yes or No Trust" -msgstr "신뢰(예 나 아니오)" +msgstr "신뢰(예(Y) 나 아니오(N))" #: crypt32.rc:43 msgid "Email Address" @@ -4782,7 +4782,7 @@ #: winerror.mc:1486 msgid "Single-instance application.\n" -msgstr "단일 인스턴트 어플리케이션.\n" +msgstr "단일 인스턴트 프로그램 .\n" #: winerror.mc:1491 msgid "Real-mode application.\n" @@ -6337,15 +6337,15 @@ msgstr "더 이상의 바인딩은 없음.\n" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "내부 도메인의 신뢰된 계정에 로그온할 수 없습니다.\n" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "워크스테이션의 신뢰된 계정에 로그온 할 수 없습니다.\n" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "서버의 신뢰된 계정에 로그온할 수 없습니다.\n" #: winerror.mc:3461 @@ -10064,11 +10064,11 @@ #: cmd.rc:351 msgid " (Yes|No)" -msgstr "(예|아니오)" +msgstr "(예(Y)|아니오(N))" #: cmd.rc:352 msgid " (Yes|No|All)" -msgstr "(예|아니오|모두)" +msgstr "(예(Y)|아니오(N)|모두(A))" #: cmd.rc:353 msgid "" @@ -14198,11 +14198,11 @@ #: xcopy.rc:35 msgid "%1? (Yes|No)\n" -msgstr "%1? (예|아니오)\n" +msgstr "%1? (예(Y)|아니오(N))\n" #: xcopy.rc:36 msgid "Overwrite %1? (Yes|No|All)\n" -msgstr "%1를 덮어쓰겠습니까? (예|아니오|모두)\n" +msgstr "%1를 덮어쓰겠습니까? (예(Y)|아니오(N)|모두(A))\n" #: xcopy.rc:37 msgid "Copying of '%1' to '%2' failed with r/c %3!d!\n" diff -Nru wine1.6-1.7.1-actually1.6/po/lt.po wine1.6-1.6.1/po/lt.po --- wine1.6-1.7.1-actually1.6/po/lt.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/lt.po 2013-11-15 19:30:24.000000000 +0000 @@ -6353,15 +6353,15 @@ msgstr "Nėra daugiau saistymų.\n" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "Negalima prisijungti su tarpsritine patikima paskyra.\n" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "Negalima prisijungti su darbo vietos patikima paskyra.\n" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "Negalima prisijungti su serverio patikima paskyra.\n" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/ml.po wine1.6-1.6.1/po/ml.po --- wine1.6-1.7.1-actually1.6/po/ml.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/ml.po 2013-11-15 19:30:24.000000000 +0000 @@ -6257,15 +6257,15 @@ msgstr "" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/nb_NO.po wine1.6-1.6.1/po/nb_NO.po --- wine1.6-1.7.1-actually1.6/po/nb_NO.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/nb_NO.po 2013-11-15 19:30:24.000000000 +0000 @@ -6574,15 +6574,15 @@ msgstr "Ingen flere bindinger.\n" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "Klarte ikke logge på med pålitelighetskonto for flere domerer.\n" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "Klarte ikke logge på med pålitelighetskonto for arbeidsstasjonen.\n" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "Klarte ikke logge på med pålitelighetskonto for tjeneren.\n" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/nl.po wine1.6-1.6.1/po/nl.po --- wine1.6-1.7.1-actually1.6/po/nl.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/nl.po 2013-11-15 19:30:24.000000000 +0000 @@ -6376,15 +6376,15 @@ msgstr "Geen bindings meer.\n" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "Kan niet inloggen met interdomein vertrouwde account.\n" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "Kan niet inloggen met werkstation vertrouwde account.\n" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "Kan niet inloggen met server vertrouwde account.\n" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/or.po wine1.6-1.6.1/po/or.po --- wine1.6-1.7.1-actually1.6/po/or.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/or.po 2013-11-15 19:30:24.000000000 +0000 @@ -6257,15 +6257,15 @@ msgstr "" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/pa.po wine1.6-1.6.1/po/pa.po --- wine1.6-1.7.1-actually1.6/po/pa.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/pa.po 2013-11-15 19:30:24.000000000 +0000 @@ -6257,15 +6257,15 @@ msgstr "" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/pl.po wine1.6-1.6.1/po/pl.po --- wine1.6-1.7.1-actually1.6/po/pl.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/pl.po 2013-11-15 19:30:24.000000000 +0000 @@ -6367,15 +6367,15 @@ msgstr "Nie ma więcej bindingów.\n" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "Nie można zalogować z kontem zaufanym interdomain.\n" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "Nie można zalogować z kontem zaufanym stacji roboczej.\n" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "Nie można zalogować z kontem zaufanym serwera.\n" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/pt_BR.po wine1.6-1.6.1/po/pt_BR.po --- wine1.6-1.7.1-actually1.6/po/pt_BR.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/pt_BR.po 2013-11-15 19:30:24.000000000 +0000 @@ -6361,15 +6361,15 @@ msgstr "Sem mais vínculos.\n" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "Não é possível logar com conta confiável entre domínios.\n" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "Não é possível logar com conta confiável de estação de trabalho.\n" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "Não é possível logar com conta confiável do servidor.\n" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/pt_PT.po wine1.6-1.6.1/po/pt_PT.po --- wine1.6-1.7.1-actually1.6/po/pt_PT.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/pt_PT.po 2013-11-15 19:30:24.000000000 +0000 @@ -6399,15 +6399,15 @@ msgstr "Sem mais bindings.\n" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "Não consegue ligar com conta confiável interdomínio.\n" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "Não consegue ligar com conta confiável de estação de trabalho.\n" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "Não consegue ligar com conta confiável do servidor.\n" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/rm.po wine1.6-1.6.1/po/rm.po --- wine1.6-1.7.1-actually1.6/po/rm.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/rm.po 2013-11-15 19:30:24.000000000 +0000 @@ -6300,15 +6300,15 @@ msgstr "" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/ro.po wine1.6-1.6.1/po/ro.po --- wine1.6-1.7.1-actually1.6/po/ro.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/ro.po 2013-11-15 19:30:24.000000000 +0000 @@ -6532,15 +6532,15 @@ msgstr "" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/ru.po wine1.6-1.6.1/po/ru.po --- wine1.6-1.7.1-actually1.6/po/ru.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/ru.po 2013-11-15 19:30:24.000000000 +0000 @@ -6354,16 +6354,16 @@ msgstr "Привязок больше нет.\n" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "" "Не удаётся войти в систему с учётной записью другого доверенного домена.\n" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "Не удаётся войти в систему с учётной записью компьютера.\n" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "Не удаётся войти в систему с учётной записью доверенного сервера.\n" #: winerror.mc:3461 @@ -12633,8 +12633,8 @@ "or per-application settings in those tabs as well." msgstr "" "Wine может имитировать различные версии Windows для каждого приложения " -"отдельно. Эта вкладка связана с вкладками Библиотеки и Графика, что " -"позволяет изменение настроек в этих вкладках как для определённого " +"отдельно. Эта вкладка связана со вкладками Библиотеки и Графика, что " +"позволяет изменять настройки в этих вкладках как для определённого " "приложения, так и глобально." #: winecfg.rc:150 @@ -12671,7 +12671,7 @@ #: winecfg.rc:166 msgid "Desktop &size:" -msgstr "Размер рабочего стола:" +msgstr "&Рабочий стол:" #: winecfg.rc:171 msgid "Screen resolution" @@ -12679,7 +12679,7 @@ #: winecfg.rc:175 msgid "This is a sample text using 10 point Tahoma" -msgstr "Пример текста (This is a sample text), шрифт Tahoma 10 пунктов" +msgstr "Пример текста, шрифт Tahoma 10 пунктов" #: winecfg.rc:182 msgid "DLL overrides" @@ -12764,7 +12764,7 @@ #: winecfg.rc:239 winecfg.rc:35 msgid "Show &Advanced" -msgstr "Показать &дополнительные" +msgstr "&Дополнительно" #: winecfg.rc:240 msgid "De&vice:" @@ -12892,7 +12892,7 @@ #: winecfg.rc:45 msgid "Folder" -msgstr "Стандартные папки" +msgstr "Папка" #: winecfg.rc:46 msgid "Links to" diff -Nru wine1.6-1.7.1-actually1.6/po/sk.po wine1.6-1.6.1/po/sk.po --- wine1.6-1.7.1-actually1.6/po/sk.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/sk.po 2013-11-15 19:30:24.000000000 +0000 @@ -6342,15 +6342,15 @@ msgstr "" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/sl.po wine1.6-1.6.1/po/sl.po --- wine1.6-1.7.1-actually1.6/po/sl.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/sl.po 2013-11-15 19:30:24.000000000 +0000 @@ -6391,15 +6391,15 @@ msgstr "Ni več vezav.\n" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "Ni se mogoče prijaviti z računom meddomenskega zaupanja.\n" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "Ni se mogoče prijaviti z računom zaupanja delovne postaje.\n" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "Ni se mogoče prijaviti z računom zaupanja strežnika.\n" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/sr_RS@cyrillic.po wine1.6-1.6.1/po/sr_RS@cyrillic.po --- wine1.6-1.7.1-actually1.6/po/sr_RS@cyrillic.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/sr_RS@cyrillic.po 2013-11-15 19:30:24.000000000 +0000 @@ -6597,15 +6597,15 @@ msgstr "" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/sr_RS@latin.po wine1.6-1.6.1/po/sr_RS@latin.po --- wine1.6-1.7.1-actually1.6/po/sr_RS@latin.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/sr_RS@latin.po 2013-11-15 19:30:24.000000000 +0000 @@ -6690,15 +6690,15 @@ msgstr "" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/sv.po wine1.6-1.6.1/po/sv.po --- wine1.6-1.7.1-actually1.6/po/sv.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/sv.po 2013-11-15 19:30:24.000000000 +0000 @@ -6333,15 +6333,15 @@ msgstr "Inga fler bindningar.\n" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/te.po wine1.6-1.6.1/po/te.po --- wine1.6-1.7.1-actually1.6/po/te.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/te.po 2013-11-15 19:30:24.000000000 +0000 @@ -6257,15 +6257,15 @@ msgstr "" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/th.po wine1.6-1.6.1/po/th.po --- wine1.6-1.7.1-actually1.6/po/th.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/th.po 2013-11-15 19:30:24.000000000 +0000 @@ -6369,15 +6369,15 @@ msgstr "" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/tr.po wine1.6-1.6.1/po/tr.po --- wine1.6-1.7.1-actually1.6/po/tr.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/tr.po 2013-11-15 19:30:24.000000000 +0000 @@ -4420,7 +4420,7 @@ #: winerror.mc:1021 msgid "Stack overflow.\n" -msgstr "" +msgstr "Yığın bellek taştı.\n" #: winerror.mc:1026 msgid "Invalid message.\n" @@ -4428,7 +4428,7 @@ #: winerror.mc:1031 msgid "Cannot complete.\n" -msgstr "" +msgstr "Tamamlanamadı.\n" #: winerror.mc:1036 msgid "Invalid flags.\n" @@ -4456,7 +4456,7 @@ #: winerror.mc:1066 msgid "Invalid key.\n" -msgstr "" +msgstr "Geçersiz anahtar.\n" #: winerror.mc:1071 msgid "Can't open registry key.\n" @@ -4476,23 +4476,23 @@ #: winerror.mc:1091 msgid "Registry is corrupt.\n" -msgstr "" +msgstr "Kayıt defteri bozuk.\n" #: winerror.mc:1096 msgid "I/O to registry failed.\n" -msgstr "" +msgstr "Kayda G/Ç başarısız.\n" #: winerror.mc:1101 msgid "Not registry file.\n" -msgstr "" +msgstr "Kayıt dosyası değil.\n" #: winerror.mc:1106 msgid "Key deleted.\n" -msgstr "" +msgstr "Anahtar silindi.\n" #: winerror.mc:1111 msgid "No registry log space.\n" -msgstr "" +msgstr "Kayıt günlük boşluğu yok.\n" #: winerror.mc:1116 msgid "Registry key has subkeys.\n" @@ -4552,7 +4552,7 @@ #: winerror.mc:1186 msgid "Service not active.\n" -msgstr "" +msgstr "Hizmet etkin değil.\n" #: winerror.mc:1191 msgid "Service controller connect failed.\n" @@ -5844,15 +5844,15 @@ #: winerror.mc:2811 msgid "Installation already running.\n" -msgstr "" +msgstr "Kurulum zaten çalışıyor.\n" #: winerror.mc:2816 msgid "Installation package failed to open.\n" -msgstr "" +msgstr "Kurulum paketi açılamadı.\n" #: winerror.mc:2821 msgid "Installation package is invalid.\n" -msgstr "" +msgstr "Kurulum paketi geçersiz.\n" #: winerror.mc:2826 msgid "Installer user interface failed.\n" @@ -6347,15 +6347,15 @@ msgstr "" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "" #: winerror.mc:3461 @@ -13564,22 +13564,16 @@ msgstr "Henüz tamamlanmadı" #: winefile.rc:106 -#, fuzzy -#| msgid "Expiration Date" msgid "Creation date" -msgstr "Son Kullanma Tarihi" +msgstr "Oluşturma tarihi" #: winefile.rc:107 -#, fuzzy -#| msgid "Access denied.\n" msgid "Access date" -msgstr "Erişim engellendi.\n" +msgstr "Erişim tarihi" #: winefile.rc:108 -#, fuzzy -#| msgid "Certification Path" msgid "Modification date" -msgstr "Sertifika Yolu" +msgstr "Düzenlenme tarihi" #: winefile.rc:109 msgid "Index/Inode" diff -Nru wine1.6-1.7.1-actually1.6/po/uk.po wine1.6-1.6.1/po/uk.po --- wine1.6-1.7.1-actually1.6/po/uk.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/uk.po 2013-11-15 19:30:24.000000000 +0000 @@ -6352,15 +6352,15 @@ msgstr "" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/wa.po wine1.6-1.6.1/po/wa.po --- wine1.6-1.7.1-actually1.6/po/wa.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/wa.po 2013-11-15 19:30:24.000000000 +0000 @@ -6319,15 +6319,15 @@ msgstr "" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/wine.pot wine1.6-1.6.1/po/wine.pot --- wine1.6-1.7.1-actually1.6/po/wine.pot 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/wine.pot 2013-11-15 19:30:24.000000000 +0000 @@ -6217,15 +6217,15 @@ msgstr "" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/zh_CN.po wine1.6-1.6.1/po/zh_CN.po --- wine1.6-1.7.1-actually1.6/po/zh_CN.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/zh_CN.po 2013-11-15 19:30:24.000000000 +0000 @@ -6258,15 +6258,15 @@ msgstr "" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/po/zh_TW.po wine1.6-1.6.1/po/zh_TW.po --- wine1.6-1.7.1-actually1.6/po/zh_TW.po 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/po/zh_TW.po 2013-11-15 19:30:24.000000000 +0000 @@ -6300,15 +6300,15 @@ msgstr "已無更多繫結。\n" #: winerror.mc:3446 -msgid "Can't logon with inter-domain trust account.\n" +msgid "Can't log on with inter-domain trust account.\n" msgstr "無法以網域間信賴帳號登錄。\n" #: winerror.mc:3451 -msgid "Can't logon with workstation trust account.\n" +msgid "Can't log on with workstation trust account.\n" msgstr "無法以工作站信賴帳號登錄。\n" #: winerror.mc:3456 -msgid "Can't logon with server trust account.\n" +msgid "Can't log on with server trust account.\n" msgstr "無法以伺服器信賴帳號登錄。\n" #: winerror.mc:3461 diff -Nru wine1.6-1.7.1-actually1.6/programs/cabarc/cabarc.c wine1.6-1.6.1/programs/cabarc/cabarc.c --- wine1.6-1.7.1-actually1.6/programs/cabarc/cabarc.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/programs/cabarc/cabarc.c 2013-11-15 19:30:24.000000000 +0000 @@ -39,7 +39,6 @@ #define _O_RDONLY 0 #define _O_WRONLY 1 #define _O_RDWR 2 -#define _O_ACCMODE (_O_RDONLY|_O_WRONLY|_O_RDWR) #define _O_APPEND 0x0008 #define _O_RANDOM 0x0010 #define _O_SEQUENTIAL 0x0020 @@ -53,6 +52,10 @@ #define _O_BINARY 0x8000 #endif +#ifndef _O_ACCMODE +#define _O_ACCMODE (_O_RDONLY|_O_WRONLY|_O_RDWR) +#endif + #ifndef _SH_COMPAT #define _SH_COMPAT 0x00 #define _SH_DENYRW 0x10 diff -Nru wine1.6-1.7.1-actually1.6/programs/winedbg/info.c wine1.6-1.6.1/programs/winedbg/info.c --- wine1.6-1.7.1-actually1.6/programs/winedbg/info.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/programs/winedbg/info.c 2013-11-15 19:30:24.000000000 +0000 @@ -49,6 +49,7 @@ "subset of the commands that gdb accepts.", "The commands currently are:", " help quit", + " attach detach", " break [*] watch | rwatch *", " delete break bpnum disable bpnum", " enable bpnum condition []", diff -Nru wine1.6-1.7.1-actually1.6/programs/winedbg/winedbg.c wine1.6-1.6.1/programs/winedbg/winedbg.c --- wine1.6-1.7.1-actually1.6/programs/winedbg/winedbg.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/programs/winedbg/winedbg.c 2013-11-15 19:30:24.000000000 +0000 @@ -566,20 +566,20 @@ if (advanced) { dbg_printf("Usage:\n" - " winedbg cmdline launch process 'cmdline' (as if you were starting\n" + " winedbg launch process (as if you were starting\n" " it with wine) and run WineDbg on it\n" - " winedbg attach to running process of pid and run\n" + " winedbg attach to running process of wpid and run\n" " WineDbg on it\n" - " winedbg --gdb cmdline launch process 'cmdline' (as if you were starting\n" + " winedbg --gdb launch process (as if you were starting\n" " wine) and run gdb (proxied) on it\n" - " winedbg --gdb attach to running process of pid and run\n" + " winedbg --gdb attach to running process of wpid and run\n" " gdb (proxied) on it\n" - " winedbg file.mdmp reload the minidump file.mdmp into memory and run\n" + " winedbg reload the minidump into memory and run\n" " WineDbg on it\n" " winedbg --help prints advanced options\n"); } else - dbg_printf("Usage:\n\twinedbg [ [ --gdb ] [ prog-name [ prog-args ] | | file.mdmp | --help ]\n"); + dbg_printf("Usage:\n\twinedbg [ [ --gdb ] [ [ ] | | | --help ]\n"); return 0; } diff -Nru wine1.6-1.7.1-actually1.6/programs/winedbg/winedbg.man.in wine1.6-1.6.1/programs/winedbg/winedbg.man.in --- wine1.6-1.7.1-actually1.6/programs/winedbg/winedbg.man.in 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/programs/winedbg/winedbg.man.in 2013-11-15 19:30:24.000000000 +0000 @@ -2,32 +2,18 @@ .SH NAME winedbg \- Wine debugger .SH SYNOPSIS -.BR "winedbg " -.RI "[" " options " "] [" -.BI "program name" -.RI "[ program arguments ] |" -.BI "pid" -.RI "]" -.PP -.BR "winedbg " -.BI "--gdb" -.RI "[" " options " "] [" -.BI "program name" -.RI "[ program arguments ] |" -.BI "pid" -.RI "]" -.PP -.BR "winedbg " -.BI "--auto " -.BI "pid" -.PP -.BR "winedbg " -.BI "--minidump " -.RI "[ file.mdmp ]" -.BI "pid" +.B winedbg +.RI "[ " options " ] [ " program_name " [ " program_arguments " ] | " wpid " ]" +.PP +.B winedbg --gdb +.RI "[ " options " ] [ " program_name " [ " program_arguments " ] | " wpid " ]" +.PP +.BI "winedbg --auto " wpid +.PP +.B winedbg --minidump +.RI "[ " file.mdmp " ] " wpid .PP -.BR "winedbg" -.BI "file.mdmp" +.BI "winedbg " file.mdmp .SH DESCRIPTION .B winedbg is a debugger for Wine. It allows: @@ -93,15 +79,15 @@ .PP In all modes, the rest of the command line, when passed, is used to identify which programs, if any, has to debugged: -.IP \fBprogram\ name\fR +.IP \fIprogram_name\fR This is the name of an executable to start for a debugging session. \fBwinedbg\fR will actually create a process with this -executable. If \fBprograms arguments\fR are also given, they will be +executable. If \fIprograms_arguments\fR are also given, they will be used as arguments for creating the process to be debugged. -.IP \fBpid\fR -\fBwinedbg\fR will attach to the process which pid is \fBpid\fR (pids -refer to Win32 pids, not Unix pids). Use the \fIinfo proc\fR -\fBwinedbg\fR command to list running processes and their Win32 pids. +.IP \fIwpid\fR +\fBwinedbg\fR will attach to the process which Windows pid is \fIwpid\fR. +Use the \fBinfo proc\fR command within \fBwinedbg\fR to list running processes +and their Windows pids. .IP \fBdefault\fR If nothing is specified, you will enter the debugger without any run nor attached process. You'll have to do the job yourself. @@ -120,7 +106,7 @@ .IP \fBquit\fR Exits the debugger. .IP \fBattach\ \fIN\fR -Attach to a Wine process (\fIN\fR is its ID, numeric or hexadecimal). +Attach to a Wine process (\fIN\fR is its Windows ID, numeric or hexadecimal). IDs can be obtained using the \fBinfo\ process\fR command. Note the \fBinfo\ process\fR command returns hexadecimal values .IP @@ -333,9 +319,9 @@ .PP \fIMisc.\fR .PP -.IP \fBminidump\ file.mdmp\fR +.BI "minidump " file.mdmp saves the debugging context of the debuggee into a minidump file called -file.mdmp +\fIfile.mdmp\fR. .PP \fIInformation on Wine internals\fR .IP \fBinfo\ class\fR @@ -360,7 +346,7 @@ .IP \fBinfo\ map\fR Lists all virtual mappings used by the debugged program .IP \fBinfo\ map\ \fIN\fR -Lists all virtual mappings used by the program of pid \fIN\fR +Lists all virtual mappings used by the program of Windows pid \fIN\fR .IP \fBinfo\ wnd\fR Displays the window hierarchy starting from the desktop window .IP \fBinfo\ wnd\ \fIN\fR @@ -406,7 +392,7 @@ .SH ENVIRONMENT .IP \fBWINE_GDB\fR When used in \fBgdb\fR proxy mode, \fBWINE_GDB\fR specifies the name -(and the path) of the executable to be used for \fBgdb\fR. \fB"gdb"\fR +(and the path) of the executable to be used for \fBgdb\fR. "gdb" is used by default. .SH AUTHORS The first version was written by Eric Youngdale. diff -Nru wine1.6-1.7.1-actually1.6/server/async.c wine1.6-1.6.1/server/async.c --- wine1.6-1.7.1-actually1.6/server/async.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/async.c 2013-11-15 19:30:24.000000000 +0000 @@ -241,7 +241,7 @@ } static void add_async_completion( struct async_queue *queue, apc_param_t cvalue, unsigned int status, - unsigned int information ) + apc_param_t information ) { if (status == STATUS_MORE_PROCESSING_REQUIRED) return; /* The async callback has successfully finished but no completion should be reported */ @@ -262,7 +262,7 @@ } /* store the result of the client-side async callback */ -void async_set_result( struct object *obj, unsigned int status, unsigned int total, client_ptr_t apc ) +void async_set_result( struct object *obj, unsigned int status, apc_param_t total, client_ptr_t apc ) { struct async *async = (struct async *)obj; diff -Nru wine1.6-1.7.1-actually1.6/server/completion.c wine1.6-1.6.1/server/completion.c --- wine1.6-1.7.1-actually1.6/server/completion.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/completion.c 2013-11-15 19:30:24.000000000 +0000 @@ -53,7 +53,7 @@ static void completion_dump( struct object*, int ); static struct object_type *completion_get_type( struct object *obj ); -static int completion_signaled( struct object *obj, struct thread *thread ); +static int completion_signaled( struct object *obj, struct wait_queue_entry *entry ); static unsigned int completion_map_access( struct object *obj, unsigned int access ); static void completion_destroy( struct object * ); @@ -82,7 +82,7 @@ struct list queue_entry; apc_param_t ckey; apc_param_t cvalue; - unsigned int information; + apc_param_t information; unsigned int status; }; @@ -114,7 +114,7 @@ return get_object_type( &str ); } -static int completion_signaled( struct object *obj, struct thread *thread ) +static int completion_signaled( struct object *obj, struct wait_queue_entry *entry ) { struct completion *completion = (struct completion *)obj; @@ -152,7 +152,7 @@ } void add_completion( struct completion *completion, apc_param_t ckey, apc_param_t cvalue, - unsigned int status, unsigned int information ) + unsigned int status, apc_param_t information ) { struct comp_msg *msg = mem_alloc( sizeof( *msg ) ); diff -Nru wine1.6-1.7.1-actually1.6/server/console.c wine1.6-1.6.1/server/console.c --- wine1.6-1.7.1-actually1.6/server/console.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/console.c 2013-11-15 19:30:24.000000000 +0000 @@ -91,7 +91,7 @@ static void console_input_events_dump( struct object *obj, int verbose ); static void console_input_events_destroy( struct object *obj ); -static int console_input_events_signaled( struct object *obj, struct thread *thread ); +static int console_input_events_signaled( struct object *obj, struct wait_queue_entry *entry ); struct console_input_events { @@ -222,7 +222,7 @@ } /* the renderer events list is signaled when it's not empty */ -static int console_input_events_signaled( struct object *obj, struct thread *thread ) +static int console_input_events_signaled( struct object *obj, struct wait_queue_entry *entry ) { struct console_input_events *evts = (struct console_input_events *)obj; assert( obj->ops == &console_input_events_ops ); @@ -1034,7 +1034,7 @@ ptr[len] = 0; if (console->history_mode && console->history_index && - strncmpW( console->history[console->history_index - 1], ptr, len * sizeof(WCHAR) ) == 0) + strncmpW( console->history[console->history_index - 1], ptr, len ) == 0) { /* ok, mode ask us to not use twice the same string... * so just free mem and returns diff -Nru wine1.6-1.7.1-actually1.6/server/debugger.c wine1.6-1.6.1/server/debugger.c --- wine1.6-1.7.1-actually1.6/server/debugger.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/debugger.c 2013-11-15 19:30:24.000000000 +0000 @@ -63,7 +63,7 @@ static void debug_event_dump( struct object *obj, int verbose ); -static int debug_event_signaled( struct object *obj, struct thread *thread ); +static int debug_event_signaled( struct object *obj, struct wait_queue_entry *entry ); static void debug_event_destroy( struct object *obj ); static const struct object_ops debug_event_ops = @@ -87,7 +87,7 @@ }; static void debug_ctx_dump( struct object *obj, int verbose ); -static int debug_ctx_signaled( struct object *obj, struct thread *thread ); +static int debug_ctx_signaled( struct object *obj, struct wait_queue_entry *entry ); static void debug_ctx_destroy( struct object *obj ); static const struct object_ops debug_ctx_ops = @@ -274,7 +274,7 @@ debug_event->sender, debug_event->data.code, debug_event->state ); } -static int debug_event_signaled( struct object *obj, struct thread *thread ) +static int debug_event_signaled( struct object *obj, struct wait_queue_entry *entry ) { struct debug_event *debug_event = (struct debug_event *)obj; assert( obj->ops == &debug_event_ops ); @@ -325,7 +325,7 @@ debug_ctx->event_queue.next, debug_ctx->event_queue.prev ); } -static int debug_ctx_signaled( struct object *obj, struct thread *thread ) +static int debug_ctx_signaled( struct object *obj, struct wait_queue_entry *entry ) { struct debug_ctx *debug_ctx = (struct debug_ctx *)obj; assert( obj->ops == &debug_ctx_ops ); diff -Nru wine1.6-1.7.1-actually1.6/server/device.c wine1.6-1.6.1/server/device.c --- wine1.6-1.7.1-actually1.6/server/device.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/device.c 2013-11-15 19:30:24.000000000 +0000 @@ -52,7 +52,7 @@ }; static void ioctl_call_dump( struct object *obj, int verbose ); -static int ioctl_call_signaled( struct object *obj, struct thread *thread ); +static int ioctl_call_signaled( struct object *obj, struct wait_queue_entry *entry ); static void ioctl_call_destroy( struct object *obj ); static const struct object_ops ioctl_call_ops = @@ -84,7 +84,7 @@ }; static void device_manager_dump( struct object *obj, int verbose ); -static int device_manager_signaled( struct object *obj, struct thread *thread ); +static int device_manager_signaled( struct object *obj, struct wait_queue_entry *entry ); static void device_manager_destroy( struct object *obj ); static const struct object_ops device_manager_ops = @@ -167,7 +167,7 @@ fprintf( stderr, "Ioctl call code=%08x device=%p\n", ioctl->code, ioctl->device ); } -static int ioctl_call_signaled( struct object *obj, struct thread *thread ) +static int ioctl_call_signaled( struct object *obj, struct wait_queue_entry *entry ) { struct ioctl_call *ioctl = (struct ioctl_call *)obj; @@ -394,7 +394,7 @@ fprintf( stderr, "Device manager\n" ); } -static int device_manager_signaled( struct object *obj, struct thread *thread ) +static int device_manager_signaled( struct object *obj, struct wait_queue_entry *entry ) { struct device_manager *manager = (struct device_manager *)obj; diff -Nru wine1.6-1.7.1-actually1.6/server/directory.c wine1.6-1.6.1/server/directory.c --- wine1.6-1.7.1-actually1.6/server/directory.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/directory.c 2013-11-15 19:30:24.000000000 +0000 @@ -413,6 +413,7 @@ static const WCHAR event_high_memW[] = {'H','i','g','h','M','e','m','o','r','y','C','o','n','d','i','t','i','o','n'}; static const WCHAR event_high_pagedW[] = {'H','i','g','h','P','a','g','e','d','P','o','o','l','C','o','n','d','i','t','i','o','n'}; static const WCHAR event_high_nonpgW[] = {'H','i','g','h','N','o','n','P','a','g','e','d','P','o','o','l','C','o','n','d','i','t','i','o','n'}; + static const WCHAR keyed_event_crit_sectW[] = {'C','r','i','t','S','e','c','O','u','t','O','f','M','e','m','o','r','y','E','v','e','n','t'}; static const struct unicode_str kernel_events[] = { { event_low_memW, sizeof(event_low_memW) }, @@ -422,9 +423,11 @@ { event_high_pagedW, sizeof(event_high_pagedW) }, { event_high_nonpgW, sizeof(event_high_nonpgW) } }; + static const struct unicode_str keyed_event_crit_sect_str = {keyed_event_crit_sectW, sizeof(keyed_event_crit_sectW)}; struct directory *dir_driver, *dir_device, *dir_global, *dir_basenamed, *dir_sessions, *dir_kernel; struct symlink *link_dosdev, *link_global1, *link_global2, *link_local, *link_pipe, *link_mailslot, *link_0, *link_session; + struct keyed_event *keyed_event; unsigned int i; root_directory = create_directory( NULL, NULL, 0, HASH_SIZE ); @@ -469,6 +472,8 @@ struct event *event = create_event( dir_kernel, &kernel_events[i], 0, 1, 0, NULL ); make_object_static( (struct object *)event ); } + keyed_event = create_keyed_event( dir_kernel, &keyed_event_crit_sect_str, 0, NULL ); + make_object_static( (struct object *)keyed_event ); /* the objects hold references so we can release these directories */ release_object( dir_global ); diff -Nru wine1.6-1.7.1-actually1.6/server/event.c wine1.6-1.6.1/server/event.c --- wine1.6-1.7.1-actually1.6/server/event.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/event.c 2013-11-15 19:30:24.000000000 +0000 @@ -45,8 +45,8 @@ static void event_dump( struct object *obj, int verbose ); static struct object_type *event_get_type( struct object *obj ); -static int event_signaled( struct object *obj, struct thread *thread ); -static int event_satisfied( struct object *obj, struct thread *thread ); +static int event_signaled( struct object *obj, struct wait_queue_entry *entry ); +static void event_satisfied( struct object *obj, struct wait_queue_entry *entry ); static unsigned int event_map_access( struct object *obj, unsigned int access ); static int event_signal( struct object *obj, unsigned int access); @@ -71,6 +71,37 @@ }; +struct keyed_event +{ + struct object obj; /* object header */ +}; + +static void keyed_event_dump( struct object *obj, int verbose ); +static struct object_type *keyed_event_get_type( struct object *obj ); +static int keyed_event_signaled( struct object *obj, struct wait_queue_entry *entry ); +static unsigned int keyed_event_map_access( struct object *obj, unsigned int access ); + +static const struct object_ops keyed_event_ops = +{ + sizeof(struct keyed_event), /* size */ + keyed_event_dump, /* dump */ + keyed_event_get_type, /* get_type */ + add_queue, /* add_queue */ + remove_queue, /* remove_queue */ + keyed_event_signaled, /* signaled */ + no_satisfied, /* satisfied */ + no_signal, /* signal */ + no_get_fd, /* get_fd */ + keyed_event_map_access, /* map_access */ + default_get_sd, /* get_sd */ + default_set_sd, /* set_sd */ + no_lookup_name, /* lookup_name */ + no_open_file, /* open_file */ + no_close_handle, /* close_handle */ + no_destroy /* destroy */ +}; + + struct event *create_event( struct directory *root, const struct unicode_str *name, unsigned int attr, int manual_reset, int initial_state, const struct security_descriptor *sd ) @@ -135,20 +166,19 @@ return get_object_type( &str ); } -static int event_signaled( struct object *obj, struct thread *thread ) +static int event_signaled( struct object *obj, struct wait_queue_entry *entry ) { struct event *event = (struct event *)obj; assert( obj->ops == &event_ops ); return event->signaled; } -static int event_satisfied( struct object *obj, struct thread *thread ) +static void event_satisfied( struct object *obj, struct wait_queue_entry *entry ) { struct event *event = (struct event *)obj; assert( obj->ops == &event_ops ); /* Reset if it's an auto-reset event */ if (!event->manual_reset) event->signaled = 0; - return 0; /* Not abandoned */ } static unsigned int event_map_access( struct object *obj, unsigned int access ) @@ -174,6 +204,83 @@ return 1; } +struct keyed_event *create_keyed_event( struct directory *root, const struct unicode_str *name, + unsigned int attr, const struct security_descriptor *sd ) +{ + struct keyed_event *event; + + if ((event = create_named_object_dir( root, name, attr, &keyed_event_ops ))) + { + if (get_error() != STATUS_OBJECT_NAME_EXISTS) + { + /* initialize it if it didn't already exist */ + if (sd) default_set_sd( &event->obj, sd, OWNER_SECURITY_INFORMATION| + GROUP_SECURITY_INFORMATION| + DACL_SECURITY_INFORMATION| + SACL_SECURITY_INFORMATION ); + } + } + return event; +} + +struct keyed_event *get_keyed_event_obj( struct process *process, obj_handle_t handle, unsigned int access ) +{ + return (struct keyed_event *)get_handle_obj( process, handle, access, &keyed_event_ops ); +} + +static void keyed_event_dump( struct object *obj, int verbose ) +{ + struct keyed_event *event = (struct keyed_event *)obj; + assert( obj->ops == &keyed_event_ops ); + fprintf( stderr, "Keyed event " ); + dump_object_name( &event->obj ); + fputc( '\n', stderr ); +} + +static struct object_type *keyed_event_get_type( struct object *obj ) +{ + static const WCHAR name[] = {'K','e','y','e','d','E','v','e','n','t'}; + static const struct unicode_str str = { name, sizeof(name) }; + return get_object_type( &str ); +} + +static enum select_op matching_op( enum select_op op ) +{ + return op ^ (SELECT_KEYED_EVENT_WAIT ^ SELECT_KEYED_EVENT_RELEASE); +} + +static int keyed_event_signaled( struct object *obj, struct wait_queue_entry *entry ) +{ + struct wait_queue_entry *ptr; + struct process *process; + enum select_op select_op; + + assert( obj->ops == &keyed_event_ops ); + + process = get_wait_queue_thread( entry )->process; + select_op = get_wait_queue_select_op( entry ); + if (select_op != SELECT_KEYED_EVENT_WAIT && select_op != SELECT_KEYED_EVENT_RELEASE) return 1; + + LIST_FOR_EACH_ENTRY( ptr, &obj->wait_queue, struct wait_queue_entry, entry ) + { + if (ptr == entry) continue; + if (get_wait_queue_thread( ptr )->process != process) continue; + if (get_wait_queue_select_op( ptr ) != matching_op( select_op )) continue; + if (get_wait_queue_key( ptr ) != get_wait_queue_key( entry )) continue; + if (wake_thread_queue_entry( ptr )) return 1; + } + return 0; +} + +static unsigned int keyed_event_map_access( struct object *obj, unsigned int access ) +{ + if (access & GENERIC_READ) access |= STANDARD_RIGHTS_READ | KEYEDEVENT_WAIT; + if (access & GENERIC_WRITE) access |= STANDARD_RIGHTS_WRITE | KEYEDEVENT_WAKE; + if (access & GENERIC_EXECUTE) access |= STANDARD_RIGHTS_EXECUTE; + if (access & GENERIC_ALL) access |= KEYEDEVENT_ALL_ACCESS; + return access & ~(GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | GENERIC_ALL); +} + /* create an event */ DECL_HANDLER(create_event) { @@ -249,3 +356,61 @@ } release_object( event ); } + +/* return details about the event */ +DECL_HANDLER(query_event) +{ + struct event *event; + + if (!(event = get_event_obj( current->process, req->handle, EVENT_QUERY_STATE ))) return; + + reply->manual_reset = event->manual_reset; + reply->state = event->signaled; + + release_object( event ); +} + +/* create a keyed event */ +DECL_HANDLER(create_keyed_event) +{ + struct keyed_event *event; + struct unicode_str name; + struct directory *root = NULL; + const struct object_attributes *objattr = get_req_data(); + const struct security_descriptor *sd; + + if (!objattr_is_valid( objattr, get_req_data_size() )) return; + + sd = objattr->sd_len ? (const struct security_descriptor *)(objattr + 1) : NULL; + objattr_get_name( objattr, &name ); + + if (objattr->rootdir && !(root = get_directory_obj( current->process, objattr->rootdir, 0 ))) return; + + if ((event = create_keyed_event( root, &name, req->attributes, sd ))) + { + if (get_error() == STATUS_OBJECT_NAME_EXISTS) + reply->handle = alloc_handle( current->process, event, req->access, req->attributes ); + else + reply->handle = alloc_handle_no_access_check( current->process, event, req->access, req->attributes ); + release_object( event ); + } + if (root) release_object( root ); +} + +/* open a handle to a keyed event */ +DECL_HANDLER(open_keyed_event) +{ + struct unicode_str name; + struct directory *root = NULL; + struct keyed_event *event; + + get_req_unicode_str( &name ); + if (req->rootdir && !(root = get_directory_obj( current->process, req->rootdir, 0 ))) return; + + if ((event = open_object_dir( root, &name, req->attributes, &keyed_event_ops ))) + { + reply->handle = alloc_handle( current->process, &event->obj, req->access, req->attributes ); + release_object( event ); + } + if (root) release_object( root ); +} diff -Nru wine1.6-1.7.1-actually1.6/server/fd.c wine1.6-1.6.1/server/fd.c --- wine1.6-1.7.1-actually1.6/server/fd.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/fd.c 2013-11-15 19:30:24.000000000 +0000 @@ -302,7 +302,7 @@ }; static void file_lock_dump( struct object *obj, int verbose ); -static int file_lock_signaled( struct object *obj, struct thread *thread ); +static int file_lock_signaled( struct object *obj, struct wait_queue_entry *entry ); static const struct object_ops file_lock_ops = { @@ -1128,7 +1128,7 @@ fprintf( stderr, "\n" ); } -static int file_lock_signaled( struct object *obj, struct thread *thread ) +static int file_lock_signaled( struct object *obj, struct wait_queue_entry *entry ) { struct file_lock *lock = (struct file_lock *)obj; /* lock is signaled if it has lost its owner */ @@ -1968,7 +1968,7 @@ } /* default signaled() routine for objects that poll() on an fd */ -int default_fd_signaled( struct object *obj, struct thread *thread ) +int default_fd_signaled( struct object *obj, struct wait_queue_entry *entry ) { struct fd *fd = get_obj_fd( obj ); int ret = fd->signaled; diff -Nru wine1.6-1.7.1-actually1.6/server/file.h wine1.6-1.6.1/server/file.h --- wine1.6-1.7.1-actually1.6/server/file.h 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/file.h 2013-11-15 19:30:24.000000000 +0000 @@ -77,7 +77,7 @@ extern void set_fd_signaled( struct fd *fd, int signaled ); extern int is_fd_signaled( struct fd *fd ); -extern int default_fd_signaled( struct object *obj, struct thread *thread ); +extern int default_fd_signaled( struct object *obj, struct wait_queue_entry *entry ); extern unsigned int default_fd_map_access( struct object *obj, unsigned int access ); extern int default_fd_get_poll_events( struct fd *fd ); extern void default_poll_event( struct fd *fd, int event ); @@ -143,7 +143,7 @@ extern struct completion *get_completion_obj( struct process *process, obj_handle_t handle, unsigned int access ); extern void add_completion( struct completion *completion, apc_param_t ckey, apc_param_t cvalue, - unsigned int status, unsigned int information ); + unsigned int status, apc_param_t information ); /* serial port functions */ @@ -157,7 +157,7 @@ const async_data_t *data ); extern void async_set_timeout( struct async *async, timeout_t timeout, unsigned int status ); extern void async_set_result( struct object *obj, unsigned int status, - unsigned int total, client_ptr_t apc ); + apc_param_t total, client_ptr_t apc ); extern int async_queued( struct async_queue *queue ); extern int async_waiting( struct async_queue *queue ); extern void async_terminate( struct async *async, unsigned int status ); diff -Nru wine1.6-1.7.1-actually1.6/server/handle.c wine1.6-1.6.1/server/handle.c --- wine1.6-1.7.1-actually1.6/server/handle.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/handle.c 2013-11-15 19:30:24.000000000 +0000 @@ -235,12 +235,12 @@ } /* allocate a handle for an object, incrementing its refcount */ -/* return the handle, or 0 on error */ -obj_handle_t alloc_handle_no_access_check( struct process *process, void *ptr, unsigned int access, unsigned int attr ) +static obj_handle_t alloc_handle_entry( struct process *process, void *ptr, + unsigned int access, unsigned int attr ) { struct object *obj = ptr; - access &= ~RESERVED_ALL; + assert( !(access & RESERVED_ALL) ); if (attr & OBJ_INHERIT) access |= RESERVED_INHERIT; if (!process->handles) { @@ -250,15 +250,24 @@ return alloc_entry( process->handles, obj, access ); } +/* allocate a handle for an object, incrementing its refcount */ +/* return the handle, or 0 on error */ +obj_handle_t alloc_handle_no_access_check( struct process *process, void *ptr, unsigned int access, unsigned int attr ) +{ + struct object *obj = ptr; + access = obj->ops->map_access( obj, access ) & ~RESERVED_ALL; + return alloc_handle_entry( process, ptr, access, attr ); +} + /* allocate a handle for an object, checking the dacl allows the process to */ /* access it and incrementing its refcount */ /* return the handle, or 0 on error */ obj_handle_t alloc_handle( struct process *process, void *ptr, unsigned int access, unsigned int attr ) { struct object *obj = ptr; - access = obj->ops->map_access( obj, access ); + access = obj->ops->map_access( obj, access ) & ~RESERVED_ALL; if (access && !check_object_access( obj, &access )) return 0; - return alloc_handle_no_access_check( process, ptr, access, attr ); + return alloc_handle_entry( process, ptr, access, attr ); } /* allocate a global handle for an object, incrementing its refcount */ @@ -539,7 +548,7 @@ res = src_handle; } else - res = alloc_handle_no_access_check( dst, obj, access, attr ); + res = alloc_handle_entry( dst, obj, access, attr ); } release_object( obj ); diff -Nru wine1.6-1.7.1-actually1.6/server/mutex.c wine1.6-1.6.1/server/mutex.c --- wine1.6-1.7.1-actually1.6/server/mutex.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/mutex.c 2013-11-15 19:30:24.000000000 +0000 @@ -47,8 +47,8 @@ static void mutex_dump( struct object *obj, int verbose ); static struct object_type *mutex_get_type( struct object *obj ); -static int mutex_signaled( struct object *obj, struct thread *thread ); -static int mutex_satisfied( struct object *obj, struct thread *thread ); +static int mutex_signaled( struct object *obj, struct wait_queue_entry *entry ); +static void mutex_satisfied( struct object *obj, struct wait_queue_entry *entry ); static unsigned int mutex_map_access( struct object *obj, unsigned int access ); static void mutex_destroy( struct object *obj ); static int mutex_signal( struct object *obj, unsigned int access ); @@ -74,6 +74,29 @@ }; +/* grab a mutex for a given thread */ +static void do_grab( struct mutex *mutex, struct thread *thread ) +{ + assert( !mutex->count || (mutex->owner == thread) ); + + if (!mutex->count++) /* FIXME: avoid wrap-around */ + { + assert( !mutex->owner ); + mutex->owner = thread; + list_add_head( &thread->mutex_list, &mutex->entry ); + } +} + +/* release a mutex once the recursion count is 0 */ +static void do_release( struct mutex *mutex ) +{ + assert( !mutex->count ); + /* remove the mutex from the thread list of owned mutexes */ + list_remove( &mutex->entry ); + mutex->owner = NULL; + wake_up( &mutex->obj, 0 ); +} + static struct mutex *create_mutex( struct directory *root, const struct unicode_str *name, unsigned int attr, int owned, const struct security_descriptor *sd ) { @@ -87,7 +110,7 @@ mutex->count = 0; mutex->owner = NULL; mutex->abandoned = 0; - if (owned) mutex_satisfied( &mutex->obj, current ); + if (owned) do_grab( mutex, current ); if (sd) default_set_sd( &mutex->obj, sd, OWNER_SECURITY_INFORMATION| GROUP_SECURITY_INFORMATION| DACL_SECURITY_INFORMATION| @@ -97,16 +120,6 @@ return mutex; } -/* release a mutex once the recursion count is 0 */ -static void do_release( struct mutex *mutex ) -{ - assert( !mutex->count ); - /* remove the mutex from the thread list of owned mutexes */ - list_remove( &mutex->entry ); - mutex->owner = NULL; - wake_up( &mutex->obj, 0 ); -} - void abandon_mutexes( struct thread *thread ) { struct list *ptr; @@ -137,28 +150,21 @@ return get_object_type( &str ); } -static int mutex_signaled( struct object *obj, struct thread *thread ) +static int mutex_signaled( struct object *obj, struct wait_queue_entry *entry ) { struct mutex *mutex = (struct mutex *)obj; assert( obj->ops == &mutex_ops ); - return (!mutex->count || (mutex->owner == thread)); + return (!mutex->count || (mutex->owner == get_wait_queue_thread( entry ))); } -static int mutex_satisfied( struct object *obj, struct thread *thread ) +static void mutex_satisfied( struct object *obj, struct wait_queue_entry *entry ) { struct mutex *mutex = (struct mutex *)obj; assert( obj->ops == &mutex_ops ); - assert( !mutex->count || (mutex->owner == thread) ); - if (!mutex->count++) /* FIXME: avoid wrap-around */ - { - assert( !mutex->owner ); - mutex->owner = thread; - list_add_head( &thread->mutex_list, &mutex->entry ); - } - if (!mutex->abandoned) return 0; + do_grab( mutex, get_wait_queue_thread( entry )); + if (mutex->abandoned) make_wait_abandoned( entry ); mutex->abandoned = 0; - return 1; } static unsigned int mutex_map_access( struct object *obj, unsigned int access ) diff -Nru wine1.6-1.7.1-actually1.6/server/named_pipe.c wine1.6-1.6.1/server/named_pipe.c --- wine1.6-1.7.1-actually1.6/server/named_pipe.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/named_pipe.c 2013-11-15 19:30:24.000000000 +0000 @@ -177,7 +177,7 @@ /* client end functions */ static void pipe_client_dump( struct object *obj, int verbose ); -static int pipe_client_signaled( struct object *obj, struct thread *thread ); +static int pipe_client_signaled( struct object *obj, struct wait_queue_entry *entry ); static struct fd *pipe_client_get_fd( struct object *obj ); static void pipe_client_destroy( struct object *obj ); static void pipe_client_flush( struct fd *fd, struct event **event ); @@ -291,7 +291,7 @@ fprintf( stderr, "Named pipe client server=%p\n", client->server ); } -static int pipe_client_signaled( struct object *obj, struct thread *thread ) +static int pipe_client_signaled( struct object *obj, struct wait_queue_entry *entry ) { struct pipe_client *client = (struct pipe_client *) obj; diff -Nru wine1.6-1.7.1-actually1.6/server/object.c wine1.6-1.6.1/server/object.c --- wine1.6-1.7.1-actually1.6/server/object.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/object.c 2013-11-15 19:30:24.000000000 +0000 @@ -393,9 +393,8 @@ return 0; } -int no_satisfied( struct object *obj, struct thread *thread ) +void no_satisfied( struct object *obj, struct wait_queue_entry *entry ) { - return 0; /* not abandoned */ } int no_signal( struct object *obj, unsigned int access ) diff -Nru wine1.6-1.7.1-actually1.6/server/object.h wine1.6-1.6.1/server/object.h --- wine1.6-1.7.1-actually1.6/server/object.h 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/object.h 2013-11-15 19:30:24.000000000 +0000 @@ -68,9 +68,9 @@ /* remove a thread from the object wait queue */ void (*remove_queue)(struct object *,struct wait_queue_entry *); /* is object signaled? */ - int (*signaled)(struct object *,struct thread *); - /* wait satisfied; return 1 if abandoned */ - int (*satisfied)(struct object *,struct thread *); + int (*signaled)(struct object *,struct wait_queue_entry *); + /* wait satisfied */ + void (*satisfied)(struct object *,struct wait_queue_entry *); /* signal an object */ int (*signal)(struct object *, unsigned int); /* return an fd object that can be used to read/write from the object */ @@ -106,9 +106,9 @@ struct wait_queue_entry { - struct list entry; - struct object *obj; - struct thread *thread; + struct list entry; + struct object *obj; + struct thread_wait *wait; }; extern void *mem_alloc( size_t size ); /* malloc wrapper */ @@ -133,7 +133,7 @@ extern struct object *find_object_index( const struct namespace *namespace, unsigned int index ); extern struct object_type *no_get_type( struct object *obj ); extern int no_add_queue( struct object *obj, struct wait_queue_entry *entry ); -extern int no_satisfied( struct object *obj, struct thread *thread ); +extern void no_satisfied( struct object *obj, struct wait_queue_entry *entry ); extern int no_signal( struct object *obj, unsigned int access ); extern struct fd *no_get_fd( struct object *obj ); extern unsigned int no_map_access( struct object *obj, unsigned int access ); @@ -152,11 +152,15 @@ /* event functions */ struct event; +struct keyed_event; extern struct event *create_event( struct directory *root, const struct unicode_str *name, unsigned int attr, int manual_reset, int initial_state, const struct security_descriptor *sd ); +extern struct keyed_event *create_keyed_event( struct directory *root, const struct unicode_str *name, + unsigned int attr, const struct security_descriptor *sd ); extern struct event *get_event_obj( struct process *process, obj_handle_t handle, unsigned int access ); +extern struct keyed_event *get_keyed_event_obj( struct process *process, obj_handle_t handle, unsigned int access ); extern void pulse_event( struct event *event ); extern void set_event( struct event *event ); extern void reset_event( struct event *event ); @@ -232,4 +236,8 @@ /* server start time used for GetTickCount() */ extern timeout_t server_start_time; +#define KEYEDEVENT_WAIT 0x0001 +#define KEYEDEVENT_WAKE 0x0002 +#define KEYEDEVENT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x0003) + #endif /* __WINE_SERVER_OBJECT_H */ diff -Nru wine1.6-1.7.1-actually1.6/server/process.c wine1.6-1.6.1/server/process.c --- wine1.6-1.7.1-actually1.6/server/process.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/process.c 2013-11-15 19:30:24.000000000 +0000 @@ -60,7 +60,7 @@ /* process operations */ static void process_dump( struct object *obj, int verbose ); -static int process_signaled( struct object *obj, struct thread *thread ); +static int process_signaled( struct object *obj, struct wait_queue_entry *entry ); static unsigned int process_map_access( struct object *obj, unsigned int access ); static void process_poll_event( struct fd *fd, int event ); static void process_destroy( struct object *obj ); @@ -110,7 +110,7 @@ }; static void startup_info_dump( struct object *obj, int verbose ); -static int startup_info_signaled( struct object *obj, struct thread *thread ); +static int startup_info_signaled( struct object *obj, struct wait_queue_entry *entry ); static void startup_info_destroy( struct object *obj ); static const struct object_ops startup_info_ops = @@ -441,7 +441,7 @@ fprintf( stderr, "Process id=%04x handles=%p\n", process->id, process->handles ); } -static int process_signaled( struct object *obj, struct thread *thread ) +static int process_signaled( struct object *obj, struct wait_queue_entry *entry ) { struct process *process = (struct process *)obj; return !process->running_threads; @@ -483,7 +483,7 @@ info->data->hstdin, info->data->hstdout, info->data->hstderr ); } -static int startup_info_signaled( struct object *obj, struct thread *thread ) +static int startup_info_signaled( struct object *obj, struct wait_queue_entry *entry ) { struct startup_info *info = (struct startup_info *)obj; return info->process && info->process->startup_state != STARTUP_IN_PROGRESS; diff -Nru wine1.6-1.7.1-actually1.6/server/protocol.def wine1.6-1.6.1/server/protocol.def --- wine1.6-1.7.1-actually1.6/server/protocol.def 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/protocol.def 2013-11-15 19:30:24.000000000 +0000 @@ -420,6 +420,38 @@ /* VARARG(sids,SID); */ }; +enum select_op +{ + SELECT_NONE, + SELECT_WAIT, + SELECT_WAIT_ALL, + SELECT_SIGNAL_AND_WAIT, + SELECT_KEYED_EVENT_WAIT, + SELECT_KEYED_EVENT_RELEASE +}; + +typedef union +{ + enum select_op op; + struct + { + enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */ + obj_handle_t handles[MAXIMUM_WAIT_OBJECTS]; + } wait; + struct + { + enum select_op op; /* SELECT_SIGNAL_AND_WAIT */ + obj_handle_t wait; + obj_handle_t signal; /* must be last in the structure so we can remove it on retries */ + } signal_and_wait; + struct + { + enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */ + obj_handle_t handle; + client_ptr_t key; + } keyed_event; +} select_op_t; + enum apc_type { APC_NONE, @@ -920,19 +952,17 @@ @REQ(select) int flags; /* wait flags (see below) */ client_ptr_t cookie; /* magic cookie to return to client */ - obj_handle_t signal; /* object to signal (0 if none) */ - obj_handle_t prev_apc; /* handle to previous APC */ timeout_t timeout; /* timeout */ + obj_handle_t prev_apc; /* handle to previous APC */ VARARG(result,apc_result); /* result of previous APC */ - VARARG(handles,handles); /* handles to select on */ + VARARG(data,select_op); /* operation-specific data */ @REPLY timeout_t timeout; /* timeout converted to absolute */ apc_call_t call; /* APC call arguments */ obj_handle_t apc_handle; /* handle to next APC */ @END -#define SELECT_ALL 1 -#define SELECT_ALERTABLE 2 -#define SELECT_INTERRUPTIBLE 4 +#define SELECT_ALERTABLE 1 +#define SELECT_INTERRUPTIBLE 2 /* Create an event */ @@ -953,6 +983,12 @@ @END enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT }; +@REQ(query_event) + obj_handle_t handle; /* handle to event */ +@REPLY + int manual_reset; /* manual reset event */ + int state; /* current state of the event */ +@END /* Open an event */ @REQ(open_event) @@ -965,6 +1001,26 @@ @END +/* Create a keyed event */ +@REQ(create_keyed_event) + unsigned int access; /* wanted access rights */ + unsigned int attributes; /* object attributes */ + VARARG(objattr,object_attributes); /* object attributes */ +@REPLY + obj_handle_t handle; /* handle to the event */ +@END + +/* Open a keyed event */ +@REQ(open_keyed_event) + unsigned int access; /* wanted access rights */ + unsigned int attributes; /* object attributes */ + obj_handle_t rootdir; /* root directory */ + VARARG(name,unicode_str); /* object name */ +@REPLY + obj_handle_t handle; /* handle to the event */ +@END + + /* Create a mutex */ @REQ(create_mutex) unsigned int access; /* wanted access rights */ @@ -3306,7 +3362,7 @@ obj_handle_t handle; /* port handle */ apc_param_t ckey; /* completion key */ apc_param_t cvalue; /* completion value */ - unsigned int information; /* IO_STATUS_BLOCK Information */ + apc_param_t information; /* IO_STATUS_BLOCK Information */ unsigned int status; /* completion result */ @END @@ -3317,7 +3373,7 @@ @REPLY apc_param_t ckey; /* completion key */ apc_param_t cvalue; /* completion value */ - unsigned int information; /* IO_STATUS_BLOCK Information */ + apc_param_t information; /* IO_STATUS_BLOCK Information */ unsigned int status; /* completion result */ @END @@ -3342,8 +3398,8 @@ @REQ(add_fd_completion) obj_handle_t handle; /* async' object */ apc_param_t cvalue; /* completion value */ + apc_param_t information; /* IO_STATUS_BLOCK Information */ unsigned int status; /* completion status */ - unsigned int information; /* IO_STATUS_BLOCK Information */ @END diff -Nru wine1.6-1.7.1-actually1.6/server/queue.c wine1.6-1.6.1/server/queue.c --- wine1.6-1.7.1-actually1.6/server/queue.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/queue.c 2013-11-15 19:30:24.000000000 +0000 @@ -150,8 +150,8 @@ static void msg_queue_dump( struct object *obj, int verbose ); static int msg_queue_add_queue( struct object *obj, struct wait_queue_entry *entry ); static void msg_queue_remove_queue( struct object *obj, struct wait_queue_entry *entry ); -static int msg_queue_signaled( struct object *obj, struct thread *thread ); -static int msg_queue_satisfied( struct object *obj, struct thread *thread ); +static int msg_queue_signaled( struct object *obj, struct wait_queue_entry *entry ); +static void msg_queue_satisfied( struct object *obj, struct wait_queue_entry *entry ); static void msg_queue_destroy( struct object *obj ); static void msg_queue_poll_event( struct fd *fd, int event ); static void thread_input_dump( struct object *obj, int verbose ); @@ -866,7 +866,7 @@ LIST_FOR_EACH_ENTRY( entry, &queue->obj.wait_queue, struct wait_queue_entry, entry ) { - if (entry->thread->queue == queue) + if (get_wait_queue_thread(entry)->queue == queue) return 0; /* thread is waiting on queue -> not hung */ } return 1; @@ -875,10 +875,10 @@ static int msg_queue_add_queue( struct object *obj, struct wait_queue_entry *entry ) { struct msg_queue *queue = (struct msg_queue *)obj; - struct process *process = entry->thread->process; + struct process *process = get_wait_queue_thread(entry)->process; /* a thread can only wait on its own queue */ - if (entry->thread->queue != queue) + if (get_wait_queue_thread(entry)->queue != queue) { set_error( STATUS_ACCESS_DENIED ); return 0; @@ -907,7 +907,7 @@ queue->wake_bits, queue->wake_mask ); } -static int msg_queue_signaled( struct object *obj, struct thread *thread ) +static int msg_queue_signaled( struct object *obj, struct wait_queue_entry *entry ) { struct msg_queue *queue = (struct msg_queue *)obj; int ret = 0; @@ -924,12 +924,11 @@ return ret || is_signaled( queue ); } -static int msg_queue_satisfied( struct object *obj, struct thread *thread ) +static void msg_queue_satisfied( struct object *obj, struct wait_queue_entry *entry ) { struct msg_queue *queue = (struct msg_queue *)obj; queue->wake_mask = 0; queue->changed_mask = 0; - return 0; /* Not abandoned */ } static void msg_queue_destroy( struct object *obj ) @@ -2198,7 +2197,7 @@ if (is_signaled( queue )) { /* if skip wait is set, do what would have been done in the subsequent wait */ - if (req->skip_wait) msg_queue_satisfied( &queue->obj, current ); + if (req->skip_wait) queue->wake_mask = queue->changed_mask = 0; else wake_up( &queue->obj, 0 ); } } diff -Nru wine1.6-1.7.1-actually1.6/server/request.h wine1.6-1.6.1/server/request.h --- wine1.6-1.7.1-actually1.6/server/request.h 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/request.h 2013-11-15 19:30:24.000000000 +0000 @@ -133,7 +133,10 @@ DECL_HANDLER(select); DECL_HANDLER(create_event); DECL_HANDLER(event_op); +DECL_HANDLER(query_event); DECL_HANDLER(open_event); +DECL_HANDLER(create_keyed_event); +DECL_HANDLER(open_keyed_event); DECL_HANDLER(create_mutex); DECL_HANDLER(release_mutex); DECL_HANDLER(open_mutex); @@ -388,7 +391,10 @@ (req_handler)req_select, (req_handler)req_create_event, (req_handler)req_event_op, + (req_handler)req_query_event, (req_handler)req_open_event, + (req_handler)req_create_keyed_event, + (req_handler)req_open_keyed_event, (req_handler)req_create_mutex, (req_handler)req_release_mutex, (req_handler)req_open_mutex, @@ -810,9 +816,8 @@ C_ASSERT( sizeof(struct open_thread_reply) == 16 ); C_ASSERT( FIELD_OFFSET(struct select_request, flags) == 12 ); C_ASSERT( FIELD_OFFSET(struct select_request, cookie) == 16 ); -C_ASSERT( FIELD_OFFSET(struct select_request, signal) == 24 ); -C_ASSERT( FIELD_OFFSET(struct select_request, prev_apc) == 28 ); -C_ASSERT( FIELD_OFFSET(struct select_request, timeout) == 32 ); +C_ASSERT( FIELD_OFFSET(struct select_request, timeout) == 24 ); +C_ASSERT( FIELD_OFFSET(struct select_request, prev_apc) == 32 ); C_ASSERT( sizeof(struct select_request) == 40 ); C_ASSERT( FIELD_OFFSET(struct select_reply, timeout) == 8 ); C_ASSERT( FIELD_OFFSET(struct select_reply, call) == 16 ); @@ -828,12 +833,28 @@ C_ASSERT( FIELD_OFFSET(struct event_op_request, handle) == 12 ); C_ASSERT( FIELD_OFFSET(struct event_op_request, op) == 16 ); C_ASSERT( sizeof(struct event_op_request) == 24 ); +C_ASSERT( FIELD_OFFSET(struct query_event_request, handle) == 12 ); +C_ASSERT( sizeof(struct query_event_request) == 16 ); +C_ASSERT( FIELD_OFFSET(struct query_event_reply, manual_reset) == 8 ); +C_ASSERT( FIELD_OFFSET(struct query_event_reply, state) == 12 ); +C_ASSERT( sizeof(struct query_event_reply) == 16 ); C_ASSERT( FIELD_OFFSET(struct open_event_request, access) == 12 ); C_ASSERT( FIELD_OFFSET(struct open_event_request, attributes) == 16 ); C_ASSERT( FIELD_OFFSET(struct open_event_request, rootdir) == 20 ); C_ASSERT( sizeof(struct open_event_request) == 24 ); C_ASSERT( FIELD_OFFSET(struct open_event_reply, handle) == 8 ); C_ASSERT( sizeof(struct open_event_reply) == 16 ); +C_ASSERT( FIELD_OFFSET(struct create_keyed_event_request, access) == 12 ); +C_ASSERT( FIELD_OFFSET(struct create_keyed_event_request, attributes) == 16 ); +C_ASSERT( sizeof(struct create_keyed_event_request) == 24 ); +C_ASSERT( FIELD_OFFSET(struct create_keyed_event_reply, handle) == 8 ); +C_ASSERT( sizeof(struct create_keyed_event_reply) == 16 ); +C_ASSERT( FIELD_OFFSET(struct open_keyed_event_request, access) == 12 ); +C_ASSERT( FIELD_OFFSET(struct open_keyed_event_request, attributes) == 16 ); +C_ASSERT( FIELD_OFFSET(struct open_keyed_event_request, rootdir) == 20 ); +C_ASSERT( sizeof(struct open_keyed_event_request) == 24 ); +C_ASSERT( FIELD_OFFSET(struct open_keyed_event_reply, handle) == 8 ); +C_ASSERT( sizeof(struct open_keyed_event_reply) == 16 ); C_ASSERT( FIELD_OFFSET(struct create_mutex_request, access) == 12 ); C_ASSERT( FIELD_OFFSET(struct create_mutex_request, attributes) == 16 ); C_ASSERT( FIELD_OFFSET(struct create_mutex_request, owned) == 20 ); @@ -2093,15 +2114,15 @@ C_ASSERT( FIELD_OFFSET(struct add_completion_request, ckey) == 16 ); C_ASSERT( FIELD_OFFSET(struct add_completion_request, cvalue) == 24 ); C_ASSERT( FIELD_OFFSET(struct add_completion_request, information) == 32 ); -C_ASSERT( FIELD_OFFSET(struct add_completion_request, status) == 36 ); -C_ASSERT( sizeof(struct add_completion_request) == 40 ); +C_ASSERT( FIELD_OFFSET(struct add_completion_request, status) == 40 ); +C_ASSERT( sizeof(struct add_completion_request) == 48 ); C_ASSERT( FIELD_OFFSET(struct remove_completion_request, handle) == 12 ); C_ASSERT( sizeof(struct remove_completion_request) == 16 ); C_ASSERT( FIELD_OFFSET(struct remove_completion_reply, ckey) == 8 ); C_ASSERT( FIELD_OFFSET(struct remove_completion_reply, cvalue) == 16 ); C_ASSERT( FIELD_OFFSET(struct remove_completion_reply, information) == 24 ); -C_ASSERT( FIELD_OFFSET(struct remove_completion_reply, status) == 28 ); -C_ASSERT( sizeof(struct remove_completion_reply) == 32 ); +C_ASSERT( FIELD_OFFSET(struct remove_completion_reply, status) == 32 ); +C_ASSERT( sizeof(struct remove_completion_reply) == 40 ); C_ASSERT( FIELD_OFFSET(struct query_completion_request, handle) == 12 ); C_ASSERT( sizeof(struct query_completion_request) == 16 ); C_ASSERT( FIELD_OFFSET(struct query_completion_reply, depth) == 8 ); @@ -2112,9 +2133,9 @@ C_ASSERT( sizeof(struct set_completion_info_request) == 32 ); C_ASSERT( FIELD_OFFSET(struct add_fd_completion_request, handle) == 12 ); C_ASSERT( FIELD_OFFSET(struct add_fd_completion_request, cvalue) == 16 ); -C_ASSERT( FIELD_OFFSET(struct add_fd_completion_request, status) == 24 ); -C_ASSERT( FIELD_OFFSET(struct add_fd_completion_request, information) == 28 ); -C_ASSERT( sizeof(struct add_fd_completion_request) == 32 ); +C_ASSERT( FIELD_OFFSET(struct add_fd_completion_request, information) == 24 ); +C_ASSERT( FIELD_OFFSET(struct add_fd_completion_request, status) == 32 ); +C_ASSERT( sizeof(struct add_fd_completion_request) == 40 ); C_ASSERT( FIELD_OFFSET(struct get_window_layered_info_request, handle) == 12 ); C_ASSERT( sizeof(struct get_window_layered_info_request) == 16 ); C_ASSERT( FIELD_OFFSET(struct get_window_layered_info_reply, color_key) == 8 ); diff -Nru wine1.6-1.7.1-actually1.6/server/semaphore.c wine1.6-1.6.1/server/semaphore.c --- wine1.6-1.7.1-actually1.6/server/semaphore.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/semaphore.c 2013-11-15 19:30:24.000000000 +0000 @@ -45,8 +45,8 @@ static void semaphore_dump( struct object *obj, int verbose ); static struct object_type *semaphore_get_type( struct object *obj ); -static int semaphore_signaled( struct object *obj, struct thread *thread ); -static int semaphore_satisfied( struct object *obj, struct thread *thread ); +static int semaphore_signaled( struct object *obj, struct wait_queue_entry *entry ); +static void semaphore_satisfied( struct object *obj, struct wait_queue_entry *entry ); static unsigned int semaphore_map_access( struct object *obj, unsigned int access ); static int semaphore_signal( struct object *obj, unsigned int access ); @@ -136,20 +136,19 @@ return get_object_type( &str ); } -static int semaphore_signaled( struct object *obj, struct thread *thread ) +static int semaphore_signaled( struct object *obj, struct wait_queue_entry *entry ) { struct semaphore *sem = (struct semaphore *)obj; assert( obj->ops == &semaphore_ops ); return (sem->count > 0); } -static int semaphore_satisfied( struct object *obj, struct thread *thread ) +static void semaphore_satisfied( struct object *obj, struct wait_queue_entry *entry ) { struct semaphore *sem = (struct semaphore *)obj; assert( obj->ops == &semaphore_ops ); assert( sem->count ); sem->count--; - return 0; /* not abandoned */ } static unsigned int semaphore_map_access( struct object *obj, unsigned int access ) diff -Nru wine1.6-1.7.1-actually1.6/server/serial.c wine1.6-1.6.1/server/serial.c --- wine1.6-1.7.1-actually1.6/server/serial.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/serial.c 2013-11-15 19:30:24.000000000 +0000 @@ -61,7 +61,6 @@ static void serial_destroy(struct object *obj); static enum server_fd_type serial_get_fd_type( struct fd *fd ); -static void serial_flush( struct fd *fd, struct event **event ); static void serial_queue_async( struct fd *fd, const async_data_t *data, int type, int count ); struct serial @@ -107,7 +106,7 @@ { default_fd_get_poll_events, /* get_poll_events */ default_poll_event, /* poll_event */ - serial_flush, /* flush */ + no_flush, /* flush */ serial_get_fd_type, /* get_fd_type */ default_fd_ioctl, /* ioctl */ serial_queue_async, /* queue_async */ @@ -196,14 +195,6 @@ } } -static void serial_flush( struct fd *fd, struct event **event ) -{ - /* MSDN says: If hFile is a handle to a communications device, - * the function only flushes the transmit buffer. - */ - if (tcflush( get_unix_fd(fd), TCOFLUSH ) == -1) file_set_error(); -} - DECL_HANDLER(get_serial_info) { struct serial *serial; diff -Nru wine1.6-1.7.1-actually1.6/server/sock.c wine1.6-1.6.1/server/sock.c --- wine1.6-1.7.1-actually1.6/server/sock.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/sock.c 2013-11-15 19:30:24.000000000 +0000 @@ -109,7 +109,7 @@ }; static void sock_dump( struct object *obj, int verbose ); -static int sock_signaled( struct object *obj, struct thread *thread ); +static int sock_signaled( struct object *obj, struct wait_queue_entry *entry ); static struct fd *sock_get_fd( struct object *obj ); static void sock_destroy( struct object *obj ); @@ -470,7 +470,7 @@ sock->mask, sock->pmask, sock->hmask ); } -static int sock_signaled( struct object *obj, struct thread *thread ) +static int sock_signaled( struct object *obj, struct wait_queue_entry *entry ) { struct sock *sock = (struct sock *)obj; assert( obj->ops == &sock_ops ); diff -Nru wine1.6-1.7.1-actually1.6/server/thread.c wine1.6-1.6.1/server/thread.c --- wine1.6-1.7.1-actually1.6/server/thread.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/thread.c 2013-11-15 19:30:24.000000000 +0000 @@ -75,6 +75,9 @@ struct thread *thread; /* owner thread */ int count; /* count of objects */ int flags; + int abandoned; + enum select_op select; + client_ptr_t key; /* wait key for keyed events */ client_ptr_t cookie; /* magic cookie to return to client */ timeout_t timeout; struct timeout_user *user; @@ -95,7 +98,7 @@ }; static void dump_thread_apc( struct object *obj, int verbose ); -static int thread_apc_signaled( struct object *obj, struct thread *thread ); +static int thread_apc_signaled( struct object *obj, struct wait_queue_entry *entry ); static void thread_apc_destroy( struct object *obj ); static void clear_apc_queue( struct list *queue ); @@ -123,7 +126,7 @@ /* thread operations */ static void dump_thread( struct object *obj, int verbose ); -static int thread_signaled( struct object *obj, struct thread *thread ); +static int thread_signaled( struct object *obj, struct wait_queue_entry *entry ); static unsigned int thread_map_access( struct object *obj, unsigned int access ); static void thread_poll_event( struct fd *fd, int event ); static void destroy_thread( struct object *obj ); @@ -320,7 +323,7 @@ thread->id, thread->unix_pid, thread->unix_tid, thread->state ); } -static int thread_signaled( struct object *obj, struct thread *thread ) +static int thread_signaled( struct object *obj, struct wait_queue_entry *entry ) { struct thread *mythread = (struct thread *)obj; return (mythread->state == TERMINATED); @@ -343,7 +346,7 @@ fprintf( stderr, "APC owner=%p type=%u\n", apc->owner, apc->call.type ); } -static int thread_apc_signaled( struct object *obj, struct thread *thread ) +static int thread_apc_signaled( struct object *obj, struct wait_queue_entry *entry ) { struct thread_apc *apc = (struct thread_apc *)obj; return apc->executed; @@ -542,6 +545,26 @@ release_object( obj ); } +struct thread *get_wait_queue_thread( struct wait_queue_entry *entry ) +{ + return entry->wait->thread; +} + +enum select_op get_wait_queue_select_op( struct wait_queue_entry *entry ) +{ + return entry->wait->select; +} + +client_ptr_t get_wait_queue_key( struct wait_queue_entry *entry ) +{ + return entry->wait->key; +} + +void make_wait_abandoned( struct wait_queue_entry *entry ) +{ + entry->wait->abandoned = 1; +} + /* finish waiting */ static void end_wait( struct thread *thread ) { @@ -558,7 +581,8 @@ } /* build the thread wait structure */ -static int wait_on( unsigned int count, struct object *objects[], int flags, timeout_t timeout ) +static int wait_on( const select_op_t *select_op, unsigned int count, struct object *objects[], + int flags, timeout_t timeout ) { struct thread_wait *wait; struct wait_queue_entry *entry; @@ -569,14 +593,16 @@ wait->thread = current; wait->count = count; wait->flags = flags; + wait->select = select_op->op; wait->user = NULL; wait->timeout = timeout; + wait->abandoned = 0; current->wait = wait; for (i = 0, entry = wait->queues; i < count; i++, entry++) { struct object *obj = objects[i]; - entry->thread = current; + entry->wait = wait; if (!obj->ops->add_queue( obj, entry )) { wait->count = i; @@ -587,10 +613,29 @@ return 1; } +static int wait_on_handles( const select_op_t *select_op, unsigned int count, const obj_handle_t *handles, + int flags, timeout_t timeout ) +{ + struct object *objects[MAXIMUM_WAIT_OBJECTS]; + unsigned int i; + int ret = 0; + + assert( count <= MAXIMUM_WAIT_OBJECTS ); + + for (i = 0; i < count; i++) + if (!(objects[i] = get_handle_obj( current->process, handles[i], SYNCHRONIZE, NULL ))) + break; + + if (i == count) ret = wait_on( select_op, count, objects, flags, timeout ); + + while (i > 0) release_object( objects[--i] ); + return ret; +} + /* check if the thread waiting condition is satisfied */ static int check_wait( struct thread *thread ) { - int i, signaled; + int i; struct thread_wait *wait = thread->wait; struct wait_queue_entry *entry; @@ -602,31 +647,28 @@ /* Suspended threads may not acquire locks, but they can run system APCs */ if (thread->process->suspend + thread->suspend > 0) return -1; - if (wait->flags & SELECT_ALL) + if (wait->select == SELECT_WAIT_ALL) { int not_ok = 0; /* Note: we must check them all anyway, as some objects may * want to do something when signaled, even if others are not */ for (i = 0, entry = wait->queues; i < wait->count; i++, entry++) - not_ok |= !entry->obj->ops->signaled( entry->obj, thread ); + not_ok |= !entry->obj->ops->signaled( entry->obj, entry ); if (not_ok) goto other_checks; /* Wait satisfied: tell it to all objects */ - signaled = 0; for (i = 0, entry = wait->queues; i < wait->count; i++, entry++) - if (entry->obj->ops->satisfied( entry->obj, thread )) - signaled = STATUS_ABANDONED_WAIT_0; - return signaled; + entry->obj->ops->satisfied( entry->obj, entry ); + return wait->abandoned ? STATUS_ABANDONED_WAIT_0 : STATUS_WAIT_0; } else { for (i = 0, entry = wait->queues; i < wait->count; i++, entry++) { - if (!entry->obj->ops->signaled( entry->obj, thread )) continue; + if (!entry->obj->ops->signaled( entry->obj, entry )) continue; /* Wait satisfied: tell it to the object */ - signaled = i; - if (entry->obj->ops->satisfied( entry->obj, thread )) - signaled = i + STATUS_ABANDONED_WAIT_0; - return signaled; + entry->obj->ops->satisfied( entry->obj, entry ); + if (wait->abandoned) i += STATUS_ABANDONED_WAIT_0; + return i; } } @@ -676,6 +718,33 @@ return count; } +/* attempt to wake up a thread from a wait queue entry, assuming that it is signaled */ +int wake_thread_queue_entry( struct wait_queue_entry *entry ) +{ + struct thread_wait *wait = entry->wait; + struct thread *thread = wait->thread; + int signaled; + client_ptr_t cookie; + + if (thread->wait != wait) return 0; /* not the current wait */ + if (thread->process->suspend + thread->suspend > 0) return 0; /* cannot acquire locks */ + + assert( wait->select != SELECT_WAIT_ALL ); + + signaled = entry - wait->queues; + entry->obj->ops->satisfied( entry->obj, entry ); + if (wait->abandoned) signaled += STATUS_ABANDONED_WAIT_0; + + cookie = wait->cookie; + if (debug_level) fprintf( stderr, "%04x: *wakeup* signaled=%d\n", thread->id, signaled ); + end_wait( thread ); + + if (send_thread_wakeup( thread, cookie, signaled ) != -1) + wake_thread( thread ); /* check other waits too */ + + return 1; +} + /* thread wait timeout */ static void thread_timeout( void *ptr ) { @@ -710,39 +779,62 @@ } /* select on a list of handles */ -static timeout_t select_on( unsigned int count, client_ptr_t cookie, const obj_handle_t *handles, - int flags, timeout_t timeout, obj_handle_t signal_obj ) +static timeout_t select_on( const select_op_t *select_op, data_size_t op_size, client_ptr_t cookie, + int flags, timeout_t timeout ) { int ret; - unsigned int i; - struct object *objects[MAXIMUM_WAIT_OBJECTS]; + unsigned int count; + struct object *object; if (timeout <= 0) timeout = current_time - timeout; - if (count > MAXIMUM_WAIT_OBJECTS) - { - set_error( STATUS_INVALID_PARAMETER ); - return 0; - } - for (i = 0; i < count; i++) + switch (select_op->op) { - if (!(objects[i] = get_handle_obj( current->process, handles[i], SYNCHRONIZE, NULL ))) - break; - } + case SELECT_NONE: + if (!wait_on( select_op, 0, NULL, flags, timeout )) return timeout; + break; - if (i < count) goto done; - if (!wait_on( count, objects, flags, timeout )) goto done; + case SELECT_WAIT: + case SELECT_WAIT_ALL: + count = (op_size - offsetof( select_op_t, wait.handles )) / sizeof(select_op->wait.handles[0]); + if (op_size < offsetof( select_op_t, wait.handles ) || count > MAXIMUM_WAIT_OBJECTS) + { + set_error( STATUS_INVALID_PARAMETER ); + return 0; + } + if (!wait_on_handles( select_op, count, select_op->wait.handles, flags, timeout )) + return timeout; + break; - /* signal the object */ - if (signal_obj) - { - if (!signal_object( signal_obj )) + case SELECT_SIGNAL_AND_WAIT: + if (!wait_on_handles( select_op, 1, &select_op->signal_and_wait.wait, flags, timeout )) + return timeout; + if (select_op->signal_and_wait.signal) { - end_wait( current ); - goto done; + if (!signal_object( select_op->signal_and_wait.signal )) + { + end_wait( current ); + return timeout; + } + /* check if we woke ourselves up */ + if (!current->wait) return timeout; } - /* check if we woke ourselves up */ - if (!current->wait) goto done; + break; + + case SELECT_KEYED_EVENT_WAIT: + case SELECT_KEYED_EVENT_RELEASE: + object = (struct object *)get_keyed_event_obj( current->process, select_op->keyed_event.handle, + select_op->op == SELECT_KEYED_EVENT_WAIT ? KEYEDEVENT_WAIT : KEYEDEVENT_WAKE ); + if (!object) return timeout; + ret = wait_on( select_op, 1, &object, flags, timeout ); + release_object( object ); + if (!ret) return timeout; + current->wait->key = select_op->keyed_event.key; + break; + + default: + set_error( STATUS_INVALID_PARAMETER ); + return 0; } if ((ret = check_wait( current )) != -1) @@ -750,7 +842,7 @@ /* condition is already satisfied */ end_wait( current ); set_error( ret ); - goto done; + return timeout; } /* now we need to wait */ @@ -760,14 +852,11 @@ thread_timeout, current->wait ))) { end_wait( current ); - goto done; + return timeout; } } current->wait->cookie = cookie; set_error( STATUS_PENDING ); - -done: - while (i > 0) release_object( objects[--i] ); return timeout; } @@ -779,7 +868,7 @@ LIST_FOR_EACH( ptr, &obj->wait_queue ) { struct wait_queue_entry *entry = LIST_ENTRY( ptr, struct wait_queue_entry, entry ); - if (!wake_thread( entry->thread )) continue; + if (!wake_thread( get_wait_queue_thread( entry ))) continue; if (max && !--max) break; /* restart at the head of the list since a wake up can change the object wait queue */ ptr = &obj->wait_queue; @@ -1310,17 +1399,19 @@ /* select on a handle list */ DECL_HANDLER(select) { + select_op_t select_op; + data_size_t op_size; struct thread_apc *apc; - unsigned int count; const apc_result_t *result = get_req_data(); - const obj_handle_t *handles = (const obj_handle_t *)(result + 1); if (get_req_data_size() < sizeof(*result)) { set_error( STATUS_INVALID_PARAMETER ); return; } - count = (get_req_data_size() - sizeof(*result)) / sizeof(obj_handle_t); + op_size = min( get_req_data_size() - sizeof(*result), sizeof(select_op) ); + memset( &select_op, 0, sizeof(select_op) ); + memcpy( &select_op, result + 1, op_size ); /* first store results of previous apc */ if (req->prev_apc) @@ -1348,7 +1439,7 @@ release_object( apc ); } - reply->timeout = select_on( count, req->cookie, handles, req->flags, req->timeout, req->signal ); + reply->timeout = select_on( &select_op, op_size, req->cookie, req->flags, req->timeout ); if (get_error() == STATUS_USER_APC) { diff -Nru wine1.6-1.7.1-actually1.6/server/thread.h wine1.6-1.6.1/server/thread.h --- wine1.6-1.7.1-actually1.6/server/thread.h 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/thread.h 2013-11-15 19:30:24.000000000 +0000 @@ -105,9 +105,14 @@ extern struct thread *get_thread_from_handle( obj_handle_t handle, unsigned int access ); extern struct thread *get_thread_from_tid( int tid ); extern struct thread *get_thread_from_pid( int pid ); +extern struct thread *get_wait_queue_thread( struct wait_queue_entry *entry ); +extern enum select_op get_wait_queue_select_op( struct wait_queue_entry *entry ); +extern client_ptr_t get_wait_queue_key( struct wait_queue_entry *entry ); +extern void make_wait_abandoned( struct wait_queue_entry *entry ); extern void stop_thread( struct thread *thread ); extern void stop_thread_if_suspended( struct thread *thread ); extern int wake_thread( struct thread *thread ); +extern int wake_thread_queue_entry( struct wait_queue_entry *entry ); extern int add_queue( struct object *obj, struct wait_queue_entry *entry ); extern void remove_queue( struct object *obj, struct wait_queue_entry *entry ); extern void kill_thread( struct thread *thread, int violent_death ); diff -Nru wine1.6-1.7.1-actually1.6/server/timer.c wine1.6-1.6.1/server/timer.c --- wine1.6-1.7.1-actually1.6/server/timer.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/timer.c 2013-11-15 19:30:24.000000000 +0000 @@ -52,8 +52,8 @@ static void timer_dump( struct object *obj, int verbose ); static struct object_type *timer_get_type( struct object *obj ); -static int timer_signaled( struct object *obj, struct thread *thread ); -static int timer_satisfied( struct object *obj, struct thread *thread ); +static int timer_signaled( struct object *obj, struct wait_queue_entry *entry ); +static void timer_satisfied( struct object *obj, struct wait_queue_entry *entry ); static unsigned int timer_map_access( struct object *obj, unsigned int access ); static void timer_destroy( struct object *obj ); @@ -194,19 +194,18 @@ return get_object_type( &str ); } -static int timer_signaled( struct object *obj, struct thread *thread ) +static int timer_signaled( struct object *obj, struct wait_queue_entry *entry ) { struct timer *timer = (struct timer *)obj; assert( obj->ops == &timer_ops ); return timer->signaled; } -static int timer_satisfied( struct object *obj, struct thread *thread ) +static void timer_satisfied( struct object *obj, struct wait_queue_entry *entry ) { struct timer *timer = (struct timer *)obj; assert( obj->ops == &timer_ops ); if (!timer->manual) timer->signaled = 0; - return 0; } static unsigned int timer_map_access( struct object *obj, unsigned int access ) diff -Nru wine1.6-1.7.1-actually1.6/server/token.c wine1.6-1.6.1/server/token.c --- wine1.6-1.7.1-actually1.6/server/token.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/token.c 2013-11-15 19:30:24.000000000 +0000 @@ -640,8 +640,8 @@ PSID alias_admins_sid; PSID alias_users_sid; PSID logon_sid; - /* note: should be the owner specified in the token */ - ACL *default_dacl = create_default_dacl( &interactive_sid ); + const SID *user_sid = security_unix_uid_to_sid( getuid() ); + ACL *default_dacl = create_default_dacl( user_sid ); alias_admins_sid = security_sid_alloc( &nt_authority, sizeof(alias_admins_subauth)/sizeof(alias_admins_subauth[0]), alias_admins_subauth ); @@ -688,10 +688,9 @@ { logon_sid, SE_GROUP_ENABLED|SE_GROUP_ENABLED_BY_DEFAULT|SE_GROUP_MANDATORY|SE_GROUP_LOGON_ID }, }; static const TOKEN_SOURCE admin_source = {"SeMgr", {0, 0}}; - token = create_token( TRUE, security_unix_uid_to_sid( getuid() ), - admin_groups, sizeof(admin_groups)/sizeof(admin_groups[0]), - admin_privs, sizeof(admin_privs)/sizeof(admin_privs[0]), - default_dacl, admin_source, NULL, -1 ); + token = create_token( TRUE, user_sid, admin_groups, sizeof(admin_groups)/sizeof(admin_groups[0]), + admin_privs, sizeof(admin_privs)/sizeof(admin_privs[0]), default_dacl, + admin_source, NULL, -1 ); /* we really need a primary group */ assert( token->primary_group ); } diff -Nru wine1.6-1.7.1-actually1.6/server/trace.c wine1.6-1.6.1/server/trace.c --- wine1.6-1.7.1-actually1.6/server/trace.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/trace.c 2013-11-15 19:30:24.000000000 +0000 @@ -66,6 +66,19 @@ fputc( '}', stderr ); } +static void dump_handles( const char *prefix, const obj_handle_t *data, data_size_t size ) +{ + data_size_t len = size / sizeof(*data); + + fprintf( stderr,"%s{", prefix ); + while (len > 0) + { + fprintf( stderr, "%04x", *data++ ); + if (--len) fputc( ',', stderr ); + } + fputc( '}', stderr ); +} + static void dump_timeout( const char *prefix, const timeout_t *time ) { fprintf( stderr, "%s%s", prefix, get_timeout_str(*time) ); @@ -367,16 +380,45 @@ remove_data( size ); } -static void dump_varargs_handles( const char *prefix, data_size_t size ) +static void dump_varargs_select_op( const char *prefix, data_size_t size ) { - const obj_handle_t *data = cur_data; - data_size_t len = size / sizeof(*data); + select_op_t data; - fprintf( stderr,"%s{", prefix ); - while (len > 0) + if (!size) { - fprintf( stderr, "%04x", *data++ ); - if (--len) fputc( ',', stderr ); + fprintf( stderr, "%s{}", prefix ); + return; + } + memset( &data, 0, sizeof(data) ); + memcpy( &data, cur_data, min( size, sizeof(data) )); + + fprintf( stderr, "%s{", prefix ); + switch (data.op) + { + case SELECT_NONE: + fprintf( stderr, "NONE" ); + break; + case SELECT_WAIT: + case SELECT_WAIT_ALL: + fprintf( stderr, "%s", data.op == SELECT_WAIT ? "WAIT" : "WAIT_ALL" ); + if (size > offsetof( select_op_t, wait.handles )) + dump_handles( ",handles=", data.wait.handles, + min( size, sizeof(data.wait) ) - offsetof( select_op_t, wait.handles )); + break; + case SELECT_SIGNAL_AND_WAIT: + fprintf( stderr, "SIGNAL_AND_WAIT,signal=%04x,wait=%04x", + data.signal_and_wait.signal, data.signal_and_wait.wait ); + break; + case SELECT_KEYED_EVENT_WAIT: + case SELECT_KEYED_EVENT_RELEASE: + fprintf( stderr, "KEYED_EVENT_%s,handle=%04x", + data.op == SELECT_KEYED_EVENT_WAIT ? "WAIT" : "RELEASE", + data.keyed_event.handle ); + dump_uint64( ",key=", &data.keyed_event.key ); + break; + default: + fprintf( stderr, "op=%u", data.op ); + break; } fputc( '}', stderr ); remove_data( size ); @@ -1357,11 +1399,10 @@ { fprintf( stderr, " flags=%d", req->flags ); dump_uint64( ", cookie=", &req->cookie ); - fprintf( stderr, ", signal=%04x", req->signal ); - fprintf( stderr, ", prev_apc=%04x", req->prev_apc ); dump_timeout( ", timeout=", &req->timeout ); + fprintf( stderr, ", prev_apc=%04x", req->prev_apc ); dump_varargs_apc_result( ", result=", cur_size ); - dump_varargs_handles( ", handles=", cur_size ); + dump_varargs_select_op( ", data=", cur_size ); } static void dump_select_reply( const struct select_reply *req ) @@ -1391,6 +1432,17 @@ fprintf( stderr, ", op=%d", req->op ); } +static void dump_query_event_request( const struct query_event_request *req ) +{ + fprintf( stderr, " handle=%04x", req->handle ); +} + +static void dump_query_event_reply( const struct query_event_reply *req ) +{ + fprintf( stderr, " manual_reset=%d", req->manual_reset ); + fprintf( stderr, ", state=%d", req->state ); +} + static void dump_open_event_request( const struct open_event_request *req ) { fprintf( stderr, " access=%08x", req->access ); @@ -1404,6 +1456,31 @@ fprintf( stderr, " handle=%04x", req->handle ); } +static void dump_create_keyed_event_request( const struct create_keyed_event_request *req ) +{ + fprintf( stderr, " access=%08x", req->access ); + fprintf( stderr, ", attributes=%08x", req->attributes ); + dump_varargs_object_attributes( ", objattr=", cur_size ); +} + +static void dump_create_keyed_event_reply( const struct create_keyed_event_reply *req ) +{ + fprintf( stderr, " handle=%04x", req->handle ); +} + +static void dump_open_keyed_event_request( const struct open_keyed_event_request *req ) +{ + fprintf( stderr, " access=%08x", req->access ); + fprintf( stderr, ", attributes=%08x", req->attributes ); + fprintf( stderr, ", rootdir=%04x", req->rootdir ); + dump_varargs_unicode_str( ", name=", cur_size ); +} + +static void dump_open_keyed_event_reply( const struct open_keyed_event_reply *req ) +{ + fprintf( stderr, " handle=%04x", req->handle ); +} + static void dump_create_mutex_request( const struct create_mutex_request *req ) { fprintf( stderr, " access=%08x", req->access ); @@ -3861,7 +3938,7 @@ fprintf( stderr, " handle=%04x", req->handle ); dump_uint64( ", ckey=", &req->ckey ); dump_uint64( ", cvalue=", &req->cvalue ); - fprintf( stderr, ", information=%08x", req->information ); + dump_uint64( ", information=", &req->information ); fprintf( stderr, ", status=%08x", req->status ); } @@ -3874,7 +3951,7 @@ { dump_uint64( " ckey=", &req->ckey ); dump_uint64( ", cvalue=", &req->cvalue ); - fprintf( stderr, ", information=%08x", req->information ); + dump_uint64( ", information=", &req->information ); fprintf( stderr, ", status=%08x", req->status ); } @@ -3899,8 +3976,8 @@ { fprintf( stderr, " handle=%04x", req->handle ); dump_uint64( ", cvalue=", &req->cvalue ); + dump_uint64( ", information=", &req->information ); fprintf( stderr, ", status=%08x", req->status ); - fprintf( stderr, ", information=%08x", req->information ); } static void dump_get_window_layered_info_request( const struct get_window_layered_info_request *req ) @@ -4007,7 +4084,10 @@ (dump_func)dump_select_request, (dump_func)dump_create_event_request, (dump_func)dump_event_op_request, + (dump_func)dump_query_event_request, (dump_func)dump_open_event_request, + (dump_func)dump_create_keyed_event_request, + (dump_func)dump_open_keyed_event_request, (dump_func)dump_create_mutex_request, (dump_func)dump_release_mutex_request, (dump_func)dump_open_mutex_request, @@ -4259,7 +4339,10 @@ (dump_func)dump_select_reply, (dump_func)dump_create_event_reply, NULL, + (dump_func)dump_query_event_reply, (dump_func)dump_open_event_reply, + (dump_func)dump_create_keyed_event_reply, + (dump_func)dump_open_keyed_event_reply, (dump_func)dump_create_mutex_reply, (dump_func)dump_release_mutex_reply, (dump_func)dump_open_mutex_reply, @@ -4511,7 +4594,10 @@ "select", "create_event", "event_op", + "query_event", "open_event", + "create_keyed_event", + "open_keyed_event", "create_mutex", "release_mutex", "open_mutex", diff -Nru wine1.6-1.7.1-actually1.6/server/window.c wine1.6-1.6.1/server/window.c --- wine1.6-1.7.1-actually1.6/server/window.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/window.c 2013-11-15 19:30:24.000000000 +0000 @@ -2794,12 +2794,16 @@ if (win->ex_style & WS_EX_LAYERED) { + int was_layered = win->is_layered; + if (req->flags & LWA_ALPHA) win->alpha = req->alpha; else if (!win->is_layered) win->alpha = 0; /* alpha init value is 0 */ win->color_key = req->color_key; win->layered_flags = req->flags; win->is_layered = 1; + /* repaint since we know now it's not going to use UpdateLayeredWindow */ + if (!was_layered) redraw_window( win, 0, 1, RDW_INVALIDATE | RDW_ERASE | RDW_FRAME ); } else set_win32_error( ERROR_INVALID_WINDOW_HANDLE ); } diff -Nru wine1.6-1.7.1-actually1.6/server/wineserver.fr.man.in wine1.6-1.6.1/server/wineserver.fr.man.in --- wine1.6-1.7.1-actually1.6/server/wineserver.fr.man.in 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/wineserver.fr.man.in 2013-11-15 19:30:24.000000000 +0000 @@ -2,7 +2,8 @@ .SH NOM wineserver \- le serveur Wine .SH SYNOPSIS -.BI wineserver\ [options] +.B wineserver +.RI [ options ] .SH DESCRIPTION .B wineserver est un démon qui fournit à Wine à peu près les mêmes services @@ -14,7 +15,7 @@ détaillées ci-après. .SH OPTIONS .TP -\fB\-d\fI[n]\fR, \fB--debug\fI[=n] +\fB\-d\fR[\fIn\fR], \fB--debug\fR[\fB=\fIn\fR] Définit le niveau de débogage à .IR n . 0 signifie aucune information de débogage, 1 est le niveau normal et 2 indique @@ -23,7 +24,7 @@ n'est pas spécifié, la valeur par défaut est 1. La sortie de débogage sera stderr. \fBwine\fR(1) active automatiquement le débogage au niveau normal lorsqu'il démarre \fBwineserver\fR si l'option +server est indiquée dans la variable -WINEDEBUG. +\fBWINEDEBUG\fR. .TP .BR \-f ", " --foreground Laisse le serveur au premier plan pour un débogage plus aisé, par @@ -32,15 +33,15 @@ .BR \-h ", " --help Affiche un message d'aide. .TP -\fB\-k\fI[n]\fR, \fB--kill\fI[=n] +\fB\-k\fR[\fIn\fR], \fB--kill\fR[\fB=\fIn\fR] Termine le .B wineserver actuellement exécuté en lui envoyant facultativement le signal \fIn\fR. Si -aucun signal n'est spécifié, un signal SIGINT est envoyé en premier, -puis un signal SIGKILL. L'instance de \fBwineserver\fR à arrêter -est déterminée par la variable d'environnement WINEPREFIX. +aucun signal n'est spécifié, un signal \fBSIGINT\fR est envoyé en premier, +puis un signal \fBSIGKILL\fR. L'instance de \fBwineserver\fR à arrêter +est déterminée par la variable d'environnement \fBWINEPREFIX\fR. .TP -\fB\-p\fI[n]\fR, \fB--persistent\fI[=n] +\fB\-p\fR[\fIn\fR], \fB--persistent\fR[\fB=\fIn\fR] Spécifie le délai de persistance de \fBwineserver\fR, c'est-à-dire le temps pendant lequel le serveur continuera à tourner après que tous les processus clients se sont terminés. Ceci évite le coût inhérent à l'arrêt @@ -56,9 +57,9 @@ Attend que le .B wineserver actuellement exécuté se termine. -.SH VARIABLES D'ENVIRONNEMENT +.SH ENVIRONNEMENT .TP -.I WINEPREFIX +.B WINEPREFIX Si définie, cette variable indique le nom du répertoire où .B wineserver stocke ses données (\fI$HOME/.wine\fR par défaut). Tous les processus @@ -68,11 +69,11 @@ (c'est-à-dire pour un même utilisateur) partagent certains éléments comme la base de registre, la mémoire partagée et les objets du noyau. En donnant à -.I WINEPREFIX +.B WINEPREFIX une valeur spécifique pour différents processus Wine, il est possible d'exécuter plusieurs sessions de Wine totalement indépendantes. .TP -.I WINESERVER +.B WINESERVER Spécifie le chemin et le nom de l'exécutable .B wineserver qui sera lancé automatiquement par \fBwine\fR. @@ -89,17 +90,16 @@ .BI /tmp/.wine- uid Répertoire contenant le socket de serveur Unix et le fichier de verrouillage. Ces fichiers sont créés dans un sous-répertoire dont le nom est dérivé -des périphérique et numéros d'inodes du répertoire WINEPREFIX. +des périphérique et numéros d'inodes du répertoire \fBWINEPREFIX\fR. .SH AUTEURS L'auteur originel de .B wineserver est Alexandre Julliard. Beaucoup d'autres personnes ont contribué des nouvelles fonctionnalités -et des corrections de bogues. Référez-vous au fichier Changelog dans la distribution de Wine -pour les détails complets. -.SH BOGUES -Si vous détectez un bogue, veuillez le signaler (en anglais) sur le +et des corrections de bugs. Pour une liste complète, consultez l'historique git. +.SH BUGS +Les bugs peuvent être signalés (en anglais) sur le .UR http://bugs.winehq.org -.B système de suivi de bogues de Wine +.B système de suivi des problèmes de Wine .UE . .SH DISPONIBILITÉ .B wineserver @@ -108,4 +108,8 @@ .B quartier général des développeurs de Wine .UE . .SH "VOIR AUSSI" -.BR wine (1). +.BR wine (1), +.br +.UR http://www.winehq.org/help +.B Documentation et support de Wine +.UE . diff -Nru wine1.6-1.7.1-actually1.6/server/wineserver.man.in wine1.6-1.6.1/server/wineserver.man.in --- wine1.6-1.7.1-actually1.6/server/wineserver.man.in 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/server/wineserver.man.in 2013-11-15 19:30:24.000000000 +0000 @@ -2,7 +2,8 @@ .SH NAME wineserver \- the Wine server .SH SYNOPSIS -.BI wineserver\ [options] +.B wineserver +.RI [ options ] .SH DESCRIPTION .B wineserver is a daemon process that provides to Wine roughly the same services @@ -15,7 +16,7 @@ explained below. .SH OPTIONS .TP -\fB\-d\fI[n]\fR, \fB--debug\fI[=n] +\fB\-d\fR[\fIn\fR], \fB--debug\fR[\fB=\fIn\fR] Set the debug level to .IR n . 0 means no debugging information, 1 is the normal level, and 2 is for @@ -24,7 +25,7 @@ is not specified, the default is 1. The debug output will be sent to stderr. \fBwine\fR(1) will automatically enable normal level debugging when starting \fBwineserver\fR if the +server option is set in the -WINEDEBUG variable. +\fBWINEDEBUG\fR variable. .TP .BR \-f ", " --foreground Make the server remain in the foreground for easier debugging, for @@ -33,15 +34,15 @@ .BR \-h ", " --help Display a help message. .TP -\fB\-k\fI[n]\fR, \fB--kill\fI[=n] +\fB\-k\fR[\fIn\fR], \fB--kill\fR[\fB=\fIn\fR] Kill the currently running .BR wineserver , optionally by sending signal \fIn\fR. If no signal is specified, sends -a SIGINT first and then a SIGKILL. The instance of \fBwineserver\fR -that is killed is selected based on the WINEPREFIX environment +a \fBSIGINT\fR first and then a \fBSIGKILL\fR. The instance of \fBwineserver\fR +that is killed is selected based on the \fBWINEPREFIX\fR environment variable. .TP -\fB\-p\fI[n]\fR, \fB--persistent\fI[=n] +\fB\-p\fR[\fIn\fR], \fB--persistent\fR[\fB=\fIn\fR] Specify the \fBwineserver\fR persistence delay, i.e. the amount of time that the server will keep running when all client processes have terminated. This avoids the cost of shutting down and starting again @@ -56,9 +57,9 @@ Wait until the currently running .B wineserver terminates. -.SH ENVIRONMENT VARIABLES +.SH ENVIRONMENT .TP -.I WINEPREFIX +.B WINEPREFIX If set, the content of this variable is taken as the name of the directory where .B wineserver stores its data (the default is \fI$HOME/.wine\fR). All @@ -68,11 +69,11 @@ (i.e.: same user) share certain things like registry, shared memory and kernel objects. By setting -.I WINEPREFIX +.B WINEPREFIX to different values for different Wine processes, it is possible to run a number of truly independent Wine sessions. .TP -.I WINESERVER +.B WINESERVER Specifies the path and name of the .B wineserver binary that will be launched automatically by \fBwine\fR. If not set, @@ -89,7 +90,7 @@ .BI /tmp/.wine- uid Directory containing the server Unix socket and the lock file. These files are created in a subdirectory generated from the -WINEPREFIX directory device and inode numbers. +\fBWINEPREFIX\fR directory device and inode numbers. .SH AUTHORS The original author of .B wineserver diff -Nru wine1.6-1.7.1-actually1.6/tools/widl/parser.y wine1.6-1.6.1/tools/widl/parser.y --- wine1.6-1.7.1-actually1.6/tools/widl/parser.y 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/tools/widl/parser.y 2013-11-15 19:30:24.000000000 +0000 @@ -38,33 +38,6 @@ #include "expr.h" #include "typetree.h" -#if defined(YYBYACC) - /* Berkeley yacc (byacc) doesn't seem to know about these */ - /* Some *BSD supplied versions do define these though */ -# ifndef YYEMPTY -# define YYEMPTY (-1) /* Empty lookahead value of yychar */ -# endif -# ifndef YYLEX -# define YYLEX yylex() -# endif - -#elif defined(YYBISON) - /* Bison was used for original development */ - /* #define YYEMPTY -2 */ - /* #define YYLEX yylex() */ - -#else - /* No yacc we know yet */ -# if !defined(YYEMPTY) || !defined(YYLEX) -# error Yacc version/type unknown. This version needs to be verified for settings of YYEMPTY and YYLEX. -# elif defined(__GNUC__) /* gcc defines the #warning directive */ -# warning Yacc version/type unknown. It defines YYEMPTY and YYLEX, but is not tested - /* #else we just take a chance that it works... */ -# endif -#endif - -#define YYERROR_VERBOSE - static unsigned char pointer_default = RPC_FC_UP; typedef struct list typelist_t; @@ -323,6 +296,8 @@ %right '!' '~' CAST PPTR POS NEG ADDRESSOF tSIZEOF %left '.' MEMBERPTR '[' ']' +%error-verbose + %% input: gbl_statements { fix_incomplete(); diff -Nru wine1.6-1.7.1-actually1.6/tools/widl/widl.man.in wine1.6-1.6.1/tools/widl/widl.man.in --- wine1.6-1.7.1-actually1.6/tools/widl/widl.man.in 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/tools/widl/widl.man.in 2013-11-15 19:30:24.000000000 +0000 @@ -97,7 +97,7 @@ .IP "\fB-I \fIpath\fR" Add a header search directory to path. Multiple search directories are allowed. -.IP "\fB-D \fIid\fR[\f\fB=\fIval\fR]" +.IP "\fB-D \fIid\fR[\fB=\fIval\fR]" Define preprocessor macro \fIid\fR with value \fIval\fR. .IP "\fB-E\fR" Preprocess only. diff -Nru wine1.6-1.7.1-actually1.6/tools/winemaker.fr.man.in wine1.6-1.6.1/tools/winemaker.fr.man.in --- wine1.6-1.7.1-actually1.6/tools/winemaker.fr.man.in 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/tools/winemaker.fr.man.in 2013-11-15 19:30:24.000000000 +0000 @@ -60,19 +60,19 @@ .PP .RB "-\ " winemaker recherchera également d'autres problèmes plus exotiques comme l'emploi -de « #pragma pack », l'utilisation de « afxres.h » dans des projets +de \fI#pragma pack\fR, l'utilisation de \fIafxres.h\fR dans des projets non MFC, etc. Quand il trouve de tels points nébuleux, il émettra des avertissements. .PP .RB "-\ " winemaker peut également balayer un arbre de répertoires complet en une seule passe, deviner quels sont les exécutables et bibliothèques en cours de construction, -les faire correspondre à des fichiers sources, et générer le Makefile +les faire correspondre à des fichiers sources, et générer le \fIMakefile\fR correspondant. .PP -\ finalement, .B winemaker -générera un Makefile global pour une utilisation classique. +générera un \fIMakefile\fR global pour une utilisation classique. .PP .RB "-\ " winemaker comprend les projets de type MFC, et génère des fichiers appropriés. @@ -95,7 +95,7 @@ .B --nosource-fix Ne pas essayer de corriger les fichiers sources (p.ex. la conversion DOS vers UNIX). Cela évite des messages d'erreur si des fichiers sont -accessibles en lecture seule uniquement. +en lecture seule. .TP .B --lower-all Renommer tous les fichiers et répertoires en minuscules. @@ -103,7 +103,7 @@ .B --lower-uppercase Ne renommer que les fichiers et répertoires qui ont un nom composé uniquement de majuscules. -Ainsi, « HELLO.C » serait renommé, mais pas « World.c ». +Ainsi, \fIHELLO.C\fR serait renommé, mais pas \fIWorld.c\fR. .TP .B --lower-none Ne pas renommer de fichiers et répertoires en minuscules. Notez que cela @@ -150,11 +150,11 @@ Spécifier que les cibles n'utilisent pas les MFC. Cette option empêche l'utilisation des bibliothèques MFC même si .B winemaker -rencontre des fichiers « stdafx.cpp » ou « stdafx.h » qui activeraient +rencontre des fichiers \fIstdafx.cpp\fR ou \fIstdafx.h\fR qui activeraient les MFC automatiquement en temps normal si ni \fB--nomfc\fR ni \fB--mfc\fR n'était spécifiée. .TP -.BI -D macro "\fR[=\fIdéfn\fR]" +.BI -D macro "\fR[\fB=\fIdéfn\fR]" Ajouter la définition de macro spécifiée à la liste globale des définitions de macros. .TP @@ -178,16 +178,16 @@ Ne pas utiliser l'ensemble standard de bibliothèques Winelib pour les imports, c.-à-d. que toute DLL utilisée par votre code doit être explicitement spécifiée à l'aide d'options \fB-i\fR. -L'ensemble standard de bibliothèques est\ : odbc32.dll, odbccp32.dll, ole32.dll, -oleaut32.dll et winspool.drv. +L'ensemble standard de bibliothèques est : \fIodbc32.dll\fR, \fIodbccp32.dll\fR, \fIole32.dll\fR, +\fIoleaut32.dll\fR et \fIwinspool.drv\fR. .TP .B --nomsvcrt Définir certaines options afin que winegcc n'utilise pas msvcrt durant la compilation. Utilisez cette option si certains fichiers cpp -incluent . +incluent \fI\fR. .TP .B --interactive -Entrer dans le mode interactif. Dans ce mode, +Utiliser le mode interactif. Dans ce mode, .B winemaker demandera de confirmer la liste de cibles pour chaque répertoire, et ensuite de fournir des options spécifiques de répertoire et/ou de cible. @@ -196,10 +196,10 @@ Spécifier qu'il n'y a qu'une seule cible, appelée \fInom\fR. .TP .B --generated-files -Générer le Makefile. Comportement par défaut. +Générer le \fIMakefile\fR. Comportement par défaut. .TP .B --nogenerated-files -Ne pas générer le Makefile. +Ne pas générer le \fIMakefile\fR. .TP .B --wine32 Générer une cible 32 bits. Utile sur les systèmes wow64. Sans cette option, @@ -217,17 +217,17 @@ sous-répertoires. Quand un fichier ou répertoire a un nom composé uniquement de majuscules, le renomme en minuscules. Ensuite, adapte tous ces fichiers sources pour une compilation avec Winelib, et génère des -Makefiles. « -DSTRICT » spécifie que la macro STRICT doit +\fIMakefile\fRs. \fB-DSTRICT\fR spécifie que la macro \fBSTRICT\fR doit être définie lors de la compilation des sources. -Finalement, un Makefile est créé. +Finalement, un \fIMakefile\fR est créé. .PP -L'étape suivante serait : +L'étape suivante serait : .PP $ make .PP Si vous obtenez des erreurs de compilation à ce moment (ce qui est plus que probable pour un projet d'une taille raisonnable), vous devriez consulter -le guide d'utilisateur Winelib pour trouver des moyens de les résoudre. +le guide de l'utilisateur de Winelib pour trouver des moyens de les résoudre. .PP Pour un projet utilisant les MFC, vous devriez plutôt exécuter les commandes suivantes\ : @@ -245,7 +245,7 @@ .SH LIMITATIONS / PROBLÈMES .PP -Dans certains cas, vous devrez éditer manuellement le Makefile ou les fichiers +Dans certains cas, vous devrez éditer manuellement le \fIMakefile\fR ou les fichiers sources. .PP En supposant que l'exécutable ou la bibliothèque windows est disponible, on peut @@ -260,26 +260,30 @@ .B winemaker n'est pas très apte à trouver la bibliothèque contenant l'exécutable : elle doit être soit dans le répertoire courant, soit dans un des répertoires de -.IR LD_LIBRARY_PATH . +.BR LD_LIBRARY_PATH . .PP .B winemaker ne prend pas encore en charge les fichiers de messages, ni le compilateur de messages. .PP - -.SH VOIR AUSSI -.PP -Le guide utilisateur de Winelib : -.PP -http://www.winehq.org/docs/winelib-guide/index -.PP -.BR wine (1) -.PP - +Les bugs peuvent être signalés (en anglais) sur le +.UR http://bugs.winehq.org +.B système de suivi des problèmes de Wine +.UE . .SH AUTEURS François Gouget pour CodeWeavers -.PP +.br Dimitrie O. Paun -.PP +.br André Hentschel -.PP +.SH DISPONIBILITÉ +\fBwinemaker\fR fait partie de la distribution de Wine, qui est disponible sur WineHQ, le +.UR http://www.winehq.org/ +.B quartier général du développement de Wine +.UE . +.SH VOIR AUSSI +.BR wine (1), +.br +.UR http://www.winehq.org/help +.B Documentation et support de Wine +.UE . diff -Nru wine1.6-1.7.1-actually1.6/tools/winemaker.man.in wine1.6-1.6.1/tools/winemaker.man.in --- wine1.6-1.7.1-actually1.6/tools/winemaker.man.in 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/tools/winemaker.man.in 2013-11-15 19:30:24.000000000 +0000 @@ -42,7 +42,7 @@ is a perl script designed to help you bootstrap the process of converting your Windows sources to Winelib programs. .PP -In order to do this winemaker can perform the following operations: +In order to do this \fBwinemaker\fR can perform the following operations: .PP - rename your source files and directories to lowercase in the event they got all uppercased during the transfer. @@ -52,150 +52,142 @@ - scan the include statements and resource file references to replace the backslashes with forward slashes. .PP -- during the above step winemaker will also perform a case insensitive search +- during the above step \fBwinemaker\fR will also perform a case insensitive search of the referenced file in the include path and rewrite the include statement with the right case if necessary. .PP -- winemaker will also check other more exotic issues like '#pragma pack' -usage, use of "afxres.h" in non MFC projects, and more. Whenever it -encounters something out of the ordinary, winemaker will warn you about it. +- \fBwinemaker\fR will also check other more exotic issues like \fI#pragma pack\fR +usage, use of \fIafxres.h\fR in non MFC projects, and more. Whenever it +encounters something out of the ordinary, it will warn you about it. .PP -- winemaker can also scan a complete directory tree at once, guess what are +- \fBwinemaker\fR can also scan a complete directory tree at once, guess what are the executables and libraries you are trying to build, match them with -source files, and generate the corresponding Makefile. +source files, and generate the corresponding \fIMakefile\fR. .PP -- finally winemaker will generate a global Makefile for normal use. +- finally \fBwinemaker\fR will generate a global \fIMakefile\fR for normal use. .PP -- winemaker knows about MFC-based project and will generate customized files. +- \fBwinemaker\fR knows about MFC-based project and will generate customized files. .PP -- winemaker can read existing project files. It supports dsp, dsw, vcproj and sln files. +- \fBwinemaker\fR can read existing project files. It supports dsp, dsw, vcproj and sln files. .PP .SH OPTIONS .TP .B --nobanner -Disables the printing of the banner. +Disable the printing of the banner. .TP .B --backup -Directs winemaker to perform a backup of all the source files in which it -makes changes. This is the default. +Perform a backup of all the modified source files. This is the default. .TP .B --nobackup -Tells winemaker not to backup modified source files. +Do not backup modified source files. .TP .B --nosource-fix -Directs winemaker not to try fixing the source files (e.g. DOS to Unix +Do no try to fix the source files (e.g. DOS to Unix conversion). This prevents complaints if the files are readonly. .TP .B --lower-all -Tells winemaker to rename all files and directories to lowercase. +Rename all files and directories to lowercase. .TP .B --lower-uppercase -Tells winemaker to only rename files and directories that have an all -uppercase name. -So "HELLO.C" would be renamed but not "World.c". +Only rename files and directories that have an all uppercase name. +So \fIHELLO.C\fR would be renamed but not \fIWorld.c\fR. .TP .B --lower-none -Tells winemaker not to rename files and directories to lower case. Note +Do not rename files and directories to lower case. Note that this does not prevent the renaming of a file if its extension cannot be handled as is, e.g. ".Cxx". This is the default. .TP -.B "--lower-include " -Tells winemaker that if it does not find the file corresponding to an -include statement (or other form of file reference for resource files), -then it should convert that filename to lowercase. This is the default. -.TP -.B "--nolower-include " -Tells winemaker not to modify the include statement if it cannot find the -referenced file. +.B --lower-include +When the file corresponding to an include statement (or other form of file reference +for resource files) cannot be found, convert that filename to lowercase. This is the default. +.TP +.B --nolower-include +Do not modify the include statement if the referenced file cannot be found. .TP .BR "--guiexe " "| " "--windows" -Specifies that whenever winemaker finds an executable target, or a target of -unknown type, it should assume that it is a graphical application. -This is the default. +Assume a graphical application when an executable target or a target of +unknown type is found. This is the default. .TP .BR "--cuiexe " "| " "--console" -Specifies that whenever winemaker finds an executable target, or a target of -unknown type, it should assume that it is a console application. +Assume a console application when an executable target or a target of +unknown type is found. .TP .B --dll -This option tells winemaker that whenever it finds a target of unknown type, -i.e. for which it does not know whether it is an executable, a dll, or a static library, -it should assume it is a dll. +Assume a dll when a target of unknown type is found, i.e. when \fBwinemaker\fR is unable to +determine whether it is an executable, a dll, or a static library, .TP .B --lib -This option tells winemaker that whenever it finds a target of unknown type, -i.e. for which it does not know whether it is an executable, a dll, or a static library, -it should assume it is a static library. +Assume a static library when a target of unknown type is found, i.e. when \fBwinemaker\fR is +unable to determine whether it is an executable, a dll, or a static library, .TP .B --mfc -Specifies that the targets are MFC based. In such a case winemaker adapts +Specify that the targets are MFC based. In such a case \fBwinemaker\fR adapts the include and library paths accordingly, and links the target with the MFC library. .TP .B --nomfc -Specifies that targets are not MFC-based. This option disables use of MFC libraries -even if winemaker encounters files "stdafx.cpp" or "stdafx.h" that would cause it +Specify that targets are not MFC-based. This option disables use of MFC libraries +even if \fBwinemaker\fR encounters files \fIstdafx.cpp\fR or \fIstdafx.h\fR that would cause it to enable MFC automatically if neither \fB--nomfc\fR nor \fB--mfc\fR was specified. .TP -.BI -D macro "\fR[=\fIdefn\fR]" -Adds the specified macro definition to the global list of macro definitions. +.BI -D macro "\fR[\fB=\fIdefn\fR]" +Add the specified macro definition to the global list of macro definitions. .TP .BI -I dir -Appends the specified directory to the global include path. +Append the specified directory to the global include path. .TP .BI -P dir -Appends the specified directory to the global dll path. +Append the specified directory to the global dll path. .TP .BI -i dll -Adds the Winelib library to the global list of Winelib libraries to import. +Add the Winelib library to the global list of Winelib libraries to import. .TP .BI -L dir -Appends the specified directory to the global library path. +Append the specified directory to the global library path. .TP .BI -l library -Adds the specified library to the global list of libraries to link with. +Add the specified library to the global list of libraries to link with. .TP .B --nodlls -This option tells winemaker not to use the standard set of winelib libraries -for imports. That is, any DLL your code uses must be explicitly passed to -winemaker with \fB-i\fR options. -The standard set of libraries is: odbc32.dll, odbccp32.dll, ole32.dll, -oleaut32.dll and winspool.drv. +Do not use the standard set of Winelib libraries for imports. +That is, any DLL your code uses must be explicitly passed with \fB-i\fR options. +The standard set of libraries is: \fIodbc32.dll\fR, \fIodbccp32.dll\fR, \fIole32.dll\fR, +\fIoleaut32.dll\fR and \fIwinspool.drv\fR. .TP .B --nomsvcrt -Sets some options to tell winegcc not to compile against msvcrt. -Use this option if you have cpp-files that include . +Set some options to tell \fBwinegcc\fR not to compile against msvcrt. +Use this option if you have cpp-files that include \fI\fR. .TP .B --interactive -Puts winemaker in interactive mode. In this mode winemaker will ask you to -confirm each directory's list of targets, and then to provide directory and +Use interactive mode. In this mode \fBwinemaker\fR will ask you to +confirm the list of targets for each directory, and then to provide directory and target specific options. .TP .BI --single-target " name" -Specifies that there is only one target, called \fIname\fR. +Specify that there is only one target, called \fIname\fR. .TP .B --generated-files -Tells winemaker to generate the Makefile. This is the default. +Generate the \fIMakefile\fR. This is the default. .TP .B --nogenerated-files -Tells winemaker not to generate the Makefile. +Do not generate the \fIMakefile\fR. .TP .B --wine32 -Tells winemaker to generate a 32-bit target. This is useful on wow64 systems. +Generate a 32-bit target. This is useful on wow64 systems. Without that option the default architecture is used. .SH EXAMPLES .PP -Here is a typical winemaker use: +Here is a typical \fBwinemaker\fR use: .PP $ winemaker --lower-uppercase -DSTRICT . .PP -The above tells winemaker to scan the current directory and its +The above tells \fBwinemaker\fR to scan the current directory and its subdirectories for source files. Whenever if finds a file or directory which name is all uppercase, it should rename it to lowercase. It should then fix -all these source files for compilation with Winelib and generate Makefiles. -The '-DSTRICT' specifies that the STRICT macro must be set when compiling -these sources. Finally winemaker will create a Makefile. +all these source files for compilation with Winelib and generate \fIMakefile\fRs. +The \fB-DSTRICT\fR specifies that the \fBSTRICT\fR macro must be set when compiling +these sources. Finally a \fIMakefile\fR will be created. .PP The next step would be: .PP @@ -219,19 +211,19 @@ .PP .SH TODO / BUGS -In some cases you will have to edit the Makefile or source files by yourself. +In some cases you will have to edit the \fIMakefile\fR or source files manually. .PP Assuming that the windows executable/library is available, we could -use winedump to determine what kind of executable it is (graphical +use \fBwinedump\fR to determine what kind of executable it is (graphical or console), which libraries it is linked with, and which functions it exports (for libraries). We could then restore all these settings for the corresponding Winelib target. .PP -Furthermore winemaker is not very good at finding the library containing the +Furthermore \fBwinemaker\fR is not very good at finding the library containing the executable: it must either be in the current directory or in the -.IR LD_LIBRARY_PATH . +.BR LD_LIBRARY_PATH . .PP -Winemaker does not support message files and the message compiler yet. +\fBwinemaker\fR does not support message files and the message compiler yet. .PP Bugs can be reported on the .UR http://bugs.winehq.org diff -Nru wine1.6-1.7.1-actually1.6/tools/wmc/po.c wine1.6-1.6.1/tools/wmc/po.c --- wine1.6-1.7.1-actually1.6/tools/wmc/po.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/tools/wmc/po.c 2013-11-15 19:30:24.000000000 +0000 @@ -19,6 +19,7 @@ */ #include "config.h" +#include "wine/port.h" #include #include @@ -36,7 +37,17 @@ #include "write.h" #include "windef.h" -#ifdef HAVE_LIBGETTEXTPO +struct mo_file +{ + unsigned int magic; + unsigned int revision; + unsigned int count; + unsigned int msgid_off; + unsigned int msgstr_off; + /* ... rest of file data here */ +}; + +static lan_blk_t *new_top, *new_tail; static const struct { @@ -272,44 +283,11 @@ #endif }; -static void po_xerror( int severity, po_message_t message, - const char *filename, size_t lineno, size_t column, - int multiline_p, const char *message_text ) -{ - fprintf( stderr, "%s:%u:%u: %s\n", - filename, (unsigned int)lineno, (unsigned int)column, message_text ); - if (severity) exit(1); -} - -static void po_xerror2( int severity, po_message_t message1, - const char *filename1, size_t lineno1, size_t column1, - int multiline_p1, const char *message_text1, - po_message_t message2, - const char *filename2, size_t lineno2, size_t column2, - int multiline_p2, const char *message_text2 ) -{ - fprintf( stderr, "%s:%u:%u: %s\n", - filename1, (unsigned int)lineno1, (unsigned int)column1, message_text1 ); - fprintf( stderr, "%s:%u:%u: %s\n", - filename2, (unsigned int)lineno2, (unsigned int)column2, message_text2 ); - if (severity) exit(1); -} - -static const struct po_xerror_handler po_xerror_handler = { po_xerror, po_xerror2 }; - static int is_english( int lan ) { return lan == MAKELANGID( LANG_ENGLISH, SUBLANG_DEFAULT ); } -static char *convert_string_utf8( const lanmsg_t *msg ) -{ - char *buffer = xmalloc( msg->len * 4 + 1 ); - int len = wine_utf8_wcstombs( 0, msg->msg, msg->len, buffer, msg->len * 4 ); - buffer[len] = 0; - return buffer; -} - static char *convert_msgid_ascii( const lanmsg_t *msg, int error_on_invalid_char ) { int i; @@ -346,6 +324,16 @@ return context; } +#ifdef HAVE_LIBGETTEXTPO + +static char *convert_string_utf8( const lanmsg_t *msg ) +{ + char *buffer = xmalloc( msg->len * 4 + 1 ); + int len = wine_utf8_wcstombs( 0, msg->msg, msg->len, buffer, msg->len * 4 ); + buffer[len] = 0; + return buffer; +} + static po_message_t find_message( po_file_t po, const char *msgid, const char *msgctxt, po_message_iterator_t *iterator ) { @@ -363,6 +351,31 @@ return msg; } +static void po_xerror( int severity, po_message_t message, + const char *filename, size_t lineno, size_t column, + int multiline_p, const char *message_text ) +{ + fprintf( stderr, "%s:%u:%u: %s\n", + filename, (unsigned int)lineno, (unsigned int)column, message_text ); + if (severity) exit(1); +} + +static void po_xerror2( int severity, po_message_t message1, + const char *filename1, size_t lineno1, size_t column1, + int multiline_p1, const char *message_text1, + po_message_t message2, + const char *filename2, size_t lineno2, size_t column2, + int multiline_p2, const char *message_text2 ) +{ + fprintf( stderr, "%s:%u:%u: %s\n", + filename1, (unsigned int)lineno1, (unsigned int)column1, message_text1 ); + fprintf( stderr, "%s:%u:%u: %s\n", + filename2, (unsigned int)lineno2, (unsigned int)column2, message_text2 ); + if (severity) exit(1); +} + +static const struct po_xerror_handler po_xerror_handler = { po_xerror, po_xerror2 }; + static void add_po_string( po_file_t po, const lanmsg_t *msgid, const lanmsg_t *msgstr ) { po_message_t msg; @@ -437,12 +450,120 @@ po_file_free( po ); } -static lan_blk_t *new_top, *new_tail; -static lanmsg_t *translate_string( po_file_t po, lanmsg_t *str, int lang, int *found ) +#else /* HAVE_LIBGETTEXTPO */ + +void write_pot_file( const char *outname ) +{ + error( "PO files not supported in this wmc build\n" ); +} + +#endif + +static struct mo_file *mo_file; + +static void byteswap( unsigned int *data, unsigned int count ) +{ + unsigned int i; + + for (i = 0; i < count; i++) + data[i] = data[i] >> 24 | (data[i] >> 8 & 0xff00) | (data[i] << 8 & 0xff0000) | data[i] << 24; +} + +static void load_mo_file( const char *name ) +{ + struct stat st; + int res, fd; + + fd = open( name, O_RDONLY | O_BINARY ); + if (fd == -1) fatal_perror( "Failed to open %s", name ); + fstat( fd, &st ); + mo_file = xmalloc( st.st_size ); + res = read( fd, mo_file, st.st_size ); + if (res == -1) fatal_perror( "Failed to read %s", name ); + else if (res != st.st_size) error( "Failed to read %s\n", name ); + close( fd ); + + /* sanity checks */ + + if (st.st_size < sizeof(*mo_file)) + error( "%s is not a valid .mo file\n", name ); + if (mo_file->magic == 0xde120495) + byteswap( &mo_file->revision, 4 ); + else if (mo_file->magic != 0x950412de) + error( "%s is not a valid .mo file\n", name ); + if ((mo_file->revision >> 16) > 1) + error( "%s: unsupported file version %x\n", name, mo_file->revision ); + if (mo_file->msgid_off >= st.st_size || + mo_file->msgstr_off >= st.st_size || + st.st_size < sizeof(*mo_file) + 2 * 8 * mo_file->count) + error( "%s: corrupted file\n", name ); + + if (mo_file->magic == 0xde120495) + { + byteswap( (unsigned int *)((char *)mo_file + mo_file->msgid_off), 2 * mo_file->count ); + byteswap( (unsigned int *)((char *)mo_file + mo_file->msgstr_off), 2 * mo_file->count ); + } +} + +static void free_mo_file(void) +{ + free( mo_file ); + mo_file = NULL; +} + +static inline const char *get_mo_msgid( int index ) +{ + const char *base = (const char *)mo_file; + const unsigned int *offsets = (const unsigned int *)(base + mo_file->msgid_off); + return base + offsets[2 * index + 1]; +} + +static inline const char *get_mo_msgstr( int index ) +{ + const char *base = (const char *)mo_file; + const unsigned int *offsets = (const unsigned int *)(base + mo_file->msgstr_off); + return base + offsets[2 * index + 1]; +} + +static const char *get_msgstr( const char *msgid, const char *context, int *found ) +{ + int pos, res, min, max; + const char *ret = msgid; + char *id = NULL; + + if (!mo_file) /* strings containing a context still need to be transformed */ + { + if (context) (*found)++; + return ret; + } + + if (context) id = strmake( "%s%c%s", context, 4, msgid ); + min = 0; + max = mo_file->count - 1; + while (min <= max) + { + pos = (min + max) / 2; + res = strcmp( get_mo_msgid(pos), id ? id : msgid ); + if (!res) + { + const char *str = get_mo_msgstr( pos ); + if (str[0]) /* ignore empty strings */ + { + ret = str; + (*found)++; + } + break; + } + if (res > 0) max = pos - 1; + else min = pos + 1; + } + free( id ); + return ret; +} + +static lanmsg_t *translate_string( lanmsg_t *str, int lang, int *found ) { - po_message_t msg; - po_message_iterator_t iterator; lanmsg_t *new; const char *transl; int res; @@ -452,16 +573,7 @@ msgid = buffer; context = get_message_context( &msgid ); - msg = find_message( po, msgid, context, &iterator ); - po_message_iterator_free( iterator ); - - if (msg && !po_message_is_fuzzy( msg )) - { - transl = po_message_msgstr( msg ); - if (!transl[0]) transl = msgid; /* ignore empty strings */ - else (*found)++; - } - else transl = msgid; + transl = get_msgstr( msgid, context, found ); new = xmalloc( sizeof(*new) ); new->lan = lang; @@ -477,7 +589,7 @@ return new; } -static void translate_block( po_file_t po, block_t *blk, block_t *new, int lang, int *found ) +static void translate_block( block_t *blk, block_t *new, int lang, int *found ) { int i; @@ -488,12 +600,12 @@ new->nmsg = blk->nmsg; for (i = 0; i < blk->nmsg; i++) { - new->msgs[i] = translate_string( po, blk->msgs[i], lang, found ); + new->msgs[i] = translate_string( blk->msgs[i], lang, found ); new->size += ((2 * new->msgs[i]->len + 3) & ~3) + 4; } } -static void translate_messages( po_file_t po, int lang ) +static void translate_messages( int lang ) { int i, found; lan_blk_t *lbp, *new; @@ -510,7 +622,7 @@ new->nblk = lbp->nblk; for (i = 0; i < lbp->nblk; i++) - translate_block( po, &lbp->blks[i], &new->blks[i], lang, &found ); + translate_block( &lbp->blks[i], &new->blks[i], lang, &found ); if (found) { if (new_tail) new_tail->next = new; @@ -529,7 +641,6 @@ void add_translations( const char *po_dir ) { lan_blk_t *lbp; - po_file_t po; char buffer[256]; char *p, *tok, *name; unsigned int i; @@ -539,6 +650,12 @@ for (lbp = lanblockhead; lbp; lbp = lbp->next) if (is_english( lbp->lan )) break; if (!lbp) return; + if (!po_dir) /* run through the translation process to remove msg contexts */ + { + translate_messages( MAKELANGID( LANG_ENGLISH, SUBLANG_DEFAULT )); + goto done; + } + new_top = new_tail = NULL; name = strmake( "%s/LINGUAS", po_dir ); @@ -555,16 +672,16 @@ if (i == sizeof(languages)/sizeof(languages[0])) error( "unknown language '%s'\n", tok ); - name = strmake( "%s/%s.po", po_dir, tok ); - if (!(po = po_file_read( name, &po_xerror_handler ))) - error( "cannot load po file for language '%s'\n", tok ); - translate_messages( po, MAKELANGID(languages[i].id, languages[i].sub) ); - po_file_free( po ); + name = strmake( "%s/%s.mo", po_dir, tok ); + load_mo_file( name ); + translate_messages( MAKELANGID(languages[i].id, languages[i].sub) ); + free_mo_file(); free( name ); } } fclose( f ); +done: /* prepend the translated messages to the global list */ if (new_tail) { @@ -573,16 +690,3 @@ lanblockhead = new_top; } } - -#else /* HAVE_LIBGETTEXTPO */ - -void write_pot_file( const char *outname ) -{ - error( "PO files not supported in this wmc build\n" ); -} - -void add_translations( const char *po_dir ) -{ -} - -#endif diff -Nru wine1.6-1.7.1-actually1.6/tools/wmc/utils.c wine1.6-1.6.1/tools/wmc/utils.c --- wine1.6-1.7.1-actually1.6/tools/wmc/utils.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/tools/wmc/utils.c 2013-11-15 19:30:24.000000000 +0000 @@ -88,6 +88,17 @@ exit(3); } +void fatal_perror( const char *msg, ... ) +{ + va_list valist; + va_start( valist, msg ); + fprintf(stderr, "Error: "); + vfprintf( stderr, msg, valist ); + perror( " " ); + va_end( valist ); + exit(2); +} + void error(const char *s, ...) { va_list ap; diff -Nru wine1.6-1.7.1-actually1.6/tools/wmc/utils.h wine1.6-1.6.1/tools/wmc/utils.h --- wine1.6-1.7.1-actually1.6/tools/wmc/utils.h 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/tools/wmc/utils.h 2013-11-15 19:30:24.000000000 +0000 @@ -38,6 +38,7 @@ int xyyerror(const char *s, ...) __attribute__((format (printf, 1, 2))); int mcy_warning(const char *s, ...) __attribute__((format (printf, 1, 2))); void internal_error(const char *file, int line, const char *s, ...) __attribute__((format (printf, 3, 4))); +void fatal_perror( const char *msg, ... ) __attribute__((format (printf, 1, 2), noreturn)); void error(const char *s, ...) __attribute__((format (printf, 1, 2))); void warning(const char *s, ...) __attribute__((format (printf, 1, 2))); diff -Nru wine1.6-1.7.1-actually1.6/tools/wmc/wmc.c wine1.6-1.6.1/tools/wmc/wmc.c --- wine1.6-1.7.1-actually1.6/tools/wmc/wmc.c 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/tools/wmc/wmc.c 2013-11-15 19:30:24.000000000 +0000 @@ -25,6 +25,9 @@ #include #include #include +#ifdef HAVE_GETOPT_H +# include +#endif #include "wmc.h" #include "utils.h" @@ -33,28 +36,28 @@ static const char usage[] = "Usage: wmc [options...] [inputfile.mc]\n" - " -B x Set output byte-order x={n[ative], l[ittle], b[ig]}\n" - " (default is n[ative] which equals " + " -B x Set output byte-order x={n[ative], l[ittle], b[ig]}\n" + " (default is n[ative] which equals " #ifdef WORDS_BIGENDIAN "big" #else "little" #endif "-endian)\n" - " -c Set 'custom-bit' in values\n" - " -d Use decimal values in output\n" - " -D Set debug flag\n" - " -h This message\n" - " -H file Write headerfile to file (default is inputfile.h)\n" - " -i Inline messagetable(s)\n" - " -o file Output to file (default is inputfile.rc)\n" - " -O fmt Set output format (rc, res, pot)\n" - " -P dir Directory where to find po files\n" - " -u Inputfile is in unicode\n" - " -U Output unicode messagetable(s)\n" - " -v Show supported codepages and languages\n" - " -V Print version end exit\n" - " -W Enable pedantic warnings\n" + " -c Set 'custom-bit' in values\n" + " -d Use decimal values in output\n" + " -D Set debug flag\n" + " -h, --help Print this message\n" + " -H FILE Write header file to FILE (default is inputfile.h)\n" + " -i Inline messagetable(s)\n" + " -o, --output=FILE Output to FILE (default is infile.rc)\n" + " -O, --output-format=FORMAT The output format (`rc', `res', or `pot')\n" + " -P, --po-dir=DIR Directory containing po files for translations\n" + " -u Input file is in unicode\n" + " -U Output unicode messagetable(s)\n" + " -v Show supported codepages and languages\n" + " -V, --version Print version end exit\n" + " -W, --pedantic Enable pedantic warnings\n" "Input is taken from stdin if no inputfile is specified.\n" "Byteorder of unicode input is based upon the first couple of\n" "bytes read, which should be 0x0000..0x00ff.\n" @@ -128,7 +131,17 @@ FORMAT_POT } output_format; -int getopt (int argc, char *const *argv, const char *optstring); +static const char short_options[] = "B:cdDhH:io:O:P:uUvVW"; +static const struct option long_options[] = +{ + { "help", 0, NULL, 'h' }, + { "output", 1, NULL, 'o' }, + { "output-format", 1, NULL, 'O' }, + { "pedantic", 0, NULL, 'W' }, + { "po-dir", 1, NULL, 'P' }, + { "version", 0, NULL, 'v' } +}; + static void segvhandler(int sig); static void cleanup_files(void) @@ -147,6 +160,7 @@ extern char* optarg; extern int optind; int optc; + int opti = 0; int lose = 0; int ret; int i; @@ -176,7 +190,7 @@ strcat(cmdline, " "); } - while((optc = getopt(argc, argv, "B:cdDhH:io:O:P:uUvVW")) != EOF) + while((optc = getopt_long(argc, argv, short_options, long_options, &opti)) != EOF) { switch(optc) { @@ -325,7 +339,7 @@ write_bin_files(); break; case FORMAT_RES: - if (po_dir) add_translations( po_dir ); + add_translations( po_dir ); write_res_file( output_name ); break; case FORMAT_POT: diff -Nru wine1.6-1.7.1-actually1.6/tools/wmc/wmc.man.in wine1.6-1.6.1/tools/wmc/wmc.man.in --- wine1.6-1.7.1-actually1.6/tools/wmc/wmc.man.in 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/tools/wmc/wmc.man.in 2013-11-15 19:30:24.000000000 +0000 @@ -34,8 +34,8 @@ .B \-D Set debug flag. This results is a parser trace and a lot of extra messages. .TP -.B \-h -Print an informative usage message. +.BR \-h ,\ \-\-help +Print an informative usage message and exits. .TP .BI \-H\ file Write headerfile to \fIfile\fR. Default is \fIinputfile.h\fR. @@ -45,14 +45,14 @@ and writes all output into the \fI.rc\fR file. This encoding is parsable with wrc(1). .TP -.BI \-o\ file +.BR \-o ,\ \-\-output =\fIfile Output to \fIfile\fR. Default is \fIinputfile.rc\fR. .TP -.BI \-O\ format +.BR \-O ,\ \-\-output\-format =\fIformat Set the output format. Supported formats are \fBrc\fR (the default), \fBres\fR, and \fBpot\fR. .TP -.BI \-P\ directory +.BR \-P ,\ \-\-po-dir =\fIdirectory Enable the generation of resource translations based on po files loaded from the specified directory. That directory must follow the gettext convention, in particular in must contain one \fI.po\fR file for @@ -67,10 +67,10 @@ .B \-v Show all supported codepages and languages. .TP -.B \-V +.BR \-V ,\ \-\-version Print version end exit. .TP -.B \-W +.BR \-W ,\ \-\-pedantic Enable pedantic warnings. .SH EXTENSIONS The original syntax is extended to support codepages more smoothly. Normally, diff -Nru wine1.6-1.7.1-actually1.6/tools/wrc/parser.y wine1.6-1.6.1/tools/wrc/parser.y --- wine1.6-1.7.1-actually1.6/tools/wrc/parser.y 2013-07-18 17:57:36.000000000 +0000 +++ wine1.6-1.6.1/tools/wrc/parser.y 2013-11-15 19:30:24.000000000 +0000 @@ -142,31 +142,6 @@ #include "wingdi.h" #include "winuser.h" -#if defined(YYBYACC) - /* Berkeley yacc (byacc) doesn't seem to know about these */ - /* Some *BSD supplied versions do define these though */ -# ifndef YYEMPTY -# define YYEMPTY (-1) /* Empty lookahead value of yychar */ -# endif -# ifndef YYLEX -# define YYLEX yylex() -# endif - -#elif defined(YYBISON) - /* Bison was used for original development */ - /* #define YYEMPTY -2 */ - /* #define YYLEX yylex() */ - -#else - /* No yacc we know yet */ -# if !defined(YYEMPTY) || !defined(YYLEX) -# error Yacc version/type unknown. This version needs to be verified for settings of YYEMPTY and YYLEX. -# elif defined(__GNUC__) /* gcc defines the #warning directive */ -# warning Yacc version/type unknown. It defines YYEMPTY and YYLEX, but is not tested - /* #else we just take a chance that it works... */ -# endif -#endif - int want_nl = 0; /* Signal flex that we need the next newline */ int want_id = 0; /* Signal flex that we need the next identifier */ static stringtable_t *tagstt; /* Stringtable tag. @@ -2837,7 +2812,7 @@ /* Get a token if we don't have one yet */ if(lookahead == YYEMPTY) - lookahead = YYLEX; + lookahead = yylex(); /* Only numbers are possibly interesting */ switch(lookahead)