Commit c6c09442 authored by Alexandre Julliard's avatar Alexandre Julliard

Release 970112

Sat Jan 11 18:17:59 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [controls/menu.c] Updated to new Win32 types. * [controls/listbox.c] Fixed Winfile extended selection bug. * [files/directory.c] Changed DIR_SearchPath to return both long and short file names. * [files/dos_fs.c] Implemented VFAT ioctl to retrieve the original short filenames from a VFAT filesystem (Linux only for now). Replaced DOSFS_GetUnixFileName()/DOSFS_GetDosTrueName() by DOS_GetFullName(). Properly implemented GetShortPathName() and GetFullPathName(). Made all functions re-entrant. * [files/file.c] [misc/main.c] Replaced -allowreadonly option by -failreadonly. The default is now to report success when opening a read-only file for writing. * [objects/metafile.c] Fixed bug in DIB bitmaps pointer calculation. * [scheduler/process.c] Implemented environment strings and Get/SetStdHandle with process environment block. * [tools/build.c] Rewrote BuildContext32() to avoid instructions that may not be supported by all assemblers. Fri Jan 10 17:11:09 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/event.c] Created table keyc2vkey, which associate a vkey(+extended bit) to any keycode. Changed EVENT_event_to_vkey to use this table to return the correct vkey. Changed EVENT_ToAscii to get the keycode from this table too. Assigned OEM specific vkeys arbitrarily. Fri Jan 10 09:26:17 1997 John Harvey <john@division.co.uk> * [misc/winsock.c] [misc/winsoc_async.c] Fixed svr4 header files. Changed bzero() to memset(). * [tools/fnt2bdf.c] Removed bcopy() and used memcpy() instead. * [debugger/msc.c] Include string.h instead of strings.h * [debugger/stabs.c] Include string.h instead of strings.h. Define __ELF__ for svr4 systems. * [loader/signal.c] Use wait() instead of wait4() which doesnt exist on Unixware. * [memory/global.c] Use sysconf() instead of getpagesize() for svr4 systems. Thu Jan 9 21:07:20 1997 Robert Pouliot <krynos@clic.net> * [Make.rules.in] [Makefile.in] [make_os2.sh] [rc/Makefile.in] [tools/Makefile.in] [documentation/wine_os2.txt] Patches for OS/2 support. Note that it doesn't compile yet. Tue Jan 7 20:03:53 1997 Eric Youngdale <eric@sub2304.jic.com> * [debugger/*] Many more debugger improvements (see debugger/README for details). Tue Jan 7 15:12:21 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [windows/graphics.c] [objects/text.c] [graphics/x11drv/*] [graphics/metafiledrv/*] Moved some device dependent code into the resp. subdirs. * [include/gdi.h] [include/metafiledrv.h] [include/x11drv.h] Prototypes added, DC_FUNCTIONS: GetPixel added, some unnecessary functions removed. * [objects/region.c] CreatePolyPolygonRgn32 added. * [files/dos_fs.c] QueryDosDevice added. * [misc/lstr.c] FormatMessage: broken heap management fixed. * [scheduler/process.c] [scheduler/thread.c] Get/SetThreadPriority/PriorityClass added. Mon Jan 6 21:55:30 1997 Philippe De Muyter <phdm@info.ucl.ac.be> * [misc/keyboard.c] ToAscii : Use EVENT_ToAscii instead. * [windows/event.c] keypad_key : Do not convert XK_Mode_switch to VK_MENU; recognize keypad cursor keys. EVENT_event_to_vkey : New function, to transform a X keycode into a MSwin vkey + extended bit. EVENT_ToAscii : New function, to transform a vkey + extended bit (+ key state table) into ascii char(s), using XLookupString, and recognizing dead chars. EVENT_key : Transform AltGr into Ctrl+Alt sequence; call EVENT_event_to_vkey for keycode to vkey conversion; fixed previous, context and extended bits. * [windows/keyboard.c] Include stddebug.h, to get -debugmsg messages. GetKeyState : Handle VK_MBUTTON case. GetKeyboardState, SetKeyboardState : Debugging messages added. * [windows/message.c] TranslateMessage : Handle dead chars. Mon Jan 6 20:10:11 1997 Dominik Strasser <bm424953@muenchen.org> * [if1632/crtdll.spec] [misc/crtdll.c] C++ functions new/delete/set_new_handler implemented. Mon Jan 6 15:48:15 1997 Frans van Dorsselaer <dorssel@rulhmpc49.LeidenUniv.nl> * [controls/edit.c] [include/windows.h] Moved the edit control to 32 bits. Included new (win95) message definitions in windows.h Implemented EM_SCROLLCARET, EM_SETMARGINS, EM_GETMARGINS, EM_GETLIMITTEXT, EM_POSFROMCHAR, EM_CHARFROMPOS. Broke EM_SETWORDBREAKPROC (internal wordwrap still works). Fixed some bugs, introduced a couple of others. Text buffer is now initially in 32-bit heap. * [controls/EDIT.TODO] [controls/combo.c] [controls/widgets.c] [if1632/wprocs.spec] [library/miscstubs.c] [windows/defdlg.c] [misc/commdlg.c] Updated to work with 32-bit edit control. Sat Jan 4 22:07:27 1997 O.Flebbe <O.Flebbe@science-computing.uni-tuebingen.de> * [loader/pe_image.c] Use mmap rather then malloc. Better workaround for clean segments.
parent 9ea19e54
This is release 970101 of Wine, the MS Windows emulator. This is still a This is release 970112 of Wine, the MS Windows emulator. This is still a
developer's only release. There are many bugs and many unimplemented API developer's only release. There are many bugs and many unimplemented API
features. Most applications still do not work correctly. features. Most applications still do not work correctly.
Patches should be submitted to "julliard@lrc.epfl.ch". Please don't Patches should be submitted to "julliard@lrc.epfl.ch". Please don't
forget to include a ChangeLog entry. forget to include a ChangeLog entry.
WHAT'S NEW with Wine-970101: (see ChangeLog for details) WHAT'S NEW with Wine-970112: (see ChangeLog for details)
- Win32 handle management and related stuff. - Better support for non-US keyboards.
- Several files moved around, new directories created. - Support for VFAT filesystem short names.
- Many improvements to the built-in debugger.
- More Win32 stuff.
- Lots of bug fixes. - Lots of bug fixes.
See the README file in the distribution for installation instructions. See the README file in the distribution for installation instructions.
...@@ -16,10 +18,10 @@ Because of lags created by using mirror, this message may reach you before ...@@ -16,10 +18,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 the release is available at the ftp sites. The sources will be available
from the following locations: from the following locations:
ftp://sunsite.unc.edu/pub/Linux/ALPHA/wine/development/Wine-970101.tar.gz ftp://sunsite.unc.edu/pub/Linux/ALPHA/wine/development/Wine-970112.tar.gz
ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-970101.tar.gz ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-970112.tar.gz
ftp://ftp.infomagic.com/pub/mirrors/linux/wine/development/Wine-970101.tar.gz ftp://ftp.infomagic.com/pub/mirrors/linux/wine/development/Wine-970112.tar.gz
ftp://aris.com/pub/linux/ALPHA/Wine/development/Wine-970101.tar.gz ftp://aris.com/pub/linux/ALPHA/Wine/development/Wine-970112.tar.gz
It should also be available from any site that mirrors tsx-11 or sunsite. It should also be available from any site that mirrors tsx-11 or sunsite.
......
---------------------------------------------------------------------- ----------------------------------------------------------------------
Sat Jan 11 18:17:59 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [controls/menu.c]
Updated to new Win32 types.
* [controls/listbox.c]
Fixed Winfile extended selection bug.
* [files/directory.c]
Changed DIR_SearchPath to return both long and short file names.
* [files/dos_fs.c]
Implemented VFAT ioctl to retrieve the original short filenames
from a VFAT filesystem (Linux only for now).
Replaced DOSFS_GetUnixFileName()/DOSFS_GetDosTrueName() by
DOS_GetFullName().
Properly implemented GetShortPathName() and GetFullPathName().
Made all functions re-entrant.
* [files/file.c] [misc/main.c]
Replaced -allowreadonly option by -failreadonly. The default is
now to report success when opening a read-only file for writing.
* [objects/metafile.c]
Fixed bug in DIB bitmaps pointer calculation.
* [scheduler/process.c]
Implemented environment strings and Get/SetStdHandle with process
environment block.
* [tools/build.c]
Rewrote BuildContext32() to avoid instructions that may not be
supported by all assemblers.
Fri Jan 10 17:11:09 1997 David Faure <david.faure@ifhamy.insa-lyon.fr>
* [windows/event.c]
Created table keyc2vkey, which associate a vkey(+extended bit) to
any keycode. Changed EVENT_event_to_vkey to use this table to
return the correct vkey. Changed EVENT_ToAscii to get the keycode
from this table too. Assigned OEM specific vkeys arbitrarily.
Fri Jan 10 09:26:17 1997 John Harvey <john@division.co.uk>
* [misc/winsock.c] [misc/winsoc_async.c]
Fixed svr4 header files.
Changed bzero() to memset().
* [tools/fnt2bdf.c]
Removed bcopy() and used memcpy() instead.
* [debugger/msc.c]
Include string.h instead of strings.h
* [debugger/stabs.c]
Include string.h instead of strings.h.
Define __ELF__ for svr4 systems.
* [loader/signal.c]
Use wait() instead of wait4() which doesnt exist on Unixware.
* [memory/global.c]
Use sysconf() instead of getpagesize() for svr4 systems.
Thu Jan 9 21:07:20 1997 Robert Pouliot <krynos@clic.net>
* [Make.rules.in] [Makefile.in] [make_os2.sh] [rc/Makefile.in]
[tools/Makefile.in] [documentation/wine_os2.txt]
Patches for OS/2 support. Note that it doesn't compile yet.
Tue Jan 7 20:03:53 1997 Eric Youngdale <eric@sub2304.jic.com>
* [debugger/*]
Many more debugger improvements (see debugger/README for details).
Tue Jan 7 15:12:21 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [windows/graphics.c] [objects/text.c] [graphics/x11drv/*]
[graphics/metafiledrv/*]
Moved some device dependent code into the resp. subdirs.
* [include/gdi.h] [include/metafiledrv.h] [include/x11drv.h]
Prototypes added,
DC_FUNCTIONS: GetPixel added, some unnecessary functions removed.
* [objects/region.c]
CreatePolyPolygonRgn32 added.
* [files/dos_fs.c]
QueryDosDevice added.
* [misc/lstr.c]
FormatMessage: broken heap management fixed.
* [scheduler/process.c] [scheduler/thread.c]
Get/SetThreadPriority/PriorityClass added.
Mon Jan 6 21:55:30 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [misc/keyboard.c]
ToAscii : Use EVENT_ToAscii instead.
* [windows/event.c]
keypad_key : Do not convert XK_Mode_switch to VK_MENU; recognize
keypad cursor keys.
EVENT_event_to_vkey : New function, to transform a X keycode
into a MSwin vkey + extended bit.
EVENT_ToAscii : New function, to transform a vkey + extended bit
(+ key state table) into ascii char(s), using XLookupString, and
recognizing dead chars.
EVENT_key : Transform AltGr into Ctrl+Alt sequence; call
EVENT_event_to_vkey for keycode to vkey conversion; fixed
previous, context and extended bits.
* [windows/keyboard.c]
Include stddebug.h, to get -debugmsg messages.
GetKeyState : Handle VK_MBUTTON case.
GetKeyboardState, SetKeyboardState : Debugging messages added.
* [windows/message.c]
TranslateMessage : Handle dead chars.
Mon Jan 6 20:10:11 1997 Dominik Strasser <bm424953@muenchen.org>
* [if1632/crtdll.spec] [misc/crtdll.c]
C++ functions new/delete/set_new_handler implemented.
Mon Jan 6 15:48:15 1997 Frans van Dorsselaer <dorssel@rulhmpc49.LeidenUniv.nl>
* [controls/edit.c] [include/windows.h]
Moved the edit control to 32 bits.
Included new (win95) message definitions in windows.h
Implemented EM_SCROLLCARET, EM_SETMARGINS, EM_GETMARGINS,
EM_GETLIMITTEXT, EM_POSFROMCHAR, EM_CHARFROMPOS.
Broke EM_SETWORDBREAKPROC (internal wordwrap still works).
Fixed some bugs, introduced a couple of others.
Text buffer is now initially in 32-bit heap.
* [controls/EDIT.TODO] [controls/combo.c] [controls/widgets.c]
[if1632/wprocs.spec] [library/miscstubs.c] [windows/defdlg.c]
[misc/commdlg.c]
Updated to work with 32-bit edit control.
Sat Jan 4 22:07:27 1997 O.Flebbe <O.Flebbe@science-computing.uni-tuebingen.de>
* [loader/pe_image.c]
Use mmap rather then malloc. Better workaround for clean
segments.
----------------------------------------------------------------------
Wed Jan 1 15:36:17 1997 Alexandre Julliard <julliard@lrc.epfl.ch> Wed Jan 1 15:36:17 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [controls/listbox.c] * [controls/listbox.c]
......
...@@ -31,9 +31,9 @@ DIVINCL = -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include -I$(SRCDIR) -I. ...@@ -31,9 +31,9 @@ DIVINCL = -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include -I$(SRCDIR) -I.
ALLCFLAGS = $(CFLAGS) $(DEFS) $(OPTIONS) $(DIVINCL) $(X_CFLAGS) ALLCFLAGS = $(CFLAGS) $(DEFS) $(OPTIONS) $(DIVINCL) $(X_CFLAGS)
LDCOMBINE = ld -r LDCOMBINE = ld -r
RM = rm -f RM = rm -f
BUILD = $(TOPOBJDIR)/tools/build BUILD = $(TOPOBJDIR)/tools/build@PROGEXT@
MAKEDEP = $(TOPOBJDIR)/tools/makedep MAKEDEP = $(TOPOBJDIR)/tools/makedep@PROGEXT@
WINERC = $(TOPOBJDIR)/rc/winerc WINERC = $(TOPOBJDIR)/rc/winerc@PROGEXT@
WINESTUB = $(TOPOBJDIR)/library/winestub.o WINESTUB = $(TOPOBJDIR)/library/winestub.o
SUBMAKE = $(MAKE) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'OPTIONS=$(OPTIONS)' SUBMAKE = $(MAKE) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'OPTIONS=$(OPTIONS)'
@SET_MAKE@ @SET_MAKE@
...@@ -72,12 +72,17 @@ OBJS = $(GEN_C_SRCS:.c=.o) $(C_SRCS:.c=.o) \ ...@@ -72,12 +72,17 @@ OBJS = $(GEN_C_SRCS:.c=.o) $(C_SRCS:.c=.o) \
# Rule to rebuild resource compiler # Rule to rebuild resource compiler
$(WINERC) check_winerc: $(WINERC) check_winerc:
cd $(TOPOBJDIR)/rc; $(SUBMAKE) winerc cd $(TOPOBJDIR)/rc; $(SUBMAKE) winerc@PROGEXT@
# Rule to rebuild the makedep program # Rule to rebuild the 'makedep' program
$(MAKEDEP) check_makedep: $(MAKEDEP) check_makedep:
cd $(TOPOBJDIR)/tools; $(SUBMAKE) makedep cd $(TOPOBJDIR)/tools; $(SUBMAKE) makedep@PROGEXT@
# Rule to rebuild the 'build' program
$(BUILD) checkbuild:
cd $(TOPOBJDIR)/tools; $(SUBMAKE) build@PROGEXT@
# Rule for main module # Rule for main module
......
...@@ -8,6 +8,7 @@ AC_CONFIG_AUX_DIR(tools) ...@@ -8,6 +8,7 @@ AC_CONFIG_AUX_DIR(tools)
# We want these before the checks, so the checks can modify their values. # We want these before the checks, so the checks can modify their values.
test -z "$LDLIBS" && LDLIBS=-lm AC_SUBST(LDLIBS) test -z "$LDLIBS" && LDLIBS=-lm AC_SUBST(LDLIBS)
test -z "$PROGEXT" && PROGEXT="" AC_SUBST(PROGEXT)
dnl **** Command-line arguments **** dnl **** Command-line arguments ****
......
...@@ -756,7 +756,7 @@ static LRESULT CBGetEditSel(HWND hwnd, WPARAM16 wParam, LPARAM lParam) ...@@ -756,7 +756,7 @@ static LRESULT CBGetEditSel(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
if ((lphc->dwStyle & 3) == CBS_DROPDOWNLIST) if ((lphc->dwStyle & 3) == CBS_DROPDOWNLIST)
return CB_ERR; /* err, documented for CBSetEditSel */ return CB_ERR; /* err, documented for CBSetEditSel */
return SendMessage16(lphc->hWndEdit, EM_GETSEL, 0, 0); return SendMessage16(lphc->hWndEdit, EM_GETSEL16, 0, 0);
} }
...@@ -770,7 +770,7 @@ static LRESULT CBSetEditSel(HWND hwnd, WPARAM16 wParam, LPARAM lParam) ...@@ -770,7 +770,7 @@ static LRESULT CBSetEditSel(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
if ((lphc->dwStyle & 3) == CBS_DROPDOWNLIST) if ((lphc->dwStyle & 3) == CBS_DROPDOWNLIST)
return CB_ERR; return CB_ERR;
return SendMessage16(lphc->hWndEdit, EM_SETSEL, 0, lParam); return SendMessage16(lphc->hWndEdit, EM_SETSEL16, 0, lParam);
} }
/*********************************************************************** /***********************************************************************
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -1487,7 +1487,7 @@ LRESULT LISTBOX_Directory( WND *wnd, LB_DESCR *descr, UINT32 attrib, ...@@ -1487,7 +1487,7 @@ LRESULT LISTBOX_Directory( WND *wnd, LB_DESCR *descr, UINT32 attrib,
if (long_names) strcpy( buffer, entry.cFileName ); if (long_names) strcpy( buffer, entry.cFileName );
else strcpy( buffer, entry.cAlternateFileName ); else strcpy( buffer, entry.cAlternateFileName );
} }
if (!long_names) AnsiLower( buffer ); if (!long_names) CharLower32A( buffer );
pos = LISTBOX_FindFileStrPos( wnd, descr, buffer ); pos = LISTBOX_FindFileStrPos( wnd, descr, buffer );
if ((ret = LISTBOX_InsertString( wnd, descr, pos, buffer )) < 0) if ((ret = LISTBOX_InsertString( wnd, descr, pos, buffer )) < 0)
break; break;
...@@ -2206,8 +2206,12 @@ LRESULT ListBoxWndProc(HWND32 hwnd, UINT32 msg, WPARAM32 wParam, LPARAM lParam) ...@@ -2206,8 +2206,12 @@ LRESULT ListBoxWndProc(HWND32 hwnd, UINT32 msg, WPARAM32 wParam, LPARAM lParam)
case LB_SELITEMRANGE16: case LB_SELITEMRANGE16:
case LB_SELITEMRANGE32: case LB_SELITEMRANGE32:
return LISTBOX_SelectItemRange( wnd, descr, LOWORD(lParam), if (LOWORD(lParam) <= HIWORD(lParam))
HIWORD(lParam), wParam ); return LISTBOX_SelectItemRange( wnd, descr, LOWORD(lParam),
HIWORD(lParam), wParam );
else
return LISTBOX_SelectItemRange( wnd, descr, HIWORD(lParam),
LOWORD(lParam), wParam );
case LB_SELITEMRANGEEX16: case LB_SELITEMRANGEEX16:
case LB_SELITEMRANGEEX32: case LB_SELITEMRANGEEX32:
......
...@@ -23,10 +23,7 @@ ...@@ -23,10 +23,7 @@
#include "windows.h" #include "windows.h"
#include "win.h" #include "win.h"
#include "gdi.h" #include "gdi.h"
#include "msdos.h"
#include "listbox.h" #include "listbox.h"
#include "dos_fs.h"
#include "drive.h"
#include "heap.h" #include "heap.h"
#include "stddebug.h" #include "stddebug.h"
#include "debug.h" #include "debug.h"
...@@ -698,81 +695,6 @@ int ListBoxSetCurSel(LPHEADLIST lphl, WORD wIndex) ...@@ -698,81 +695,6 @@ int ListBoxSetCurSel(LPHEADLIST lphl, WORD wIndex)
LONG ListBoxDirectory(LPHEADLIST lphl, UINT attrib, LPCSTR filespec) LONG ListBoxDirectory(LPHEADLIST lphl, UINT attrib, LPCSTR filespec)
{ {
#if 0
char mask[13];
char* temp = NULL;
const char* ptr;
int skip, count;
LONG ret;
DOS_DIRENT entry;
char *path, *p;
dprintf_listbox(stddeb, "ListBoxDirectory: '%s' %04x\n", filespec, attrib);
if (!filespec) return LB_ERR;
if (!(ptr = DOSFS_GetUnixFileName( filespec, FALSE ))) return LB_ERR;
path = xstrdup(ptr);
p = strrchr( path, '/' );
*p++ = '\0';
if (!(ptr = DOSFS_ToDosFCBFormat( p )) ||
!(temp = SEGPTR_ALLOC( sizeof(char) * 16 )) )
{
free( path );
return LB_ERR;
}
strcpy( mask, ptr );
dprintf_listbox(stddeb, "ListBoxDirectory: path=%s mask=%s\n", path, mask);
skip = ret = 0;
attrib &= ~FA_LABEL;
while ((count = DOSFS_FindNext( path, mask, NULL, 0,
attrib, skip, &entry )) > 0)
{
skip += count;
if (entry.attr & FA_DIRECTORY)
{
if ((attrib & DDL_DIRECTORY) && strcmp(entry.name, ". "))
{
sprintf(temp, "[%s]", DOSFS_ToDosDTAFormat( entry.name ) );
AnsiLower( temp );
if ((ret = ListBoxAddString(lphl, SEGPTR_GET(temp))) == LB_ERR) break;
}
}
else /* not a directory */
{
if (!(attrib & DDL_EXCLUSIVE) ||
((attrib & (FA_RDONLY|FA_HIDDEN|FA_SYSTEM|FA_ARCHIVE)) ==
(entry.attr & (FA_RDONLY|FA_HIDDEN|FA_SYSTEM|FA_ARCHIVE))))
{
strcpy( temp, DOSFS_ToDosDTAFormat( entry.name ) );
AnsiLower( temp );
if ((ret = ListBoxAddString(lphl, SEGPTR_GET(temp))) == LB_ERR) break;
}
}
dprintf_listbox(stddeb,"\tn - %i, file '%s'\n", count, temp);
}
if (attrib & DDL_DRIVES)
{
int x;
DWORD oldstyle = lphl->dwStyle;
lphl->dwStyle &= ~LBS_SORT;
strcpy( temp, "[-a-]" );
for (x = 0; x < MAX_DOS_DRIVES; x++, temp[2]++)
{
if (DRIVE_IsValid(x))
if ((ret = ListBoxAddString(lphl, SEGPTR_GET(temp))) == LB_ERR) break;
}
lphl->dwStyle = oldstyle;
}
free( path );
SEGPTR_FREE( temp );
return ret;
#endif
return 0; return 0;
} }
......
...@@ -18,8 +18,12 @@ ...@@ -18,8 +18,12 @@
/* Window procedures */ /* Window procedures */
extern LRESULT EditWndProc( HWND32 hwnd, UINT32 msg, WPARAM32 wParam,
LPARAM lParam );
extern LRESULT ListBoxWndProc( HWND32 hwnd, UINT32 msg, WPARAM32 wParam, extern LRESULT ListBoxWndProc( HWND32 hwnd, UINT32 msg, WPARAM32 wParam,
LPARAM lParam ); LPARAM lParam );
extern LRESULT PopupMenuWndProc( HWND32 hwnd, UINT32 msg, WPARAM32 wParam,
LPARAM lParam );
/* Win16 class info */ /* Win16 class info */
...@@ -42,12 +46,6 @@ static const BUILTIN_CLASS_INFO16 WIDGETS_BuiltinClasses16[] = ...@@ -42,12 +46,6 @@ static const BUILTIN_CLASS_INFO16 WIDGETS_BuiltinClasses16[] =
8, 0, "ComboBoxWndProc", "ComboBox" }, 8, 0, "ComboBoxWndProc", "ComboBox" },
{ CS_GLOBALCLASS | CS_DBLCLKS | CS_SAVEBITS, { CS_GLOBALCLASS | CS_DBLCLKS | CS_SAVEBITS,
8, 0, "ComboLBoxWndProc", "ComboLBox" }, 8, 0, "ComboLBoxWndProc", "ComboLBox" },
{ CS_GLOBALCLASS | CS_PARENTDC | CS_DBLCLKS,
sizeof(DWORD), 0, "EditWndProc", "Edit" },
{ CS_GLOBALCLASS | CS_SAVEBITS,
sizeof(HMENU32), 0, "PopupMenuWndProc", POPUPMENU_CLASS_NAME },
{ CS_GLOBALCLASS | CS_SAVEBITS,
DLGWINDOWEXTRA, 0, "DefDlgProc", DIALOG_CLASS_NAME },
{ CS_GLOBALCLASS, sizeof(MDICLIENTINFO), { CS_GLOBALCLASS, sizeof(MDICLIENTINFO),
STOCK_LTGRAY_BRUSH, "MDIClientWndProc", "MDIClient" } STOCK_LTGRAY_BRUSH, "MDIClientWndProc", "MDIClient" }
}; };
...@@ -62,11 +60,17 @@ static WNDCLASS32A WIDGETS_BuiltinClasses32[] = ...@@ -62,11 +60,17 @@ static WNDCLASS32A WIDGETS_BuiltinClasses32[] =
{ CS_GLOBALCLASS | CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC, { CS_GLOBALCLASS | CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC,
ButtonWndProc, 0, sizeof(BUTTONINFO), 0, 0, 0, 0, 0, "Button" }, ButtonWndProc, 0, sizeof(BUTTONINFO), 0, 0, 0, 0, 0, "Button" },
{ CS_GLOBALCLASS | CS_DBLCLKS /*| CS_PARENTDC*/, { CS_GLOBALCLASS | CS_DBLCLKS /*| CS_PARENTDC*/,
EditWndProc, 0, sizeof(void *), 0, 0, 0, 0, 0, "Edit" },
{ CS_GLOBALCLASS | CS_DBLCLKS /*| CS_PARENTDC*/,
ListBoxWndProc, 0, sizeof(void *), 0, 0, 0, 0, 0, "ListBox" }, ListBoxWndProc, 0, sizeof(void *), 0, 0, 0, 0, 0, "ListBox" },
{ CS_GLOBALCLASS | CS_SAVEBITS, PopupMenuWndProc,
0, sizeof(HMENU32), 0, 0, 0, 0, 0, POPUPMENU_CLASS_NAME },
{ CS_GLOBALCLASS | CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC, { CS_GLOBALCLASS | CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC,
ScrollBarWndProc, 0, sizeof(SCROLLBAR_INFO), 0, 0, 0, 0, 0, "ScrollBar"}, ScrollBarWndProc, 0, sizeof(SCROLLBAR_INFO), 0, 0, 0, 0, 0, "ScrollBar"},
{ CS_GLOBALCLASS, DesktopWndProc, 0, sizeof(DESKTOPINFO), { CS_GLOBALCLASS, DesktopWndProc, 0, sizeof(DESKTOPINFO),
0, 0, 0, 0, 0, DESKTOP_CLASS_NAME } 0, 0, 0, 0, 0, DESKTOP_CLASS_NAME },
{ CS_GLOBALCLASS | CS_SAVEBITS, DefDlgProc32A, 0, DLGWINDOWEXTRA,
0, 0, 0, 0, 0, DIALOG_CLASS_NAME }
}; };
#define NB_BUILTIN_CLASSES32 \ #define NB_BUILTIN_CLASSES32 \
......
...@@ -8,14 +8,18 @@ MODULE = debugger ...@@ -8,14 +8,18 @@ MODULE = debugger
C_SRCS = \ C_SRCS = \
break.c \ break.c \
db_disasm.c \ db_disasm.c \
display.c \
editline.c \ editline.c \
expr.c \
hash.c \ hash.c \
info.c \ info.c \
memory.c \ memory.c \
msc.c \ msc.c \
registers.c \ registers.c \
source.c \
stabs.c \ stabs.c \
stack.c stack.c \
types.c
GEN_C_SRCS = \ GEN_C_SRCS = \
y.tab.c \ y.tab.c \
...@@ -23,6 +27,12 @@ GEN_C_SRCS = \ ...@@ -23,6 +27,12 @@ GEN_C_SRCS = \
all: $(MODULE).o all: $(MODULE).o
#
# This is a special test program that helps debug the internal debugger.
#
debug: $(MODULE).o dbgmain.o ../misc/xmalloc.o
$(CC) -o debug $(MODULE).o dbgmain.o ../misc/xmalloc.o
@MAKE_RULES@ @MAKE_RULES@
y.tab.c y.tab.h: dbg.y y.tab.c y.tab.h: dbg.y
......
...@@ -3,28 +3,42 @@ way or another. No commitment to actually do these, but these sound ...@@ -3,28 +3,42 @@ way or another. No commitment to actually do these, but these sound
possible to me right now. In no particular order. If someone else possible to me right now. In no particular order. If someone else
wants to dig in, feel free. wants to dig in, feel free.
1) Some kind of crude display capability. Not too hard, I guess. 1) Some kind of watchpoint capability. Pretty easy once we have a
Just keep a list of addresses, counts and formats that we
want displayed each time we enter the debugger.
2) Some kind of single step capability.
I am not sure - I think you just set a flag
in AFLAGS, and you get an interrupt back again.
The signal type would proabably be different, however,
but Wine could easily be patched to accept this one as well.
The main problem with this is that gdb normally runs in a
separate process so it is easy to single step second process.
Here we are all part of the same process. Perhaps we could look
ahead to the end of the instruction and set another breakpoint?
3) Some kind of breakpoint capability.
Requires single step. When we restart, we
remove the breakpoint, single step one instruction
replace the breakpoint, and then continue.
4) Some kind of watchpoint capability. Pretty easy once we have a
single step capability, but we end up running the program single step capability, but we end up running the program
really slowly one instruction at a time. really slowly one instruction at a time. Use hardware debug
registers for this???
5) Some kind of .wdbinit file. 2) Some kind of .wdbinit file.
3) Add 'info line' command. Not all *that* useful, but it would tell you
the range of PC for a given source line.
4) Add search directory list for PDB files. We have the path in the
DOS notation (i.e. C:\foo\bar\xxx.c), which may be a useful hint.
Maybe not.
5) Add support for emacs mode so that you can run under emacs and have
the source pop up automatically. Only useful once the list command
is implemented.
6 Add support for Borland. I have heard rumors that Borland is forthcoming
with info about how their stuff works, so this might not be that
bad.
7 Add support for Win16. Not sure if this is really worth the trouble. How
much are people really going to use this in the long run???
8) Some of the newer displays are still a little bit sparse on information.
Make these more like gdb.
9) Don't bother to disassemble an instruction when we stop at a breakpoint
and if we have a valid source line we are displaying.
10) Add support for '/i', etc in display command. Make sure 'display/i $eip'
does the correct thing, and then skip automatic disassembly completely.
11) Limit amount of information displayed with print command.
12) Make sure operator precedence works OK.
****************
...@@ -72,6 +72,13 @@ ...@@ -72,6 +72,13 @@
static BOOL32 db_disasm_16 = FALSE; static BOOL32 db_disasm_16 = FALSE;
/* /*
* Flag to indicate whether we need to display instruction,
* or whether we just need to know the address of the next
* instruction.
*/
static BOOL32 db_display = FALSE;
/*
* Size attributes * Size attributes
*/ */
#define BYTE 0 #define BYTE 0
...@@ -1009,7 +1016,7 @@ static void db_task_printsym(unsigned int addr, int size) ...@@ -1009,7 +1016,7 @@ static void db_task_printsym(unsigned int addr, int size)
break; break;
case LONG: case LONG:
{ {
DBG_ADDR address = { 0, addr }; DBG_ADDR address = { NULL, 0, addr };
DEBUG_PrintAddress( &address, db_disasm_16 ? 16 : 32, TRUE ); DEBUG_PrintAddress( &address, db_disasm_16 ? 16 : 32, TRUE );
} }
break; break;
...@@ -1057,6 +1064,11 @@ void db_disasm_esc( DBG_ADDR *addr, int inst, int short_addr, ...@@ -1057,6 +1064,11 @@ void db_disasm_esc( DBG_ADDR *addr, int inst, int short_addr,
const char * name; const char * name;
get_value_inc(regmodrm, addr, 1, FALSE); get_value_inc(regmodrm, addr, 1, FALSE);
if( !db_display )
{
return;
}
fp = &db_Esc_inst[inst - 0xd8][f_reg(regmodrm)]; fp = &db_Esc_inst[inst - 0xd8][f_reg(regmodrm)];
mod = f_mod(regmodrm); mod = f_mod(regmodrm);
if (mod != 3) { if (mod != 3) {
...@@ -1128,7 +1140,7 @@ void db_disasm_esc( DBG_ADDR *addr, int inst, int short_addr, ...@@ -1128,7 +1140,7 @@ void db_disasm_esc( DBG_ADDR *addr, int inst, int short_addr,
* Disassemble instruction at 'addr'. addr is changed to point to the * Disassemble instruction at 'addr'. addr is changed to point to the
* start of the next instruction. * start of the next instruction.
*/ */
void DEBUG_Disasm( DBG_ADDR *addr ) void DEBUG_Disasm( DBG_ADDR *addr, int display )
{ {
int inst; int inst;
int size; int size;
...@@ -1146,6 +1158,11 @@ void DEBUG_Disasm( DBG_ADDR *addr ) ...@@ -1146,6 +1158,11 @@ void DEBUG_Disasm( DBG_ADDR *addr )
int len; int len;
struct i_addr address; struct i_addr address;
/*
* Set this so we get can supress the printout if we need to.
*/
db_display = display;
if (!addr->seg) db_disasm_16 = FALSE; if (!addr->seg) db_disasm_16 = FALSE;
else db_disasm_16 = !(GET_SEL_FLAGS(addr->seg) & LDT_FLAGS_32BIT); else db_disasm_16 = !(GET_SEL_FLAGS(addr->seg) & LDT_FLAGS_32BIT);
...@@ -1263,145 +1280,242 @@ void DEBUG_Disasm( DBG_ADDR *addr ) ...@@ -1263,145 +1280,242 @@ void DEBUG_Disasm( DBG_ADDR *addr )
} }
if (i_size == SDEP) { if (i_size == SDEP) {
if (size == WORD) if( db_display )
{
if (size == WORD)
fprintf(stderr,i_name); fprintf(stderr,i_name);
else else
fprintf(stderr,ip->i_extra); fprintf(stderr,ip->i_extra);
}
} }
else { else {
fprintf(stderr,i_name); if( db_display )
{
fprintf(stderr,i_name);
}
if (i_size != NONE) { if (i_size != NONE) {
if (i_size == BYTE) { if (i_size == BYTE) {
fprintf(stderr,"b"); if( db_display )
{
fprintf(stderr,"b");
}
size = BYTE; size = BYTE;
} }
else if (i_size == WORD) { else if (i_size == WORD) {
fprintf(stderr,"w"); if( db_display )
{
fprintf(stderr,"w");
}
size = WORD; size = WORD;
} }
else if (size == WORD) else if (size == WORD)
fprintf(stderr,"w"); {
if( db_display )
{
fprintf(stderr,"w");
}
}
else else
fprintf(stderr,"l"); {
if( db_display )
{
fprintf(stderr,"l");
}
}
} }
} }
fprintf(stderr,"\t"); if( db_display )
{
fprintf(stderr,"\t");
}
for (first = TRUE; for (first = TRUE;
i_mode != 0; i_mode != 0;
i_mode >>= 8, first = FALSE) i_mode >>= 8, first = FALSE)
{ {
if (!first) if (!first && db_display)
fprintf(stderr,","); fprintf(stderr,",");
switch (i_mode & 0xFF) { switch (i_mode & 0xFF) {
case E: case E:
db_print_address(seg, size, &address); if( db_display )
{
db_print_address(seg, size, &address);
}
break; break;
case Eind: case Eind:
fprintf(stderr,"*"); if( db_display )
db_print_address(seg, size, &address); {
fprintf(stderr,"*");
db_print_address(seg, size, &address);
}
break; break;
case Ew: case Ew:
db_print_address(seg, WORD, &address); if( db_display )
{
db_print_address(seg, WORD, &address);
}
break; break;
case Eb: case Eb:
db_print_address(seg, BYTE, &address); if( db_display )
{
db_print_address(seg, BYTE, &address);
}
break; break;
case R: case R:
fprintf(stderr,"%s", db_reg[size][f_reg(regmodrm)]); if( db_display )
{
fprintf(stderr,"%s", db_reg[size][f_reg(regmodrm)]);
}
break; break;
case Rw: case Rw:
fprintf(stderr,"%s", db_reg[WORD][f_reg(regmodrm)]); if( db_display )
{
fprintf(stderr,"%s", db_reg[WORD][f_reg(regmodrm)]);
}
break; break;
case Ri: case Ri:
fprintf(stderr,"%s", db_reg[size][f_rm(inst)]); if( db_display )
{
fprintf(stderr,"%s", db_reg[size][f_rm(inst)]);
}
break; break;
case S: case S:
fprintf(stderr,"%s", db_seg_reg[f_reg(regmodrm)]); if( db_display )
{
fprintf(stderr,"%s", db_seg_reg[f_reg(regmodrm)]);
}
break; break;
case Si: case Si:
fprintf(stderr,"%s", db_seg_reg[f_reg(inst)]); if( db_display )
{
fprintf(stderr,"%s", db_seg_reg[f_reg(inst)]);
}
break; break;
case A: case A:
fprintf(stderr,"%s", db_reg[size][0]); /* acc */ if( db_display )
{
fprintf(stderr,"%s", db_reg[size][0]); /* acc */
}
break; break;
case BX: case BX:
if (seg) if( db_display )
{
if (seg)
fprintf(stderr,"%s:", seg); fprintf(stderr,"%s:", seg);
fprintf(stderr,"(%s)", short_addr ? "%bx" : "%ebx"); fprintf(stderr,"(%s)", short_addr ? "%bx" : "%ebx");
}
break; break;
case CL: case CL:
fprintf(stderr,"%%cl"); if( db_display )
{
fprintf(stderr,"%%cl");
}
break; break;
case DX: case DX:
fprintf(stderr,"%%dx"); if( db_display )
{
fprintf(stderr,"%%dx");
}
break; break;
case SI: case SI:
if (seg) if( db_display )
{
if (seg)
fprintf(stderr,"%s:", seg); fprintf(stderr,"%s:", seg);
fprintf(stderr,"(%s)", short_addr ? "%si" : "%esi"); fprintf(stderr,"(%s)", short_addr ? "%si" : "%esi");
}
break; break;
case DI: case DI:
fprintf(stderr,"%%es:(%s)", short_addr ? "%di" : "%edi"); if( db_display )
{
fprintf(stderr,"%%es:(%s)", short_addr ? "%di" : "%edi");
}
break; break;
case CR: case CR:
fprintf(stderr,"%%cr%d", f_reg(regmodrm)); if( db_display )
{
fprintf(stderr,"%%cr%d", f_reg(regmodrm));
}
break; break;
case DR: case DR:
fprintf(stderr,"%%dr%d", f_reg(regmodrm)); if( db_display )
{
fprintf(stderr,"%%dr%d", f_reg(regmodrm));
}
break; break;
case TR: case TR:
fprintf(stderr,"%%tr%d", f_reg(regmodrm)); if( db_display )
{
fprintf(stderr,"%%tr%d", f_reg(regmodrm));
}
break; break;
case I: case I:
len = db_lengths[size]; len = db_lengths[size];
get_value_inc(imm, addr, len, FALSE);/* unsigned */ get_value_inc(imm, addr, len, FALSE);/* unsigned */
fprintf(stderr,"$0x%x", imm); if( db_display )
{
fprintf(stderr,"$0x%x", imm);
}
break; break;
case Is: case Is:
len = db_lengths[size]; len = db_lengths[size];
get_value_inc(imm, addr, len, TRUE); /* signed */ get_value_inc(imm, addr, len, TRUE); /* signed */
fprintf(stderr,"$%d", imm); if( db_display )
{
fprintf(stderr,"$%d", imm);
}
break; break;
case Ib: case Ib:
get_value_inc(imm, addr, 1, FALSE); /* unsigned */ get_value_inc(imm, addr, 1, FALSE); /* unsigned */
fprintf(stderr,"$0x%x", imm); if( db_display )
{
fprintf(stderr,"$0x%x", imm);
}
break; break;
case Ibs: case Ibs:
get_value_inc(imm, addr, 1, TRUE); /* signed */ get_value_inc(imm, addr, 1, TRUE); /* signed */
fprintf(stderr,"$%d", imm); if( db_display )
{
fprintf(stderr,"$%d", imm);
}
break; break;
case Iw: case Iw:
get_value_inc(imm, addr, 2, FALSE); /* unsigned */ get_value_inc(imm, addr, 2, FALSE); /* unsigned */
fprintf(stderr,"$0x%x", imm); if( db_display )
{
fprintf(stderr,"$0x%x", imm);
}
break; break;
case Il: case Il:
get_value_inc(imm, addr, 4, FALSE); get_value_inc(imm, addr, 4, FALSE);
fprintf(stderr,"$0x%x", imm); if( db_display )
{
fprintf(stderr,"$0x%x", imm);
}
break; break;
case O: case O:
...@@ -1411,6 +1525,11 @@ void DEBUG_Disasm( DBG_ADDR *addr ) ...@@ -1411,6 +1525,11 @@ void DEBUG_Disasm( DBG_ADDR *addr )
else { else {
get_value_inc(displ, addr, 4, TRUE); get_value_inc(displ, addr, 4, TRUE);
} }
if( !db_display )
{
break;
}
if (seg) if (seg)
fprintf(stderr,"%s:%d",seg, displ); fprintf(stderr,"%s:%d",seg, displ);
else else
...@@ -1419,6 +1538,11 @@ void DEBUG_Disasm( DBG_ADDR *addr ) ...@@ -1419,6 +1538,11 @@ void DEBUG_Disasm( DBG_ADDR *addr )
case Db: case Db:
get_value_inc(displ, addr, 1, TRUE); get_value_inc(displ, addr, 1, TRUE);
if( !db_display )
{
break;
}
if (short_addr) { if (short_addr) {
/* offset only affects low 16 bits */ /* offset only affects low 16 bits */
displ = (addr->off & 0xffff0000) displ = (addr->off & 0xffff0000)
...@@ -1439,15 +1563,25 @@ void DEBUG_Disasm( DBG_ADDR *addr ) ...@@ -1439,15 +1563,25 @@ void DEBUG_Disasm( DBG_ADDR *addr )
get_value_inc(displ, addr, 4, TRUE); get_value_inc(displ, addr, 4, TRUE);
displ += addr->off; displ += addr->off;
} }
if( !db_display )
{
break;
}
db_task_printsym( displ, short_addr ? WORD : LONG); db_task_printsym( displ, short_addr ? WORD : LONG);
break; break;
case o1: case o1:
fprintf(stderr,"$1"); if( db_display )
{
fprintf(stderr,"$1");
}
break; break;
case o3: case o3:
fprintf(stderr,"$3"); if( db_display )
{
fprintf(stderr,"$3");
}
break; break;
case OS: case OS:
...@@ -1457,8 +1591,12 @@ void DEBUG_Disasm( DBG_ADDR *addr ) ...@@ -1457,8 +1591,12 @@ void DEBUG_Disasm( DBG_ADDR *addr )
short_addr ? 2 : 4, FALSE ); short_addr ? 2 : 4, FALSE );
get_value_inc( address.seg, addr, /* segment */ get_value_inc( address.seg, addr, /* segment */
2, FALSE ); 2, FALSE );
DEBUG_PrintAddress( &address, short_addr ? 16 : 32, if( db_display )
TRUE ); {
DEBUG_PrintAddress( &address, short_addr ? 16 : 32,
TRUE );
}
} }
break; break;
} }
......
/*
* File dbgmain.c - main wrapper for internal debugger test bed.
*
* Copyright (C) 1997, Eric Youngdale.
*/
#include <signal.h>
#include <ldt.h>
#include <windows.h>
#include <toolhelp.h>
#include <module.h>
#include <debugger.h>
#include <class.h>
#include <X11/Xlib.h>
#include "debugger.h"
#include "peexe.h"
ldt_copy_entry ldt_copy[LDT_SIZE];
unsigned char ldt_flags_copy[LDT_SIZE];
Display * display;
int
XUngrabPointer( Display * d, Time t)
{
return(0);
}
int
XUngrabServer( Display * d )
{
return(0);
}
int
XFlush(Display * d )
{
return(0);
}
HTASK16 GetCurrentTask()
{
exit(0);
}
HMODULE16 GetExePtr(HANDLE16 h)
{
exit(0);
}
LPSTR MODULE_GetModuleName( HMODULE16 hModule )
{
exit(0);
}
int PROFILE_GetWineIniString( const char *section, const char *key_name,
const char *def, char *buffer, int len )
{
exit(0);
}
void CLASS_DumpClass( CLASS *class )
{
exit(0);
}
void MODULE_DumpModule( HMODULE16 hmodule )
{
exit(0);
}
void QUEUE_DumpQueue( HQUEUE16 hQueue )
{
exit(0);
}
void WIN_DumpWindow( HWND32 hwnd )
{
exit(0);
}
void CLASS_WalkClasses()
{
exit(0);
}
void MODULE_WalkModules()
{
exit(0);
}
void QUEUE_WalkQueues()
{
exit(0);
}
void WIN_WalkWindows( HWND32 hwnd, int indent )
{
exit(0);
}
NE_MODULE *MODULE_GetPtr( HMODULE16 hModule )
{
exit(0);
}
FARPROC16 MODULE_GetEntryPoint( HMODULE16 hModule, WORD ordinal )
{
exit(0);
}
void LDT_Print( int start, int length )
{
exit(0);
}
LPVOID GlobalLock16(HGLOBAL16 h)
{
exit(0);
}
BOOL16 ModuleFirst(MODULEENTRY *lpModule)
{
return 0;
}
BOOL16 ModuleNext(MODULEENTRY *lpModule)
{
return 0;
}
BOOL16 IsBadReadPtr16(SEGPTR s,UINT16 o)
{
exit(0);
}
BOOL32 IsBadReadPtr32(LPCVOID s,UINT32 o)
{
exit(0);
}
struct qwert
{
unsigned flag1:1;
unsigned flag3:3;
signed remain:11;
unsigned whatsup:17;
} vvv;
int xyzzy(const char * qwe, int ijk)
{
return strlen(qwe) + ijk;
}
unsigned int * xxx;
unsigned int * yyy;
int xxx3[10];
char vdv[100];
struct deferred_debug_info
{
struct deferred_debug_info * next;
char * load_addr;
char * module_name;
char * dbg_info;
int dbg_size;
struct PE_Debug_dir * dbgdir;
struct pe_data * pe;
struct pe_segment_table * sectp;
int nsect;
short int dbg_index;
char loaded;
};
struct CodeViewDebug
{
char cv_nbtype[8];
unsigned int cv_timestamp;
char cv_unknown[4];
char cv_name[1];
};
test_pdbstuff()
{
struct deferred_debug_info deefer;
struct PE_Debug_dir dinfo;
struct CodeViewDebug cdebug;
struct pe_segment_table sects[10];
memset(&deefer, 0, sizeof(deefer));
memset(&dinfo, 0, sizeof(dinfo));
memset(&cdebug, 0, sizeof(cdebug));
memset(&sects, 0, sizeof(sects));
deefer.dbg_info = (char *) &cdebug;
dinfo.timestamp = 812932395;
cdebug.cv_timestamp = 833392137 /* 841951397 */;
deefer.dbgdir = &dinfo;
deefer.sectp = &sects;
deefer.nsect = 10;
DEBUG_InitTypes();
DEBUG_ProcessPDBFile(&deefer, "../dumpexe.pdb");
}
int
main(int argc, char * argv[])
{
extern char * DEBUG_argv0;
SIGCONTEXT reg;
strcpy(vdv, "This is a test");
memset(&vvv, 0xff, sizeof(vvv));
vvv.whatsup = 0;
vvv.flag3 = 0;
vvv.remain = 0x401;
DEBUG_argv0 = argv[0];
xxx = (unsigned int*) &vvv;
yyy = xxx + 5;
xxx3[5] = 7;
test_pdbstuff();
memset(&reg, 0, sizeof(reg));
wine_debug(SIGSEGV, &reg);
return 0;
}
...@@ -34,11 +34,23 @@ static int syntax_error; ...@@ -34,11 +34,23 @@ static int syntax_error;
DIGIT [0-9] DIGIT [0-9]
HEXDIGIT [0-9a-fA-F] HEXDIGIT [0-9a-fA-F]
FORMAT [bcdiswx] FORMAT [bcdiswx]
IDENTIFIER [_a-zA-Z\.~][_a-zA-Z0-9\.~@]* IDENTIFIER [_a-zA-Z~][_a-zA-Z0-9~@]*
PATHNAME [/_a-zA-Z\.~][/_a-zA-Z0-9\.~@]*
STRING \"[^\n"]+\"
%s FORMAT_EXPECTED
%s PATH_EXPECTED
%s INFO_CMD
%s HELP_CMD
%s DEL_CMD
%s WALK_CMD
%s SHOW_CMD
%s NOCMD
%% %%
\n { syntax_error = 0; return tEOL; } /*Indicates end of command*/ \n { BEGIN(0); syntax_error = 0;
return tEOL; } /*Indicates end of command. Reset state. */
"||" { return OP_LOR; } "||" { return OP_LOR; }
"&&" { return OP_LAND; } "&&" { return OP_LAND; }
...@@ -48,16 +60,24 @@ IDENTIFIER [_a-zA-Z\.~][_a-zA-Z0-9\.~@]* ...@@ -48,16 +60,24 @@ IDENTIFIER [_a-zA-Z\.~][_a-zA-Z0-9\.~@]*
">=" { return OP_GE; } ">=" { return OP_GE; }
"<<" { return OP_SHL; } "<<" { return OP_SHL; }
">>" { return OP_SHR; } ">>" { return OP_SHR; }
[-+<=>|&^()*/%:!~] { return *yytext; } "->" { return OP_DRF; }
[-+<=>|&^()*/%:!~,\.] { return *yytext; }
"[" { return *yytext; }
"]" { return *yytext; }
"0x"{HEXDIGIT}+ { sscanf(yytext, "%x", &yylval.integer); return tNUM; } "0x"{HEXDIGIT}+ { sscanf(yytext, "%x", &yylval.integer); return tNUM; }
{DIGIT}+ { sscanf(yytext, "%d", &yylval.integer); return tNUM; } {DIGIT}+ { sscanf(yytext, "%d", &yylval.integer); return tNUM; }
"/"{DIGIT}+{FORMAT} { char * last;
<FORMAT_EXPECTED>"/"{DIGIT}+{FORMAT} { char * last;
yylval.integer = strtol( yytext+1, &last, NULL ); yylval.integer = strtol( yytext+1, &last, NULL );
yylval.integer = (yylval.integer << 8) | *last; yylval.integer = (yylval.integer << 8) | *last;
return tFORMAT; } return tFORMAT; }
"/"{FORMAT} { yylval.integer = (1 << 8) | yytext[1]; return tFORMAT; }
<FORMAT_EXPECTED>"/"{FORMAT} { yylval.integer = (1 << 8) | yytext[1]; return tFORMAT; }
{STRING} { yylval.string = make_symbol(yytext); return tSTRING; }
$pc { yylval.reg = REG_EIP; return tREG; } $pc { yylval.reg = REG_EIP; return tREG; }
$flags { yylval.reg = REG_EFL; return tREG; } $flags { yylval.reg = REG_EFL; return tREG; }
...@@ -86,49 +106,60 @@ $ss { yylval.reg = REG_SS; return tREG; } ...@@ -86,49 +106,60 @@ $ss { yylval.reg = REG_SS; return tREG; }
$fs { yylval.reg = REG_FS; return tREG; } $fs { yylval.reg = REG_FS; return tREG; }
$gs { yylval.reg = REG_GS; return tREG; } $gs { yylval.reg = REG_GS; return tREG; }
up { return tUP; } <INITIAL>info|inf|in { BEGIN(INFO_CMD); return tINFO; }
down|dow|do { return tDOWN; } <INITIAL>up { BEGIN(NOCMD); return tUP; }
frame|fram|fra|fr { return tFRAME; } <INITIAL>down|dow|do { BEGIN(NOCMD); return tDOWN; }
locals|local|loca|loc { return tLOCAL; } <INITIAL>frame|fram|fra|fr { BEGIN(NOCMD); return tFRAME; }
info|inf|in { return tINFO; } <INITIAL>list|lis|li|l { BEGIN(PATH_EXPECTED); return tLIST; }
show|sho|sh { return tINFO; } <INITIAL>enable|enabl|enab|ena { BEGIN(NOCMD); return tENABLE;}
list|lis|li|l { return tLIST; } <INITIAL>disable|disabl|disab|disa|dis { BEGIN(NOCMD); return tDISABLE; }
break|brea|bre|br|b { return tBREAK; } <INITIAL,INFO_CMD,DEL_CMD>display|displa|displ|disp { BEGIN(NOCMD); return tDISPLAY; }
enable|enabl|enab|ena { return tENABLE;} <INITIAL>undisplay|undispla|undispl|undisp|undis|undi|und { BEGIN(NOCMD); return tUNDISPLAY; }
disable|disabl|disab|disa|dis { return tDISABLE; } <INITIAL>delete|delet|dele|del { BEGIN(DEL_CMD); return tDELETE; }
delete|delet|dele|del { return tDELETE; } <INITIAL>quit|qui|qu|q { BEGIN(NOCMD); return tQUIT; }
quit|qui|qu|q { return tQUIT; } <INITIAL>set|se { BEGIN(NOCMD); return tSET; }
set|se { return tSET; } <INITIAL>walk|w { BEGIN(WALK_CMD); return tWALK; }
walk|w { return tWALK; } <INITIAL>x { BEGIN(FORMAT_EXPECTED); return tEXAM; }
x { return tEXAM; } <INITIAL>help|hel|he|"?" { BEGIN(HELP_CMD); return tHELP; }
class|clas|cla { return tCLASS; } <INITIAL>backtrace|backtrac|backtra|backt|back|bac|ba|bt { BEGIN(NOCMD); return tBACKTRACE; }
module|modul|modu|mod { return tMODULE; } <INITIAL>where|wher|whe { BEGIN(NOCMD); return tBACKTRACE; }
queue|queu|que { return tQUEUE; }
registers|regs|reg|re { return tREGS; } <INITIAL>cont|con|co|c { BEGIN(NOCMD); return tCONT; }
segments|segment|segm|seg|se { return tSEGMENTS; } <INITIAL>condition|conditio|conditi|condit|condi|cond { BEGIN(NOCMD); return tCOND; }
stack|stac|sta|st { return tSTACK; } <INITIAL>step|ste|st|s { BEGIN(NOCMD); return tSTEP; }
window|windo|wind|win|wnd { return tWND; } <INITIAL>next|nex|ne|n { BEGIN(NOCMD); return tNEXT; }
<INITIAL>stepi|si { BEGIN(NOCMD); return tSTEPI; }
help|hel|he|"?" { return tHELP; } <INITIAL>nexti|ni { BEGIN(NOCMD); return tNEXTI; }
<INITIAL>finish|finis|fini|fin|fi { BEGIN(NOCMD); return tFINISH; }
backtrace|backtrac|backtra|backt|back|bac|ba|bt { return tBACKTRACE; }
where|wher|whe { return tBACKTRACE; } <INITIAL>abort|abor|abo { BEGIN(NOCMD); return tABORT; }
<INITIAL>print|prin|pri|pr|p { BEGIN(FORMAT_EXPECTED); return tPRINT; }
cont|con|co|c { return tCONT; }
step|ste|st|s { return tSTEP; } <INITIAL>mode { BEGIN(NOCMD); return tMODE; }
next|nex|ne|n { return tNEXT; } <INITIAL>show|sho|sh { BEGIN(SHOW_CMD); return tSHOW; }
symbolfile|symbolfil|symbolfi|symbolf|symbol|symbo|symb { return tSYMBOLFILE; } <INFO_CMD,INITIAL>break|brea|bre|br|b { BEGIN(PATH_EXPECTED); return tBREAK; }
define|defin|defi|def|de { return tDEFINE; } <INFO_CMD>share|shar|sha { return tSHARE; }
abort|abor|abo { return tABORT; } <INFO_CMD>locals|local|loca|loc { return tLOCAL; }
print|prin|pri|pr|p { return tPRINT; } <INFO_CMD,WALK_CMD>class|clas|cla { return tCLASS; }
<INFO_CMD,WALK_CMD>module|modul|modu|mod { return tMODULE; }
mode { return tMODE; } <INFO_CMD,WALK_CMD>queue|queu|que { return tQUEUE; }
<INFO_CMD>registers|regs|reg|re { return tREGS; }
<INFO_CMD>segments|segment|segm|seg|se { return tSEGMENTS; }
<INFO_CMD>stack|stac|sta|st { return tSTACK; }
<INFO_CMD,WALK_CMD>window|windo|wind|win|wnd { return tWND; }
<HELP_CMD>info|inf|in { return tINFO; }
<INITIAL,SHOW_CMD>directories|directorie|directori|director|directo|direct|direc|direc|dir {
BEGIN(PATH_EXPECTED); return tDIR; }
{IDENTIFIER} { yylval.string = make_symbol(yytext); return tIDENTIFIER; } {IDENTIFIER} { yylval.string = make_symbol(yytext); return tIDENTIFIER; }
<PATH_EXPECTED>{PATHNAME} { yylval.string = make_symbol(yytext); return tPATH; }
[ \t]+ /* Eat up whitespace */ [ \t]+ /* Eat up whitespace */
. { if (syntax_error == 0) . { if (syntax_error == 0)
...@@ -137,6 +168,7 @@ mode { return tMODE; } ...@@ -137,6 +168,7 @@ mode { return tMODE; }
} }
} }
%% %%
#ifndef yywrap #ifndef yywrap
...@@ -217,7 +249,7 @@ static int dbg_read(char * buf, int size) ...@@ -217,7 +249,7 @@ static int dbg_read(char * buf, int size)
} }
} }
static char *local_symbols[10]; static char *local_symbols[30];
static int next_symbol; static int next_symbol;
char * make_symbol(char * symbol){ char * make_symbol(char * symbol){
......
/*
* File display.c - display handling for Wine internal debugger.
*
* Copyright (C) 1997, Eric Youngdale.
*
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include <sys/types.h>
#include <neexe.h>
#include "module.h"
#include "selectors.h"
#include "debugger.h"
#include "toolhelp.h"
#include "xmalloc.h"
#include <stdarg.h>
#define MAX_DISPLAY 25
static struct expr * displaypoints[MAX_DISPLAY];
int
DEBUG_AddDisplay(struct expr * exp)
{
int i;
/*
* First find a slot where we can store this display.
*/
for(i=0; i < MAX_DISPLAY; i++ )
{
if( displaypoints[i] == NULL )
{
displaypoints[i] = DEBUG_CloneExpr(exp);
break;
}
}
return TRUE;
}
int
DEBUG_InfoDisplay()
{
int i;
/*
* First find a slot where we can store this display.
*/
for(i=0; i < MAX_DISPLAY; i++ )
{
if( displaypoints[i] != NULL )
{
fprintf(stderr, "%d : ", i+1);
DEBUG_DisplayExpr(displaypoints[i]);
fprintf(stderr, "\n");
}
}
return TRUE;
}
int
DEBUG_DoDisplay()
{
DBG_ADDR addr;
int i;
/*
* First find a slot where we can store this display.
*/
for(i=0; i < MAX_DISPLAY; i++ )
{
if( displaypoints[i] != NULL )
{
addr = DEBUG_EvalExpr(displaypoints[i]);
if( addr.type == NULL )
{
fprintf(stderr, "Unable to evaluate expression ");
DEBUG_DisplayExpr(displaypoints[i]);
fprintf(stderr, "\nDisabling...\n");
DEBUG_DelDisplay(i);
}
else
{
fprintf(stderr, "%d : ", i + 1);
DEBUG_DisplayExpr(displaypoints[i]);
fprintf(stderr, " = ");
DEBUG_Print( &addr, 1, 0, 0);
}
}
}
return TRUE;
}
int
DEBUG_DelDisplay(int displaynum)
{
int i;
if( displaynum >= MAX_DISPLAY || displaynum == 0 || displaynum < -1 )
{
fprintf(stderr, "Invalid display number\n");
return TRUE;
}
if( displaynum == -1 )
{
for(i=0; i < MAX_DISPLAY; i++ )
{
if( displaypoints[i] != NULL )
{
DEBUG_FreeExpr(displaypoints[i]);
displaypoints[i] = NULL;
}
}
}
else if( displaypoints[displaynum - 1] != NULL )
{
DEBUG_FreeExpr(displaypoints[displaynum - 1]);
displaypoints[displaynum - 1] = NULL;
}
return TRUE;
}
This diff is collapsed. Click to expand it.
#define EXP_OP_LOR 0x01
#define EXP_OP_LAND 0x02
#define EXP_OP_OR 0x03
#define EXP_OP_AND 0x04
#define EXP_OP_XOR 0x05
#define EXP_OP_EQ 0x06
#define EXP_OP_GT 0x07
#define EXP_OP_LT 0x08
#define EXP_OP_GE 0x09
#define EXP_OP_LE 0x0a
#define EXP_OP_NE 0x0b
#define EXP_OP_SHL 0x0c
#define EXP_OP_SHR 0x0d
#define EXP_OP_ADD 0x0e
#define EXP_OP_SUB 0x0f
#define EXP_OP_MUL 0x10
#define EXP_OP_DIV 0x11
#define EXP_OP_REM 0x12
#define EXP_OP_NEG 0x13
#define EXP_OP_NOT 0x24
#define EXP_OP_LNOT 0x25
#define EXP_OP_DEREF 0x26
#define EXP_OP_ADDR 0x27
#define EXP_OP_ARR 0x28
#define EXP_OP_SEG 0x29
#define EXP_OP_FORCE_DEREF 0x2a
...@@ -8,66 +8,56 @@ ...@@ -8,66 +8,56 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include "debugger.h" #include "debugger.h"
#include "expr.h"
/*********************************************************************** /***********************************************************************
* DEBUG_Print * DEBUG_Print
* *
* Implementation of the 'print' command. * Implementation of the 'print' command.
*/ */
void DEBUG_Print( const DBG_ADDR *addr, int count, char format ) void DEBUG_PrintBasic( const DBG_ADDR *addr, int count, char format )
{ {
if (count != 1) char * default_format;
{ long long int value;
fprintf( stderr, "Count other than 1 is meaningless in 'print' command\n" );
return;
}
if (addr->seg && (addr->seg != 0xffffffff)) if( addr->type == NULL )
{ {
switch(format) fprintf(stderr, "Unable to evaluate expression\n");
{ return;
case 'x':
fprintf( stderr, "0x%04lx:", addr->seg );
break;
case 'd':
fprintf( stderr, "%ld:", addr->seg );
break;
case 'c':
break; /* No segment to print */
case 'i':
case 's':
case 'w':
case 'b':
break; /* Meaningless format */
}
} }
default_format = NULL;
value = DEBUG_GetExprValue((DBG_ADDR *) addr, &default_format);
switch(format) switch(format)
{ {
case 'x': case 'x':
if (addr->seg) fprintf( stderr, "0x%04lx\n", addr->off ); if (addr->seg) fprintf( stderr, "0x%04lx", (long unsigned int) value );
else fprintf( stderr, "0x%08lx\n", addr->off ); else fprintf( stderr, "0x%08lx", (long unsigned int) value );
break; break;
case 'd': case 'd':
fprintf( stderr, "%ld\n", addr->off ); fprintf( stderr, "%ld\n", (long int) value );
break; break;
case 'c': case 'c':
fprintf( stderr, "%d = '%c'\n", fprintf( stderr, "%d = '%c'",
(char)(addr->off & 0xff), (char)(addr->off & 0xff) ); (char)(value & 0xff), (char)(value & 0xff) );
break; break;
case 'i': case 'i':
case 's': case 's':
case 'w': case 'w':
case 'b': case 'b':
fprintf( stderr, "Format specifier '%c' is meaningless in 'print' command\n", format ); fprintf( stderr, "Format specifier '%c' is meaningless in 'print' command\n", format );
break; case 0:
if( default_format != NULL )
{
fprintf( stderr, default_format, value );
}
break;
} }
} }
...@@ -76,17 +66,19 @@ void DEBUG_Print( const DBG_ADDR *addr, int count, char format ) ...@@ -76,17 +66,19 @@ void DEBUG_Print( const DBG_ADDR *addr, int count, char format )
* *
* Print an 16- or 32-bit address, with the nearest symbol if any. * Print an 16- or 32-bit address, with the nearest symbol if any.
*/ */
struct name_hash * struct symbol_info
DEBUG_PrintAddress( const DBG_ADDR *addr, int addrlen, int flag ) DEBUG_PrintAddress( const DBG_ADDR *addr, int addrlen, int flag )
{ {
struct name_hash * nh; struct symbol_info rtn;
const char *name = DEBUG_FindNearestSymbol( addr, flag, &nh, 0 );
const char *name = DEBUG_FindNearestSymbol( addr, flag, &rtn.sym, 0,
&rtn.list );
if (addr->seg) fprintf( stderr, "0x%04lx:", addr->seg ); if (addr->seg) fprintf( stderr, "0x%04lx:", addr->seg );
if (addrlen == 16) fprintf( stderr, "0x%04lx", addr->off ); if (addrlen == 16) fprintf( stderr, "0x%04lx", addr->off );
else fprintf( stderr, "0x%08lx", addr->off ); else fprintf( stderr, "0x%08lx", addr->off );
if (name) fprintf( stderr, " (%s)", name ); if (name) fprintf( stderr, " (%s)", name );
return nh; return rtn;
} }
/*********************************************************************** /***********************************************************************
* DEBUG_PrintAddressAndArgs * DEBUG_PrintAddressAndArgs
...@@ -95,19 +87,21 @@ DEBUG_PrintAddress( const DBG_ADDR *addr, int addrlen, int flag ) ...@@ -95,19 +87,21 @@ DEBUG_PrintAddress( const DBG_ADDR *addr, int addrlen, int flag )
* Similar to DEBUG_PrintAddress, but we print the arguments to * Similar to DEBUG_PrintAddress, but we print the arguments to
* each function (if known). This is useful in a backtrace. * each function (if known). This is useful in a backtrace.
*/ */
struct name_hash * struct symbol_info
DEBUG_PrintAddressAndArgs( const DBG_ADDR *addr, int addrlen, DEBUG_PrintAddressAndArgs( const DBG_ADDR *addr, int addrlen,
unsigned int ebp, int flag ) unsigned int ebp, int flag )
{ {
struct name_hash * nh; struct symbol_info rtn;
const char *name = DEBUG_FindNearestSymbol( addr, flag, &nh, ebp );
const char *name = DEBUG_FindNearestSymbol( addr, flag, &rtn.sym, ebp,
&rtn.list );
if (addr->seg) fprintf( stderr, "0x%04lx:", addr->seg ); if (addr->seg) fprintf( stderr, "0x%04lx:", addr->seg );
if (addrlen == 16) fprintf( stderr, "0x%04lx", addr->off ); if (addrlen == 16) fprintf( stderr, "0x%04lx", addr->off );
else fprintf( stderr, "0x%08lx", addr->off ); else fprintf( stderr, "0x%08lx", addr->off );
if (name) fprintf( stderr, " (%s)", name ); if (name) fprintf( stderr, " (%s)", name );
return nh; return rtn;
} }
...@@ -121,23 +115,28 @@ void DEBUG_Help(void) ...@@ -121,23 +115,28 @@ void DEBUG_Help(void)
int i = 0; int i = 0;
static const char * const helptext[] = static const char * const helptext[] =
{ {
"The commands accepted by the Wine debugger are a small subset", "The commands accepted by the Wine debugger are a reasonable",
"of the commands that gdb would accept.", "of the commands that gdb accepts.",
"The commands currently are:", "The commands currently are:",
" break [*<addr>] delete break bpnum", " break [*<addr>] delete break bpnum",
" disable bpnum enable bpnum", " disable bpnum enable bpnum",
" condition <bpnum> [<expr>]",
" help quit", " help quit",
" bt cont", " bt cont [N]",
" step next", " step [N] next [N]",
" stepi [N] nexti [N]",
" x <addr> print <expr>", " x <addr> print <expr>",
" set <reg> = <expr> set *<addr> = <expr>", " set <reg> = <expr> set *<addr> = <expr>",
" symbolfile <filename> define <identifier> <addr>", " up down",
" up down\n", " list <lines> frame <n>",
" list <addr> frame <n>\n", " finish show dir",
" dir <path> display <expr>",
" delete display <disnum> undisplay <disnum>\n",
"Wine-specific commands:", "Wine-specific commands:",
" mode [16,32] walk [wnd,class,queue] <handle>", " mode [16,32] walk [wnd,class,queue] <handle>",
" info [reg,stack,break,segments,locals] info [wnd, queue] <handle>\n", " info (see 'help info' for options)\n",
"The 'x' command accepts repeat counts and formats (including 'i') in the", "The 'x' command accepts repeat counts and formats (including 'i') in the",
"same way that gdb does.\n", "same way that gdb does.\n",
...@@ -155,25 +154,31 @@ NULL ...@@ -155,25 +154,31 @@ NULL
} }
/*********************************************************************** /***********************************************************************
* DEBUG_List * DEBUG_HelpInfo
* *
* Implementation of the 'list' command. * Implementation of the 'help info' command.
*/ */
void DEBUG_List( DBG_ADDR *addr, int count ) void DEBUG_HelpInfo(void)
{
int i = 0;
static const char * const infotext[] =
{ {
static DBG_ADDR lasttime = { 0xffffffff, 0 }; "The info commands allow you to get assorted bits of interesting stuff",
"to be displayed. The options are:",
" info break Dumps information about breakpoints",
" info display Shows auto-display expressions in use",
" info locals Displays values of all local vars for current frame",
" info module Displays information about all modules",
" info queue <handle> Dumps queue information",
" info reg Displays values in all registers at top of stack",
" info segments Dumps information about all known segments",
" info share Dumps information about shared libraries",
" info stack Dumps information about top of stack",
" info wnd <handle> Dumps information about all windows",
"",
NULL
};
if (addr == NULL) addr = &lasttime; while(infotext[i]) fprintf(stderr,"%s\n", infotext[i++]);
DBG_FIX_ADDR_SEG( addr, CS_reg(&DEBUG_context) );
while (count-- > 0)
{
DEBUG_PrintAddress( addr, dbg_mode, FALSE );
fprintf( stderr, ": " );
if (!DBG_CHECK_READ_PTR( addr, 1 )) return;
DEBUG_Disasm( addr );
fprintf (stderr, "\n");
}
lasttime = *addr;
} }
...@@ -142,15 +142,31 @@ void DEBUG_WriteMemory( const DBG_ADDR *address, int value ) ...@@ -142,15 +142,31 @@ void DEBUG_WriteMemory( const DBG_ADDR *address, int value )
*/ */
void DEBUG_ExamineMemory( const DBG_ADDR *address, int count, char format ) void DEBUG_ExamineMemory( const DBG_ADDR *address, int count, char format )
{ {
DBG_ADDR addr = *address; DBG_ADDR addr = * address;
unsigned char * pnt; unsigned int * dump;
unsigned int * dump; int i;
unsigned short int * wdump; unsigned char * pnt;
int i; struct datatype * testtype;
unsigned short int * wdump;
DBG_FIX_ADDR_SEG( &addr, (format == 'i') ? DBG_FIX_ADDR_SEG( &addr, (format == 'i') ?
CS_reg(&DEBUG_context) : DS_reg(&DEBUG_context) ); CS_reg(&DEBUG_context) : DS_reg(&DEBUG_context) );
/*
* Dereference pointer to get actual memory address we need to be
* reading. We will use the same segment as what we have already,
* and hope that this is a sensible thing to do.
*/
if( addr.type != NULL )
{
if (!DBG_CHECK_READ_PTR( &addr, 1 )) return;
DEBUG_TypeDerefPointer(&addr, &testtype);
if( testtype != NULL || addr.type == DEBUG_TypeIntConst )
{
addr.off = DEBUG_GetExprValue(&addr, NULL);
}
}
if (format != 'i' && count > 1) if (format != 'i' && count > 1)
{ {
DEBUG_PrintAddress( &addr, dbg_mode, FALSE ); DEBUG_PrintAddress( &addr, dbg_mode, FALSE );
...@@ -179,7 +195,7 @@ void DEBUG_ExamineMemory( const DBG_ADDR *address, int count, char format ) ...@@ -179,7 +195,7 @@ void DEBUG_ExamineMemory( const DBG_ADDR *address, int count, char format )
DEBUG_PrintAddress( &addr, dbg_mode, TRUE ); DEBUG_PrintAddress( &addr, dbg_mode, TRUE );
fprintf(stderr,": "); fprintf(stderr,": ");
if (!DBG_CHECK_READ_PTR( &addr, 1 )) return; if (!DBG_CHECK_READ_PTR( &addr, 1 )) return;
DEBUG_Disasm( &addr ); DEBUG_Disasm( &addr, TRUE );
fprintf(stderr,"\n"); fprintf(stderr,"\n");
} }
return; return;
......
...@@ -48,6 +48,41 @@ void DEBUG_SetRegister( enum debug_regs reg, int val ) ...@@ -48,6 +48,41 @@ void DEBUG_SetRegister( enum debug_regs reg, int val )
} }
int
DEBUG_PrintRegister(enum debug_regs reg)
{
switch(reg)
{
case REG_EAX: fprintf(stderr, "%%eax"); break;
case REG_EBX: fprintf(stderr, "%%ebx"); break;
case REG_ECX: fprintf(stderr, "%%ecx"); break;
case REG_EDX: fprintf(stderr, "%%edx"); break;
case REG_ESI: fprintf(stderr, "%%esi"); break;
case REG_EDI: fprintf(stderr, "%%edi"); break;
case REG_EBP: fprintf(stderr, "%%ebp"); break;
case REG_EFL: fprintf(stderr, "%%efl"); break;
case REG_EIP: fprintf(stderr, "%%eip"); break;
case REG_ESP: fprintf(stderr, "%%esp"); break;
case REG_AX: fprintf(stderr, "%%ax"); break;
case REG_BX: fprintf(stderr, "%%bx"); break;
case REG_CX: fprintf(stderr, "%%cx"); break;
case REG_DX: fprintf(stderr, "%%dx"); break;
case REG_SI: fprintf(stderr, "%%si"); break;
case REG_DI: fprintf(stderr, "%%di"); break;
case REG_BP: fprintf(stderr, "%%bp"); break;
case REG_FL: fprintf(stderr, "%%fl"); break;
case REG_IP: fprintf(stderr, "%%ip"); break;
case REG_SP: fprintf(stderr, "%%sp"); break;
case REG_CS: fprintf(stderr, "%%cs"); break;
case REG_DS: fprintf(stderr, "%%ds"); break;
case REG_ES: fprintf(stderr, "%%es"); break;
case REG_SS: fprintf(stderr, "%%ss"); break;
case REG_FS: fprintf(stderr, "%%fs"); break;
case REG_GS: fprintf(stderr, "%%gs"); break;
}
return TRUE;
}
/*********************************************************************** /***********************************************************************
* DEBUG_GetRegister * DEBUG_GetRegister
* *
......
/*
* File source.c - source file handling for internal debugger.
*
* Copyright (C) 1997, Eric Youngdale.
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <limits.h>
#include <strings.h>
#include <unistd.h>
#include <malloc.h>
#include "win.h"
#include "pe_image.h"
#include "peexe.h"
#include "debugger.h"
#include "peexe.h"
#include "xmalloc.h"
struct searchlist
{
char * path;
struct searchlist * next;
};
struct open_filelist
{
char * path;
char * real_path;
struct open_filelist * next;
unsigned int size;
signed int nlines;
unsigned int * linelist;
};
static struct open_filelist * ofiles;
static struct searchlist * listhead;
static char DEBUG_current_sourcefile[PATH_MAX];
static int DEBUG_start_sourceline = -1;
static int DEBUG_end_sourceline = -1;
void
DEBUG_ShowDir()
{
struct searchlist * sl;
fprintf(stderr,"Search list :\n");
for(sl = listhead; sl; sl = sl->next)
{
fprintf(stderr, "\t%s\n", sl->path);
}
fprintf(stderr, "\n");
}
void
DEBUG_AddPath(const char * path)
{
struct searchlist * sl;
sl = (struct searchlist *) xmalloc(sizeof(struct searchlist));
if( sl == NULL )
{
return;
}
sl->next = listhead;
sl->path = xstrdup(path);
listhead = sl;
}
void
DEBUG_NukePath()
{
struct searchlist * sl;
struct searchlist * nxt;
for(sl = listhead; sl; sl = nxt)
{
nxt = sl->next;
free(sl->path);
free(sl);
}
listhead = NULL;
}
static
void
DEBUG_DisplaySource(char * sourcefile, int start, int end)
{
char * addr;
char buffer[1024];
int fd;
int i;
struct open_filelist * ol;
int nlines;
char * pnt;
struct searchlist * sl;
struct stat statbuf;
int status;
char tmppath[PATH_MAX];
/*
* First see whether we have the file open already. If so, then
* use that, otherwise we have to try and open it.
*/
for(ol = ofiles; ol; ol = ol->next)
{
if( strcmp(ol->path, sourcefile) == 0 )
{
break;
}
}
if( ol == NULL )
{
/*
* Try again, stripping the path from the opened file.
*/
for(ol = ofiles; ol; ol = ol->next)
{
pnt = strrchr(ol->path, '/');
if( pnt != NULL && strcmp(pnt + 1, sourcefile) == 0 )
{
break;
}
}
}
if( ol == NULL )
{
/*
* See if this is a DOS style name or not.
*/
pnt = strchr(sourcefile, '\\' );
if( pnt == NULL )
{
pnt = strchr(sourcefile, '/' );
if( pnt == NULL )
{
pnt = sourcefile;
}
}
/*
* Crapola. We need to try and open the file.
*/
status = stat(sourcefile, &statbuf);
if( status != -1 )
{
strcpy(tmppath, sourcefile);
}
else
{
for(sl = listhead; sl; sl = sl->next)
{
strcpy(tmppath, sl->path);
if( tmppath[strlen(tmppath)-1] != '/' )
{
strcat(tmppath, "/");
}
/*
* Now append the base file name.
*/
strcat(tmppath, pnt);
status = stat(tmppath, &statbuf);
if( status != -1 )
{
break;
}
}
if( sl == NULL )
{
/*
* Still couldn't find it. Ask user for path to add.
*/
fprintf(stderr,"Enter path to file %s: ", sourcefile);
fgets(tmppath, sizeof(tmppath), stdin);
if( tmppath[strlen(tmppath)-1] == '\n' )
{
tmppath[strlen(tmppath)-1] = '\0';
}
if( tmppath[strlen(tmppath)-1] != '/' )
{
strcat(tmppath, "/");
}
/*
* Now append the base file name.
*/
strcat(tmppath, pnt);
status = stat(tmppath, &statbuf);
if( status == -1 )
{
/*
* OK, I guess the user doesn't really want to see it
* after all.
*/
ol = (struct open_filelist *) xmalloc(sizeof(*ol));
ol->path = xstrdup(sourcefile);
ol->real_path = NULL;
ol->next = ofiles;
ol->nlines = 0;
ol->linelist = NULL;
ofiles = ol;
fprintf(stderr,"Unable to open file %s\n", tmppath);
return;
}
}
}
/*
* Create header for file.
*/
ol = (struct open_filelist *) xmalloc(sizeof(*ol));
ol->path = xstrdup(sourcefile);
ol->real_path = xstrdup(tmppath);
ol->next = ofiles;
ol->nlines = 0;
ol->linelist = NULL;
ol->size = statbuf.st_size;
ofiles = ol;
/*
* Now open and map the file.
*/
fd = open(tmppath, O_RDONLY);
if( fd == -1 )
{
return;
}
addr = mmap(0, statbuf.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
if( addr == (char *) -1 )
{
return;
}
/*
* Now build up the line number mapping table.
*/
ol->nlines = 1;
pnt = addr;
while(pnt < addr + ol->size )
{
if( *pnt++ == '\n' )
{
ol->nlines++;
}
}
ol->nlines++;
ol->linelist = (unsigned int*) xmalloc(ol->nlines * sizeof(unsigned int) );
nlines = 0;
pnt = addr;
ol->linelist[nlines++] = 0;
while(pnt < addr + ol->size )
{
if( *pnt++ == '\n' )
{
ol->linelist[nlines++] = pnt - addr;
}
}
ol->linelist[nlines++] = pnt - addr;
}
else
{
/*
* We know what the file is, we just need to reopen it and remap it.
*/
fd = open(ol->real_path, O_RDONLY);
if( fd == -1 )
{
return;
}
addr = mmap(0, ol->size, PROT_READ, MAP_PRIVATE, fd, 0);
if( addr == (char *) -1 )
{
return;
}
}
/*
* All we need to do is to display the source lines here.
*/
for(i=start - 1; i <= end - 1; i++)
{
if( i < 0 || i >= ol->nlines - 1)
{
continue;
}
memset(&buffer, 0, sizeof(buffer));
if( ol->linelist[i+1] != ol->linelist[i] )
{
memcpy(&buffer, addr + ol->linelist[i],
(ol->linelist[i+1] - ol->linelist[i]) - 1);
}
fprintf(stderr,"%d\t%s\n", i + 1, buffer);
}
munmap(addr, ol->size);
close(fd);
}
void
DEBUG_List(struct list_id * source1, struct list_id * source2,
int delta)
{
int end;
int start;
char * sourcefile;
/*
* We need to see what source file we need. Hopefully we only have
* one specified, otherwise we might as well punt.
*/
if( source1 != NULL
&& source2 != NULL
&& source1->sourcefile != NULL
&& source2->sourcefile != NULL
&& strcmp(source1->sourcefile, source2->sourcefile) != 0 )
{
fprintf(stderr, "Ambiguous source file specification.\n");
return;
}
sourcefile = NULL;
if( source1 != NULL && source1->sourcefile != NULL )
{
sourcefile = source1->sourcefile;
}
if( sourcefile == NULL
&& source2 != NULL
&& source2->sourcefile != NULL )
{
sourcefile = source2->sourcefile;
}
if( sourcefile == NULL )
{
sourcefile = (char *) &DEBUG_current_sourcefile;
}
if( sourcefile == NULL )
{
fprintf(stderr, "No source file specified.\n");
return;
}
/*
* Now figure out the line number range to be listed.
*/
start = -1;
end = -1;
if( source1 != NULL )
{
start = source1->line;
}
if( source2 != NULL )
{
end = source2->line;
}
if( start == -1 && end == -1 )
{
if( delta < 0 )
{
end = DEBUG_start_sourceline;
start = end + delta;
}
else
{
start = DEBUG_end_sourceline;
end = start + delta;
}
}
else if( start == -1 )
{
start = end + delta;
}
else if (end == -1)
{
end = start + delta;
}
/*
* Now call this function to do the dirty work.
*/
DEBUG_DisplaySource(sourcefile, start, end);
if( sourcefile != (char *) &DEBUG_current_sourcefile )
{
strcpy(DEBUG_current_sourcefile, sourcefile);
}
DEBUG_start_sourceline = start;
DEBUG_end_sourceline = end;
}
#if 0
main()
{
int i, j;
DEBUG_AddPath("../../de");
while(1==1)
{
fscanf(stdin,"%d %d", &i, &j);
DEBUG_DisplaySource("dumpexe.c", i, j);
}
return 0;
}
#endif
...@@ -19,17 +19,14 @@ ...@@ -19,17 +19,14 @@
struct bt_info struct bt_info
{ {
unsigned int eip; unsigned int eip;
unsigned int ess;
unsigned int ebp; unsigned int ebp;
struct name_hash * frame; struct symbol_info frame;
}; };
static int nframe; static int nframe;
static struct bt_info * frames = NULL; static struct bt_info * frames = NULL;
int curr_frame; int curr_frame;
static char * reg_name[] =
{
"eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi"
};
typedef struct typedef struct
{ {
...@@ -62,12 +59,14 @@ void DEBUG_InfoStack(void) ...@@ -62,12 +59,14 @@ void DEBUG_InfoStack(void)
{ /* 32-bit mode */ { /* 32-bit mode */
addr.seg = 0; addr.seg = 0;
addr.off = ESP_reg(&DEBUG_context); addr.off = ESP_reg(&DEBUG_context);
addr.type = NULL;
DEBUG_ExamineMemory( &addr, 24, 'x' ); DEBUG_ExamineMemory( &addr, 24, 'x' );
} }
else /* 16-bit mode */ else /* 16-bit mode */
{ {
addr.seg = SS_reg(&DEBUG_context); addr.seg = SS_reg(&DEBUG_context);
addr.off = SP_reg(&DEBUG_context); addr.off = SP_reg(&DEBUG_context);
addr.type = NULL;
DEBUG_ExamineMemory( &addr, 24, 'w' ); DEBUG_ExamineMemory( &addr, 24, 'w' );
} }
fprintf(stderr,"\n"); fprintf(stderr,"\n");
...@@ -153,94 +152,76 @@ void DEBUG_BackTrace(void) ...@@ -153,94 +152,76 @@ void DEBUG_BackTrace(void)
} }
/*********************************************************************** /***********************************************************************
* DEBUG_GetSymbolValue * DEBUG_SilentBackTrace
* *
* Get the address of a named symbol from the current stack frame. * Display a stack back-trace.
*/ */
BOOL32 DEBUG_GetStackSymbolValue( const char * name, DBG_ADDR *addr ) void DEBUG_SilentBackTrace(void)
{ {
struct name_hash * curr_func; DBG_ADDR addr;
int i; int frameno = 0;
/*
* If we don't have a valid backtrace, then just return.
*/
if( frames == NULL )
{
return FALSE;
}
curr_func = frames[curr_frame].frame; nframe = 1;
if (frames) free( frames );
frames = (struct bt_info *) xmalloc( sizeof(struct bt_info) );
/* if (SS_reg(&DEBUG_context) == WINE_DATA_SELECTOR) /* 32-bit mode */
* If we don't know what the current function is, then we also have
* nothing to report here.
*/
if( curr_func == NULL )
{ {
return FALSE; addr.seg = 0;
} addr.off = EIP_reg(&DEBUG_context);
frames[0].eip = addr.off;
DEBUG_FindNearestSymbol( &addr, TRUE, &frames[0].frame.sym, 0,
&frames[0].frame.list);
frames[0].ebp = addr.off = EBP_reg(&DEBUG_context);
frameno++;
for(i=0; i < curr_func->n_locals; i++ ) while (addr.off)
{
FRAME32 *frame = (FRAME32 *)addr.off;
if (!DBG_CHECK_READ_PTR( &addr, sizeof(FRAME32) )) return;
if (!frame->ip) break;
nframe++;
frames = (struct bt_info *)xrealloc(frames,
nframe*sizeof(struct bt_info));
addr.off = frame->ip;
frames[frameno].eip = addr.off;
frames[frameno].ebp = frame->bp;
DEBUG_FindNearestSymbol( &addr, TRUE,
&frames[frameno].frame.sym, frame->bp,
&frames[frameno].frame.list);
frameno++;
addr.off = frame->bp;
}
}
else /* 16-bit mode */
{ {
/* /*
* Test the range of validity of the local variable. This * Not implemented here. I am not entirely sure how best to handle
* comes up with RBRAC/LBRAC stabs in particular. * this stuff.
*/ */
if( (curr_func->local_vars[i].pc_start != 0)
&& ((frames[curr_frame].eip - curr_func->addr.off)
< curr_func->local_vars[i].pc_start) )
{
continue;
}
if( (curr_func->local_vars[i].pc_end != 0)
&& ((frames[curr_frame].eip - curr_func->addr.off)
> curr_func->local_vars[i].pc_end) )
{
continue;
}
if( strcmp(name, curr_func->local_vars[i].name) == 0 )
{
/*
* OK, we found it. Now figure out what to do with this.
*/
if( curr_func->local_vars[i].regno != 0 )
{
/*
* Register variable. We don't know how to treat
* this yet.
*/
return FALSE;
}
addr->seg = 0;
addr->off = frames[curr_frame].ebp + curr_func->local_vars[i].offset;
return TRUE;
}
} }
return FALSE;
} }
int int
DEBUG_SetFrame(int newframe) DEBUG_SetFrame(int newframe)
{ {
int rtn = FALSE; int rtn = FALSE;
/*
* Nothing for now. Add support later.
*/
curr_frame = newframe; curr_frame = newframe;
if( curr_frame >= nframe )
{
curr_frame = nframe - 1;
}
if( curr_frame < 0 ) if( curr_frame < 0 )
{ {
curr_frame = 0; curr_frame = 0;
} }
if( curr_frame >= nframe ) if( frames[curr_frame].frame.list.sourcefile != NULL )
{ {
curr_frame = nframe - 1; DEBUG_List(&frames[curr_frame].frame.list, NULL, 0);
} }
rtn = TRUE; rtn = TRUE;
...@@ -248,13 +229,9 @@ DEBUG_SetFrame(int newframe) ...@@ -248,13 +229,9 @@ DEBUG_SetFrame(int newframe)
} }
int int
DEBUG_InfoLocals() DEBUG_GetCurrentFrame(struct name_hash ** name, unsigned int * eip,
unsigned int * ebp)
{ {
struct name_hash * curr_func;
int i;
int rtn = FALSE;
unsigned int * ptr;
/* /*
* If we don't have a valid backtrace, then just return. * If we don't have a valid backtrace, then just return.
*/ */
...@@ -263,54 +240,19 @@ DEBUG_InfoLocals() ...@@ -263,54 +240,19 @@ DEBUG_InfoLocals()
return FALSE; return FALSE;
} }
curr_func = frames[curr_frame].frame;
/* /*
* If we don't know what the current function is, then we also have * If we don't know what the current function is, then we also have
* nothing to report here. * nothing to report here.
*/ */
if( curr_func == NULL ) if( frames[curr_frame].frame.sym == NULL )
{ {
return FALSE; return FALSE;
} }
for(i=0; i < curr_func->n_locals; i++ ) *name = frames[curr_frame].frame.sym;
{ *eip = frames[curr_frame].eip;
/* *ebp = frames[curr_frame].ebp;
* Test the range of validity of the local variable. This
* comes up with RBRAC/LBRAC stabs in particular.
*/
if( (curr_func->local_vars[i].pc_start != 0)
&& ((frames[curr_frame].eip - curr_func->addr.off)
< curr_func->local_vars[i].pc_start) )
{
continue;
}
if( (curr_func->local_vars[i].pc_end != 0)
&& ((frames[curr_frame].eip - curr_func->addr.off)
> curr_func->local_vars[i].pc_end) )
{
continue;
}
if( curr_func->local_vars[i].offset == 0 )
{
fprintf(stderr, "%s:%s optimized into register $%s \n",
curr_func->name, curr_func->local_vars[i].name,
reg_name[curr_func->local_vars[i].regno]);
}
else
{
ptr = (unsigned int *) (frames[curr_frame].ebp
+ curr_func->local_vars[i].offset);
fprintf(stderr, "%s:%s == 0x%8.8x\n",
curr_func->name, curr_func->local_vars[i].name,
*ptr);
}
}
rtn = TRUE;
return (rtn); return TRUE;
} }
Running & Compiling WINE in OS/2
Here is what you need to (try to) compile Wine for OS/2:
EMX 0.9c (fix 2)
XFree86 3.2 OS/2 (with development libraries)
bash, gnu make, grep, tar, bison, flex
sed (a working copy of)
diff and patch are recommended
To compile:
sh
tools/make_os2.sh
make depend
make (make doesn't work yet... I will need to do some others patch, or
you may do it...)
Currently:
- configure and make depend work...
- make doesn't work
- the selectors numbers (0) are wrong...
What needs to be redone:
File functions, I/O access (do it!), Interrupt (if int unknow, call
current RealMode one...), verify that everything is thread safe (how
does Win95/NT handle multi-thread?), move X functions in some files
(and make a wrapper, to use PM instead latter), etc...
The good things:
- OS/2 have DOS interrupts
- OS/2 have I/O port access
- OS/2 have multi-thread
- Merlin have Open32 (to be used later...)
Robert Pouliot <krynos@clic.net>
January 9, 1997
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include "windows.h" #include "windows.h"
#include "winbase.h" #include "winbase.h"
#include "dos_fs.h"
#include "drive.h" #include "drive.h"
#include "file.h" #include "file.h"
#include "heap.h" #include "heap.h"
...@@ -410,8 +409,9 @@ UINT32 DRIVE_GetFlags( int drive ) ...@@ -410,8 +409,9 @@ UINT32 DRIVE_GetFlags( int drive )
*/ */
int DRIVE_Chdir( int drive, const char *path ) int DRIVE_Chdir( int drive, const char *path )
{ {
DOS_FULL_NAME full_name;
char buffer[MAX_PATHNAME_LEN]; char buffer[MAX_PATHNAME_LEN];
const char *unix_cwd, *dos_cwd; LPSTR unix_cwd;
BY_HANDLE_FILE_INFORMATION info; BY_HANDLE_FILE_INFORMATION info;
TDB *pTask = (TDB *)GlobalLock16( GetCurrentTask() ); TDB *pTask = (TDB *)GlobalLock16( GetCurrentTask() );
...@@ -420,31 +420,30 @@ int DRIVE_Chdir( int drive, const char *path ) ...@@ -420,31 +420,30 @@ int DRIVE_Chdir( int drive, const char *path )
buffer[0] += drive; buffer[0] += drive;
lstrcpyn32A( buffer + 2, path, sizeof(buffer) - 2 ); lstrcpyn32A( buffer + 2, path, sizeof(buffer) - 2 );
if (!(unix_cwd = DOSFS_GetUnixFileName( buffer, TRUE ))) return 0; if (!DOSFS_GetFullName( buffer, TRUE, &full_name )) return 0;
if (!FILE_Stat( unix_cwd, &info )) return 0; if (!FILE_Stat( full_name.long_name, &info )) return 0;
if (!(info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) if (!(info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
{ {
DOS_ERROR( ER_FileNotFound, EC_NotFound, SA_Abort, EL_Disk ); DOS_ERROR( ER_FileNotFound, EC_NotFound, SA_Abort, EL_Disk );
return 0; return 0;
} }
unix_cwd += strlen( DOSDrives[drive].root ); unix_cwd = full_name.long_name + strlen( DOSDrives[drive].root );
while (*unix_cwd == '/') unix_cwd++; while (*unix_cwd == '/') unix_cwd++;
buffer[2] = '/';
lstrcpyn32A( buffer + 3, unix_cwd, sizeof(buffer) - 3 );
if (!(dos_cwd = DOSFS_GetDosTrueName( buffer, TRUE ))) return 0;
dprintf_dosfs( stddeb, "DRIVE_Chdir(%c:): unix_cwd=%s dos_cwd=%s\n", dprintf_dosfs( stddeb, "DRIVE_Chdir(%c:): unix_cwd=%s dos_cwd=%s\n",
'A' + drive, unix_cwd, dos_cwd + 3 ); 'A' + drive, unix_cwd, full_name.short_name + 3 );
HeapFree( SystemHeap, 0, DOSDrives[drive].dos_cwd ); HeapFree( SystemHeap, 0, DOSDrives[drive].dos_cwd );
HeapFree( SystemHeap, 0, DOSDrives[drive].unix_cwd ); HeapFree( SystemHeap, 0, DOSDrives[drive].unix_cwd );
DOSDrives[drive].dos_cwd = HEAP_strdupA( SystemHeap, 0, dos_cwd + 3 ); DOSDrives[drive].dos_cwd = HEAP_strdupA( SystemHeap, 0,
full_name.short_name + 3 );
DOSDrives[drive].unix_cwd = HEAP_strdupA( SystemHeap, 0, unix_cwd ); DOSDrives[drive].unix_cwd = HEAP_strdupA( SystemHeap, 0, unix_cwd );
if (pTask && (pTask->curdrive & 0x80) && if (pTask && (pTask->curdrive & 0x80) &&
((pTask->curdrive & ~0x80) == drive)) ((pTask->curdrive & ~0x80) == drive))
{ {
lstrcpyn32A( pTask->curdir, dos_cwd + 2, sizeof(pTask->curdir) ); lstrcpyn32A( pTask->curdir, full_name.short_name + 2,
sizeof(pTask->curdir) );
DRIVE_LastTask = GetCurrentTask(); DRIVE_LastTask = GetCurrentTask();
} }
return 1; return 1;
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <string.h> #include <string.h>
#include "windows.h" #include "windows.h"
#include "dos_fs.h" #include "file.h"
#include "heap.h" #include "heap.h"
#include "stddebug.h" #include "stddebug.h"
#include "debug.h" #include "debug.h"
...@@ -36,6 +36,8 @@ typedef struct ...@@ -36,6 +36,8 @@ typedef struct
BOOL32 changed; BOOL32 changed;
PROFILESECTION *section; PROFILESECTION *section;
char *dos_name; char *dos_name;
char *unix_name;
char *filename;
} PROFILE; } PROFILE;
...@@ -332,8 +334,7 @@ static BOOL32 PROFILE_FlushFile(void) ...@@ -332,8 +334,7 @@ static BOOL32 PROFILE_FlushFile(void)
FILE *file = NULL; FILE *file = NULL;
if (!CurProfile.changed || !CurProfile.dos_name) return TRUE; if (!CurProfile.changed || !CurProfile.dos_name) return TRUE;
if (!(unix_name = DOSFS_GetUnixFileName( CurProfile.dos_name, FALSE )) || if (!(unix_name = CurProfile.unix_name) || !(file = fopen(unix_name, "w")))
!(file = fopen( unix_name, "w" )))
{ {
/* Try to create it in $HOME/.wine */ /* Try to create it in $HOME/.wine */
/* FIXME: this will need a more general solution */ /* FIXME: this will need a more general solution */
...@@ -343,7 +344,7 @@ static BOOL32 PROFILE_FlushFile(void) ...@@ -343,7 +344,7 @@ static BOOL32 PROFILE_FlushFile(void)
strcat( buffer, "/.wine/" ); strcat( buffer, "/.wine/" );
p = buffer + strlen(buffer); p = buffer + strlen(buffer);
strcpy( p, strrchr( CurProfile.dos_name, '\\' ) + 1 ); strcpy( p, strrchr( CurProfile.dos_name, '\\' ) + 1 );
AnsiLower( p ); CharLower32A( p );
file = fopen( buffer, "w" ); file = fopen( buffer, "w" );
unix_name = buffer; unix_name = buffer;
} }
...@@ -372,24 +373,32 @@ static BOOL32 PROFILE_FlushFile(void) ...@@ -372,24 +373,32 @@ static BOOL32 PROFILE_FlushFile(void)
*/ */
static BOOL32 PROFILE_Open( LPCSTR filename ) static BOOL32 PROFILE_Open( LPCSTR filename )
{ {
DOS_FULL_NAME full_name;
char buffer[MAX_PATHNAME_LEN]; char buffer[MAX_PATHNAME_LEN];
const char *dos_name, *unix_name;
char *newdos_name, *p; char *newdos_name, *p;
FILE *file = NULL; FILE *file = NULL;
if (CurProfile.filename && !strcmp( filename, CurProfile.filename ))
{
dprintf_profile( stddeb, "PROFILE_Open(%s): already opened\n",
filename );
return TRUE;
}
if (strchr( filename, '/' ) || strchr( filename, '\\' ) || if (strchr( filename, '/' ) || strchr( filename, '\\' ) ||
strchr( filename, ':' )) strchr( filename, ':' ))
{ {
if (!(dos_name = DOSFS_GetDosTrueName( filename, FALSE))) return FALSE; if (!DOSFS_GetFullName( filename, FALSE, &full_name )) return FALSE;
} }
else else
{ {
GetWindowsDirectory32A( buffer, sizeof(buffer) ); GetWindowsDirectory32A( buffer, sizeof(buffer) );
strcat( buffer, "\\" ); strcat( buffer, "\\" );
strcat( buffer, filename ); strcat( buffer, filename );
if (!(dos_name = DOSFS_GetDosTrueName( buffer, FALSE ))) return FALSE; if (!DOSFS_GetFullName( buffer, FALSE, &full_name )) return FALSE;
} }
if (CurProfile.dos_name && !strcmp( dos_name, CurProfile.dos_name )) if (CurProfile.dos_name &&
!strcmp( full_name.short_name, CurProfile.dos_name ))
{ {
dprintf_profile( stddeb, "PROFILE_Open(%s): already opened\n", dprintf_profile( stddeb, "PROFILE_Open(%s): already opened\n",
filename ); filename );
...@@ -398,12 +407,15 @@ static BOOL32 PROFILE_Open( LPCSTR filename ) ...@@ -398,12 +407,15 @@ static BOOL32 PROFILE_Open( LPCSTR filename )
/* Flush the previous profile */ /* Flush the previous profile */
newdos_name = HEAP_strdupA( SystemHeap, 0, dos_name ); newdos_name = HEAP_strdupA( SystemHeap, 0, full_name.short_name );
PROFILE_FlushFile(); PROFILE_FlushFile();
PROFILE_Free( CurProfile.section ); PROFILE_Free( CurProfile.section );
if (CurProfile.dos_name) HeapFree( SystemHeap, 0, CurProfile.dos_name ); if (CurProfile.dos_name) HeapFree( SystemHeap, 0, CurProfile.dos_name );
if (CurProfile.unix_name) HeapFree( SystemHeap, 0, CurProfile.unix_name );
if (CurProfile.filename) HeapFree( SystemHeap, 0, CurProfile.filename );
CurProfile.section = NULL; CurProfile.section = NULL;
CurProfile.dos_name = newdos_name; CurProfile.dos_name = newdos_name;
CurProfile.filename = HEAP_strdupA( SystemHeap, 0, filename );
/* Try to open the profile file, first in $HOME/.wine */ /* Try to open the profile file, first in $HOME/.wine */
...@@ -414,15 +426,22 @@ static BOOL32 PROFILE_Open( LPCSTR filename ) ...@@ -414,15 +426,22 @@ static BOOL32 PROFILE_Open( LPCSTR filename )
strcat( buffer, "/.wine/" ); strcat( buffer, "/.wine/" );
p = buffer + strlen(buffer); p = buffer + strlen(buffer);
strcpy( p, strrchr( newdos_name, '\\' ) + 1 ); strcpy( p, strrchr( newdos_name, '\\' ) + 1 );
AnsiLower( p ); CharLower32A( p );
if ((file = fopen( buffer, "r" ))) if ((file = fopen( buffer, "r" )))
dprintf_profile( stddeb, "Found it in %s\n", buffer ); {
dprintf_profile( stddeb, "PROFILE_Open(%s): found it in %s\n",
filename, buffer );
CurProfile.unix_name = HEAP_strdupA( SystemHeap, 0, buffer );
}
} }
if (!file && ((unix_name = DOSFS_GetUnixFileName( dos_name, TRUE )))) if (!file)
{ {
if ((file = fopen( unix_name, "r" ))) CurProfile.unix_name = HEAP_strdupA( SystemHeap, 0,
dprintf_profile( stddeb, "Found it in %s\n", unix_name ); full_name.long_name );
if ((file = fopen( full_name.long_name, "r" )))
dprintf_profile( stddeb, "PROFILE_Open(%s): found it in %s\n",
filename, full_name.long_name );
} }
if (file) if (file)
...@@ -435,7 +454,6 @@ static BOOL32 PROFILE_Open( LPCSTR filename ) ...@@ -435,7 +454,6 @@ static BOOL32 PROFILE_Open( LPCSTR filename )
/* Does not exist yet, we will create it in PROFILE_FlushFile */ /* Does not exist yet, we will create it in PROFILE_FlushFile */
fprintf( stderr, "Warning: profile file %s not found\n", newdos_name ); fprintf( stderr, "Warning: profile file %s not found\n", newdos_name );
} }
dprintf_profile( stddeb, "PROFILE_Open(%s): successful\n", filename );
return TRUE; return TRUE;
} }
......
...@@ -7,8 +7,10 @@ MODULE = metafiledrv ...@@ -7,8 +7,10 @@ MODULE = metafiledrv
C_SRCS = \ C_SRCS = \
bitblt.c \ bitblt.c \
graphics.c \
init.c \ init.c \
mapping.c mapping.c \
text.c
all: $(MODULE).o all: $(MODULE).o
......
/*
* Metafile driver graphics functions
*
* Copyright 1993, 1994 Alexandre Julliard
*/
#include <stdlib.h>
#include "graphics.h"
#include "gdi.h"
#include "dc.h"
#include "metafile.h"
#include "region.h"
#include "xmalloc.h"
#include "metafiledrv.h"
#include "stddebug.h"
#include "debug.h"
/**********************************************************************
* MFDRV_MoveToEx
*/
BOOL32
MFDRV_MoveToEx(DC *dc,INT32 x,INT32 y,LPPOINT32 pt)
{
if (!MF_MetaParam2(dc,META_MOVETO,x,y))
return FALSE;
if (pt)
{
pt->x = dc->w.CursPosX;
pt->y = dc->w.CursPosY;
}
dc->w.CursPosX = x;
dc->w.CursPosY = y;
return TRUE;
}
/***********************************************************************
* MFDRV_LineTo
*/
BOOL32
MFDRV_LineTo( DC *dc, INT32 x, INT32 y )
{
return MF_MetaParam2(dc, META_LINETO, x, y);
}
/***********************************************************************
* MFDRV_Arc
*/
BOOL32
MFDRV_Arc( DC *dc, INT32 left, INT32 top, INT32 right, INT32 bottom,
INT32 xstart, INT32 ystart, INT32 xend, INT32 yend )
{
return MF_MetaParam8(dc, META_ARC, left, top, right, bottom,
xstart, ystart, xend, yend);
}
/***********************************************************************
* MFDRV_Pie
*/
BOOL32
MFDRV_Pie( DC *dc, INT32 left, INT32 top, INT32 right, INT32 bottom,
INT32 xstart, INT32 ystart, INT32 xend, INT32 yend )
{
return MF_MetaParam8(dc, META_PIE, left, top, right, bottom,
xstart, ystart, xend, yend);
}
/***********************************************************************
* MFDRV_Chord
*/
BOOL32
MFDRV_Chord( DC *dc, INT32 left, INT32 top, INT32 right, INT32 bottom,
INT32 xstart, INT32 ystart, INT32 xend, INT32 yend )
{
return MF_MetaParam8(dc, META_CHORD, left, top, right, bottom,
xstart, ystart, xend, yend);
}
/***********************************************************************
* MFDRV_Ellipse
*/
BOOL32
MFDRV_Ellipse( DC *dc, INT32 left, INT32 top, INT32 right, INT32 bottom )
{
return MF_MetaParam4(dc, META_ELLIPSE, left, top, right, bottom);
}
/***********************************************************************
* MFDRV_Rectangle
*/
BOOL32
MFDRV_Rectangle(DC *dc, INT32 left, INT32 top, INT32 right, INT32 bottom)
{
return MF_MetaParam4(dc, META_RECTANGLE, left, top, right, bottom);
}
/***********************************************************************
* MFDRV_RoundRect
*/
BOOL32
MFDRV_RoundRect( DC *dc, INT32 left, INT32 top, INT32 right,
INT32 bottom, INT32 ell_width, INT32 ell_height )
{
return MF_MetaParam6(dc, META_ROUNDRECT, left, top, right, bottom,
ell_width, ell_height);
}
/***********************************************************************
* MFDRV_SetPixel
*/
COLORREF
MFDRV_SetPixel( DC *dc, INT32 x, INT32 y, COLORREF color )
{
return MF_MetaParam4(dc, META_SETPIXEL, x, y,HIWORD(color),LOWORD(color));
}
/**********************************************************************
* MFDRV_Polyline
*/
BOOL32
MFDRV_Polyline( DC *dc, const LPPOINT32 pt, INT32 count )
{
register int i;
LPPOINT16 pt16;
BOOL16 ret;
pt16 = (LPPOINT16)xmalloc(sizeof(POINT16)*count);
for (i=count;i--;) CONV_POINT32TO16(&(pt[i]),&(pt16[i]));
ret = MF_MetaPoly(dc, META_POLYLINE, pt16, count);
free(pt16);
return ret;
}
/**********************************************************************
* MFDRV_Polygon
*/
BOOL32
MFDRV_Polygon( DC *dc, LPPOINT32 pt, INT32 count )
{
register int i;
LPPOINT16 pt16;
BOOL16 ret;
pt16 = (LPPOINT16)xmalloc(sizeof(POINT16)*count);
for (i=count;i--;) CONV_POINT32TO16(&(pt[i]),&(pt16[i]));
ret = MF_MetaPoly(dc, META_POLYGON, pt16, count);
free(pt16);
return ret;
}
/**********************************************************************
* PolyPolygon
*/
BOOL32
MFDRV_PolyPolygon( DC *dc, LPPOINT32 pt, LPINT32 counts, UINT32 polygons)
{
int i,j;
LPPOINT16 pt16;
LPPOINT32 curpt=pt;
BOOL32 ret;
for (i=0;i<polygons;i++) {
pt16=(LPPOINT16)xmalloc(sizeof(POINT16)*counts[i]);
for (j=counts[i];j--;) CONV_POINT32TO16(&(curpt[j]),&(pt16[j]));
ret = MF_MetaPoly(dc, META_POLYGON, pt16, counts[i]);
free(pt16);
if (!ret)
return FALSE;
curpt+=counts[i];
}
return TRUE;
}
/**********************************************************************
* MFDRV_ExtFloodFill
*/
BOOL32
MFDRV_ExtFloodFill( DC *dc, INT32 x, INT32 y, COLORREF color, UINT32 fillType )
{
return MF_MetaParam4(dc,META_FLOODFILL,x,y,HIWORD(color),LOWORD(color));
}
...@@ -16,41 +16,38 @@ static BOOL32 MFDRV_DeleteDC( DC *dc ); ...@@ -16,41 +16,38 @@ static BOOL32 MFDRV_DeleteDC( DC *dc );
static const DC_FUNCTIONS MFDRV_Funcs = static const DC_FUNCTIONS MFDRV_Funcs =
{ {
NULL, /* pArc */ MFDRV_Arc, /* pArc */
MFDRV_BitBlt, /* pBitBlt */ MFDRV_BitBlt, /* pBitBlt */
NULL, /* pChord */ MFDRV_Chord, /* pChord */
NULL, /* pCreateDC */ NULL, /* pCreateDC */
MFDRV_DeleteDC, /* pDeleteDC */ MFDRV_DeleteDC, /* pDeleteDC */
NULL, /* pDeleteObject */ NULL, /* pDeleteObject */
NULL, /* pEllipse */ MFDRV_Ellipse, /* pEllipse */
NULL, /* pEscape */ NULL, /* pEscape */
NULL, /* pExcludeClipRect */ NULL, /* pExcludeClipRect */
NULL, /* pExcludeVisRect */ NULL, /* pExcludeVisRect */
NULL, /* pExtFloodFill */ MFDRV_ExtFloodFill, /* pExtFloodFill */
NULL, /* pExtTextOut */ MFDRV_ExtTextOut, /* pExtTextOut */
NULL, /* pFillRgn */ NULL /* no implementation */, /* pGetPixel */
NULL, /* pFloodFill */
NULL, /* pFrameRgn */
NULL, /* pGetTextExtentPoint */ NULL, /* pGetTextExtentPoint */
NULL, /* pGetTextMetrics */ NULL, /* pGetTextMetrics */
NULL, /* pIntersectClipRect */ NULL, /* pIntersectClipRect */
NULL, /* pIntersectVisRect */ NULL, /* pIntersectVisRect */
NULL, /* pInvertRgn */ MFDRV_LineTo, /* pLineTo */
NULL, /* pLineTo */ MFDRV_MoveToEx, /* pMoveToEx */
NULL, /* pMoveToEx */
NULL, /* pOffsetClipRgn */ NULL, /* pOffsetClipRgn */
MFDRV_OffsetViewportOrg, /* pOffsetViewportOrg */ MFDRV_OffsetViewportOrg, /* pOffsetViewportOrg */
MFDRV_OffsetWindowOrg, /* pOffsetWindowOrg */ MFDRV_OffsetWindowOrg, /* pOffsetWindowOrg */
NULL, /* pPaintRgn */ NULL, /* pPaintRgn */
MFDRV_PatBlt, /* pPatBlt */ MFDRV_PatBlt, /* pPatBlt */
NULL, /* pPie */ MFDRV_Pie, /* pPie */
NULL, /* pPolyPolygon */ MFDRV_PolyPolygon, /* pPolyPolygon */
NULL, /* pPolygon */ MFDRV_Polygon, /* pPolygon */
NULL, /* pPolyline */ MFDRV_Polyline, /* pPolyline */
NULL, /* pRealizePalette */ NULL, /* pRealizePalette */
NULL, /* pRectangle */ MFDRV_Rectangle, /* pRectangle */
NULL, /* pRestoreDC */ NULL, /* pRestoreDC */
NULL, /* pRoundRect */ MFDRV_RoundRect, /* pRoundRect */
NULL, /* pSaveDC */ NULL, /* pSaveDC */
MFDRV_ScaleViewportExt, /* pScaleViewportExt */ MFDRV_ScaleViewportExt, /* pScaleViewportExt */
MFDRV_ScaleWindowExt, /* pScaleWindowExt */ MFDRV_ScaleWindowExt, /* pScaleWindowExt */
...@@ -63,7 +60,7 @@ static const DC_FUNCTIONS MFDRV_Funcs = ...@@ -63,7 +60,7 @@ static const DC_FUNCTIONS MFDRV_Funcs =
NULL, /* pSetDIBitsToDevice */ NULL, /* pSetDIBitsToDevice */
MFDRV_SetMapMode, /* pSetMapMode */ MFDRV_SetMapMode, /* pSetMapMode */
NULL, /* pSetMapperFlags */ NULL, /* pSetMapperFlags */
NULL, /* pSetPixel */ MFDRV_SetPixel, /* pSetPixel */
NULL, /* pSetPolyFillMode */ NULL, /* pSetPolyFillMode */
NULL, /* pSetROP2 */ NULL, /* pSetROP2 */
NULL, /* pSetRelAbs */ NULL, /* pSetRelAbs */
...@@ -77,8 +74,7 @@ static const DC_FUNCTIONS MFDRV_Funcs = ...@@ -77,8 +74,7 @@ static const DC_FUNCTIONS MFDRV_Funcs =
MFDRV_SetWindowExt, /* pSetWindowExt */ MFDRV_SetWindowExt, /* pSetWindowExt */
MFDRV_SetWindowOrg, /* pSetWindowOrg */ MFDRV_SetWindowOrg, /* pSetWindowOrg */
MFDRV_StretchBlt, /* pStretchBlt */ MFDRV_StretchBlt, /* pStretchBlt */
NULL, /* pStretchDIBits */ NULL /* pStretchDIBits */
NULL /* pTextOut */
}; };
...@@ -237,4 +233,3 @@ BOOL16 DeleteMetaFile16( HMETAFILE16 hmf ) ...@@ -237,4 +233,3 @@ BOOL16 DeleteMetaFile16( HMETAFILE16 hmf )
{ {
return !GlobalFree16( hmf ); return !GlobalFree16( hmf );
} }
/*
* metafile driver text functions
*
* Copyright 1993, 1994 Alexandre Julliard
*
*/
#include <stdlib.h>
#include "windows.h"
#include "dc.h"
#include "gdi.h"
#include "callback.h"
#include "heap.h"
#include "metafile.h"
#include "metafiledrv.h"
#include "stddebug.h"
#include "debug.h"
#include "xmalloc.h"
/***********************************************************************
* MFDRV_ExtTextOut
*/
BOOL32
MFDRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
const RECT32 *lprect, LPCSTR str, UINT32 count,
const INT32 *lpDx )
{
RECT16 rect16;
LPINT16 lpdx16 = lpDx?(LPINT16)xmalloc(sizeof(INT16)*count):NULL;
BOOL32 ret;
int i;
if (lprect) CONV_RECT32TO16(lprect,&rect16);
if (lpdx16) for (i=count;i--;) lpdx16[i]=lpDx[i];
ret=MF_ExtTextOut(dc,x,y,flags,lprect?&rect16:NULL,str,count,lpdx16);
if (lpdx16) free(lpdx16);
return ret;
}
...@@ -50,14 +50,11 @@ static const DC_FUNCTIONS WIN16DRV_Funcs = ...@@ -50,14 +50,11 @@ static const DC_FUNCTIONS WIN16DRV_Funcs =
NULL, /* pExcludeVisRect */ NULL, /* pExcludeVisRect */
NULL, /* pExtFloodFill */ NULL, /* pExtFloodFill */
NULL, /* pExtTextOut */ NULL, /* pExtTextOut */
NULL, /* pFillRgn */ NULL, /* pGetPixel */
NULL, /* pFloodFill */
NULL, /* pFrameRgn */
WIN16DRV_GetTextExtentPoint, /* pGetTextExtentPoint */ WIN16DRV_GetTextExtentPoint, /* pGetTextExtentPoint */
WIN16DRV_GetTextMetrics, /* pGetTextMetrics */ WIN16DRV_GetTextMetrics, /* pGetTextMetrics */
NULL, /* pIntersectClipRect */ NULL, /* pIntersectClipRect */
NULL, /* pIntersectVisRect */ NULL, /* pIntersectVisRect */
NULL, /* pInvertRgn */
NULL, /* pLineTo */ NULL, /* pLineTo */
NULL, /* pMoveToEx */ NULL, /* pMoveToEx */
NULL, /* pOffsetClipRgn */ NULL, /* pOffsetClipRgn */
...@@ -99,8 +96,7 @@ static const DC_FUNCTIONS WIN16DRV_Funcs = ...@@ -99,8 +96,7 @@ static const DC_FUNCTIONS WIN16DRV_Funcs =
NULL, /* pSetWindowExt (optional) */ NULL, /* pSetWindowExt (optional) */
NULL, /* pSetWindowOrg (optional) */ NULL, /* pSetWindowOrg (optional) */
NULL, /* pStretchBlt */ NULL, /* pStretchBlt */
NULL, /* pStretchDIBits */ NULL /* pStretchDIBits */
NULL /* pTextOut */
}; };
......
...@@ -9,7 +9,9 @@ C_SRCS = \ ...@@ -9,7 +9,9 @@ C_SRCS = \
bitblt.c \ bitblt.c \
clipping.c \ clipping.c \
font.c \ font.c \
init.c graphics.c \
init.c \
text.c
all: $(MODULE).o all: $(MODULE).o
......
...@@ -16,41 +16,38 @@ static BOOL32 X11DRV_DeleteDC( DC *dc ); ...@@ -16,41 +16,38 @@ static BOOL32 X11DRV_DeleteDC( DC *dc );
static const DC_FUNCTIONS X11DRV_Funcs = static const DC_FUNCTIONS X11DRV_Funcs =
{ {
NULL, /* pArc */ X11DRV_Arc, /* pArc */
X11DRV_BitBlt, /* pBitBlt */ X11DRV_BitBlt, /* pBitBlt */
NULL, /* pChord */ X11DRV_Chord, /* pChord */
X11DRV_CreateDC, /* pCreateDC */ X11DRV_CreateDC, /* pCreateDC */
X11DRV_DeleteDC, /* pDeleteDC */ X11DRV_DeleteDC, /* pDeleteDC */
NULL, /* pDeleteObject */ NULL, /* pDeleteObject */
NULL, /* pEllipse */ X11DRV_Ellipse, /* pEllipse */
NULL, /* pEscape */ NULL, /* pEscape */
NULL, /* pExcludeClipRect */ NULL, /* pExcludeClipRect */
NULL, /* pExcludeVisRect */ NULL, /* pExcludeVisRect */
NULL, /* pExtFloodFill */ X11DRV_ExtFloodFill, /* pExtFloodFill */
NULL, /* pExtTextOut */ X11DRV_ExtTextOut, /* pExtTextOut */
NULL, /* pFillRgn */ X11DRV_GetPixel, /* pGetPixel */
NULL, /* pFloodFill */
NULL, /* pFrameRgn */
X11DRV_GetTextExtentPoint, /* pGetTextExtentPoint */ X11DRV_GetTextExtentPoint, /* pGetTextExtentPoint */
NULL, /* pGetTextMetrics */ NULL, /* pGetTextMetrics */
NULL, /* pIntersectClipRect */ NULL, /* pIntersectClipRect */
NULL, /* pIntersectVisRect */ NULL, /* pIntersectVisRect */
NULL, /* pInvertRgn */ X11DRV_LineTo, /* pLineTo */
NULL, /* pLineTo */ X11DRV_MoveToEx, /* pMoveToEx */
NULL, /* pMoveToEx */
NULL, /* pOffsetClipRgn */ NULL, /* pOffsetClipRgn */
NULL, /* pOffsetViewportOrg (optional) */ NULL, /* pOffsetViewportOrg (optional) */
NULL, /* pOffsetWindowOrg (optional) */ NULL, /* pOffsetWindowOrg (optional) */
NULL, /* pPaintRgn */ X11DRV_PaintRgn, /* pPaintRgn */
X11DRV_PatBlt, /* pPatBlt */ X11DRV_PatBlt, /* pPatBlt */
NULL, /* pPie */ X11DRV_Pie, /* pPie */
NULL, /* pPolyPolygon */ X11DRV_PolyPolygon, /* pPolyPolygon */
NULL, /* pPolygon */ X11DRV_Polygon, /* pPolygon */
NULL, /* pPolyline */ X11DRV_Polyline, /* pPolyline */
NULL, /* pRealizePalette */ NULL, /* pRealizePalette */
NULL, /* pRectangle */ X11DRV_Rectangle, /* pRectangle */
NULL, /* pRestoreDC */ NULL, /* pRestoreDC */
NULL, /* pRoundRect */ X11DRV_RoundRect, /* pRoundRect */
NULL, /* pSaveDC */ NULL, /* pSaveDC */
NULL, /* pScaleViewportExt (optional) */ NULL, /* pScaleViewportExt (optional) */
NULL, /* pScaleWindowExt (optional) */ NULL, /* pScaleWindowExt (optional) */
...@@ -63,7 +60,7 @@ static const DC_FUNCTIONS X11DRV_Funcs = ...@@ -63,7 +60,7 @@ static const DC_FUNCTIONS X11DRV_Funcs =
NULL, /* pSetDIBitsToDevice */ NULL, /* pSetDIBitsToDevice */
NULL, /* pSetMapMode (optional) */ NULL, /* pSetMapMode (optional) */
NULL, /* pSetMapperFlags */ NULL, /* pSetMapperFlags */
NULL, /* pSetPixel */ X11DRV_SetPixel, /* pSetPixel */
NULL, /* pSetPolyFillMode */ NULL, /* pSetPolyFillMode */
NULL, /* pSetROP2 */ NULL, /* pSetROP2 */
NULL, /* pSetRelAbs */ NULL, /* pSetRelAbs */
...@@ -77,8 +74,7 @@ static const DC_FUNCTIONS X11DRV_Funcs = ...@@ -77,8 +74,7 @@ static const DC_FUNCTIONS X11DRV_Funcs =
NULL, /* pSetWindowExt (optional) */ NULL, /* pSetWindowExt (optional) */
NULL, /* pSetWindowOrg (optional) */ NULL, /* pSetWindowOrg (optional) */
X11DRV_StretchBlt, /* pStretchBlt */ X11DRV_StretchBlt, /* pStretchBlt */
NULL, /* pStretchDIBits */ NULL /* pStretchDIBits */
NULL /* pTextOut */
}; };
static DeviceCaps X11DRV_DevCaps; static DeviceCaps X11DRV_DevCaps;
......
/*
* X11 graphics driver text functions
*
* Copyright 1993,1994 Alexandre Julliard
*/
#include <stdlib.h>
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include "windows.h"
#include "dc.h"
#include "gdi.h"
/*#include "callback.h"*/
#include "heap.h"
#include "x11drv.h"
#include "stddebug.h"
/* #define DEBUG_TEXT */
#include "debug.h"
#include "xmalloc.h"
#define SWAP_INT(a,b) { int t = a; a = b; b = t; }
extern int CLIPPING_IntersectClipRect( DC * dc, short left, short top,
short right, short bottom, UINT16 flags);
/***********************************************************************
* X11DRV_ExtTextOut
*/
BOOL32
X11DRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
const RECT32 *lprect, LPCSTR str, UINT32 count,
const INT32 *lpDx )
{
HRGN32 hRgnClip = 0;
int dir, ascent, descent, i;
XCharStruct info;
XFontStruct *font;
RECT32 rect;
if (!DC_SetupGCForText( dc )) return TRUE;
font = dc->u.x.font.fstruct;
dprintf_text(stddeb,"ExtTextOut: hdc=%04x %d,%d '%*.*s', %d flags=%d\n",
dc->hSelf, x, y, count, count, str, count, flags);
if (lprect != NULL) dprintf_text(stddeb, "\trect=(%d,%d- %d,%d)\n",
lprect->left, lprect->top,
lprect->right, lprect->bottom );
/* Setup coordinates */
if (dc->w.textAlign & TA_UPDATECP)
{
x = dc->w.CursPosX;
y = dc->w.CursPosY;
}
if (flags & (ETO_OPAQUE | ETO_CLIPPED)) /* there's a rectangle */
{
if (!lprect) /* not always */
{
SIZE32 sz;
if (flags & ETO_CLIPPED) /* Can't clip with no rectangle */
return FALSE;
if (!X11DRV_GetTextExtentPoint( dc, str, count, &sz ))
return FALSE;
rect.left = XLPTODP( dc, x );
rect.right = XLPTODP( dc, x+sz.cx );
rect.top = YLPTODP( dc, y );
rect.bottom = YLPTODP( dc, y+sz.cy );
}
else
{
rect.left = XLPTODP( dc, lprect->left );
rect.right = XLPTODP( dc, lprect->right );
rect.top = YLPTODP( dc, lprect->top );
rect.bottom = YLPTODP( dc, lprect->bottom );
}
if (rect.right < rect.left) SWAP_INT( rect.left, rect.right );
if (rect.bottom < rect.top) SWAP_INT( rect.top, rect.bottom );
}
x = XLPTODP( dc, x );
y = YLPTODP( dc, y );
dprintf_text(stddeb,"\treal coord: x=%i, y=%i, rect=(%d,%d-%d,%d)\n",
x, y, rect.left, rect.top, rect.right, rect.bottom);
/* Draw the rectangle */
if (flags & ETO_OPAQUE)
{
XSetForeground( display, dc->u.x.gc, dc->w.backgroundPixel );
XFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + rect.left, dc->w.DCOrgY + rect.top,
rect.right-rect.left, rect.bottom-rect.top );
}
if (!count) return TRUE; /* Nothing more to do */
/* Compute text starting position */
XTextExtents( font, str, count, &dir, &ascent, &descent, &info );
if (lpDx) /* have explicit character cell x offsets */
{
/* sum lpDx array and add the width of last character */
info.width = XTextWidth( font, str + count - 1, 1) + dc->w.charExtra;
if (str[count-1] == (char)dc->u.x.font.metrics.tmBreakChar)
info.width += dc->w.breakExtra;
for (i = 0; i < count; i++) info.width += lpDx[i];
}
else
info.width += count*dc->w.charExtra + dc->w.breakExtra*dc->w.breakCount;
switch( dc->w.textAlign & (TA_LEFT | TA_RIGHT | TA_CENTER) )
{
case TA_LEFT:
if (dc->w.textAlign & TA_UPDATECP)
dc->w.CursPosX = XDPTOLP( dc, x + info.width );
break;
case TA_RIGHT:
x -= info.width;
if (dc->w.textAlign & TA_UPDATECP) dc->w.CursPosX = XDPTOLP( dc, x );
break;
case TA_CENTER:
x -= info.width / 2;
break;
}
switch( dc->w.textAlign & (TA_TOP | TA_BOTTOM | TA_BASELINE) )
{
case TA_TOP:
y += font->ascent;
break;
case TA_BOTTOM:
y -= font->descent;
break;
case TA_BASELINE:
break;
}
/* Set the clip region */
if (flags & ETO_CLIPPED)
{
hRgnClip = dc->w.hClipRgn;
CLIPPING_IntersectClipRect( dc, rect.left, rect.top, rect.right,
rect.bottom, CLIP_INTERSECT|CLIP_KEEPRGN );
}
/* Draw the text background if necessary */
if (dc->w.backgroundMode != TRANSPARENT)
{
/* If rectangle is opaque and clipped, do nothing */
if (!(flags & ETO_CLIPPED) || !(flags & ETO_OPAQUE))
{
/* Only draw if rectangle is not opaque or if some */
/* text is outside the rectangle */
if (!(flags & ETO_OPAQUE) ||
(x < rect.left) ||
(x + info.width >= rect.right) ||
(y-font->ascent < rect.top) ||
(y+font->descent >= rect.bottom))
{
XSetForeground( display, dc->u.x.gc, dc->w.backgroundPixel );
XFillRectangle( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + x,
dc->w.DCOrgY + y - font->ascent,
info.width,
font->ascent + font->descent );
}
}
}
/* Draw the text (count > 0 verified) */
XSetForeground( display, dc->u.x.gc, dc->w.textPixel );
if (!dc->w.charExtra && !dc->w.breakExtra && !lpDx)
{
XDrawString( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + x, dc->w.DCOrgY + y, str, count );
}
else /* Now the fun begins... */
{
XTextItem *items, *pitem;
int delta;
/* allocate max items */
pitem = items = xmalloc( count * sizeof(XTextItem) );
delta = i = 0;
while (i < count)
{
/* initialize text item with accumulated delta */
pitem->chars = (char *)str + i;
pitem->delta = delta;
pitem->nchars = 0;
pitem->font = None;
delta = 0;
/* stuff characters into the same XTextItem until new delta
* becomes non-zero */
do
{
if (lpDx) delta += lpDx[i] - XTextWidth( font, str + i, 1);
else
{
delta += dc->w.charExtra;
if (str[i] == (char)dc->u.x.font.metrics.tmBreakChar)
delta += dc->w.breakExtra;
}
pitem->nchars++;
}
while ((++i < count) && !delta);
pitem++;
}
XDrawText( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + x, dc->w.DCOrgY + y, items, pitem - items );
free( items );
}
/* Draw underline and strike-out if needed */
if (dc->u.x.font.metrics.tmUnderlined)
{
long linePos, lineWidth;
if (!XGetFontProperty( font, XA_UNDERLINE_POSITION, &linePos ))
linePos = font->descent-1;
if (!XGetFontProperty( font, XA_UNDERLINE_THICKNESS, &lineWidth ))
lineWidth = 0;
else if (lineWidth == 1) lineWidth = 0;
XSetLineAttributes( display, dc->u.x.gc, lineWidth,
LineSolid, CapRound, JoinBevel );
XDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + x, dc->w.DCOrgY + y + linePos,
dc->w.DCOrgX + x + info.width, dc->w.DCOrgY + y + linePos );
}
if (dc->u.x.font.metrics.tmStruckOut)
{
long lineAscent, lineDescent;
if (!XGetFontProperty( font, XA_STRIKEOUT_ASCENT, &lineAscent ))
lineAscent = font->ascent / 3;
if (!XGetFontProperty( font, XA_STRIKEOUT_DESCENT, &lineDescent ))
lineDescent = -lineAscent;
XSetLineAttributes( display, dc->u.x.gc, lineAscent + lineDescent,
LineSolid, CapRound, JoinBevel );
XDrawLine( display, dc->u.x.drawable, dc->u.x.gc,
dc->w.DCOrgX + x, dc->w.DCOrgY + y - lineAscent,
dc->w.DCOrgX + x + info.width, dc->w.DCOrgY + y - lineAscent );
}
if (flags & ETO_CLIPPED) SelectClipRgn32( dc->hSelf, hRgnClip );
return TRUE;
}
...@@ -81,9 +81,6 @@ all: checkbuild $(MODULE).o ...@@ -81,9 +81,6 @@ all: checkbuild $(MODULE).o
$(SPEC_FILES): $(BUILD) $(SPEC_FILES): $(BUILD)
$(BUILD) checkbuild:
cd $(TOPOBJDIR)/tools; $(SUBMAKE) build
callfrom16.s: $(SPEC_FILES) callfrom16.s: $(SPEC_FILES)
$(BUILD) -o $@ -callfrom16 `cat $(SPEC_FILES) | grep CallFrom16_ | sed 's/.*CallFrom16_\(.*\)/\1/' | sort | uniq` $(BUILD) -o $@ -callfrom16 `cat $(SPEC_FILES) | grep CallFrom16_ | sed 's/.*CallFrom16_\(.*\)/\1/' | sort | uniq`
......
...@@ -198,7 +198,7 @@ base 1 ...@@ -198,7 +198,7 @@ base 1
0193 stub SetThreadToken 0193 stub SetThreadToken
0194 stub SetTokenInformation 0194 stub SetTokenInformation
0195 stub StartServiceA 0195 stub StartServiceA
0196 stub StartServiceCtrlDispatcherA 0196 stdcall StartServiceCtrlDispatcherA(ptr) StartServiceCtrlDispatcher32A
0197 stub StartServiceCtrlDispatcherW 0197 stdcall StartServiceCtrlDispatcherW(ptr) StartServiceCtrlDispatcher32W
0198 stub StartServiceW 0198 stub StartServiceW
0199 stub UnlockServiceDatabase 0199 stub UnlockServiceDatabase
...@@ -3,9 +3,9 @@ name crtdll ...@@ -3,9 +3,9 @@ name crtdll
type win32 type win32
base 1 base 1
001 cdecl ??2@YAPAXI@Z(long) CRTDLL_malloc 001 cdecl ??2@YAPAXI@Z(long) CRTDLL_new
002 cdecl ??3@YAXPAX@Z(long) CRTDLL_free 002 cdecl ??3@YAXPAX@Z(long) CRTDLL_delete
003 stub ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z 003 cdecl ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z(ptr) CRTDLL_set_new_handler
004 stub _CIacos 004 stub _CIacos
005 stub _CIasin 005 stub _CIasin
006 stub _CIatan 006 stub _CIatan
......
...@@ -61,8 +61,8 @@ base 1 ...@@ -61,8 +61,8 @@ base 1
0054 stdcall CreatePatternBrush(long) CreatePatternBrush32 0054 stdcall CreatePatternBrush(long) CreatePatternBrush32
0055 stdcall CreatePen(long long long) CreatePen32 0055 stdcall CreatePen(long long long) CreatePen32
0056 stdcall CreatePenIndirect(ptr) CreatePenIndirect32 0056 stdcall CreatePenIndirect(ptr) CreatePenIndirect32
0057 stub CreatePolyPolygonRgn 0057 stdcall CreatePolyPolygonRgn(ptr ptr long long) CreatePolyPolygonRgn32
0058 stub CreatePolygonRgn 0058 stdcall CreatePolygonRgn(ptr long long) CreatePolygonRgn32
0059 stdcall CreateRectRgn(long long long long) CreateRectRgn32 0059 stdcall CreateRectRgn(long long long long) CreateRectRgn32
0060 stdcall CreateRectRgnIndirect(ptr) CreateRectRgnIndirect32 0060 stdcall CreateRectRgnIndirect(ptr) CreateRectRgnIndirect32
0061 stdcall CreateRoundRectRgn(long long long long long long) 0061 stdcall CreateRoundRectRgn(long long long long long long)
...@@ -276,7 +276,7 @@ base 1 ...@@ -276,7 +276,7 @@ base 1
0268 stub PolyBezier 0268 stub PolyBezier
0269 stub PolyBezierTo 0269 stub PolyBezierTo
0270 stub PolyDraw 0270 stub PolyDraw
0271 stub PolyPolygon 0271 stdcall PolyPolygon(long ptr ptr long) PolyPolygon32
0272 stub PolyPolyline 0272 stub PolyPolyline
0273 stub PolyTextOutA 0273 stub PolyTextOutA
0274 stub PolyTextOutW 0274 stub PolyTextOutW
......
...@@ -204,7 +204,7 @@ type win16 ...@@ -204,7 +204,7 @@ type win16
204 stub SwapRecording 204 stub SwapRecording
205 stub CVWBreak 205 stub CVWBreak
206 pascal16 AllocSelectorArray(word) AllocSelectorArray 206 pascal16 AllocSelectorArray(word) AllocSelectorArray
207 return IsDBCSLeadByte 2 0 207 pascal16 IsDBCSLeadByte(word) IsDBCSLeadByte16
216 pascal RegEnumKey(long long ptr long) RegEnumKey16 216 pascal RegEnumKey(long long ptr long) RegEnumKey16
217 pascal RegOpenKey(long ptr ptr) RegOpenKey16 217 pascal RegOpenKey(long ptr ptr) RegOpenKey16
218 pascal RegCreateKey(long ptr ptr) RegCreateKey16 218 pascal RegCreateKey(long ptr ptr) RegCreateKey16
......
...@@ -39,7 +39,7 @@ base 1 ...@@ -39,7 +39,7 @@ base 1
0034 stub ContinueDebugEvent 0034 stub ContinueDebugEvent
0035 stub ConvertDefaultLocale 0035 stub ConvertDefaultLocale
0036 stdcall CopyFileA(ptr ptr long) CopyFile32A 0036 stdcall CopyFileA(ptr ptr long) CopyFile32A
0037 stub CopyFileW 0037 stdcall CopyFileW(ptr ptr long) CopyFile32W
0038 stub CreateConsoleScreenBuffer 0038 stub CreateConsoleScreenBuffer
0039 stdcall CreateDirectoryA(ptr ptr) CreateDirectory32A 0039 stdcall CreateDirectoryA(ptr ptr) CreateDirectory32A
0040 stdcall CreateDirectoryExA(ptr ptr ptr) CreateDirectoryEx32A 0040 stdcall CreateDirectoryExA(ptr ptr ptr) CreateDirectoryEx32A
...@@ -143,8 +143,8 @@ base 1 ...@@ -143,8 +143,8 @@ base 1
0138 stdcall FormatMessageA() WIN32_FormatMessage32A 0138 stdcall FormatMessageA() WIN32_FormatMessage32A
0139 stdcall FormatMessageW() WIN32_FormatMessage32W 0139 stdcall FormatMessageW() WIN32_FormatMessage32W
0140 stub FreeConsole 0140 stub FreeConsole
0141 stdcall FreeEnvironmentStringsA(ptr) FreeEnvironmentStringsA 0141 stdcall FreeEnvironmentStringsA(ptr) FreeEnvironmentStrings32A
0142 stdcall FreeEnvironmentStringsW(ptr) FreeEnvironmentStringsW 0142 stdcall FreeEnvironmentStringsW(ptr) FreeEnvironmentStrings32W
0143 stdcall FreeLibrary(long) FreeLibrary32 0143 stdcall FreeLibrary(long) FreeLibrary32
0144 stub FreeLibraryAndExitThread 0144 stub FreeLibraryAndExitThread
0145 stdcall FreeResource(long) FreeResource32 0145 stdcall FreeResource(long) FreeResource32
...@@ -212,9 +212,9 @@ base 1 ...@@ -212,9 +212,9 @@ base 1
0207 stdcall GetDiskFreeSpaceW(ptr ptr ptr ptr ptr) GetDiskFreeSpace32W 0207 stdcall GetDiskFreeSpaceW(ptr ptr ptr ptr ptr) GetDiskFreeSpace32W
0208 stdcall GetDriveTypeA(ptr) GetDriveType32A 0208 stdcall GetDriveTypeA(ptr) GetDriveType32A
0209 stdcall GetDriveTypeW(ptr) GetDriveType32W 0209 stdcall GetDriveTypeW(ptr) GetDriveType32W
0210 stdcall GetEnvironmentStrings() GetEnvironmentStrings 0210 stdcall GetEnvironmentStrings() GetEnvironmentStrings32A
0211 stub GetEnvironmentStringsA 0211 stdcall GetEnvironmentStringsA() GetEnvironmentStrings32A
0212 stdcall GetEnvironmentStringsW() GetEnvironmentStringsW 0212 stdcall GetEnvironmentStringsW() GetEnvironmentStrings32W
0213 stdcall GetEnvironmentVariableA(ptr ptr long) GetEnvironmentVariable32A 0213 stdcall GetEnvironmentVariableA(ptr ptr long) GetEnvironmentVariable32A
0214 stdcall GetEnvironmentVariableW(ptr ptr long) GetEnvironmentVariable32W 0214 stdcall GetEnvironmentVariableW(ptr ptr long) GetEnvironmentVariable32W
0215 stub GetExitCodeProcess 0215 stub GetExitCodeProcess
...@@ -252,7 +252,7 @@ base 1 ...@@ -252,7 +252,7 @@ base 1
0247 stub GetNumberOfConsoleMouseButtons 0247 stub GetNumberOfConsoleMouseButtons
0248 stdcall GetOEMCP() GetOEMCP 0248 stdcall GetOEMCP() GetOEMCP
0249 stub GetOverlappedResult 0249 stub GetOverlappedResult
0250 stub GetPriorityClass 0250 stdcall GetPriorityClass(long) GetPriorityClass
0251 stdcall GetPrivateProfileIntA(ptr ptr long ptr) GetPrivateProfileInt32A 0251 stdcall GetPrivateProfileIntA(ptr ptr long ptr) GetPrivateProfileInt32A
0252 stdcall GetPrivateProfileIntW(ptr ptr long ptr) GetPrivateProfileInt32W 0252 stdcall GetPrivateProfileIntW(ptr ptr long ptr) GetPrivateProfileInt32W
0253 stub GetPrivateProfileSectionA 0253 stub GetPrivateProfileSectionA
...@@ -296,9 +296,9 @@ base 1 ...@@ -296,9 +296,9 @@ base 1
0291 stdcall GetTempFileNameW(ptr ptr long ptr) GetTempFileName32W 0291 stdcall GetTempFileNameW(ptr ptr long ptr) GetTempFileName32W
0292 stdcall GetTempPathA(long ptr) GetTempPath32A 0292 stdcall GetTempPathA(long ptr) GetTempPath32A
0293 stdcall GetTempPathW(long ptr) GetTempPath32W 0293 stdcall GetTempPathW(long ptr) GetTempPath32W
0294 stdcall GetThreadContext(long ptr) GetThreadContext 0294 stdcall GetThreadContext(long ptr) GetThreadContext
0295 stub GetThreadLocale 0295 stdcall GetThreadLocale() GetThreadLocale
0296 stub GetThreadPriority 0296 stdcall GetThreadPriority(long) GetThreadPriority
0297 stub GetThreadSelectorEntry 0297 stub GetThreadSelectorEntry
0298 stub GetThreadTimes 0298 stub GetThreadTimes
0299 stdcall GetTickCount() GetTickCount 0299 stdcall GetTickCount() GetTickCount
...@@ -360,8 +360,8 @@ base 1 ...@@ -360,8 +360,8 @@ base 1
0355 stub IsBadStringPtrA 0355 stub IsBadStringPtrA
0356 stub IsBadStringPtrW 0356 stub IsBadStringPtrW
0357 stdcall IsBadWritePtr(ptr long) WIN32_IsBadWritePtr 0357 stdcall IsBadWritePtr(ptr long) WIN32_IsBadWritePtr
0358 return IsDBCSLeadByte 4 0 0358 stdcall IsDBCSLeadByte(long) IsDBCSLeadByte32
0359 stub IsDBCSLeadByteEx 0359 stdcall IsDBCSLeadByteEx(long long) IsDBCSLeadByteEx
0360 stub IsValidCodePage 0360 stub IsValidCodePage
0361 stdcall IsValidLocale(long long) IsValidLocale 0361 stdcall IsValidLocale(long long) IsValidLocale
0362 stub LCMapStringA 0362 stub LCMapStringA
...@@ -415,8 +415,8 @@ base 1 ...@@ -415,8 +415,8 @@ base 1
0410 stub PrepareTape 0410 stub PrepareTape
0411 stub PulseEvent 0411 stub PulseEvent
0412 stub PurgeComm 0412 stub PurgeComm
0413 stub QueryDosDeviceA 0413 stdcall QueryDosDeviceA(ptr ptr long) QueryDosDevice32A
0414 stub QueryDosDeviceW 0414 stdcall QueryDosDeviceW(ptr ptr long) QueryDosDevice32W
0415 stdcall QueryPerformanceCounter(ptr) QueryPerformanceCounter 0415 stdcall QueryPerformanceCounter(ptr) QueryPerformanceCounter
0416 stub QueryPerformanceFrequency 0416 stub QueryPerformanceFrequency
0417 stub QueryWin31IniFilesMappedToRegistry 0417 stub QueryWin31IniFilesMappedToRegistry
...@@ -505,20 +505,20 @@ base 1 ...@@ -505,20 +505,20 @@ base 1
0500 stub SetLocaleInfoW 0500 stub SetLocaleInfoW
0501 stub SetMailslotInfo 0501 stub SetMailslotInfo
0502 stub SetNamedPipeHandleState 0502 stub SetNamedPipeHandleState
0503 stub SetPriorityClass 0503 stdcall SetPriorityClass(long long) SetPriorityClass
0504 stub SetProcessShutdownParameters 0504 stub SetProcessShutdownParameters
0505 stub SetProcessWorkingSetSize 0505 stub SetProcessWorkingSetSize
0506 stub SetStdHandle 0506 stdcall SetStdHandle(long long) SetStdHandle
0507 stdcall SetSystemTime(ptr) SetSystemTime 0507 stdcall SetSystemTime(ptr) SetSystemTime
0508 stub SetSystemTimeAdjustment 0508 stub SetSystemTimeAdjustment
0509 stub SetTapeParameters 0509 stub SetTapeParameters
0510 stub SetTapePosition 0510 stub SetTapePosition
0511 stdcall SetThreadAffinityMask(long long) SetThreadAffinityMask 0511 stdcall SetThreadAffinityMask(long long) SetThreadAffinityMask
0512 stub SetThreadContext 0512 stub SetThreadContext
0513 stub SetThreadLocale 0513 stub SetThreadLocale
0514 stub SetThreadPriority 0514 stdcall SetThreadPriority(long long) SetThreadPriority
0515 stdcall SetTimeZoneInformation(ptr) SetTimeZoneInformation 0515 stdcall SetTimeZoneInformation(ptr) SetTimeZoneInformation
0516 stdcall SetUnhandledExceptionFilter(ptr) SetUnhandledExceptionFilter 0516 stdcall SetUnhandledExceptionFilter(ptr) SetUnhandledExceptionFilter
0517 stub SetVDMCurrentDirectories 0517 stub SetVDMCurrentDirectories
0518 stub SetVolumeLabelA 0518 stub SetVolumeLabelA
0519 stub SetVolumeLabelW 0519 stub SetVolumeLabelW
......
...@@ -267,7 +267,7 @@ base 0 ...@@ -267,7 +267,7 @@ base 0
263 stub RtlAddAuditAccessAce 263 stub RtlAddAuditAccessAce
264 stub RtlAdjustPrivilege 264 stub RtlAdjustPrivilege
265 stub RtlAllocateAndInitializeSid 265 stub RtlAllocateAndInitializeSid
266 stub RtlAllocateHeap 266 stdcall RtlAllocateHeap(long long long) HeapAlloc
267 stub RtlAnsiCharToUnicodeChar 267 stub RtlAnsiCharToUnicodeChar
268 stub RtlAnsiStringToUnicodeSize 268 stub RtlAnsiStringToUnicodeSize
269 stub RtlAnsiStringToUnicodeString 269 stub RtlAnsiStringToUnicodeString
...@@ -310,7 +310,7 @@ base 0 ...@@ -310,7 +310,7 @@ base 0
306 stub RtlCreateAcl 306 stub RtlCreateAcl
307 stub RtlCreateAndSetSD 307 stub RtlCreateAndSetSD
308 stub RtlCreateEnvironment 308 stub RtlCreateEnvironment
309 stub RtlCreateHeap 309 stdcall RtlCreateHeap(long long long) HeapCreate
310 stub RtlCreateProcessParameters 310 stub RtlCreateProcessParameters
311 stub RtlCreateQueryDebugBuffer 311 stub RtlCreateQueryDebugBuffer
312 stub RtlCreateRegistryKey 312 stub RtlCreateRegistryKey
...@@ -375,7 +375,7 @@ base 0 ...@@ -375,7 +375,7 @@ base 0
371 stub RtlFormatCurrentUserKeyPath 371 stub RtlFormatCurrentUserKeyPath
372 stub RtlFormatMessage 372 stub RtlFormatMessage
373 stub RtlFreeAnsiString 373 stub RtlFreeAnsiString
374 stub RtlFreeHeap 374 stdcall RtlFreeHeap(long long long) HeapFree
375 stub RtlFreeOemString 375 stub RtlFreeOemString
376 stub RtlFreeSid 376 stub RtlFreeSid
377 stub RtlFreeUnicodeString 377 stub RtlFreeUnicodeString
...@@ -494,7 +494,7 @@ base 0 ...@@ -494,7 +494,7 @@ base 0
490 stub RtlSetTimeZoneInformation 490 stub RtlSetTimeZoneInformation
491 stub RtlSetUserFlagsHeap 491 stub RtlSetUserFlagsHeap
492 stub RtlSetUserValueHeap 492 stub RtlSetUserValueHeap
493 stub RtlSizeHeap 493 stdcall RtlSizeHeap(long long long) HeapSize
494 stub RtlSplay 494 stub RtlSplay
495 stub RtlStartRXact 495 stub RtlStartRXact
496 stdcall RtlSubAuthorityCountSid(ptr) RtlSubAuthorityCountSid 496 stdcall RtlSubAuthorityCountSid(ptr) RtlSubAuthorityCountSid
...@@ -880,7 +880,7 @@ base 0 ...@@ -880,7 +880,7 @@ base 0
876 stub _strupr 876 stub _strupr
877 stub _ultoa 877 stub _ultoa
878 stub _vsnprintf 878 stub _vsnprintf
879 stub _wcsicmp 879 stdcall _wcsicmp(ptr ptr) lstrcmpi32W
880 stub _wcslwr 880 stub _wcslwr
881 stub _wcsnicmp 881 stub _wcsnicmp
882 stub _wcsupr 882 stub _wcsupr
......
...@@ -186,9 +186,8 @@ void RELAY_Unimplemented32( int nb_args, void *relay_addr, ...@@ -186,9 +186,8 @@ void RELAY_Unimplemented32( int nb_args, void *relay_addr,
* 'stack' points to the called function address on the 32-bit stack. * 'stack' points to the called function address on the 32-bit stack.
* Stack layout: * Stack layout:
* ... ... * ... ...
* (stack+12) arg2 * (stack+8) arg2
* (stack+8) arg1 * (stack+4) arg1
* (stack+4) 16-bit ds
* (stack) func to call * (stack) func to call
*/ */
void RELAY_DebugCallTo16( int* stack, int nbargs ) void RELAY_DebugCallTo16( int* stack, int nbargs )
...@@ -196,8 +195,8 @@ void RELAY_DebugCallTo16( int* stack, int nbargs ) ...@@ -196,8 +195,8 @@ void RELAY_DebugCallTo16( int* stack, int nbargs )
if (!debugging_relay) return; if (!debugging_relay) return;
printf( "CallTo16(func=%04x:%04x,ds=%04x", printf( "CallTo16(func=%04x:%04x,ds=%04x",
HIWORD(stack[0]), LOWORD(stack[0]), LOWORD(stack[1]) ); HIWORD(stack[0]), LOWORD(stack[0]), CURRENT_DS );
stack += 2; stack++;
while (nbargs--) printf( ",0x%04x", *stack++ ); while (nbargs--) printf( ",0x%04x", *stack++ );
printf( ")\n" ); printf( ")\n" );
} }
......
...@@ -148,20 +148,20 @@ heap 65520 ...@@ -148,20 +148,20 @@ heap 65520
146 pascal16 GetClipboardFormatName(word ptr s_word) GetClipboardFormatName 146 pascal16 GetClipboardFormatName(word ptr s_word) GetClipboardFormatName
147 pascal16 SetClipboardViewer(word) SetClipboardViewer 147 pascal16 SetClipboardViewer(word) SetClipboardViewer
148 pascal16 GetClipboardViewer() GetClipboardViewer 148 pascal16 GetClipboardViewer() GetClipboardViewer
149 pascal16 ChangeClipboardChain(word ptr) ChangeClipboardChain 149 pascal16 ChangeClipboardChain(word ptr) ChangeClipboardChain16
150 pascal16 LoadMenu(word segptr) LoadMenu16 150 pascal16 LoadMenu(word segptr) LoadMenu16
151 pascal16 CreateMenu() CreateMenu 151 pascal16 CreateMenu() CreateMenu16
152 pascal16 DestroyMenu(word) DestroyMenu 152 pascal16 DestroyMenu(word) DestroyMenu16
153 pascal16 ChangeMenu(word word segptr word word) ChangeMenu16 153 pascal16 ChangeMenu(word word segptr word word) ChangeMenu16
154 pascal16 CheckMenuItem(word word word) CheckMenuItem 154 pascal16 CheckMenuItem(word word word) CheckMenuItem16
155 pascal16 EnableMenuItem(word word word) EnableMenuItem 155 pascal16 EnableMenuItem(word word word) EnableMenuItem16
156 pascal16 GetSystemMenu(word word) GetSystemMenu 156 pascal16 GetSystemMenu(word word) GetSystemMenu16
157 pascal16 GetMenu(word) GetMenu 157 pascal16 GetMenu(word) GetMenu16
158 pascal16 SetMenu(word word) SetMenu 158 pascal16 SetMenu(word word) SetMenu16
159 pascal16 GetSubMenu(word word) GetSubMenu 159 pascal16 GetSubMenu(word word) GetSubMenu16
160 pascal16 DrawMenuBar(word) DrawMenuBar 160 pascal16 DrawMenuBar(word) DrawMenuBar16
161 pascal16 GetMenuString(word word ptr s_word word) GetMenuString 161 pascal16 GetMenuString(word word ptr s_word word) GetMenuString16
162 pascal16 HiliteMenuItem(word word word word) HiliteMenuItem 162 pascal16 HiliteMenuItem(word word word word) HiliteMenuItem16
163 pascal16 CreateCaret(word word word word) CreateCaret 163 pascal16 CreateCaret(word word word word) CreateCaret
164 pascal16 DestroyCaret() DestroyCaret 164 pascal16 DestroyCaret() DestroyCaret
165 pascal16 SetCaretPos(word word) SetCaretPos 165 pascal16 SetCaretPos(word word) SetCaretPos
...@@ -252,7 +252,7 @@ heap 65520 ...@@ -252,7 +252,7 @@ heap 65520
247 pascal16 GetCursor() GetCursor 247 pascal16 GetCursor() GetCursor
248 pascal16 GetOpenClipboardWindow() GetOpenClipboardWindow 248 pascal16 GetOpenClipboardWindow() GetOpenClipboardWindow
249 pascal16 GetAsyncKeyState(word) GetAsyncKeyState 249 pascal16 GetAsyncKeyState(word) GetAsyncKeyState
250 pascal16 GetMenuState(word word word) GetMenuState 250 pascal16 GetMenuState(word word word) GetMenuState16
251 pascal SendDriverMessage(word word long long) SendDriverMessage 251 pascal SendDriverMessage(word word long long) SendDriverMessage
252 pascal16 OpenDriver(ptr ptr long) OpenDriver 252 pascal16 OpenDriver(ptr ptr long) OpenDriver
253 pascal CloseDriver(word long long) CloseDriver 253 pascal CloseDriver(word long long) CloseDriver
...@@ -266,8 +266,8 @@ heap 65520 ...@@ -266,8 +266,8 @@ heap 65520
DeferWindowPos DeferWindowPos
261 pascal16 EndDeferWindowPos(word) EndDeferWindowPos 261 pascal16 EndDeferWindowPos(word) EndDeferWindowPos
262 pascal16 GetWindow(word word) GetWindow 262 pascal16 GetWindow(word word) GetWindow
263 pascal16 GetMenuItemCount(word) GetMenuItemCount 263 pascal16 GetMenuItemCount(word) GetMenuItemCount16
264 pascal16 GetMenuItemID(word word) GetMenuItemID 264 pascal16 GetMenuItemID(word word) GetMenuItemID16
265 pascal16 ShowOwnedPopups(word word) ShowOwnedPopups 265 pascal16 ShowOwnedPopups(word word) ShowOwnedPopups
266 pascal16 SetMessageQueue(word) SetMessageQueue 266 pascal16 SetMessageQueue(word) SetMessageQueue
267 pascal16 ShowScrollBar(word word word) ShowScrollBar16 267 pascal16 ShowScrollBar(word word word) ShowScrollBar16
...@@ -283,7 +283,7 @@ heap 65520 ...@@ -283,7 +283,7 @@ heap 65520
277 pascal16 GetDlgCtrlID(word) GetDlgCtrlID 277 pascal16 GetDlgCtrlID(word) GetDlgCtrlID
278 pascal16 GetDesktopHwnd() GetDesktopHwnd 278 pascal16 GetDesktopHwnd() GetDesktopHwnd
279 stub OldSetDeskPattern 279 stub OldSetDeskPattern
280 stub SetSystemMenu 280 pascal16 SetSystemMenu(word word) SetSystemMenu16
281 pascal16 GetSysColorBrush(word) GetSysColorBrush16 281 pascal16 GetSysColorBrush(word) GetSysColorBrush16
282 pascal16 SelectPalette(word word word) SelectPalette 282 pascal16 SelectPalette(word word word) SelectPalette
283 pascal16 RealizePalette(word) RealizePalette 283 pascal16 RealizePalette(word) RealizePalette
...@@ -324,7 +324,7 @@ heap 65520 ...@@ -324,7 +324,7 @@ heap 65520
343 stub GetFilePortName 343 stub GetFilePortName
356 stub LoadDIBCursorHandler 356 stub LoadDIBCursorHandler
357 stub LoadDIBIconHandler 357 stub LoadDIBIconHandler
358 pascal16 IsMenu(word) IsMenu 358 pascal16 IsMenu(word) IsMenu16
359 pascal16 GetDCEx(word word long) GetDCEx16 359 pascal16 GetDCEx(word word long) GetDCEx16
362 pascal16 DCHook(word word long long) DCHook 362 pascal16 DCHook(word word long long) DCHook
364 stub LookupIconIDFromDirectoryEx 364 stub LookupIconIDFromDirectoryEx
...@@ -364,13 +364,13 @@ heap 65520 ...@@ -364,13 +364,13 @@ heap 65520
409 stub InitThreadInput 409 stub InitThreadInput
410 pascal16 InsertMenu(word word word word segptr) InsertMenu16 410 pascal16 InsertMenu(word word word word segptr) InsertMenu16
411 pascal16 AppendMenu(word word word segptr) AppendMenu16 411 pascal16 AppendMenu(word word word segptr) AppendMenu16
412 pascal16 RemoveMenu(word word word) RemoveMenu 412 pascal16 RemoveMenu(word word word) RemoveMenu16
413 pascal16 DeleteMenu(word word word) DeleteMenu 413 pascal16 DeleteMenu(word word word) DeleteMenu16
414 pascal16 ModifyMenu(word word word word segptr) ModifyMenu16 414 pascal16 ModifyMenu(word word word word segptr) ModifyMenu16
415 pascal16 CreatePopupMenu() CreatePopupMenu 415 pascal16 CreatePopupMenu() CreatePopupMenu16
416 pascal16 TrackPopupMenu(word word s_word s_word s_word word ptr) TrackPopupMenu16 416 pascal16 TrackPopupMenu(word word s_word s_word s_word word ptr) TrackPopupMenu16
417 pascal GetMenuCheckMarkDimensions() GetMenuCheckMarkDimensions 417 pascal GetMenuCheckMarkDimensions() GetMenuCheckMarkDimensions
418 pascal16 SetMenuItemBitmaps(word word word word word) SetMenuItemBitmaps 418 pascal16 SetMenuItemBitmaps(word word word word word) SetMenuItemBitmaps16
420 pascal16 wsprintf() WIN16_wsprintf16 420 pascal16 wsprintf() WIN16_wsprintf16
421 pascal16 wvsprintf(ptr ptr ptr) wvsprintf16 421 pascal16 wvsprintf(ptr ptr ptr) wvsprintf16
422 pascal16 DlgDirSelectEx(word ptr word word) DlgDirSelectEx16 422 pascal16 DlgDirSelectEx(word ptr word word) DlgDirSelectEx16
...@@ -379,14 +379,14 @@ heap 65520 ...@@ -379,14 +379,14 @@ heap 65520
428 stub TileWindows 428 stub TileWindows
429 stub CascadeWindows 429 stub CascadeWindows
430 pascal16 lstrcmp(ptr ptr) lstrcmp16 430 pascal16 lstrcmp(ptr ptr) lstrcmp16
431 pascal AnsiUpper(segptr) WIN16_AnsiUpper 431 pascal AnsiUpper(segptr) AnsiUpper16
432 pascal AnsiLower(segptr) WIN16_AnsiLower 432 pascal AnsiLower(segptr) AnsiLower16
433 pascal16 IsCharAlpha(byte) IsCharAlpha16 433 pascal16 IsCharAlpha(byte) IsCharAlpha16
434 pascal16 IsCharAlphanumeric(byte) IsCharAlphanumeric16 434 pascal16 IsCharAlphanumeric(byte) IsCharAlphanumeric16
435 pascal16 IsCharUpper(byte) IsCharUpper16 435 pascal16 IsCharUpper(byte) IsCharUpper16
436 pascal16 IsCharLower(byte) IsCharLower16 436 pascal16 IsCharLower(byte) IsCharLower16
437 pascal16 AnsiUpperBuff(ptr word) AnsiUpperBuff 437 pascal16 AnsiUpperBuff(ptr word) AnsiUpperBuff16
438 pascal16 AnsiLowerBuff(ptr word) AnsiLowerBuff 438 pascal16 AnsiLowerBuff(ptr word) AnsiLowerBuff16
441 stub InsertMenuItem 441 stub InsertMenuItem
443 stub GetMenuItemInfo 443 stub GetMenuItemInfo
445 pascal DefFrameProc(word word word word long) DefFrameProc16 445 pascal DefFrameProc(word word word word long) DefFrameProc16
...@@ -413,8 +413,8 @@ heap 65520 ...@@ -413,8 +413,8 @@ heap 65520
466 pascal16 DrawFocusRect(word ptr) DrawFocusRect16 466 pascal16 DrawFocusRect(word ptr) DrawFocusRect16
470 stub StringFunc 470 stub StringFunc
471 pascal16 lstrcmpi(ptr ptr) lstrcmpi16 471 pascal16 lstrcmpi(ptr ptr) lstrcmpi16
472 pascal AnsiNext(segptr) AnsiNext 472 pascal AnsiNext(segptr) AnsiNext16
473 pascal AnsiPrev(segptr segptr) AnsiPrev 473 pascal AnsiPrev(segptr segptr) AnsiPrev16
475 pascal16 SetScrollInfo(word s_word ptr word) SetScrollInfo16 475 pascal16 SetScrollInfo(word s_word ptr word) SetScrollInfo16
476 pascal16 GetScrollInfo(word s_word ptr) GetScrollInfo16 476 pascal16 GetScrollInfo(word s_word ptr) GetScrollInfo16
477 stub GetKeyboardLayoutName 477 stub GetKeyboardLayoutName
......
...@@ -23,7 +23,7 @@ base 1 ...@@ -23,7 +23,7 @@ base 1
0018 stdcall CallWindowProcW(ptr long long long long) CallWindowProc32W 0018 stdcall CallWindowProcW(ptr long long long long) CallWindowProc32W
0019 stub CascadeChildWindows 0019 stub CascadeChildWindows
0020 stub CascadeWindows 0020 stub CascadeWindows
0021 stub ChangeClipboardChain 0021 stdcall ChangeClipboardChain(long long) ChangeClipboardChain32
0022 stdcall ChangeMenuA(long long ptr long long) ChangeMenu32A 0022 stdcall ChangeMenuA(long long ptr long long) ChangeMenu32A
0023 stdcall ChangeMenuW(long long ptr long long) ChangeMenu32W 0023 stdcall ChangeMenuW(long long ptr long long) ChangeMenu32W
0024 stdcall CharLowerA(ptr) CharLower32A 0024 stdcall CharLowerA(ptr) CharLower32A
...@@ -47,7 +47,7 @@ base 1 ...@@ -47,7 +47,7 @@ base 1
0042 stdcall CharUpperBuffW(ptr long) CharUpperBuff32W 0042 stdcall CharUpperBuffW(ptr long) CharUpperBuff32W
0043 stdcall CharUpperW(ptr) CharUpper32W 0043 stdcall CharUpperW(ptr) CharUpper32W
0044 stdcall CheckDlgButton(long long long) CheckDlgButton 0044 stdcall CheckDlgButton(long long long) CheckDlgButton
0045 stdcall CheckMenuItem(long long long) CheckMenuItem 0045 stdcall CheckMenuItem(long long long) CheckMenuItem32
0046 stub CheckMenuRadioItem 0046 stub CheckMenuRadioItem
0047 stdcall CheckRadioButton(long long long long) CheckRadioButton 0047 stdcall CheckRadioButton(long long long long) CheckRadioButton
0048 stdcall ChildWindowFromPoint(long long long) ChildWindowFromPoint32 0048 stdcall ChildWindowFromPoint(long long long) ChildWindowFromPoint32
...@@ -82,8 +82,8 @@ base 1 ...@@ -82,8 +82,8 @@ base 1
0077 stub CreateIconIndirect 0077 stub CreateIconIndirect
0078 stub CreateMDIWindowA 0078 stub CreateMDIWindowA
0079 stub CreateMDIWindowW 0079 stub CreateMDIWindowW
0080 stdcall CreateMenu() CreateMenu 0080 stdcall CreateMenu() CreateMenu32
0081 stdcall CreatePopupMenu() CreatePopupMenu 0081 stdcall CreatePopupMenu() CreatePopupMenu32
0082 stdcall CreateWindowExA(long ptr ptr long long long long long 0082 stdcall CreateWindowExA(long ptr ptr long long long long long
long long long ptr) CreateWindowEx32A long long long ptr) CreateWindowEx32A
0083 stdcall CreateWindowExW(long ptr ptr long long long long long 0083 stdcall CreateWindowExW(long ptr ptr long long long long long
...@@ -132,12 +132,12 @@ base 1 ...@@ -132,12 +132,12 @@ base 1
0125 stdcall DefWindowProcA(long long long long) DefWindowProc32A 0125 stdcall DefWindowProcA(long long long long) DefWindowProc32A
0126 stdcall DefWindowProcW(long long long long) DefWindowProc32W 0126 stdcall DefWindowProcW(long long long long) DefWindowProc32W
0127 stdcall DeferWindowPos(long long long long long long long long) DeferWindowPos 0127 stdcall DeferWindowPos(long long long long long long long long) DeferWindowPos
0128 stdcall DeleteMenu(long long long) DeleteMenu 0128 stdcall DeleteMenu(long long long) DeleteMenu32
0129 stub DestroyAcceleratorTable 0129 stub DestroyAcceleratorTable
0130 stdcall DestroyCaret() DestroyCaret 0130 stdcall DestroyCaret() DestroyCaret
0131 stub DestroyCursor 0131 stub DestroyCursor
0132 stub DestroyIcon 0132 stub DestroyIcon
0133 stdcall DestroyMenu(long) DestroyMenu 0133 stdcall DestroyMenu(long) DestroyMenu32
0134 stdcall DestroyWindow(long) DestroyWindow 0134 stdcall DestroyWindow(long) DestroyWindow
0135 stdcall DialogBoxIndirectParamA(long ptr long ptr long) DialogBoxIndirectParam32A 0135 stdcall DialogBoxIndirectParamA(long ptr long ptr long) DialogBoxIndirectParam32A
0136 stub DialogBoxIndirectParamAorW 0136 stub DialogBoxIndirectParamAorW
...@@ -164,7 +164,7 @@ base 1 ...@@ -164,7 +164,7 @@ base 1
0157 stdcall DrawFrameControl(long ptr long long) DrawFrameControl32 0157 stdcall DrawFrameControl(long ptr long long) DrawFrameControl32
0158 stdcall DrawIcon(long long long long) DrawIcon 0158 stdcall DrawIcon(long long long long) DrawIcon
0159 stub DrawIconEx 0159 stub DrawIconEx
0160 stdcall DrawMenuBar(long) DrawMenuBar 0160 stdcall DrawMenuBar(long) DrawMenuBar32
0161 stub DrawStateA 0161 stub DrawStateA
0162 stub DrawStateW 0162 stub DrawStateW
0163 stdcall DrawTextA(long ptr long ptr long) DrawText32A 0163 stdcall DrawTextA(long ptr long ptr long) DrawText32A
...@@ -172,13 +172,13 @@ base 1 ...@@ -172,13 +172,13 @@ base 1
0165 stub DrawTextExW 0165 stub DrawTextExW
0166 stdcall DrawTextW(long ptr long ptr long) DrawText32W 0166 stdcall DrawTextW(long ptr long ptr long) DrawText32W
0167 stub EditWndProc 0167 stub EditWndProc
0168 stdcall EmptyClipboard() EmptyClipboard 0168 stdcall EmptyClipboard() EmptyClipboard
0169 stdcall EnableMenuItem(long long long) EnableMenuItem 0169 stdcall EnableMenuItem(long long long) EnableMenuItem32
0170 stdcall EnableScrollBar(long long long) EnableScrollBar32 0170 stdcall EnableScrollBar(long long long) EnableScrollBar32
0171 stdcall EnableWindow(long long) EnableWindow 0171 stdcall EnableWindow(long long) EnableWindow
0172 stdcall EndDeferWindowPos(long) EndDeferWindowPos 0172 stdcall EndDeferWindowPos(long) EndDeferWindowPos
0173 stdcall EndDialog(long long) EndDialog 0173 stdcall EndDialog(long long) EndDialog
0174 stub EndMenu 0174 stdcall EndMenu() EndMenu
0175 stdcall EndPaint(long ptr) EndPaint32 0175 stdcall EndPaint(long ptr) EndPaint32
0176 stub EndTask 0176 stub EndTask
0177 stdcall EnumChildWindows(long ptr long) THUNK_EnumChildWindows32 0177 stdcall EnumChildWindows(long ptr long) THUNK_EnumChildWindows32
...@@ -260,19 +260,19 @@ base 1 ...@@ -260,19 +260,19 @@ base 1
0253 stub GetKeyboardState 0253 stub GetKeyboardState
0254 stub GetKeyboardType 0254 stub GetKeyboardType
0255 stub GetLastActivePopup 0255 stub GetLastActivePopup
0256 stdcall GetMenu(long) GetMenu 0256 stdcall GetMenu(long) GetMenu32
0257 stub GetMenuCheckMarkDimensions 0257 stdcall GetMenuCheckMarkDimensions() GetMenuCheckMarkDimensions
0258 stub GetMenuContextHelpId 0258 stub GetMenuContextHelpId
0259 stub GetMenuDefaultItem 0259 stub GetMenuDefaultItem
0260 stub GetMenuIndex 0260 stub GetMenuIndex
0261 stdcall GetMenuItemCount(long) GetMenuItemCount 0261 stdcall GetMenuItemCount(long) GetMenuItemCount32
0262 stdcall GetMenuItemID(long long) GetMenuItemID 0262 stdcall GetMenuItemID(long long) GetMenuItemID32
0263 stub GetMenuItemInfoA 0263 stub GetMenuItemInfoA
0264 stub GetMenuItemInfoW 0264 stub GetMenuItemInfoW
0265 stub GetMenuItemRect 0265 stub GetMenuItemRect
0266 stdcall GetMenuState(long long long) GetMenuState 0266 stdcall GetMenuState(long long long) GetMenuState32
0267 stdcall GetMenuStringA(long long ptr long long) GetMenuString 0267 stdcall GetMenuStringA(long long ptr long long) GetMenuString32A
0268 stub GetMenuStringW 0268 stdcall GetMenuStringW(long long ptr long long) GetMenuString32W
0269 stdcall GetMessageA(ptr long long long) USER32_GetMessageA 0269 stdcall GetMessageA(ptr long long long) USER32_GetMessageA
0270 stub GetMessageExtraInfo 0270 stub GetMessageExtraInfo
0271 stub GetMessagePos 0271 stub GetMessagePos
...@@ -291,10 +291,10 @@ base 1 ...@@ -291,10 +291,10 @@ base 1
0284 stdcall GetScrollPos(long long) GetScrollPos32 0284 stdcall GetScrollPos(long long) GetScrollPos32
0285 stdcall GetScrollRange(long long ptr ptr) GetScrollRange32 0285 stdcall GetScrollRange(long long ptr ptr) GetScrollRange32
0286 return GetShellWindow 0 0 0286 return GetShellWindow 0 0
0287 stdcall GetSubMenu(long long) GetSubMenu 0287 stdcall GetSubMenu(long long) GetSubMenu32
0288 stdcall GetSysColor(long) GetSysColor 0288 stdcall GetSysColor(long) GetSysColor
0289 stdcall GetSysColorBrush(long) GetSysColorBrush32 0289 stdcall GetSysColorBrush(long) GetSysColorBrush32
0290 stdcall GetSystemMenu(long long) GetSystemMenu 0290 stdcall GetSystemMenu(long long) GetSystemMenu32
0291 stdcall GetSystemMetrics(long) GetSystemMetrics 0291 stdcall GetSystemMetrics(long) GetSystemMetrics
0292 stdcall GetTabbedTextExtentA(long ptr long long ptr) GetTabbedTextExtent 0292 stdcall GetTabbedTextExtentA(long ptr long long ptr) GetTabbedTextExtent
0293 stub GetTabbedTextExtentW 0293 stub GetTabbedTextExtentW
...@@ -321,7 +321,7 @@ base 1 ...@@ -321,7 +321,7 @@ base 1
0314 stub GrayStringA 0314 stub GrayStringA
0315 stub GrayStringW 0315 stub GrayStringW
0316 stdcall HideCaret(long) HideCaret 0316 stdcall HideCaret(long) HideCaret
0317 stub HiliteMenuItem 0317 stdcall HiliteMenuItem(long long long long) HiliteMenuItem32
0318 stub ImpersonateDdeClientWindow 0318 stub ImpersonateDdeClientWindow
0319 stub InSendMessage 0319 stub InSendMessage
0320 stdcall InflateRect(ptr long long) InflateRect32 0320 stdcall InflateRect(ptr long long) InflateRect32
...@@ -349,7 +349,7 @@ base 1 ...@@ -349,7 +349,7 @@ base 1
0342 stub IsDialogMessageW 0342 stub IsDialogMessageW
0343 stdcall IsDlgButtonChecked(long long) IsDlgButtonChecked 0343 stdcall IsDlgButtonChecked(long long) IsDlgButtonChecked
0344 stdcall IsIconic(long) IsIconic 0344 stdcall IsIconic(long) IsIconic
0345 stdcall IsMenu(long) IsMenu 0345 stdcall IsMenu(long) IsMenu32
0346 stdcall IsRectEmpty(ptr) IsRectEmpty32 0346 stdcall IsRectEmpty(ptr) IsRectEmpty32
0347 stdcall IsWindow(long) IsWindow 0347 stdcall IsWindow(long) IsWindow
0348 stdcall IsWindowEnabled(long) IsWindowEnabled 0348 stdcall IsWindowEnabled(long) IsWindowEnabled
...@@ -444,7 +444,7 @@ base 1 ...@@ -444,7 +444,7 @@ base 1
0437 stdcall RegisterWindowMessageW(ptr) RegisterWindowMessage32W 0437 stdcall RegisterWindowMessageW(ptr) RegisterWindowMessage32W
0438 stdcall ReleaseCapture() ReleaseCapture 0438 stdcall ReleaseCapture() ReleaseCapture
0439 stdcall ReleaseDC(long long) ReleaseDC32 0439 stdcall ReleaseDC(long long) ReleaseDC32
0440 stdcall RemoveMenu(long long long) RemoveMenu 0440 stdcall RemoveMenu(long long long) RemoveMenu32
0441 stdcall RemovePropA(long ptr) RemoveProp32A 0441 stdcall RemovePropA(long ptr) RemoveProp32A
0442 stdcall RemovePropW(long ptr) RemoveProp32W 0442 stdcall RemovePropW(long ptr) RemoveProp32W
0443 stub ReplyMessage 0443 stub ReplyMessage
...@@ -490,10 +490,10 @@ base 1 ...@@ -490,10 +490,10 @@ base 1
0483 stub SetKeyboardState 0483 stub SetKeyboardState
0484 stdcall SetLastErrorEx(long long) SetLastErrorEx 0484 stdcall SetLastErrorEx(long long) SetLastErrorEx
0485 stub SetLogonNotifyWindow 0485 stub SetLogonNotifyWindow
0486 stdcall SetMenu(long long) SetMenu 0486 stdcall SetMenu(long long) SetMenu32
0487 stub SetMenuContextHelpId 0487 stub SetMenuContextHelpId
0488 stub SetMenuDefaultItem 0488 stub SetMenuDefaultItem
0489 stub SetMenuItemBitmaps 0489 stdcall SetMenuItemBitmaps(long long long long long) SetMenuItemBitmaps32
0490 stub SetMenuItemInfoA 0490 stub SetMenuItemInfoA
0491 stub SetMenuItemInfoW 0491 stub SetMenuItemInfoW
0492 stub SetMessageExtraInfo 0492 stub SetMessageExtraInfo
...@@ -511,7 +511,7 @@ base 1 ...@@ -511,7 +511,7 @@ base 1
0504 stub SetSysColors 0504 stub SetSysColors
0505 stub SetSysColorsTemp 0505 stub SetSysColorsTemp
0506 stub SetSystemCursor 0506 stub SetSystemCursor
0507 stub SetSystemMenu 0507 stdcall SetSystemMenu(long long) SetSystemMenu32
0508 stdcall SetSystemTimer(long long long ptr) SetSystemTimer32 0508 stdcall SetSystemTimer(long long long ptr) SetSystemTimer32
0509 stub SetThreadDesktop 0509 stub SetThreadDesktop
0510 stdcall SetTimer(long long long ptr) SetTimer32 0510 stdcall SetTimer(long long long ptr) SetTimer32
......
...@@ -5,9 +5,6 @@ type win16 ...@@ -5,9 +5,6 @@ type win16
2 pascal StaticWndProc(word word word long) StaticWndProc 2 pascal StaticWndProc(word word word long) StaticWndProc
3 pascal ScrollBarWndProc(word word word long) ScrollBarWndProc 3 pascal ScrollBarWndProc(word word word long) ScrollBarWndProc
5 pascal ComboBoxWndProc(word word word long) ComboBoxWndProc 5 pascal ComboBoxWndProc(word word word long) ComboBoxWndProc
6 pascal EditWndProc(word word word long) EditWndProc
7 pascal PopupMenuWndProc(word word word long) PopupMenuWndProc
9 pascal DefDlgProc(word word word long) DefDlgProc16
10 pascal MDIClientWndProc(word word word long) MDIClientWndProc 10 pascal MDIClientWndProc(word word word long) MDIClientWndProc
14 pascal FileOpenDlgProc(word word word long) FileOpenDlgProc 14 pascal FileOpenDlgProc(word word word long) FileOpenDlgProc
15 pascal FileSaveDlgProc(word word word long) FileSaveDlgProc 15 pascal FileSaveDlgProc(word word word long) FileSaveDlgProc
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
* *
*/ */
#ifndef __WINE_ACCEL_H
#define __WINE_ACCEL_H
#include "windows.h" #include "windows.h"
typedef struct { typedef struct {
...@@ -23,3 +26,5 @@ typedef struct { ...@@ -23,3 +26,5 @@ typedef struct {
#define CONTROL_ACCEL 0x08 #define CONTROL_ACCEL 0x08
#define ALT_ACCEL 0x10 #define ALT_ACCEL 0x10
#define SYSTEM_ACCEL 0x80 #define SYSTEM_ACCEL 0x80
#endif /* __WINE_ACCEL_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* Copyright 1993 Alexandre Julliard * Copyright 1993 Alexandre Julliard
*/ */
#ifndef ATOM_H #ifndef __WINE_ATOM_H
#define ATOM_H #define __WINE_ATOM_H
#include "windows.h" #include "windows.h"
...@@ -25,4 +25,4 @@ typedef struct ...@@ -25,4 +25,4 @@ typedef struct
HANDLE16 entries[1]; HANDLE16 entries[1];
} ATOMTABLE; } ATOMTABLE;
#endif /* ATOM_H */ #endif /* __WINE_ATOM_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* Copyright 1994 Alexandre Julliard * Copyright 1994 Alexandre Julliard
*/ */
#ifndef BUTTON_H #ifndef __WINE_BUTTON_H
#define BUTTON_H #define __WINE_BUTTON_H
#include "windows.h" #include "windows.h"
...@@ -31,4 +31,4 @@ typedef struct ...@@ -31,4 +31,4 @@ typedef struct
extern LRESULT ButtonWndProc( HWND32 hWnd, UINT32 uMsg, extern LRESULT ButtonWndProc( HWND32 hWnd, UINT32 uMsg,
WPARAM32 wParam, LPARAM lParam ); WPARAM32 wParam, LPARAM lParam );
#endif /* BUTTON_H */ #endif /* __WINE_BUTTON_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* Copyright 1993 Alexandre Julliard * Copyright 1993 Alexandre Julliard
*/ */
#ifndef CLASS_H #ifndef __WINE_CLASS_H
#define CLASS_H #define __WINE_CLASS_H
#include "windows.h" #include "windows.h"
#include "winproc.h" #include "winproc.h"
...@@ -40,4 +40,4 @@ extern void CLASS_WalkClasses(void); ...@@ -40,4 +40,4 @@ extern void CLASS_WalkClasses(void);
extern void CLASS_FreeModuleClasses( HMODULE16 hModule ); extern void CLASS_FreeModuleClasses( HMODULE16 hModule );
extern CLASS *CLASS_FindClassByAtom( ATOM atom, HINSTANCE16 hinstance ); extern CLASS *CLASS_FindClassByAtom( ATOM atom, HINSTANCE16 hinstance );
#endif /* CLASS_H */ #endif /* __WINE_CLASS_H */
#ifndef COMM_H #ifndef __WINE_COMM_H
#define COMM_H #define __WINE_COMM_H
#define MAX_PORTS 16 #define MAX_PORTS 16
...@@ -14,4 +14,4 @@ struct DosDeviceStruct { ...@@ -14,4 +14,4 @@ struct DosDeviceStruct {
extern void COMM_Init(void); extern void COMM_Init(void);
#endif /* COMM_H */ #endif /* __WINE_COMM_H */
#ifndef _WINE_CRTDLL_H #ifndef __WINE_CRTDLL_H
#define _WINE_CRTDLL_H #define __WINE_CRTDLL_H
#define CRTDLL_LC_ALL 0 #define CRTDLL_LC_ALL 0
#define CRTDLL_LC_COLLATE 1 #define CRTDLL_LC_COLLATE 1
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* Copyright 1993 Alexandre Julliard * Copyright 1993 Alexandre Julliard
*/ */
#ifndef DCE_H #ifndef __WINE_DCE_H
#define DCE_H #define __WINE_DCE_H
#include "windows.h" #include "windows.h"
#include "win.h" #include "win.h"
...@@ -50,4 +50,4 @@ extern DCE* DCE_AllocDCE( HWND32 hWnd, DCE_TYPE type ); ...@@ -50,4 +50,4 @@ extern DCE* DCE_AllocDCE( HWND32 hWnd, DCE_TYPE type );
extern void DCE_FreeDCE( DCE *dce ); extern void DCE_FreeDCE( DCE *dce );
extern INT16 DCE_ExcludeRgn( HDC32, WND*, HRGN32 ); extern INT16 DCE_ExcludeRgn( HDC32, WND*, HRGN32 );
#endif /* DCE_H */ #endif /* __WINE_DCE_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* Copyright 1994 Alexandre Julliard * Copyright 1994 Alexandre Julliard
*/ */
#ifndef DESKTOP_H #ifndef __WINE_DESKTOP_H
#define DESKTOP_H #define __WINE_DESKTOP_H
#include "windows.h" #include "windows.h"
...@@ -21,4 +21,4 @@ extern BOOL32 DESKTOP_SetPattern( LPCSTR pattern ); ...@@ -21,4 +21,4 @@ extern BOOL32 DESKTOP_SetPattern( LPCSTR pattern );
extern LRESULT DesktopWndProc( HWND32 hwnd, UINT32 message, extern LRESULT DesktopWndProc( HWND32 hwnd, UINT32 message,
WPARAM32 wParam, LPARAM lParam ); WPARAM32 wParam, LPARAM lParam );
#endif /* DESKTOP_H */ #endif /* __WINE_DESKTOP_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* Copyright 1993 Alexandre Julliard * Copyright 1993 Alexandre Julliard
*/ */
#ifndef DIALOG_H #ifndef __WINE_DIALOG_H
#define DIALOG_H #define __WINE_DIALOG_H
#include "windows.h" #include "windows.h"
#include "winproc.h" #include "winproc.h"
...@@ -44,4 +44,4 @@ extern HWND32 DIALOG_CreateIndirect( HINSTANCE32 hInst, LPCSTR dlgTemplate, ...@@ -44,4 +44,4 @@ extern HWND32 DIALOG_CreateIndirect( HINSTANCE32 hInst, LPCSTR dlgTemplate,
WINDOWPROCTYPE procType ); WINDOWPROCTYPE procType );
extern INT32 DIALOG_DoDialogBox( HWND32 hwnd, HWND32 owner ); extern INT32 DIALOG_DoDialogBox( HWND32 hwnd, HWND32 owner );
#endif /* DIALOG_H */ #endif /* __WINE_DIALOG_H */
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* dlgs.h - Common dialog's dialog control ID numbers * * dlgs.h - Common dialog's dialog control ID numbers *
******************************************************************************/ ******************************************************************************/
#ifndef DLGS_H #ifndef __WINE_DLGS_H
#define DLGS_H #define __WINE_DLGS_H
#define ctlFirst 0x0400 #define ctlFirst 0x0400
#define ctlLast 0x04ff #define ctlLast 0x04ff
...@@ -183,4 +183,4 @@ ...@@ -183,4 +183,4 @@
#define FORMATDLGORD31 1543 #define FORMATDLGORD31 1543
#define FORMATDLGORD30 1544 #define FORMATDLGORD30 1544
#endif /* #ifdef DLGS_H */ #endif /* #ifdef __WINE_DLGS_H */
/*
* DOS file system declarations
*
* Copyright 1996 Alexandre Julliard
*/
#ifndef __WINE_DOS_FS_H
#define __WINE_DOS_FS_H
#include <time.h>
#include "windows.h"
#define MAX_PATHNAME_LEN 1024
#define IS_END_OF_NAME(ch) (!(ch) || ((ch) == '/') || ((ch) == '\\'))
extern void DOSFS_ToDosDateTime( time_t unixtime, WORD *pDate, WORD *pTime );
extern time_t DOSFS_DosDateTimeToUnixTime(WORD,WORD);
extern const char *DOSFS_ToDosFCBFormat( const char *name );
extern const char *DOSFS_ToDosDTAFormat( const char *name );
extern const char *DOSFS_IsDevice( const char *name );
extern BOOL32 DOSFS_FindUnixName( const char *path, const char *name,
char *buffer, int maxlen,
UINT32 drive_flags );
extern const char * DOSFS_GetUnixFileName( const char * name, int check_last );
extern const char * DOSFS_GetDosTrueName( const char *name, int unix_format );
extern int DOSFS_GetDosFileName( const char *name, char *buffer, int len );
extern time_t DOSFS_FileTimeToUnixTime( const FILETIME *ft );
extern void DOSFS_UnixTimeToFileTime(time_t unixtime,LPFILETIME ft);
extern int DOSFS_FindNext( const char *path, const char *short_mask,
const char *long_mask, int drive, BYTE attr,
int skip, WIN32_FIND_DATA32A *entry );
#endif /* __WINE_DOS_FS_H */
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
* Drivers definitions * Drivers definitions
*/ */
#ifndef __WINE_DRIVER_H
#define __WINE_DRIVER_H
#define DRV_LOAD 0x0001 #define DRV_LOAD 0x0001
#define DRV_ENABLE 0x0002 #define DRV_ENABLE 0x0002
#define DRV_OPEN 0x0003 #define DRV_OPEN 0x0003
...@@ -64,5 +67,4 @@ HMODULE16 GetDriverModuleHandle(HDRVR16 hDriver); ...@@ -64,5 +67,4 @@ HMODULE16 GetDriverModuleHandle(HDRVR16 hDriver);
HDRVR16 GetNextDriver(HDRVR16, DWORD); HDRVR16 GetNextDriver(HDRVR16, DWORD);
BOOL16 GetDriverInfo(HDRVR16, DRIVERINFOSTRUCT16 *); BOOL16 GetDriverInfo(HDRVR16, DRIVERINFOSTRUCT16 *);
#endif /* __WINE_DRIVER_H */
...@@ -7,9 +7,23 @@ ...@@ -7,9 +7,23 @@
#ifndef __WINE_FILE_H #ifndef __WINE_FILE_H
#define __WINE_FILE_H #define __WINE_FILE_H
#include <time.h>
#include "windows.h" #include "windows.h"
#include "handle32.h" #include "handle32.h"
#define MAX_PATHNAME_LEN 1024
/* Definition of a full DOS file name */
typedef struct
{
char long_name[MAX_PATHNAME_LEN]; /* Long pathname in Unix format */
char short_name[MAX_PATHNAME_LEN]; /* Short pathname in DOS 8.3 format */
int drive;
} DOS_FULL_NAME;
#define IS_END_OF_NAME(ch) (!(ch) || ((ch) == '/') || ((ch) == '\\'))
/* files/file.c */ /* files/file.c */
extern void FILE_Destroy( K32OBJ *ptr ); extern void FILE_Destroy( K32OBJ *ptr );
extern void FILE_SetDosError(void); extern void FILE_SetDosError(void);
...@@ -29,7 +43,21 @@ extern UINT32 DIR_GetTempUnixDir( LPSTR path, UINT32 count ); ...@@ -29,7 +43,21 @@ extern UINT32 DIR_GetTempUnixDir( LPSTR path, UINT32 count );
extern UINT32 DIR_GetDosPath( INT32 element, LPSTR path, UINT32 count ); extern UINT32 DIR_GetDosPath( INT32 element, LPSTR path, UINT32 count );
extern UINT32 DIR_GetUnixPath( INT32 element, LPSTR path, UINT32 count ); extern UINT32 DIR_GetUnixPath( INT32 element, LPSTR path, UINT32 count );
extern DWORD DIR_SearchPath( LPCSTR path, LPCSTR name, LPCSTR ext, extern DWORD DIR_SearchPath( LPCSTR path, LPCSTR name, LPCSTR ext,
DWORD buflen, LPSTR buffer, LPSTR *lastpart, DOS_FULL_NAME *full_name, BOOL32 win32 );
BOOL32 win32 );
/* files/dos_fs.c */
extern void DOSFS_UnixTimeToFileTime( time_t unixtime, LPFILETIME ft,
DWORD remainder );
extern time_t DOSFS_FileTimeToUnixTime( const FILETIME *ft, DWORD *remainder );
extern BOOL32 DOSFS_ToDosFCBFormat( LPCSTR name, LPSTR buffer );
extern const char *DOSFS_IsDevice( const char *name );
extern BOOL32 DOSFS_FindUnixName( LPCSTR path, LPCSTR name, LPSTR long_buf,
INT32 long_len, LPSTR short_buf,
BOOL32 ignore_case );
extern BOOL32 DOSFS_GetFullName( LPCSTR name, BOOL32 check_last,
DOS_FULL_NAME *full );
extern int DOSFS_FindNext( const char *path, const char *short_mask,
const char *long_mask, int drive, BYTE attr,
int skip, WIN32_FIND_DATA32A *entry );
#endif /* __WINE_FILE_H */ #endif /* __WINE_FILE_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* Copyright 1993 Alexandre Julliard * Copyright 1993 Alexandre Julliard
*/ */
#ifndef GDI_H #ifndef __WINE_GDI_H
#define GDI_H #define __WINE_GDI_H
#include "windows.h" #include "windows.h"
#include "ldt.h" #include "ldt.h"
...@@ -158,14 +158,11 @@ typedef struct tagDC_FUNCS ...@@ -158,14 +158,11 @@ typedef struct tagDC_FUNCS
INT32 (*pExcludeVisRect)(DC*,INT32,INT32,INT32,INT32); INT32 (*pExcludeVisRect)(DC*,INT32,INT32,INT32,INT32);
BOOL32 (*pExtFloodFill)(DC*,INT32,INT32,COLORREF,UINT32); BOOL32 (*pExtFloodFill)(DC*,INT32,INT32,COLORREF,UINT32);
BOOL32 (*pExtTextOut)(DC*,INT32,INT32,UINT32,const RECT32*,LPCSTR,UINT32,const INT32*); BOOL32 (*pExtTextOut)(DC*,INT32,INT32,UINT32,const RECT32*,LPCSTR,UINT32,const INT32*);
BOOL32 (*pFillRgn)(DC*,HRGN32,HBRUSH32); COLORREF (*pGetPixel)(DC*,INT32,INT32);
BOOL32 (*pFloodFill)(DC*,INT32,INT32,COLORREF);
BOOL32 (*pFrameRgn)(DC*,HRGN32,HBRUSH32,INT32,INT32);
BOOL32 (*pGetTextExtentPoint)(DC*,LPCSTR,INT32,LPSIZE32); BOOL32 (*pGetTextExtentPoint)(DC*,LPCSTR,INT32,LPSIZE32);
BOOL32 (*pGetTextMetrics)(DC*,TEXTMETRIC32A*); BOOL32 (*pGetTextMetrics)(DC*,TEXTMETRIC32A*);
INT32 (*pIntersectClipRect)(DC*,INT32,INT32,INT32,INT32); INT32 (*pIntersectClipRect)(DC*,INT32,INT32,INT32,INT32);
INT32 (*pIntersectVisRect)(DC*,INT32,INT32,INT32,INT32); INT32 (*pIntersectVisRect)(DC*,INT32,INT32,INT32,INT32);
BOOL32 (*pInvertRgn)(DC*,HRGN32);
BOOL32 (*pLineTo)(DC*,INT32,INT32); BOOL32 (*pLineTo)(DC*,INT32,INT32);
BOOL32 (*pMoveToEx)(DC*,INT32,INT32,LPPOINT32); BOOL32 (*pMoveToEx)(DC*,INT32,INT32,LPPOINT32);
INT32 (*pOffsetClipRgn)(DC*,INT32,INT32); INT32 (*pOffsetClipRgn)(DC*,INT32,INT32);
...@@ -208,7 +205,6 @@ typedef struct tagDC_FUNCS ...@@ -208,7 +205,6 @@ typedef struct tagDC_FUNCS
BOOL32 (*pSetWindowOrg)(DC*,INT32,INT32); BOOL32 (*pSetWindowOrg)(DC*,INT32,INT32);
BOOL32 (*pStretchBlt)(DC*,INT32,INT32,INT32,INT32,DC*,INT32,INT32,INT32,INT32,DWORD); BOOL32 (*pStretchBlt)(DC*,INT32,INT32,INT32,INT32,DC*,INT32,INT32,INT32,INT32,DWORD);
INT32 (*pStretchDIBits)(DC*,INT32,INT32,INT32,INT32,INT32,INT32,INT32,INT32,LPSTR,LPBITMAPINFO,WORD,DWORD); INT32 (*pStretchDIBits)(DC*,INT32,INT32,INT32,INT32,INT32,INT32,INT32,INT32,LPSTR,LPBITMAPINFO,WORD,DWORD);
BOOL32 (*pTextOut)(DC*,INT32,INT32,LPCSTR,INT32);
} DC_FUNCTIONS; } DC_FUNCTIONS;
/* DC hook codes */ /* DC hook codes */
...@@ -299,4 +295,4 @@ extern Window rootWindow; ...@@ -299,4 +295,4 @@ extern Window rootWindow;
extern int screenWidth, screenHeight, screenDepth; extern int screenWidth, screenHeight, screenDepth;
extern int desktopX, desktopY; /* misc/main.c */ extern int desktopX, desktopY; /* misc/main.c */
#endif /* GDI_H */ #endif /* __WINE_GDI_H */
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