Commit 54c2711f authored by Alexandre Julliard's avatar Alexandre Julliard

Release 980329

Sun Mar 29 15:18:57 1998 Uwe Bonnes <elektron.ikp.physik.tu-darmstadt.de> * [msdos/int21.c] More verbose Trace messages Sun Mar 29 15:03:30 1998 Alexandre Julliard <julliard@lrc.epfl.ch> * [loader/ne_image.c] Terminate relocation chains on 0 offset. Sun Mar 29 02:35:45 1998 James Juran <jrj120@psu.edu> * [windows/caret.c] [windows/class.c] [windows/clipboard.c] Fixed more USER32 ordinal numbers in function documentation. Sat Mar 28 22:40:23 1997 Andreas Mohr <100.30936@germany.net> * [controls/desktop.c] Return 1 for WM_NCCREATE in DesktopWndProc. * [controls/menu.c] Fixed crash when destroying a top popup win that was only created but not shown. * [ole/typelib.c] [if1632/typelib.spec] Implemented OABuildVersion. * [windows/win.c] Finally fixed ugly bug in GetParent32 that affected window placement: Didn't return 0 for windows that have neither WS_POPUP nor WS_CHILD set. Now it acts exactly like Windows (at least I hope so ;) Sat Mar 28 02:26:43 1998 Dimitrie O. Paun <dimi@mail.cs.toronto.edu> * [DEVELOPERS-HINTS] [documentation/debug-msgs] Updated documentation on debug messages * [include/button.h] [controls/button.c] [include/windows.h] [include/combo.h] [controls/combo.c] [controls/commctrl.c] [controls/icontitle.c] [controls/listbox.c] [controls/menu.c] [controls/scroll.c] [controls/widgets.c] Changed some 16-bit code to 32-bit code. I am positive this will not break anything. * [controls/uitools.c] Renamed the prefix of some functions from UITOOLS_ to UITOOLS95_ to reflect the fact that they implement Win95 look. Maybe we will have a UITOOLS31_ in the future. Anyhow, the change is completely internal to this file. * [*/*.c] Changed a lot of [f]printf into appropriate debug messages. Fri Mar 27 19:56:12 1998 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [documentation/status/] Added directdraw and directsound status. * [if1632/thunk.c][ole/*.c][win32/kernel32.c] Added some documentation. Moved FUNC004 to thunk.c since it seems to be a 16->32 thunk (calling conventions and the like still unknown). Fri Mar 27 09:59:32 1998 Morten Eriksen <mortene@pvv.org> * [loader/resource.c][windows/keyboard.c] Implemented CopyAcceleratorTable() and CreateAcceleratorTable(). * [include/compobj.h][ole/compobj.c][relay32/ole32.spec] Added implementation of StringFromGUID2(). Tue Mar 26 23:12:05 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de> * [misc/imagelist.c][relay32/comctl32.spec] Implemented new debugging interface. Added missing functions (some are empty stubs). Changed ordinals in comctl32.spec (now dll version 4.72 comatible). * [objects/oembitmaps.c][include/windows.h] [include/bitmaps/*] Added missing restore bitmaps for Win95 look. Added missing Win95 cursors. Thu Mar 26 10:18:20 1998 Douglas Ridgway <ridgway@winehq.com> * [programs/view/Makefile.in] [programs/view/view.c] Fix compilation, Aldus placeable metafile loading. * [graphics/metafiledrv/init.c] [relay32/gdi32.spec] [objects/metafile.c] Implemented various 32 bit versions of regular metafile API. * [objects/enhmetafile.c] Implemented rendering of a couple of dozen records. Tue Mar 24 20:06:39 1998 Matthew Becker <mbecker@glasscity.net> * [memory/*.c] Updated documentation for API manpages. Mon Mar 23 09:09:00 1998 Alex Korobka <alex@pharm.sunysb.edu> * [misc/winsock.c] Fixed 32-bit DNS lookup. Mon Mar 23 23:54:47 1998 Luiz Otavio L. Zorzella <zorzella@nr.conexware.com> * [multimedia/init.c] New code for the initialization and gathering of information about the MIDI devices, for future use. Thu Mar 19 00:59:29 1998 Jim Peterson <jspeter@nospam.birch.ee.vt.edu> * [windows/win.c] Eliminated inaccurate setting of cs->hMenu in WIN_CreateWindowEx, along with superfluous SetMenu32 call. Mon Mar 16 17:40:53 1998 Petter Reinholdtsen <pere@td.org.uit.no> * [debugger/dbg.y] [debugger/Makefile.in] [Makefile.in] Install wine.sym in $(exec_prefix)/lib and make sure the debugger finds it. Sun Mar 15 22:36:35 1998 Michael Veksler <mveksler@tx.technion.ac.il> * [dummy.c] [if1632/gdi.spec] Fixed stub declaration of GDI_532, so Hebrew-Word2 kind of works.
parent a69b88b2
This is release 980315 of Wine, the MS Windows emulator. This is still a
This is release 980329 of Wine, the MS Windows emulator. This is still a
developer's only release. There are many bugs and many unimplemented API
features. Most applications still do not work correctly.
Patches should be submitted to "julliard@lrc.epfl.ch". Please don't
forget to include a ChangeLog entry.
WHAT'S NEW with Wine-980315: (see ChangeLog for details)
- Preliminary ImageLists support.
- Beginnings of enhanced metafiles.
- More debugging macros changes.
WHAT'S NEW with Wine-980329: (see ChangeLog for details)
- More ImageLists support.
- More Win32 metafile support.
- Still some debugging output changes.
- Lots of bug fixes.
See the README file in the distribution for installation instructions.
......@@ -17,10 +17,10 @@ Because of lags created by using mirror, this message may reach you before
the release is available at the ftp sites. The sources will be available
from the following locations:
ftp://sunsite.unc.edu/pub/Linux/ALPHA/wine/development/Wine-980315.tar.gz
ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-980315.tar.gz
ftp://ftp.infomagic.com/pub/mirrors/linux/wine/development/Wine-980315.tar.gz
ftp://ftp.progsoc.uts.edu.au/pub/Wine/development/Wine-980315.tar.gz
ftp://sunsite.unc.edu/pub/Linux/ALPHA/wine/development/Wine-980329.tar.gz
ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-980329.tar.gz
ftp://ftp.infomagic.com/pub/mirrors/linux/wine/development/Wine-980329.tar.gz
ftp://ftp.progsoc.uts.edu.au/pub/Wine/development/Wine-980329.tar.gz
It should also be available from any site that mirrors tsx-11 or sunsite.
......
----------------------------------------------------------------------
Sun Mar 29 15:18:57 1998 Uwe Bonnes <elektron.ikp.physik.tu-darmstadt.de>
* [msdos/int21.c]
More verbose Trace messages
Sun Mar 29 15:03:30 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [loader/ne_image.c]
Terminate relocation chains on 0 offset.
Sun Mar 29 02:35:45 1998 James Juran <jrj120@psu.edu>
* [windows/caret.c] [windows/class.c] [windows/clipboard.c]
Fixed more USER32 ordinal numbers in function documentation.
Sat Mar 28 22:40:23 1997 Andreas Mohr <100.30936@germany.net>
* [controls/desktop.c]
Return 1 for WM_NCCREATE in DesktopWndProc.
* [controls/menu.c]
Fixed crash when destroying a top popup win that was only created
but not shown.
* [ole/typelib.c] [if1632/typelib.spec]
Implemented OABuildVersion.
* [windows/win.c]
Finally fixed ugly bug in GetParent32 that affected window placement:
Didn't return 0 for windows that have neither WS_POPUP nor
WS_CHILD set. Now it acts exactly like Windows (at least I hope so ;)
Sat Mar 28 02:26:43 1998 Dimitrie O. Paun <dimi@mail.cs.toronto.edu>
* [DEVELOPERS-HINTS] [documentation/debug-msgs]
Updated documentation on debug messages
* [include/button.h] [controls/button.c] [include/windows.h]
[include/combo.h] [controls/combo.c] [controls/commctrl.c]
[controls/icontitle.c] [controls/listbox.c] [controls/menu.c]
[controls/scroll.c] [controls/widgets.c]
Changed some 16-bit code to 32-bit code. I am positive this will
not break anything.
* [controls/uitools.c]
Renamed the prefix of some functions from UITOOLS_ to UITOOLS95_
to reflect the fact that they implement Win95 look. Maybe we will
have a UITOOLS31_ in the future. Anyhow, the change is completely
internal to this file.
* [*/*.c]
Changed a lot of [f]printf into appropriate debug messages.
Fri Mar 27 19:56:12 1998 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [documentation/status/]
Added directdraw and directsound status.
* [if1632/thunk.c][ole/*.c][win32/kernel32.c]
Added some documentation.
Moved FUNC004 to thunk.c since it seems to be a 16->32 thunk
(calling conventions and the like still unknown).
Fri Mar 27 09:59:32 1998 Morten Eriksen <mortene@pvv.org>
* [loader/resource.c][windows/keyboard.c]
Implemented CopyAcceleratorTable() and CreateAcceleratorTable().
* [include/compobj.h][ole/compobj.c][relay32/ole32.spec]
Added implementation of StringFromGUID2().
Tue Mar 26 23:12:05 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
* [misc/imagelist.c][relay32/comctl32.spec]
Implemented new debugging interface.
Added missing functions (some are empty stubs).
Changed ordinals in comctl32.spec (now dll version 4.72 comatible).
* [objects/oembitmaps.c][include/windows.h]
[include/bitmaps/*]
Added missing restore bitmaps for Win95 look.
Added missing Win95 cursors.
Thu Mar 26 10:18:20 1998 Douglas Ridgway <ridgway@winehq.com>
* [programs/view/Makefile.in] [programs/view/view.c]
Fix compilation, Aldus placeable metafile loading.
* [graphics/metafiledrv/init.c] [relay32/gdi32.spec]
[objects/metafile.c]
Implemented various 32 bit versions of regular metafile API.
* [objects/enhmetafile.c]
Implemented rendering of a couple of dozen records.
Tue Mar 24 20:06:39 1998 Matthew Becker <mbecker@glasscity.net>
* [memory/*.c]
Updated documentation for API manpages.
Mon Mar 23 09:09:00 1998 Alex Korobka <alex@pharm.sunysb.edu>
* [misc/winsock.c]
Fixed 32-bit DNS lookup.
Mon Mar 23 23:54:47 1998 Luiz Otavio L. Zorzella <zorzella@nr.conexware.com>
* [multimedia/init.c]
New code for the initialization and gathering of information about
the MIDI devices, for future use.
Thu Mar 19 00:59:29 1998 Jim Peterson <jspeter@nospam.birch.ee.vt.edu>
* [windows/win.c]
Eliminated inaccurate setting of cs->hMenu in
WIN_CreateWindowEx, along with superfluous SetMenu32 call.
Mon Mar 16 17:40:53 1998 Petter Reinholdtsen <pere@td.org.uit.no>
* [debugger/dbg.y] [debugger/Makefile.in] [Makefile.in]
Install wine.sym in $(exec_prefix)/lib and make sure the debugger
finds it.
Sun Mar 15 22:36:35 1998 Michael Veksler <mveksler@tx.technion.ac.il>
* [dummy.c] [if1632/gdi.spec]
Fixed stub declaration of GDI_532, so Hebrew-Word2 kind of works.
----------------------------------------------------------------------
Sun Mar 15 03:46:50 1998 Dimitrie O. Paun <dimi@mail.cs.toronto.edu>
* [*/*]
......
......@@ -198,47 +198,41 @@ DEBUG MESSAGES
To display a message only during debugging, you normally write something
like this:
#ifdef DEBUG_WIN
printf("abc...");
#endif
You can write this shorter (and better) in this way:
dprintf_win(stddeb,"abc...");
All symbols of the form dprintf_xxxx are macros defined in include/debug.h .
The macro-definitions are generated by the shell-script tools/make_debug. It
scans the source code for symbols of this forms and puts the necessary
macro definitions in include/debug.h and include/stddebug.h . These macros
test for the symbol DEBUG_XXXX (e.g. dprintf_win refers to DEBUG_WIN) being
defined and thus decided whether to actually display the text. If you want
to enable specific types of messages, simply put the corresponding
#define DEBUG_XXXX in include/stddebug.h . If you want to enable or disable
a specific type of message in just one c-source-file, put the corresponding
#define DEBUG_XXXX or #undefine DEBUG_XXXX between #include<stddebug.h> and
#include <debug.h> in that specific file. In addition you can change the
types of displayed messages by supplying the "-debugmsg" option to Wine.
If your debugging code is more complex than just printf, you can use the
symbols debugging_XXX as well. These are true when XXX is enabled, either
permanent or in the command line. So instead of writing
#ifdef DEBUG_WIN
DumpSomeStructure(&str);
#endif
write
if(debugging_win)DumpSomeStructure(&str);
TRACE(win,"abc..."); or
FIXME(win,"abc..."); or
WARN(win,"abc..."); or
ERR(win,"abc...");
depending on the seriousness of the problem. (documentation/degug-msgs
explains when it is appropriate to use each of them)
These macros are defined in include/debug.h. The macro-definitions are
generated by the shell-script tools/make_debug. It scans the source
code for symbols of this forms and puts the necessary macro
definitions in include/debug.h and include/debugdefs.h. These macros
test whether the debugging "channel" associated with the first
argument of these macros (win in the above example) is enabled and
thus decide whether to actually display the text. In addition you can
change the types of displayed messages by supplying the "-debugmsg"
option to Wine. If your debugging code is more complex than just
printf, you can use the symbols TRACE_ON(xxx), WARN_ON(xxx),
ERR_ON(xxx) and FIXME_ON(xxx) as well. These are true when channel xxx
is enabled, either permanent or in the command line. Thus, you can
write:
if(TRACE_ON(win))DumpSomeStructure(&str);
Don't worry about the inefficiency of the test. If it is permanently
disabled (thus debugging_win is 0 at compile time), the compiler will
disabled (that is TRACE_ON(win) is 0 at compile time), the compiler will
eliminate the dead code.
The file handle "stddeb" is intended for displaying standard informational
messages, whereas "stdnimp" is intended for displaying messages concerning
not yet implemented functions.
You have to start tools/make_debug only if you introduced a new macro,
e.g. dprintf_win32s - not if you just changed one of the #define
DEBUG_XXX's in include/stddebug.h or in a specific file.
e.g. TRACE(win32).
For more info about debugging messages, read:
documentation/debug-msgs
MORE INFO
=========
......
......@@ -121,6 +121,7 @@ libwine.so.1.0: $(LIBOBJS)
install_emu: install_lib
$(INSTALL_PROGRAM) wine $(bindir)/wine
$(INSTALL_DATA) wine.sym $(libdir)/wine.sym
install_lib: install_includes
$(INSTALL_DATA) $(LIB_TARGET) $(libdir)
......
This file contains information about the current release of Wine.
If you are new to Wine, read the files ANNOUNCE and README and the FAQ
list first.
If you want to contribute code to Wine, read the DEVELOPER-HINTS. The
primary source of information to developers is the ChangeLog (next to
the source, of course).
1. BAR.EXE used to work, but does not work anymore
Look at the ChangeLog to see what files have been changed. Try to undo
the particular patch and go partially back to the previous version. If
you have any suspicions, report them to the author or to the newsgroup.
......@@ -64,7 +64,7 @@ static const pfPaint btnPaintFunc[MAX_BTN_TYPE] =
SendMessage32A( GetParent32((wndPtr)->hwndSelf), WM_CTLCOLORBTN, \
(hdc), (wndPtr)->hwndSelf )
static HBITMAP16 hbitmapCheckBoxes = 0;
static HBITMAP32 hbitmapCheckBoxes = 0;
static WORD checkBoxWidth = 0, checkBoxHeight = 0;
......@@ -74,7 +74,8 @@ static WORD checkBoxWidth = 0, checkBoxHeight = 0;
LRESULT WINAPI ButtonWndProc( HWND32 hWnd, UINT32 uMsg,
WPARAM32 wParam, LPARAM lParam )
{
RECT16 rect;
RECT32 rect;
POINT32 pt = { LOWORD(lParam), HIWORD(lParam) };
WND *wndPtr = WIN_FindWndPtr(hWnd);
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
LONG style = wndPtr->dwStyle & 0x0f;
......@@ -98,9 +99,9 @@ LRESULT WINAPI ButtonWndProc( HWND32 hWnd, UINT32 uMsg,
case WM_CREATE:
if (!hbitmapCheckBoxes)
{
BITMAP16 bmp;
hbitmapCheckBoxes = LoadBitmap16(0, MAKEINTRESOURCE(OBM_CHECKBOXES));
GetObject16( hbitmapCheckBoxes, sizeof(bmp), &bmp );
BITMAP32 bmp;
hbitmapCheckBoxes = LoadBitmap32A(0, MAKEINTRESOURCE(OBM_CHECKBOXES));
GetObject32A( hbitmapCheckBoxes, sizeof(bmp), &bmp );
checkBoxWidth = bmp.bmWidth / 4;
checkBoxHeight = bmp.bmHeight / 3;
}
......@@ -133,8 +134,8 @@ LRESULT WINAPI ButtonWndProc( HWND32 hWnd, UINT32 uMsg,
ReleaseCapture();
if (!(infoPtr->state & BUTTON_HIGHLIGHTED)) break;
SendMessage32A( hWnd, BM_SETSTATE32, FALSE, 0 );
GetClientRect16( hWnd, &rect );
if (PtInRect16( &rect, MAKEPOINT16(lParam) ))
GetClientRect32( hWnd, &rect );
if (PtInRect32( &rect, pt ))
{
switch(style)
{
......@@ -159,9 +160,8 @@ LRESULT WINAPI ButtonWndProc( HWND32 hWnd, UINT32 uMsg,
case WM_MOUSEMOVE:
if (GetCapture32() == hWnd)
{
GetClientRect16( hWnd, &rect );
SendMessage32A( hWnd, BM_SETSTATE32,
PtInRect16( &rect,MAKEPOINT16(lParam) ), 0 );
GetClientRect32( hWnd, &rect );
SendMessage32A( hWnd, BM_SETSTATE32, PtInRect32(&rect, pt), 0 );
}
break;
......@@ -170,7 +170,7 @@ LRESULT WINAPI ButtonWndProc( HWND32 hWnd, UINT32 uMsg,
return DefWindowProc32A( hWnd, uMsg, wParam, lParam );
case WM_SETTEXT:
DEFWND_SetText( wndPtr, (LPSTR)lParam );
DEFWND_SetText( wndPtr, (LPCSTR)lParam );
if( wndPtr->dwStyle & WS_VISIBLE )
PAINT_BUTTON( wndPtr, style, ODA_DRAWENTIRE );
return 0;
......@@ -192,7 +192,7 @@ LRESULT WINAPI ButtonWndProc( HWND32 hWnd, UINT32 uMsg,
case WM_KILLFOCUS:
infoPtr->state &= ~BUTTON_HASFOCUS;
PAINT_BUTTON( wndPtr, style, ODA_FOCUS );
InvalidateRect16( hWnd, NULL, TRUE );
InvalidateRect32( hWnd, NULL, TRUE );
break;
case WM_SYSCOLORCHANGE:
......@@ -299,8 +299,8 @@ static void PB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
/* draw button label, if any: */
if (wndPtr->text && wndPtr->text[0])
{
LOGBRUSH16 lb;
GetObject16( GetSysColorBrush32(COLOR_BTNFACE), sizeof(lb), &lb );
LOGBRUSH32 lb;
GetObject32A( GetSysColorBrush32(COLOR_BTNFACE), sizeof(lb), &lb );
if (wndPtr->dwStyle & WS_DISABLED &&
GetSysColor32(COLOR_GRAYTEXT)==lb.lbColor)
/* don't write gray text on gray bkg */
......@@ -346,7 +346,7 @@ void PB_PaintGrayOnGray(HDC32 hDC,HFONT32 hFont,RECT32 *rc,char *text)
HBITMAP32 hbm = CreateBitmap32( 8, 8, 1, 1, Pattern );
HDC32 hdcMem = CreateCompatibleDC32(hDC);
HBITMAP32 hbmMem;
HBRUSH16 hBr;
HBRUSH32 hBr;
RECT32 rect,rc2;
rect=*rc;
......@@ -375,13 +375,13 @@ void PB_PaintGrayOnGray(HDC32 hDC,HFONT32 hFont,RECT32 *rc,char *text)
static void CB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
{
RECT16 rbox, rtext, client;
HBRUSH16 hBrush;
RECT32 rbox, rtext, client;
HBRUSH32 hBrush;
int textlen, delta;
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
textlen = 0;
GetClientRect16(wndPtr->hwndSelf, &client);
GetClientRect32(wndPtr->hwndSelf, &client);
rbox = rtext = client;
if (infoPtr->hFont) SelectObject32( hDC, infoPtr->hFont );
......@@ -415,8 +415,8 @@ static void CB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
int x = 0, y = 0;
delta = (rbox.bottom - rbox.top - checkBoxHeight) >> 1;
if (action == ODA_SELECT) FillRect16( hDC, &rbox, hBrush );
else FillRect16( hDC, &client, hBrush );
if (action == ODA_SELECT) FillRect32( hDC, &rbox, hBrush );
else FillRect32( hDC, &client, hBrush );
if (infoPtr->state & BUTTON_HIGHLIGHTED) x += 2 * checkBoxWidth;
if (infoPtr->state & (BUTTON_CHECKED | BUTTON_3STATE)) x += checkBoxWidth;
......@@ -430,8 +430,8 @@ static void CB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
{
if (wndPtr->dwStyle & WS_DISABLED)
SetTextColor32( hDC, GetSysColor32(COLOR_GRAYTEXT) );
DrawText16( hDC, wndPtr->text, textlen, &rtext,
DT_SINGLELINE | DT_VCENTER );
DrawText32A( hDC, wndPtr->text, textlen, &rtext,
DT_SINGLELINE | DT_VCENTER );
textlen = 0; /* skip DrawText() below */
}
}
......@@ -441,17 +441,17 @@ static void CB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
{
/* again, this is what CTL3D expects */
SetRectEmpty16(&rbox);
SetRectEmpty32(&rbox);
if( textlen )
DrawText16( hDC, wndPtr->text, textlen, &rbox,
DT_SINGLELINE | DT_CALCRECT );
DrawText32A( hDC, wndPtr->text, textlen, &rbox,
DT_SINGLELINE | DT_CALCRECT );
textlen = rbox.bottom - rbox.top;
delta = ((rtext.bottom - rtext.top) - textlen)/2;
rbox.bottom = (rbox.top = rtext.top + delta - 1) + textlen + 2;
textlen = rbox.right - rbox.left;
rbox.right = (rbox.left += --rtext.left) + textlen + 2;
IntersectRect16(&rbox, &rbox, &rtext);
DrawFocusRect16( hDC, &rbox );
IntersectRect32(&rbox, &rbox, &rtext);
DrawFocusRect32( hDC, &rbox );
}
}
......@@ -485,14 +485,14 @@ static void BUTTON_CheckAutoRadioButton( WND *wndPtr )
static void GB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
{
RECT16 rc;
RECT32 rc;
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
if (action != ODA_DRAWENTIRE) return;
BUTTON_SEND_CTLCOLOR( wndPtr, hDC );
GetClientRect16( wndPtr->hwndSelf, &rc);
GetClientRect32( wndPtr->hwndSelf, &rc);
GRAPH_DrawRectangle( hDC, rc.left, rc.top + 2, rc.right - 1, rc.bottom - 1,
GetSysColorPen32(COLOR_WINDOWFRAME) );
if (wndPtr->text)
......@@ -501,7 +501,7 @@ static void GB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
if (wndPtr->dwStyle & WS_DISABLED)
SetTextColor32( hDC, GetSysColor32(COLOR_GRAYTEXT) );
rc.left += 10;
DrawText16( hDC, wndPtr->text, -1, &rc, DT_SINGLELINE | DT_NOCLIP );
DrawText32A( hDC, wndPtr->text, -1, &rc, DT_SINGLELINE | DT_NOCLIP );
}
}
......@@ -512,21 +512,21 @@ static void GB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
static void UB_Paint( WND *wndPtr, HDC32 hDC, WORD action )
{
RECT16 rc;
HBRUSH16 hBrush;
RECT32 rc;
HBRUSH32 hBrush;
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
if (action == ODA_SELECT) return;
GetClientRect16( wndPtr->hwndSelf, &rc);
GetClientRect32( wndPtr->hwndSelf, &rc);
if (infoPtr->hFont) SelectObject32( hDC, infoPtr->hFont );
hBrush = GetControlBrush( wndPtr->hwndSelf, hDC, CTLCOLOR_BTN );
FillRect16( hDC, &rc, hBrush );
FillRect32( hDC, &rc, hBrush );
if ((action == ODA_FOCUS) ||
((action == ODA_DRAWENTIRE) && (infoPtr->state & BUTTON_HASFOCUS)))
DrawFocusRect16( hDC, &rc );
DrawFocusRect32( hDC, &rc );
}
......
......@@ -156,7 +156,7 @@ void WINAPI InitCommonControls(void)
old_name = class32->lpszClassName;
strcpy( name, (char *)class32->lpszClassName );
class32->lpszClassName = name;
class32->hCursor = LoadCursor16( 0, IDC_ARROW );
class32->hCursor = LoadCursor32A( 0, (LPCSTR)IDC_ARROW );
RegisterClass32A( class32 );
class32->lpszClassName = old_name;
}
......
......@@ -149,7 +149,7 @@ LRESULT WINAPI DesktopWndProc( HWND32 hwnd, UINT32 message,
infoPtr->hbitmapWallPaper = 0;
SetDeskPattern();
SetDeskWallPaper32( (LPSTR)-1 );
break;
return 1;
case WM_ERASEBKGND:
if (rootWindow == DefaultRootWindow(display)) return 1;
......
......@@ -24,11 +24,11 @@ static LPCSTR emptyTitleText = "<...>";
*/
BOOL32 ICONTITLE_Init(void)
{
LOGFONT16 logFont;
LOGFONT32A logFont;
SystemParametersInfo16( SPI_GETICONTITLELOGFONT, 0, &logFont, 0 );
SystemParametersInfo16( SPI_GETICONTITLEWRAP, 0, &bMultiLineTitle, 0 );
hIconTitleFont = CreateFontIndirect16( &logFont );
SystemParametersInfo32A( SPI_GETICONTITLELOGFONT, 0, &logFont, 0 );
SystemParametersInfo32A( SPI_GETICONTITLEWRAP, 0, &bMultiLineTitle, 0 );
hIconTitleFont = CreateFontIndirect32A( &logFont );
return (hIconTitleFont) ? TRUE : FALSE;
}
......@@ -161,7 +161,7 @@ static BOOL32 ICONTITLE_Paint( WND* wnd, HDC32 hDC, BOOL32 bActive )
hPrevFont = SelectObject32( hDC, hIconTitleFont );
if( hPrevFont )
{
RECT16 rect;
RECT32 rect;
INT32 length;
char buffer[80];
......@@ -173,8 +173,8 @@ static BOOL32 ICONTITLE_Paint( WND* wnd, HDC32 hDC, BOOL32 bActive )
SetTextColor32( hDC, textColor );
SetBkMode32( hDC, TRANSPARENT );
DrawText16( hDC, buffer, length, &rect, DT_CENTER | DT_NOPREFIX |
DT_WORDBREAK | ((bMultiLineTitle) ? 0 : DT_SINGLELINE) );
DrawText32A( hDC, buffer, length, &rect, DT_CENTER | DT_NOPREFIX |
DT_WORDBREAK | ((bMultiLineTitle) ? 0 : DT_SINGLELINE) );
SelectObject32( hDC, hPrevFont );
}
......
......@@ -100,14 +100,14 @@ void LISTBOX_Dump( WND *wnd )
LB_ITEMDATA *item;
LB_DESCR *descr = *(LB_DESCR **)wnd->wExtra;
printf( "Listbox:\n" );
printf( "hwnd=%04x descr=%08x heap=%08x items=%d top=%d\n",
wnd->hwndSelf, (UINT32)descr, descr->heap, descr->nb_items,
descr->top_item );
DUMP( "Listbox:\n" );
DUMP( "hwnd=%04x descr=%08x heap=%08x items=%d top=%d\n",
wnd->hwndSelf, (UINT32)descr, descr->heap, descr->nb_items,
descr->top_item );
for (i = 0, item = descr->items; i < descr->nb_items; i++, item++)
{
printf( "%4d: %-40s %d %08lx %3d\n",
i, item->str, item->selected, item->data, item->height );
DUMP( "%4d: %-40s %d %08lx %3d\n",
i, item->str, item->selected, item->data, item->height );
}
}
......
......@@ -2607,15 +2607,18 @@ LRESULT WINAPI PopupMenuWndProc( HWND32 hwnd, UINT32 message, WPARAM32 wParam,
/* zero out global pointer in case resident popup window
* was somehow destroyed. */
if( hwnd == pTopPopupWnd->hwndSelf )
{
ERR(menu, "resident popup destroyed!\n");
if( pTopPopupWnd )
{
if( hwnd == pTopPopupWnd->hwndSelf )
{
ERR(menu, "resident popup destroyed!\n");
pTopPopupWnd = NULL;
uSubPWndLevel = 0;
pTopPopupWnd = NULL;
uSubPWndLevel = 0;
}
else
uSubPWndLevel--;
}
else
uSubPWndLevel--;
break;
case WM_SHOWWINDOW:
......
......@@ -81,18 +81,18 @@ static BOOL32 SCROLL_MovingThumb = FALSE;
*/
static void SCROLL_LoadBitmaps(void)
{
hUpArrow = LoadBitmap16( 0, MAKEINTRESOURCE(OBM_UPARROW) );
hDnArrow = LoadBitmap16( 0, MAKEINTRESOURCE(OBM_DNARROW) );
hLfArrow = LoadBitmap16( 0, MAKEINTRESOURCE(OBM_LFARROW) );
hRgArrow = LoadBitmap16( 0, MAKEINTRESOURCE(OBM_RGARROW) );
hUpArrowD = LoadBitmap16( 0, MAKEINTRESOURCE(OBM_UPARROWD) );
hDnArrowD = LoadBitmap16( 0, MAKEINTRESOURCE(OBM_DNARROWD) );
hLfArrowD = LoadBitmap16( 0, MAKEINTRESOURCE(OBM_LFARROWD) );
hRgArrowD = LoadBitmap16( 0, MAKEINTRESOURCE(OBM_RGARROWD) );
hUpArrowI = LoadBitmap16( 0, MAKEINTRESOURCE(OBM_UPARROWI) );
hDnArrowI = LoadBitmap16( 0, MAKEINTRESOURCE(OBM_DNARROWI) );
hLfArrowI = LoadBitmap16( 0, MAKEINTRESOURCE(OBM_LFARROWI) );
hRgArrowI = LoadBitmap16( 0, MAKEINTRESOURCE(OBM_RGARROWI) );
hUpArrow = LoadBitmap32A( 0, MAKEINTRESOURCE(OBM_UPARROW) );
hDnArrow = LoadBitmap32A( 0, MAKEINTRESOURCE(OBM_DNARROW) );
hLfArrow = LoadBitmap32A( 0, MAKEINTRESOURCE(OBM_LFARROW) );
hRgArrow = LoadBitmap32A( 0, MAKEINTRESOURCE(OBM_RGARROW) );
hUpArrowD = LoadBitmap32A( 0, MAKEINTRESOURCE(OBM_UPARROWD) );
hDnArrowD = LoadBitmap32A( 0, MAKEINTRESOURCE(OBM_DNARROWD) );
hLfArrowD = LoadBitmap32A( 0, MAKEINTRESOURCE(OBM_LFARROWD) );
hRgArrowD = LoadBitmap32A( 0, MAKEINTRESOURCE(OBM_RGARROWD) );
hUpArrowI = LoadBitmap32A( 0, MAKEINTRESOURCE(OBM_UPARROWI) );
hDnArrowI = LoadBitmap32A( 0, MAKEINTRESOURCE(OBM_DNARROWI) );
hLfArrowI = LoadBitmap32A( 0, MAKEINTRESOURCE(OBM_LFARROWI) );
hRgArrowI = LoadBitmap32A( 0, MAKEINTRESOURCE(OBM_RGARROWI) );
}
......
......@@ -94,7 +94,7 @@ BOOL32 WIDGETS_Init(void)
/* Just to make sure the string is > 0x10000 */
strcpy( name, (char *)cls->lpszClassName );
cls->lpszClassName = name;
cls->hCursor = LoadCursor16( 0, cls->hCursor );
cls->hCursor = LoadCursor32A( 0, (LPCSTR)cls->hCursor );
if (!(bicAtomTable[i] = RegisterClass32A( cls ))) return FALSE;
}
......
DEFS = -D__WINE__
DEFS = -D__WINE__ -DLIBDIR=\"$(libdir)\"
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ..
SRCDIR = @srcdir@
......
......@@ -348,15 +348,24 @@ void DEBUG_AddModuleBreakpoints(void)
if (pModule->flags & NE_FFLAGS_WIN32) /* PE module */
{
PE_MODREF *pem = PROCESS_Current()->modref_list;
while (pem)
if (!pem)
{
if (pem->module == pModule->module32) break;
pem = pem->next;
addr.seg = 0;
addr.off = (DWORD)RVA_PTR( pModule->module32,
OptionalHeader.AddressOfEntryPoint);
}
else
{
while (pem)
{
if (pem->module == pModule->module32) break;
pem = pem->next;
}
if (!pem) continue;
addr.seg = 0;
addr.off = (DWORD)RVA_PTR( pem->module,
OptionalHeader.AddressOfEntryPoint);
}
if (!pem) continue;
addr.seg = 0;
addr.off = (DWORD)RVA_PTR( pem->module,
OptionalHeader.AddressOfEntryPoint );
fprintf( stderr, "Win32 task '%s': ", entry.szModule );
DEBUG_AddBreakpoint( &addr );
}
......
......@@ -8,6 +8,7 @@
#include <stdio.h>
#include <signal.h>
#include <sys/stat.h>
#include <unistd.h>
#include "class.h"
#include "module.h"
......@@ -436,7 +437,12 @@ static void DEBUG_Main( int signal )
fprintf(stderr,"Loading symbols: ");
if( DEBUG_ReadExecutableDbgInfo() == FALSE )
{
PROFILE_GetWineIniString( "wine", "SymbolTableFile", "wine.sym",
char *symfilename = "wine.sym";
struct stat statbuf;
if (-1 == stat(symfilename, &statbuf) )
symfilename = LIBDIR "wine.sym";
PROFILE_GetWineIniString( "wine", "SymbolTableFile", symfilename,
SymbolTableFile, sizeof(SymbolTableFile));
DEBUG_ReadSymbolTable( SymbolTableFile );
}
......
......@@ -119,6 +119,7 @@ void DEBUG_BackTrace(void)
frame->bp, TRUE );
frameno++;
fprintf( stderr, "\n" );
if (addr.off == frame->bp) break;
addr.off = frame->bp;
}
}
......
Note: The new debugging interface is starting to take shape.
In general, I think it can be considered to be stable,
Note: The new debugging interface can be considered to be stable,
with the exception of the in-memory message construction functions.
However, there is still a lot of work to be done to polish
things up and to convert the remaining fprintf. To make my life
......@@ -8,9 +7,13 @@ Note: The new debugging interface is starting to take shape.
Read this document before writing new code.
Also, DO NOT USE fprintf (or printf) to output things. All these
will have to be translated to the new interface and there are already
about 3000 of them! Also, instead of writing FIXMEs in the source,
output a FIXME message if you can. But read on...
14 Mar 1998, Dimitrie O. Paun <dimi@cs.toronto.edu>
about 1000 of them! Also, instead of writing FIXMEs in the source,
output a FIXME message if you can.
IMPORTANT: at the end of the document, there is a "Style Guide"
for debugging messages. Please read it.
28 Mar 1998, Dimitrie O. Paun <dimi@cs.toronto.edu>
Debugging classes
......@@ -25,8 +28,9 @@ FIXME -- Messages in this class relate to behavior of Wine that does
ERR -- Messages in this class relate to serious errors in Wine.
This sort of messages are close to asserts -- that is,
you should output a error message when the code detects a
condition which should not happen.
you should output an error message when the code detects a
condition which should not happen. In other words, important
things that are not warnings (see below), are errors.
Examples: unexpected change in internal state, etc.
WARN -- These are warning messages. You should report a warning when
......@@ -67,8 +71,8 @@ size of Wine.
Debugging channels
------------------
Also, we divide the debugging messages per component. Each component
is assigned a debugging channel. The identifier of the
Also, we divide the debugging messages on a component basis. Each
component is assigned a debugging channel. The identifier of the
channel must be a valid C identifier but note that it may also be a
reserve word like int or static.
......@@ -80,7 +84,7 @@ We will refer to a generic channel as xxx.
Note: for those who know the old interface, the channel/type is
what followed the _ in the dprintf_xxx statements.
For example, to output a message on the debugging channel
reg in the old interface you would have to write:
reg in the old interface you would had to write:
dprintf_reg(stddeb, "Could not access key!\n");
......@@ -88,15 +92,12 @@ Note: for those who know the old interface, the channel/type is
However, we add an orthogonal piece of information to the
message: its class. This is very important as it will allow
us to selectively turn on or off certain messages based on the
type of information they report. For this reason it is VERY
important to choose the right class for the message.
type of information they report. For this reason it is essential
to choose the right class for the message.
Anyhow, suppose we figured that this message should belong
in the WARN class, so in the new interface, you write:
WARN(reg, "Could not access key!");
Notice the \n is no longer required.
WARN(reg, "Could not access key!\n");
---
How to use it
......@@ -117,8 +118,7 @@ Some examples from the code:
...
TRACE(crtdll, "CRTDLL_setbuf(file %p buf %p)",
file, buf);
TRACE(crtdll, "CRTDLL_setbuf(file %p buf %p)", file, buf);
WARN(aspi, "Error opening device errno=%d", save_error);
......@@ -142,10 +142,9 @@ Notes:
he will most likely miss those because usually the TRACE class
is turned off. A similar argument can be made if you mix any
other two classes.
2. All lines end by default with a newline. So you should not
add one more. If you can NOT output everything that you want in
the line with only one statement, then you need to build the string
in memory.
2. All lines should end with a newline.If you can NOT output
everything that you want in the line with only one statement,
then you need to build the string in memory.
Please read the section below "In-memory messages" on the
preferred way to do it. PLEASE USE THAT INTERFACE TO BUILD
MESSAGES IN MEMORY. The reason is that we are not sure that
......@@ -160,19 +159,19 @@ Are we debugging?
To test whether the debugging output of class yyy on channel xxx is
enabled, use:
TRACING to test if TRACE is enabled
WARNING to test if WARN is enabled
FIXMING to test if FIXME is enabled
ERRING to test if ERR is enabled
TRACE_ON to test if TRACE is enabled
WARN_ON to test if WARN is enabled
FIXME_ON to test if FIXME is enabled
ERR_ON to test if ERR is enabled
Examples:
if(TRACING(atom)){
if(TRACE_ON(atom)){
...blah...
}
Note that you should normaly need to test only if TRACING. At present,
none of the other 3 tests (except for ERRING which is used only once!)
Note that you should normally need to test only if TRACE_ON. At present,
none of the other 3 tests (except for ERR_ON which is used only once!)
are used in Wine.
In-memory messages
......@@ -299,7 +298,7 @@ identifier is a string and thus returns a string of the form:
Thus, to use it, do something on the following lines:
#include "debugstr.h"
#include "debug.h"
...
......@@ -351,6 +350,108 @@ Also, note that at the moment:
- the fixme and err classes are enabled by default
- the trace and warn classes are disabled by default
- there is no way to compile out the messages. All are
runtime configurable. This will come next release.
runtime configurable. This will (hopefully) come next
release.
A Few Notes on Style
--------------------
This new scheme makes certain things more consistent but there is still
room for improvement by using a common style of debug messages. Before
I continue, let me note that the output format is the following:
yyy:xxx:fff <message>
where:
yyy = the class (fixme, err, warn, trace)
xxx = the channel (atom, win, font, etc)
fff = the function name
these fields are output automatically. All you have to provide is
the <message> part.
So here are some ideas:
* do NOT include the name of the function: it is included automatically
* if you want to output the parameters of the function, do it as the first
thing and include them in parenthesis, like this:
YYY(xxx, "(%d,%p,etc)...\n", par1, par2, ...);
* for stubs, you should output a FIXME message. I suggest this style:
FIXME(xxx, "(%x,%d...): stub\n", par1, par2, ...);
That is, you output the parameters, then a : and then a string
containing the word "stub". I've seen "empty stub", and others, but I
think that just "stub" suffices.
* output 1 and ONLY 1 line per message. That is, the format string should
contain only 1 \n and it should always appear at the end of the string.
(there are many reasons for this requirement, one of them is that each
debug macro adds things to the beginning of the line)
* if you want to name a value, use = and NOT :. That is, instead of
saying:
FIXME(xxx, "(fd: %d, file: %s): stub\n", fd, name);
say:
FIXME(xxx, "(fd=%d, file=%s): stub\n", fd, name);
use : to separate categories.
* try to avoid the style:
FIXME(xxx,
"(fd: %d, file: %s): stub\n", fd, name);
but use:
FIXME(xxx, "(fd: %d, file: %s): stub\n", fd, name);
The reason is that if you want to grep for things, you would search for
FIXME but in the first case there is no additional information available,
where in the second one, there is (e.g. the word stub)
* if you output a string s that might contain control characters,
or if s may be null, use debugstr_a (for ASCII strings, or
debugstr_w for Unicode strings) to convert s to a C string, like
this:
HANDLE32 WINAPI YourFunc(LPCSTR s)
{
FIXME(xxx, "(%s): stub\n", debugstr_a(s));
}
* if you want to output a resource identifier, use debugres to
convert it to a string first, like this:
HANDLE32 WINAPI YourFunc(LPCSTR res)
{
FIXME(xxx, "(res=%s): stub\n", debugres(s));
}
if the resource identifier is a SEGPTR, use PTR_SEG_TO_LIN to get a
liner pointer first:
HRSRC16 WINAPI FindResource16( HMODULE16 hModule, SEGPTR name, SEGPTR type )
{
[...]
TRACE(resource, "module=%04x name=%s type=%s\n",
hModule, debugres(PTR_SEG_TO_LIN(name)),
debugres(PTR_SEG_TO_LIN(type)) );
[...]
}
* for messages intended for the user (specifically those that report
errors in wine.conf), use the MSG macro. Use it like a printf:
MSG( "Definition of drive %d is incorrect!\n", drive );
However, note that there are _very_ few valid uses of this macro.
Most messages are debugging messages, so chances are you will not
need to use this macro. Grep the source to get an idea where it
is appropriate to use it.
* for structure dumps, use the DUMP macro. Use it like a printf,
just like the MSG macro. Similarly, there are only a few valid
uses of this macro. Grep the source to see when to use it.
This file contains information on the current implementation of the DirectDraw
API.
The DirectDraw API is being used in a lot of current computergames. Its API
layer is represented by the functions in the Win32 DLL ddraw.dll and the
IDirectDraw* interfaces (that can be created using the API functions).
WINE currently implements a very basic set of the DirectDraw functionality
in graphics/ddraw.c. This implementation uses the XFree86-DGA extension
to get very fast access to the graphics card framebuffer and doublebuffering
features. It is as fast as the MS equivalent for the stuff that is implemented.
Several applications already work, see below.
Problems of the implementation using XFree86-DGA:
- XFree86 cannot switch resolution nor depth on the fly.
This is a problem with X and unavoidable.
Current solution is to pop up a MessageBox with an error for
mismatched parameters and advice the user to restart the X server
with the specified depth and/or screensize.
- The rest of the functionality that has to be implemented will have
to be done in software and will be very slow.
- This requires WINE to be run as root user so XF86DGA can mmap the
framebuffer into the addressspace of the process.
- Blocks all other X windowed applications.
TODO:
- Add more implementations of the DirectDraw API.
Primary candidate is a raw Xlib implementation (one with/one without
XShm extension).
An additional layer (basically a HAL) will be required to decide on
case-by-case basis which implementation to use.
Status:
- Diablo [640x480x8]:
The movies play with speed comparable to the MS DDRAW one.
The game doesn't work, it somehow tries to write into 2 lines _BEFORE_
the start of the surface. I have tried to investigate this, but it is
in code that is automatically generated.
- WingCommander 4 / Win95 Patch [640x480x8]:
The intromovie plays, in 8 bit mode (to reconfigure wc4, run wine
"wc4w.exe -I"). The 16bit mode looks broken on Mystique, but I think
this is due to the unusual colorweight (565 rgb) of the Mystique in 16bit
mode. [Specifying it in DDPIXELFORMAT didn't help.]
Requires to be run in 640x480xdepth mode (doesn't seem to heed
DDSURFACEDESC.lPitch).
You can even fly the first mission with Maniac (ignore the weird sounds),
but it crashes as soon as you arrive at Blue Point Station...
- Monkey Island 3 [640x480x8]:
Goes to the easy/hard selection screen, then hangs due to multithreaded
windows-messagehandling problems.
- DiscWorld 2 [640x480x8]:
[Crashes with 'cli' in WINE released version. Yes. Privileged instructions
in 32bit code. Will they ever learn...]
Plays through nearly all intro movies. Sound and animation skip a lot of
stuff (possible DirectSound asynchronization problem).
- XvT [640x480x16]:
Shows the splash screen, then fails with missing Joystick. I have
investigated but failed to find a reason for this.
- Tomb Raider 2 Demo (using 8 bit renderer) [640x480x8]:
I have played nearly all of the DEMO level using Keyboard Controls.
Sound is a bit weird. Keyboard/Mouse handling too due to incomplete
DirectInput.
- WingCommander Prophecy Demo (using software renderer) [640x480x16]:
[Crashes with an invalid opcode (outb, probably to test for 3dFX) in the
WINE release version.]
Plays trailer, hangs in selection screen (no keyboard input, DirectInput
problem).
This file contains information on the current implementation of the DirectSound
API.
The DirectSound API can be found in the Win32 DLL dsound.dll and in the
IDirectSound* interfaces. It is implemented in multimedia/dsound.c.
The current implementation uses the Linux/FreeBSD OpenSoundSystem. Some
applications already work. There is only the basic part of the interfaces
implemented, but it is the stuff used by 90% of the applications.
It also uses multithreading, so it will only work on systems with working
CreateThread.
Tested with SoundBlaster(16) clone and Gravis UltraSound Classic.
TODO:
- Add support for other audiosystems.
+ Sun Audio. (Solaris and probably the *BSDs except FreeBSD.)
+ remote audio support (No clue as to what systems there are.
Use some audio xextensions?)
- Add support for mixing of different frequency and panning.
- Fix all the multithread pending race conditions and the like.
- Share filedescriptors and other stuff with mciwave/waveoutdevice code.
Gamestatus:
- Wing Commander 4/W95:
The intromovie plays without problems. Nearly lipsynchron.
- DiscWorld 2
The sound works, but noticeable chunks are left out (from the sound
and the animation). Don't know why yet.
- Diablo:
Sound works, but slows down the movieplayer. In the (hacked version)
game the sound is positively weird.
- Monkey Island 3:
The background sound of the startscreen works.
- WingCommander Prophecy Demo:
Sound works for the intromovie.
......@@ -351,6 +351,7 @@ BOOL32 WINAPI CreateDirectory32A( LPCSTR path,
if (!DOSFS_GetFullName( path, FALSE, &full_name )) return 0;
if ((mkdir( full_name.long_name, 0777 ) == -1) && (errno != EEXIST))
{
WARN (file, "Errno %i trying to create directory %s.\n", errno, full_name.long_name);
FILE_SetDosError();
return FALSE;
}
......
......@@ -11,6 +11,8 @@
#include "metafile.h"
#include "debug.h"
#include <string.h>
static const DC_FUNCTIONS MFDRV_Funcs =
{
MFDRV_Arc, /* pArc */
......@@ -179,22 +181,19 @@ HDC16 WINAPI CreateMetaFile16(
return dc->hSelf;
}
/******************************************************************
* CloseMetaFile16 (GDI.126)
*
* Stop recording graphics operations in metafile associated with
* hdc and retrieve metafile.
*
* RETURNS
* Handle of newly created metafile on success, NULL on failure.
/**********************************************************************
* CreateMetaFile32A (GDI32.51)
*/
HMETAFILE16 WINAPI CloseMetaFile16(
HDC16 hdc /* Metafile DC to close */
HDC32 WINAPI CreateMetaFile32A(
LPCSTR filename /* Filename of disk metafile */
)
{
return CreateMetaFile16( filename );
}
static DC *METAFILE_CloseMetaFile( HDC32 hdc )
{
DC *dc;
HMETAFILE16 hmf;
HFILE32 hFile;
METAFILEDRV_PDEVICE *physDev;
......@@ -231,6 +230,22 @@ HMETAFILE16 WINAPI CloseMetaFile16(
_lclose32(hFile);
}
return dc;
}
/******************************************************************
* CloseMetaFile16 (GDI.126)
*/
HMETAFILE16 WINAPI CloseMetaFile16(
HDC16 hdc /* Metafile DC to close */
)
{
HMETAFILE16 hmf;
METAFILEDRV_PDEVICE *physDev;
DC *dc = METAFILE_CloseMetaFile(hdc);
if (!dc) return 0;
physDev = (METAFILEDRV_PDEVICE *)dc->physDev;
/* Now allocate a global handle for the metafile */
hmf = GLOBAL_CreateBlock( GMEM_MOVEABLE, physDev->mh,
......@@ -241,12 +256,25 @@ HMETAFILE16 WINAPI CloseMetaFile16(
return hmf;
}
/******************************************************************
* DeleteMetaFile16 (GDI.127)
* CloseMetaFile32 (GDI32.17)
*
* Delete a memory-based metafile.
* Stop recording graphics operations in metafile associated with
* hdc and retrieve metafile.
*
* RETURNS
* Handle of newly created metafile on success, NULL on failure.
*/
HMETAFILE32 WINAPI CloseMetaFile32(
HDC32 hdc /* Metafile DC to close */
)
{
return CloseMetaFile32(hdc);
}
/******************************************************************
* DeleteMetaFile16 (GDI.127)
*/
BOOL16 WINAPI DeleteMetaFile16(
HMETAFILE16 hmf
......@@ -256,3 +284,77 @@ BOOL16 WINAPI DeleteMetaFile16(
return !GlobalFree16( hmf );
}
/******************************************************************
* DeleteMetaFile32 (GDI32.69)
*
* Delete a memory-based metafile.
*/
BOOL32 WINAPI DeleteMetaFile32(
HMETAFILE32 hmf
) {
return !GlobalFree16( hmf );
}
/********************************************************************
Enhanced Metafile driver initializations
This possibly should be moved to their own file/directory
at some point.
**********************************************************************/
/*
need wide version as well
*/
HDC32 CreateEnhMetaFile32A(
HDC32 hdc, /* optional reference DC */
LPCSTR filename, /* optional filename for disk metafiles */
const RECT32 *rect, /* optional bounding rectangle */
LPCSTR description /* optional description */
)
{
#if 0
DC *dc;
METAFILEDRV_PDEVICE *physDev;
HFILE32 hFile;
if (!(dc = MFDRV_AllocMetaFile())) return 0;
physDev = (METAFILEDRV_PDEVICE *)dc->physDev;
if (filename) /* disk based metafile */
{
physDev->mh->mtType = METAFILE_DISK;
if ((hFile = _lcreat32( filename, 0 )) == HFILE_ERROR32)
{
MFDRV_DeleteDC( dc );
return 0;
}
if (_lwrite32( hFile, (LPSTR)physDev->mh,
sizeof(*physDev->mh)) == HFILE_ERROR32)
{
MFDRV_DeleteDC( dc );
return 0;
}
physDev->mh->mtNoParameters = hFile; /* store file descriptor here */
/* windows probably uses this too*/
}
else /* memory based metafile */
physDev->mh->mtType = METAFILE_MEMORY;
TRACE(metafile, "returning %04x\n", dc->hSelf);
return dc->hSelf;
#endif
return 0;
}
HENHMETAFILE32 CloseEnhMetaFile32(
HDC32 hdc /* metafile DC */
)
{
/* write EMR_EOF(0x0, 0x10, 0x14) */
return 0;
}
......@@ -695,8 +695,8 @@ BOOL32 WINAPI DrawAnimatedRects32( HWND32 hwnd, int idAni,
const LPRECT32 lprcFrom,
const LPRECT32 lprcTo )
{
fprintf( stdnimp,"DrawAnimatedRects32(%x,%d,%p,%p), empty stub!\n",
hwnd, idAni, lprcFrom, lprcTo );
FIXME(gdi,"(%x,%d,%p,%p): empty stub!\n",
hwnd, idAni, lprcFrom, lprcTo );
return TRUE;
}
......
......@@ -173,11 +173,12 @@ BOOL32 WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output,
printerEnabled, sizeof(printerEnabled) );
if (lstrcmpi32A(printerEnabled,"on"))
{
printf("WIN16DRV_CreateDC disabled in wine.conf file\n");
MSG("WIN16DRV_CreateDC disabled in wine.conf file\n");
return FALSE;
}
TRACE(win16drv, "In creatdc for (%s,%s,%s) initData 0x%p\n",driver, device, output, initData);
TRACE(win16drv, "In creatdc for (%s,%s,%s) initData 0x%p\n",
driver, device, output, initData);
physDev = (WIN16DRV_PDEVICE *)HeapAlloc( SystemHeap, 0, sizeof(*physDev) );
if (!physDev) return FALSE;
......@@ -205,11 +206,9 @@ BOOL32 WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output,
dc->w.hVisRgn = CreateRectRgn32(0, 0, dc->w.devCaps->horzRes, dc->w.devCaps->vertRes);
dc->w.bitsPerPixel = dc->w.devCaps->bitsPixel;
printf("Got devcaps width %d height %d bits %d planes %d\n",
dc->w.devCaps->horzRes,
dc->w.devCaps->vertRes,
dc->w.devCaps->bitsPixel,
dc->w.devCaps->planes);
TRACE(win16drv, "Got devcaps width %d height %d bits %d planes %d\n",
dc->w.devCaps->horzRes, dc->w.devCaps->vertRes,
dc->w.devCaps->bitsPixel, dc->w.devCaps->planes);
/* Now we allocate enough memory for the PDEVICE structure */
/* The size of this varies between printer drivers */
......@@ -276,15 +275,15 @@ static INT32 WIN16DRV_Escape( DC *dc, INT32 nEscape, INT32 cbInput,
switch(nEscape)
{
case ENABLEPAIRKERNING:
fprintf(stderr,"Escape: ENABLEPAIRKERNING ignored.\n");
FIXME(win16drv,"Escape: ENABLEPAIRKERNING ignored.\n");
nRet = 1;
break;
case GETPAIRKERNTABLE:
fprintf(stderr,"Escape: GETPAIRKERNTABLE ignored.\n");
FIXME(win16drv,"Escape: GETPAIRKERNTABLE ignored.\n");
nRet = 0;
break;
case SETABORTPROC:
printf("Escape: SetAbortProc ignored should be stored in dc somewhere\n");
FIXME(win16drv,"Escape: SetAbortProc ignored should be stored in dc somewhere\n");
/* Make calling application believe this worked */
nRet = 1;
break;
......@@ -335,7 +334,7 @@ static INT32 WIN16DRV_Escape( DC *dc, INT32 nEscape, INT32 cbInput,
}
}
else
fprintf(stderr, "Escape(nEscape = %04x)\n", nEscape);
WARN(win16drv, "Escape(nEscape = %04x) - ???\n", nEscape);
return nRet;
}
......@@ -361,12 +360,12 @@ static struct hpq *hpqueue;
HPQ WINAPI CreatePQ(int size)
{
printf("CreatePQ: %d\n",size);
FIXME(win16drv, "(%d): stub\n",size);
return 1;
}
int WINAPI DeletePQ(HPQ hPQ)
{
printf("DeletePQ: %x\n", hPQ);
FIXME(win16drv, "(%x): stub\n", hPQ);
return 0;
}
int WINAPI ExtractPQ(HPQ hPQ)
......@@ -402,7 +401,7 @@ int WINAPI ExtractPQ(HPQ hPQ)
free(queue);
}
printf("ExtractPQ: %x got tag %d key %d\n", hPQ, tag, key);
TRACE(win16drv, "%x got tag %d key %d\n", hPQ, tag, key);
return tag;
}
......@@ -415,17 +414,17 @@ int WINAPI InsertPQ(HPQ hPQ, int tag, int key)
queueItem->key = key;
queueItem->tag = tag;
printf("InsertPQ: %x %d %d\n", hPQ, tag, key);
FIXME(win16drv, "(%x %d %d): stub???\n", hPQ, tag, key);
return TRUE;
}
int WINAPI MinPQ(HPQ hPQ)
{
printf("MinPQ: %x\n", hPQ);
FIXME(win16drv, "(%x): stub\n", hPQ);
return 0;
}
int WINAPI SizePQ(HPQ hPQ, int sizechange)
{
printf("SizePQ: %x %d\n", hPQ, sizechange);
FIXME(win16drv, "(%x %d): stub\n", hPQ, sizechange);
return -1;
}
......@@ -468,9 +467,9 @@ static int CreateSpoolFile(LPSTR pszOutput)
if (pszOutput == NULL || *pszOutput == '\0')
return -1;
PROFILE_GetWineIniString( "spooler", pszOutput, "",
psCmd, sizeof(psCmd) );
printf("Got printerSpoolCommand \"%s\" for output device \"%s\"\n",psCmd, pszOutput);
PROFILE_GetWineIniString( "spooler", pszOutput, "", psCmd, sizeof(psCmd) );
TRACE(win16drv, "Got printerSpoolCommand '%s' for output device '%s'\n",
psCmd, pszOutput);
if (!*psCmd)
psCmdP = pszOutput;
else
......@@ -491,7 +490,7 @@ static int CreateSpoolFile(LPSTR pszOutput)
{
psCmdP++;
printf("In child need to exec %s\n",psCmdP);
TRACE(win16drv, "In child need to exec %s\n",psCmdP);
close(0);
dup2(fds[0],0);
close (fds[1]);
......@@ -501,15 +500,16 @@ static int CreateSpoolFile(LPSTR pszOutput)
}
close (fds[0]);
fd = fds[1];
printf("Need to execute a command and pipe the output to it\n");
TRACE(win16drv,"Need to execute a cmnd and pipe the output to it\n");
}
else
{
printf("Just assume its a file\n");
TRACE(win16drv, "Just assume its a file\n");
if ((fd = open(psCmdP, O_CREAT | O_TRUNC | O_WRONLY , 0600)) < 0)
{
printf("Failed to create spool file %s, errno = %d\n", psCmdP, errno);
ERR(win16drv, "Failed to create spool file %s, errno = %d\n",
psCmdP, errno);
}
}
return fd;
......@@ -538,7 +538,7 @@ HANDLE16 WINAPI OpenJob(LPSTR lpOutput, LPSTR lpTitle, HDC16 hDC)
HANDLE16 hHandle = (HANDLE16)SP_ERROR;
PPRINTJOB pPrintJob;
TRACE(win16drv, "\"%s\" \"%s\" %04x\n", lpOutput, lpTitle, hDC);
TRACE(win16drv, "'%s' '%s' %04x\n", lpOutput, lpTitle, hDC);
pPrintJob = gPrintJobsTable[0];
if (pPrintJob == NULL)
......
......@@ -573,7 +573,7 @@ DWORD PRTDRV_StretchBlt(LPPDEVICE lpDestDev,
lP11, lP12, lP13,
SEGPTR_GET(lP14));
SEGPTR_FREE(lP14);
printf("Called StretchBlt ret %d\n",wRet);
TRACE(win16drv, "Called StretchBlt ret %d\n",wRet);
}
return wRet;
}
......
......@@ -57,7 +57,7 @@ static void __initWinG(void)
return;
}
}
fprintf(stdnimp,"WinG: no joy.\n");
FIXME(wing,"WinG: no joy.\n");
__WinGOK = False;
}
}
......@@ -79,7 +79,7 @@ HDC16 WINAPI WinGCreateDC16(void)
*/
BOOL16 WINAPI WinGRecommendDIBFormat16(BITMAPINFO *fmt)
{
fprintf(stdnimp,"WinGRecommendDIBFormat()\n");
FIXME(wing,"(%p): stub\n", fmt);
if( __WinGOK > 0 && fmt )
{
......@@ -95,14 +95,16 @@ BOOL16 WINAPI WinGRecommendDIBFormat16(BITMAPINFO *fmt)
HBITMAP16 WINAPI WinGCreateBitmap16(HDC16 winDC, BITMAPINFO *header,
void **bits)
{
fprintf(stdnimp,"WinGCreateBitmap: empty stub! (expect failure)\n");
FIXME(wing,"(%x,%p,%p): empty stub! (expect failure)\n",
winDC, header, bits);
if( __WinGOK > 0 && header )
{
BITMAPINFOHEADER* bmpi = &header->bmiHeader;
fprintf(stdnimp,"bytes\t=%i\nplanes\t=%i\nbpp\t=%i\nx\t=%i\ny\t=%i\nrle\t=0x%08x\nsize\t=%i\n",
(int)bmpi->biSize, bmpi->biPlanes, bmpi->biBitCount,
(int)bmpi->biWidth, (int)bmpi->biHeight, (unsigned)bmpi->biCompression, (int)bmpi->biSizeImage);
FIXME(wing,"bytes=%i,planes=%i,bpp=%i,x=%i,y=%i,rle=0x%08x,size=%i\n",
(int)bmpi->biSize, bmpi->biPlanes, bmpi->biBitCount,
(int)bmpi->biWidth, (int)bmpi->biHeight,
(unsigned)bmpi->biCompression, (int)bmpi->biSizeImage);
#ifdef PRELIMINARY_WING16_SUPPORT
if( bmpi->biPlanes == __bmpiWinG.biPlanes && bmpi->biBitCount == __bmpiWinG.biBitCount &&
......@@ -207,7 +209,7 @@ SEGPTR WINAPI WinGGetDIBPointer16(HBITMAP16 hWinGBitmap, BITMAPINFO* bmpi)
UINT16 WINAPI WinGSetDIBColorTable16(HDC16 hWinGDC, UINT16 start, UINT16 num,
RGBQUAD* pColor)
{
fprintf(stdnimp,"WinGSetDIBColorTable: empty stub!\n");
FIXME(wing,"(%x,%d,%d,%p): empty stub!\n",hWinGDC,start,num,pColor);
return num;
}
......@@ -215,9 +217,9 @@ UINT16 WINAPI WinGSetDIBColorTable16(HDC16 hWinGDC, UINT16 start, UINT16 num,
* WinGGetDIBColorTable16 (WING.1005)
*/
UINT16 WINAPI WinGGetDIBColorTable16(HDC16 winDC, UINT16 start,
UINT16 numentry, RGBQUAD* colors)
UINT16 num, RGBQUAD* colors)
{
fprintf(stdnimp,"WinGGetDIBColorTable: empty stub!\n");
FIXME(wing,"(%x,%d,%d,%p): empty stub!\n",winDC,start,num,colors);
return 0;
}
......@@ -226,7 +228,7 @@ UINT16 WINAPI WinGGetDIBColorTable16(HDC16 winDC, UINT16 start,
*/
HPALETTE16 WINAPI WinGCreateHalfTonePalette16(void)
{
fprintf(stdnimp,"WinGCreateHalfTonePalette: empty stub!\n");
FIXME(wing,"(void): empty stub!\n");
return 0;
}
......@@ -236,7 +238,7 @@ HPALETTE16 WINAPI WinGCreateHalfTonePalette16(void)
HPALETTE16 WINAPI WinGCreateHalfToneBrush16(HDC16 winDC, COLORREF col,
WING_DITHER_TYPE type)
{
fprintf(stdnimp,"WinGCreateHalfToneBrush: empty stub!\n");
FIXME(wing,"(...): empty stub!\n");
return 0;
}
......@@ -250,8 +252,6 @@ BOOL16 WINAPI WinGStretchBlt16(HDC16 destDC, INT16 xDest, INT16 yDest,
{
return StretchBlt16(destDC, xDest, yDest, widDest, heiDest, srcDC, xSrc, ySrc, widSrc, heiSrc, SRCCOPY);
/* fprintf(stdnimp,"WinGStretchBlt16: empty stub!\n");*/
/* return 0; */
}
/***********************************************************************
......
......@@ -116,9 +116,9 @@ BOOL32 X11DRV_Init(void)
/* Finish up device caps */
#if 0
printf("Display:\nHeight = %-4i pxl, %-4i mm\nWidth = %-4i pxl, %-4i mm\n",
HeightOfScreen(screen), HeightMMOfScreen(screen),
WidthOfScreen(screen), WidthMMOfScreen(screen) );
TRACE(x11drv, "Height = %-4i pxl, %-4i mm, Width = %-4i pxl, %-4i mm\n",
HeightOfScreen(screen), HeightMMOfScreen(screen),
WidthOfScreen(screen), WidthMMOfScreen(screen) );
#endif
X11DRV_DevCaps.version = 0x300;
......
......@@ -24,8 +24,6 @@
#include "font.h"
#include "debug.h"
#define DEBUG_FONT_INIT 1
#define X_PFONT_MAGIC (0xFADE0000)
#define X_FMC_MAGIC (0x0000CAFE)
......@@ -824,9 +822,8 @@ static void XFONT_WindowsNames( char* buffer )
fi->df.dfPitchAndFamily |= bFamilyStyle;
}
#ifdef DEBUG_FONT_INIT
TRACE(font,"typeface \'%s\'\n", fr->lfFaceName);
#endif
fr->fr_flags |= FR_NAMESET;
}
......@@ -865,9 +862,8 @@ static fontAlias* XFONT_CreateAlias( LPCSTR lpTypeFace, LPCSTR lpAlias )
/* check if we already got one */
if( !lstrcmpi32A( pfa->faTypeFace, lpAlias ) )
{
#ifdef DEBUG_FONT_INIT
TRACE(font,"\tredundant alias '%s' -> '%s'\n", lpAlias, lpTypeFace );
#endif
TRACE(font,"\tredundant alias '%s' -> '%s'\n",
lpAlias, lpTypeFace );
return NULL;
}
if( pfa->next ) pfa = pfa->next;
......@@ -885,9 +881,8 @@ static fontAlias* XFONT_CreateAlias( LPCSTR lpTypeFace, LPCSTR lpAlias )
pfa->faAlias = pfa->faTypeFace + j;
lstrcpy32A( pfa->faAlias, lpAlias );
#ifdef DEBUG_FONT_INIT
TRACE(font, "\tadded alias '%s' for %s\n", lpAlias, lpTypeFace );
#endif
return pfa;
}
return NULL;
......@@ -987,10 +982,9 @@ static void XFONT_LoadAliases( char** buffer, int buf_size )
prev = pfa;
}
#ifdef DEBUG_FONT_INIT
TRACE(font, "\tsubstituted '%s' with %s\n",
frMatch->lfFaceName, lpAlias );
#endif
lstrcpyn32A( frMatch->lfFaceName, lpAlias, LF_FACESIZE );
frMatch->fr_flags |= FR_NAMESET;
}
......@@ -1001,7 +995,7 @@ static void XFONT_LoadAliases( char** buffer, int buf_size )
}
}
}
else fprintf(stderr, "XFONT_Init: malformed font alias '%s'\n", *buffer );
else ERR(font, " malformed font alias '%s'\n", *buffer );
}
else break;
} while(TRUE);
......@@ -1395,9 +1389,7 @@ BOOL32 X11DRV_FONT_Init( DeviceCaps* pDevCaps )
fr->resource = (char*) HeapAlloc(SystemHeap, 0, j + 1 );
lstrcpyn32A( fr->resource, typeface, j + 1 );
#ifdef DEBUG_FONT_INIT
TRACE(font," family: %s\n", fr->resource );
#endif
if( pfr ) pfr->next = fr;
else fontList = fr;
......@@ -1439,15 +1431,14 @@ BOOL32 X11DRV_FONT_Init( DeviceCaps* pDevCaps )
XFONT_SetFontMetric( fi, fr, x_fs );
TSXFreeFont( display, x_fs );
#ifdef DEBUG_FONT_INIT
TRACE(font,"\t[% 2ipt] '%s'\n", fi->df.dfPoints, typeface );
#endif
XFONT_CheckFIList( fr, fi, REMOVE_SUBSETS );
fi = NULL; /* preventing reuse */
}
else
{
fprintf(stderr, "FONT_Init: failed to load %s\n", lpstr );
ERR(font, "failed to load %s\n", lpstr );
XFONT_CheckFIList( fr, fi, UNMARK_SUBSETS );
}
......@@ -1484,9 +1475,7 @@ BOOL32 X11DRV_FONT_Init( DeviceCaps* pDevCaps )
fontCache = (fontObject*) HeapAlloc(SystemHeap, 0, fontCacheSize * sizeof(fontObject));
XFONT_GrowFreeList(0, fontCacheSize - 1);
#ifdef DEBUG_FONT_INIT
TRACE(font,"done!\n");
#endif
TRACE(font,"done!\n");
/* update text caps parameter */
......@@ -1716,9 +1705,7 @@ static void XFONT_CheckFIList( fontResource* fr, fontInfo* fi, int action)
fr->count++;
}
#ifdef DEBUG_FONT_INIT
if( i ) TRACE(font,"\t purged %i subsets [%i]\n", i , fr->count);
#endif
}
/***********************************************************************
......@@ -2226,10 +2213,7 @@ INT16 WINAPI AddFontResource16( LPCSTR filename )
*/
INT32 WINAPI AddFontResource32A( LPCSTR str )
{
if (HIWORD(str)) /* font file */
fprintf( stdnimp, "STUB: AddFontResource('%s')\n", str );
else /* font resource handle */
fprintf( stdnimp, "STUB: AddFontResource(%04x)\n", LOWORD(str) );
FIXME(font, "(%s): stub\n", debugres(str));
return 1;
}
......@@ -2239,7 +2223,7 @@ INT32 WINAPI AddFontResource32A( LPCSTR str )
*/
INT32 WINAPI AddFontResource32W( LPCWSTR str )
{
fprintf( stdnimp, "STUB: AddFontResource32W(%p)\n", str );
FIXME(font, "(%p): stub\n", str );
return 1;
}
......@@ -2248,11 +2232,7 @@ INT32 WINAPI AddFontResource32W( LPCWSTR str )
*/
BOOL16 WINAPI RemoveFontResource16( SEGPTR str )
{
if (HIWORD(str))
fprintf( stdnimp, "STUB: RemoveFontResource('%s')\n",
(char *)PTR_SEG_TO_LIN( str) );
else
fprintf( stdnimp, "STUB: RemoveFontResource(%04x)\n", LOWORD(str) );
FIXME(font, "(%s): stub\n", debugres(PTR_SEG_TO_LIN(str)));
return TRUE;
}
......@@ -2262,10 +2242,7 @@ BOOL16 WINAPI RemoveFontResource16( SEGPTR str )
*/
BOOL32 WINAPI RemoveFontResource32A( LPCSTR str )
{
if (HIWORD(str))
fprintf( stdnimp, "STUB: RemoveFontResource('%s')\n", str );
else
fprintf( stdnimp, "STUB: RemoveFontResource(%04x)\n", LOWORD(str) );
FIXME(font, "(%s): stub\n", debugres(str));
return TRUE;
}
......@@ -2275,7 +2252,7 @@ BOOL32 WINAPI RemoveFontResource32A( LPCSTR str )
*/
BOOL32 WINAPI RemoveFontResource32W( LPCWSTR str )
{
fprintf( stdnimp, "STUB: RemoveFontResource32W(%p)\n", str );
FIXME(font, "(%p): stub\n", str );
return TRUE;
}
......
......@@ -109,7 +109,7 @@ static BUILTIN16_DLL BuiltinDLLs[] =
{ &STORAGE_Descriptor, DLL_FLAG_NOT_USED },
{ &STRESS_Descriptor, 0 },
{ &TOOLHELP_Descriptor, 0 },
{ &TYPELIB_Descriptor, 0 },
{ &TYPELIB_Descriptor, DLL_FLAG_NOT_USED },
{ &VER_Descriptor, 0 },
{ &W32SYS_Descriptor, 0 },
{ &WIN32S16_Descriptor, 0 },
......
......@@ -6,7 +6,10 @@ long WINAPI stub_GDI_381(HDC16 hdc, SEGPTR proc) { fprintf(stderr, "Warning: GDI
long WINAPI stub_GDI_382(void) { fprintf(stderr, "Warning: GDI_382:ABORTPROC unimplemented stub\n"); return 1; }
long WINAPI stub_GDI_530(void) { fprintf(stderr, "Warning: GDI_530: unimplemented stub\n"); return 0; }
long WINAPI stub_GDI_531(void) { fprintf(stderr, "Warning: GDI_531: unimplemented stub\n"); return 0; }
long WINAPI stub_GDI_532(void) { fprintf(stderr, "Warning: GDI_532: unimplemented stub\n"); return 0; }
long WINAPI stub_GDI_532(LPINT16 buffer, INT16 xx) {
fprintf(stderr, "STUB GDI_532(%p, %hd)\n",buffer,xx);
return 0;
}
long WINAPI stub_GDI_536(void) { fprintf(stderr, "Warning: GDI_536: unimplemented stub\n"); return 0; }
long WINAPI stub_GDI_538(void) { fprintf(stderr, "Warning: GDI_538: unimplemented stub\n"); return 0; }
long WINAPI stub_GDI_540(void) { fprintf(stderr, "Warning: GDI_540: unimplemented stub\n"); return 0; }
......
......@@ -354,7 +354,7 @@ file gdi.exe
# Stubs for Hebrew version
530 pascal16 GDI_530() stub_GDI_530
531 pascal16 GDI_531() stub_GDI_531
532 pascal16 GDI_532() stub_GDI_532
532 pascal16 GDI_532(ptr word) stub_GDI_532
536 pascal16 GDI_536() stub_GDI_536
538 pascal16 GDI_538() stub_GDI_538
540 pascal16 GDI_540() stub_GDI_540
......
......@@ -299,7 +299,7 @@ file krnl386.exe
420 pascal GetFileAttributes(ptr) GetFileAttributes16
421 pascal16 SetFileAttributes(ptr long) SetFileAttributes16
422 pascal16 GetDiskFreeSpace(ptr ptr ptr ptr ptr) GetDiskFreeSpace16
431 pascal16 KERNEL_431(str word) KERNEL_431
431 pascal16 IsPeFormat(str word) IsPeFormat
432 stub FileTimeToLocalFileTime
434 stub KERNEL_434
435 stub KERNEL_435
......@@ -356,6 +356,6 @@ file krnl386.exe
621 stub KERNEL_621
627 stub IsBadFlatReadWritePtr
630 stub KERNEL_630
631 pascal FUNC004(word word word) FUNC004 #C16ThkSl01?
631 register FUNC004(word word word) FUNC004 #C16ThkSl01?
651 stub KERNEL_651 #ThunkConnect16?
700 pascal KERNEL_700() stub_KERNEL_700
......@@ -618,9 +618,17 @@ FARPROC16 WINAPI THUNK_SetResourceHandler( HMODULE16 hModule, SEGPTR typeId, FAR
/***********************************************************************
* THUNK_WOWCallback16Ex (WOW32.3)(KERNEL32.55)
* Generic thunking routine to call 16 bit functions from 32bit code.
*
* RETURNS
* TRUE if the call was done
*/
static BOOL32 WINAPI THUNK_WOWCallback16Ex(
FARPROC16 proc,DWORD dwFlags,DWORD cbArgs,LPVOID xargs,LPDWORD pdwret
FARPROC16 proc, /* [in] 16bit function to call */
DWORD dwFlags, /* [in] flags (WCB_*) */
DWORD cbArgs, /* [in] number of arguments */
LPVOID xargs, /* [in/out] arguments */
LPDWORD pdwret /* [out] return value of the 16bit call */
) {
LPDWORD args = (LPDWORD)xargs;
DWORD ret,i;
......
......@@ -12,4 +12,4 @@ type win16
10 stub REGISTERTYPELIB
11 stub LOADREGTYPELIB
14 pascal QueryPathOfRegTypeLib(ptr word word word ptr) QueryPathOfRegTypeLib
15 stub OABUILDVERSION
15 pascal OABuildVersion() OABuildVersion
......@@ -399,8 +399,8 @@ file user.exe
434 pascal16 IsCharAlphaNumeric(word) IsCharAlphaNumeric16
435 pascal16 IsCharUpper(word) IsCharUpper16
436 pascal16 IsCharLower(word) IsCharLower16
437 pascal16 AnsiUpperBuff(ptr word) AnsiUpperBuff16
438 pascal16 AnsiLowerBuff(ptr word) AnsiLowerBuff16
437 pascal16 AnsiUpperBuff(str word) AnsiUpperBuff16
438 pascal16 AnsiLowerBuff(str word) AnsiLowerBuff16
441 pascal16 InsertMenuItem(word word word ptr) InsertMenuItem16
443 stub GetMenuItemInfo
445 pascal DefFrameProc(word word word word long) DefFrameProc16
......
......@@ -2,12 +2,12 @@ name w32sys
type win16
#1 WEP
2 stub ISPEFORMAT
2 pascal16 IsPeFormat(str word) IsPeFormat
3 stub EXECPE
4 stub GETPEEXEINFO
5 return GETW32SYSVERSION 0 0x100
6 stub LOADPERESOURCE
7 stub GETPERESOURCETABLE
7 pascal16 GetPEResourceTable(word) GetPEResourceTable
8 stub EXECPEEX
9 stub ITSME
10 stub W32SERROR
......
/* XPM */
static char * obm_restore_95[] = {
"16 14 6 1",
" s button_highlight c white",
"+ s button_edge c grey85",
"X s button_face c grey75",
"o s button_shadow c grey50",
". s button_text c black",
"O s window_frame c black",
" O",
" +++++++++++++oO",
" +XXX......XXXoO",
" +XXX......XXXoO",
" +XXX.XXXX.XXXoO",
" +X......X.XXXoO",
" +X......X.XXXoO",
" +X.XXXX...XXXoO",
" +X.XXXX.XXXXXoO",
" +X.XXXX.XXXXXoO",
" +X......XXXXXoO",
" +XXXXXXXXXXXXoO",
" ooooooooooooooO",
"OOOOOOOOOOOOOOOO"};
/* XPM */
static char * obm_restored_95[] = {
"16 14 6 1",
" s button_highlight c white",
"+ s button_edge c grey85",
"X s button_face c grey75",
"o s button_shadow c grey50",
". s button_text c black",
"O s window_frame c black",
"OOOOOOOOOOOOOOO ",
"Oooooooooooooo+ ",
"OoXXXXXXXXXXXX+ ",
"OoXXXX......XX+ ",
"OoXXXX......XX+ ",
"OoXXXX.XXXX.XX+ ",
"OoXX......X.XX+ ",
"OoXX......X.XX+ ",
"OoXX.XXXX...XX+ ",
"OoXX.XXXX.XXXX+ ",
"OoXX.XXXX.XXXX+ ",
"OoXX......XXXX+ ",
"O++++++++++++++ ",
" "};
/* XPM */
static char *ocr_appstarting[] = {
" 32 32 3 1 0 0",
" s None c None",
". s black c black",
"X s white c white",
". ",
".. .......... ",
".X. ..XXXXXX.. ",
".XX. .......... ",
".XXX. .XXXXXX. ",
".XXXX. .XXXXXX. ",
".XXXXX. .XXX.XX. ",
".XXXXXX. ..X.XX.. ",
".XXXXXXX. ..XX.. ",
".XXXXXXXX. ..X. ",
".XXXXX..... ..XX.. ",
".XX.XX. ..XXXX.. ",
".X. .XX. .XX.XXX. ",
".. .XX. .X.X.XX. ",
". .XX. ..X.X.X. ",
" .XX. .......... ",
" .XX. ..XXXXXX.. ",
" .XX. .......... ",
" .. ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
};
/* XPM */
static char *ocr_help[] = {
" 32 32 3 1 0 0",
" s None c None",
". s black c black",
"X s white c white",
". ",
".. XXXXXXX ",
".X. X.......X ",
".XX. X...XX....X ",
".XXX. X...X X....X ",
".XXXX. X...X X....X ",
".XXXXX. X...X X....X ",
".XXXXXX. X...X X...X ",
".XXXXXXX.XXXXX X...X ",
".XXXXXXXX. X...X ",
".XXXXX..... X...X ",
".XX.XX. X...X ",
".X. .XX. X...X ",
".. .XX. XXX ",
". .XX. X...X ",
" .XX. X.....X ",
" .XX. X...X ",
" .XX. XXX ",
" .. ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
};
/* XPM */
static char *ocr_no[] = {
"32 32 3 1 16 16",
" s None c None",
". s white c white",
"X s black c black",
" ",
" ",
" ",
" ",
" ",
" ",
" ...... ",
" ..XXXXXX.. ",
" .XXXXXXXXXX. ",
" .XXXX....XXXX. ",
" .XXX.. ..XXX. ",
" .XXXXX. .XXX. ",
" .XX.XXX. .XX. ",
" .XXX..XXX. .XXX. ",
" .XX. .XXX. .XX. ",
" .XX. .XXX. .XX. ",
" .XX. .XXX. .XX. ",
" .XX. .XXX. .XX. ",
" .XXX. .XXX..XXX. ",
" .XX. .XXX.XX. ",
" .XXX. .XXXXX. ",
" .XXX.. ..XXX. ",
" .XXXX....XXXX. ",
" .XXXXXXXXXX. ",
" ..XXXXXX.. ",
" ...... ",
" ",
" ",
" ",
" ",
" ",
" "};
......@@ -31,11 +31,11 @@ typedef struct
UINT32 dwStyle;
HWND32 hWndEdit;
HWND32 hWndLBox;
UINT16 wState;
HFONT16 hFont;
RECT16 RectCombo;
RECT16 RectEdit;
RECT16 RectButton;
UINT32 wState;
HFONT32 hFont;
RECT32 RectCombo;
RECT32 RectEdit;
RECT32 RectButton;
INT32 droppedWidth; /* last two are not used unless set */
INT32 editHeight; /* explicitly */
} HEADCOMBO,*LPHEADCOMBO;
......
......@@ -9,6 +9,21 @@
void WINAPI InitCommonControls(void);
/* common control styles */
#define CCS_TOP 0x00000001L
#define CCS_NOMOVEY 0x00000002L
#define CCS_BOTTOM 0x00000003L
#define CCS_NORESIZE 0x00000004L
#define CCS_NOPARENTALIGN 0x00000008L
#define CCS_ADJUSTABLE 0x00000020L
#define CCS_NODIVIDER 0x00000040L
#define CCS_VERT 0x00000080L
#define CCS_LEFT (CCS_VERT|CCS_TOP)
#define CCS_RIGHT (CCS_VERT|CCS_BOTTOM)
#define CCS_NOMOVEX (CCS_VERT|CCS_NOMOVEY)
/* StatusWindow */
#define STATUSCLASSNAME16 "msctls_statusbar"
......@@ -38,7 +53,6 @@ void WINAPI InitCommonControls(void);
#define SBT_RTLREADING 0x0400
#define SBT_OWNERDRAW 0x1000
#define CCS_BOTTOM 0x0003
#define SBARS_SIZEGRIP 0x0100
/* UpDown */
......@@ -117,19 +131,19 @@ struct _IMAGELIST;
typedef struct _IMAGELIST *HIMAGELIST;
#endif /* __WINE__ */
#define CLR_NONE 0xFFFFFFFF
#define CLR_DEFAULT 0x00000000
#define CLR_HILIGHT CLR_DEFAULT
#define CLR_NONE 0xFFFFFFFF
#define CLR_DEFAULT 0xFF000000
#define CLR_HILIGHT CLR_DEFAULT
#define ILC_MASK 0x0001
#define ILC_COLOR 0x0000
#define ILC_COLORDDB 0x00FE
#define ILC_COLOR4 0x0004
#define ILC_COLOR8 0x0008
#define ILC_COLOR16 0x0010
#define ILC_COLOR24 0x0018
#define ILC_COLOR32 0x0020
#define ILC_PALETTE 0x0800
#define ILC_MASK 0x0001
#define ILC_COLOR 0x0000
#define ILC_COLORDDB 0x00FE
#define ILC_COLOR4 0x0004
#define ILC_COLOR8 0x0008
#define ILC_COLOR16 0x0010
#define ILC_COLOR24 0x0018
#define ILC_COLOR32 0x0020
#define ILC_PALETTE 0x0800 /* no longer supported by M$ */
#define ILD_NORMAL 0x0000
#define ILD_TRANSPARENT 0x0001
......@@ -146,6 +160,10 @@ typedef struct _IMAGELIST *HIMAGELIST;
#define INDEXTOOVERLAYMASK(i) ((i)<<8)
#define ILCF_MOVE (0x00000000)
#define ILCF_SWAP (0x00000001)
typedef struct _IMAGEINFO
{
HBITMAP32 hbmImage;
......@@ -156,20 +174,48 @@ typedef struct _IMAGEINFO
} IMAGEINFO;
typedef struct _IMAGELISTDRAWPARAMS
{
DWORD cbSize;
HIMAGELIST himl;
INT32 i;
HDC32 hdcDst;
INT32 x;
INT32 y;
INT32 cx;
INT32 cy;
INT32 xBitmap; // x offest from the upperleft of bitmap
INT32 yBitmap; // y offset from the upperleft of bitmap
COLORREF rgbBk;
COLORREF rgbFg;
UINT32 fStyle;
DWORD dwRop;
} IMAGELISTDRAWPARAMS, *LPIMAGELISTDRAWPARAMS;
INT32 WINAPI ImageList_Add(HIMAGELIST,HBITMAP32,HBITMAP32);
INT32 WINAPI ImageList_AddMasked(HIMAGELIST,HBITMAP32,COLORREF);
BOOL32 WINAPI ImageList_BeginDrag(HIMAGELIST,INT32,INT32,INT32);
BOOL32 WINAPI ImageList_Copy(HIMAGELIST,INT32,HIMAGELIST,INT32,INT32);
HIMAGELIST WINAPI ImageList_Create(INT32,INT32,UINT32,INT32,INT32);
BOOL32 WINAPI ImageList_Destroy(HIMAGELIST);
BOOL32 WINAPI ImageList_DragEnter(HWND32,INT32,INT32);
BOOL32 WINAPI ImageList_DragLeave(HWND32);
BOOL32 WINAPI ImageList_DragMove(INT32,INT32);
BOOL32 WINAPI ImageList_DragShowNolock (BOOL32 bShow);
BOOL32 WINAPI ImageList_Draw(HIMAGELIST,INT32,HDC32,INT32,INT32,UINT32);
BOOL32 WINAPI ImageList_DrawEx(HIMAGELIST,INT32,HDC32,INT32,INT32,INT32,
INT32,COLORREF,COLORREF,UINT32);
BOOL32 WINAPI ImageList_DrawIndirect(IMAGELISTDRAWPARAMS*);
HIMAGELIST WINAPI ImageList_Duplicate(HIMAGELIST);
BOOL32 WINAPI ImageList_EndDrag (VOID);
COLORREF WINAPI ImageList_GetBkColor(HIMAGELIST);
HIMAGELIST WINAPI ImageList_GetDragImage(POINT32*,POINT32*);
HICON32 WINAPI ImageList_GetIcon(HIMAGELIST,INT32,UINT32);
BOOL32 WINAPI ImageList_GetIconSize(HIMAGELIST,INT32*,INT32*);
INT32 WINAPI ImageList_GetImageCount(HIMAGELIST);
BOOL32 WINAPI ImageList_GetImageInfo(HIMAGELIST,INT32,IMAGEINFO*);
BOOL32 WINAPI ImageList_GetImageRect (HIMAGELIST,INT32,LPRECT32);
HIMAGELIST WINAPI ImageList_LoadImage32A(HINSTANCE32,LPCSTR,INT32,INT32,
COLORREF,UINT32,UINT32);
HIMAGELIST WINAPI ImageList_LoadImage32W(HINSTANCE32,LPCWSTR,INT32,INT32,
......@@ -177,15 +223,21 @@ HIMAGELIST WINAPI ImageList_LoadImage32W(HINSTANCE32,LPCWSTR,INT32,INT32,
#define ImageList_LoadImage WINELIB_NAME_AW(ImageList_LoadImage)
HIMAGELIST WINAPI ImageList_Merge(HIMAGELIST,INT32,HIMAGELIST,INT32,INT32,INT32);
BOOL32 WINAPI ImageList_Remove(HIMAGELIST,INT32);
BOOL32 WINAPI ImageList_Replace(HIMAGELIST,INT32,HBITMAP32,HBITMAP32);
INT32 WINAPI ImageList_ReplaceIcon(HIMAGELIST,INT32,HICON32);
COLORREF WINAPI ImageList_SetBkColor(HIMAGELIST,COLORREF);
BOOL32 WINAPI ImageList_SetDragCursorImage(HIMAGELIST,INT32,INT32,INT32);
BOOL32 WINAPI ImageList_SetIconSize (HIMAGELIST,INT32,INT32);
BOOL32 WINAPI ImageList_SetImageCount (HIMAGELIST,INT32);
BOOL32 WINAPI ImageList_SetOverlayImage(HIMAGELIST,INT32,INT32);
#define ImageList_AddIcon(himl,hicon) ImageList_ReplaceIcon(himl,-1,hicon)
#define ImageList_ExtractIcon(hi,himl,i) ImageList_GetIcon(himl,i,0)
#define ImageList_LoadBitmap(hi,lpbmp,cx,cGrow,crMask) \
ImageList_LoadImage(hi,lpbmp,cx,cGrow,crMask,IMAGE_BITMAP,0)
#define ImageList_RemoveAll(himl) ImageList_Remove(himl,-1)
#endif /* __WINE_COMMCTRL_H */
......@@ -174,7 +174,8 @@ typedef FINDREPLACE *LPFINDREPLACE;
#pragma pack(1)
typedef struct {
typedef struct
{
DWORD lStructSize;
HWND16 hwndOwner; /* caller's window handle */
HDC16 hDC; /* printer DC/IC or NULL */
......@@ -195,8 +196,27 @@ typedef struct {
short nSizeMin WINE_PACKED; /* minimum pt size allowed & */
short nSizeMax WINE_PACKED; /* max pt size allowed if */
/* CF_LIMITSIZE is used */
} CHOOSEFONT;
typedef CHOOSEFONT *LPCHOOSEFONT;
} CHOOSEFONT, *LPCHOOSEFONT;
typedef struct
{
UINT32 lStructSize;
HWND32 hwndOwner;
HDC32 hDC;
LPLOGFONT32A lpLogFont;
INT32 iPointSize;
UINT32 Flags;
COLORREF rgbColors;
LPARAM lCustData;
WNDPROC32 lpfnHook;
LPCSTR lpTemplateName;
HINSTANCE32 hInstance;
LPSTR lpszStyle;
UINT16 nFontType;
UINT16 ___MISSING_ALIGNMENT__;
INT32 nSizeMin;
INT32 nSizeMax;
} CHOOSEFONT32A, *PCHOOSEFONT32A;
#pragma pack(4)
......
......@@ -24,6 +24,10 @@ OLESTATUS WINAPI CLSIDFromString32(LPCOLESTR32, CLSID *);
OLESTATUS WINAPI WINE_StringFromCLSID(const CLSID *id, LPSTR);
OLESTATUS WINAPI StringFromGUID2(const REFGUID *id, LPOLESTR32 *str, INT32 cmax);
// #define StringFromGUID2 WINELIB_NAME(StringFromGUID2)
#ifdef INITGUID
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
const GUID name =\
......
......@@ -6,97 +6,112 @@
/* Definitions for channels identifiers */
#define dbch_accel 0
#define dbch_aspi 1
#define dbch_atom 2
#define dbch_bitblt 3
#define dbch_bitmap 4
#define dbch_caret 5
#define dbch_cdaudio 6
#define dbch_class 7
#define dbch_clipboard 8
#define dbch_clipping 9
#define dbch_combo 10
#define dbch_comm 11
#define dbch_commdlg 12
#define dbch_console 13
#define dbch_crtdll 14
#define dbch_cursor 15
#define dbch_dc 16
#define dbch_dde 17
#define dbch_ddeml 18
#define dbch_ddraw 19
#define dbch_dialog 20
#define dbch_dll 21
#define dbch_dosfs 22
#define dbch_driver 23
#define dbch_dsound 24
#define dbch_edit 25
#define dbch_event 26
#define dbch_exec 27
#define dbch_file 28
#define dbch_fixup 29
#define dbch_font 30
#define dbch_gdi 31
#define dbch_global 32
#define dbch_graphics 33
#define dbch_heap 34
#define dbch_hook 35
#define dbch_icon 36
#define dbch_int 37
#define dbch_int21 38
#define dbch_key 39
#define dbch_keyboard 40
#define dbch_ldt 41
#define dbch_listbox 42
#define dbch_local 43
#define dbch_mci 44
#define dbch_mcianim 45
#define dbch_mciwave 46
#define dbch_mdi 47
#define dbch_menu 48
#define dbch_message 49
#define dbch_metafile 50
#define dbch_midi 51
#define dbch_mmaux 52
#define dbch_mmio 53
#define dbch_mmsys 54
#define dbch_mmtime 55
#define dbch_module 56
#define dbch_msg 57
#define dbch_nonclient 58
#define dbch_ole 59
#define dbch_palette 60
#define dbch_profile 61
#define dbch_progress 62
#define dbch_prop 63
#define dbch_reg 64
#define dbch_region 65
#define dbch_relay 66
#define dbch_resource 67
#define dbch_scroll 68
#define dbch_selector 69
#define dbch_sem 70
#define dbch_sendmsg 71
#define dbch_shm 72
#define dbch_static 73
#define dbch_stress 74
#define dbch_string 75
#define dbch_task 76
#define dbch_text 77
#define dbch_thunk 78
#define dbch_timer 79
#define dbch_toolhelp 80
#define dbch_tweak 81
#define dbch_uitools 82
#define dbch_updown 83
#define dbch_ver 84
#define dbch_virtual 85
#define dbch_vxd 86
#define dbch_win 87
#define dbch_win16drv 88
#define dbch_win32 89
#define dbch_winsock 90
#define dbch_x11 91
#define dbch_advapi 1
#define dbch_aspi 2
#define dbch_atom 3
#define dbch_bitblt 4
#define dbch_bitmap 5
#define dbch_caret 6
#define dbch_cd 7
#define dbch_cdaudio 8
#define dbch_class 9
#define dbch_clipboard 10
#define dbch_clipping 11
#define dbch_combo 12
#define dbch_comm 13
#define dbch_commdlg 14
#define dbch_console 15
#define dbch_crtdll 16
#define dbch_cursor 17
#define dbch_dc 18
#define dbch_dde 19
#define dbch_ddeml 20
#define dbch_ddraw 21
#define dbch_debug 22
#define dbch_dialog 23
#define dbch_dll 24
#define dbch_dosfs 25
#define dbch_driver 26
#define dbch_dsound 27
#define dbch_edit 28
#define dbch_event 29
#define dbch_exec 30
#define dbch_file 31
#define dbch_fixup 32
#define dbch_font 33
#define dbch_gdi 34
#define dbch_global 35
#define dbch_graphics 36
#define dbch_heap 37
#define dbch_hook 38
#define dbch_icon 39
#define dbch_imagelist 40
#define dbch_int 41
#define dbch_int21 42
#define dbch_int31 43
#define dbch_key 44
#define dbch_keyboard 45
#define dbch_ldt 46
#define dbch_listbox 47
#define dbch_local 48
#define dbch_mci 49
#define dbch_mcianim 50
#define dbch_mciwave 51
#define dbch_mdi 52
#define dbch_menu 53
#define dbch_message 54
#define dbch_metafile 55
#define dbch_midi 56
#define dbch_mmaux 57
#define dbch_mmio 58
#define dbch_mmsys 59
#define dbch_mmtime 60
#define dbch_module 61
#define dbch_mpr 62
#define dbch_msg 63
#define dbch_nonclient 64
#define dbch_ntdll 65
#define dbch_ole 66
#define dbch_palette 67
#define dbch_print 68
#define dbch_profile 69
#define dbch_progress 70
#define dbch_prop 71
#define dbch_reg 72
#define dbch_region 73
#define dbch_relay 74
#define dbch_resource 75
#define dbch_scroll 76
#define dbch_security 77
#define dbch_selector 78
#define dbch_sem 79
#define dbch_sendmsg 80
#define dbch_shell 81
#define dbch_shm 82
#define dbch_sound 83
#define dbch_static 84
#define dbch_stress 85
#define dbch_string 86
#define dbch_task 87
#define dbch_text 88
#define dbch_thread 89
#define dbch_thunk 90
#define dbch_timer 91
#define dbch_toolhelp 92
#define dbch_tweak 93
#define dbch_uitools 94
#define dbch_updown 95
#define dbch_ver 96
#define dbch_virtual 97
#define dbch_vxd 98
#define dbch_win 99
#define dbch_win16drv 100
#define dbch_win32 101
#define dbch_wing 102
#define dbch_winsock 103
#define dbch_wnet 104
#define dbch_x11 105
#define dbch_x11drv 106
/* Definitions for classes identifiers */
#define dbcl_fixme 0
#define dbcl_err 1
......
......@@ -4,7 +4,7 @@
#include "debugtools.h"
#endif
#define DEBUG_CHANNEL_COUNT 92
#define DEBUG_CHANNEL_COUNT 107
#ifdef DEBUG_RUNTIME
short debug_msg_enabled[][DEBUG_CLASS_COUNT] = {
{1, 1, 0, 0},
......@@ -99,14 +99,31 @@ short debug_msg_enabled[][DEBUG_CLASS_COUNT] = {
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
};
const char* debug_ch_name[] = {
"accel",
"advapi",
"aspi",
"atom",
"bitblt",
"bitmap",
"caret",
"cd",
"cdaudio",
"class",
"clipboard",
......@@ -121,6 +138,7 @@ const char* debug_ch_name[] = {
"dde",
"ddeml",
"ddraw",
"debug",
"dialog",
"dll",
"dosfs",
......@@ -138,8 +156,10 @@ const char* debug_ch_name[] = {
"heap",
"hook",
"icon",
"imagelist",
"int",
"int21",
"int31",
"key",
"keyboard",
"ldt",
......@@ -158,10 +178,13 @@ const char* debug_ch_name[] = {
"mmsys",
"mmtime",
"module",
"mpr",
"msg",
"nonclient",
"ntdll",
"ole",
"palette",
"print",
"profile",
"progress",
"prop",
......@@ -170,15 +193,19 @@ const char* debug_ch_name[] = {
"relay",
"resource",
"scroll",
"security",
"selector",
"sem",
"sendmsg",
"shell",
"shm",
"sound",
"static",
"stress",
"string",
"task",
"text",
"thread",
"thunk",
"timer",
"toolhelp",
......@@ -191,8 +218,11 @@ const char* debug_ch_name[] = {
"win",
"win16drv",
"win32",
"wing",
"winsock",
"wnet",
"x11",
"x11drv",
};
const char* debug_cl_name[] = {
"fixme",
......
......@@ -3,10 +3,10 @@
#define __WINE_DEBUGTOOLS_H
#include <stdio.h>
#include "debugstr.h"
#define DEBUG_RUNTIME
#define stddeb stdout
#define stdnimp stdout
#define stddeb stderr
#define DEBUG_CLASS_COUNT 4
......@@ -31,8 +31,7 @@ extern short debug_msg_enabled[][DEBUG_CLASS_COUNT];
(dbg_ch_index(ch) >=0 && dbg_cl_index(cl) >= 0 && \
debug_msg_enabled[dbg_ch_index(ch)][dbg_cl_index(cl)])
#define DPRINTF(format, args...) \
fprintf(stddeb, format, ## args)
#define DPRINTF(format, args...) fprintf(stddeb, format, ## args)
#define DPRINTF_(cl, ch, format, args...) \
if(!DEBUGGING(cl, ch)) ; \
......@@ -43,6 +42,9 @@ extern short debug_msg_enabled[][DEBUG_CLASS_COUNT];
#define FIXME(ch, fmt, args...) DPRINTF_(fixme, ch, fmt, ## args)
#define ERR(ch, fmt, args...) DPRINTF_(err, ch, fmt, ## args)
#define DUMP(format, args...) DPRINTF(format, ## args)
#define MSG(format, args...) fprintf(stderr, format, ## args)
#define FIXME_ON(ch) DEBUGGING(fixme, ch)
#define ERR_ON(ch) DEBUGGING(err, ch)
#define WARN_ON(ch) DEBUGGING(warn, ch)
......
......@@ -44,4 +44,26 @@ extern LPSTR HEAP_strdupWtoA( HANDLE32 heap, DWORD flags, LPCWSTR str );
/* Use this one only when you own the lock! */
#define SYSTEM_LOCK_COUNT() (HEAP_SystemLock->RecursionCount)
typedef struct
{
LPVOID lpData;
DWORD cbData;
BYTE cbOverhead;
BYTE iRegionIndex;
WORD wFlags;
union {
struct {
HANDLE32 hMem;
DWORD dwReserved[3];
} Block;
struct {
DWORD dwCommittedSize;
DWORD dwUnCommittedSize;
LPVOID lpFirstBlock;
LPVOID lpLastBlock;
} Region;
} Foo;
} PROCESS_HEAP_ENTRY, *LPPROCESS_HEAP_ENTRY;
#endif /* __WINE_HEAP_H */
......@@ -9,20 +9,24 @@
struct _IMAGELIST
{
HANDLE32 hHeap;
HBITMAP32 hbmImage;
HBITMAP32 hbmMask;
HBRUSH32 hbrushBlend25;
HBRUSH32 hbrushBlend50;
COLORREF clrBk;
INT32 cInitial;
INT32 cGrow;
INT32 cMaxImage;
INT32 cCurImage;
INT32 cx;
INT32 cy;
UINT32 flags;
INT32 nOvlIdx[4];
UINT32 uBitsPixel;
INT32 nOvlIdx[15];
};
typedef struct _IMAGELIST *HIMAGELIST;
#endif /* __WINE_IMAGELIST_H */
......@@ -9,6 +9,7 @@
#include "gdi.h"
/* FIXME: SDK docs says these should be 1 and 2 */
/* DR 980322: most wmf's have 1, so I think 0 and 1 is correct */
#define METAFILE_MEMORY 0
#define METAFILE_DISK 1
......
......@@ -481,6 +481,8 @@ typedef WORD *LPKEYARRAY;
#define MOM_CLOSE MM_MOM_CLOSE
#define MOM_DONE MM_MOM_DONE
/* device ID for MIDI mapper */
#define MIDIMAPPER (-1)
#define MIDI_MAPPER (-1)
......
/*****************************************************************************
* Copyright 1998, Luiz Otavio L. Zorzella
*
* File: multimedia.h
* Purpose: multimedia declarations
*
*****************************************************************************
*/
#ifndef __WINE_MULTIMEDIA_H
#define __WINE_MULTIMEDIA_H
#include "mmsystem.h"
#define MAX_MIDIINDRV (1)
/* For now I'm making 16 the maximum number of midi devices one can
* have. This should be more than enough for everybody. But as a purist,
* I intend to make it unbounded in the future, as soon as I figure
* a good way to do so.
*/
#define MAX_MIDIOUTDRV (16)
#define MAX_MCIMIDIDRV (1)
#if defined (linux)
#define __HAS_SOUNDCARD_H__
#include <sys/soundcard.h>
#elif defined (__FreeBSD__)
#define __HAS_SOUNDCARD_H__
#include <machine/soundcard.h>
#include <sys/errno.h>
#endif
#if defined (__HAS_SOUNDCARD_H__)
#define MIDI_DEV "/dev/sequencer"
#ifdef SOUND_VERSION
#define IOCTL(a,b,c) ioctl(a,b,&c)
#else
#define IOCTL(a,b,c) (c = ioctl(a,b,c) )
#endif
typedef struct {
int unixdev;
int state;
DWORD bufsize;
MIDIOPENDESC midiDesc;
WORD wFlags;
LPMIDIHDR lpQueueHdr;
DWORD dwTotalPlayed;
} LINUX_MIDIIN;
typedef struct {
int unixdev;
int state;
DWORD bufsize;
MIDIOPENDESC midiDesc;
WORD wFlags;
LPMIDIHDR lpQueueHdr;
DWORD dwTotalPlayed;
} LINUX_MIDIOUT;
typedef struct {
int nUseCount; /* Incremented for each shared open */
BOOL16 fShareable; /* TRUE if first open was shareable */
WORD wNotifyDeviceID; /* MCI device ID with a pending notification */
HANDLE16 hCallback; /* Callback handle for pending notification */
HMMIO16 hFile; /* mmio file handle open as Element */
DWORD dwBeginData;
DWORD dwTotalLen;
WORD wFormat;
WORD nTracks;
WORD nTempo;
MCI_OPEN_PARMS16 openParms;
/* MIDIHDR MidiHdr; */
HLOCAL16 hMidiHdr;
WORD dwStatus;
} LINUX_MCIMIDI;
#endif
#endif /* __WINE_MULTIMEDIA_H */
......@@ -31,9 +31,7 @@ typedef struct
WORD e_oemid; /* 24: OEM identifier (for e_oeminfo) */
WORD e_oeminfo; /* 26: OEM information; e_oemid specific */
WORD e_res2[10]; /* 28: Reserved words */
WORD e_lfanew; /* 3c: Offset to extended header */
WORD e_xxx; /* 3e: Wine internal pad (some programs expect
* this to be 0) */
DWORD e_lfanew; /* 3c: Offset to extended header */
} IMAGE_DOS_HEADER,*LPIMAGE_DOS_HEADER;
#define IMAGE_DOS_SIGNATURE 0x5A4D /* MZ */
......
......@@ -59,41 +59,42 @@ typedef struct _IMAGE_OPTIONAL_HEADER
* Standard fields.
*/
WORD Magic;
BYTE MajorLinkerVersion;
BYTE MinorLinkerVersion;
DWORD SizeOfCode;
DWORD SizeOfInitializedData;
DWORD SizeOfUninitializedData;
DWORD AddressOfEntryPoint;
DWORD BaseOfCode;
DWORD BaseOfData;
WORD Magic; /* 00 */
BYTE MajorLinkerVersion; /* 02 */
BYTE MinorLinkerVersion; /* 03 */
DWORD SizeOfCode; /* 04 */
DWORD SizeOfInitializedData; /* 08 */
DWORD SizeOfUninitializedData; /* 0C */
DWORD AddressOfEntryPoint; /* 10 */
DWORD BaseOfCode; /* 14 */
DWORD BaseOfData; /* 18 */
/*
* NT additional fields.
*/
DWORD ImageBase;
DWORD SectionAlignment;
DWORD FileAlignment;
WORD MajorOperatingSystemVersion;
WORD MinorOperatingSystemVersion;
WORD MajorImageVersion;
WORD MinorImageVersion;
WORD MajorSubsystemVersion;
WORD MinorSubsystemVersion;
DWORD Reserved1;
DWORD SizeOfImage;
DWORD SizeOfHeaders;
DWORD CheckSum;
WORD Subsystem;
WORD DllCharacteristics;
DWORD SizeOfStackReserve;
DWORD SizeOfStackCommit;
DWORD SizeOfHeapReserve;
DWORD SizeOfHeapCommit;
DWORD LoaderFlags;
DWORD NumberOfRvaAndSizes;
DWORD ImageBase; /* 1C */
DWORD SectionAlignment; /* 20 */
DWORD FileAlignment; /* 24 */
WORD MajorOperatingSystemVersion; /* 28 */
WORD MinorOperatingSystemVersion; /* 2A */
WORD MajorImageVersion; /* 2C */
WORD MinorImageVersion; /* 2E */
WORD MajorSubsystemVersion; /* 30 */
WORD MinorSubsystemVersion; /* 32 */
DWORD Reserved1; /* 34 */
DWORD SizeOfImage; /* 38 */
DWORD SizeOfHeaders; /* 3C */
DWORD CheckSum; /* 40 */
WORD Subsystem; /* 44 */
WORD DllCharacteristics; /* 46 */
DWORD SizeOfStackReserve; /* 48 */
DWORD SizeOfStackCommit; /* 4C */
DWORD SizeOfHeapReserve; /* 50 */
DWORD SizeOfHeapCommit; /* 54 */
DWORD LoaderFlags; /* 58 */
DWORD NumberOfRvaAndSizes; /* 5C */
/* 60: */
IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
} IMAGE_OPTIONAL_HEADER,*LPIMAGE_OPTIONAL_HEADER;
......@@ -140,9 +141,9 @@ typedef struct _IMAGE_OPTIONAL_HEADER
#define IMAGE_SUBSYSTEM_POSIX_CUI 7
typedef struct _IMAGE_NT_HEADERS {
DWORD Signature;
IMAGE_FILE_HEADER FileHeader;
IMAGE_OPTIONAL_HEADER OptionalHeader;
DWORD Signature; /* 00: PE\0\0 */
IMAGE_FILE_HEADER FileHeader; /* 04: Fileheader */
IMAGE_OPTIONAL_HEADER OptionalHeader; /* 18: Optional Header */
} IMAGE_NT_HEADERS,*LPIMAGE_NT_HEADERS;
......@@ -161,19 +162,20 @@ typedef struct _IMAGE_NT_HEADERS {
#define IMAGE_SIZEOF_SHORT_NAME 8
typedef struct _IMAGE_SECTION_HEADER {
BYTE Name[IMAGE_SIZEOF_SHORT_NAME];
BYTE Name[IMAGE_SIZEOF_SHORT_NAME]; /* 00: */
union {
DWORD PhysicalAddress;
DWORD VirtualSize;
DWORD PhysicalAddress; /* 04: */
DWORD VirtualSize; /* 04: */
} Misc;
DWORD VirtualAddress;
DWORD SizeOfRawData;
DWORD PointerToRawData;
DWORD PointerToRelocations;
DWORD PointerToLinenumbers;
WORD NumberOfRelocations;
WORD NumberOfLinenumbers;
DWORD Characteristics;
DWORD VirtualAddress; /* 08: */
DWORD SizeOfRawData; /* 0C: */
DWORD PointerToRawData; /* 10: */
DWORD PointerToRelocations; /* 14: */
DWORD PointerToLinenumbers; /* 18: */
WORD NumberOfRelocations; /* 1C: */
WORD NumberOfLinenumbers; /* 1E: */
DWORD Characteristics; /* 20: */
/* 24: */
} IMAGE_SECTION_HEADER,*LPIMAGE_SECTION_HEADER;
#define IMAGE_SIZEOF_SECTION_HEADER 40
......
#define WINE_RELEASE_INFO "Wine release 980315"
#define WINE_RELEASE_INFO "Wine release 980329"
......@@ -817,6 +817,8 @@ DECL_WINELIB_TYPE(LPDEBUGHOOKINFO);
#define IDIGNORE 5
#define IDYES 6
#define IDNO 7
#define IDCLOSE 8
#define IDHELP 9
typedef struct
......@@ -2495,6 +2497,9 @@ typedef struct tagCOMSTAT
#define IDC_SIZENESW MAKEINTRESOURCE(32643)
#define IDC_SIZEWE MAKEINTRESOURCE(32644)
#define IDC_SIZENS MAKEINTRESOURCE(32645)
#define IDC_NO MAKEINTRESOURCE(32648)
#define IDC_APPSTARTING MAKEINTRESOURCE(32650)
#define IDC_HELP MAKEINTRESOURCE(32651)
/* OEM Resource Ordinal Numbers */
#define OBM_CLOSE 32754
......@@ -2559,6 +2564,9 @@ typedef struct tagCOMSTAT
#define OCR_SIZENS 32645
#define OCR_SIZEALL 32646
#define OCR_ICOCUR 32647
#define OCR_NO 32648
#define OCR_APPSTARTING 32650
#define OCR_HELP 32651 /* only defined in wine */
#define OIC_SAMPLE 32512
#define OIC_HAND 32513
......
......@@ -518,7 +518,9 @@ typedef struct __aop
#define WSMSG_ASYNC_PROTOBYNUM 0x0020
#define WSMSG_ASYNC_SERVBYNAME 0x0100
#define WSMSG_ASYNC_SERVBYPORT 0x0200
#define WSMSG_ASYNC_WIN32 0x1000
#define WSMSG_ASYNC_RQMASK 0x0fff
#define WSMSG_WIN32_AOP 0x1000
#define WSMSG_DEAD_AOP 0x8000
typedef struct __sop /* WSAAsyncSelect() control struct */
......
......@@ -82,6 +82,7 @@ BOOL32 MAIN_KernelInit(void)
BOOL32 MAIN_UserInit(void)
{
extern BOOL32 WIDGETS_Init(void);
extern BOOL32 MULTIMEDIA_Init(void);
int queueSize;
......@@ -134,6 +135,9 @@ BOOL32 MAIN_UserInit(void)
/* Initialize menus */
if (!MENU_Init()) return FALSE;
/* Initialize multimedia */
if (!MULTIMEDIA_Init()) return FALSE;
/* Create desktop window */
if (!WIN_CreateDesktopWindow()) return FALSE;
......
......@@ -115,86 +115,86 @@ void MODULE_DumpModule( HMODULE32 hModule )
}
/* Dump the module info */
printf( "Module %04x:\n", hModule );
printf( "count=%d flags=%04x heap=%d stack=%d\n",
pModule->count, pModule->flags,
pModule->heap_size, pModule->stack_size );
printf( "cs:ip=%04x:%04x ss:sp=%04x:%04x ds=%04x nb seg=%d modrefs=%d\n",
pModule->cs, pModule->ip, pModule->ss, pModule->sp, pModule->dgroup,
pModule->seg_count, pModule->modref_count );
printf( "os_flags=%d swap_area=%d version=%04x\n",
pModule->os_flags, pModule->min_swap_area,
pModule->expected_version );
DUMP( "---\n" );
DUMP( "Module %04x:\n", hModule );
DUMP( "count=%d flags=%04x heap=%d stack=%d\n",
pModule->count, pModule->flags,
pModule->heap_size, pModule->stack_size );
DUMP( "cs:ip=%04x:%04x ss:sp=%04x:%04x ds=%04x nb seg=%d modrefs=%d\n",
pModule->cs, pModule->ip, pModule->ss, pModule->sp, pModule->dgroup,
pModule->seg_count, pModule->modref_count );
DUMP( "os_flags=%d swap_area=%d version=%04x\n",
pModule->os_flags, pModule->min_swap_area,
pModule->expected_version );
if (pModule->flags & NE_FFLAGS_WIN32)
printf( "PE module=%08x\n", pModule->module32 );
DUMP( "PE module=%08x\n", pModule->module32 );
/* Dump the file info */
printf( "Filename: '%s'\n", NE_MODULE_NAME(pModule) );
DUMP( "---\n" );
DUMP( "Filename: '%s'\n", NE_MODULE_NAME(pModule) );
/* Dump the segment table */
printf( "\nSegment table:\n" );
DUMP( "---\n" );
DUMP( "Segment table:\n" );
pSeg = NE_SEG_TABLE( pModule );
for (i = 0; i < pModule->seg_count; i++, pSeg++)
printf( "%02x: pos=%d size=%d flags=%04x minsize=%d sel=%04x\n",
i + 1, pSeg->filepos, pSeg->size, pSeg->flags,
pSeg->minsize, pSeg->selector );
DUMP( "%02x: pos=%d size=%d flags=%04x minsize=%d sel=%04x\n",
i + 1, pSeg->filepos, pSeg->size, pSeg->flags,
pSeg->minsize, pSeg->selector );
/* Dump the resource table */
printf( "\nResource table:\n" );
DUMP( "---\n" );
DUMP( "Resource table:\n" );
if (pModule->res_table)
{
pword = (WORD *)((BYTE *)pModule + pModule->res_table);
printf( "Alignment: %d\n", *pword++ );
DUMP( "Alignment: %d\n", *pword++ );
while (*pword)
{
struct resource_typeinfo_s *ptr = (struct resource_typeinfo_s *)pword;
struct resource_nameinfo_s *pname = (struct resource_nameinfo_s *)(ptr + 1);
printf( "id=%04x count=%d\n", ptr->type_id, ptr->count );
DUMP( "id=%04x count=%d\n", ptr->type_id, ptr->count );
for (i = 0; i < ptr->count; i++, pname++)
printf( "offset=%d len=%d id=%04x\n",
pname->offset, pname->length, pname->id );
DUMP( "offset=%d len=%d id=%04x\n",
pname->offset, pname->length, pname->id );
pword = (WORD *)pname;
}
}
else printf( "None\n" );
else DUMP( "None\n" );
/* Dump the resident name table */
printf( "\nResident-name table:\n" );
DUMP( "---\n" );
DUMP( "Resident-name table:\n" );
pstr = (char *)pModule + pModule->name_table;
while (*pstr)
{
printf( "%*.*s: %d\n", *pstr, *pstr, pstr + 1,
*(WORD *)(pstr + *pstr + 1) );
DUMP( "%*.*s: %d\n", *pstr, *pstr, pstr + 1,
*(WORD *)(pstr + *pstr + 1) );
pstr += *pstr + 1 + sizeof(WORD);
}
/* Dump the module reference table */
printf( "\nModule ref table:\n" );
DUMP( "---\n" );
DUMP( "Module ref table:\n" );
if (pModule->modref_table)
{
pword = (WORD *)((BYTE *)pModule + pModule->modref_table);
for (i = 0; i < pModule->modref_count; i++, pword++)
{
printf( "%d: %04x -> '%s'\n", i, *pword,
DUMP( "%d: %04x -> '%s'\n", i, *pword,
MODULE_GetModuleName(*pword));
}
}
else printf( "None\n" );
else DUMP( "None\n" );
/* Dump the entry table */
printf( "\nEntry table:\n" );
DUMP( "---\n" );
DUMP( "Entry table:\n" );
pstr = (char *)pModule + pModule->entry_table;
ordinal = 1;
while (*pstr)
{
printf( "Bundle %d-%d: %02x\n", ordinal, ordinal + *pstr - 1, pstr[1]);
DUMP( "Bundle %d-%d: %02x\n", ordinal, ordinal + *pstr - 1, pstr[1]);
if (!pstr[1])
{
ordinal += *pstr;
......@@ -204,34 +204,34 @@ void MODULE_DumpModule( HMODULE32 hModule )
{
struct entry_tab_movable_s *pe = (struct entry_tab_movable_s*)(pstr+2);
for (i = 0; i < *pstr; i++, pe++)
printf( "%d: %02x:%04x (moveable)\n",
ordinal++, pe->seg_number, pe->offset );
DUMP( "%d: %02x:%04x (moveable)\n",
ordinal++, pe->seg_number, pe->offset );
pstr = (char *)pe;
}
else /* fixed */
{
struct entry_tab_fixed_s *pe = (struct entry_tab_fixed_s*)(pstr+2);
for (i = 0; i < *pstr; i++, pe++)
printf( "%d: %04x (fixed)\n",
ordinal++, pe->offset[0] + (pe->offset[1] << 8) );
DUMP( "%d: %04x (fixed)\n",
ordinal++, pe->offset[0] + (pe->offset[1] << 8) );
pstr = (char *)pe;
}
}
/* Dump the non-resident names table */
printf( "\nNon-resident names table:\n" );
DUMP( "---\n" );
DUMP( "Non-resident names table:\n" );
if (pModule->nrname_handle)
{
pstr = (char *)GlobalLock16( pModule->nrname_handle );
while (*pstr)
{
printf( "%*.*s: %d\n", *pstr, *pstr, pstr + 1,
DUMP( "%*.*s: %d\n", *pstr, *pstr, pstr + 1,
*(WORD *)(pstr + *pstr + 1) );
pstr += *pstr + 1 + sizeof(WORD);
}
}
printf( "\n" );
DUMP( "\n" );
}
......
......@@ -289,7 +289,7 @@ BOOL32 NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
else
*(unsigned char*)sp = (unsigned char)((int)address & 0xFF);
}
while (offset != 0xffff && !additive);
while (offset && offset != 0xffff && !additive);
break;
case NE_RADDR_OFFSET16:
......@@ -301,7 +301,7 @@ BOOL32 NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
*sp = LOWORD(address);
if (additive) *sp += offset;
}
while (offset != 0xffff && !additive);
while (offset && offset != 0xffff && !additive);
break;
case NE_RADDR_POINTER32:
......@@ -314,7 +314,7 @@ BOOL32 NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
if (additive) *sp += offset;
*(sp+1) = HIWORD(address);
}
while (offset != 0xffff && !additive);
while (offset && offset != 0xffff && !additive);
break;
case NE_RADDR_SELECTOR:
......@@ -328,7 +328,6 @@ BOOL32 NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
if(additive && offset)
fprintf(stderr,"Additive selector to %4.4x.Please report\n",offset);
}
/* FIXME: Quicken 5 has a zero offset fixup. This seems to work */
while (offset && offset != 0xffff && !additive);
break;
......
......@@ -459,8 +459,8 @@ BOOL32 NE_FreeResource( HMODULE16 hModule, HGLOBAL16 handle )
pTypeInfo = (NE_TYPEINFO *)pNameInfo;
}
TRACE(resource, "[%04x]: no intrinsic resource for %04x\n",
TRACE(resource, "[%04x]: no intrinsic resource for %04x, assuming DirectResAlloc()!\n",
hModule, handle );
GlobalFree16( handle ); /* it could have been DirectResAlloc()'ed */
GlobalFree16( handle );
return handle;
}
......@@ -20,9 +20,9 @@
#include "task.h"
#include "module.h"
#include "resource.h"
#include "debugstr.h"
#include "debug.h"
#include "libres.h"
#include "winerror.h"
extern WORD WINE_LanguageId;
......@@ -414,6 +414,7 @@ HGLOBAL16 WINAPI DirectResAlloc( HINSTANCE16 hInstance, WORD wType,
HACCEL16 WINAPI LoadAccelerators16(HINSTANCE16 instance, SEGPTR lpTableName)
{
HRSRC16 hRsrc;
HACCEL16 hAccel;
if (HIWORD(lpTableName))
TRACE(accel, "%04x '%s'\n",
......@@ -422,8 +423,12 @@ HACCEL16 WINAPI LoadAccelerators16(HINSTANCE16 instance, SEGPTR lpTableName)
TRACE(accel, "%04x %04x\n",
instance, LOWORD(lpTableName) );
if (!(hRsrc = FindResource16( instance, lpTableName, RT_ACCELERATOR )))
if (!(hRsrc = FindResource16( instance, lpTableName, RT_ACCELERATOR ))) {
WARN(accel, "couldn't find accelerator table resource\n");
return 0;
}
TRACE(accel, "returning HACCEL 0x%x\n", hRsrc);
return LoadResource16(instance,hRsrc);
}
......@@ -439,18 +444,26 @@ HACCEL16 WINAPI LoadAccelerators16(HINSTANCE16 instance, SEGPTR lpTableName)
HACCEL32 WINAPI LoadAccelerators32W(HINSTANCE32 instance,LPCWSTR lpTableName)
{
HRSRC32 hRsrc;
HACCEL32 hRetval;
if (HIWORD(lpTableName))
TRACE(accel, "%04x '%s'\n",
instance, (char *)( lpTableName ) );
TRACE(accel, "%p '%s'\n",
(LPVOID)instance, (char *)( lpTableName ) );
else
TRACE(accel, "%04x %04x\n",
instance, LOWORD(lpTableName) );
TRACE(accel, "%p 0x%04x\n",
(LPVOID)instance, LOWORD(lpTableName) );
if (!(hRsrc = FindResource32W( instance, lpTableName,
(LPCWSTR)RT_ACCELERATOR )))
return 0;
return LoadResource32( instance, hRsrc );
(LPCWSTR)RT_ACCELERATOR ))) {
WARN(accel, "couldn't find accelerator table resource\n");
hRetval = 0;
}
else {
hRetval = LoadResource32( instance, hRsrc );
}
TRACE(accel, "returning HACCEL 0x%x\n", hRsrc);
return hRetval;
}
HACCEL32 WINAPI LoadAccelerators32A(HINSTANCE32 instance,LPCSTR lpTableName)
......@@ -471,25 +484,129 @@ HACCEL32 WINAPI LoadAccelerators32A(HINSTANCE32 instance,LPCSTR lpTableName)
*/
INT32 WINAPI CopyAcceleratorTable32A(HACCEL32 src, LPACCEL32 dst, INT32 entries)
{
fprintf(stderr,"CopyAcceleratorTable32A: not implemented: %d\n", entries);
return 0;
return CopyAcceleratorTable32W(src, dst, entries);
}
/**********************************************************************
* CopyAcceleratorTable32W (USER32.59)
*
* By mortene@pvv.org 980321
*/
INT32 WINAPI CopyAcceleratorTable32W(HACCEL32 src, LPACCEL32 dst,
INT32 entries)
{
int i;
LPACCEL32 accel = (LPACCEL32)src;
BOOL32 done = FALSE;
/* Do parameter checking to avoid the explosions and the screaming
as far as possible. */
if((dst && (entries < 1)) || (src == (HACCEL32)NULL)) {
WARN(accel, "Application sent invalid parameters (%p %p %d).\n",
(LPVOID)src, (LPVOID)dst, entries);
return 0;
}
i=0;
while(!done) {
/* Spit out some debugging information. */
TRACE(accel, "accel %d: type 0x%02x, event '%c', IDval 0x%04x.\n",
i, accel[i].fVirt, accel[i].key, accel[i].cmd);
/* Copy data to the destination structure array (if dst == NULL,
we're just supposed to count the number of entries). */
if(dst) {
memcpy(&dst[i], &accel[i], sizeof(ACCEL32));
/* Check if we've reached the end of the application supplied
accelerator table. */
if(i+1 == entries) {
/* Turn off the high order bit, just in case. */
dst[i].fVirt &= 0x7f;
done = TRUE;
}
}
/* The highest order bit seems to mark the end of the accelerator
resource table. (?) */
if((accel[i].fVirt & 0x80) != 0) done = TRUE;
i++;
}
return i;
}
/*********************************************************************
* CreateAcceleratorTable (USER32.64)
*
* By mortene@pvv.org 980321
*/
INT32 WINAPI CopyAcceleratorTable32W(HACCEL32 src, LPACCEL32 dst, INT32 entries)
HACCEL32 WINAPI CreateAcceleratorTable32A(LPACCEL32 lpaccel, INT32 cEntries)
{
fprintf(stderr,"CopyAcceleratorTable32W: not implemented: %d\n", entries);
return 0;
HACCEL32 hAccel;
/* Do parameter checking just in case someone's trying to be
funny. */
if(cEntries < 1) {
WARN(accel, "Application sent invalid parameters (%p %d).\n",
lpaccel, cEntries);
SetLastError(ERROR_INVALID_PARAMETER);
return (HACCEL32)NULL;
}
FIXME(accel, "should check that the accelerator descriptions are valid,"
" return NULL and SetLastError() if not.\n");
/* Allocate memory and copy the table. */
hAccel = (HACCEL32)HeapAlloc(GetProcessHeap(), 0,
cEntries * sizeof(ACCEL32));
TRACE(accel, "handle %p\n", (LPVOID)hAccel);
if(!hAccel) {
WARN(accel, "Out of memory.\n");
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return (HACCEL32)NULL;
}
memcpy((LPACCEL32)hAccel, lpaccel, cEntries * sizeof(ACCEL32));
/* Set the end-of-table terminator. */
((LPACCEL32)hAccel)[cEntries-1].fVirt |= 0x80;
TRACE(accel, "Allocated accelerator handle %x\n", hAccel);
return hAccel;
}
/**********************************************************************
* DestroyAcceleratorTable (USER32.130)
*
* By mortene@pvv.org 980321
*/
BOOL32 WINAPI DestroyAcceleratorTable( HACCEL32 handle )
{
fprintf(stderr,"DestroyAcceleratorTable: not implemented\n");
FIXME(accel, "stub (handle 0x%x)\n", handle);
/* Weird.. I thought this should work. According to the API
specification, DestroyAcceleratorTable() should only be called on
HACCEL32's made by CreateAcceleratorTable(), but Microsoft Visual
Studio 97 calls this function with a series of different handle
values without ever calling CreateAcceleratorTable(). Something
is very fishy in Denmark... */
/* Update: looks like the calls to this function matches the calls
to LoadAccelerators() in M$ Visual Studio, except that the handle
values are off by some variable size from the HACCEL's returned
from LoadAccelerators(). WTH? */
/* Parameter checking to avoid any embarassing situations. */
/* if(!handle) { */
/* WARN(accel, "Application sent NULL ptr.\n"); */
/* SetLastError(ERROR_INVALID_PARAMETER); */
/* return FALSE; */
/* } */
/* HeapFree(GetProcessHeap(), 0, (LPACCEL32)handle); */
return TRUE;
}
......@@ -586,9 +703,8 @@ INT32 WINAPI LoadString32W( HINSTANCE32 instance, UINT32 resource_id,
fprintf(stderr,"LoadString // and try to obtain string '%s'\n", p + 1);
#endif
}
#if 0
TRACE(resource,"'%s' copied !\n", buffer);
#endif
TRACE(resource,"'%s' copied !\n", (char *)buffer);
return i;
}
......
......@@ -74,11 +74,10 @@ static __inline__ int wine_sigaction( int sig, struct kernel_sigaction *new,
}
#endif /* linux && __i386__ */
/* Signal stack */
static char SIGNAL_Stack[16384];
static sigset_t async_signal_set;
/**********************************************************************
* SIGNAL_child
......@@ -155,6 +154,8 @@ BOOL32 SIGNAL_Init(void)
{
extern void SYNC_SetupSignals(void);
sigemptyset(&async_signal_set);
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined (__svr4__) || defined(_SCO_DS)
struct sigaltstack ss;
ss.ss_sp = SIGNAL_Stack;
......@@ -169,11 +170,19 @@ BOOL32 SIGNAL_Init(void)
SIGNAL_SetHandler( SIGCHLD, (void (*)())SIGNAL_child, 1);
#ifdef CONFIG_IPC
sigaddset(&async_signal_set, SIGUSR2);
SIGNAL_SetHandler( SIGUSR2, (void (*)())stop_wait, 1); /* For IPC */
#endif
#ifdef SIGIO
sigaddset(&async_signal_set, SIGIO);
SIGNAL_SetHandler( SIGIO, (void (*)())WINSOCK_sigio, 0);
#endif
sigaddset(&async_signal_set, SIGALRM);
/* ignore SIGPIPE so that WINSOCK can get a EPIPE error instead */
signal (SIGPIPE, SIG_IGN);
SYNC_SetupSignals();
return TRUE;
}
......@@ -184,13 +193,6 @@ BOOL32 SIGNAL_Init(void)
*/
void SIGNAL_MaskAsyncEvents( BOOL32 flag )
{
sigset_t set;
sigemptyset(&set);
#ifdef SIGIO
sigaddset(&set, SIGIO);
#endif
#ifdef CONFIG_IPC
sigaddset(&set, SIGUSR2);
#endif
sigprocmask( (flag) ? SIG_BLOCK : SIG_UNBLOCK , &set, NULL);
sigprocmask( (flag) ? SIG_BLOCK : SIG_UNBLOCK , &async_signal_set, NULL);
}
......@@ -486,7 +486,7 @@ HTASK16 TASK_CreateTask( HMODULE16 hModule, HINSTANCE16 hInstance,
memset( pTask->pdb.fileHandles, 0xff, sizeof(pTask->pdb.fileHandles) );
pTask->pdb.environment = hEnvironment;
pTask->pdb.nbFiles = 20;
lstrcpyn32A( pTask->pdb.cmdLine, cmdLine, 127 );
lstrcpyn32A( pTask->pdb.cmdLine, cmdLine, sizeof(pTask->pdb.cmdLine) );
/* Get the compatibility flags */
......@@ -839,7 +839,7 @@ void WINAPI InitTask( CONTEXT *context )
* es:bx pointer to command-line inside PSP
*/
EAX_reg(context) = 1;
EBX_reg(context) = 0x81;
EBX_reg(context) = pTask->pdb.cmdLine[0] ? 0x81 : 0x80;
ECX_reg(context) = pModule->stack_size;
EDX_reg(context) = pTask->nCmdShow;
ESI_reg(context) = (DWORD)pTask->hPrevInstance;
......@@ -1005,7 +1005,8 @@ FARPROC16 WINAPI MakeProcInstance16( FARPROC16 func, HANDLE16 hInstance )
{
BYTE *thunk,*lfunc;
SEGPTR thunkaddr;
if (!hInstance) return 0;
if (__winelib) return func; /* func can be called directly in Winelib */
thunkaddr = TASK_AllocThunk( hCurrentTask );
if (!thunkaddr) return (FARPROC16)0;
......@@ -1358,8 +1359,8 @@ FARPROC16 WINAPI SetTaskSignalProc( HTASK16 hTask, FARPROC16 proc )
WORD WINAPI SetSigHandler( FARPROC16 newhandler, FARPROC16* oldhandler,
UINT16 *oldmode, UINT16 newmode, UINT16 flag )
{
fprintf(stdnimp,"SetSigHandler(%p,%p,%p,%d,%d), unimplemented.\n",
newhandler,oldhandler,oldmode,newmode,flag );
FIXME(task,"(%p,%p,%p,%d,%d), unimplemented.\n",
newhandler,oldhandler,oldmode,newmode,flag );
if (flag != 1) return 0;
if (!newmode) newhandler = NULL; /* Default handler */
......
......@@ -266,43 +266,43 @@ static void LOCAL_PrintHeap( HANDLE16 ds )
if (!pInfo)
{
printf( "Local Heap corrupted! ds=%04x\n", ds );
DUMP( "Local Heap corrupted! ds=%04x\n", ds );
return;
}
printf( "Local Heap ds=%04x first=%04x last=%04x items=%d\n",
ds, pInfo->first, pInfo->last, pInfo->items );
DUMP( "Local Heap ds=%04x first=%04x last=%04x items=%d\n",
ds, pInfo->first, pInfo->last, pInfo->items );
arena = pInfo->first;
for (;;)
{
LOCALARENA *pArena = ARENA_PTR(ptr,arena);
printf( " %04x: prev=%04x next=%04x type=%d\n", arena,
pArena->prev & ~3, pArena->next, pArena->prev & 3 );
DUMP( " %04x: prev=%04x next=%04x type=%d\n", arena,
pArena->prev & ~3, pArena->next, pArena->prev & 3 );
if (arena == pInfo->first)
{
printf( " size=%d free_prev=%04x free_next=%04x\n",
pArena->size, pArena->free_prev, pArena->free_next );
DUMP( " size=%d free_prev=%04x free_next=%04x\n",
pArena->size, pArena->free_prev, pArena->free_next );
}
if ((pArena->prev & 3) == LOCAL_ARENA_FREE)
{
printf( " size=%d free_prev=%04x free_next=%04x\n",
pArena->size, pArena->free_prev, pArena->free_next );
DUMP( " size=%d free_prev=%04x free_next=%04x\n",
pArena->size, pArena->free_prev, pArena->free_next );
if (pArena->next == arena) break; /* last one */
if (ARENA_PTR(ptr,pArena->free_next)->free_prev != arena)
{
printf( "*** arena->free_next->free_prev != arena\n" );
DUMP( "*** arena->free_next->free_prev != arena\n" );
break;
}
}
if (pArena->next == arena)
{
printf( "*** last block is not marked free\n" );
DUMP( "*** last block is not marked free\n" );
break;
}
if ((ARENA_PTR(ptr,pArena->next)->prev & ~3) != arena)
{
printf( "*** arena->next->prev != arena (%04x, %04x)\n",
pArena->next, ARENA_PTR(ptr,pArena->next)->prev);
DUMP( "*** arena->next->prev != arena (%04x, %04x)\n",
pArena->next, ARENA_PTR(ptr,pArena->next)->prev);
break;
}
arena = pArena->next;
......@@ -717,7 +717,7 @@ WORD LOCAL_Compact( HANDLE16 ds, UINT16 minfree, UINT16 flags )
/* Free the old location */
LOCAL_FreeArena(ds, movearena);
/* Update handle table entry */
pEntry->addr = finalarena + ARENA_HEADER_SIZE;
pEntry->addr = finalarena + ARENA_HEADER_SIZE + sizeof(HLOCAL16) ;
}
else if((ARENA_PTR(ptr, pMoveArena->prev & ~3)->prev & 3)
== LOCAL_ARENA_FREE)
......@@ -727,7 +727,7 @@ WORD LOCAL_Compact( HANDLE16 ds, UINT16 minfree, UINT16 flags )
finalarena = pMoveArena->prev & ~3;
LOCAL_GrowArenaDownward( ds, movearena, movesize );
/* Update handle table entry */
pEntry->addr = finalarena + ARENA_HEADER_SIZE;
pEntry->addr = finalarena + ARENA_HEADER_SIZE + sizeof(HLOCAL16) ;
}
}
}
......@@ -1246,7 +1246,12 @@ HLOCAL16 LOCAL_ReAlloc( HANDLE16 ds, HLOCAL16 handle, WORD size, WORD flags )
}
if(HANDLE_MOVEABLE(handle)) size += sizeof(HLOCAL16);
hmem = LOCAL_GetBlock( ds, size, flags );
ptr = PTR_SEG_OFF_TO_LIN( ds, 0 ); /* Reload ptr */
ptr = PTR_SEG_OFF_TO_LIN( ds, 0 ); /* Reload ptr */
if(HANDLE_MOVEABLE(handle)) /* LOCAL_GetBlock might have triggered */
{ /* a compaction, which might in turn have */
blockhandle = pEntry->addr ; /* moved the very block we are resizing */
arena = ARENA_HEADER( blockhandle ); /* thus, we reload arena, too */
}
if (!hmem)
{
/* Remove the block from the heap and try again */
......@@ -1569,12 +1574,12 @@ FARPROC16 WINAPI LocalNotify( FARPROC16 func )
if (!(pInfo = LOCAL_GetHeap( ds )))
{
fprintf( stderr, "LOCAL_Notify(%04x): Local heap not found\n", ds );
ERR(local, "(%04x): Local heap not found\n", ds );
LOCAL_PrintHeap( ds );
return 0;
}
TRACE(local, "(%04x): %08lx\n", ds, (DWORD)func );
fprintf(stdnimp, "LocalNotify(): Half implemented\n");
FIXME(local, "Half implemented\n");
oldNotify = pInfo->notify;
pInfo->notify = func;
return oldNotify;
......@@ -1633,7 +1638,7 @@ WORD WINAPI LocalHandleDelta( WORD delta )
if (!(pInfo = LOCAL_GetHeap( CURRENT_DS )))
{
fprintf( stderr, "LocalHandleDelta: Local heap not found\n");
ERR(local, "Local heap not found\n");
LOCAL_PrintHeap( CURRENT_DS );
return 0;
}
......@@ -1707,9 +1712,14 @@ BOOL16 WINAPI LocalNext( LOCALENTRY *pLocalEntry )
/***********************************************************************
* LocalAlloc32 (KERNEL32.371)
* RETURNS
* Handle: Success
* NULL: Failure
*/
HLOCAL32 WINAPI LocalAlloc32( UINT32 flags, DWORD size )
{
HLOCAL32 WINAPI LocalAlloc32(
UINT32 flags, /* [in] Allocation attributes */
DWORD size /* [in] Number of bytes to allocate */
) {
return (HLOCAL32)GlobalAlloc32( flags, size );
}
......@@ -1725,45 +1735,70 @@ UINT32 WINAPI LocalCompact32( UINT32 minfree )
/***********************************************************************
* LocalFlags32 (KERNEL32.374)
* RETURNS
* Value specifying allocation flags and lock count.
* LMEM_INVALID_HANDLE: Failure
*/
UINT32 WINAPI LocalFlags32( HLOCAL32 handle )
{
UINT32 WINAPI LocalFlags32(
HLOCAL32 handle /* [in] Handle of memory object */
) {
return GlobalFlags32( (HGLOBAL32)handle );
}
/***********************************************************************
* LocalFree32 (KERNEL32.375)
* RETURNS
* NULL: Success
* Handle: Failure
*/
HLOCAL32 WINAPI LocalFree32( HLOCAL32 handle )
{
HLOCAL32 WINAPI LocalFree32(
HLOCAL32 handle /* [in] Handle of memory object */
) {
return (HLOCAL32)GlobalFree32( (HGLOBAL32)handle );
}
/***********************************************************************
* LocalHandle32 (KERNEL32.376)
* RETURNS
* Handle: Success
* NULL: Failure
*/
HLOCAL32 WINAPI LocalHandle32( LPCVOID ptr )
{
HLOCAL32 WINAPI LocalHandle32(
LPCVOID ptr /* [in] Address of local memory object */
) {
return (HLOCAL32)GlobalHandle32( ptr );
}
/***********************************************************************
* LocalLock32 (KERNEL32.377)
* Locks a local memory object and returns pointer to the first byte
* of the memory block.
*
* RETURNS
* Pointer: Success
* NULL: Failure
*/
LPVOID WINAPI LocalLock32( HLOCAL32 handle )
{
LPVOID WINAPI LocalLock32(
HLOCAL32 handle /* [in] Address of local memory object */
) {
return GlobalLock32( (HGLOBAL32)handle );
}
/***********************************************************************
* LocalReAlloc32 (KERNEL32.378)
* RETURNS
* Handle: Success
* NULL: Failure
*/
HLOCAL32 WINAPI LocalReAlloc32( HLOCAL32 handle, DWORD size, UINT32 flags )
{
HLOCAL32 WINAPI LocalReAlloc32(
HLOCAL32 handle, /* [in] Handle of memory object */
DWORD size, /* [in] New size of block */
UINT32 flags /* [in] How to reallocate object */
) {
return (HLOCAL32)GlobalReAlloc32( (HGLOBAL32)handle, size, flags );
}
......@@ -1779,17 +1814,25 @@ UINT32 WINAPI LocalShrink32( HGLOBAL32 handle, UINT32 newsize )
/***********************************************************************
* LocalSize32 (KERNEL32.380)
* RETURNS
* Size: Success
* 0: Failure
*/
UINT32 WINAPI LocalSize32( HLOCAL32 handle )
{
UINT32 WINAPI LocalSize32(
HLOCAL32 handle /* [in] Handle of memory object */
) {
return GlobalSize32( (HGLOBAL32)handle );
}
/***********************************************************************
* LocalUnlock32 (KERNEL32.381)
* RETURNS
* TRUE: Object is still locked
* FALSE: Object is unlocked
*/
BOOL32 WINAPI LocalUnlock32( HLOCAL32 handle )
{
BOOL32 WINAPI LocalUnlock32(
HLOCAL32 handle /* [in] Handle of memory object */
) {
return GlobalUnlock32( (HGLOBAL32)handle );
}
......@@ -11,7 +11,6 @@
#include "winerror.h"
#include "ldt.h"
#include "debug.h"
#include "debugstr.h"
static const BYTE STRING_Oem2Ansi[256] =
"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\244"
......
......@@ -1156,7 +1156,7 @@ BOOL16 WINAPI PrintDlg16( SEGPTR printdlg )
*/
BOOL32 WINAPI PrintDlg32A( LPPRINTDLG32A printdlg )
{
fprintf( stdnimp, "PrintDlg32A: empty stub\n" );
FIXME(commdlg, "empty stub\n" );
return FALSE;
}
......@@ -1166,7 +1166,7 @@ BOOL32 WINAPI PrintDlg32A( LPPRINTDLG32A printdlg )
*/
BOOL32 WINAPI PrintDlg32W( LPPRINTDLG32W printdlg )
{
fprintf( stdnimp, "PrintDlg32A: empty stub\n" );
FIXME(commdlg, "empty stub\n" );
return FALSE;
}
......@@ -3231,7 +3231,10 @@ GET_XXX_FILENAME(GetSaveFileName)
/***********************************************************************
* ChooseFontA (COMDLG32.3)
*/
DWORD WINAPI ChooseFont32A(CHOOSEFONT pChoosefont)
DWORD WINAPI ChooseFont32A(PCHOOSEFONT32A pChoosefont)
{
FIXME(commdlg,"empty stub!\n");
CommDlgLastError = CDERR_DIALOGFAILURE;
return NULL;
}
......@@ -197,7 +197,7 @@ void __cdecl CRTDLL__local_unwind2( CONTEXT *context )
DWORD *args = (DWORD *)ESP_reg(context);
PEXCEPTION_FRAME endframe = (PEXCEPTION_FRAME)args[1];
DWORD nr = args[2];
fprintf(stderr,"(%p,%ld)\n",endframe,nr);
TRACE(crtdll,"(%p,%ld)\n",endframe,nr);
}
/*********************************************************************
......@@ -1111,7 +1111,7 @@ LPSTR __cdecl CRTDLL_setlocale(INT32 category,LPCSTR locale)
case CRTDLL_LC_TIME: categorystr="LC_TIME";break;
default: categorystr = "UNKNOWN?";break;
}
fprintf(stderr,"CRTDLL_setlocale(%s,%s),stub!\n",categorystr,locale);
FIXME(crtdll,"(%s,%s),stub!\n",categorystr,locale);
return "C";
}
......@@ -1348,8 +1348,7 @@ INT32 __cdecl CRTDLL__setmode( INT32 fh,INT32 mode)
*/
INT32 __cdecl CRTDLL_atexit(LPVOID x)
{
/* FIXME */
fprintf(stdnimp,"CRTDLL.atexit(%p), STUB.\n",x);
FIXME(crtdll,"(%p), STUB.\n",x);
return 0; /* successful */
}
......
......@@ -327,7 +327,7 @@ static void MAIN_ParseOptions( int *argc, char *argv[] )
if (!strcmp( argv[i], "-display" )) display_name = argv[i+1];
if (!strcmp( argv[i], "-v" ) || !strcmp( argv[i], "-version" ))
{
printf( "%s\n", WINE_RELEASE_INFO );
MSG( "%s\n", WINE_RELEASE_INFO );
exit(0);
}
}
......@@ -683,6 +683,9 @@ BOOL32 WINAPI SystemParametersInfo32A( UINT32 uAction, UINT32 uParam,
*(BOOL32 *) lpvParam = FALSE;
break;
case SPI_GETDRAGFULLWINDOWS:
*(BOOL32 *) lpvParam = FALSE;
case SPI_GETGRIDGRANULARITY:
*(INT32*)lpvParam=GetProfileInt32A("desktop","GridGranularity",1);
break;
......@@ -1067,5 +1070,5 @@ BOOL32 WINAPI SystemParametersInfo32W( UINT32 uAction, UINT32 uParam,
*/
void WINAPI FileCDR(FARPROC16 x)
{
printf("FileCDR(%8x)\n", (int) x);
FIXME(file,"(%8x): stub\n", (int) x);
}
......@@ -14,9 +14,8 @@ DWORD WINAPI WNetGetCachedPassword(
LPWORD pcbPassword,
BYTE nType
) {
fprintf(stdnimp,"WNetGetCachedPassword(%s,%d,%p,%d,%d)\n",
pbResource,cbResource,pbPassword,*pcbPassword,nType
);
FIXME(mpr,"(%s,%d,%p,%d,%d): stub\n",
pbResource,cbResource,pbPassword,*pcbPassword,nType);
return 0;
}
......@@ -24,9 +23,6 @@ DWORD WINAPI MultinetGetConnectionPerformance32A(
LPNETRESOURCE32A lpNetResource,
LPNETCONNECTINFOSTRUCT lpNetConnectInfoStruct
) {
fprintf(stdnimp,"MultinetGetConnectionPerformance(%p,%p)\n",
lpNetResource,
lpNetConnectInfoStruct
);
FIXME(mpr,"(%p,%p): stub\n",lpNetResource,lpNetConnectInfoStruct);
return 1;
}
......@@ -201,7 +201,7 @@ DWORD /* NTSTATUS */ WINAPI RtlSetGroupSecurityDescriptor (LPSECURITY_DESCRIPTOR
*/
LPVOID WINAPI RtlNormalizeProcessParams(LPVOID x)
{
fprintf(stdnimp,"RtlNormalizeProcessParams(%p), stub.\n",x);
FIXME(ntdll,"(%p), stub.\n",x);
return x;
}
......@@ -490,9 +490,7 @@ BOOL32 WINAPI RtlDosPathNameToNtPathName_U(
{
LPSTR fromA = HEAP_strdupWtoA(GetProcessHeap(),0,from);
fprintf(stderr,"RtlDosPathNameToNtPathName_U(%s,%p,%08lx,%08lx)\n",
fromA,us,x2,x3
);
FIXME(ntdll,"(%s,%p,%08lx,%08lx)\n",fromA,us,x2,x3);
if (us)
RtlInitUnicodeString(us,HEAP_strdupW(GetProcessHeap(),0,from));
return TRUE;
......@@ -503,9 +501,8 @@ BOOL32 WINAPI RtlDosPathNameToNtPathName_U(
*/
DWORD WINAPI NtOpenFile(DWORD x1,DWORD flags,DWORD x3,DWORD x4,DWORD alignment,DWORD x6)
{
fprintf(stderr,"NtOpenFile(%08lx,%08lx,%08lx,%08lx,%08lx,%08lx)\n",
x1,flags,x3,x4,alignment,x6
);
FIXME(ntdll,"(%08lx,%08lx,%08lx,%08lx,%08lx,%08lx)\n",
x1,flags,x3,x4,alignment,x6);
/* returns file io completion status */
return 0;
}
......
......@@ -11,20 +11,20 @@
#include "windows.h"
#include "win.h"
#include "winerror.h"
#include "debug.h"
INT16 WINAPI StartDoc16( HDC16 hdc, const DOCINFO16 *lpdoc )
{
INT16 retVal;
printf("In startdoc16(%p)\n", lpdoc );
printf("In StartDoc16 %d 0x%lx:0x%p 0x%lx:0x%p\n",lpdoc->cbSize,
lpdoc->lpszDocName,PTR_SEG_TO_LIN(lpdoc->lpszDocName),
lpdoc->lpszOutput,PTR_SEG_TO_LIN(lpdoc->lpszOutput));
printf("In StartDoc16 %d %s %s\n",lpdoc->cbSize,
(LPSTR)PTR_SEG_TO_LIN(lpdoc->lpszDocName),
(LPSTR)PTR_SEG_TO_LIN(lpdoc->lpszOutput));
TRACE(print,"(%p)\n", lpdoc );
TRACE(print,"%d 0x%lx:0x%p 0x%lx:0x%p\n",lpdoc->cbSize,
lpdoc->lpszDocName,PTR_SEG_TO_LIN(lpdoc->lpszDocName),
lpdoc->lpszOutput,PTR_SEG_TO_LIN(lpdoc->lpszOutput));
TRACE(print, "%d %s %s\n",lpdoc->cbSize,
(LPSTR)PTR_SEG_TO_LIN(lpdoc->lpszDocName),
(LPSTR)PTR_SEG_TO_LIN(lpdoc->lpszOutput));
retVal = Escape16(hdc, STARTDOC, sizeof(DOCINFO16), lpdoc->lpszDocName, 0);
printf("Escape16 returned %d\n",retVal);
TRACE(print,"Escape16 returned %d\n",retVal);
return retVal;
}
......
......@@ -23,7 +23,6 @@
#include "sysmetrics.h"
#include "shlobj.h"
#include "debug.h"
#include "debugstr.h"
#include "winreg.h"
static const char * const SHELL_People[] =
......@@ -1406,12 +1405,6 @@ LRESULT WINAPI ShellHookProc(INT16 code, WPARAM16 wParam, LPARAM lParam)
return CallNextHookEx16( WH_SHELL, code, wParam, lParam );
}
LRESULT WINAPI FUNC004(INT16 code, WPARAM16 wParam, /*LPARAM*/WORD lParam)
{
FIXME(reg,"(%d,%d,%d),STUB!\n",code,wParam,lParam);
return ShellHookProc(code,wParam,(DWORD)lParam);
}
/*************************************************************************
* RegisterShellHook [SHELL.102]
*/
......@@ -1460,9 +1453,8 @@ DWORD WINAPI SHGetFileInfo32A(LPCSTR path,DWORD dwFileAttributes,
SHFILEINFO32A *psfi, UINT32 sizeofpsfi,
UINT32 flags )
{
fprintf(stdnimp,"SHGetFileInfo32A(%s,0x%08lx,%p,%d,0x%08x)\n",
path,dwFileAttributes,psfi,sizeofpsfi,flags
);
FIXME(shell,"(%s,0x%08lx,%p,%d,0x%08x): stub\n",
path,dwFileAttributes,psfi,sizeofpsfi,flags);
return TRUE;
}
......@@ -1471,7 +1463,7 @@ DWORD WINAPI SHGetFileInfo32A(LPCSTR path,DWORD dwFileAttributes,
*/
UINT32 WINAPI SHAppBarMessage32(DWORD msg, PAPPBARDATA data)
{
fprintf(stdnimp,"SHAppBarMessage32(0x%08lx,%p)\n", msg, data);
FIXME(shell,"(0x%08lx,%p): stub\n", msg, data);
#if 0
switch (msg) {
case ABM_ACTIVATE:
......@@ -1549,8 +1541,7 @@ LPWSTR* WINAPI CommandLineToArgvW(LPWSTR cmdline,LPDWORD numargs)
void WINAPI Control_RunDLL (HWND32 hwnd, LPCVOID code, LPCSTR cmd, DWORD arg4)
{
TRACE(exec, "(%08x, %p, \"%s\", %08lx)\n",
hwnd, code ? code : "(null)",
cmd ? cmd : "(null)", arg4);
hwnd, code ? code : "(null)", cmd ? cmd : "(null)", arg4);
}
/*************************************************************************
......@@ -1558,7 +1549,7 @@ void WINAPI Control_RunDLL (HWND32 hwnd, LPCVOID code, LPCSTR cmd, DWORD arg4)
void WINAPI FreeIconList( DWORD dw )
{
fprintf( stdnimp, "FreeIconList: empty stub\n" );
FIXME(reg, "empty stub\n" );
}
/*************************************************************************
......@@ -1574,7 +1565,7 @@ DWORD WINAPI SHELL32_DllGetClassObject(REFCLSID rclsid,REFIID iid,LPVOID *ppv)
WINE_StringFromCLSID((LPCLSID)rclsid,xclsid);
WINE_StringFromCLSID((LPCLSID)iid,xiid);
fprintf(stderr,"SHELL32_DllGetClassObject(%s,%s,%p)\n",xclsid,xiid,ppv);
TRACE(shell,"(%s,%s,%p)\n",xclsid,xiid,ppv);
*ppv = NULL;
/* SDK example code looks like this:
......@@ -1595,13 +1586,13 @@ DWORD WINAPI SHELL32_DllGetClassObject(REFCLSID rclsid,REFIID iid,LPVOID *ppv)
*/
if (!memcmp(rclsid,&CLSID_ShellDesktop,sizeof(CLSID_ShellDesktop))) {
fprintf(stderr," requested CLSID_ShellDesktop, creating it.\n");
TRACE(shell," requested CLSID_ShellDesktop, creating it.\n");
*ppv = IShellFolder_Constructor();
/* FIXME: Initialize this folder to be the shell desktop folder */
FIXME(shell,"Initialize this folder to be the shell desktop folder\n");
return 0;
}
fprintf (stdnimp, " -> clsid not found. returning E_OUTOFMEMORY.\n");
FIXME(shell, " -> clsid not found. returning E_OUTOFMEMORY.\n");
return hres;
}
......@@ -1633,7 +1624,7 @@ DWORD WINAPI SHGetDesktopFolder(LPSHELLFOLDER *shellfolder) {
* heap (ProcessHeap).
*/
DWORD WINAPI SHGetMalloc(LPMALLOC32 *lpmal) {
fprintf(stderr,"SHGetMalloc()\n");
TRACE(shell,"(%p)\n", lpmal);
return CoGetMalloc32(0,lpmal);
}
......@@ -1644,11 +1635,9 @@ DWORD WINAPI SHGetMalloc(LPMALLOC32 *lpmal) {
* nFolder is a CSIDL_xxxxx.
*/
HRESULT WINAPI SHGetSpecialFolderLocation(HWND32 hwndOwner, INT32 nFolder, LPITEMIDLIST * ppidl) {
fprintf(stderr,"SHGetSpecialFolderLocation(%04x,%d,%p),stub!\n",
hwndOwner,nFolder,ppidl
);
FIXME(shell,"(%04x,%d,%p),stub!\n", hwndOwner,nFolder,ppidl);
*ppidl = (LPITEMIDLIST)HeapAlloc(GetProcessHeap(),0,2*sizeof(ITEMIDLIST));
/* FIXME: we return only the empty ITEMIDLIST currently. */
FIXME(shell, "we return only the empty ITEMIDLIST currently.\n");
(*ppidl)->mkid.cb = 0;
return NOERROR;
}
......@@ -1658,8 +1647,12 @@ HRESULT WINAPI SHGetSpecialFolderLocation(HWND32 hwndOwner, INT32 nFolder, LPITE
* returns the path from a passed PIDL.
*/
BOOL32 WINAPI SHGetPathFromIDList(LPCITEMIDLIST pidl,LPSTR pszPath) {
fprintf(stderr,"SHGetPathFromIDList(%p,%p),stub!\n",pidl,pszPath);
FIXME(shell,"(%p,%p),stub!\n",pidl,pszPath);
lstrcpy32A(pszPath,"E:\\"); /* FIXME */
return NOERROR;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment