Release 950620
Mon Jun 19 20:29:50 1995 Alexandre Julliard (julliard@sunsite.unc.edu) * [debugger/*.c] Modified debugger to use segmented pointers everywhere. * [if1632/shell.spec] [if1632/sound.spec] [if1632/user.spec] Declared all functions that return only 16-bit as 'pascal16'. * [include/ldt.h] [memory/ldt.c] Export LDT_EntryToBytes (new) and LDT_BytesToEntry for DPMI. Maintain a copy of the selector flags, removing the need to make a system call to retrieve an LDT entry. * [loader/module.c] Fixed bug with module file handle cache. * [loader/ne_resource.c] Fixed file name bug in NE_AccessResource(). * [loader/resource.c] Fixed bug in LoadIcon() that caused wrong colors to be used for the icon mask. * [loader/signal.c] Moved instruction emulation to miscemu/instr.c. * [misc/dos_fs.c] [miscemu/int21.c] Lots of small fixes, thanks to Morten Welinder. * [miscemu/dpmi.c] More complete DPMI emulation. * [miscemu/instr.c] Added support for prefixes in instructions to emulate. * [miscemu/int2f.c] Use register macros instead of destroying the high part of 32-bit registers. * [objects/dc.c] Fixed bug in GetDCState() that failed to clear the new DC. * [rc/sysres.rc] Removed dialogs 11 and 12 that were never used. * [tools/build.c] 'pascal16' generated functions did not save %dx. Removed use of %fs to access the stack. %ds is no longer initialized before calling a 16-bit routine. * [windows/defwnd.c] Accept a NULL pointer as window title. * [windows/mdi.c] MDICascade: skip iconic windows. Implemented CalcChildScroll(). * [windows/utility.c] Fixed MulDiv() for illegal values. * [windows/win.c] Fixed X error in CreateWindowEx() when WM_NCCALCSIZE returned a zero width or height. Sun Jun 18 22:22:30 MET DST 1995 Fons Botman (botman@inter.nl.net) * [controls/edit.c] Fixed "uninitalized" message which -Wall couldnt see to be ok in EDIT_WriteText. * [include/debug.h] Added define for extra checks in API definitions during debugging. * [loader/ne_image.c] Added newline in NE_FixupPrologs to avoid long lines. * [misc/dos_fs.c] Added extra safety check in DOS_ValidDrive. * [misc/exec.c] Fixed definition of ExitWindows. Sun Jun 18 21:16:08 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de> * [controls/edit.c] Some fixes, mostly for memory management, but also for text selection and tab postitions. General cleanup. Notepad.exe now works. * [controls/combo.c] Fix: the hwnd field of the DRAWITEMSTRUCT should always be that of the combo box, not the ComboLBox that belongs to it. * [controls/listbox.c] Handle itemID field correctly throughout. * [memory/local.c] Implemented flag LMEM_ZEROINIT. LocalReAlloc() could trash the heap. Fixed. * [objects/font.c] FONT_MatchFont(): don't get confused by negative widths. Fixed a segfault in EnumFonts(). * [objects/text.c] DrawText(): DT_CALCRECT implies DT_NOCLIP. * [objects/dcvalues.c] MAKELONG was used with bad parameters in DC_GET_X_Y. * [windows/dialog.c] Don't show the dialog if WS_VISIBLE isn't set in the template. * [windows/utility.c] UTILITY_convertArgs(): Never pass an expression containing ++ into a macro... * [windows/win.c] SetParent() should unlink the window before changing the parent. * [windows/message.c] Don't call timer functions via CallWindowProc(), since it checks whether hwnd==0 and does not call the function in that case. * [miscemu/instr.c] Ignore interrupt 0x3D, for VBRUN300.DLL. * [misc/commdlg.c] Don't rely on the itemData field of the DRAWITEMSTRUCT to contain a pointer to the item text. * [if1632/relay.c] Disable OLE and DDEML DLLs by default, since they contain nothing but stubs anyway. SHELL, COMMDLG and WIN87EM are left enabled, although some programs may work better without them. * [multimedia/*.c] [include/multimedia.h] [include/driver.h] Begun cleaning things up a little. Replaced printfs with dprintf_ macros, made functions static where possible, and some other minor changes. Sun Jun 11 23:19:10 1995 Martin von Loewis <martin@informatik.hu-berlin.de> * [debugger/dbg.y][debugger/dbg.l] Removed special handling for FILE_IDENTIFER, because it caused problems with x/<format> statements. * [debugger/info.c] Use SC_ESP instead of SC_EIP for stack dump. * [misc/compobj.c][if1632/compobj.spec] CoBuildVersion, CoInitialize, CoUninitialize: new functions * [misc/ole2.c][if1632/ole2.spec][misc/Imakefile][include/ole2.h] New files ole2.c, ole2.h OleBuildVersion, OleInitialize, OleUninitialize: new functions * [if1632/ole2disp.spec] Added missing ordinals above 109 * [misc/ole2nls.c][if1632/ole2nls.spec][include/winnls.h] New file winnls.h GetLocaleInfoA: new function * [if1632/shell.spec] Added FindEnvironmentString as stub * [misc/olecli.c][if1632/olecli.spec] OleIsDcMeta: New function * [objects/font][misc/gdi.spec] GetKerningPairs: new function * [misc/shell.c] ShellExecute: Implemented support for starting programs * [if1632/user.spec] Inserted missing relay to GetClipCursor Sun Jun 11 20:34:47 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de> * [controls/edit.c] Fix a problem with the local heap. * [include/wintypes.h] Fixed wrong declarations of CATCHBUF and LPCATCHBUF. * [include/mdi.h] [windows/mdi.c] This code still assumed segmented address==linear address. Fixed. * [include/msdos.h] [misc/dos_fs.c] The filemask field of the dosdirent structure could be overrun. Fixed. If you had a file called foobar and a file called foo, trying to FindFile(foo) could accidentally find file foobar instead. Fixed. * [misc/file.c] OpenFile(): Always return the full pathname in ofs->szPathName. This also fixes GetModuleFilename(). Prevent _lclose() from closing stderr or stdout. * [misc/profile.c] Search for .ini files in the path of the current module as well. (Needed by Lotus Organizer.) * [loader/task.c] [loader/ne_image.c] [loader/module.c] [memory/local.c] Local heaps are now initialized by InitTask() for executables. DLLs have to call LocalInit() themselves, LocalInit() has to put the heap at the end of the segment when called with start==0. We no longer allocate the DGROUP with 64k on startup, but grow the local heap in LOCAL_GetBlock() when necessary. * [loader/module.c] LoadLibrary() should call LoadModule() in all cases, even if the DLL is already loaded, to ensure that the reference count is correct. * [loader/ne_image.c] Some changes to function prolog fixup. Does anyone know exactly how this is supposed to work? I am only guessing here. In NE_InitializeDLLs(), initialize the DLLs a module refers to before the module itself. * [loader/task.c] Initialize instance data at the beginning of the DGROUP in InitTask(). * [memory/local.c] Some fixes for moveable blocks. * [memory/selector.c] All the IsBad*Pointer() functions returned exactly the wrong boolean value in all cases! * [objects/bitblt.c] Fixed another null pointer dereference in debugging output. * [objects/font.c] Some more recovery possibilities for FONT_MatchFont() if a specified font does not exist. * [windows/win.c] The dialog code may call CreateWindowEx with an integer in windowName. This happens for static icon controls that expect a resource ID as the window name. CreateWindowEx() used to crash. Fixed. * [windows/class.c] [windows/win.c] Window classes are owned by modules, not instances. Changed RegisterClass(), UnregisterClass(), GetClassInfo() and CreateWindowEx() accordingly. Sat Jun 10 16:10:53 1995 Olaf Flebbe <o.flebbe@science-computing.uni-tuebingen.de> * [miscemu/int21.c] clock.exe was displaying incorrect year. Fri Jun 9 20:36:56 1995 Victor Schneider <tailor@crl.com> * [include/cursor.h] [windows/cursor.c] Implemented CreateCursorIconIndirect().
This commit is contained in:
parent
a2f2e01962
commit
bd34d4ff41
107 changed files with 6918 additions and 6450 deletions
21
ANNOUNCE
21
ANNOUNCE
|
@ -1,14 +1,15 @@
|
|||
This is release 950606 of Wine the MS Windows emulator. This is still a
|
||||
This is release 950620 of Wine the MS Windows emulator. This is still a
|
||||
developer's only release. There are many bugs and many unimplemented API
|
||||
features. Most applications still do not work.
|
||||
|
||||
Patches should be submitted to "wine-new@amscons.com". Please don't forget
|
||||
to include a ChangeLog entry. I'll make a new release every other Sunday.
|
||||
|
||||
WHAT'S NEW with Wine-950606: (see ChangeLog for details)
|
||||
- Lots of module fixes.
|
||||
- Better interrupt vectors emulation.
|
||||
- Stack no longer limited to 64k when calling X bitmap functions.
|
||||
WHAT'S NEW with Wine-950620: (see ChangeLog for details)
|
||||
- Many fixes to edit and listbox controls.
|
||||
- Better MDI code.
|
||||
- Many local heap fixes.
|
||||
- Some built-in DLLs are now disabled by default.
|
||||
- Lots of bug fixes.
|
||||
|
||||
See the README file in the distribution for installation instructions.
|
||||
|
@ -17,11 +18,11 @@ Because of lags created by using mirror, this message may reach you before
|
|||
the release is available at the ftp sites. The sources will be available
|
||||
from the following locations:
|
||||
|
||||
sunsite.unc.edu:/pub/Linux/ALPHA/wine/Wine-950606.tar.gz
|
||||
tsx-11.mit.edu:/pub/linux/ALPHA/Wine/development/Wine-950606.tar.gz
|
||||
ftp.infomagic.com:/pub/mirrors/linux/wine/development/Wine-950606.tar.gz
|
||||
ftp.funet.fi:/pub/OS/Linux/ALPHA/Wine/Wine-950606.tar.gz
|
||||
aris.com:/pub/linux/ALPHA/Wine/development/Wine-950606.tar.gz
|
||||
sunsite.unc.edu:/pub/Linux/ALPHA/wine/Wine-950620.tar.gz
|
||||
tsx-11.mit.edu:/pub/linux/ALPHA/Wine/development/Wine-950620.tar.gz
|
||||
ftp.infomagic.com:/pub/mirrors/linux/wine/development/Wine-950620.tar.gz
|
||||
ftp.funet.fi:/pub/OS/Linux/ALPHA/Wine/Wine-950620.tar.gz
|
||||
aris.com:/pub/linux/ALPHA/Wine/development/Wine-950620.tar.gz
|
||||
|
||||
It should also be available from any site that mirrors tsx-11 or sunsite.
|
||||
|
||||
|
|
259
ChangeLog
259
ChangeLog
|
@ -1,3 +1,262 @@
|
|||
----------------------------------------------------------------------
|
||||
Mon Jun 19 20:29:50 1995 Alexandre Julliard (julliard@sunsite.unc.edu)
|
||||
|
||||
* [debugger/*.c]
|
||||
Modified debugger to use segmented pointers everywhere.
|
||||
|
||||
* [if1632/shell.spec] [if1632/sound.spec] [if1632/user.spec]
|
||||
Declared all functions that return only 16-bit as 'pascal16'.
|
||||
|
||||
* [include/ldt.h] [memory/ldt.c]
|
||||
Export LDT_EntryToBytes (new) and LDT_BytesToEntry for DPMI.
|
||||
Maintain a copy of the selector flags, removing the need to make a
|
||||
system call to retrieve an LDT entry.
|
||||
|
||||
* [loader/module.c]
|
||||
Fixed bug with module file handle cache.
|
||||
|
||||
* [loader/ne_resource.c]
|
||||
Fixed file name bug in NE_AccessResource().
|
||||
|
||||
* [loader/resource.c]
|
||||
Fixed bug in LoadIcon() that caused wrong colors to be used for
|
||||
the icon mask.
|
||||
|
||||
* [loader/signal.c]
|
||||
Moved instruction emulation to miscemu/instr.c.
|
||||
|
||||
* [misc/dos_fs.c] [miscemu/int21.c]
|
||||
Lots of small fixes, thanks to Morten Welinder.
|
||||
|
||||
* [miscemu/dpmi.c]
|
||||
More complete DPMI emulation.
|
||||
|
||||
* [miscemu/instr.c]
|
||||
Added support for prefixes in instructions to emulate.
|
||||
|
||||
* [miscemu/int2f.c]
|
||||
Use register macros instead of destroying the high part of 32-bit
|
||||
registers.
|
||||
|
||||
* [objects/dc.c]
|
||||
Fixed bug in GetDCState() that failed to clear the new DC.
|
||||
|
||||
* [rc/sysres.rc]
|
||||
Removed dialogs 11 and 12 that were never used.
|
||||
|
||||
* [tools/build.c]
|
||||
'pascal16' generated functions did not save %dx.
|
||||
Removed use of %fs to access the stack.
|
||||
%ds is no longer initialized before calling a 16-bit routine.
|
||||
|
||||
* [windows/defwnd.c]
|
||||
Accept a NULL pointer as window title.
|
||||
|
||||
* [windows/mdi.c]
|
||||
MDICascade: skip iconic windows.
|
||||
Implemented CalcChildScroll().
|
||||
|
||||
* [windows/utility.c]
|
||||
Fixed MulDiv() for illegal values.
|
||||
|
||||
* [windows/win.c]
|
||||
Fixed X error in CreateWindowEx() when WM_NCCALCSIZE returned
|
||||
a zero width or height.
|
||||
|
||||
Sun Jun 18 22:22:30 MET DST 1995 Fons Botman (botman@inter.nl.net)
|
||||
|
||||
* [controls/edit.c]
|
||||
Fixed "uninitalized" message which -Wall couldnt see to be ok
|
||||
in EDIT_WriteText.
|
||||
|
||||
* [include/debug.h]
|
||||
Added define for extra checks in API definitions during debugging.
|
||||
|
||||
* [loader/ne_image.c]
|
||||
Added newline in NE_FixupPrologs to avoid long lines.
|
||||
|
||||
* [misc/dos_fs.c]
|
||||
Added extra safety check in DOS_ValidDrive.
|
||||
|
||||
* [misc/exec.c]
|
||||
Fixed definition of ExitWindows.
|
||||
|
||||
Sun Jun 18 21:16:08 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
|
||||
|
||||
* [controls/edit.c]
|
||||
Some fixes, mostly for memory management, but also for text selection
|
||||
and tab postitions. General cleanup. Notepad.exe now works.
|
||||
|
||||
* [controls/combo.c]
|
||||
Fix: the hwnd field of the DRAWITEMSTRUCT should always be that of
|
||||
the combo box, not the ComboLBox that belongs to it.
|
||||
|
||||
* [controls/listbox.c]
|
||||
Handle itemID field correctly throughout.
|
||||
|
||||
* [memory/local.c]
|
||||
Implemented flag LMEM_ZEROINIT.
|
||||
LocalReAlloc() could trash the heap. Fixed.
|
||||
|
||||
* [objects/font.c]
|
||||
FONT_MatchFont(): don't get confused by negative widths.
|
||||
Fixed a segfault in EnumFonts().
|
||||
|
||||
* [objects/text.c]
|
||||
DrawText(): DT_CALCRECT implies DT_NOCLIP.
|
||||
|
||||
* [objects/dcvalues.c]
|
||||
MAKELONG was used with bad parameters in DC_GET_X_Y.
|
||||
|
||||
* [windows/dialog.c]
|
||||
Don't show the dialog if WS_VISIBLE isn't set in the template.
|
||||
|
||||
* [windows/utility.c]
|
||||
UTILITY_convertArgs(): Never pass an expression containing ++ into a
|
||||
macro...
|
||||
|
||||
* [windows/win.c]
|
||||
SetParent() should unlink the window before changing the parent.
|
||||
|
||||
* [windows/message.c]
|
||||
Don't call timer functions via CallWindowProc(), since it checks
|
||||
whether hwnd==0 and does not call the function in that case.
|
||||
|
||||
* [miscemu/instr.c]
|
||||
Ignore interrupt 0x3D, for VBRUN300.DLL.
|
||||
|
||||
* [misc/commdlg.c]
|
||||
Don't rely on the itemData field of the DRAWITEMSTRUCT to contain a
|
||||
pointer to the item text.
|
||||
|
||||
* [if1632/relay.c]
|
||||
Disable OLE and DDEML DLLs by default, since they contain nothing but
|
||||
stubs anyway. SHELL, COMMDLG and WIN87EM are left enabled, although
|
||||
some programs may work better without them.
|
||||
|
||||
* [multimedia/*.c] [include/multimedia.h] [include/driver.h]
|
||||
Begun cleaning things up a little. Replaced printfs with dprintf_
|
||||
macros, made functions static where possible, and some other minor
|
||||
changes.
|
||||
|
||||
Sun Jun 11 23:19:10 1995 Martin von Loewis <martin@informatik.hu-berlin.de>
|
||||
|
||||
* [debugger/dbg.y][debugger/dbg.l]
|
||||
Removed special handling for FILE_IDENTIFER, because it caused
|
||||
problems with x/<format> statements.
|
||||
|
||||
* [debugger/info.c]
|
||||
Use SC_ESP instead of SC_EIP for stack dump.
|
||||
|
||||
* [misc/compobj.c][if1632/compobj.spec]
|
||||
CoBuildVersion, CoInitialize, CoUninitialize: new functions
|
||||
|
||||
* [misc/ole2.c][if1632/ole2.spec][misc/Imakefile][include/ole2.h]
|
||||
New files ole2.c, ole2.h
|
||||
OleBuildVersion, OleInitialize, OleUninitialize: new functions
|
||||
|
||||
* [if1632/ole2disp.spec]
|
||||
Added missing ordinals above 109
|
||||
|
||||
* [misc/ole2nls.c][if1632/ole2nls.spec][include/winnls.h]
|
||||
New file winnls.h
|
||||
GetLocaleInfoA: new function
|
||||
|
||||
* [if1632/shell.spec]
|
||||
Added FindEnvironmentString as stub
|
||||
|
||||
* [misc/olecli.c][if1632/olecli.spec]
|
||||
OleIsDcMeta: New function
|
||||
|
||||
* [objects/font][misc/gdi.spec]
|
||||
GetKerningPairs: new function
|
||||
|
||||
* [misc/shell.c]
|
||||
ShellExecute: Implemented support for starting programs
|
||||
|
||||
* [if1632/user.spec]
|
||||
Inserted missing relay to GetClipCursor
|
||||
|
||||
Sun Jun 11 20:34:47 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
|
||||
|
||||
* [controls/edit.c]
|
||||
Fix a problem with the local heap.
|
||||
|
||||
* [include/wintypes.h]
|
||||
Fixed wrong declarations of CATCHBUF and LPCATCHBUF.
|
||||
|
||||
* [include/mdi.h] [windows/mdi.c]
|
||||
This code still assumed segmented address==linear address. Fixed.
|
||||
|
||||
* [include/msdos.h] [misc/dos_fs.c]
|
||||
The filemask field of the dosdirent structure could be overrun. Fixed.
|
||||
If you had a file called foobar and a file called foo, trying to
|
||||
FindFile(foo) could accidentally find file foobar instead. Fixed.
|
||||
|
||||
* [misc/file.c]
|
||||
OpenFile(): Always return the full pathname in ofs->szPathName. This
|
||||
also fixes GetModuleFilename().
|
||||
Prevent _lclose() from closing stderr or stdout.
|
||||
|
||||
* [misc/profile.c]
|
||||
Search for .ini files in the path of the current module as well.
|
||||
(Needed by Lotus Organizer.)
|
||||
|
||||
* [loader/task.c] [loader/ne_image.c] [loader/module.c]
|
||||
[memory/local.c]
|
||||
Local heaps are now initialized by InitTask() for executables. DLLs
|
||||
have to call LocalInit() themselves, LocalInit() has to put the
|
||||
heap at the end of the segment when called with start==0. We no longer
|
||||
allocate the DGROUP with 64k on startup, but grow the local heap
|
||||
in LOCAL_GetBlock() when necessary.
|
||||
|
||||
* [loader/module.c]
|
||||
LoadLibrary() should call LoadModule() in all cases, even if the
|
||||
DLL is already loaded, to ensure that the reference count is correct.
|
||||
|
||||
* [loader/ne_image.c]
|
||||
Some changes to function prolog fixup. Does anyone know exactly how
|
||||
this is supposed to work? I am only guessing here.
|
||||
In NE_InitializeDLLs(), initialize the DLLs a module refers to before
|
||||
the module itself.
|
||||
|
||||
* [loader/task.c]
|
||||
Initialize instance data at the beginning of the DGROUP in InitTask().
|
||||
|
||||
* [memory/local.c]
|
||||
Some fixes for moveable blocks.
|
||||
|
||||
* [memory/selector.c]
|
||||
All the IsBad*Pointer() functions returned exactly the wrong boolean
|
||||
value in all cases!
|
||||
|
||||
* [objects/bitblt.c]
|
||||
Fixed another null pointer dereference in debugging output.
|
||||
|
||||
* [objects/font.c]
|
||||
Some more recovery possibilities for FONT_MatchFont() if a specified
|
||||
font does not exist.
|
||||
|
||||
* [windows/win.c]
|
||||
The dialog code may call CreateWindowEx with an integer in windowName.
|
||||
This happens for static icon controls that expect a resource ID as
|
||||
the window name. CreateWindowEx() used to crash. Fixed.
|
||||
|
||||
* [windows/class.c] [windows/win.c]
|
||||
Window classes are owned by modules, not instances. Changed
|
||||
RegisterClass(), UnregisterClass(), GetClassInfo() and CreateWindowEx()
|
||||
accordingly.
|
||||
|
||||
Sat Jun 10 16:10:53 1995 Olaf Flebbe <o.flebbe@science-computing.uni-tuebingen.de>
|
||||
|
||||
* [miscemu/int21.c]
|
||||
clock.exe was displaying incorrect year.
|
||||
|
||||
Fri Jun 9 20:36:56 1995 Victor Schneider <tailor@crl.com>
|
||||
|
||||
* [include/cursor.h] [windows/cursor.c]
|
||||
Implemented CreateCursorIconIndirect().
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Tue Jun 6 12:11:41 1995 Alexandre Julliard (julliard@sunsite.unc.edu)
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include "user.h"
|
||||
#include "win.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_COMBO */
|
||||
#include "debug.h"
|
||||
#include "graphics.h"
|
||||
#include "listbox.h"
|
||||
|
@ -791,6 +790,7 @@ static LONG CBLPaint( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
|||
PAINTSTRUCT ps;
|
||||
HBRUSH hBrush;
|
||||
HFONT hOldFont;
|
||||
HWND combohwnd = CLBoxGetCombo(hwnd);
|
||||
HDC hdc;
|
||||
RECT rect;
|
||||
int i, top, height;
|
||||
|
@ -829,15 +829,15 @@ static LONG CBLPaint( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
|||
|
||||
dprintf_listbox(stddeb,"drawing item: %d %d %d %d %d\n",rect.left,top,rect.right,top+height,lpls->itemState);
|
||||
if (OWNER_DRAWN(lphl)) {
|
||||
ListBoxDrawItem (hwnd, lphl, hdc, lpls, &lpls->itemRect, ODA_DRAWENTIRE, 0);
|
||||
ListBoxDrawItem (combohwnd, lphl, hdc, lpls, &lpls->itemRect, ODA_DRAWENTIRE, 0);
|
||||
if (lpls->itemState)
|
||||
ListBoxDrawItem (hwnd, lphl, hdc, lpls, &lpls->itemRect, ODA_SELECT, ODS_SELECTED);
|
||||
ListBoxDrawItem (combohwnd, lphl, hdc, lpls, &lpls->itemRect, ODA_SELECT, ODS_SELECTED);
|
||||
} else {
|
||||
ListBoxDrawItem (hwnd, lphl, hdc, lpls, &lpls->itemRect, ODA_DRAWENTIRE,
|
||||
ListBoxDrawItem (combohwnd, lphl, hdc, lpls, &lpls->itemRect, ODA_DRAWENTIRE,
|
||||
lpls->itemState);
|
||||
}
|
||||
if ((lphl->ItemFocused == i) && GetFocus() == hwnd)
|
||||
ListBoxDrawItem (hwnd,lphl, hdc, lpls, &lpls->itemRect, ODA_FOCUS, ODS_FOCUS);
|
||||
ListBoxDrawItem (combohwnd, lphl, hdc, lpls, &lpls->itemRect, ODA_FOCUS, ODS_FOCUS);
|
||||
|
||||
top += height;
|
||||
lphl->ItemsVisible++;
|
||||
|
@ -876,7 +876,6 @@ static LONG CBLActivate( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
|||
static LONG CBLLButtonDown( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
||||
{
|
||||
LPHEADLIST lphl = CLBoxGetListHeader(hwnd);
|
||||
WORD wRet;
|
||||
int y;
|
||||
RECT rectsel;
|
||||
|
||||
|
|
5474
controls/edit.c
5474
controls/edit.c
File diff suppressed because it is too large
Load diff
|
@ -386,8 +386,7 @@ void ListBoxAskMeasure(LPHEADLIST lphl, LPLISTSTRUCT lpls)
|
|||
|
||||
*lpmeasure = lpls->mis;
|
||||
lpmeasure->itemHeight = lphl->StdItemHeight;
|
||||
SendMessage(lphl->hParent, WM_MEASUREITEM,
|
||||
0, USER_HEAP_SEG_ADDR(hTemp));
|
||||
SendMessage(lphl->hParent, WM_MEASUREITEM, 0, USER_HEAP_SEG_ADDR(hTemp));
|
||||
|
||||
if (lphl->dwStyle & LBS_OWNERDRAWFIXED) {
|
||||
lphl->StdItemHeight = lpmeasure->itemHeight;
|
||||
|
@ -419,7 +418,7 @@ LPLISTSTRUCT ListBoxCreateItem(LPHEADLIST lphl, int id)
|
|||
|
||||
int ListBoxInsertString(LPHEADLIST lphl, UINT uIndex, LPSTR newstr)
|
||||
{
|
||||
LPLISTSTRUCT *lppls, lplsnew;
|
||||
LPLISTSTRUCT *lppls, lplsnew, lpls;
|
||||
HANDLE hStr;
|
||||
LPSTR str;
|
||||
UINT Count;
|
||||
|
@ -448,20 +447,25 @@ int ListBoxInsertString(LPHEADLIST lphl, UINT uIndex, LPSTR newstr)
|
|||
|
||||
hStr = 0;
|
||||
if (HasStrings(lphl)) {
|
||||
hStr = LIST_HEAP_ALLOC(lphl, GMEM_MOVEABLE, strlen(newstr) + 1);
|
||||
hStr = LIST_HEAP_ALLOC(lphl, LMEM_MOVEABLE, strlen(newstr) + 1);
|
||||
str = (LPSTR)LIST_HEAP_ADDR(lphl, hStr);
|
||||
if (str == NULL) return LB_ERRSPACE;
|
||||
strcpy(str, newstr);
|
||||
lplsnew->itemText = str;
|
||||
/* I'm not so sure about the next one */
|
||||
lplsnew->mis.itemData = LIST_HEAP_SEG_ADDR(lphl,hStr);
|
||||
lplsnew->mis.itemData = 0;
|
||||
} else {
|
||||
lplsnew->itemText = NULL;
|
||||
lplsnew->mis.itemData = (DWORD)newstr;
|
||||
}
|
||||
|
||||
lplsnew->mis.itemID = lphl->ItemsCount;
|
||||
lplsnew->mis.itemID = uIndex;
|
||||
lplsnew->hData = hStr;
|
||||
|
||||
/* adjust the itemID field of the following entries */
|
||||
for(lpls = lplsnew->lpNext; lpls != NULL; lpls = lpls->lpNext) {
|
||||
lpls->mis.itemID++;
|
||||
}
|
||||
|
||||
if (lphl->needMeasure) {
|
||||
ListBoxAskMeasure(lphl, lplsnew);
|
||||
|
@ -530,7 +534,7 @@ int ListBoxSetItemData(LPHEADLIST lphl, UINT uIndex, DWORD ItemData)
|
|||
|
||||
int ListBoxDeleteString(LPHEADLIST lphl, UINT uIndex)
|
||||
{
|
||||
LPLISTSTRUCT lpls;
|
||||
LPLISTSTRUCT lpls, lpls2;
|
||||
UINT Count;
|
||||
|
||||
if (uIndex >= lphl->ItemsCount) return LB_ERR;
|
||||
|
@ -548,9 +552,14 @@ int ListBoxDeleteString(LPHEADLIST lphl, UINT uIndex)
|
|||
lpls2 = lpls;
|
||||
lpls = (LPLISTSTRUCT)lpls->lpNext;
|
||||
}
|
||||
lpls2->lpNext = (LPLISTSTRUCT)lpls->lpNext;
|
||||
lpls2->lpNext = lpls->lpNext;
|
||||
}
|
||||
|
||||
/* adjust the itemID field of the following entries */
|
||||
for(lpls2 = lpls->lpNext; lpls2 != NULL; lpls2 = lpls2->lpNext) {
|
||||
lpls2->mis.itemID--;
|
||||
}
|
||||
|
||||
lphl->ItemsCount--;
|
||||
|
||||
if (lpls->hData != 0) LIST_HEAP_FREE(lphl, lpls->hData);
|
||||
|
|
|
@ -141,7 +141,7 @@ void toggle_next(int num)
|
|||
unsigned int addr;
|
||||
addr=wbp[num].addr;
|
||||
if(wbp[num].next_addr == 0)
|
||||
wbp[num].next_addr = db_disasm( addr, 0, (dbg_mode == 16) );
|
||||
wbp[num].next_addr = db_disasm( 0, addr, (dbg_mode == 16) );
|
||||
wbp[num].addr=wbp[num].next_addr;
|
||||
wbp[num].next_addr=addr;
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
#include "db_disasm.h"
|
||||
#include "ldt.h"
|
||||
|
||||
extern void print_address(unsigned int addr, FILE * outfile, int addrlen);
|
||||
extern void print_address( unsigned int seg, unsigned int addr, int addrlen );
|
||||
|
||||
/*
|
||||
* Switch to disassemble 16-bit code.
|
||||
|
@ -891,10 +891,11 @@ static int db_lengths[] = {
|
|||
10, /* EXTR */
|
||||
};
|
||||
|
||||
static unsigned int db_get_task_value(unsigned int loc, int size, int is_signed)
|
||||
static unsigned int db_get_task_value( unsigned int segment, unsigned int loc,
|
||||
int size, int is_signed)
|
||||
{
|
||||
unsigned int result;
|
||||
if (db_disasm_16) loc = (unsigned int)PTR_SEG_TO_LIN(loc);
|
||||
if (segment) loc = (unsigned int)PTR_SEG_OFF_TO_LIN( segment, loc );
|
||||
switch(size)
|
||||
{
|
||||
case 4:
|
||||
|
@ -923,8 +924,8 @@ static unsigned int db_get_task_value(unsigned int loc, int size, int is_signed)
|
|||
return result;
|
||||
}
|
||||
|
||||
#define get_value_inc(result, loc, size, is_signed) \
|
||||
result = db_get_task_value((loc), (size), (is_signed)); \
|
||||
#define get_value_inc(result, segment, loc, size, is_signed) \
|
||||
result = db_get_task_value((segment), (loc), (size), (is_signed)); \
|
||||
if (!db_disasm_16) (loc) += (size); \
|
||||
else (loc) = ((loc) & 0xffff0000) | (((loc) + (size)) & 0xffff);
|
||||
|
||||
|
@ -932,7 +933,8 @@ static unsigned int db_get_task_value(unsigned int loc, int size, int is_signed)
|
|||
* Read address at location and return updated location.
|
||||
*/
|
||||
db_addr_t
|
||||
db_read_address(loc, short_addr, regmodrm, addrp)
|
||||
db_read_address(segment, loc, short_addr, regmodrm, addrp)
|
||||
unsigned int segment;
|
||||
db_addr_t loc;
|
||||
int short_addr;
|
||||
int regmodrm;
|
||||
|
@ -957,7 +959,7 @@ db_read_address(loc, short_addr, regmodrm, addrp)
|
|||
switch (mod) {
|
||||
case 0:
|
||||
if (rm == 6) {
|
||||
get_value_inc(disp, loc, 2, TRUE);
|
||||
get_value_inc(disp, segment, loc, 2, TRUE);
|
||||
addrp->disp = disp;
|
||||
addrp->base = 0;
|
||||
}
|
||||
|
@ -967,12 +969,12 @@ db_read_address(loc, short_addr, regmodrm, addrp)
|
|||
}
|
||||
break;
|
||||
case 1:
|
||||
get_value_inc(disp, loc, 1, TRUE);
|
||||
get_value_inc(disp, segment, loc, 1, TRUE);
|
||||
addrp->disp = disp;
|
||||
addrp->base = db_index_reg_16[rm];
|
||||
break;
|
||||
case 2:
|
||||
get_value_inc(disp, loc, 2, TRUE);
|
||||
get_value_inc(disp, segment, loc, 2, TRUE);
|
||||
addrp->disp = disp;
|
||||
addrp->base = db_index_reg_16[rm];
|
||||
break;
|
||||
|
@ -980,7 +982,7 @@ db_read_address(loc, short_addr, regmodrm, addrp)
|
|||
}
|
||||
else {
|
||||
if (mod != 3 && rm == 4) {
|
||||
get_value_inc(sib, loc, 1, FALSE);
|
||||
get_value_inc(sib, segment, loc, 1, FALSE);
|
||||
rm = sib_base(sib);
|
||||
index = sib_index(sib);
|
||||
if (index != 4)
|
||||
|
@ -991,7 +993,7 @@ db_read_address(loc, short_addr, regmodrm, addrp)
|
|||
switch (mod) {
|
||||
case 0:
|
||||
if (rm == 5) {
|
||||
get_value_inc(addrp->disp, loc, 4, FALSE);
|
||||
get_value_inc(addrp->disp, segment, loc, 4, FALSE);
|
||||
addrp->base = 0;
|
||||
}
|
||||
else {
|
||||
|
@ -1001,13 +1003,13 @@ db_read_address(loc, short_addr, regmodrm, addrp)
|
|||
break;
|
||||
|
||||
case 1:
|
||||
get_value_inc(disp, loc, 1, TRUE);
|
||||
get_value_inc(disp, segment, loc, 1, TRUE);
|
||||
addrp->disp = disp;
|
||||
addrp->base = db_reg[LONG][rm];
|
||||
break;
|
||||
|
||||
case 2:
|
||||
get_value_inc(disp, loc, 4, FALSE);
|
||||
get_value_inc(disp, segment, loc, 4, FALSE);
|
||||
addrp->disp = disp;
|
||||
addrp->base = db_reg[LONG][rm];
|
||||
break;
|
||||
|
@ -1027,7 +1029,7 @@ static void db_task_printsym(unsigned int addr, int size)
|
|||
fprintf(stderr, "0x%4.4x", addr & 0xffff );
|
||||
break;
|
||||
case LONG:
|
||||
print_address(addr, stderr, db_disasm_16 ? 16 : 32);
|
||||
print_address(0, addr, db_disasm_16 ? 16 : 32);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1064,7 +1066,8 @@ db_print_address(seg, size, addrp)
|
|||
* and return updated location.
|
||||
*/
|
||||
db_addr_t
|
||||
db_disasm_esc(loc, inst, short_addr, size, seg)
|
||||
db_disasm_esc(segment, loc, inst, short_addr, size, seg)
|
||||
unsigned int segment;
|
||||
db_addr_t loc;
|
||||
int inst;
|
||||
int short_addr;
|
||||
|
@ -1077,14 +1080,14 @@ db_disasm_esc(loc, inst, short_addr, size, seg)
|
|||
struct i_addr address;
|
||||
char * name;
|
||||
|
||||
get_value_inc(regmodrm, loc, 1, FALSE);
|
||||
get_value_inc(regmodrm, segment, loc, 1, FALSE);
|
||||
fp = &db_Esc_inst[inst - 0xd8][f_reg(regmodrm)];
|
||||
mod = f_mod(regmodrm);
|
||||
if (mod != 3) {
|
||||
/*
|
||||
* Normal address modes.
|
||||
*/
|
||||
loc = db_read_address(loc, short_addr, regmodrm, &address);
|
||||
loc = db_read_address(segment,loc, short_addr, regmodrm, &address);
|
||||
fprintf(stderr,fp->f_name);
|
||||
switch(fp->f_size) {
|
||||
case SNGL:
|
||||
|
@ -1145,14 +1148,13 @@ db_disasm_esc(loc, inst, short_addr, size, seg)
|
|||
}
|
||||
|
||||
/*
|
||||
* Disassemble instruction at 'loc'. 'altfmt' specifies an
|
||||
* (optional) alternate format. Return address of start of
|
||||
* Disassemble instruction at 'loc'. Return address of start of
|
||||
* next instruction.
|
||||
*/
|
||||
db_addr_t
|
||||
db_disasm(loc, altfmt, flag16)
|
||||
db_disasm(segment, loc, flag16)
|
||||
unsigned int segment;
|
||||
db_addr_t loc;
|
||||
boolean_t altfmt;
|
||||
boolean_t flag16;
|
||||
{
|
||||
int inst;
|
||||
|
@ -1163,7 +1165,7 @@ db_disasm(loc, altfmt, flag16)
|
|||
char * i_name;
|
||||
int i_size;
|
||||
int i_mode;
|
||||
int regmodrm;
|
||||
int regmodrm = 0;
|
||||
boolean_t first;
|
||||
int displ;
|
||||
int prefix;
|
||||
|
@ -1174,7 +1176,7 @@ db_disasm(loc, altfmt, flag16)
|
|||
|
||||
db_disasm_16 = flag16;
|
||||
|
||||
get_value_inc(inst, loc, 1, FALSE);
|
||||
get_value_inc(inst, segment, loc, 1, FALSE);
|
||||
|
||||
if (db_disasm_16) {
|
||||
short_addr = TRUE;
|
||||
|
@ -1233,7 +1235,7 @@ db_disasm(loc, altfmt, flag16)
|
|||
break;
|
||||
}
|
||||
if (prefix) {
|
||||
get_value_inc(inst, loc, 1, FALSE);
|
||||
get_value_inc(inst, segment, loc, 1, FALSE);
|
||||
}
|
||||
} while (prefix);
|
||||
|
||||
|
@ -1244,7 +1246,7 @@ db_disasm(loc, altfmt, flag16)
|
|||
}
|
||||
|
||||
if (inst == 0x0f) {
|
||||
get_value_inc(inst, loc, 1, FALSE);
|
||||
get_value_inc(inst, segment, loc, 1, FALSE);
|
||||
ip = db_inst_0f[inst>>4];
|
||||
if (ip == 0) {
|
||||
ip = &db_bad_inst;
|
||||
|
@ -1257,8 +1259,8 @@ db_disasm(loc, altfmt, flag16)
|
|||
ip = &db_inst_table[inst];
|
||||
|
||||
if (ip->i_has_modrm) {
|
||||
get_value_inc(regmodrm, loc, 1, FALSE);
|
||||
loc = db_read_address(loc, short_addr, regmodrm, &address);
|
||||
get_value_inc(regmodrm, segment, loc, 1, FALSE);
|
||||
loc = db_read_address(segment,loc, short_addr, regmodrm, &address);
|
||||
}
|
||||
|
||||
i_name = ip->i_name;
|
||||
|
@ -1399,42 +1401,42 @@ db_disasm(loc, altfmt, flag16)
|
|||
|
||||
case I:
|
||||
len = db_lengths[size];
|
||||
get_value_inc(imm, loc, len, FALSE);/* unsigned */
|
||||
get_value_inc(imm, segment, loc, len, FALSE);/* unsigned */
|
||||
fprintf(stderr,"$0x%x", imm);
|
||||
break;
|
||||
|
||||
case Is:
|
||||
len = db_lengths[size];
|
||||
get_value_inc(imm, loc, len, TRUE); /* signed */
|
||||
get_value_inc(imm, segment, loc, len, TRUE); /* signed */
|
||||
fprintf(stderr,"$%d", imm);
|
||||
break;
|
||||
|
||||
case Ib:
|
||||
get_value_inc(imm, loc, 1, FALSE); /* unsigned */
|
||||
get_value_inc(imm, segment, loc, 1, FALSE); /* unsigned */
|
||||
fprintf(stderr,"$0x%x", imm);
|
||||
break;
|
||||
|
||||
case Ibs:
|
||||
get_value_inc(imm, loc, 1, TRUE); /* signed */
|
||||
get_value_inc(imm, segment, loc, 1, TRUE); /* signed */
|
||||
fprintf(stderr,"$%d", imm);
|
||||
break;
|
||||
|
||||
case Iw:
|
||||
get_value_inc(imm, loc, 2, FALSE); /* unsigned */
|
||||
get_value_inc(imm, segment, loc, 2, FALSE); /* unsigned */
|
||||
fprintf(stderr,"$0x%x", imm);
|
||||
break;
|
||||
|
||||
case Il:
|
||||
get_value_inc(imm, loc, 4, FALSE);
|
||||
get_value_inc(imm, segment, loc, 4, FALSE);
|
||||
fprintf(stderr,"$0x%x", imm);
|
||||
break;
|
||||
|
||||
case O:
|
||||
if (short_addr) {
|
||||
get_value_inc(displ, loc, 2, TRUE);
|
||||
get_value_inc(displ, segment, loc, 2, TRUE);
|
||||
}
|
||||
else {
|
||||
get_value_inc(displ, loc, 4, TRUE);
|
||||
get_value_inc(displ, segment, loc, 4, TRUE);
|
||||
}
|
||||
if (seg)
|
||||
fprintf(stderr,"%s:%d",seg, displ);
|
||||
|
@ -1444,7 +1446,7 @@ db_disasm(loc, altfmt, flag16)
|
|||
break;
|
||||
|
||||
case Db:
|
||||
get_value_inc(displ, loc, 1, TRUE);
|
||||
get_value_inc(displ, segment, loc, 1, TRUE);
|
||||
if (short_addr) {
|
||||
/* offset only affects low 16 bits */
|
||||
displ = (loc & 0xffff0000)
|
||||
|
@ -1458,13 +1460,13 @@ db_disasm(loc, altfmt, flag16)
|
|||
|
||||
case Dl:
|
||||
if (short_addr) {
|
||||
get_value_inc(displ, loc, 2, TRUE);
|
||||
get_value_inc(displ, segment, loc, 2, TRUE);
|
||||
/* offset only affects low 16 bits */
|
||||
displ = (loc & 0xffff0000)
|
||||
| ((loc + displ) & 0xffff);
|
||||
}
|
||||
else {
|
||||
get_value_inc(displ, loc, 4, TRUE);
|
||||
get_value_inc(displ, segment, loc, 4, TRUE);
|
||||
displ = displ + loc;
|
||||
}
|
||||
db_task_printsym((db_addr_t)displ,
|
||||
|
@ -1481,30 +1483,17 @@ db_disasm(loc, altfmt, flag16)
|
|||
|
||||
case OS:
|
||||
if (short_addr) {
|
||||
get_value_inc(imm, loc, 2, FALSE); /* offset */
|
||||
get_value_inc(imm, segment, loc, 2, FALSE);/* offset */
|
||||
}
|
||||
else {
|
||||
get_value_inc(imm, loc, 4, FALSE); /* offset */
|
||||
get_value_inc(imm, segment, loc, 4, FALSE);/* offset */
|
||||
}
|
||||
get_value_inc(imm2, loc, 2, FALSE); /* segment */
|
||||
if (short_addr)
|
||||
print_address( (imm2 << 16) | imm, stderr, 16 );
|
||||
else
|
||||
fprintf(stderr,"$0x%x,0x%08x", imm2, imm);
|
||||
get_value_inc(imm2, segment, loc, 2, FALSE); /* segment */
|
||||
print_address( imm2, imm, short_addr ? 16 : 32 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (altfmt == 0 && !db_disasm_16) {
|
||||
if (inst == 0xe9 || inst == 0xeb) {
|
||||
/*
|
||||
* GAS pads to longword boundary after unconditional jumps.
|
||||
*/
|
||||
#if 0
|
||||
loc = (loc + (4-1)) & ~(4-1);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return (loc);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,4 +4,5 @@
|
|||
typedef unsigned char boolean_t;
|
||||
typedef unsigned long db_addr_t;
|
||||
|
||||
extern db_addr_t db_disasm(db_addr_t loc, boolean_t altfmt, boolean_t flag16);
|
||||
extern db_addr_t db_disasm(unsigned int segment, db_addr_t loc,
|
||||
boolean_t flag16);
|
||||
|
|
|
@ -43,7 +43,6 @@ void mode_command(int);
|
|||
%token SET
|
||||
%token MODE
|
||||
%token PRINT
|
||||
%token FILE_IDENTIFIER
|
||||
%token IDENTIFIER
|
||||
%token NO_SYMBOL
|
||||
%token SYMBOLFILE
|
||||
|
@ -64,7 +63,7 @@ void mode_command(int);
|
|||
| CONT '\n' { return 0; }
|
||||
| 'c' '\n' { return 0; }
|
||||
| ABORT '\n' { kill(getpid(), SIGABRT); }
|
||||
| SYMBOLFILE FILE_IDENTIFIER '\n' { read_symboltable($2); }
|
||||
| SYMBOLFILE IDENTIFIER '\n' { read_symboltable($2); }
|
||||
| DEFINE IDENTIFIER expr '\n' { add_hash($2, 0, $3); }
|
||||
| MODE NUM { mode_command($2); }
|
||||
| ENABLE NUM { enable_break($2); }
|
||||
|
@ -82,18 +81,17 @@ deposit_command:
|
|||
|
||||
|
||||
x_command:
|
||||
'x' expr '\n' { examine_memory($2, 1, 'x'); }
|
||||
| 'x' '/' fmt expr '\n' { examine_memory($4, 1, $3); }
|
||||
| 'x' '/' NUM fmt expr '\n' { examine_memory($5, $3, $4); }
|
||||
'x' expr '\n' { examine_memory( 0xffffffff, $2, 1, 'x'); }
|
||||
| 'x' '/' fmt expr '\n' { examine_memory( 0xffffffff, $4, 1, $3); }
|
||||
| 'x' '/' NUM fmt expr '\n' { examine_memory( 0xffffffff, $5, $3, $4); }
|
||||
|
||||
print:
|
||||
'p'
|
||||
| PRINT
|
||||
|
||||
print_command:
|
||||
print expr '\n' { examine_memory(((unsigned int) &$2 ), 1, 'x'); }
|
||||
| print '/' fmt expr '\n' { examine_memory((unsigned int) &$4, 1, $3); }
|
||||
| print '/' NUM fmt expr '\n' { examine_memory((unsigned int) &$5, $3, $4); }
|
||||
print expr '\n' { examine_memory( 0, ((unsigned int) &$2 ), 1, 'x'); }
|
||||
| print '/' fmt expr '\n' { examine_memory( 0, (unsigned int) &$4, 1, $3); }
|
||||
|
||||
fmt: 'x' { $$ = 'x'; }
|
||||
| 'd' { $$ = 'd'; }
|
||||
|
@ -162,15 +160,10 @@ wine_debug(int signal, int * regs)
|
|||
yyin = stdin;
|
||||
regval = regs ? regs : dummy_regs;
|
||||
|
||||
if (SC_CS == WINE_CODE_SELECTOR)
|
||||
{
|
||||
dbg_mask = 0xffffffff;
|
||||
dbg_mode = 32;
|
||||
} else
|
||||
{
|
||||
dbg_mask = 0xffff;
|
||||
dbg_mode = 16;
|
||||
}
|
||||
if (SC_CS == WINE_CODE_SELECTOR) dbg_mode = 32;
|
||||
else dbg_mode = (GET_SEL_FLAGS(SC_CS) & LDT_FLAGS_32BIT) ? 32 : 16;
|
||||
dbg_mask = (dbg_mode == 32) ? 0xffffffff : 0xffff;
|
||||
|
||||
fprintf(stderr,"In %d bit mode.\n", dbg_mode);
|
||||
|
||||
if(dbg_mode == 32 && !loaded_symbols)
|
||||
|
@ -190,8 +183,7 @@ wine_debug(int signal, int * regs)
|
|||
unsigned int addr;
|
||||
int bpnum;
|
||||
addr = SC_EIP(dbg_mask);
|
||||
if((addr & 0xffff0000) == 0 && dbg_mode == 16)
|
||||
addr = PTR_SEG_OFF_TO_LIN( SC_CS, addr );
|
||||
if (dbg_mode == 16) addr = PTR_SEG_OFF_TO_LIN( SC_CS, addr );
|
||||
if(should_continue(bpnum=get_bpnum(addr))){
|
||||
insert_break(1);
|
||||
return;
|
||||
|
@ -201,7 +193,7 @@ wine_debug(int signal, int * regs)
|
|||
|
||||
/* Show where we crashed */
|
||||
if(regs)
|
||||
examine_memory(SC_EIP(dbg_mask), 1, 'i');
|
||||
examine_memory(0xffffffff, SC_EIP(dbg_mask), 1, 'i');
|
||||
|
||||
issue_prompt();
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@ DIGIT [0-9]
|
|||
HEXDIGIT [0-9a-fA-F]
|
||||
|
||||
IDENTIFIER [_a-zA-Z\.~][_a-zA-Z0-9\.~]*
|
||||
FILE_IDENTIFIER [_a-zA-Z\.~/][_a-zA-Z\.~/]*
|
||||
|
||||
%%
|
||||
|
||||
|
@ -120,10 +119,6 @@ q { return 'q'; }
|
|||
return IDENTIFIER;
|
||||
}
|
||||
|
||||
{FILE_IDENTIFIER} {yylval = (int) make_symbol(yytext);
|
||||
return FILE_IDENTIFIER;
|
||||
}
|
||||
|
||||
[ \t]+ /* Eat up whitespace */
|
||||
|
||||
. { if(syntax_error == 0) {
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
|
||||
struct name_hash{
|
||||
struct name_hash * next;
|
||||
unsigned short segment;
|
||||
unsigned int * address;
|
||||
unsigned int segment;
|
||||
unsigned int address;
|
||||
char * name;
|
||||
};
|
||||
|
||||
|
@ -37,7 +37,7 @@ static unsigned int name_hash(const char * name){
|
|||
}
|
||||
|
||||
|
||||
void add_hash(char * name, unsigned short segment, unsigned int * address)
|
||||
void add_hash(char * name, unsigned int segment, unsigned int address)
|
||||
{
|
||||
struct name_hash * new;
|
||||
int hash;
|
||||
|
@ -54,7 +54,7 @@ void add_hash(char * name, unsigned short segment, unsigned int * address)
|
|||
name_hash_table[hash] = new;
|
||||
}
|
||||
|
||||
unsigned int * find_hash(char * name)
|
||||
unsigned int find_hash(char * name)
|
||||
{
|
||||
char buffer[256];
|
||||
struct name_hash * nh;
|
||||
|
@ -70,32 +70,39 @@ unsigned int * find_hash(char * name)
|
|||
};
|
||||
|
||||
|
||||
return (unsigned int *) 0xffffffff;
|
||||
return 0xffffffff;
|
||||
}
|
||||
|
||||
|
||||
static char name_buffer[256];
|
||||
|
||||
char * find_nearest_symbol(unsigned int segment, unsigned int * address)
|
||||
char * find_nearest_symbol(unsigned int segment, unsigned int address)
|
||||
{
|
||||
struct name_hash * nearest;
|
||||
struct name_hash start;
|
||||
struct name_hash * nh;
|
||||
unsigned int nearest_address;
|
||||
int i;
|
||||
|
||||
nearest = &start;
|
||||
start.address = (unsigned int *) 0;
|
||||
nearest = NULL;
|
||||
nearest_address = 0;
|
||||
|
||||
for(i=0; i<NR_NAME_HASH; i++) {
|
||||
for(nh = name_hash_table[i]; nh; nh = nh->next)
|
||||
if (nh->segment == segment &&
|
||||
nh->address <= address &&
|
||||
nh->address > nearest->address) nearest = nh;
|
||||
};
|
||||
if((unsigned int) nearest->address == 0) return NULL;
|
||||
nh->address >= nearest_address)
|
||||
{
|
||||
nearest_address = nh->address;
|
||||
nearest = nh;
|
||||
}
|
||||
}
|
||||
if (!nearest) return NULL;
|
||||
|
||||
sprintf(name_buffer, "%s+0x%x", nearest->name, ((unsigned int) address) -
|
||||
((unsigned int) nearest->address));
|
||||
if (address == nearest->address)
|
||||
sprintf( name_buffer, "%s", nearest->name );
|
||||
else
|
||||
sprintf( name_buffer, "%s+0x%x", nearest->name,
|
||||
address - nearest->address );
|
||||
return name_buffer;
|
||||
}
|
||||
|
||||
|
@ -142,7 +149,7 @@ read_symboltable(char * filename){
|
|||
};
|
||||
|
||||
nargs = sscanf(buffer, "%x %c %s", &addr, &type, name);
|
||||
add_hash(name, 0, (unsigned int *) addr);
|
||||
add_hash(name, 0, addr);
|
||||
};
|
||||
fclose(symbolfile);
|
||||
}
|
||||
|
@ -172,8 +179,7 @@ void load_entrypoints( HMODULE hModule )
|
|||
sprintf( buffer, "%*.*s.%*.*s", *name, *name, name + 1,
|
||||
*cpnt, *cpnt, cpnt + 1 );
|
||||
address = MODULE_GetEntryPoint( hModule, *(WORD *)(cpnt + *cpnt + 1) );
|
||||
if (address)
|
||||
add_hash(buffer, address >> 16, (unsigned int*)(address & 0xffff));
|
||||
if (address) add_hash( buffer, HIWORD(address), LOWORD(address) );
|
||||
}
|
||||
|
||||
/* Now search the non-resident names table */
|
||||
|
@ -186,7 +192,6 @@ void load_entrypoints( HMODULE hModule )
|
|||
sprintf( buffer, "%*.*s.%*.*s", *name, *name, name + 1,
|
||||
*cpnt, *cpnt, cpnt + 1 );
|
||||
address = MODULE_GetEntryPoint( hModule, *(WORD *)(cpnt + *cpnt + 1) );
|
||||
if (address)
|
||||
add_hash(buffer, address >> 16, (unsigned int*)(address & 0xffff));
|
||||
if (address) add_hash( buffer, HIWORD(address), LOWORD(address) );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
#include "db_disasm.h"
|
||||
#include "regpos.h"
|
||||
|
||||
extern char * find_nearest_symbol( unsigned int seg, unsigned int addr );
|
||||
|
||||
extern int * regval;
|
||||
extern unsigned int dbg_mask;
|
||||
extern unsigned int dbg_mode;
|
||||
|
@ -19,29 +21,14 @@ void application_not_running()
|
|||
fprintf(stderr,"Application not running\n");
|
||||
}
|
||||
|
||||
void print_address(unsigned int addr, FILE * outfile, int addrlen)
|
||||
void print_address( unsigned int segment, unsigned int addr, int addrlen )
|
||||
{
|
||||
extern char * find_nearest_symbol(unsigned short, unsigned int *);
|
||||
char *name;
|
||||
char *name = find_nearest_symbol( segment, addr );
|
||||
|
||||
if (addrlen == 16)
|
||||
{
|
||||
name = find_nearest_symbol( addr >> 16,
|
||||
(unsigned int *)(addr & 0xffff) );
|
||||
if (name)
|
||||
fprintf( outfile, "0x%4.4x:0x%4.4x (%s)",
|
||||
addr >> 16, addr & 0xffff, name );
|
||||
else
|
||||
fprintf( outfile, "0x%4.4x:0x%4.4x", addr >> 16, addr & 0xffff );
|
||||
}
|
||||
else
|
||||
{
|
||||
name = find_nearest_symbol(0, (unsigned int *) addr);
|
||||
if(name)
|
||||
fprintf(outfile,"0x%8.8x(%s)", addr, name);
|
||||
else
|
||||
fprintf(outfile,"0x%8.8x", addr);
|
||||
}
|
||||
if (segment) fprintf( stderr, "0x%04x:", segment );
|
||||
if (addrlen == 16) fprintf( stderr, "0x%04x", addr );
|
||||
else fprintf( stderr, "0x%08x", addr );
|
||||
if (name) fprintf( stderr, " (%s)", name );
|
||||
}
|
||||
|
||||
|
||||
|
@ -82,7 +69,7 @@ void info_stack(){
|
|||
}
|
||||
|
||||
fprintf(stderr,"Stack dump:\n");
|
||||
dump = (int*) SC_EIP(dbg_mask);
|
||||
dump = (int*) SC_ESP(dbg_mask);
|
||||
for(i=0; i<22; i++)
|
||||
{
|
||||
fprintf(stderr," %8.8x", *dump++);
|
||||
|
@ -93,24 +80,28 @@ void info_stack(){
|
|||
}
|
||||
|
||||
|
||||
void examine_memory(int addr, int count, char format){
|
||||
char * pnt;
|
||||
unsigned int * dump;
|
||||
unsigned short int * wdump;
|
||||
int i;
|
||||
void examine_memory( unsigned int segment, unsigned int addr,
|
||||
int count, char format )
|
||||
{
|
||||
char * pnt;
|
||||
unsigned int * dump;
|
||||
unsigned short int * wdump;
|
||||
int i;
|
||||
|
||||
if((addr & 0xffff0000) == 0 && dbg_mode == 16)
|
||||
addr |= (format == 'i' ? SC_CS : SC_DS) << 16;
|
||||
if (segment == 0xffffffff)
|
||||
segment = (dbg_mode == 32) ? 0 : (format == 'i' ? SC_CS : SC_DS);
|
||||
|
||||
if (format != 'i' && count > 1)
|
||||
{
|
||||
print_address( segment, addr, dbg_mode );
|
||||
fprintf(stderr,": ");
|
||||
}
|
||||
|
||||
if(format != 'i' && count > 1) {
|
||||
print_address(addr, stderr, dbg_mode);
|
||||
fprintf(stderr,": ");
|
||||
};
|
||||
pnt = segment ? (char *)PTR_SEG_OFF_TO_LIN(segment,addr) : (char *)addr;
|
||||
|
||||
switch(format){
|
||||
switch(format)
|
||||
{
|
||||
case 's':
|
||||
pnt = dbg_mode == 16 ? (char *)PTR_SEG_TO_LIN(addr)
|
||||
: (char *)addr;
|
||||
if (count == 1) count = 256;
|
||||
while(*pnt && count) {
|
||||
fputc( *pnt++, stderr);
|
||||
|
@ -121,22 +112,21 @@ void examine_memory(int addr, int count, char format){
|
|||
|
||||
case 'i':
|
||||
for(i=0; i<count; i++) {
|
||||
print_address(addr, stderr, dbg_mode);
|
||||
print_address( segment, addr, dbg_mode );
|
||||
fprintf(stderr,": ");
|
||||
addr = db_disasm( addr, 0, (dbg_mode == 16) );
|
||||
addr = db_disasm( segment, addr, (dbg_mode == 16) );
|
||||
fprintf(stderr,"\n");
|
||||
};
|
||||
return;
|
||||
case 'x':
|
||||
dump = dbg_mode == 16 ? (unsigned int *)PTR_SEG_TO_LIN(addr)
|
||||
: (unsigned int *)addr;
|
||||
dump = (unsigned int *)pnt;
|
||||
for(i=0; i<count; i++)
|
||||
{
|
||||
fprintf(stderr," %8.8x", *dump++);
|
||||
addr += 4;
|
||||
if ((i % 8) == 7) {
|
||||
fprintf(stderr,"\n");
|
||||
print_address(addr, stderr, dbg_mode);
|
||||
print_address( segment, addr, dbg_mode );
|
||||
fprintf(stderr,": ");
|
||||
};
|
||||
}
|
||||
|
@ -144,15 +134,14 @@ void examine_memory(int addr, int count, char format){
|
|||
return;
|
||||
|
||||
case 'd':
|
||||
dump = dbg_mode == 16 ? (unsigned int *)PTR_SEG_TO_LIN(addr)
|
||||
: (unsigned int *)addr;
|
||||
dump = (unsigned int *)pnt;
|
||||
for(i=0; i<count; i++)
|
||||
{
|
||||
fprintf(stderr," %d", *dump++);
|
||||
addr += 4;
|
||||
if ((i % 8) == 7) {
|
||||
fprintf(stderr,"\n");
|
||||
print_address(addr, stderr, dbg_mode);
|
||||
print_address( segment, addr, dbg_mode );
|
||||
fprintf(stderr,": ");
|
||||
};
|
||||
}
|
||||
|
@ -160,15 +149,14 @@ void examine_memory(int addr, int count, char format){
|
|||
return;
|
||||
|
||||
case 'w':
|
||||
wdump = dbg_mode == 16 ? (unsigned short *)PTR_SEG_TO_LIN(addr)
|
||||
: (unsigned short *)addr;
|
||||
wdump = (unsigned short *)pnt;
|
||||
for(i=0; i<count; i++)
|
||||
{
|
||||
fprintf(stderr," %x", *wdump++);
|
||||
addr += 2;
|
||||
if ((i % 10) == 7) {
|
||||
fprintf(stderr,"\n");
|
||||
print_address(addr, stderr, dbg_mode);
|
||||
print_address( segment, addr, dbg_mode );
|
||||
fprintf(stderr,": ");
|
||||
};
|
||||
}
|
||||
|
@ -176,8 +164,6 @@ void examine_memory(int addr, int count, char format){
|
|||
return;
|
||||
|
||||
case 'c':
|
||||
pnt = dbg_mode == 16 ? (char *)PTR_SEG_TO_LIN(addr)
|
||||
: (char *)addr;
|
||||
for(i=0; i<count; i++)
|
||||
{
|
||||
if(*pnt < 0x20) {
|
||||
|
@ -188,7 +174,7 @@ void examine_memory(int addr, int count, char format){
|
|||
addr++;
|
||||
if ((i % 32) == 7) {
|
||||
fprintf(stderr,"\n");
|
||||
print_address(addr, stderr, dbg_mode);
|
||||
print_address( segment, addr, dbg_mode );
|
||||
fprintf(stderr,": ");
|
||||
};
|
||||
}
|
||||
|
@ -196,15 +182,13 @@ void examine_memory(int addr, int count, char format){
|
|||
return;
|
||||
|
||||
case 'b':
|
||||
pnt = dbg_mode == 16 ? (char *)PTR_SEG_TO_LIN(addr)
|
||||
: (char *)addr;
|
||||
for(i=0; i<count; i++)
|
||||
{
|
||||
fprintf(stderr," %02x", (*pnt++) & 0xff);
|
||||
addr++;
|
||||
if ((i % 32) == 7) {
|
||||
fprintf(stderr,"\n");
|
||||
print_address(addr, stderr, dbg_mode);
|
||||
print_address( segment, addr, dbg_mode );
|
||||
fprintf(stderr,": ");
|
||||
};
|
||||
}
|
||||
|
@ -285,7 +269,7 @@ void dbg_bt(){
|
|||
/* See if in 32 bit mode or not. Assume GDT means 32 bit. */
|
||||
if ((cs & 7) != 7) {
|
||||
fprintf(stderr,"%d ",frameno++);
|
||||
print_address(frame->u.win32.saved_ip,stderr,32);
|
||||
print_address( 0, frame->u.win32.saved_ip, 32 );
|
||||
fprintf( stderr, "\n" );
|
||||
if (!frame->u.win32.saved_ip) break;
|
||||
frame = (struct frame *) frame->u.win32.saved_bp;
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
## $Revision: 1.2 $
|
||||
##
|
||||
## OS-9 makefile for editline library.
|
||||
##
|
||||
|
||||
.SUFFIXES:
|
||||
|
||||
RFILES = editline.r complete.r sysos9.r
|
||||
|
||||
%.r: %.c
|
||||
cc68 -r -Dstrchr=index -Dstrrchr=rindex -DNEED_STRDUP -DSYS_OS9 $*.c
|
||||
|
||||
testit: testit.r editline.lib
|
||||
cc68 -f=testit testit.r -l=editline.lib
|
||||
|
||||
$(RFILES): $(RFILES:%.r=%.c)
|
||||
|
||||
editline.lib: $(RFILES)
|
||||
cat $(RFILES) >$@
|
|
@ -1,10 +0,0 @@
|
|||
/* $Revision: 1.1 $
|
||||
**
|
||||
** Editline system header file for OS-9 (on 68k).
|
||||
*/
|
||||
|
||||
#define CRLF "\r\l"
|
||||
#define FORWARD extern
|
||||
|
||||
#include <dir.h>
|
||||
typedef struct direct DIRENTRY;
|
|
@ -1,46 +0,0 @@
|
|||
/* $Revision: 1.1 $
|
||||
**
|
||||
** OS-9 system-dependant routines for editline library.
|
||||
*/
|
||||
#include "editline.h"
|
||||
#include <sgstat.h>
|
||||
#include <modes.h>
|
||||
|
||||
|
||||
void
|
||||
rl_ttyset(Reset)
|
||||
int Reset;
|
||||
{
|
||||
static struct sgbuf old;
|
||||
struct sgbuf new;
|
||||
|
||||
|
||||
if (Reset == 0) {
|
||||
_gs_opt(0, &old);
|
||||
_gs_opt(0, &new);
|
||||
new.sg_backsp = 0; new.sg_delete = 0; new.sg_echo = 0;
|
||||
new.sg_alf = 0; new.sg_nulls = 0; new.sg_pause = 0;
|
||||
new.sg_page = 0; new.sg_bspch = 0; new.sg_dlnch = 0;
|
||||
new.sg_eorch = 0; new.sg_eofch = 0; new.sg_rlnch = 0;
|
||||
new.sg_dulnch = 0; new.sg_psch = 0; new.sg_kbich = 0;
|
||||
new.sg_kbach = 0; new.sg_bsech = 0; new.sg_bellch = 0;
|
||||
new.sg_xon = 0; new.sg_xoff = 0; new.sg_tabcr = 0;
|
||||
new.sg_tabsiz = 0;
|
||||
_ss_opt(0, &new);
|
||||
rl_erase = old.sg_bspch;
|
||||
rl_kill = old.sg_dlnch;
|
||||
rl_eof = old.sg_eofch;
|
||||
rl_intr = old.sg_kbich;
|
||||
rl_quit = -1;
|
||||
}
|
||||
else
|
||||
_ss_opt(0, &old);
|
||||
}
|
||||
|
||||
void
|
||||
rl_add_slash(path, p)
|
||||
char *path;
|
||||
char *p;
|
||||
{
|
||||
(void)strcat(p, access(path, S_IREAD | S_IFDIR) ? " " : "/");
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
const char version_string[] = "1.234";
|
||||
|
||||
|
||||
static char foobar[]="foobar";
|
||||
|
||||
const char * foo_string = foobar;
|
|
@ -1,9 +1,9 @@
|
|||
name compobj
|
||||
id 22
|
||||
|
||||
1 stub COBUILDVERSION
|
||||
2 stub COINITIALIZE
|
||||
3 stub COUNINITIALIZE
|
||||
1 pascal CoBuildVersion() CoBuildVersion
|
||||
2 pascal CoInitialize(ptr) CoInitialize
|
||||
3 pascal CoUninitialize() CoUnitialize
|
||||
4 stub COGETMALLOC
|
||||
5 stub COREGISTERCLASSOBJECT
|
||||
6 stub COREVOKECLASSOBJECT
|
||||
|
|
|
@ -20,7 +20,7 @@ id 3
|
|||
17 pascal OffsetViewportOrg(word s_word s_word) OffsetViewportOrg
|
||||
18 pascal ScaleViewportExt(word s_word s_word s_word s_word) ScaleViewportExt
|
||||
19 pascal16 LineTo(word s_word s_word) LineTo
|
||||
20 pascal MoveTo(word s_word s_word) MoveTo
|
||||
20 pascal MoveTo(word s_word s_word) MoveTo
|
||||
21 pascal16 ExcludeClipRect(word s_word s_word s_word s_word) ExcludeClipRect
|
||||
22 pascal16 IntersectClipRect(word s_word s_word s_word s_word)
|
||||
IntersectClipRect
|
||||
|
@ -35,7 +35,7 @@ id 3
|
|||
RoundRect
|
||||
29 pascal16 PatBlt(word s_word s_word s_word s_word long) PatBlt
|
||||
30 pascal16 SaveDC(word) SaveDC
|
||||
31 pascal SetPixel(word s_word s_word long) SetPixel
|
||||
31 pascal SetPixel(word s_word s_word long) SetPixel
|
||||
32 pascal16 OffsetClipRgn(word s_word s_word) OffsetClipRgn
|
||||
33 pascal16 TextOut(word s_word s_word ptr word) TextOut
|
||||
34 pascal16 BitBlt( word s_word s_word s_word s_word word s_word s_word long)
|
||||
|
@ -123,7 +123,7 @@ id 3
|
|||
125 pascal16 CreateMetaFile(ptr) CreateMetaFile
|
||||
126 pascal16 CloseMetaFile(word) CloseMetaFile
|
||||
127 pascal16 DeleteMetaFile(word) DeleteMetaFile
|
||||
128 pascal MulDiv(s_word s_word s_word) MulDiv
|
||||
128 pascal16 MulDiv(s_word s_word s_word) MulDiv
|
||||
129 pascal16 SaveVisRgn(word) SaveVisRgn
|
||||
130 pascal16 RestoreVisRgn(word) RestoreVisRgn
|
||||
131 pascal16 InquireVisRgn(word) InquireVisRgn
|
||||
|
@ -212,7 +212,7 @@ id 3
|
|||
313 pascal16 GetRasterizerCaps(ptr word) GetRasterizerCaps
|
||||
314 stub EngineExtTextOut
|
||||
330 pascal16 EnumFontFamilies(word ptr segptr long) EnumFontFamilies
|
||||
332 stub GetKerningPairs
|
||||
332 pascal16 GetKerningPairs(word word ptr) GetKerningPairs
|
||||
345 pascal16 GetTextAlign(word) GetTextAlign
|
||||
346 pascal16 SetTextAlign(word word) SetTextAlign
|
||||
348 pascal16 Chord(word s_word s_word s_word s_word s_word s_word
|
||||
|
|
|
@ -211,7 +211,7 @@ id 1
|
|||
#327 K327
|
||||
328 stub _DebugOutput
|
||||
#329 K329
|
||||
332 stub THHOOK
|
||||
#332 stub THHOOK
|
||||
334 pascal16 IsBadReadPtr(segptr word) IsBadReadPtr
|
||||
335 pascal16 IsBadWritePtr(segptr word) IsBadWritePtr
|
||||
336 pascal16 IsBadCodePtr(segptr) IsBadCodePtr
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
name OLE2
|
||||
id 15
|
||||
|
||||
1 stub OLEBUILDVERSION
|
||||
2 stub OLEINITIALIZE
|
||||
3 stub OLEUNINITIALIZE
|
||||
1 stub OleBuildVersion
|
||||
2 pascal OleInitialize(ptr) OleInitialize
|
||||
3 pascal OleUninitialize() OleUninitialize
|
||||
4 stub DLLGETCLASSOBJECT
|
||||
#5 WEP
|
||||
6 stub OLEQUERYLINKFROMDATA
|
||||
|
|
|
@ -109,5 +109,30 @@ id 17
|
|||
106 stub VARBOOLFROMDISP
|
||||
107 stub DOINVOKEMETHOD
|
||||
108 stub VARIANTCHANGETYPEEX
|
||||
#109 WEP
|
||||
#110 ___EXPORTEDSTUB
|
||||
109 stub SAFEARRAYPTROFINDEX
|
||||
110 stub SETERRORINFO
|
||||
111 stub GETERRORINFO
|
||||
112 stub CREATEERRORINFO
|
||||
113 stub _IID_IERRORINFO
|
||||
114 stub _IID_ICREATEERRORINFO
|
||||
115 stub _IID_ISUPPORTERRORINFO
|
||||
116 stub VARUI1FROMI2
|
||||
117 stub VARUI1FROMI4
|
||||
118 stub VARUI1FROMR4
|
||||
119 stub VARUI1FROMR8
|
||||
120 stub VARUI1FROMCY
|
||||
121 stub VARUI1FROMDATE
|
||||
122 stub VARUI1FROMSTR
|
||||
123 stub VARUI1FROMDISP
|
||||
124 stub VARUI1FROMBOOL
|
||||
125 stub VARI2FROMUI1
|
||||
126 stub VARI4FROMUI1
|
||||
127 stub VARR4FROMUI1
|
||||
128 stub VARR8FROMUI1
|
||||
129 stub VARDATEFROMUI1
|
||||
130 stub VARCYFROMUI1
|
||||
131 stub VARBSTRFROMUI1
|
||||
132 stub VARBOOLFROMUI1
|
||||
133 stub DLLCANUNLOADNOW
|
||||
#134 stub WEP
|
||||
#135 stub ___EXPORTEDSTUB
|
||||
|
|
|
@ -5,7 +5,7 @@ id 18
|
|||
2 pascal GetSystemDefaultLCID() GetSystemDefaultLCID
|
||||
3 pascal GetUserDefaultLangID() GetUserDefaultLangID
|
||||
4 pascal GetSystemDefaultLangID() GetSystemDefaultLangID
|
||||
5 stub GETLOCALEINFOA
|
||||
5 pascal GetLocaleInfoA(long long ptr word) GetLocaleInfoA
|
||||
6 stub LCMAPSTRINGA
|
||||
7 stub GETSTRINGTYPEA
|
||||
8 stub COMPARESTRINGA
|
||||
|
|
|
@ -56,7 +56,7 @@ id 20
|
|||
57 stub OLEEXECUTE
|
||||
58 stub OLECREATEINVISIBLE
|
||||
59 stub OLEQUERYCLIENTVERSION
|
||||
60 stub OLEISDCMETA
|
||||
60 pascal16 OleIsDcMeta(word) OleIsDcMeta
|
||||
100 stub DOCWNDPROC
|
||||
101 stub SRVRWNDPROC
|
||||
102 stub MFCALLBACKFUNC
|
||||
|
|
|
@ -21,6 +21,9 @@ dprintf_relay
|
|||
#define DLL_ENTRY(name) \
|
||||
{ #name, name##_Code_Start, name##_Data_Start, \
|
||||
name##_Module_Start, name##_Module_End, TRUE, 0 }
|
||||
#define DLL_ENTRY_NOTUSED(name) \
|
||||
{ #name, name##_Code_Start, name##_Data_Start, \
|
||||
name##_Module_Start, name##_Module_End, FALSE, 0 }
|
||||
|
||||
struct dll_table_s dll_builtin_table[N_BUILTINS] =
|
||||
{
|
||||
|
@ -38,17 +41,17 @@ struct dll_table_s dll_builtin_table[N_BUILTINS] =
|
|||
DLL_ENTRY(TOOLHELP),
|
||||
DLL_ENTRY(MOUSE),
|
||||
DLL_ENTRY(COMMDLG),
|
||||
DLL_ENTRY(OLE2),
|
||||
DLL_ENTRY(OLE2CONV),
|
||||
DLL_ENTRY(OLE2DISP),
|
||||
DLL_ENTRY(OLE2NLS),
|
||||
DLL_ENTRY(OLE2PROX),
|
||||
DLL_ENTRY(OLECLI),
|
||||
DLL_ENTRY(OLESVR),
|
||||
DLL_ENTRY(COMPOBJ),
|
||||
DLL_ENTRY(STORAGE),
|
||||
DLL_ENTRY_NOTUSED(OLE2),
|
||||
DLL_ENTRY_NOTUSED(OLE2CONV),
|
||||
DLL_ENTRY_NOTUSED(OLE2DISP),
|
||||
DLL_ENTRY_NOTUSED(OLE2NLS),
|
||||
DLL_ENTRY_NOTUSED(OLE2PROX),
|
||||
DLL_ENTRY_NOTUSED(OLECLI),
|
||||
DLL_ENTRY_NOTUSED(OLESVR),
|
||||
DLL_ENTRY_NOTUSED(COMPOBJ),
|
||||
DLL_ENTRY_NOTUSED(STORAGE),
|
||||
DLL_ENTRY(WINPROCS),
|
||||
DLL_ENTRY(DDEML)
|
||||
DLL_ENTRY_NOTUSED(DDEML)
|
||||
};
|
||||
|
||||
/* don't forget to increase N_BUILTINS in dlls.h if you add a dll */
|
||||
|
@ -153,7 +156,7 @@ void RELAY_DebugCall32( char *args )
|
|||
/***********************************************************************
|
||||
* RELAY_DebugReturn
|
||||
*/
|
||||
void RELAY_DebugReturn( int short_ret, int ret_val )
|
||||
void RELAY_DebugReturn( int func_type, int ret_val )
|
||||
{
|
||||
STACK16FRAME *frame;
|
||||
struct dll_table_s *table;
|
||||
|
@ -166,8 +169,18 @@ void RELAY_DebugReturn( int short_ret, int ret_val )
|
|||
name = MODULE_GetEntryPointName( table->hModule, frame->ordinal_number );
|
||||
printf( "Ret %s.%d: %*.*s() ",
|
||||
table->name, frame->ordinal_number, *name, *name, name + 1 );
|
||||
if (short_ret) printf( "retval=0x%04x\n", ret_val & 0xffff );
|
||||
else printf( "retval=0x%08x\n", ret_val );
|
||||
switch(func_type)
|
||||
{
|
||||
case 0: /* long */
|
||||
printf( "retval=0x%08x ds=%04x\n", ret_val, frame->ds );
|
||||
break;
|
||||
case 1: /* word */
|
||||
printf( "retval=0x%04x ds=%04x\n", ret_val & 0xffff, frame->ds );
|
||||
break;
|
||||
case 2: /* regs */
|
||||
printf( "retval=none ds=%04x\n", frame->ds );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -6,27 +6,28 @@ id 5
|
|||
# proper parameters. It's just to have stub for PROGMAN.EXE ...
|
||||
#
|
||||
|
||||
1 pascal RegOpenKey(word ptr ptr) RegOpenKey
|
||||
2 pascal RegCreateKey(word ptr ptr) RegCreateKey
|
||||
3 pascal RegCloseKey(word) RegCloseKey
|
||||
4 pascal RegDeleteKey(word ptr) RegDeleteKey
|
||||
5 pascal RegSetValue(word ptr long ptr long) RegSetValue
|
||||
6 pascal RegQueryValue(word ptr ptr ptr) RegQueryValue
|
||||
7 pascal RegEnumKey(word long ptr long) RegEnumKey
|
||||
9 pascal DragAcceptFiles(word word) DragAcceptFiles
|
||||
11 pascal DragQueryFile(word s_word ptr s_word) DragQueryFile
|
||||
12 pascal DragFinish(word) DragFinish
|
||||
13 pascal DragQueryPoint(word ptr) DragQueryPoint
|
||||
20 pascal ShellExecute(word ptr ptr ptr ptr s_word) ShellExecute
|
||||
21 pascal FindExecutable(ptr ptr ptr) FindExecutable
|
||||
22 pascal ShellAbout(word ptr ptr word) ShellAbout
|
||||
33 pascal AboutDlgProc(word word word long) AboutDlgProc
|
||||
34 pascal ExtractIcon(word ptr s_word) ExtractIcon
|
||||
36 pascal ExtractAssociatedIcon(word ptr ptr) ExtractAssociatedIcon
|
||||
37 pascal DoEnvironmentSubst(ptr word) DoEnvironmentSubst
|
||||
1 pascal RegOpenKey(word ptr ptr) RegOpenKey
|
||||
2 pascal RegCreateKey(word ptr ptr) RegCreateKey
|
||||
3 pascal RegCloseKey(word) RegCloseKey
|
||||
4 pascal RegDeleteKey(word ptr) RegDeleteKey
|
||||
5 pascal RegSetValue(word ptr long ptr long) RegSetValue
|
||||
6 pascal RegQueryValue(word ptr ptr ptr) RegQueryValue
|
||||
7 pascal RegEnumKey(word long ptr long) RegEnumKey
|
||||
9 pascal16 DragAcceptFiles(word word) DragAcceptFiles
|
||||
11 pascal16 DragQueryFile(word s_word ptr s_word) DragQueryFile
|
||||
12 pascal16 DragFinish(word) DragFinish
|
||||
13 pascal16 DragQueryPoint(word ptr) DragQueryPoint
|
||||
20 pascal16 ShellExecute(word ptr ptr ptr ptr s_word) ShellExecute
|
||||
21 pascal16 FindExecutable(ptr ptr ptr) FindExecutable
|
||||
22 pascal16 ShellAbout(word ptr ptr word) ShellAbout
|
||||
33 pascal16 AboutDlgProc(word word word long) AboutDlgProc
|
||||
34 pascal16 ExtractIcon(word ptr s_word) ExtractIcon
|
||||
36 pascal16 ExtractAssociatedIcon(word ptr ptr) ExtractAssociatedIcon
|
||||
37 pascal DoEnvironmentSubst(ptr word) DoEnvironmentSubst
|
||||
38 stub FindEnvironmentString
|
||||
39 stub InternalExtractIcon
|
||||
102 pascal RegisterShellHook(ptr) RegisterShellHook
|
||||
103 pascal ShellHookProc() ShellHookProc
|
||||
102 pascal16 RegisterShellHook(ptr) RegisterShellHook
|
||||
103 pascal16 ShellHookProc() ShellHookProc
|
||||
|
||||
# 8 7 0000 WEP exported, shared data
|
||||
#100 4 0550 HERETHARBETYGARS exported, shared data
|
||||
|
|
|
@ -1,21 +1,20 @@
|
|||
name sound
|
||||
id 6
|
||||
|
||||
1 pascal OPENSOUND() OpenSound
|
||||
2 pascal CLOSESOUND() CloseSound
|
||||
3 pascal SETVOICEQUEUESIZE(word word) SetVoiceQueueSize
|
||||
4 pascal SETVOICENOTE(word word word word) SetVoiceNote
|
||||
5 pascal SETVOICEACCENT(word word word word word)
|
||||
SetVoiceAccent
|
||||
6 pascal SETVOICEENVELOPE(word word word) SetVoiceEnvelope
|
||||
7 pascal SETSOUNDNOISE(word word) SetSoundNoise
|
||||
8 pascal SETVOICESOUND(word long word) SetVoiceSound
|
||||
9 pascal STARTSOUND() StartSound
|
||||
10 pascal STOPSOUND() StopSound
|
||||
11 pascal WAITSOUNDSTATE(word) WaitSoundState
|
||||
12 pascal SYNCALLVOICES() SyncAllVoices
|
||||
13 pascal COUNTVOICENOTES(word) CountVoiceNotes
|
||||
14 pascal GETTHRESHOLDEVENT() GetThresholdEvent
|
||||
15 pascal GETTHRESHOLDSTATUS() GetThresholdStatus
|
||||
16 pascal SETVOICETHRESHOLD(word word) SetVoiceThreshold
|
||||
17 pascal DOBEEP() DoBeep
|
||||
1 pascal16 OpenSound() OpenSound
|
||||
2 pascal16 CloseSound() CloseSound
|
||||
3 pascal16 SetVoiceQueueSize(word word) SetVoiceQueueSize
|
||||
4 pascal16 SetVoiceNote(word word word word) SetVoiceNote
|
||||
5 pascal16 SetVoiceAccent(word word word word word) SetVoiceAccent
|
||||
6 pascal16 SetVoiceEnvelope(word word word) SetVoiceEnvelope
|
||||
7 pascal16 SetSoundNoise(word word) SetSoundNoise
|
||||
8 pascal16 SetVoiceSound(word long word) SetVoiceSound
|
||||
9 pascal16 StartSound() StartSound
|
||||
10 pascal16 StopSound() StopSound
|
||||
11 pascal16 WaitSoundState(word) WaitSoundState
|
||||
12 pascal16 SyncAllVoices() SyncAllVoices
|
||||
13 pascal16 CountVoiceNotes(word) CountVoiceNotes
|
||||
14 pascal GetThresholdEvent() GetThresholdEvent
|
||||
15 pascal16 GetThresholdStatus() GetThresholdStatus
|
||||
16 pascal16 SetVoiceThreshold(word word) SetVoiceThreshold
|
||||
17 pascal16 DoBeep() DoBeep
|
||||
|
|
|
@ -7,7 +7,7 @@ id 11
|
|||
4 stub EnableSystemTimers
|
||||
5 stub DisableSystemTimers
|
||||
6 pascal GetSystemmsecCount() GetTickCount
|
||||
7 stub Get80x87SaveSize
|
||||
7 return Get80x87SaveSize 0 94
|
||||
8 stub Save80x87State
|
||||
9 stub Restore80x87State
|
||||
#20 stub A20_Proc
|
||||
|
|
|
@ -29,8 +29,8 @@ id 12
|
|||
75 stub INTERRUPTREGISTER
|
||||
76 stub INTERRUPTUNREGISTER
|
||||
77 stub TERMINATEAPP
|
||||
78 pascal MemoryRead(word long ptr long) MemoryRead
|
||||
79 pascal MemoryWrite(word long ptr long) MemoryWrite
|
||||
78 pascal MemoryRead(word long ptr long) MemoryRead
|
||||
79 pascal MemoryWrite(word long ptr long) MemoryWrite
|
||||
80 stub TIMERCOUNT
|
||||
81 stub TASKSETCSIP
|
||||
82 stub TASKGETCSIP
|
||||
|
|
646
if1632/user.spec
646
if1632/user.spec
|
@ -1,424 +1,426 @@
|
|||
name user
|
||||
id 2
|
||||
|
||||
1 pascal MessageBox(word ptr ptr word) MessageBox
|
||||
1 pascal16 MessageBox(word ptr ptr word) MessageBox
|
||||
2 stub OldExitWindows
|
||||
3 stub EnableOEMLayer
|
||||
4 stub DisableOEMLayer
|
||||
5 pascal InitApp(word) USER_InitApp
|
||||
6 pascal PostQuitMessage(word) PostQuitMessage
|
||||
7 pascal ExitWindows(long word) ExitWindows
|
||||
10 pascal SetTimer(word word word segptr) SetTimer
|
||||
11 pascal SetSystemTimer(word word word segptr) SetSystemTimer
|
||||
12 pascal KillTimer(word word) KillTimer
|
||||
13 pascal GetTickCount() GetTickCount
|
||||
14 pascal GetTimerResolution() GetTimerResolution
|
||||
15 pascal GetCurrentTime() GetTickCount
|
||||
16 pascal ClipCursor(ptr) ClipCursor
|
||||
17 pascal GetCursorPos(ptr) GetCursorPos
|
||||
18 pascal SetCapture(word) SetCapture
|
||||
19 pascal ReleaseCapture() ReleaseCapture
|
||||
20 pascal SetDoubleClickTime(word) SetDoubleClickTime
|
||||
21 pascal GetDoubleClickTime() GetDoubleClickTime
|
||||
22 pascal SetFocus(word) SetFocus
|
||||
23 pascal GetFocus() GetFocus
|
||||
5 pascal16 InitApp(word) USER_InitApp
|
||||
6 pascal16 PostQuitMessage(word) PostQuitMessage
|
||||
7 pascal16 ExitWindows(long word) ExitWindows
|
||||
10 pascal16 SetTimer(word word word segptr) SetTimer
|
||||
11 pascal16 SetSystemTimer(word word word segptr) SetSystemTimer
|
||||
12 pascal16 KillTimer(word word) KillTimer
|
||||
13 pascal GetTickCount() GetTickCount
|
||||
14 pascal GetTimerResolution() GetTimerResolution
|
||||
15 pascal GetCurrentTime() GetTickCount
|
||||
16 pascal16 ClipCursor(ptr) ClipCursor
|
||||
17 pascal16 GetCursorPos(ptr) GetCursorPos
|
||||
18 pascal16 SetCapture(word) SetCapture
|
||||
19 pascal16 ReleaseCapture() ReleaseCapture
|
||||
20 pascal16 SetDoubleClickTime(word) SetDoubleClickTime
|
||||
21 pascal16 GetDoubleClickTime() GetDoubleClickTime
|
||||
22 pascal16 SetFocus(word) SetFocus
|
||||
23 pascal16 GetFocus() GetFocus
|
||||
24 pascal16 RemoveProp(word segptr) RemoveProp
|
||||
25 pascal16 GetProp(word segptr) GetProp
|
||||
26 pascal16 SetProp(word segptr word) SetProp
|
||||
27 pascal16 EnumProps(word segptr) EnumProps
|
||||
28 pascal ClientToScreen(word ptr) ClientToScreen
|
||||
29 pascal ScreenToClient(word ptr) ScreenToClient
|
||||
30 pascal WindowFromPoint(long) WindowFromPoint
|
||||
31 pascal IsIconic(word) IsIconic
|
||||
32 pascal GetWindowRect(word ptr) GetWindowRect
|
||||
33 pascal GetClientRect(word ptr) GetClientRect
|
||||
34 pascal EnableWindow(word word) EnableWindow
|
||||
35 pascal IsWindowEnabled(word) IsWindowEnabled
|
||||
36 pascal GetWindowText(word segptr word) WIN16_GetWindowText
|
||||
37 pascal SetWindowText(word segptr) WIN16_SetWindowText
|
||||
38 pascal GetWindowTextLength(word) GetWindowTextLength
|
||||
39 pascal BeginPaint(word ptr) BeginPaint
|
||||
40 pascal EndPaint(word ptr) EndPaint
|
||||
41 pascal CreateWindow(ptr ptr long s_word s_word s_word s_word
|
||||
word word word segptr) CreateWindow
|
||||
42 pascal ShowWindow(word word) ShowWindow
|
||||
43 pascal CloseWindow(word) CloseWindow
|
||||
44 pascal OpenIcon(word) OpenIcon
|
||||
45 pascal BringWindowToTop(word) BringWindowToTop
|
||||
46 pascal GetParent(word) GetParent
|
||||
47 pascal IsWindow(word) IsWindow
|
||||
48 pascal IsChild(word word) IsChild
|
||||
49 pascal IsWindowVisible(word) IsWindowVisible
|
||||
50 pascal FindWindow(ptr ptr) FindWindow
|
||||
28 pascal16 ClientToScreen(word ptr) ClientToScreen
|
||||
29 pascal16 ScreenToClient(word ptr) ScreenToClient
|
||||
30 pascal16 WindowFromPoint(long) WindowFromPoint
|
||||
31 pascal16 IsIconic(word) IsIconic
|
||||
32 pascal16 GetWindowRect(word ptr) GetWindowRect
|
||||
33 pascal16 GetClientRect(word ptr) GetClientRect
|
||||
34 pascal16 EnableWindow(word word) EnableWindow
|
||||
35 pascal16 IsWindowEnabled(word) IsWindowEnabled
|
||||
36 pascal16 GetWindowText(word segptr word) WIN16_GetWindowText
|
||||
37 pascal16 SetWindowText(word segptr) WIN16_SetWindowText
|
||||
38 pascal16 GetWindowTextLength(word) GetWindowTextLength
|
||||
39 pascal16 BeginPaint(word ptr) BeginPaint
|
||||
40 pascal16 EndPaint(word ptr) EndPaint
|
||||
41 pascal16 CreateWindow(ptr ptr long s_word s_word s_word s_word
|
||||
word word word segptr) CreateWindow
|
||||
42 pascal16 ShowWindow(word word) ShowWindow
|
||||
43 pascal16 CloseWindow(word) CloseWindow
|
||||
44 pascal16 OpenIcon(word) OpenIcon
|
||||
45 pascal16 BringWindowToTop(word) BringWindowToTop
|
||||
46 pascal16 GetParent(word) GetParent
|
||||
47 pascal16 IsWindow(word) IsWindow
|
||||
48 pascal16 IsChild(word word) IsChild
|
||||
49 pascal16 IsWindowVisible(word) IsWindowVisible
|
||||
50 pascal16 FindWindow(ptr ptr) FindWindow
|
||||
#51 BEAR51
|
||||
52 pascal AnyPopup() AnyPopup
|
||||
53 pascal DestroyWindow(word) DestroyWindow
|
||||
54 pascal EnumWindows(segptr long) EnumWindows
|
||||
55 pascal EnumChildWindows(word segptr long) EnumChildWindows
|
||||
56 pascal MoveWindow(word word word word word word) MoveWindow
|
||||
57 pascal RegisterClass(ptr) RegisterClass
|
||||
58 pascal GetClassName(word ptr word) GetClassName
|
||||
59 pascal SetActiveWindow(word) SetActiveWindow
|
||||
60 pascal GetActiveWindow() GetActiveWindow
|
||||
61 pascal ScrollWindow(word s_word s_word ptr ptr) ScrollWindow
|
||||
62 pascal SetScrollPos(word word s_word word) SetScrollPos
|
||||
63 pascal GetScrollPos(word word) GetScrollPos
|
||||
64 pascal SetScrollRange(word word s_word s_word word) SetScrollRange
|
||||
65 pascal GetScrollRange(word word ptr ptr) GetScrollRange
|
||||
66 pascal GetDC(word) GetDC
|
||||
67 pascal GetWindowDC(word) GetWindowDC
|
||||
68 pascal ReleaseDC(word word) ReleaseDC
|
||||
69 pascal SetCursor(word) SetCursor
|
||||
70 pascal SetCursorPos(word word) SetCursorPos
|
||||
71 pascal ShowCursor(word) ShowCursor
|
||||
72 pascal SetRect(ptr s_word s_word s_word s_word) SetRect
|
||||
73 pascal SetRectEmpty(ptr) SetRectEmpty
|
||||
74 pascal CopyRect(ptr ptr) CopyRect
|
||||
75 pascal IsRectEmpty(ptr) IsRectEmpty
|
||||
76 pascal PtInRect(ptr long) PtInRect
|
||||
77 pascal OffsetRect(ptr s_word s_word) OffsetRect
|
||||
78 pascal InflateRect(ptr s_word s_word) InflateRect
|
||||
79 pascal IntersectRect(ptr ptr ptr) IntersectRect
|
||||
80 pascal UnionRect(ptr ptr ptr) UnionRect
|
||||
81 pascal FillRect(word ptr word) FillRect
|
||||
82 pascal InvertRect(word ptr) InvertRect
|
||||
83 pascal FrameRect(word ptr word) FrameRect
|
||||
84 pascal DrawIcon(word s_word s_word word) DrawIcon
|
||||
85 pascal DrawText(word ptr s_word ptr word) DrawText
|
||||
52 pascal16 AnyPopup() AnyPopup
|
||||
53 pascal16 DestroyWindow(word) DestroyWindow
|
||||
54 pascal16 EnumWindows(segptr long) EnumWindows
|
||||
55 pascal16 EnumChildWindows(word segptr long) EnumChildWindows
|
||||
56 pascal16 MoveWindow(word word word word word word) MoveWindow
|
||||
57 pascal16 RegisterClass(ptr) RegisterClass
|
||||
58 pascal16 GetClassName(word ptr word) GetClassName
|
||||
59 pascal16 SetActiveWindow(word) SetActiveWindow
|
||||
60 pascal16 GetActiveWindow() GetActiveWindow
|
||||
61 pascal16 ScrollWindow(word s_word s_word ptr ptr) ScrollWindow
|
||||
62 pascal16 SetScrollPos(word word s_word word) SetScrollPos
|
||||
63 pascal16 GetScrollPos(word word) GetScrollPos
|
||||
64 pascal16 SetScrollRange(word word s_word s_word word) SetScrollRange
|
||||
65 pascal16 GetScrollRange(word word ptr ptr) GetScrollRange
|
||||
66 pascal16 GetDC(word) GetDC
|
||||
67 pascal16 GetWindowDC(word) GetWindowDC
|
||||
68 pascal16 ReleaseDC(word word) ReleaseDC
|
||||
69 pascal16 SetCursor(word) SetCursor
|
||||
70 pascal16 SetCursorPos(word word) SetCursorPos
|
||||
71 pascal16 ShowCursor(word) ShowCursor
|
||||
72 pascal16 SetRect(ptr s_word s_word s_word s_word) SetRect
|
||||
73 pascal16 SetRectEmpty(ptr) SetRectEmpty
|
||||
74 pascal16 CopyRect(ptr ptr) CopyRect
|
||||
75 pascal16 IsRectEmpty(ptr) IsRectEmpty
|
||||
76 pascal16 PtInRect(ptr long) PtInRect
|
||||
77 pascal16 OffsetRect(ptr s_word s_word) OffsetRect
|
||||
78 pascal16 InflateRect(ptr s_word s_word) InflateRect
|
||||
79 pascal16 IntersectRect(ptr ptr ptr) IntersectRect
|
||||
80 pascal16 UnionRect(ptr ptr ptr) UnionRect
|
||||
81 pascal16 FillRect(word ptr word) FillRect
|
||||
82 pascal16 InvertRect(word ptr) InvertRect
|
||||
83 pascal16 FrameRect(word ptr word) FrameRect
|
||||
84 pascal16 DrawIcon(word s_word s_word word) DrawIcon
|
||||
85 pascal16 DrawText(word ptr s_word ptr word) DrawText
|
||||
87 pascal16 DialogBox(word segptr word segptr) DialogBox
|
||||
88 pascal EndDialog(word s_word) EndDialog
|
||||
88 pascal16 EndDialog(word s_word) EndDialog
|
||||
89 pascal16 CreateDialog(word segptr word segptr) CreateDialog
|
||||
90 pascal IsDialogMessage(word ptr) IsDialogMessage
|
||||
91 pascal GetDlgItem(word word) GetDlgItem
|
||||
92 pascal SetDlgItemText(word word segptr) SetDlgItemText
|
||||
93 pascal GetDlgItemText(word word segptr word) GetDlgItemText
|
||||
94 pascal SetDlgItemInt(word word word word) SetDlgItemInt
|
||||
95 pascal GetDlgItemInt(word word ptr word) GetDlgItemInt
|
||||
96 pascal CheckRadioButton(word word word word) CheckRadioButton
|
||||
97 pascal CheckDlgButton(word word word) CheckDlgButton
|
||||
98 pascal IsDlgButtonChecked(word word) IsDlgButtonChecked
|
||||
99 pascal DlgDirSelect(word ptr word) DlgDirSelect
|
||||
100 pascal DlgDirList(word ptr word word word) DlgDirList
|
||||
101 pascal SendDlgItemMessage(word word word word long) SendDlgItemMessage
|
||||
102 pascal AdjustWindowRect(ptr long word) AdjustWindowRect
|
||||
103 pascal MapDialogRect(word ptr) MapDialogRect
|
||||
104 pascal MessageBeep(word) MessageBeep
|
||||
105 pascal FlashWindow(word word) FlashWindow
|
||||
106 pascal GetKeyState(word) GetKeyState
|
||||
107 pascal DefWindowProc(word word word long) DefWindowProc
|
||||
108 pascal GetMessage(segptr word word word) GetMessage
|
||||
109 pascal PeekMessage(ptr word word word word) PeekMessage
|
||||
110 pascal PostMessage(word word word long) PostMessage
|
||||
111 pascal SendMessage(word word word long) SendMessage
|
||||
112 pascal WaitMessage() WaitMessage
|
||||
113 pascal TranslateMessage(ptr) TranslateMessage
|
||||
114 pascal DispatchMessage(ptr) DispatchMessage
|
||||
90 pascal16 IsDialogMessage(word ptr) IsDialogMessage
|
||||
91 pascal16 GetDlgItem(word word) GetDlgItem
|
||||
92 pascal16 SetDlgItemText(word word segptr) SetDlgItemText
|
||||
93 pascal16 GetDlgItemText(word word segptr word) GetDlgItemText
|
||||
94 pascal16 SetDlgItemInt(word word word word) SetDlgItemInt
|
||||
95 pascal16 GetDlgItemInt(word word ptr word) GetDlgItemInt
|
||||
96 pascal16 CheckRadioButton(word word word word) CheckRadioButton
|
||||
97 pascal16 CheckDlgButton(word word word) CheckDlgButton
|
||||
98 pascal16 IsDlgButtonChecked(word word) IsDlgButtonChecked
|
||||
99 pascal16 DlgDirSelect(word ptr word) DlgDirSelect
|
||||
100 pascal16 DlgDirList(word ptr word word word) DlgDirList
|
||||
101 pascal SendDlgItemMessage(word word word word long) SendDlgItemMessage
|
||||
102 pascal16 AdjustWindowRect(ptr long word) AdjustWindowRect
|
||||
103 pascal16 MapDialogRect(word ptr) MapDialogRect
|
||||
104 pascal16 MessageBeep(word) MessageBeep
|
||||
105 pascal16 FlashWindow(word word) FlashWindow
|
||||
106 pascal16 GetKeyState(word) GetKeyState
|
||||
107 pascal DefWindowProc(word word word long) DefWindowProc
|
||||
108 pascal16 GetMessage(segptr word word word) GetMessage
|
||||
109 pascal16 PeekMessage(ptr word word word word) PeekMessage
|
||||
110 pascal16 PostMessage(word word word long) PostMessage
|
||||
111 pascal SendMessage(word word word long) SendMessage
|
||||
112 pascal16 WaitMessage() WaitMessage
|
||||
113 pascal16 TranslateMessage(ptr) TranslateMessage
|
||||
114 pascal DispatchMessage(ptr) DispatchMessage
|
||||
115 stub ReplyMessage
|
||||
116 pascal PostAppMessage(word word word long) PostAppMessage
|
||||
118 pascal RegisterWindowMessage(ptr) RegisterWindowMessage
|
||||
119 pascal GetMessagePos() GetMessagePos
|
||||
120 pascal GetMessageTime() GetMessageTime
|
||||
121 pascal SetWindowsHook(s_word segptr) SetWindowsHook
|
||||
122 pascal CallWindowProc(segptr word word word long) CallWindowProc
|
||||
123 pascal CallMsgFilter(segptr s_word) CallMsgFilter
|
||||
124 pascal UpdateWindow(word) UpdateWindow
|
||||
125 pascal InvalidateRect(word ptr word) InvalidateRect
|
||||
126 pascal InvalidateRgn(word word word) InvalidateRgn
|
||||
127 pascal ValidateRect(word ptr) ValidateRect
|
||||
128 pascal ValidateRgn(word word) ValidateRgn
|
||||
129 pascal GetClassWord(word s_word) GetClassWord
|
||||
130 pascal SetClassWord(word s_word word) SetClassWord
|
||||
131 pascal GetClassLong(word s_word) GetClassLong
|
||||
132 pascal SetClassLong(word s_word long) SetClassLong
|
||||
133 pascal GetWindowWord(word s_word) GetWindowWord
|
||||
134 pascal SetWindowWord(word s_word word) SetWindowWord
|
||||
135 pascal GetWindowLong(word s_word) GetWindowLong
|
||||
136 pascal SetWindowLong(word s_word long) SetWindowLong
|
||||
137 pascal OpenClipboard(word) OpenClipboard
|
||||
138 pascal CloseClipboard() CloseClipboard
|
||||
139 pascal EmptyClipboard() EmptyClipboard
|
||||
140 pascal GetClipboardOwner() GetClipboardOwner
|
||||
141 pascal SetClipboardData(word word) SetClipboardData
|
||||
142 pascal GetClipboardData(word) GetClipboardData
|
||||
143 pascal CountClipboardFormats() CountClipboardFormats
|
||||
144 pascal EnumClipboardFormats(word) EnumClipboardFormats
|
||||
145 pascal RegisterClipboardFormat(ptr) RegisterClipboardFormat
|
||||
146 pascal GetClipboardFormatName(word ptr s_word) GetClipboardFormatName
|
||||
147 pascal SetClipboardViewer(word) SetClipboardViewer
|
||||
148 pascal GetClipboardViewer() GetClipboardViewer
|
||||
149 pascal ChangeClipboardChain(word ptr) ChangeClipboardChain
|
||||
150 pascal LoadMenu(word segptr) LoadMenu
|
||||
151 pascal CreateMenu() CreateMenu
|
||||
152 pascal DestroyMenu(word) DestroyMenu
|
||||
153 pascal ChangeMenu(word word ptr word word) ChangeMenu
|
||||
154 pascal CheckMenuItem(word word word) CheckMenuItem
|
||||
155 pascal EnableMenuItem(word word word) EnableMenuItem
|
||||
156 pascal GetSystemMenu(word word) GetSystemMenu
|
||||
157 pascal GetMenu(word) GetMenu
|
||||
158 pascal SetMenu(word word) SetMenu
|
||||
159 pascal GetSubMenu(word word) GetSubMenu
|
||||
160 pascal DrawMenuBar(word) DrawMenuBar
|
||||
161 pascal GetMenuString(word word ptr s_word word) GetMenuString
|
||||
162 pascal HiliteMenuItem(word word word word) HiliteMenuItem
|
||||
163 pascal CreateCaret(word word word word) CreateCaret
|
||||
164 pascal DestroyCaret() DestroyCaret
|
||||
165 pascal SetCaretPos(word word) SetCaretPos
|
||||
166 pascal HideCaret(word) HideCaret
|
||||
167 pascal ShowCaret(word) ShowCaret
|
||||
168 pascal SetCaretBlinkTime(word) SetCaretBlinkTime
|
||||
169 pascal GetCaretBlinkTime() GetCaretBlinkTime
|
||||
170 pascal ArrangeIconicWindows(word) ArrangeIconicWindows
|
||||
171 pascal WinHelp(word ptr word long) WinHelp
|
||||
116 pascal16 PostAppMessage(word word word long) PostAppMessage
|
||||
118 pascal16 RegisterWindowMessage(ptr) RegisterWindowMessage
|
||||
119 pascal GetMessagePos() GetMessagePos
|
||||
120 pascal GetMessageTime() GetMessageTime
|
||||
121 pascal SetWindowsHook(s_word segptr) SetWindowsHook
|
||||
122 pascal CallWindowProc(segptr word word word long) CallWindowProc
|
||||
123 pascal16 CallMsgFilter(segptr s_word) CallMsgFilter
|
||||
124 pascal16 UpdateWindow(word) UpdateWindow
|
||||
125 pascal16 InvalidateRect(word ptr word) InvalidateRect
|
||||
126 pascal16 InvalidateRgn(word word word) InvalidateRgn
|
||||
127 pascal16 ValidateRect(word ptr) ValidateRect
|
||||
128 pascal16 ValidateRgn(word word) ValidateRgn
|
||||
129 pascal16 GetClassWord(word s_word) GetClassWord
|
||||
130 pascal16 SetClassWord(word s_word word) SetClassWord
|
||||
131 pascal GetClassLong(word s_word) GetClassLong
|
||||
132 pascal SetClassLong(word s_word long) SetClassLong
|
||||
133 pascal16 GetWindowWord(word s_word) GetWindowWord
|
||||
134 pascal16 SetWindowWord(word s_word word) SetWindowWord
|
||||
135 pascal GetWindowLong(word s_word) GetWindowLong
|
||||
136 pascal SetWindowLong(word s_word long) SetWindowLong
|
||||
137 pascal16 OpenClipboard(word) OpenClipboard
|
||||
138 pascal16 CloseClipboard() CloseClipboard
|
||||
139 pascal16 EmptyClipboard() EmptyClipboard
|
||||
140 pascal16 GetClipboardOwner() GetClipboardOwner
|
||||
141 pascal16 SetClipboardData(word word) SetClipboardData
|
||||
142 pascal16 GetClipboardData(word) GetClipboardData
|
||||
143 pascal16 CountClipboardFormats() CountClipboardFormats
|
||||
144 pascal16 EnumClipboardFormats(word) EnumClipboardFormats
|
||||
145 pascal16 RegisterClipboardFormat(ptr) RegisterClipboardFormat
|
||||
146 pascal16 GetClipboardFormatName(word ptr s_word) GetClipboardFormatName
|
||||
147 pascal16 SetClipboardViewer(word) SetClipboardViewer
|
||||
148 pascal16 GetClipboardViewer() GetClipboardViewer
|
||||
149 pascal16 ChangeClipboardChain(word ptr) ChangeClipboardChain
|
||||
150 pascal16 LoadMenu(word segptr) LoadMenu
|
||||
151 pascal16 CreateMenu() CreateMenu
|
||||
152 pascal16 DestroyMenu(word) DestroyMenu
|
||||
153 pascal16 ChangeMenu(word word ptr word word) ChangeMenu
|
||||
154 pascal16 CheckMenuItem(word word word) CheckMenuItem
|
||||
155 pascal16 EnableMenuItem(word word word) EnableMenuItem
|
||||
156 pascal16 GetSystemMenu(word word) GetSystemMenu
|
||||
157 pascal16 GetMenu(word) GetMenu
|
||||
158 pascal16 SetMenu(word word) SetMenu
|
||||
159 pascal16 GetSubMenu(word word) GetSubMenu
|
||||
160 pascal16 DrawMenuBar(word) DrawMenuBar
|
||||
161 pascal16 GetMenuString(word word ptr s_word word) GetMenuString
|
||||
162 pascal16 HiliteMenuItem(word word word word) HiliteMenuItem
|
||||
163 pascal16 CreateCaret(word word word word) CreateCaret
|
||||
164 pascal16 DestroyCaret() DestroyCaret
|
||||
165 pascal16 SetCaretPos(word word) SetCaretPos
|
||||
166 pascal16 HideCaret(word) HideCaret
|
||||
167 pascal16 ShowCaret(word) ShowCaret
|
||||
168 pascal16 SetCaretBlinkTime(word) SetCaretBlinkTime
|
||||
169 pascal16 GetCaretBlinkTime() GetCaretBlinkTime
|
||||
170 pascal16 ArrangeIconicWindows(word) ArrangeIconicWindows
|
||||
171 pascal16 WinHelp(word ptr word long) WinHelp
|
||||
172 stub SwitchToThisWindow
|
||||
173 pascal16 LoadCursor(word segptr) LoadCursor
|
||||
174 pascal16 LoadIcon(word segptr) LoadIcon
|
||||
175 pascal16 LoadBitmap(word segptr) LoadBitmap
|
||||
176 pascal16 LoadString(word word ptr s_word) LoadString
|
||||
177 pascal16 LoadAccelerators(word segptr) LoadAccelerators
|
||||
178 pascal TranslateAccelerator(word word ptr) TranslateAccelerator
|
||||
179 pascal GetSystemMetrics(word) GetSystemMetrics
|
||||
180 pascal GetSysColor(word) GetSysColor
|
||||
181 pascal SetSysColors(word ptr ptr) SetSysColors
|
||||
182 pascal KillSystemTimer(word word) KillSystemTimer
|
||||
183 pascal GetCaretPos(ptr) GetCaretPos
|
||||
178 pascal16 TranslateAccelerator(word word ptr) TranslateAccelerator
|
||||
179 pascal16 GetSystemMetrics(word) GetSystemMetrics
|
||||
180 pascal GetSysColor(word) GetSysColor
|
||||
181 pascal16 SetSysColors(word ptr ptr) SetSysColors
|
||||
182 pascal16 KillSystemTimer(word word) KillSystemTimer
|
||||
183 pascal16 GetCaretPos(ptr) GetCaretPos
|
||||
184 stub QuerySendMessage
|
||||
185 pascal GrayString(word word ptr ptr word word word word word) GrayString
|
||||
186 pascal SwapMouseButton(word) SwapMouseButton
|
||||
187 pascal EndMenu() EndMenu
|
||||
188 pascal SetSysModalWindow(word) SetSysModalWindow
|
||||
189 pascal GetSysModalWindow() GetSysModalWindow
|
||||
190 pascal GetUpdateRect(word ptr word) GetUpdateRect
|
||||
191 pascal ChildWindowFromPoint(word long) ChildWindowFromPoint
|
||||
185 pascal16 GrayString(word word ptr ptr word word word word word) GrayString
|
||||
186 pascal16 SwapMouseButton(word) SwapMouseButton
|
||||
187 pascal16 EndMenu() EndMenu
|
||||
188 pascal16 SetSysModalWindow(word) SetSysModalWindow
|
||||
189 pascal16 GetSysModalWindow() GetSysModalWindow
|
||||
190 pascal16 GetUpdateRect(word ptr word) GetUpdateRect
|
||||
191 pascal16 ChildWindowFromPoint(word long) ChildWindowFromPoint
|
||||
192 pascal16 InSendMessage() InSendMessage
|
||||
193 pascal IsClipboardFormatAvailable(word) IsClipboardFormatAvailable
|
||||
194 pascal DlgDirSelectComboBox(word ptr word) DlgDirSelectComboBox
|
||||
195 pascal DlgDirListComboBox(word segptr word word word) DlgDirListComboBox
|
||||
196 pascal TabbedTextOut(word s_word s_word ptr s_word s_word ptr s_word)
|
||||
TabbedTextOut
|
||||
197 pascal GetTabbedTextExtent(word ptr word word ptr) GetTabbedTextExtent
|
||||
198 pascal CascadeChildWindows(word word) CascadeChildWindows
|
||||
199 pascal TileChildWindows(word word) TileChildWindows
|
||||
200 pascal OpenComm(ptr word word) OpenComm
|
||||
201 pascal SetCommState(ptr) SetCommState
|
||||
202 pascal GetCommState(word ptr) GetCommState
|
||||
203 pascal GetCommError(word ptr) GetCommError
|
||||
204 pascal ReadComm(word ptr word) ReadComm
|
||||
205 pascal WriteComm(word ptr word) WriteComm
|
||||
206 pascal TransmitCommChar(word byte) TransmitCommChar
|
||||
207 pascal CloseComm(word) CloseComm
|
||||
208 pascal SetCommEventMask(word word) SetCommEventMask
|
||||
209 pascal GetCommEventMask(word word) GetCommEventMask
|
||||
210 pascal SetCommBreak(word) SetCommBreak
|
||||
211 pascal ClearCommBreak(word) ClearCommBreak
|
||||
212 pascal UngetCommChar(word byte) UngetCommChar
|
||||
213 pascal BuildCommDCB(ptr ptr) BuildCommDCB
|
||||
214 pascal EscapeCommFunction(word word) EscapeCommFunction
|
||||
215 pascal FlushComm(word word) FlushComm
|
||||
193 pascal16 IsClipboardFormatAvailable(word) IsClipboardFormatAvailable
|
||||
194 pascal16 DlgDirSelectComboBox(word ptr word) DlgDirSelectComboBox
|
||||
195 pascal16 DlgDirListComboBox(word segptr word word word) DlgDirListComboBox
|
||||
196 pascal TabbedTextOut(word s_word s_word ptr s_word s_word ptr s_word)
|
||||
TabbedTextOut
|
||||
197 pascal GetTabbedTextExtent(word ptr word word ptr) GetTabbedTextExtent
|
||||
198 pascal16 CascadeChildWindows(word word) CascadeChildWindows
|
||||
199 pascal16 TileChildWindows(word word) TileChildWindows
|
||||
200 pascal16 OpenComm(ptr word word) OpenComm
|
||||
201 pascal16 SetCommState(ptr) SetCommState
|
||||
202 pascal16 GetCommState(word ptr) GetCommState
|
||||
203 pascal16 GetCommError(word ptr) GetCommError
|
||||
204 pascal16 ReadComm(word ptr word) ReadComm
|
||||
205 pascal16 WriteComm(word ptr word) WriteComm
|
||||
206 pascal16 TransmitCommChar(word byte) TransmitCommChar
|
||||
207 pascal16 CloseComm(word) CloseComm
|
||||
208 pascal SetCommEventMask(word word) SetCommEventMask
|
||||
209 pascal16 GetCommEventMask(word word) GetCommEventMask
|
||||
210 pascal16 SetCommBreak(word) SetCommBreak
|
||||
211 pascal16 ClearCommBreak(word) ClearCommBreak
|
||||
212 pascal16 UngetCommChar(word byte) UngetCommChar
|
||||
213 pascal16 BuildCommDCB(ptr ptr) BuildCommDCB
|
||||
214 pascal EscapeCommFunction(word word) EscapeCommFunction
|
||||
215 pascal16 FlushComm(word word) FlushComm
|
||||
#216 USERSEEUSERDO
|
||||
217 pascal LookupMenuHandle(word s_word) LookupMenuHandle
|
||||
217 pascal16 LookupMenuHandle(word s_word) LookupMenuHandle
|
||||
218 pascal16 DialogBoxIndirect(word word word segptr) DialogBoxIndirect
|
||||
219 pascal16 CreateDialogIndirect(word ptr word segptr) CreateDialogIndirect
|
||||
220 pascal LoadMenuIndirect(ptr) LoadMenuIndirect
|
||||
221 pascal ScrollDC(word s_word s_word ptr ptr word ptr) ScrollDC
|
||||
220 pascal16 LoadMenuIndirect(ptr) LoadMenuIndirect
|
||||
221 pascal16 ScrollDC(word s_word s_word ptr ptr word ptr) ScrollDC
|
||||
222 pascal16 GetKeyboardState(ptr) GetKeyboardState
|
||||
223 pascal16 SetKeyboardState(ptr) SetKeyboardState
|
||||
224 pascal16 GetWindowTask(word) GetWindowTask
|
||||
225 pascal EnumTaskWindows(word segptr long) EnumTaskWindows
|
||||
225 pascal16 EnumTaskWindows(word segptr long) EnumTaskWindows
|
||||
226 stub LockInput
|
||||
227 pascal GetNextDlgGroupItem(word word word) GetNextDlgGroupItem
|
||||
228 pascal GetNextDlgTabItem(word word word) GetNextDlgTabItem
|
||||
229 pascal GetTopWindow(word) GetTopWindow
|
||||
230 pascal GetNextWindow(word word) GetNextWindow
|
||||
227 pascal16 GetNextDlgGroupItem(word word word) GetNextDlgGroupItem
|
||||
228 pascal16 GetNextDlgTabItem(word word word) GetNextDlgTabItem
|
||||
229 pascal16 GetTopWindow(word) GetTopWindow
|
||||
230 pascal16 GetNextWindow(word word) GetNextWindow
|
||||
231 stub GetSystemDebugState
|
||||
232 pascal SetWindowPos(word word word word word word word) SetWindowPos
|
||||
233 pascal SetParent(word word) SetParent
|
||||
234 pascal UnhookWindowsHook(s_word segptr) UnhookWindowsHook
|
||||
235 pascal DefHookProc(s_word word long ptr) DefHookProc
|
||||
236 pascal GetCapture() GetCapture
|
||||
237 pascal GetUpdateRgn(word word word) GetUpdateRgn
|
||||
238 pascal ExcludeUpdateRgn(word word) ExcludeUpdateRgn
|
||||
232 pascal16 SetWindowPos(word word word word word word word) SetWindowPos
|
||||
233 pascal16 SetParent(word word) SetParent
|
||||
234 pascal16 UnhookWindowsHook(s_word segptr) UnhookWindowsHook
|
||||
235 pascal DefHookProc(s_word word long ptr) DefHookProc
|
||||
236 pascal16 GetCapture() GetCapture
|
||||
237 pascal16 GetUpdateRgn(word word word) GetUpdateRgn
|
||||
238 pascal16 ExcludeUpdateRgn(word word) ExcludeUpdateRgn
|
||||
239 pascal16 DialogBoxParam(word segptr word segptr long) DialogBoxParam
|
||||
240 pascal16 DialogBoxIndirectParam(word word word segptr long)
|
||||
DialogBoxIndirectParam
|
||||
241 pascal16 CreateDialogParam(word segptr word segptr long) CreateDialogParam
|
||||
242 pascal16 CreateDialogIndirectParam(word ptr word segptr long)
|
||||
CreateDialogIndirectParam
|
||||
243 pascal GetDialogBaseUnits() GetDialogBaseUnits
|
||||
244 pascal EqualRect(ptr ptr) EqualRect
|
||||
243 pascal GetDialogBaseUnits() GetDialogBaseUnits
|
||||
244 pascal16 EqualRect(ptr ptr) EqualRect
|
||||
245 stub EnableCommNotification
|
||||
246 stub ExitWindowsExec
|
||||
247 pascal GetCursor() GetCursor
|
||||
248 pascal GetOpenClipboardWindow() GetOpenClipboardWindow
|
||||
249 pascal GetAsyncKeyState(word) GetAsyncKeyState
|
||||
250 pascal GetMenuState(word word word) GetMenuState
|
||||
251 pascal SendDriverMessage(word word long long) SendDriverMessage
|
||||
252 pascal OpenDriver(ptr ptr long) OpenDriver
|
||||
253 pascal CloseDriver(word word long) CloseDriver
|
||||
254 pascal GetDriverModuleHandle(word) GetDriverModuleHandle
|
||||
255 pascal DefDriverProc(long word word long long) DefDriverProc
|
||||
256 pascal GetDriverInfo(word ptr) GetDriverInfo
|
||||
257 pascal GetNextDriver(word long) GetNextDriver
|
||||
258 pascal MapWindowPoints(word word ptr word) MapWindowPoints
|
||||
247 pascal16 GetCursor() GetCursor
|
||||
248 pascal16 GetOpenClipboardWindow() GetOpenClipboardWindow
|
||||
249 pascal16 GetAsyncKeyState(word) GetAsyncKeyState
|
||||
250 pascal16 GetMenuState(word word word) GetMenuState
|
||||
251 pascal SendDriverMessage(word word long long) SendDriverMessage
|
||||
252 pascal16 OpenDriver(ptr ptr long) OpenDriver
|
||||
253 pascal CloseDriver(word word long) CloseDriver
|
||||
254 pascal16 GetDriverModuleHandle(word) GetDriverModuleHandle
|
||||
255 pascal DefDriverProc(long word word long long) DefDriverProc
|
||||
256 pascal16 GetDriverInfo(word ptr) GetDriverInfo
|
||||
257 pascal16 GetNextDriver(word long) GetNextDriver
|
||||
258 pascal16 MapWindowPoints(word word ptr word) MapWindowPoints
|
||||
259 pascal16 BeginDeferWindowPos(s_word) BeginDeferWindowPos
|
||||
260 pascal16 DeferWindowPos(word word word s_word s_word s_word s_word word)
|
||||
DeferWindowPos
|
||||
261 pascal16 EndDeferWindowPos(word) EndDeferWindowPos
|
||||
262 pascal GetWindow(word word) GetWindow
|
||||
263 pascal GetMenuItemCount(word) GetMenuItemCount
|
||||
264 pascal GetMenuItemID(word word) GetMenuItemID
|
||||
262 pascal16 GetWindow(word word) GetWindow
|
||||
263 pascal16 GetMenuItemCount(word) GetMenuItemCount
|
||||
264 pascal16 GetMenuItemID(word word) GetMenuItemID
|
||||
265 stub ShowOwnedPopups
|
||||
266 pascal SetMessageQueue(word) SetMessageQueue
|
||||
267 pascal ShowScrollBar(word word word) ShowScrollBar
|
||||
268 pascal GlobalAddAtom(ptr) GlobalAddAtom
|
||||
269 pascal GlobalDeleteAtom(word) GlobalDeleteAtom
|
||||
270 pascal GlobalFindAtom(ptr) GlobalFindAtom
|
||||
271 pascal GlobalGetAtomName(word ptr s_word) GlobalGetAtomName
|
||||
272 pascal IsZoomed(word) IsZoomed
|
||||
266 pascal16 SetMessageQueue(word) SetMessageQueue
|
||||
267 pascal16 ShowScrollBar(word word word) ShowScrollBar
|
||||
268 pascal16 GlobalAddAtom(ptr) GlobalAddAtom
|
||||
269 pascal16 GlobalDeleteAtom(word) GlobalDeleteAtom
|
||||
270 pascal16 GlobalFindAtom(ptr) GlobalFindAtom
|
||||
271 pascal16 GlobalGetAtomName(word ptr s_word) GlobalGetAtomName
|
||||
272 pascal16 IsZoomed(word) IsZoomed
|
||||
273 stub ControlPanelInfo
|
||||
274 stub GetNextQueueWindow
|
||||
275 stub RepaintScreen
|
||||
276 stub LockMyTask
|
||||
277 pascal GetDlgCtrlID(word) GetDlgCtrlID
|
||||
278 pascal GetDeskTopHwnd() GetDesktopWindow
|
||||
277 pascal16 GetDlgCtrlID(word) GetDlgCtrlID
|
||||
278 pascal16 GetDeskTopHwnd() GetDesktopWindow
|
||||
279 stub OldSetDeskPattern
|
||||
280 stub SetSystemMenu
|
||||
281 pascal GetSysColorBrush(word) GetSysColorBrush
|
||||
282 pascal SelectPalette(word word word) SelectPalette
|
||||
283 pascal RealizePalette(word) RealizePalette
|
||||
281 pascal16 GetSysColorBrush(word) GetSysColorBrush
|
||||
282 pascal16 SelectPalette(word word word) SelectPalette
|
||||
283 pascal16 RealizePalette(word) RealizePalette
|
||||
284 pascal16 GetFreeSystemResources(word) GetFreeSystemResources
|
||||
#285 BEAR285
|
||||
286 pascal GetDesktopWindow() GetDesktopWindow
|
||||
287 pascal GetLastActivePopup(word) GetLastActivePopup
|
||||
288 pascal GetMessageExtraInfo() GetMessageExtraInfo
|
||||
286 pascal16 GetDesktopWindow() GetDesktopWindow
|
||||
287 pascal16 GetLastActivePopup(word) GetLastActivePopup
|
||||
288 pascal GetMessageExtraInfo() GetMessageExtraInfo
|
||||
#289 KEYB_EVENT
|
||||
290 pascal RedrawWindow(word ptr word word) RedrawWindow
|
||||
291 pascal SetWindowsHookEx(s_word segptr word word) SetWindowsHookEx
|
||||
292 pascal UnhookWindowsHookEx(segptr) UnhookWindowsHookEx
|
||||
293 pascal CallNextHookEx(segptr s_word word long) CallNextHookEx
|
||||
290 pascal16 RedrawWindow(word ptr word word) RedrawWindow
|
||||
291 pascal SetWindowsHookEx(s_word segptr word word) SetWindowsHookEx
|
||||
292 pascal16 UnhookWindowsHookEx(segptr) UnhookWindowsHookEx
|
||||
293 pascal CallNextHookEx(segptr s_word word long) CallNextHookEx
|
||||
294 stub LockWindowUpdate
|
||||
#299 MOUSE_EVENT
|
||||
#301 BOZOSLIVEHERE :-))
|
||||
#306 BEAR306
|
||||
308 pascal DefDlgProc(word word word long) DefDlgProc
|
||||
308 pascal DefDlgProc(word word word long) DefDlgProc
|
||||
309 pascal16 GetClipCursor(ptr) GetClipCursor
|
||||
314 stub SignalProc
|
||||
319 pascal ScrollWindowEx(word s_word s_word ptr ptr word ptr word)
|
||||
ScrollWindowEx
|
||||
319 pascal16 ScrollWindowEx(word s_word s_word ptr ptr word ptr word)
|
||||
ScrollWindowEx
|
||||
320 stub SysErrorBox
|
||||
321 stub SetEventHook
|
||||
322 stub WinOldAppHackOMatic
|
||||
323 stub GetMessage2
|
||||
324 pascal FillWindow(word word word word) FillWindow
|
||||
325 pascal PaintRect(word word word word ptr) PaintRect
|
||||
324 pascal16 FillWindow(word word word word) FillWindow
|
||||
325 pascal16 PaintRect(word word word word ptr) PaintRect
|
||||
326 pascal16 GetControlBrush(word word word) GetControlBrush
|
||||
331 pascal EnableHardwareInput(word) EnableHardwareInput
|
||||
331 pascal16 EnableHardwareInput(word) EnableHardwareInput
|
||||
332 return UserYield 0 0
|
||||
333 stub IsUserIdle
|
||||
334 pascal GetQueueStatus(word) GetQueueStatus
|
||||
335 pascal GetInputState() GetInputState
|
||||
334 pascal GetQueueStatus(word) GetQueueStatus
|
||||
335 pascal16 GetInputState() GetInputState
|
||||
336 stub LoadCursorIconHandler
|
||||
337 stub GetMouseEventProc
|
||||
#341 _FFFE_FARFRAME
|
||||
343 stub GetFilePortName
|
||||
356 stub LoadDIBCursorHandler
|
||||
357 stub LoadDIBIconHandler
|
||||
358 pascal IsMenu(word) IsMenu
|
||||
359 pascal GetDCEx(word word long) GetDCEx
|
||||
358 pascal16 IsMenu(word) IsMenu
|
||||
359 pascal16 GetDCEx(word word long) GetDCEx
|
||||
362 stub DCHook
|
||||
368 stub CopyIcon
|
||||
369 stub CopyCursor
|
||||
370 pascal GetWindowPlacement(word ptr) GetWindowPlacement
|
||||
371 pascal SetWindowPlacement(word ptr) SetWindowPlacement
|
||||
370 pascal16 GetWindowPlacement(word ptr) GetWindowPlacement
|
||||
371 pascal16 SetWindowPlacement(word ptr) SetWindowPlacement
|
||||
372 stub GetInternalIconHeader
|
||||
373 pascal SubtractRect(ptr ptr ptr) SubtractRect
|
||||
373 pascal16 SubtractRect(ptr ptr ptr) SubtractRect
|
||||
400 stub FinalUserInit
|
||||
402 pascal GetPriorityClipboardFormat(word ptr s_word)
|
||||
GetPriorityClipboardFormat
|
||||
403 pascal UnregisterClass(ptr word) UnregisterClass
|
||||
404 pascal GetClassInfo(word segptr ptr) GetClassInfo
|
||||
406 pascal CreateCursor(word word word word word ptr ptr) CreateCursor
|
||||
407 pascal CreateIcon(word word word byte byte ptr ptr) CreateIcon
|
||||
408 stub CreateCursorIconIndirect
|
||||
410 pascal InsertMenu(word word word word ptr) InsertMenu
|
||||
411 pascal AppendMenu(word word word ptr) AppendMenu
|
||||
412 pascal RemoveMenu(word word word) RemoveMenu
|
||||
413 pascal DeleteMenu(word word word) DeleteMenu
|
||||
414 pascal ModifyMenu(word word word word ptr) ModifyMenu
|
||||
415 pascal CreatePopupMenu() CreatePopupMenu
|
||||
416 pascal TrackPopupMenu(word word word word word word ptr) TrackPopupMenu
|
||||
417 pascal GetMenuCheckMarkDimensions() GetMenuCheckMarkDimensions
|
||||
418 pascal SetMenuItemBitmaps(word word word word word) SetMenuItemBitmaps
|
||||
420 pascal wsprintf() windows_wsprintf
|
||||
402 pascal16 GetPriorityClipboardFormat(word ptr s_word)
|
||||
GetPriorityClipboardFormat
|
||||
403 pascal16 UnregisterClass(ptr word) UnregisterClass
|
||||
404 pascal16 GetClassInfo(word segptr ptr) GetClassInfo
|
||||
406 pascal16 CreateCursor(word word word word word ptr ptr) CreateCursor
|
||||
407 pascal16 CreateIcon(word word word byte byte ptr ptr) CreateIcon
|
||||
408 pascal16 CreateCursorIconIndirect(word ptr ptr ptr)
|
||||
CreateCursorIconIndirect
|
||||
410 pascal16 InsertMenu(word word word word ptr) InsertMenu
|
||||
411 pascal16 AppendMenu(word word word ptr) AppendMenu
|
||||
412 pascal16 RemoveMenu(word word word) RemoveMenu
|
||||
413 pascal16 DeleteMenu(word word word) DeleteMenu
|
||||
414 pascal16 ModifyMenu(word word word word ptr) ModifyMenu
|
||||
415 pascal16 CreatePopupMenu() CreatePopupMenu
|
||||
416 pascal16 TrackPopupMenu(word word word word word word ptr) TrackPopupMenu
|
||||
417 pascal GetMenuCheckMarkDimensions() GetMenuCheckMarkDimensions
|
||||
418 pascal16 SetMenuItemBitmaps(word word word word word) SetMenuItemBitmaps
|
||||
420 pascal16 wsprintf() windows_wsprintf
|
||||
# windows_wsprintf() handles arguments itself, as libc can't handle an
|
||||
# 16-bit stack. DLLRelay() will pass 16-bit stack pointer as 1st arg.
|
||||
421 pascal wvsprintf(ptr ptr ptr) wvsprintf
|
||||
421 pascal16 wvsprintf(ptr ptr ptr) wvsprintf
|
||||
422 stub DlgDirSelectEx
|
||||
423 stub DlgDirSelectComboBoxEx
|
||||
430 pascal16 lstrcmp(ptr ptr) lstrcmp
|
||||
431 pascal AnsiUpper(segptr) WIN16_AnsiUpper
|
||||
432 pascal AnsiLower(segptr) WIN16_AnsiLower
|
||||
431 pascal AnsiUpper(segptr) WIN16_AnsiUpper
|
||||
432 pascal AnsiLower(segptr) WIN16_AnsiLower
|
||||
433 pascal16 IsCharAlpha(byte) IsCharAlpha
|
||||
434 pascal16 IsCharAlphanumeric(byte) IsCharAlphanumeric
|
||||
435 pascal16 IsCharUpper(byte) IsCharUpper
|
||||
436 pascal16 IsCharLower(byte) IsCharLower
|
||||
437 pascal16 AnsiUpperBuff(ptr word) AnsiUpperBuff
|
||||
438 pascal16 AnsiLowerBuff(ptr word) AnsiLowerBuff
|
||||
445 pascal DefFrameProc(word word word word long) DefFrameProc
|
||||
447 pascal DefMDIChildProc(word word word long) DefMDIChildProc
|
||||
451 pascal TranslateMDISysAccel(word ptr) TranslateMDISysAccel
|
||||
452 pascal CreateWindowEx(long ptr ptr long s_word s_word s_word s_word
|
||||
word word word segptr) CreateWindowEx
|
||||
454 pascal AdjustWindowRectEx(ptr long word long) AdjustWindowRectEx
|
||||
445 pascal DefFrameProc(word word word word long) DefFrameProc
|
||||
447 pascal DefMDIChildProc(word word word long) DefMDIChildProc
|
||||
451 pascal16 TranslateMDISysAccel(word ptr) TranslateMDISysAccel
|
||||
452 pascal16 CreateWindowEx(long ptr ptr long s_word s_word s_word s_word
|
||||
word word word segptr) CreateWindowEx
|
||||
454 pascal16 AdjustWindowRectEx(ptr long word long) AdjustWindowRectEx
|
||||
455 stub GetIconId
|
||||
456 stub LoadIconHandler
|
||||
457 pascal DestroyIcon(word) DestroyIcon
|
||||
458 pascal DestroyCursor(word) DestroyCursor
|
||||
459 pascal DumpIcon(ptr ptr ptr ptr) DumpIcon
|
||||
460 pascal GetInternalWindowPos(word ptr ptr) GetInternalWindowPos
|
||||
461 pascal SetInternalWindowPos(word word ptr ptr) SetInternalWindowPos
|
||||
462 stub CalcChildScroll
|
||||
457 pascal16 DestroyIcon(word) DestroyIcon
|
||||
458 pascal16 DestroyCursor(word) DestroyCursor
|
||||
459 pascal DumpIcon(ptr ptr ptr ptr) DumpIcon
|
||||
460 pascal16 GetInternalWindowPos(word ptr ptr) GetInternalWindowPos
|
||||
461 pascal16 SetInternalWindowPos(word word ptr ptr) SetInternalWindowPos
|
||||
462 pascal16 CalcChildScroll(word word) CalcChildScroll
|
||||
463 stub ScrollChildren
|
||||
464 stub DragObject
|
||||
465 stub DragDetect
|
||||
466 pascal DrawFocusRect(word ptr) DrawFocusRect
|
||||
466 pascal16 DrawFocusRect(word ptr) DrawFocusRect
|
||||
470 stub StringFunc
|
||||
471 pascal16 lstrcmpi(ptr ptr) lstrcmpi
|
||||
472 pascal AnsiNext(segptr) AnsiNext
|
||||
473 pascal AnsiPrev(segptr segptr) AnsiPrev
|
||||
472 pascal AnsiNext(segptr) AnsiNext
|
||||
473 pascal AnsiPrev(segptr segptr) AnsiPrev
|
||||
480 stub GetUserLocalObjType
|
||||
#481 HARDWARE_EVENT
|
||||
482 pascal16 EnableScrollBar(word word word) EnableScrollBar
|
||||
483 pascal SystemParametersInfo(word word ptr word) SystemParametersInfo
|
||||
483 pascal16 SystemParametersInfo(word word ptr word) SystemParametersInfo
|
||||
#484 __GP
|
||||
499 pascal WNetErrorText(word ptr word) WNetErrorText
|
||||
501 pascal WNetOpenJob(ptr ptr word ptr) WNetOpenJob
|
||||
502 pascal WNetCloseJob(word ptr ptr) WNetCloseJob
|
||||
503 pascal WNetAbortJob(ptr word) WNetAbortJob
|
||||
504 pascal WNetHoldJob(ptr word) WNetHoldJob
|
||||
505 pascal WNetReleaseJob(ptr word) WNetReleaseJob
|
||||
506 pascal WNetCancelJob(ptr word) WNetCancelJob
|
||||
507 pascal WNetSetJobCopies(ptr word word) WNetSetJobCopies
|
||||
508 pascal WNetWatchQueue(word ptr ptr word) WNetWatchQueue
|
||||
509 pascal WNetUnwatchQueue(word ptr ptr word) WNetUnwatchQueue
|
||||
510 pascal WNetLockQueueData(ptr ptr ptr) WNetLockQueueData
|
||||
511 pascal WNetUnlockQueueData(ptr) WNetUnlockQueueData
|
||||
499 pascal16 WNetErrorText(word ptr word) WNetErrorText
|
||||
501 pascal16 WNetOpenJob(ptr ptr word ptr) WNetOpenJob
|
||||
502 pascal16 WNetCloseJob(word ptr ptr) WNetCloseJob
|
||||
503 pascal16 WNetAbortJob(ptr word) WNetAbortJob
|
||||
504 pascal16 WNetHoldJob(ptr word) WNetHoldJob
|
||||
505 pascal16 WNetReleaseJob(ptr word) WNetReleaseJob
|
||||
506 pascal16 WNetCancelJob(ptr word) WNetCancelJob
|
||||
507 pascal16 WNetSetJobCopies(ptr word word) WNetSetJobCopies
|
||||
508 pascal16 WNetWatchQueue(word ptr ptr word) WNetWatchQueue
|
||||
509 pascal16 WNetUnwatchQueue(word ptr ptr word) WNetUnwatchQueue
|
||||
510 pascal16 WNetLockQueueData(ptr ptr ptr) WNetLockQueueData
|
||||
511 pascal16 WNetUnlockQueueData(ptr) WNetUnlockQueueData
|
||||
512 pascal16 WNetGetConnection(ptr ptr ptr) WNetGetConnection
|
||||
513 pascal WNetGetCaps(word) WNetGetCaps
|
||||
514 pascal WNetDeviceMode(word) WNetDeviceMode
|
||||
515 pascal WNetBrowseDialog(word word ptr) WNetBrowseDialog
|
||||
516 pascal WNetGetUser(ptr ptr ptr) WNetGetUser
|
||||
513 pascal16 WNetGetCaps(word) WNetGetCaps
|
||||
514 pascal16 WNetDeviceMode(word) WNetDeviceMode
|
||||
515 pascal16 WNetBrowseDialog(word word ptr) WNetBrowseDialog
|
||||
516 pascal16 WNetGetUser(ptr ptr ptr) WNetGetUser
|
||||
517 pascal16 WNetAddConnection(ptr ptr ptr) WNetAddConnection
|
||||
518 pascal16 WNetCancelConnection(ptr word) WNetCancelConnection
|
||||
519 pascal WNetGetError(ptr) WNetGetError
|
||||
520 pascal WNetGetErrorText(word ptr ptr) WNetGetErrorText
|
||||
519 pascal16 WNetGetError(ptr) WNetGetError
|
||||
520 pascal16 WNetGetErrorText(word ptr ptr) WNetGetErrorText
|
||||
521 stub WNetEnable
|
||||
522 stub WNetDisable
|
||||
523 pascal WNetRestoreConnection(word ptr) WNetRestoreConnection
|
||||
524 pascal WNetWriteJob(word ptr ptr) WNetWriteJob
|
||||
525 pascal WnetConnectDialog(word word) WNetConnectDialog
|
||||
526 pascal WNetDisconnectDialog(word word) WNetDisconnectDialog
|
||||
527 pascal WNetConnectionDialog(word word) WNetConnectionDialog
|
||||
528 pascal WNetViewQueueDialog(word ptr) WNetViewQueueDialog
|
||||
529 pascal WNetPropertyDialog(word word ptr word) WNetPropertyDialog
|
||||
530 pascal WNetGetDirectoryType(ptr ptr) WNetGetDirectoryType
|
||||
531 pascal WNetDirectoryNotify(word ptr word) WNetDirectoryNotify
|
||||
532 pascal WNetGetPropertyText(word word word ptr word) WNetGetPropertyText
|
||||
523 pascal16 WNetRestoreConnection(word ptr) WNetRestoreConnection
|
||||
524 pascal16 WNetWriteJob(word ptr ptr) WNetWriteJob
|
||||
525 pascal16 WnetConnectDialog(word word) WNetConnectDialog
|
||||
526 pascal16 WNetDisconnectDialog(word word) WNetDisconnectDialog
|
||||
527 pascal16 WNetConnectionDialog(word word) WNetConnectionDialog
|
||||
528 pascal16 WNetViewQueueDialog(word ptr) WNetViewQueueDialog
|
||||
529 pascal16 WNetPropertyDialog(word word ptr word) WNetPropertyDialog
|
||||
530 pascal16 WNetGetDirectoryType(ptr ptr) WNetGetDirectoryType
|
||||
531 pascal16 WNetDirectoryNotify(word ptr word) WNetDirectoryNotify
|
||||
532 pascal16 WNetGetPropertyText(word word word ptr word) WNetGetPropertyText
|
||||
|
|
|
@ -2,6 +2,6 @@ name win87em
|
|||
id 4
|
||||
|
||||
1 register _fpMath() WIN87_fpmath
|
||||
3 pascal __WinEm87Info(ptr word) WIN87_WinEm87Info
|
||||
4 pascal __WinEm87Restore(ptr word) WIN87_WinEm87Restore
|
||||
5 pascal __WinEm87Save(ptr word) WIN87_WinEm87Save
|
||||
3 pascal16 __WinEm87Info(ptr word) WIN87_WinEm87Info
|
||||
4 pascal16 __WinEm87Restore(ptr word) WIN87_WinEm87Restore
|
||||
5 pascal16 __WinEm87Save(ptr word) WIN87_WinEm87Save
|
||||
|
|
|
@ -7,6 +7,16 @@
|
|||
#ifndef __WINE_CURSOR_H
|
||||
#define __WINE_CURSOR_H
|
||||
|
||||
|
||||
typedef struct {
|
||||
POINT pntHotSpot; /* cursor hot spot */
|
||||
WORD nWidth; /* width of bitmap in pixels */
|
||||
WORD nHeight;
|
||||
WORD nWidthBytes;
|
||||
BYTE byPlanes; /* number of bit planes */
|
||||
BYTE byBitsPix; /* bits per pixel */
|
||||
} CURSORICONINFO, FAR *LPCURSORICONINFO;
|
||||
|
||||
typedef struct {
|
||||
BYTE Width;
|
||||
BYTE Reserved1;
|
||||
|
|
358
include/debug.h
358
include/debug.h
|
@ -3,13 +3,22 @@
|
|||
#define stddeb stdout
|
||||
#define stdnimp stdout
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define api_assert(name,test) if (test) ; else \
|
||||
{ \
|
||||
fprintf(stddeb,"API assertion failed for %s: %s\n", name, #test); \
|
||||
abort(); \
|
||||
}
|
||||
#else
|
||||
#define api_assert(name,test) ;
|
||||
#endif
|
||||
|
||||
/* Do not remove this line or change anything below this line */
|
||||
|
||||
#ifdef DEBUG_NONE_EXT
|
||||
#undef DEBUG_ACCEL
|
||||
#undef DEBUG_BITBLT
|
||||
#undef DEBUG_BITMAP
|
||||
#undef DEBUG_CALLBACK
|
||||
#undef DEBUG_CARET
|
||||
#undef DEBUG_CATCH
|
||||
#undef DEBUG_CDAUDIO
|
||||
|
@ -34,7 +43,6 @@
|
|||
#undef DEBUG_GDI
|
||||
#undef DEBUG_GLOBAL
|
||||
#undef DEBUG_GRAPHICS
|
||||
#undef DEBUG_HEAP
|
||||
#undef DEBUG_ICON
|
||||
#undef DEBUG_INT
|
||||
#undef DEBUG_KEY
|
||||
|
@ -53,10 +61,10 @@
|
|||
#undef DEBUG_METAFILE
|
||||
#undef DEBUG_MIDI
|
||||
#undef DEBUG_MMIO
|
||||
#undef DEBUG_MMSYS
|
||||
#undef DEBUG_MMTIME
|
||||
#undef DEBUG_MODULE
|
||||
#undef DEBUG_MSG
|
||||
#undef DEBUG_MSGBOX
|
||||
#undef DEBUG_NONCLIENT
|
||||
#undef DEBUG_OLE
|
||||
#undef DEBUG_PALETTE
|
||||
|
@ -84,7 +92,6 @@
|
|||
#define DEBUG_ACCEL
|
||||
#define DEBUG_BITBLT
|
||||
#define DEBUG_BITMAP
|
||||
#define DEBUG_CALLBACK
|
||||
#define DEBUG_CARET
|
||||
#define DEBUG_CATCH
|
||||
#define DEBUG_CDAUDIO
|
||||
|
@ -109,7 +116,6 @@
|
|||
#define DEBUG_GDI
|
||||
#define DEBUG_GLOBAL
|
||||
#define DEBUG_GRAPHICS
|
||||
#define DEBUG_HEAP
|
||||
#define DEBUG_ICON
|
||||
#define DEBUG_INT
|
||||
#define DEBUG_KEY
|
||||
|
@ -128,10 +134,10 @@
|
|||
#define DEBUG_METAFILE
|
||||
#define DEBUG_MIDI
|
||||
#define DEBUG_MMIO
|
||||
#define DEBUG_MMSYS
|
||||
#define DEBUG_MMTIME
|
||||
#define DEBUG_MODULE
|
||||
#define DEBUG_MSG
|
||||
#define DEBUG_MSGBOX
|
||||
#define DEBUG_NONCLIENT
|
||||
#define DEBUG_OLE
|
||||
#define DEBUG_PALETTE
|
||||
|
@ -173,11 +179,6 @@ short debug_msg_enabled[]={
|
|||
#else
|
||||
0,
|
||||
#endif
|
||||
#ifdef DEBUG_CALLBACK
|
||||
1,
|
||||
#else
|
||||
0,
|
||||
#endif
|
||||
#ifdef DEBUG_CARET
|
||||
1,
|
||||
#else
|
||||
|
@ -298,11 +299,6 @@ short debug_msg_enabled[]={
|
|||
#else
|
||||
0,
|
||||
#endif
|
||||
#ifdef DEBUG_HEAP
|
||||
1,
|
||||
#else
|
||||
0,
|
||||
#endif
|
||||
#ifdef DEBUG_ICON
|
||||
1,
|
||||
#else
|
||||
|
@ -393,6 +389,11 @@ short debug_msg_enabled[]={
|
|||
#else
|
||||
0,
|
||||
#endif
|
||||
#ifdef DEBUG_MMSYS
|
||||
1,
|
||||
#else
|
||||
0,
|
||||
#endif
|
||||
#ifdef DEBUG_MMTIME
|
||||
1,
|
||||
#else
|
||||
|
@ -408,11 +409,6 @@ short debug_msg_enabled[]={
|
|||
#else
|
||||
0,
|
||||
#endif
|
||||
#ifdef DEBUG_MSGBOX
|
||||
1,
|
||||
#else
|
||||
0,
|
||||
#endif
|
||||
#ifdef DEBUG_NONCLIENT
|
||||
1,
|
||||
#else
|
||||
|
@ -565,21 +561,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_callback if(!debug_msg_enabled[3]) ; else fprintf
|
||||
#define debugging_callback debug_msg_enabled[3]
|
||||
#else
|
||||
#ifdef DEBUG_CALLBACK
|
||||
#define dprintf_callback fprintf
|
||||
#define debugging_callback 1
|
||||
#else
|
||||
#define dprintf_callback while(0) fprintf
|
||||
#define debugging_callback 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_caret if(!debug_msg_enabled[4]) ; else fprintf
|
||||
#define debugging_caret debug_msg_enabled[4]
|
||||
#define dprintf_caret if(!debug_msg_enabled[3]) ; else fprintf
|
||||
#define debugging_caret debug_msg_enabled[3]
|
||||
#else
|
||||
#ifdef DEBUG_CARET
|
||||
#define dprintf_caret fprintf
|
||||
|
@ -591,8 +574,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_catch if(!debug_msg_enabled[5]) ; else fprintf
|
||||
#define debugging_catch debug_msg_enabled[5]
|
||||
#define dprintf_catch if(!debug_msg_enabled[4]) ; else fprintf
|
||||
#define debugging_catch debug_msg_enabled[4]
|
||||
#else
|
||||
#ifdef DEBUG_CATCH
|
||||
#define dprintf_catch fprintf
|
||||
|
@ -604,8 +587,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_cdaudio if(!debug_msg_enabled[6]) ; else fprintf
|
||||
#define debugging_cdaudio debug_msg_enabled[6]
|
||||
#define dprintf_cdaudio if(!debug_msg_enabled[5]) ; else fprintf
|
||||
#define debugging_cdaudio debug_msg_enabled[5]
|
||||
#else
|
||||
#ifdef DEBUG_CDAUDIO
|
||||
#define dprintf_cdaudio fprintf
|
||||
|
@ -617,8 +600,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_class if(!debug_msg_enabled[7]) ; else fprintf
|
||||
#define debugging_class debug_msg_enabled[7]
|
||||
#define dprintf_class if(!debug_msg_enabled[6]) ; else fprintf
|
||||
#define debugging_class debug_msg_enabled[6]
|
||||
#else
|
||||
#ifdef DEBUG_CLASS
|
||||
#define dprintf_class fprintf
|
||||
|
@ -630,8 +613,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_clipboard if(!debug_msg_enabled[8]) ; else fprintf
|
||||
#define debugging_clipboard debug_msg_enabled[8]
|
||||
#define dprintf_clipboard if(!debug_msg_enabled[7]) ; else fprintf
|
||||
#define debugging_clipboard debug_msg_enabled[7]
|
||||
#else
|
||||
#ifdef DEBUG_CLIPBOARD
|
||||
#define dprintf_clipboard fprintf
|
||||
|
@ -643,8 +626,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_clipping if(!debug_msg_enabled[9]) ; else fprintf
|
||||
#define debugging_clipping debug_msg_enabled[9]
|
||||
#define dprintf_clipping if(!debug_msg_enabled[8]) ; else fprintf
|
||||
#define debugging_clipping debug_msg_enabled[8]
|
||||
#else
|
||||
#ifdef DEBUG_CLIPPING
|
||||
#define dprintf_clipping fprintf
|
||||
|
@ -656,8 +639,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_combo if(!debug_msg_enabled[10]) ; else fprintf
|
||||
#define debugging_combo debug_msg_enabled[10]
|
||||
#define dprintf_combo if(!debug_msg_enabled[9]) ; else fprintf
|
||||
#define debugging_combo debug_msg_enabled[9]
|
||||
#else
|
||||
#ifdef DEBUG_COMBO
|
||||
#define dprintf_combo fprintf
|
||||
|
@ -669,8 +652,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_comm if(!debug_msg_enabled[11]) ; else fprintf
|
||||
#define debugging_comm debug_msg_enabled[11]
|
||||
#define dprintf_comm if(!debug_msg_enabled[10]) ; else fprintf
|
||||
#define debugging_comm debug_msg_enabled[10]
|
||||
#else
|
||||
#ifdef DEBUG_COMM
|
||||
#define dprintf_comm fprintf
|
||||
|
@ -682,8 +665,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_cursor if(!debug_msg_enabled[12]) ; else fprintf
|
||||
#define debugging_cursor debug_msg_enabled[12]
|
||||
#define dprintf_cursor if(!debug_msg_enabled[11]) ; else fprintf
|
||||
#define debugging_cursor debug_msg_enabled[11]
|
||||
#else
|
||||
#ifdef DEBUG_CURSOR
|
||||
#define dprintf_cursor fprintf
|
||||
|
@ -695,8 +678,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_dc if(!debug_msg_enabled[13]) ; else fprintf
|
||||
#define debugging_dc debug_msg_enabled[13]
|
||||
#define dprintf_dc if(!debug_msg_enabled[12]) ; else fprintf
|
||||
#define debugging_dc debug_msg_enabled[12]
|
||||
#else
|
||||
#ifdef DEBUG_DC
|
||||
#define dprintf_dc fprintf
|
||||
|
@ -708,8 +691,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_dialog if(!debug_msg_enabled[14]) ; else fprintf
|
||||
#define debugging_dialog debug_msg_enabled[14]
|
||||
#define dprintf_dialog if(!debug_msg_enabled[13]) ; else fprintf
|
||||
#define debugging_dialog debug_msg_enabled[13]
|
||||
#else
|
||||
#ifdef DEBUG_DIALOG
|
||||
#define dprintf_dialog fprintf
|
||||
|
@ -721,8 +704,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_dll if(!debug_msg_enabled[15]) ; else fprintf
|
||||
#define debugging_dll debug_msg_enabled[15]
|
||||
#define dprintf_dll if(!debug_msg_enabled[14]) ; else fprintf
|
||||
#define debugging_dll debug_msg_enabled[14]
|
||||
#else
|
||||
#ifdef DEBUG_DLL
|
||||
#define dprintf_dll fprintf
|
||||
|
@ -734,8 +717,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_dosfs if(!debug_msg_enabled[16]) ; else fprintf
|
||||
#define debugging_dosfs debug_msg_enabled[16]
|
||||
#define dprintf_dosfs if(!debug_msg_enabled[15]) ; else fprintf
|
||||
#define debugging_dosfs debug_msg_enabled[15]
|
||||
#else
|
||||
#ifdef DEBUG_DOSFS
|
||||
#define dprintf_dosfs fprintf
|
||||
|
@ -747,8 +730,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_driver if(!debug_msg_enabled[17]) ; else fprintf
|
||||
#define debugging_driver debug_msg_enabled[17]
|
||||
#define dprintf_driver if(!debug_msg_enabled[16]) ; else fprintf
|
||||
#define debugging_driver debug_msg_enabled[16]
|
||||
#else
|
||||
#ifdef DEBUG_DRIVER
|
||||
#define dprintf_driver fprintf
|
||||
|
@ -760,8 +743,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_edit if(!debug_msg_enabled[18]) ; else fprintf
|
||||
#define debugging_edit debug_msg_enabled[18]
|
||||
#define dprintf_edit if(!debug_msg_enabled[17]) ; else fprintf
|
||||
#define debugging_edit debug_msg_enabled[17]
|
||||
#else
|
||||
#ifdef DEBUG_EDIT
|
||||
#define dprintf_edit fprintf
|
||||
|
@ -773,8 +756,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_enum if(!debug_msg_enabled[19]) ; else fprintf
|
||||
#define debugging_enum debug_msg_enabled[19]
|
||||
#define dprintf_enum if(!debug_msg_enabled[18]) ; else fprintf
|
||||
#define debugging_enum debug_msg_enabled[18]
|
||||
#else
|
||||
#ifdef DEBUG_ENUM
|
||||
#define dprintf_enum fprintf
|
||||
|
@ -786,8 +769,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_event if(!debug_msg_enabled[20]) ; else fprintf
|
||||
#define debugging_event debug_msg_enabled[20]
|
||||
#define dprintf_event if(!debug_msg_enabled[19]) ; else fprintf
|
||||
#define debugging_event debug_msg_enabled[19]
|
||||
#else
|
||||
#ifdef DEBUG_EVENT
|
||||
#define dprintf_event fprintf
|
||||
|
@ -799,8 +782,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_exec if(!debug_msg_enabled[21]) ; else fprintf
|
||||
#define debugging_exec debug_msg_enabled[21]
|
||||
#define dprintf_exec if(!debug_msg_enabled[20]) ; else fprintf
|
||||
#define debugging_exec debug_msg_enabled[20]
|
||||
#else
|
||||
#ifdef DEBUG_EXEC
|
||||
#define dprintf_exec fprintf
|
||||
|
@ -812,8 +795,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_file if(!debug_msg_enabled[22]) ; else fprintf
|
||||
#define debugging_file debug_msg_enabled[22]
|
||||
#define dprintf_file if(!debug_msg_enabled[21]) ; else fprintf
|
||||
#define debugging_file debug_msg_enabled[21]
|
||||
#else
|
||||
#ifdef DEBUG_FILE
|
||||
#define dprintf_file fprintf
|
||||
|
@ -825,8 +808,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_fixup if(!debug_msg_enabled[23]) ; else fprintf
|
||||
#define debugging_fixup debug_msg_enabled[23]
|
||||
#define dprintf_fixup if(!debug_msg_enabled[22]) ; else fprintf
|
||||
#define debugging_fixup debug_msg_enabled[22]
|
||||
#else
|
||||
#ifdef DEBUG_FIXUP
|
||||
#define dprintf_fixup fprintf
|
||||
|
@ -838,8 +821,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_font if(!debug_msg_enabled[24]) ; else fprintf
|
||||
#define debugging_font debug_msg_enabled[24]
|
||||
#define dprintf_font if(!debug_msg_enabled[23]) ; else fprintf
|
||||
#define debugging_font debug_msg_enabled[23]
|
||||
#else
|
||||
#ifdef DEBUG_FONT
|
||||
#define dprintf_font fprintf
|
||||
|
@ -851,8 +834,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_gdi if(!debug_msg_enabled[25]) ; else fprintf
|
||||
#define debugging_gdi debug_msg_enabled[25]
|
||||
#define dprintf_gdi if(!debug_msg_enabled[24]) ; else fprintf
|
||||
#define debugging_gdi debug_msg_enabled[24]
|
||||
#else
|
||||
#ifdef DEBUG_GDI
|
||||
#define dprintf_gdi fprintf
|
||||
|
@ -864,8 +847,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_global if(!debug_msg_enabled[26]) ; else fprintf
|
||||
#define debugging_global debug_msg_enabled[26]
|
||||
#define dprintf_global if(!debug_msg_enabled[25]) ; else fprintf
|
||||
#define debugging_global debug_msg_enabled[25]
|
||||
#else
|
||||
#ifdef DEBUG_GLOBAL
|
||||
#define dprintf_global fprintf
|
||||
|
@ -877,8 +860,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_graphics if(!debug_msg_enabled[27]) ; else fprintf
|
||||
#define debugging_graphics debug_msg_enabled[27]
|
||||
#define dprintf_graphics if(!debug_msg_enabled[26]) ; else fprintf
|
||||
#define debugging_graphics debug_msg_enabled[26]
|
||||
#else
|
||||
#ifdef DEBUG_GRAPHICS
|
||||
#define dprintf_graphics fprintf
|
||||
|
@ -890,21 +873,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_heap if(!debug_msg_enabled[28]) ; else fprintf
|
||||
#define debugging_heap debug_msg_enabled[28]
|
||||
#else
|
||||
#ifdef DEBUG_HEAP
|
||||
#define dprintf_heap fprintf
|
||||
#define debugging_heap 1
|
||||
#else
|
||||
#define dprintf_heap while(0) fprintf
|
||||
#define debugging_heap 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_icon if(!debug_msg_enabled[29]) ; else fprintf
|
||||
#define debugging_icon debug_msg_enabled[29]
|
||||
#define dprintf_icon if(!debug_msg_enabled[27]) ; else fprintf
|
||||
#define debugging_icon debug_msg_enabled[27]
|
||||
#else
|
||||
#ifdef DEBUG_ICON
|
||||
#define dprintf_icon fprintf
|
||||
|
@ -916,8 +886,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_int if(!debug_msg_enabled[30]) ; else fprintf
|
||||
#define debugging_int debug_msg_enabled[30]
|
||||
#define dprintf_int if(!debug_msg_enabled[28]) ; else fprintf
|
||||
#define debugging_int debug_msg_enabled[28]
|
||||
#else
|
||||
#ifdef DEBUG_INT
|
||||
#define dprintf_int fprintf
|
||||
|
@ -929,8 +899,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_key if(!debug_msg_enabled[31]) ; else fprintf
|
||||
#define debugging_key debug_msg_enabled[31]
|
||||
#define dprintf_key if(!debug_msg_enabled[29]) ; else fprintf
|
||||
#define debugging_key debug_msg_enabled[29]
|
||||
#else
|
||||
#ifdef DEBUG_KEY
|
||||
#define dprintf_key fprintf
|
||||
|
@ -942,8 +912,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_keyboard if(!debug_msg_enabled[32]) ; else fprintf
|
||||
#define debugging_keyboard debug_msg_enabled[32]
|
||||
#define dprintf_keyboard if(!debug_msg_enabled[30]) ; else fprintf
|
||||
#define debugging_keyboard debug_msg_enabled[30]
|
||||
#else
|
||||
#ifdef DEBUG_KEYBOARD
|
||||
#define dprintf_keyboard fprintf
|
||||
|
@ -955,8 +925,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_ldt if(!debug_msg_enabled[33]) ; else fprintf
|
||||
#define debugging_ldt debug_msg_enabled[33]
|
||||
#define dprintf_ldt if(!debug_msg_enabled[31]) ; else fprintf
|
||||
#define debugging_ldt debug_msg_enabled[31]
|
||||
#else
|
||||
#ifdef DEBUG_LDT
|
||||
#define dprintf_ldt fprintf
|
||||
|
@ -968,8 +938,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_listbox if(!debug_msg_enabled[34]) ; else fprintf
|
||||
#define debugging_listbox debug_msg_enabled[34]
|
||||
#define dprintf_listbox if(!debug_msg_enabled[32]) ; else fprintf
|
||||
#define debugging_listbox debug_msg_enabled[32]
|
||||
#else
|
||||
#ifdef DEBUG_LISTBOX
|
||||
#define dprintf_listbox fprintf
|
||||
|
@ -981,8 +951,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_local if(!debug_msg_enabled[35]) ; else fprintf
|
||||
#define debugging_local debug_msg_enabled[35]
|
||||
#define dprintf_local if(!debug_msg_enabled[33]) ; else fprintf
|
||||
#define debugging_local debug_msg_enabled[33]
|
||||
#else
|
||||
#ifdef DEBUG_LOCAL
|
||||
#define dprintf_local fprintf
|
||||
|
@ -994,8 +964,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_malloc if(!debug_msg_enabled[36]) ; else fprintf
|
||||
#define debugging_malloc debug_msg_enabled[36]
|
||||
#define dprintf_malloc if(!debug_msg_enabled[34]) ; else fprintf
|
||||
#define debugging_malloc debug_msg_enabled[34]
|
||||
#else
|
||||
#ifdef DEBUG_MALLOC
|
||||
#define dprintf_malloc fprintf
|
||||
|
@ -1007,8 +977,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_mci if(!debug_msg_enabled[37]) ; else fprintf
|
||||
#define debugging_mci debug_msg_enabled[37]
|
||||
#define dprintf_mci if(!debug_msg_enabled[35]) ; else fprintf
|
||||
#define debugging_mci debug_msg_enabled[35]
|
||||
#else
|
||||
#ifdef DEBUG_MCI
|
||||
#define dprintf_mci fprintf
|
||||
|
@ -1020,8 +990,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_mcianim if(!debug_msg_enabled[38]) ; else fprintf
|
||||
#define debugging_mcianim debug_msg_enabled[38]
|
||||
#define dprintf_mcianim if(!debug_msg_enabled[36]) ; else fprintf
|
||||
#define debugging_mcianim debug_msg_enabled[36]
|
||||
#else
|
||||
#ifdef DEBUG_MCIANIM
|
||||
#define dprintf_mcianim fprintf
|
||||
|
@ -1033,8 +1003,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_mciwave if(!debug_msg_enabled[39]) ; else fprintf
|
||||
#define debugging_mciwave debug_msg_enabled[39]
|
||||
#define dprintf_mciwave if(!debug_msg_enabled[37]) ; else fprintf
|
||||
#define debugging_mciwave debug_msg_enabled[37]
|
||||
#else
|
||||
#ifdef DEBUG_MCIWAVE
|
||||
#define dprintf_mciwave fprintf
|
||||
|
@ -1046,8 +1016,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_mdi if(!debug_msg_enabled[40]) ; else fprintf
|
||||
#define debugging_mdi debug_msg_enabled[40]
|
||||
#define dprintf_mdi if(!debug_msg_enabled[38]) ; else fprintf
|
||||
#define debugging_mdi debug_msg_enabled[38]
|
||||
#else
|
||||
#ifdef DEBUG_MDI
|
||||
#define dprintf_mdi fprintf
|
||||
|
@ -1059,8 +1029,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_menu if(!debug_msg_enabled[41]) ; else fprintf
|
||||
#define debugging_menu debug_msg_enabled[41]
|
||||
#define dprintf_menu if(!debug_msg_enabled[39]) ; else fprintf
|
||||
#define debugging_menu debug_msg_enabled[39]
|
||||
#else
|
||||
#ifdef DEBUG_MENU
|
||||
#define dprintf_menu fprintf
|
||||
|
@ -1072,8 +1042,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_menucalc if(!debug_msg_enabled[42]) ; else fprintf
|
||||
#define debugging_menucalc debug_msg_enabled[42]
|
||||
#define dprintf_menucalc if(!debug_msg_enabled[40]) ; else fprintf
|
||||
#define debugging_menucalc debug_msg_enabled[40]
|
||||
#else
|
||||
#ifdef DEBUG_MENUCALC
|
||||
#define dprintf_menucalc fprintf
|
||||
|
@ -1085,8 +1055,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_message if(!debug_msg_enabled[43]) ; else fprintf
|
||||
#define debugging_message debug_msg_enabled[43]
|
||||
#define dprintf_message if(!debug_msg_enabled[41]) ; else fprintf
|
||||
#define debugging_message debug_msg_enabled[41]
|
||||
#else
|
||||
#ifdef DEBUG_MESSAGE
|
||||
#define dprintf_message fprintf
|
||||
|
@ -1098,8 +1068,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_metafile if(!debug_msg_enabled[44]) ; else fprintf
|
||||
#define debugging_metafile debug_msg_enabled[44]
|
||||
#define dprintf_metafile if(!debug_msg_enabled[42]) ; else fprintf
|
||||
#define debugging_metafile debug_msg_enabled[42]
|
||||
#else
|
||||
#ifdef DEBUG_METAFILE
|
||||
#define dprintf_metafile fprintf
|
||||
|
@ -1111,8 +1081,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_midi if(!debug_msg_enabled[45]) ; else fprintf
|
||||
#define debugging_midi debug_msg_enabled[45]
|
||||
#define dprintf_midi if(!debug_msg_enabled[43]) ; else fprintf
|
||||
#define debugging_midi debug_msg_enabled[43]
|
||||
#else
|
||||
#ifdef DEBUG_MIDI
|
||||
#define dprintf_midi fprintf
|
||||
|
@ -1124,8 +1094,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_mmio if(!debug_msg_enabled[46]) ; else fprintf
|
||||
#define debugging_mmio debug_msg_enabled[46]
|
||||
#define dprintf_mmio if(!debug_msg_enabled[44]) ; else fprintf
|
||||
#define debugging_mmio debug_msg_enabled[44]
|
||||
#else
|
||||
#ifdef DEBUG_MMIO
|
||||
#define dprintf_mmio fprintf
|
||||
|
@ -1137,8 +1107,21 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_mmtime if(!debug_msg_enabled[47]) ; else fprintf
|
||||
#define debugging_mmtime debug_msg_enabled[47]
|
||||
#define dprintf_mmsys if(!debug_msg_enabled[45]) ; else fprintf
|
||||
#define debugging_mmsys debug_msg_enabled[45]
|
||||
#else
|
||||
#ifdef DEBUG_MMSYS
|
||||
#define dprintf_mmsys fprintf
|
||||
#define debugging_mmsys 1
|
||||
#else
|
||||
#define dprintf_mmsys while(0) fprintf
|
||||
#define debugging_mmsys 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_mmtime if(!debug_msg_enabled[46]) ; else fprintf
|
||||
#define debugging_mmtime debug_msg_enabled[46]
|
||||
#else
|
||||
#ifdef DEBUG_MMTIME
|
||||
#define dprintf_mmtime fprintf
|
||||
|
@ -1150,8 +1133,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_module if(!debug_msg_enabled[48]) ; else fprintf
|
||||
#define debugging_module debug_msg_enabled[48]
|
||||
#define dprintf_module if(!debug_msg_enabled[47]) ; else fprintf
|
||||
#define debugging_module debug_msg_enabled[47]
|
||||
#else
|
||||
#ifdef DEBUG_MODULE
|
||||
#define dprintf_module fprintf
|
||||
|
@ -1163,8 +1146,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_msg if(!debug_msg_enabled[49]) ; else fprintf
|
||||
#define debugging_msg debug_msg_enabled[49]
|
||||
#define dprintf_msg if(!debug_msg_enabled[48]) ; else fprintf
|
||||
#define debugging_msg debug_msg_enabled[48]
|
||||
#else
|
||||
#ifdef DEBUG_MSG
|
||||
#define dprintf_msg fprintf
|
||||
|
@ -1176,21 +1159,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_msgbox if(!debug_msg_enabled[50]) ; else fprintf
|
||||
#define debugging_msgbox debug_msg_enabled[50]
|
||||
#else
|
||||
#ifdef DEBUG_MSGBOX
|
||||
#define dprintf_msgbox fprintf
|
||||
#define debugging_msgbox 1
|
||||
#else
|
||||
#define dprintf_msgbox while(0) fprintf
|
||||
#define debugging_msgbox 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_nonclient if(!debug_msg_enabled[51]) ; else fprintf
|
||||
#define debugging_nonclient debug_msg_enabled[51]
|
||||
#define dprintf_nonclient if(!debug_msg_enabled[49]) ; else fprintf
|
||||
#define debugging_nonclient debug_msg_enabled[49]
|
||||
#else
|
||||
#ifdef DEBUG_NONCLIENT
|
||||
#define dprintf_nonclient fprintf
|
||||
|
@ -1202,8 +1172,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_ole if(!debug_msg_enabled[52]) ; else fprintf
|
||||
#define debugging_ole debug_msg_enabled[52]
|
||||
#define dprintf_ole if(!debug_msg_enabled[50]) ; else fprintf
|
||||
#define debugging_ole debug_msg_enabled[50]
|
||||
#else
|
||||
#ifdef DEBUG_OLE
|
||||
#define dprintf_ole fprintf
|
||||
|
@ -1215,8 +1185,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_palette if(!debug_msg_enabled[53]) ; else fprintf
|
||||
#define debugging_palette debug_msg_enabled[53]
|
||||
#define dprintf_palette if(!debug_msg_enabled[51]) ; else fprintf
|
||||
#define debugging_palette debug_msg_enabled[51]
|
||||
#else
|
||||
#ifdef DEBUG_PALETTE
|
||||
#define dprintf_palette fprintf
|
||||
|
@ -1228,8 +1198,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_profile if(!debug_msg_enabled[54]) ; else fprintf
|
||||
#define debugging_profile debug_msg_enabled[54]
|
||||
#define dprintf_profile if(!debug_msg_enabled[52]) ; else fprintf
|
||||
#define debugging_profile debug_msg_enabled[52]
|
||||
#else
|
||||
#ifdef DEBUG_PROFILE
|
||||
#define dprintf_profile fprintf
|
||||
|
@ -1241,8 +1211,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_prop if(!debug_msg_enabled[55]) ; else fprintf
|
||||
#define debugging_prop debug_msg_enabled[55]
|
||||
#define dprintf_prop if(!debug_msg_enabled[53]) ; else fprintf
|
||||
#define debugging_prop debug_msg_enabled[53]
|
||||
#else
|
||||
#ifdef DEBUG_PROP
|
||||
#define dprintf_prop fprintf
|
||||
|
@ -1254,8 +1224,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_reg if(!debug_msg_enabled[56]) ; else fprintf
|
||||
#define debugging_reg debug_msg_enabled[56]
|
||||
#define dprintf_reg if(!debug_msg_enabled[54]) ; else fprintf
|
||||
#define debugging_reg debug_msg_enabled[54]
|
||||
#else
|
||||
#ifdef DEBUG_REG
|
||||
#define dprintf_reg fprintf
|
||||
|
@ -1267,8 +1237,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_region if(!debug_msg_enabled[57]) ; else fprintf
|
||||
#define debugging_region debug_msg_enabled[57]
|
||||
#define dprintf_region if(!debug_msg_enabled[55]) ; else fprintf
|
||||
#define debugging_region debug_msg_enabled[55]
|
||||
#else
|
||||
#ifdef DEBUG_REGION
|
||||
#define dprintf_region fprintf
|
||||
|
@ -1280,8 +1250,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_relay if(!debug_msg_enabled[58]) ; else fprintf
|
||||
#define debugging_relay debug_msg_enabled[58]
|
||||
#define dprintf_relay if(!debug_msg_enabled[56]) ; else fprintf
|
||||
#define debugging_relay debug_msg_enabled[56]
|
||||
#else
|
||||
#ifdef DEBUG_RELAY
|
||||
#define dprintf_relay fprintf
|
||||
|
@ -1293,8 +1263,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_resource if(!debug_msg_enabled[59]) ; else fprintf
|
||||
#define debugging_resource debug_msg_enabled[59]
|
||||
#define dprintf_resource if(!debug_msg_enabled[57]) ; else fprintf
|
||||
#define debugging_resource debug_msg_enabled[57]
|
||||
#else
|
||||
#ifdef DEBUG_RESOURCE
|
||||
#define dprintf_resource fprintf
|
||||
|
@ -1306,8 +1276,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_scroll if(!debug_msg_enabled[60]) ; else fprintf
|
||||
#define debugging_scroll debug_msg_enabled[60]
|
||||
#define dprintf_scroll if(!debug_msg_enabled[58]) ; else fprintf
|
||||
#define debugging_scroll debug_msg_enabled[58]
|
||||
#else
|
||||
#ifdef DEBUG_SCROLL
|
||||
#define dprintf_scroll fprintf
|
||||
|
@ -1319,8 +1289,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_selector if(!debug_msg_enabled[61]) ; else fprintf
|
||||
#define debugging_selector debug_msg_enabled[61]
|
||||
#define dprintf_selector if(!debug_msg_enabled[59]) ; else fprintf
|
||||
#define debugging_selector debug_msg_enabled[59]
|
||||
#else
|
||||
#ifdef DEBUG_SELECTOR
|
||||
#define dprintf_selector fprintf
|
||||
|
@ -1332,8 +1302,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_selectors if(!debug_msg_enabled[62]) ; else fprintf
|
||||
#define debugging_selectors debug_msg_enabled[62]
|
||||
#define dprintf_selectors if(!debug_msg_enabled[60]) ; else fprintf
|
||||
#define debugging_selectors debug_msg_enabled[60]
|
||||
#else
|
||||
#ifdef DEBUG_SELECTORS
|
||||
#define dprintf_selectors fprintf
|
||||
|
@ -1345,8 +1315,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_stress if(!debug_msg_enabled[63]) ; else fprintf
|
||||
#define debugging_stress debug_msg_enabled[63]
|
||||
#define dprintf_stress if(!debug_msg_enabled[61]) ; else fprintf
|
||||
#define debugging_stress debug_msg_enabled[61]
|
||||
#else
|
||||
#ifdef DEBUG_STRESS
|
||||
#define dprintf_stress fprintf
|
||||
|
@ -1358,8 +1328,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_syscolor if(!debug_msg_enabled[64]) ; else fprintf
|
||||
#define debugging_syscolor debug_msg_enabled[64]
|
||||
#define dprintf_syscolor if(!debug_msg_enabled[62]) ; else fprintf
|
||||
#define debugging_syscolor debug_msg_enabled[62]
|
||||
#else
|
||||
#ifdef DEBUG_SYSCOLOR
|
||||
#define dprintf_syscolor fprintf
|
||||
|
@ -1371,8 +1341,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_task if(!debug_msg_enabled[65]) ; else fprintf
|
||||
#define debugging_task debug_msg_enabled[65]
|
||||
#define dprintf_task if(!debug_msg_enabled[63]) ; else fprintf
|
||||
#define debugging_task debug_msg_enabled[63]
|
||||
#else
|
||||
#ifdef DEBUG_TASK
|
||||
#define dprintf_task fprintf
|
||||
|
@ -1384,8 +1354,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_text if(!debug_msg_enabled[66]) ; else fprintf
|
||||
#define debugging_text debug_msg_enabled[66]
|
||||
#define dprintf_text if(!debug_msg_enabled[64]) ; else fprintf
|
||||
#define debugging_text debug_msg_enabled[64]
|
||||
#else
|
||||
#ifdef DEBUG_TEXT
|
||||
#define dprintf_text fprintf
|
||||
|
@ -1397,8 +1367,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_timer if(!debug_msg_enabled[67]) ; else fprintf
|
||||
#define debugging_timer debug_msg_enabled[67]
|
||||
#define dprintf_timer if(!debug_msg_enabled[65]) ; else fprintf
|
||||
#define debugging_timer debug_msg_enabled[65]
|
||||
#else
|
||||
#ifdef DEBUG_TIMER
|
||||
#define dprintf_timer fprintf
|
||||
|
@ -1410,8 +1380,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_toolhelp if(!debug_msg_enabled[68]) ; else fprintf
|
||||
#define debugging_toolhelp debug_msg_enabled[68]
|
||||
#define dprintf_toolhelp if(!debug_msg_enabled[66]) ; else fprintf
|
||||
#define debugging_toolhelp debug_msg_enabled[66]
|
||||
#else
|
||||
#ifdef DEBUG_TOOLHELP
|
||||
#define dprintf_toolhelp fprintf
|
||||
|
@ -1423,8 +1393,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_utility if(!debug_msg_enabled[69]) ; else fprintf
|
||||
#define debugging_utility debug_msg_enabled[69]
|
||||
#define dprintf_utility if(!debug_msg_enabled[67]) ; else fprintf
|
||||
#define debugging_utility debug_msg_enabled[67]
|
||||
#else
|
||||
#ifdef DEBUG_UTILITY
|
||||
#define dprintf_utility fprintf
|
||||
|
@ -1436,8 +1406,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_win if(!debug_msg_enabled[70]) ; else fprintf
|
||||
#define debugging_win debug_msg_enabled[70]
|
||||
#define dprintf_win if(!debug_msg_enabled[68]) ; else fprintf
|
||||
#define debugging_win debug_msg_enabled[68]
|
||||
#else
|
||||
#ifdef DEBUG_WIN
|
||||
#define dprintf_win fprintf
|
||||
|
@ -1449,8 +1419,8 @@ extern short debug_msg_enabled[];
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_winsock if(!debug_msg_enabled[71]) ; else fprintf
|
||||
#define debugging_winsock debug_msg_enabled[71]
|
||||
#define dprintf_winsock if(!debug_msg_enabled[69]) ; else fprintf
|
||||
#define debugging_winsock debug_msg_enabled[69]
|
||||
#else
|
||||
#ifdef DEBUG_WINSOCK
|
||||
#define dprintf_winsock fprintf
|
||||
|
@ -1468,7 +1438,6 @@ static char *debug_msg_name[] = {
|
|||
"accel",
|
||||
"bitblt",
|
||||
"bitmap",
|
||||
"callback",
|
||||
"caret",
|
||||
"catch",
|
||||
"cdaudio",
|
||||
|
@ -1493,7 +1462,6 @@ static char *debug_msg_name[] = {
|
|||
"gdi",
|
||||
"global",
|
||||
"graphics",
|
||||
"heap",
|
||||
"icon",
|
||||
"int",
|
||||
"key",
|
||||
|
@ -1512,10 +1480,10 @@ static char *debug_msg_name[] = {
|
|||
"metafile",
|
||||
"midi",
|
||||
"mmio",
|
||||
"mmsys",
|
||||
"mmtime",
|
||||
"module",
|
||||
"msg",
|
||||
"msgbox",
|
||||
"nonclient",
|
||||
"ole",
|
||||
"palette",
|
||||
|
|
|
@ -46,7 +46,7 @@ typedef struct {
|
|||
} DRIVERINFOSTRUCT;
|
||||
typedef DRIVERINFOSTRUCT FAR* LPDRIVERINFOSTRUCT;
|
||||
|
||||
typedef LRESULT (CALLBACK* DRIVERPROC)(DWORD, HDRVR, UINT, LPARAM, LPARAM);
|
||||
typedef LONG (CALLBACK* DRIVERPROC)(DWORD, HDRVR, UINT, LPARAM, LPARAM);
|
||||
|
||||
typedef struct {
|
||||
DRIVERINFOSTRUCT dis;
|
||||
|
@ -59,12 +59,12 @@ typedef DRIVERITEM FAR* LPDRIVERITEM;
|
|||
|
||||
LRESULT DefDriverProc(DWORD dwDevID, HDRVR hDriv, WORD wMsg,
|
||||
DWORD dwParam1, DWORD dwParam2);
|
||||
HDRVR WINAPI OpenDriver(LPSTR szDriverName, LPSTR szSectionName, LPARAM lParam2);
|
||||
LRESULT WINAPI CloseDriver(HDRVR hDriver, LPARAM lParam1, LPARAM lParam2);
|
||||
LRESULT WINAPI SendDriverMessage(HDRVR hDriver, WORD message, LPARAM lParam1, LPARAM lParam2);
|
||||
HINSTANCE WINAPI GetDriverModuleHandle(HDRVR hDriver);
|
||||
HDRVR WINAPI GetNextDriver(HDRVR, DWORD);
|
||||
BOOL WINAPI GetDriverInfo(HDRVR, DRIVERINFOSTRUCT FAR*);
|
||||
HDRVR OpenDriver(LPSTR szDriverName, LPSTR szSectionName, LPARAM lParam2);
|
||||
LRESULT CloseDriver(HDRVR hDriver, LPARAM lParam1, LPARAM lParam2);
|
||||
LRESULT SendDriverMessage(HDRVR hDriver, WORD message, LPARAM lParam1, LPARAM lParam2);
|
||||
HINSTANCE GetDriverModuleHandle(HDRVR hDriver);
|
||||
HDRVR GetNextDriver(HDRVR, DWORD);
|
||||
BOOL GetDriverInfo(HDRVR, DRIVERINFOSTRUCT FAR*);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -26,8 +26,10 @@ typedef struct
|
|||
enum seg_type type; /* segment type */
|
||||
} ldt_entry;
|
||||
|
||||
extern void LDT_BytesToEntry( const unsigned long *buffer, ldt_entry *content);
|
||||
extern void LDT_EntryToBytes( unsigned long *buffer, const ldt_entry *content);
|
||||
extern int LDT_GetEntry( int entry, ldt_entry *content );
|
||||
extern int LDT_SetEntry( int entry, ldt_entry *content );
|
||||
extern int LDT_SetEntry( int entry, const ldt_entry *content );
|
||||
extern void LDT_Print();
|
||||
|
||||
|
||||
|
@ -57,6 +59,17 @@ extern ldt_copy_entry ldt_copy[LDT_SIZE];
|
|||
((void*)(GET_SEL_BASE((int)(ptr) >> 16) + ((int)(ptr) & 0xffff)))
|
||||
|
||||
#define PTR_SEG_OFF_TO_LIN(seg,off) \
|
||||
((void*)(GET_SEL_BASE(seg) + ((int)(off) & 0xffff)))
|
||||
((void*)(GET_SEL_BASE(seg) + (unsigned int)(off)))
|
||||
|
||||
|
||||
extern unsigned char ldt_flags_copy[LDT_SIZE];
|
||||
|
||||
#define LDT_FLAGS_TYPE 0x03 /* Mask for segment type */
|
||||
#define LDT_FLAGS_READONLY 0x04 /* Segment is read-only (data) */
|
||||
#define LDT_FLAGS_EXECONLY 0x04 /* Segment is execute-only (code) */
|
||||
#define LDT_FLAGS_32BIT 0x08 /* Segment is 32-bit (code or stack) */
|
||||
#define LDT_FLAGS_BIG 0x10 /* Segment is big (limit is in pages) */
|
||||
|
||||
#define GET_SEL_FLAGS(sel) (ldt_flags_copy[SELECTOR_TO_ENTRY(sel)])
|
||||
|
||||
#endif /* _WINE_LDT_H */
|
||||
|
|
|
@ -20,5 +20,7 @@ extern HLOCAL LOCAL_Handle( WORD ds, WORD addr );
|
|||
extern WORD LOCAL_Size( WORD ds, HLOCAL handle );
|
||||
extern WORD LOCAL_Flags( WORD ds, HLOCAL handle );
|
||||
extern WORD LOCAL_HeapSize( WORD ds );
|
||||
extern WORD LOCAL_Lock( WORD ds, HLOCAL handle );
|
||||
extern BOOL LOCAL_Unlock( WORD ds, HLOCAL handle );
|
||||
|
||||
#endif /* __WINE_LOCAL_H */
|
||||
|
|
|
@ -15,24 +15,24 @@ extern LONG MDIClientWndProc(HWND hwnd, WORD message,
|
|||
WORD wParam, LONG lParam); /* mdi.c */
|
||||
|
||||
|
||||
typedef struct mdi_child_info_s
|
||||
typedef struct
|
||||
{
|
||||
struct mdi_child_info_s *next, *prev;
|
||||
HLOCAL next, prev;
|
||||
HWND hwnd;
|
||||
} MDICHILDINFO;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
HMENU hWindowMenu;
|
||||
MDICHILDINFO *infoActiveChildren;
|
||||
WORD nActiveChildren;
|
||||
WORD idFirstChild;
|
||||
HWND hwndActiveChild;
|
||||
HWND hwndHitTest;
|
||||
BOOL flagMenuAltered;
|
||||
BOOL flagChildMaximized;
|
||||
RECT rectMaximize;
|
||||
RECT rectRestore;
|
||||
HMENU hWindowMenu;
|
||||
HLOCAL infoActiveChildren;
|
||||
WORD nActiveChildren;
|
||||
WORD idFirstChild;
|
||||
HWND hwndActiveChild;
|
||||
HWND hwndHitTest;
|
||||
BOOL flagMenuAltered;
|
||||
BOOL flagChildMaximized;
|
||||
RECT rectMaximize;
|
||||
RECT rectRestore;
|
||||
} MDICLIENTINFO;
|
||||
|
||||
#endif /* MDI_H */
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#include "wintypes.h"
|
||||
#include "wine.h"
|
||||
|
||||
extern BOOL INSTR_HandleInstruction( struct sigcontext_struct *context );
|
||||
|
||||
extern int do_int10(struct sigcontext_struct *);
|
||||
extern int do_int13(struct sigcontext_struct *);
|
||||
extern int do_int15(struct sigcontext_struct *);
|
||||
|
@ -17,14 +19,14 @@ extern int do_int2f(struct sigcontext_struct *);
|
|||
extern int do_int31(struct sigcontext_struct *);
|
||||
extern int do_int5c(struct sigcontext_struct *);
|
||||
|
||||
extern void inportb(struct sigcontext_struct *context);
|
||||
extern void inport(struct sigcontext_struct *context);
|
||||
extern void outportb(struct sigcontext_struct *context);
|
||||
extern void outport(struct sigcontext_struct *context);
|
||||
extern void inportb_abs(struct sigcontext_struct *context);
|
||||
extern void inport_abs(struct sigcontext_struct *context);
|
||||
extern void outportb_abs(struct sigcontext_struct *context);
|
||||
extern void outport_abs(struct sigcontext_struct *context);
|
||||
extern void inportb( struct sigcontext_struct *context );
|
||||
extern void inport( struct sigcontext_struct *context, int long_op );
|
||||
extern void outportb( struct sigcontext_struct *context );
|
||||
extern void outport( struct sigcontext_struct *context, int long_op );
|
||||
extern void inportb_abs( struct sigcontext_struct *context);
|
||||
extern void inport_abs( struct sigcontext_struct *context, int long_op );
|
||||
extern void outportb_abs( struct sigcontext_struct *context );
|
||||
extern void outport_abs( struct sigcontext_struct *context, int long_op );
|
||||
|
||||
extern void IntBarf(int i, struct sigcontext_struct *context);
|
||||
|
||||
|
|
|
@ -132,10 +132,10 @@ typedef DRVCALLBACK FAR *LPDRVCALLBACK;
|
|||
#define MM_PC_JOYSTICK 12 /* Joystick adapter */
|
||||
|
||||
|
||||
WORD WINAPI mmsystemGetVersion(void);
|
||||
void WINAPI OutputDebugStr(LPCSTR);
|
||||
WORD mmsystemGetVersion(void);
|
||||
void OutputDebugStr(LPCSTR);
|
||||
|
||||
BOOL WINAPI sndPlaySound(LPCSTR lpszSoundName, UINT uFlags);
|
||||
BOOL sndPlaySound(LPCSTR lpszSoundName, UINT uFlags);
|
||||
|
||||
#define SND_SYNC 0x0000 /* play synchronously (default) */
|
||||
#define SND_ASYNC 0x0001 /* play asynchronously */
|
||||
|
@ -248,57 +248,57 @@ typedef struct {
|
|||
} PCMWAVEFORMAT;
|
||||
typedef PCMWAVEFORMAT FAR *LPPCMWAVEFORMAT;
|
||||
|
||||
UINT WINAPI waveOutGetNumDevs(void);
|
||||
UINT WINAPI waveOutGetDevCaps(UINT uDeviceID, WAVEOUTCAPS FAR* lpCaps,
|
||||
UINT waveOutGetNumDevs(void);
|
||||
UINT waveOutGetDevCaps(UINT uDeviceID, WAVEOUTCAPS FAR* lpCaps,
|
||||
UINT uSize);
|
||||
UINT WINAPI waveOutGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume);
|
||||
UINT WINAPI waveOutSetVolume(UINT uDeviceID, DWORD dwVolume);
|
||||
UINT WINAPI waveOutGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
|
||||
UINT WINAPI waveGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
|
||||
UINT WINAPI waveOutOpen(HWAVEOUT FAR* lphWaveOut, UINT uDeviceID,
|
||||
UINT waveOutGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume);
|
||||
UINT waveOutSetVolume(UINT uDeviceID, DWORD dwVolume);
|
||||
UINT waveOutGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
|
||||
UINT waveGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
|
||||
UINT waveOutOpen(HWAVEOUT FAR* lphWaveOut, UINT uDeviceID,
|
||||
const LPWAVEFORMAT lpFormat, DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
|
||||
UINT WINAPI waveOutClose(HWAVEOUT hWaveOut);
|
||||
UINT WINAPI waveOutPrepareHeader(HWAVEOUT hWaveOut,
|
||||
UINT waveOutClose(HWAVEOUT hWaveOut);
|
||||
UINT waveOutPrepareHeader(HWAVEOUT hWaveOut,
|
||||
WAVEHDR FAR* lpWaveOutHdr, UINT uSize);
|
||||
UINT WINAPI waveOutUnprepareHeader(HWAVEOUT hWaveOut,
|
||||
UINT waveOutUnprepareHeader(HWAVEOUT hWaveOut,
|
||||
WAVEHDR FAR* lpWaveOutHdr, UINT uSize);
|
||||
UINT WINAPI waveOutWrite(HWAVEOUT hWaveOut, WAVEHDR FAR* lpWaveOutHdr,
|
||||
UINT waveOutWrite(HWAVEOUT hWaveOut, WAVEHDR FAR* lpWaveOutHdr,
|
||||
UINT uSize);
|
||||
UINT WINAPI waveOutPause(HWAVEOUT hWaveOut);
|
||||
UINT WINAPI waveOutRestart(HWAVEOUT hWaveOut);
|
||||
UINT WINAPI waveOutReset(HWAVEOUT hWaveOut);
|
||||
UINT WINAPI waveOutBreakLoop(HWAVEOUT hWaveOut);
|
||||
UINT WINAPI waveOutGetPosition(HWAVEOUT hWaveOut, MMTIME FAR* lpInfo,
|
||||
UINT waveOutPause(HWAVEOUT hWaveOut);
|
||||
UINT waveOutRestart(HWAVEOUT hWaveOut);
|
||||
UINT waveOutReset(HWAVEOUT hWaveOut);
|
||||
UINT waveOutBreakLoop(HWAVEOUT hWaveOut);
|
||||
UINT waveOutGetPosition(HWAVEOUT hWaveOut, MMTIME FAR* lpInfo,
|
||||
UINT uSize);
|
||||
UINT WINAPI waveOutGetPitch(HWAVEOUT hWaveOut, DWORD FAR* lpdwPitch);
|
||||
UINT WINAPI waveOutSetPitch(HWAVEOUT hWaveOut, DWORD dwPitch);
|
||||
UINT WINAPI waveOutGetPlaybackRate(HWAVEOUT hWaveOut, DWORD FAR* lpdwRate);
|
||||
UINT WINAPI waveOutSetPlaybackRate(HWAVEOUT hWaveOut, DWORD dwRate);
|
||||
UINT WINAPI waveOutGetID(HWAVEOUT hWaveOut, UINT FAR* lpuDeviceID);
|
||||
UINT waveOutGetPitch(HWAVEOUT hWaveOut, DWORD FAR* lpdwPitch);
|
||||
UINT waveOutSetPitch(HWAVEOUT hWaveOut, DWORD dwPitch);
|
||||
UINT waveOutGetPlaybackRate(HWAVEOUT hWaveOut, DWORD FAR* lpdwRate);
|
||||
UINT waveOutSetPlaybackRate(HWAVEOUT hWaveOut, DWORD dwRate);
|
||||
UINT waveOutGetID(HWAVEOUT hWaveOut, UINT FAR* lpuDeviceID);
|
||||
|
||||
DWORD WINAPI waveOutMessage(HWAVEOUT hWaveOut, UINT uMessage, DWORD dw1, DWORD dw2);
|
||||
DWORD waveOutMessage(HWAVEOUT hWaveOut, UINT uMessage, DWORD dw1, DWORD dw2);
|
||||
|
||||
UINT WINAPI waveInGetNumDevs(void);
|
||||
UINT WINAPI waveInGetDevCaps(UINT uDeviceID, WAVEINCAPS FAR* lpCaps,
|
||||
UINT waveInGetNumDevs(void);
|
||||
UINT waveInGetDevCaps(UINT uDeviceID, WAVEINCAPS FAR* lpCaps,
|
||||
UINT uSize);
|
||||
UINT WINAPI waveInGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
|
||||
UINT WINAPI waveInOpen(HWAVEIN FAR* lphWaveIn, UINT uDeviceID,
|
||||
UINT waveInGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
|
||||
UINT waveInOpen(HWAVEIN FAR* lphWaveIn, UINT uDeviceID,
|
||||
const LPWAVEFORMAT lpFormat, DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
|
||||
UINT WINAPI waveInClose(HWAVEIN hWaveIn);
|
||||
UINT WINAPI waveInPrepareHeader(HWAVEIN hWaveIn,
|
||||
UINT waveInClose(HWAVEIN hWaveIn);
|
||||
UINT waveInPrepareHeader(HWAVEIN hWaveIn,
|
||||
WAVEHDR FAR* lpWaveInHdr, UINT uSize);
|
||||
UINT WINAPI waveInUnprepareHeader(HWAVEIN hWaveIn,
|
||||
UINT waveInUnprepareHeader(HWAVEIN hWaveIn,
|
||||
WAVEHDR FAR* lpWaveInHdr, UINT uSize);
|
||||
UINT WINAPI waveInAddBuffer(HWAVEIN hWaveIn,
|
||||
UINT waveInAddBuffer(HWAVEIN hWaveIn,
|
||||
WAVEHDR FAR* lpWaveInHdr, UINT uSize);
|
||||
UINT WINAPI waveInStart(HWAVEIN hWaveIn);
|
||||
UINT WINAPI waveInStop(HWAVEIN hWaveIn);
|
||||
UINT WINAPI waveInReset(HWAVEIN hWaveIn);
|
||||
UINT WINAPI waveInGetPosition(HWAVEIN hWaveIn, MMTIME FAR* lpInfo,
|
||||
UINT waveInStart(HWAVEIN hWaveIn);
|
||||
UINT waveInStop(HWAVEIN hWaveIn);
|
||||
UINT waveInReset(HWAVEIN hWaveIn);
|
||||
UINT waveInGetPosition(HWAVEIN hWaveIn, MMTIME FAR* lpInfo,
|
||||
UINT uSize);
|
||||
UINT WINAPI waveInGetID(HWAVEIN hWaveIn, UINT FAR* lpuDeviceID);
|
||||
UINT waveInGetID(HWAVEIN hWaveIn, UINT FAR* lpuDeviceID);
|
||||
|
||||
DWORD WINAPI waveInMessage(HWAVEIN hWaveIn, UINT uMessage, DWORD dw1, DWORD dw2);
|
||||
DWORD waveInMessage(HWAVEIN hWaveIn, UINT uMessage, DWORD dw1, DWORD dw2);
|
||||
|
||||
#define MIDIERR_UNPREPARED (MIDIERR_BASE + 0) /* header not prepared */
|
||||
#define MIDIERR_STILLPLAYING (MIDIERR_BASE + 1) /* still something playing */
|
||||
|
@ -388,51 +388,51 @@ typedef MIDIHDR FAR *LPMIDIHDR;
|
|||
#define MHDR_PREPARED 0x00000002 /* set if header prepared */
|
||||
#define MHDR_INQUEUE 0x00000004 /* reserved for driver */
|
||||
|
||||
UINT WINAPI midiOutGetNumDevs(void);
|
||||
UINT WINAPI midiOutGetDevCaps(UINT uDeviceID,
|
||||
UINT midiOutGetNumDevs(void);
|
||||
UINT midiOutGetDevCaps(UINT uDeviceID,
|
||||
MIDIOUTCAPS FAR* lpCaps, UINT uSize);
|
||||
UINT WINAPI midiOutGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume);
|
||||
UINT WINAPI midiOutSetVolume(UINT uDeviceID, DWORD dwVolume);
|
||||
UINT WINAPI midiOutGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
|
||||
UINT WINAPI midiGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
|
||||
UINT WINAPI midiOutOpen(HMIDIOUT FAR* lphMidiOut, UINT uDeviceID,
|
||||
UINT midiOutGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume);
|
||||
UINT midiOutSetVolume(UINT uDeviceID, DWORD dwVolume);
|
||||
UINT midiOutGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
|
||||
UINT midiGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
|
||||
UINT midiOutOpen(HMIDIOUT FAR* lphMidiOut, UINT uDeviceID,
|
||||
DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
|
||||
UINT WINAPI midiOutClose(HMIDIOUT hMidiOut);
|
||||
UINT WINAPI midiOutPrepareHeader(HMIDIOUT hMidiOut,
|
||||
UINT midiOutClose(HMIDIOUT hMidiOut);
|
||||
UINT midiOutPrepareHeader(HMIDIOUT hMidiOut,
|
||||
MIDIHDR FAR* lpMidiOutHdr, UINT uSize);
|
||||
UINT WINAPI midiOutUnprepareHeader(HMIDIOUT hMidiOut,
|
||||
UINT midiOutUnprepareHeader(HMIDIOUT hMidiOut,
|
||||
MIDIHDR FAR* lpMidiOutHdr, UINT uSize);
|
||||
UINT WINAPI midiOutShortMsg(HMIDIOUT hMidiOut, DWORD dwMsg);
|
||||
UINT WINAPI midiOutLongMsg(HMIDIOUT hMidiOut,
|
||||
UINT midiOutShortMsg(HMIDIOUT hMidiOut, DWORD dwMsg);
|
||||
UINT midiOutLongMsg(HMIDIOUT hMidiOut,
|
||||
MIDIHDR FAR* lpMidiOutHdr, UINT uSize);
|
||||
UINT WINAPI midiOutReset(HMIDIOUT hMidiOut);
|
||||
UINT WINAPI midiOutCachePatches(HMIDIOUT hMidiOut,
|
||||
UINT midiOutReset(HMIDIOUT hMidiOut);
|
||||
UINT midiOutCachePatches(HMIDIOUT hMidiOut,
|
||||
UINT uBank, WORD FAR* lpwPatchArray, UINT uFlags);
|
||||
UINT WINAPI midiOutCacheDrumPatches(HMIDIOUT hMidiOut,
|
||||
UINT midiOutCacheDrumPatches(HMIDIOUT hMidiOut,
|
||||
UINT uPatch, WORD FAR* lpwKeyArray, UINT uFlags);
|
||||
UINT WINAPI midiOutGetID(HMIDIOUT hMidiOut, UINT FAR* lpuDeviceID);
|
||||
UINT midiOutGetID(HMIDIOUT hMidiOut, UINT FAR* lpuDeviceID);
|
||||
|
||||
DWORD WINAPI midiOutMessage(HMIDIOUT hMidiOut, UINT uMessage, DWORD dw1, DWORD dw2);
|
||||
DWORD midiOutMessage(HMIDIOUT hMidiOut, UINT uMessage, DWORD dw1, DWORD dw2);
|
||||
|
||||
UINT WINAPI midiInGetNumDevs(void);
|
||||
UINT WINAPI midiInGetDevCaps(UINT uDeviceID,
|
||||
UINT midiInGetNumDevs(void);
|
||||
UINT midiInGetDevCaps(UINT uDeviceID,
|
||||
LPMIDIINCAPS lpCaps, UINT uSize);
|
||||
UINT WINAPI midiInGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
|
||||
UINT WINAPI midiInOpen(HMIDIIN FAR* lphMidiIn, UINT uDeviceID,
|
||||
UINT midiInGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
|
||||
UINT midiInOpen(HMIDIIN FAR* lphMidiIn, UINT uDeviceID,
|
||||
DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
|
||||
UINT WINAPI midiInClose(HMIDIIN hMidiIn);
|
||||
UINT WINAPI midiInPrepareHeader(HMIDIIN hMidiIn,
|
||||
UINT midiInClose(HMIDIIN hMidiIn);
|
||||
UINT midiInPrepareHeader(HMIDIIN hMidiIn,
|
||||
MIDIHDR FAR* lpMidiInHdr, UINT uSize);
|
||||
UINT WINAPI midiInUnprepareHeader(HMIDIIN hMidiIn,
|
||||
UINT midiInUnprepareHeader(HMIDIIN hMidiIn,
|
||||
MIDIHDR FAR* lpMidiInHdr, UINT uSize);
|
||||
UINT WINAPI midiInAddBuffer(HMIDIIN hMidiIn,
|
||||
UINT midiInAddBuffer(HMIDIIN hMidiIn,
|
||||
MIDIHDR FAR* lpMidiInHdr, UINT uSize);
|
||||
UINT WINAPI midiInStart(HMIDIIN hMidiIn);
|
||||
UINT WINAPI midiInStop(HMIDIIN hMidiIn);
|
||||
UINT WINAPI midiInReset(HMIDIIN hMidiIn);
|
||||
UINT WINAPI midiInGetID(HMIDIIN hMidiIn, UINT FAR* lpuDeviceID);
|
||||
UINT midiInStart(HMIDIIN hMidiIn);
|
||||
UINT midiInStop(HMIDIIN hMidiIn);
|
||||
UINT midiInReset(HMIDIIN hMidiIn);
|
||||
UINT midiInGetID(HMIDIIN hMidiIn, UINT FAR* lpuDeviceID);
|
||||
|
||||
DWORD WINAPI midiInMessage(HMIDIIN hMidiIn, UINT uMessage, DWORD dw1, DWORD dw2);
|
||||
DWORD midiInMessage(HMIDIIN hMidiIn, UINT uMessage, DWORD dw1, DWORD dw2);
|
||||
|
||||
#define AUX_MAPPER (-1)
|
||||
|
||||
|
@ -452,12 +452,12 @@ typedef AUXCAPS FAR *LPAUXCAPS;
|
|||
#define AUXCAPS_VOLUME 0x0001 /* supports volume control */
|
||||
#define AUXCAPS_LRVOLUME 0x0002 /* separate left-right volume control */
|
||||
|
||||
UINT WINAPI auxGetNumDevs(void);
|
||||
UINT WINAPI auxGetDevCaps(UINT uDeviceID, AUXCAPS FAR* lpCaps, UINT uSize);
|
||||
UINT WINAPI auxSetVolume(UINT uDeviceID, DWORD dwVolume);
|
||||
UINT WINAPI auxGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume);
|
||||
UINT auxGetNumDevs(void);
|
||||
UINT auxGetDevCaps(UINT uDeviceID, AUXCAPS FAR* lpCaps, UINT uSize);
|
||||
UINT auxSetVolume(UINT uDeviceID, DWORD dwVolume);
|
||||
UINT auxGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume);
|
||||
|
||||
DWORD WINAPI auxOutMessage(UINT uDeviceID, UINT uMessage, DWORD dw1, DWORD dw2);
|
||||
DWORD auxOutMessage(UINT uDeviceID, UINT uMessage, DWORD dw1, DWORD dw2);
|
||||
|
||||
#define TIMERR_NOERROR (0) /* no error */
|
||||
#define TIMERR_NOCANDO (TIMERR_BASE+1) /* request not completed */
|
||||
|
@ -476,14 +476,14 @@ typedef struct {
|
|||
} TIMECAPS;
|
||||
typedef TIMECAPS FAR *LPTIMECAPS;
|
||||
|
||||
UINT WINAPI timeGetSystemTime(MMTIME FAR* lpTime, UINT uSize);
|
||||
DWORD WINAPI timeGetTime(void);
|
||||
UINT WINAPI timeSetEvent(UINT uDelay, UINT uResolution,
|
||||
UINT timeGetSystemTime(MMTIME FAR* lpTime, UINT uSize);
|
||||
DWORD timeGetTime(void);
|
||||
UINT timeSetEvent(UINT uDelay, UINT uResolution,
|
||||
LPTIMECALLBACK lpFunction, DWORD dwUser, UINT uFlags);
|
||||
UINT WINAPI timeKillEvent(UINT uTimerID);
|
||||
UINT WINAPI timeGetDevCaps(TIMECAPS FAR* lpTimeCaps, UINT uSize);
|
||||
UINT WINAPI timeBeginPeriod(UINT uPeriod);
|
||||
UINT WINAPI timeEndPeriod(UINT uPeriod);
|
||||
UINT timeKillEvent(UINT uTimerID);
|
||||
UINT timeGetDevCaps(TIMECAPS FAR* lpTimeCaps, UINT uSize);
|
||||
UINT timeBeginPeriod(UINT uPeriod);
|
||||
UINT timeEndPeriod(UINT uPeriod);
|
||||
|
||||
#define JOYERR_NOERROR (0) /* no error */
|
||||
#define JOYERR_PARMS (JOYERR_BASE+5) /* bad parameters */
|
||||
|
@ -526,14 +526,14 @@ typedef struct {
|
|||
} JOYINFO;
|
||||
typedef JOYINFO FAR *LPJOYINFO;
|
||||
|
||||
UINT WINAPI joyGetDevCaps(UINT uJoyID, JOYCAPS FAR* lpCaps, UINT uSize);
|
||||
UINT WINAPI joyGetNumDevs(void);
|
||||
UINT WINAPI joyGetPos(UINT uJoyID, JOYINFO FAR* lpInfo);
|
||||
UINT WINAPI joyGetThreshold(UINT uJoyID, UINT FAR* lpuThreshold);
|
||||
UINT WINAPI joyReleaseCapture(UINT uJoyID);
|
||||
UINT WINAPI joySetCapture(HWND hwnd, UINT uJoyID, UINT uPeriod,
|
||||
UINT joyGetDevCaps(UINT uJoyID, JOYCAPS FAR* lpCaps, UINT uSize);
|
||||
UINT joyGetNumDevs(void);
|
||||
UINT joyGetPos(UINT uJoyID, JOYINFO FAR* lpInfo);
|
||||
UINT joyGetThreshold(UINT uJoyID, UINT FAR* lpuThreshold);
|
||||
UINT joyReleaseCapture(UINT uJoyID);
|
||||
UINT joySetCapture(HWND hwnd, UINT uJoyID, UINT uPeriod,
|
||||
BOOL bChanged);
|
||||
UINT WINAPI joySetThreshold(UINT uJoyID, UINT uThreshold);
|
||||
UINT joySetThreshold(UINT uJoyID, UINT uThreshold);
|
||||
|
||||
#define MMIOERR_BASE 256
|
||||
#define MMIOERR_FILENOTFOUND (MMIOERR_BASE + 1) /* file not found */
|
||||
|
@ -551,7 +551,7 @@ UINT WINAPI joySetThreshold(UINT uJoyID, UINT uThreshold);
|
|||
|
||||
typedef DWORD FOURCC; /* a four character code */
|
||||
DECLARE_HANDLE(HMMIO); /* a handle to an open file */
|
||||
typedef LRESULT (CALLBACK MMIOPROC)(LPSTR lpmmioinfo, UINT uMessage,
|
||||
typedef LONG (CALLBACK MMIOPROC)(LPSTR lpmmioinfo, UINT uMessage,
|
||||
LPARAM lParam1, LPARAM lParam2);
|
||||
typedef MMIOPROC FAR *LPMMIOPROC;
|
||||
|
||||
|
@ -650,48 +650,48 @@ typedef MMCKINFO FAR *LPMMCKINFO;
|
|||
( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \
|
||||
( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
|
||||
|
||||
FOURCC WINAPI mmioStringToFOURCC(LPCSTR sz, UINT uFlags);
|
||||
LPMMIOPROC WINAPI mmioInstallIOProc(FOURCC fccIOProc, LPMMIOPROC pIOProc,
|
||||
FOURCC mmioStringToFOURCC(LPCSTR sz, UINT uFlags);
|
||||
LPMMIOPROC mmioInstallIOProc(FOURCC fccIOProc, LPMMIOPROC pIOProc,
|
||||
DWORD dwFlags);
|
||||
HMMIO WINAPI mmioOpen(LPSTR szFileName, MMIOINFO FAR* lpmmioinfo,
|
||||
HMMIO mmioOpen(LPSTR szFileName, MMIOINFO FAR* lpmmioinfo,
|
||||
DWORD dwOpenFlags);
|
||||
|
||||
UINT WINAPI mmioRename(LPCSTR szFileName, LPCSTR szNewFileName,
|
||||
UINT mmioRename(LPCSTR szFileName, LPCSTR szNewFileName,
|
||||
MMIOINFO FAR* lpmmioinfo, DWORD dwRenameFlags);
|
||||
|
||||
UINT WINAPI mmioClose(HMMIO hmmio, UINT uFlags);
|
||||
LONG WINAPI mmioRead(HMMIO hmmio, HPSTR pch, LONG cch);
|
||||
LONG WINAPI mmioWrite(HMMIO hmmio, HPCSTR pch, LONG cch);
|
||||
LONG WINAPI mmioSeek(HMMIO hmmio, LONG lOffset, int iOrigin);
|
||||
UINT WINAPI mmioGetInfo(HMMIO hmmio, MMIOINFO FAR* lpmmioinfo, UINT uFlags);
|
||||
UINT WINAPI mmioSetInfo(HMMIO hmmio, const MMIOINFO FAR* lpmmioinfo, UINT uFlags);
|
||||
UINT WINAPI mmioSetBuffer(HMMIO hmmio, LPSTR pchBuffer, LONG cchBuffer,
|
||||
UINT mmioClose(HMMIO hmmio, UINT uFlags);
|
||||
LONG mmioRead(HMMIO hmmio, HPSTR pch, LONG cch);
|
||||
LONG mmioWrite(HMMIO hmmio, HPCSTR pch, LONG cch);
|
||||
LONG mmioSeek(HMMIO hmmio, LONG lOffset, int iOrigin);
|
||||
UINT mmioGetInfo(HMMIO hmmio, MMIOINFO FAR* lpmmioinfo, UINT uFlags);
|
||||
UINT mmioSetInfo(HMMIO hmmio, const MMIOINFO FAR* lpmmioinfo, UINT uFlags);
|
||||
UINT mmioSetBuffer(HMMIO hmmio, LPSTR pchBuffer, LONG cchBuffer,
|
||||
UINT uFlags);
|
||||
UINT WINAPI mmioFlush(HMMIO hmmio, UINT uFlags);
|
||||
UINT WINAPI mmioAdvance(HMMIO hmmio, MMIOINFO FAR* lpmmioinfo, UINT uFlags);
|
||||
LRESULT WINAPI mmioSendMessage(HMMIO hmmio, UINT uMessage,
|
||||
UINT mmioFlush(HMMIO hmmio, UINT uFlags);
|
||||
UINT mmioAdvance(HMMIO hmmio, MMIOINFO FAR* lpmmioinfo, UINT uFlags);
|
||||
LONG mmioSendMessage(HMMIO hmmio, UINT uMessage,
|
||||
LPARAM lParam1, LPARAM lParam2);
|
||||
UINT WINAPI mmioDescend(HMMIO hmmio, MMCKINFO FAR* lpck,
|
||||
UINT mmioDescend(HMMIO hmmio, MMCKINFO FAR* lpck,
|
||||
const MMCKINFO FAR* lpckParent, UINT uFlags);
|
||||
UINT WINAPI mmioAscend(HMMIO hmmio, MMCKINFO FAR* lpck, UINT uFlags);
|
||||
UINT WINAPI mmioCreateChunk(HMMIO hmmio, MMCKINFO FAR* lpck, UINT uFlags);
|
||||
UINT mmioAscend(HMMIO hmmio, MMCKINFO FAR* lpck, UINT uFlags);
|
||||
UINT mmioCreateChunk(HMMIO hmmio, MMCKINFO FAR* lpck, UINT uFlags);
|
||||
|
||||
typedef UINT (CALLBACK *YIELDPROC) (UINT uDeviceID, DWORD dwYieldData);
|
||||
|
||||
DWORD WINAPI mciSendCommand (UINT uDeviceID, UINT uMessage,
|
||||
DWORD mciSendCommand (UINT uDeviceID, UINT uMessage,
|
||||
DWORD dwParam1, DWORD dwParam2);
|
||||
DWORD WINAPI mciSendString (LPCSTR lpstrCommand,
|
||||
DWORD mciSendString (LPCSTR lpstrCommand,
|
||||
LPSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback);
|
||||
UINT WINAPI mciGetDeviceID (LPCSTR lpstrName);
|
||||
UINT WINAPI mciGetDeviceIDFromElementID (DWORD dwElementID,
|
||||
UINT mciGetDeviceID (LPCSTR lpstrName);
|
||||
UINT mciGetDeviceIDFromElementID (DWORD dwElementID,
|
||||
LPCSTR lpstrType);
|
||||
BOOL WINAPI mciGetErrorString (DWORD wError, LPSTR lpstrBuffer,
|
||||
BOOL mciGetErrorString (DWORD wError, LPSTR lpstrBuffer,
|
||||
UINT uLength);
|
||||
BOOL WINAPI mciSetYieldProc (UINT uDeviceID, YIELDPROC fpYieldProc,
|
||||
BOOL mciSetYieldProc (UINT uDeviceID, YIELDPROC fpYieldProc,
|
||||
DWORD dwYieldData);
|
||||
|
||||
HTASK WINAPI mciGetCreatorTask(UINT uDeviceID);
|
||||
YIELDPROC WINAPI mciGetYieldProc (UINT uDeviceID, DWORD FAR* lpdwYieldData);
|
||||
HTASK mciGetCreatorTask(UINT uDeviceID);
|
||||
YIELDPROC mciGetYieldProc (UINT uDeviceID, DWORD FAR* lpdwYieldData);
|
||||
|
||||
#define MCIERR_INVALID_DEVICE_ID (MCIERR_BASE + 1)
|
||||
#define MCIERR_UNRECOGNIZED_KEYWORD (MCIERR_BASE + 3)
|
||||
|
@ -1562,14 +1562,14 @@ typedef struct {
|
|||
} MCI_OPEN_DRIVER_PARMS;
|
||||
typedef MCI_OPEN_DRIVER_PARMS FAR * LPMCI_OPEN_DRIVER_PARMS;
|
||||
|
||||
DWORD WINAPI mciGetDriverData(UINT uDeviceID);
|
||||
BOOL WINAPI mciSetDriverData(UINT uDeviceID, DWORD dwData);
|
||||
UINT WINAPI mciDriverYield(UINT uDeviceID);
|
||||
BOOL WINAPI mciDriverNotify(HWND hwndCallback, UINT uDeviceID,
|
||||
DWORD mciGetDriverData(UINT uDeviceID);
|
||||
BOOL mciSetDriverData(UINT uDeviceID, DWORD dwData);
|
||||
UINT mciDriverYield(UINT uDeviceID);
|
||||
BOOL mciDriverNotify(HWND hwndCallback, UINT uDeviceID,
|
||||
UINT uStatus);
|
||||
UINT WINAPI mciLoadCommandResource(HINSTANCE hInstance,
|
||||
UINT mciLoadCommandResource(HINSTANCE hInstance,
|
||||
LPCSTR lpResName, UINT uType);
|
||||
BOOL WINAPI mciFreeCommandResource(UINT uTable);
|
||||
BOOL mciFreeCommandResource(UINT uTable);
|
||||
|
||||
#define DCB_NULL 0x0000
|
||||
#define DCB_WINDOW 0x0001 /* dwCallback is a HWND */
|
||||
|
|
|
@ -10,7 +10,7 @@ struct dosdirent {
|
|||
DIR *ds;
|
||||
char unixpath[256];
|
||||
char filename[256];
|
||||
char filemask[12];
|
||||
char filemask[13];
|
||||
char attribute;
|
||||
char search_attribute;
|
||||
long filesize;
|
||||
|
@ -30,7 +30,9 @@ struct fcb {
|
|||
BYTE dummy2[9];
|
||||
};
|
||||
|
||||
#define DOSVERSION 0x0005; /* Major version in low byte: DOS 5.00 */
|
||||
#define DOSVERSION 0x0005 /* Major version in low byte: DOS 5.00 */
|
||||
#define WINVERSION 0x0a03 /* Windows version 3.10 */
|
||||
|
||||
#define MAX_DOS_DRIVES 26
|
||||
|
||||
extern WORD ExtendedError;
|
||||
|
|
12
include/ole2.h
Normal file
12
include/ole2.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* ole2.h - Declarations for OLE2
|
||||
*/
|
||||
|
||||
typedef LONG HRESULT;
|
||||
|
||||
#define S_OK 0
|
||||
#define S_FALSE 1
|
||||
|
||||
/* OLE version */
|
||||
#define rmm 23
|
||||
#define rup 639
|
|
@ -7,39 +7,45 @@
|
|||
|
||||
#include "wine.h"
|
||||
|
||||
#define EAX context->sc_eax
|
||||
#define EBX context->sc_ebx
|
||||
#define ECX context->sc_ecx
|
||||
#define EDX context->sc_edx
|
||||
#define EAX (context->sc_eax)
|
||||
#define EBX (context->sc_ebx)
|
||||
#define ECX (context->sc_ecx)
|
||||
#define EDX (context->sc_edx)
|
||||
#define ESI (context->sc_esi)
|
||||
#define EDI (context->sc_edi)
|
||||
|
||||
#define AX *(WORD*)&context->sc_eax
|
||||
#define BX *(WORD*)&context->sc_ebx
|
||||
#define CX *(WORD*)&context->sc_ecx
|
||||
#define DX *(WORD*)&context->sc_edx
|
||||
#define AX (*(WORD*)&context->sc_eax)
|
||||
#define BX (*(WORD*)&context->sc_ebx)
|
||||
#define CX (*(WORD*)&context->sc_ecx)
|
||||
#define DX (*(WORD*)&context->sc_edx)
|
||||
#define SI (*(WORD*)&context->sc_esi)
|
||||
#define DI (*(WORD*)&context->sc_edi)
|
||||
|
||||
#define AL *(BYTE*)&context->sc_eax
|
||||
#define AH *(((BYTE*)&context->sc_eax)+1)
|
||||
#define BL *(BYTE*)&context->sc_ebx
|
||||
#define BH *(((BYTE*)&context->sc_ebx)+1)
|
||||
#define CL *(BYTE*)&context->sc_ecx
|
||||
#define CH *(((BYTE*)&context->sc_ecx)+1)
|
||||
#define DL *(BYTE*)&context->sc_edx
|
||||
#define DH *(((BYTE*)&context->sc_edx)+1)
|
||||
#define AL (*(BYTE*)&context->sc_eax)
|
||||
#define AH (*(((BYTE*)&context->sc_eax)+1))
|
||||
#define BL (*(BYTE*)&context->sc_ebx)
|
||||
#define BH (*(((BYTE*)&context->sc_ebx)+1))
|
||||
#define CL (*(BYTE*)&context->sc_ecx)
|
||||
#define CH (*(((BYTE*)&context->sc_ecx)+1))
|
||||
#define DL (*(BYTE*)&context->sc_edx)
|
||||
#define DH (*(((BYTE*)&context->sc_edx)+1))
|
||||
|
||||
#define CS context->sc_cs
|
||||
#define DS context->sc_ds
|
||||
#define ES context->sc_es
|
||||
#define SS context->sc_ss
|
||||
#define CS (context->sc_cs)
|
||||
#define DS (context->sc_ds)
|
||||
#define ES (context->sc_es)
|
||||
#define SS (context->sc_ss)
|
||||
|
||||
#define DI ((WORD)context->sc_edi)
|
||||
#define SI ((WORD)context->sc_esi)
|
||||
#define SP context->sc_esp
|
||||
#ifndef __FreeBSD__
|
||||
#define EFL context->sc_eflags
|
||||
#define EFL (context->sc_eflags)
|
||||
#else
|
||||
#define EFL context->sc_efl
|
||||
#define EFL (context->sc_efl)
|
||||
#endif
|
||||
#define EIP context->sc_eip
|
||||
|
||||
#define EIP (context->sc_eip)
|
||||
#define ESP (context->sc_esp)
|
||||
|
||||
#define IP (*(WORD*)&context->sc_eip)
|
||||
#define SP (*(WORD*)&context->sc_esp)
|
||||
|
||||
#define SetCflag (EFL |= 0x00000001)
|
||||
#define ResetCflag (EFL &= 0xfffffffe)
|
||||
|
|
|
@ -79,7 +79,6 @@
|
|||
#undef DEBUG_ACCEL
|
||||
#undef DEBUG_BITBLT
|
||||
#undef DEBUG_BITMAP
|
||||
#undef DEBUG_CALLBACK
|
||||
#undef DEBUG_CARET
|
||||
#undef DEBUG_CATCH
|
||||
#undef DEBUG_CDAUDIO
|
||||
|
@ -104,7 +103,6 @@
|
|||
#undef DEBUG_GDI
|
||||
#undef DEBUG_GLOBAL
|
||||
#undef DEBUG_GRAPHICS
|
||||
#undef DEBUG_HEAP
|
||||
#undef DEBUG_ICON
|
||||
#undef DEBUG_INT
|
||||
#undef DEBUG_KEY
|
||||
|
@ -123,10 +121,10 @@
|
|||
#undef DEBUG_METAFILE
|
||||
#undef DEBUG_MIDI
|
||||
#undef DEBUG_MMIO
|
||||
#undef DEBUG_MMSYS
|
||||
#undef DEBUG_MMTIME
|
||||
#undef DEBUG_MODULE
|
||||
#undef DEBUG_MSG
|
||||
#undef DEBUG_MSGBOX
|
||||
#undef DEBUG_NONCLIENT
|
||||
#undef DEBUG_OLE
|
||||
#undef DEBUG_PALETTE
|
||||
|
@ -154,7 +152,6 @@
|
|||
#define DEBUG_ACCEL
|
||||
#define DEBUG_BITBLT
|
||||
#define DEBUG_BITMAP
|
||||
#define DEBUG_CALLBACK
|
||||
#define DEBUG_CARET
|
||||
#define DEBUG_CATCH
|
||||
#define DEBUG_CDAUDIO
|
||||
|
@ -179,7 +176,6 @@
|
|||
#define DEBUG_GDI
|
||||
#define DEBUG_GLOBAL
|
||||
#define DEBUG_GRAPHICS
|
||||
#define DEBUG_HEAP
|
||||
#define DEBUG_ICON
|
||||
#define DEBUG_INT
|
||||
#define DEBUG_KEY
|
||||
|
@ -198,10 +194,10 @@
|
|||
#define DEBUG_METAFILE
|
||||
#define DEBUG_MIDI
|
||||
#define DEBUG_MMIO
|
||||
#define DEBUG_MMSYS
|
||||
#define DEBUG_MMTIME
|
||||
#define DEBUG_MODULE
|
||||
#define DEBUG_MSG
|
||||
#define DEBUG_MSGBOX
|
||||
#define DEBUG_NONCLIENT
|
||||
#define DEBUG_OLE
|
||||
#define DEBUG_PALETTE
|
||||
|
|
|
@ -2125,6 +2125,8 @@ typedef COMPAREITEMSTRUCT FAR* LPCOMPAREITEMSTRUCT;
|
|||
|
||||
#define LMEM_FIXED 0
|
||||
#define LMEM_MOVEABLE 0x0002
|
||||
#define LMEM_NOCOMPACT 0x0010
|
||||
#define LMEM_NODISCARD 0x0020
|
||||
#define LMEM_ZEROINIT 0x0040
|
||||
#define LMEM_MODIFY 0x0080
|
||||
#define LMEM_DISCARDABLE 0x0F00
|
||||
|
@ -2815,9 +2817,9 @@ Fc(HWND,GetNextDlgTabItem,HWND,a,HWND,b,BOOL,c)
|
|||
Fc(INT,GetTextFace,HDC,a,INT,b,LPSTR,c)
|
||||
Fc(INT,OpenFile,LPSTR,a,LPOFSTRUCT,b,WORD,c)
|
||||
Fc(INT,_lread,INT,a,LPSTR,b,WORD,c)
|
||||
Fc(INT,_lwrite,INT,a,LPSTR,b,WORD,c)
|
||||
Fc(INT,_lwrite,INT,a,LPCSTR,b,WORD,c)
|
||||
Fc(LONG,_hread,INT,a,LPSTR,b,LONG,c)
|
||||
Fc(LONG,_hwrite,INT,a,LPSTR,b,LONG,c)
|
||||
Fc(LONG,_hwrite,INT,a,LPCSTR,b,LONG,c)
|
||||
Fc(LONG,GetBitmapBits,HBITMAP,a,LONG,b,LPSTR,c)
|
||||
Fc(LONG,SetBitmapBits,HBITMAP,a,LONG,b,LPSTR,c)
|
||||
Fc(LONG,SetClassLong,HWND,a,short,b,LONG,c)
|
||||
|
|
100
include/winnls.h
Normal file
100
include/winnls.h
Normal file
|
@ -0,0 +1,100 @@
|
|||
#define LOCALE_ILANGUAGE 0x00000001
|
||||
#define LOCALE_SLANGUAGE 0x00000002
|
||||
#define LOCALE_SENGLANGUAGE 0x00001001
|
||||
#define LOCALE_SABBREVLANGNAME 0x00000003
|
||||
#define LOCALE_SNATIVELANGNAME 0x00000004
|
||||
#define LOCALE_ICOUNTRY 0x00000005
|
||||
#define LOCALE_SCOUNTRY 0x00000006
|
||||
#define LOCALE_SENGCOUNTRY 0x00001002
|
||||
#define LOCALE_SABBREVCTRYNAME 0x00000007
|
||||
#define LOCALE_SNATIVECTRYNAME 0x00000008
|
||||
#define LOCALE_IDEFAULTLANGUAGE 0x00000009
|
||||
#define LOCALE_IDEFAULTCOUNTRY 0x0000000A
|
||||
#define LOCALE_IDEFAULTCODEPAGE 0x0000000B
|
||||
#define LOCALE_IDEFAULTANSICODEPAGE 0x00001004
|
||||
#define LOCALE_SLIST 0x0000000C
|
||||
#define LOCALE_IMEASURE 0x0000000D
|
||||
#define LOCALE_SDECIMAL 0x0000000E
|
||||
#define LOCALE_STHOUSAND 0x0000000F
|
||||
#define LOCALE_SGROUPING 0x00000010
|
||||
#define LOCALE_IDIGITS 0x00000011
|
||||
#define LOCALE_ILZERO 0x00000012
|
||||
#define LOCALE_INEGNUMBER 0x00001010
|
||||
#define LOCALE_SNATIVEDIGITS 0x00000013
|
||||
#define LOCALE_SCURRENCY 0x00000014
|
||||
#define LOCALE_SINTLSYMBOL 0x00000015
|
||||
#define LOCALE_SMONDECIMALSEP 0x00000016
|
||||
#define LOCALE_SMONTHOUSANDSEP 0x00000017
|
||||
#define LOCALE_SMONGROUPING 0x00000018
|
||||
#define LOCALE_ICURRDIGITS 0x00000019
|
||||
#define LOCALE_IINTLCURRDIGITS 0x0000001A
|
||||
#define LOCALE_ICURRENCY 0x0000001B
|
||||
#define LOCALE_INEGCURR 0x0000001C
|
||||
#define LOCALE_SDATE 0x0000001D
|
||||
#define LOCALE_STIME 0x0000001E
|
||||
#define LOCALE_SSHORTDATE 0x0000001F
|
||||
#define LOCALE_SLONGDATE 0x00000020
|
||||
#define LOCALE_STIMEFORMAT 0x00001003
|
||||
#define LOCALE_IDATE 0x00000021
|
||||
#define LOCALE_ILDATE 0x00000022
|
||||
#define LOCALE_ITIME 0x00000023
|
||||
#define LOCALE_ITIMEMARKPOSN 0x00001005
|
||||
#define LOCALE_ICENTURY 0x00000024
|
||||
#define LOCALE_ITLZERO 0x00000025
|
||||
#define LOCALE_IDAYLZERO 0x00000026
|
||||
#define LOCALE_IMONLZERO 0x00000027
|
||||
#define LOCALE_S1159 0x00000028
|
||||
#define LOCALE_S2359 0x00000029
|
||||
#define LOCALE_ICALENDARTYPE 0x00001009
|
||||
#define LOCALE_IOPTIONALCALENDAR 0x0000100B
|
||||
#define LOCALE_IFIRSTDAYOFWEEK 0x0000100C
|
||||
#define LOCALE_IFIRSTWEEKOFYEAR 0x0000100D
|
||||
#define LOCALE_SDAYNAME1 0x0000002A
|
||||
#define LOCALE_SDAYNAME2 0x0000002B
|
||||
#define LOCALE_SDAYNAME3 0x0000002C
|
||||
#define LOCALE_SDAYNAME4 0x0000002D
|
||||
#define LOCALE_SDAYNAME5 0x0000002E
|
||||
#define LOCALE_SDAYNAME6 0x0000002F
|
||||
#define LOCALE_SDAYNAME7 0x00000030
|
||||
#define LOCALE_SABBREVDAYNAME1 0x00000031
|
||||
#define LOCALE_SABBREVDAYNAME2 0x00000032
|
||||
#define LOCALE_SABBREVDAYNAME3 0x00000033
|
||||
#define LOCALE_SABBREVDAYNAME4 0x00000034
|
||||
#define LOCALE_SABBREVDAYNAME5 0x00000035
|
||||
#define LOCALE_SABBREVDAYNAME6 0x00000036
|
||||
#define LOCALE_SABBREVDAYNAME7 0x00000037
|
||||
#define LOCALE_SMONTHNAME1 0x00000038
|
||||
#define LOCALE_SMONTHNAME2 0x00000039
|
||||
#define LOCALE_SMONTHNAME3 0x0000003A
|
||||
#define LOCALE_SMONTHNAME4 0x0000003B
|
||||
#define LOCALE_SMONTHNAME5 0x0000003C
|
||||
#define LOCALE_SMONTHNAME6 0x0000003D
|
||||
#define LOCALE_SMONTHNAME7 0x0000003E
|
||||
#define LOCALE_SMONTHNAME8 0x0000003F
|
||||
#define LOCALE_SMONTHNAME9 0x00000040
|
||||
#define LOCALE_SMONTHNAME10 0x00000041
|
||||
#define LOCALE_SMONTHNAME11 0x00000042
|
||||
#define LOCALE_SMONTHNAME12 0x00000043
|
||||
#define LOCALE_SMONTHNAME13 0x0000100E
|
||||
#define LOCALE_SABBREVMONTHNAME1 0x00000044
|
||||
#define LOCALE_SABBREVMONTHNAME2 0x00000045
|
||||
#define LOCALE_SABBREVMONTHNAME3 0x00000046
|
||||
#define LOCALE_SABBREVMONTHNAME4 0x00000047
|
||||
#define LOCALE_SABBREVMONTHNAME5 0x00000048
|
||||
#define LOCALE_SABBREVMONTHNAME6 0x00000049
|
||||
#define LOCALE_SABBREVMONTHNAME7 0x0000004A
|
||||
#define LOCALE_SABBREVMONTHNAME8 0x0000004B
|
||||
#define LOCALE_SABBREVMONTHNAME9 0x0000004C
|
||||
#define LOCALE_SABBREVMONTHNAME10 0x0000004D
|
||||
#define LOCALE_SABBREVMONTHNAME11 0x0000004E
|
||||
#define LOCALE_SABBREVMONTHNAME12 0x0000004F
|
||||
#define LOCALE_SABBREVMONTHNAME13 0x0000100F
|
||||
#define LOCALE_SPOSITIVESIGN 0x00000050
|
||||
#define LOCALE_SNEGATIVESIGN 0x00000051
|
||||
#define LOCALE_IPOSSIGNPOSN 0x00000052
|
||||
#define LOCALE_INEGSIGNPOSN 0x00000053
|
||||
#define LOCALE_IPOSSYMPRECEDES 0x00000054
|
||||
#define LOCALE_IPOSSEPBYSPACE 0x00000055
|
||||
#define LOCALE_INEGSYMPRECEDES 0x00000056
|
||||
#define LOCALE_INEGSEPBYSPACE 0x00000057
|
||||
|
|
@ -31,8 +31,8 @@ typedef SEGPTR FARPROC;
|
|||
typedef SEGPTR WNDPROC;
|
||||
#endif
|
||||
typedef FARPROC DLGPROC;
|
||||
typedef int CATCHBUF[9];
|
||||
typedef int *LPCATCHBUF;
|
||||
typedef WORD CATCHBUF[9];
|
||||
typedef WORD *LPCATCHBUF;
|
||||
typedef FARPROC HOOKPROC;
|
||||
|
||||
#define DECLARE_HANDLE(a) typedef HANDLE a;
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
|
||||
static HMODULE hFirstModule = 0;
|
||||
static HMODULE hCachedModule = 0; /* Module cached by MODULE_OpenFile */
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -271,7 +272,6 @@ int MODULE_OpenFile( HMODULE hModule )
|
|||
NE_MODULE *pModule;
|
||||
char *name;
|
||||
|
||||
static HMODULE hCachedModule = 0;
|
||||
static int cachedfd = -1;
|
||||
|
||||
hModule = GetExePtr( hModule ); /* In case we were passed an hInstance */
|
||||
|
@ -306,8 +306,10 @@ static BOOL MODULE_CreateSegments( HMODULE hModule )
|
|||
if (i == pModule->ss) minsize += pModule->stack_size;
|
||||
if (i == pModule->dgroup)
|
||||
{
|
||||
#if 0
|
||||
/* FIXME: this is needed because heap growing is not implemented */
|
||||
pModule->heap_size = 0x10000 - minsize;
|
||||
#endif
|
||||
/* The DGROUP is allocated by MODULE_CreateInstance */
|
||||
continue;
|
||||
}
|
||||
|
@ -865,6 +867,10 @@ static void MODULE_FreeModule( HMODULE hModule )
|
|||
if (pModule->nrname_handle) GlobalFree( pModule->nrname_handle );
|
||||
if (pModule->dlls_to_init) GlobalFree( pModule->dlls_to_init );
|
||||
GlobalFree( hModule );
|
||||
|
||||
/* Remove module from cache */
|
||||
|
||||
if (hCachedModule == hModule) hCachedModule = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -997,6 +1003,8 @@ BOOL FreeModule( HANDLE hModule )
|
|||
hModule = GetExePtr( hModule ); /* In case we were passed an hInstance */
|
||||
if (!(pModule = (NE_MODULE *)GlobalLock( hModule ))) return FALSE;
|
||||
|
||||
dprintf_module( stddeb, "FreeModule: %s count %d\n",
|
||||
MODULE_GetModuleName(hModule), pModule->count );
|
||||
if (--pModule->count == 0) MODULE_FreeModule( hModule );
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1052,8 +1060,10 @@ HANDLE LoadLibrary( LPCSTR libname )
|
|||
HANDLE handle;
|
||||
|
||||
dprintf_module( stddeb, "LoadLibrary: (%08x) %s\n", (int)libname, libname);
|
||||
/* This does not increment the module reference count, and will
|
||||
* therefore cause crashes on FreeLibrary calls.
|
||||
if ((handle = MODULE_FindModule( libname )) != 0) return handle;
|
||||
|
||||
*/
|
||||
handle = LoadModule( libname, (LPVOID)-1 );
|
||||
if (handle == 2) /* file not found */
|
||||
{
|
||||
|
|
|
@ -48,6 +48,7 @@ BOOL NE_LoadSegment( HMODULE hModule, WORD segnum )
|
|||
pSegTable = NE_SEG_TABLE( pModule );
|
||||
pSeg = pSegTable + segnum - 1;
|
||||
pModuleTable = NE_MODULE_TABLE( pModule );
|
||||
|
||||
if (!pSeg->filepos) return TRUE; /* No file image, just return */
|
||||
|
||||
fd = MODULE_OpenFile( hModule );
|
||||
|
@ -56,14 +57,6 @@ BOOL NE_LoadSegment( HMODULE hModule, WORD segnum )
|
|||
lseek( fd, pSeg->filepos << pModule->alignment, SEEK_SET );
|
||||
read( fd, GlobalLock( pSeg->selector ), pSeg->size ? pSeg->size : 0x10000);
|
||||
|
||||
if ( pModule->heap_size && pModule->dgroup == segnum )
|
||||
{
|
||||
/* Initialize the local heap */
|
||||
WORD heapstart = pSeg->minsize;
|
||||
if (pModule->ss == pModule->dgroup) heapstart += pModule->stack_size;
|
||||
LocalInit( pSeg->selector, heapstart, heapstart + pModule->heap_size );
|
||||
}
|
||||
|
||||
if (!(pSeg->flags & NE_SEGFLAGS_RELOC_DATA))
|
||||
return TRUE; /* No relocation data, we are done */
|
||||
|
||||
|
@ -316,36 +309,51 @@ void NE_FixupPrologs( HMODULE hModule )
|
|||
p += 2;
|
||||
while (count-- > 0)
|
||||
{
|
||||
dprintf_module( stddeb,"Flags: %04x ", *p );
|
||||
/* FIXME: Does anyone know the exact meaning of these flags? */
|
||||
/* 0x0001 seems to mean: Fix up the function prolog */
|
||||
dprintf_module( stddeb,"Flags: %04x, sel %02x ", *p, sel);
|
||||
/* According to the output generated by TDUMP, the flags mean:
|
||||
* 0x0001 function is exported
|
||||
* 0x0002 Single data (seems to occur only in DLLs)
|
||||
*/
|
||||
if (sel == 0xff) { /* moveable */
|
||||
dprintf_module( stddeb, "(%02x) o %04x ", p[3], *(WORD *)(p+4) );
|
||||
fixup_ptr = (char *)GET_SEL_BASE(pSegTable[p[3]-1].selector) + *(WORD *)(p + 4);
|
||||
} else { /* fixed */
|
||||
dprintf_module( stddeb, "offset %04x ", *(WORD *)(p+1) );
|
||||
fixup_ptr = (char *)GET_SEL_BASE(pSegTable[sel-1].selector) + *(WORD *)(p + 1);
|
||||
}
|
||||
dprintf_module( stddeb, "Signature: %02x %02x %02x,ff %x\n",
|
||||
fixup_ptr[0], fixup_ptr[1], fixup_ptr[2],
|
||||
pModule->flags );
|
||||
if (*p & 0x0001)
|
||||
{
|
||||
if (sel == 0xff) /* moveable */
|
||||
fixup_ptr = (char *)GET_SEL_BASE(pSegTable[p[3]-1].selector) + *(WORD *)(p + 4);
|
||||
else /* fixed */
|
||||
fixup_ptr = (char *)GET_SEL_BASE(pSegTable[sel-1].selector) + *(WORD *)(p + 1);
|
||||
dprintf_module( stddeb, "Signature: %02x %02x %02x,ff %x\n",
|
||||
fixup_ptr[0], fixup_ptr[1], fixup_ptr[2],
|
||||
pModule->flags );
|
||||
/* Verify the signature */
|
||||
if (((fixup_ptr[0] == 0x1e && fixup_ptr[1] == 0x58)
|
||||
|| (fixup_ptr[0] == 0x8c && fixup_ptr[1] == 0xd8))
|
||||
&& fixup_ptr[2] == 0x90)
|
||||
{
|
||||
if (pModule->flags & NE_FFLAGS_SINGLEDATA)
|
||||
if (*p & 0x0002)
|
||||
{
|
||||
if (pModule->flags & NE_FFLAGS_MULTIPLEDATA) {
|
||||
/* can this happen? */
|
||||
fprintf( stderr, "FixupPrologs got confused\n" );
|
||||
}
|
||||
*fixup_ptr = 0xb8; /* MOV AX, */
|
||||
*(WORD *)(fixup_ptr+1) = dgroup;
|
||||
}
|
||||
else
|
||||
{
|
||||
fixup_ptr[0] = 0x90; /* non-library: NOPs */
|
||||
fixup_ptr[1] = 0x90;
|
||||
fixup_ptr[2] = 0x90;
|
||||
if (pModule->flags & NE_FFLAGS_MULTIPLEDATA) {
|
||||
fixup_ptr[0] = 0x90; /* non-library: NOPs */
|
||||
fixup_ptr[1] = 0x90;
|
||||
fixup_ptr[2] = 0x90;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
dprintf_fixup( stddeb, "Unknown signature\n" );
|
||||
}
|
||||
}
|
||||
else
|
||||
dprintf_module( stddeb,"\n");
|
||||
p += (sel == 0xff) ? 6 : 3;
|
||||
}
|
||||
}
|
||||
|
@ -423,13 +431,14 @@ void NE_InitializeDLLs( HMODULE hModule )
|
|||
pModule = (NE_MODULE *)GlobalLock( hModule );
|
||||
if (pModule->dlls_to_init)
|
||||
{
|
||||
for (pDLL = (WORD *)GlobalLock( pModule->dlls_to_init ); *pDLL; pDLL++)
|
||||
HANDLE to_init = pModule->dlls_to_init;
|
||||
pModule->dlls_to_init = 0;
|
||||
for (pDLL = (WORD *)GlobalLock( to_init ); *pDLL; pDLL++)
|
||||
{
|
||||
NE_InitDLL( *pDLL );
|
||||
NE_InitializeDLLs( *pDLL );
|
||||
NE_InitDLL( *pDLL );
|
||||
}
|
||||
GlobalFree( pModule->dlls_to_init );
|
||||
pModule->dlls_to_init = 0;
|
||||
GlobalFree( to_init );
|
||||
}
|
||||
NE_InitDLL( hModule );
|
||||
}
|
||||
|
|
|
@ -248,7 +248,7 @@ int NE_AccessResource( HMODULE hModule, HRSRC hRsrc )
|
|||
pNameInfo = (NE_NAMEINFO*)((char*)pModule + hRsrc);
|
||||
|
||||
name = ((LOADEDFILEINFO*)((char*)pModule + pModule->fileinfo))->filename;
|
||||
fd = open( name, O_RDONLY );
|
||||
fd = open( DOS_GetUnixFileName(name), O_RDONLY );
|
||||
sizeShift = *(WORD *)((char *)pModule + pModule->res_table);
|
||||
lseek( fd, (int)pNameInfo->offset << sizeShift, SEEK_SET );
|
||||
return fd;
|
||||
|
|
|
@ -372,6 +372,7 @@ HICON LoadIcon( HANDLE instance, SEGPTR icon_name )
|
|||
if (bih->biSize != sizeof(BITMAPINFOHEADER)) return 0;
|
||||
lpico->hBitmap = CreateDIBitmap( hdc, &pInfo->bmiHeader, CBM_INIT,
|
||||
(char*)bmi + size, pInfo, DIB_RGB_COLORS );
|
||||
|
||||
if (bih->biSizeImage == 0)
|
||||
{
|
||||
if (bih->biCompression != BI_RGB)
|
||||
|
@ -381,20 +382,18 @@ HICON LoadIcon( HANDLE instance, SEGPTR icon_name )
|
|||
ReleaseDC( 0, hdc);
|
||||
return 0;
|
||||
}
|
||||
bih->biSizeImage = DIB_GetImageWidthBytes(bih->biWidth,bih->biBitCount)
|
||||
* bih->biHeight;
|
||||
bih->biSizeImage = (DIB_GetImageWidthBytes(bih->biWidth,bih->biBitCount) +
|
||||
DIB_GetImageWidthBytes(bih->biWidth,1)) * bih->biHeight/2;
|
||||
}
|
||||
bits = (char *)bmi + size +
|
||||
bih->biSizeImage * bih->biBitCount / (bih->biBitCount+1);
|
||||
bih->biBitCount = 1;
|
||||
bih->biClrUsed = bih->biClrImportant = 2;
|
||||
rgbq = &bmi->bmiColors[0];
|
||||
rgbq = &pInfo->bmiColors[0];
|
||||
rgbq[0].rgbBlue = rgbq[0].rgbGreen = rgbq[0].rgbRed = 0x00;
|
||||
rgbq[1].rgbBlue = rgbq[1].rgbGreen = rgbq[1].rgbRed = 0xff;
|
||||
rgbq[0].rgbReserved = rgbq[1].rgbReserved = 0;
|
||||
lpico->hBitMask = CreateDIBitmap(hdc, &pInfo->bmiHeader, CBM_INIT,
|
||||
/* (LPSTR)bmi + bih->biSizeImage - sizeof(BITMAPINFOHEADER) / 2 - 4,
|
||||
(LPSTR)lp + bih->biSizeImage + bih->biSize + 4*lpicodesc->ColorCount, */
|
||||
bits, pInfo, DIB_RGB_COLORS );
|
||||
FreeResource( rsc_mem );
|
||||
ReleaseDC( 0, hdc);
|
||||
|
@ -612,19 +611,20 @@ LoadString(HANDLE instance, WORD resource_id, LPSTR buffer, int buflen)
|
|||
for (i = 0; i < string_num; i++)
|
||||
p += *p + 1;
|
||||
|
||||
dprintf_resource( stddeb, "strlen = %d\n", (int)*p );
|
||||
|
||||
i = min(buflen - 1, *p);
|
||||
if (i > 0) {
|
||||
memcpy(buffer, p + 1, i);
|
||||
buffer[i] = '\0';
|
||||
}
|
||||
else {
|
||||
if (buflen > 1) {
|
||||
buffer[0] = '\0';
|
||||
return 0;
|
||||
}
|
||||
fprintf(stderr,"LoadString // I dont know why , but caller give buflen=%d *p=%d !\n", buflen, *p);
|
||||
fprintf(stderr,"LoadString // and try to obtain string '%s'\n", p + 1);
|
||||
}
|
||||
if (i > 0) {
|
||||
memcpy(buffer, p + 1, i);
|
||||
buffer[i] = '\0';
|
||||
} else {
|
||||
if (buflen > 1) {
|
||||
buffer[0] = '\0';
|
||||
return 0;
|
||||
}
|
||||
fprintf(stderr,"LoadString // I dont know why , but caller give buflen=%d *p=%d !\n", buflen, *p);
|
||||
fprintf(stderr,"LoadString // and try to obtain string '%s'\n", p + 1);
|
||||
}
|
||||
FreeResource( hmem );
|
||||
|
||||
dprintf_resource(stddeb,"LoadString // '%s' copied !\n", buffer);
|
||||
|
|
165
loader/signal.c
165
loader/signal.c
|
@ -15,7 +15,6 @@
|
|||
#endif
|
||||
|
||||
#include "wine.h"
|
||||
#include "dos_fs.h"
|
||||
#include "prototypes.h"
|
||||
#include "miscemu.h"
|
||||
#include "registers.h"
|
||||
|
@ -45,46 +44,6 @@ wine_sigaction(int sig,struct sigaction * new, struct sigaction * old)
|
|||
}
|
||||
#endif
|
||||
|
||||
int do_int(int intnum, struct sigcontext_struct *context)
|
||||
{
|
||||
switch(intnum)
|
||||
{
|
||||
case 0x10: return do_int10(context);
|
||||
|
||||
case 0x11:
|
||||
AX = DOS_GetEquipment();
|
||||
return 1;
|
||||
|
||||
case 0x12:
|
||||
AX = 640;
|
||||
return 1; /* get base mem size */
|
||||
|
||||
case 0x13: return do_int13(context);
|
||||
case 0x15: return do_int15(context);
|
||||
case 0x16: return do_int16(context);
|
||||
case 0x1a: return do_int1a(context);
|
||||
case 0x21: return do_int21(context);
|
||||
|
||||
case 0x22:
|
||||
AX = 0x1234;
|
||||
BX = 0x5678;
|
||||
CX = 0x9abc;
|
||||
DX = 0xdef0;
|
||||
return 1;
|
||||
|
||||
case 0x25: return do_int25(context);
|
||||
case 0x26: return do_int26(context);
|
||||
case 0x2a: return do_int2a(context);
|
||||
case 0x2f: return do_int2f(context);
|
||||
case 0x31: return do_int31(context);
|
||||
case 0x5c: return do_int5c(context);
|
||||
|
||||
default:
|
||||
fprintf(stderr,"int%02x: Unimplemented!\n", intnum);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
static void win_fault(int signal, struct sigcontext_struct context_struct)
|
||||
|
@ -94,131 +53,19 @@ static void win_fault(int signal, struct sigcontext_struct context_struct)
|
|||
static void win_fault(int signal, int code, struct sigcontext *context)
|
||||
{
|
||||
#endif
|
||||
unsigned char * instr;
|
||||
WORD *stack;
|
||||
|
||||
#if !(defined (linux) || defined (__NetBSD__))
|
||||
int i, *dump;
|
||||
#endif
|
||||
|
||||
/* First take care of a few preliminaries */
|
||||
#ifdef linux
|
||||
if(signal != SIGSEGV
|
||||
&& signal != SIGILL
|
||||
&& signal != SIGFPE
|
||||
#ifdef SIGBUS
|
||||
&& signal != SIGBUS
|
||||
#endif
|
||||
&& signal != SIGTRAP)
|
||||
if(signal == SIGTRAP) EIP--; /* Back up over the int3 instruction. */
|
||||
else if (CS == WINE_CODE_SELECTOR)
|
||||
{
|
||||
exit(1);
|
||||
fprintf(stderr, "Segmentation fault in Wine program (%x:%lx)."
|
||||
" Please debug\n", CS, EIP );
|
||||
}
|
||||
else if (INSTR_EmulateInstruction( context )) return;
|
||||
|
||||
/* And back up over the int3 instruction. */
|
||||
if(signal == SIGTRAP) {
|
||||
EIP--;
|
||||
goto oops;
|
||||
}
|
||||
#endif
|
||||
#ifdef __NetBSD__
|
||||
/* set_es(0x1f); set_ds(0x1f); */
|
||||
if(signal != SIGBUS && signal != SIGSEGV && signal != SIGTRAP)
|
||||
exit(1);
|
||||
#endif
|
||||
#ifdef __FreeBSD__
|
||||
/* set_es(0x27); set_ds(0x27); */
|
||||
if(signal != SIGBUS && signal != SIGSEGV && signal != SIGTRAP)
|
||||
exit(1);
|
||||
#endif
|
||||
if (CS == WINE_CODE_SELECTOR)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"Segmentation fault in Wine program (%x:%lx)."
|
||||
" Please debug\n", CS, EIP );
|
||||
goto oops;
|
||||
}
|
||||
|
||||
/* Now take a look at the actual instruction where the program
|
||||
bombed */
|
||||
instr = (unsigned char *) PTR_SEG_OFF_TO_LIN( CS, EIP );
|
||||
|
||||
switch(*instr)
|
||||
{
|
||||
case 0xcd: /* int <XX> */
|
||||
instr++;
|
||||
if (!do_int(*instr, context)) {
|
||||
fprintf(stderr,"Unexpected Windows interrupt %x\n", *instr);
|
||||
goto oops;
|
||||
}
|
||||
EIP += 2; /* Bypass the int instruction */
|
||||
break;
|
||||
|
||||
case 0xcf: /* iret */
|
||||
stack = (WORD *)PTR_SEG_OFF_TO_LIN( SS, SP );
|
||||
EIP = *stack++;
|
||||
CS = *stack++;
|
||||
EFL = *stack;
|
||||
SP += 6; /* Pop the return address and flags */
|
||||
break;
|
||||
|
||||
case 0xe4: /* inb al,XX */
|
||||
inportb_abs(context);
|
||||
EIP += 2;
|
||||
break;
|
||||
|
||||
case 0xe5: /* in ax,XX */
|
||||
inport_abs(context);
|
||||
EIP += 2;
|
||||
break;
|
||||
|
||||
case 0xe6: /* outb XX,al */
|
||||
outportb_abs(context);
|
||||
EIP += 2;
|
||||
break;
|
||||
|
||||
case 0xe7: /* out XX,ax */
|
||||
outport_abs(context);
|
||||
EIP += 2;
|
||||
break;
|
||||
|
||||
case 0xec: /* inb al,dx */
|
||||
inportb(context);
|
||||
EIP++;
|
||||
break;
|
||||
|
||||
case 0xed: /* in ax,dx */
|
||||
inport(context);
|
||||
EIP++;
|
||||
break;
|
||||
|
||||
case 0xee: /* outb dx,al */
|
||||
outportb(context);
|
||||
EIP++;
|
||||
break;
|
||||
|
||||
case 0xef: /* out dx,ax */
|
||||
outport(context);
|
||||
EIP++;
|
||||
break;
|
||||
|
||||
case 0xfa: /* cli, ignored */
|
||||
EIP++;
|
||||
break;
|
||||
|
||||
case 0xfb: /* sti, ignored */
|
||||
EIP++;
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr, "Unexpected Windows program segfault"
|
||||
" - opcode = %x\n", *instr);
|
||||
goto oops;
|
||||
}
|
||||
|
||||
/* OK, done handling the interrupt */
|
||||
|
||||
return;
|
||||
|
||||
oops:
|
||||
XUngrabPointer(display, CurrentTime);
|
||||
XUngrabServer(display);
|
||||
XFlush(display);
|
||||
|
|
|
@ -529,6 +529,9 @@ void InitTask( struct sigcontext_struct context )
|
|||
static int firstTask = 1;
|
||||
TDB *pTask;
|
||||
NE_MODULE *pModule;
|
||||
SEGTABLEENTRY *pSegTable;
|
||||
INSTANCEDATA *pinstance;
|
||||
LONG stacklow, stackhi;
|
||||
|
||||
context.sc_eax = 0;
|
||||
if (!(pTask = (TDB *)GlobalLock( hCurrentTask ))) return;
|
||||
|
@ -567,6 +570,23 @@ void InitTask( struct sigcontext_struct context )
|
|||
context.sc_esi = pTask->hPrevInstance;
|
||||
context.sc_edi = pTask->hInstance;
|
||||
context.sc_es = pTask->hPDB;
|
||||
|
||||
/* Initialize the local heap */
|
||||
if ( pModule->heap_size )
|
||||
{
|
||||
LocalInit( pTask->hInstance, 0, pModule->heap_size );
|
||||
}
|
||||
|
||||
|
||||
/* Initialize the INSTANCEDATA structure */
|
||||
pSegTable = NE_SEG_TABLE( pModule );
|
||||
stacklow = pSegTable[pModule->ss - 1].minsize;
|
||||
stackhi = stacklow + pModule->stack_size;
|
||||
if (stackhi > 0xffff) stackhi = 0xffff;
|
||||
pinstance = (INSTANCEDATA *)PTR_SEG_OFF_TO_LIN(CURRENT_DS, 0);
|
||||
pinstance->stackbottom = stackhi; /* yup, that's right. Confused me too. */
|
||||
pinstance->stacktop = stacklow;
|
||||
pinstance->stackmin = IF1632_Saved16_sp;
|
||||
}
|
||||
|
||||
|
||||
|
@ -585,8 +605,8 @@ BOOL WaitEvent( HTASK hTask )
|
|||
return FALSE;
|
||||
}
|
||||
TASK_SCHEDULE();
|
||||
/* When we get back here, we have an event */
|
||||
pTask->nEvents--;
|
||||
/* When we get back here, we have an event (or the task is the only one) */
|
||||
if (pTask->nEvents > 0) pTask->nEvents--;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -307,7 +307,6 @@ SEGPTR WIN16_GlobalLock( HGLOBAL handle )
|
|||
*/
|
||||
LPSTR GlobalLock( HGLOBAL handle )
|
||||
{
|
||||
dprintf_global( stddeb, "GlobalLock: %04x\n", handle );
|
||||
if (!handle) return 0;
|
||||
return (LPSTR)GET_ARENA_PTR(handle)->base;
|
||||
}
|
||||
|
@ -452,7 +451,7 @@ WORD GlobalDOSFree( WORD sel )
|
|||
*/
|
||||
LONG SetSwapAreaSize( WORD size )
|
||||
{
|
||||
dprintf_heap(stdnimp, "STUB: SetSwapAreaSize(%d)\n", size );
|
||||
dprintf_global(stdnimp, "STUB: SetSwapAreaSize(%d)\n", size );
|
||||
return MAKELONG( size, 0xffff );
|
||||
}
|
||||
|
||||
|
|
117
memory/ldt.c
117
memory/ldt.c
|
@ -32,13 +32,17 @@ extern int i386_set_ldt(int, union descriptor *, int);
|
|||
|
||||
#endif /* ifndef WINELIB */
|
||||
|
||||
|
||||
ldt_copy_entry ldt_copy[LDT_SIZE] = { {0,0}, };
|
||||
unsigned char ldt_flags_copy[LDT_SIZE] = { 0, };
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* LDT_BytesToEntry
|
||||
*
|
||||
* Convert the raw bytes of the descriptor to an ldt_entry structure.
|
||||
*/
|
||||
static void LDT_BytesToEntry( unsigned long *buffer, ldt_entry *content )
|
||||
void LDT_BytesToEntry( const unsigned long *buffer, ldt_entry *content )
|
||||
{
|
||||
content->base = (*buffer >> 16) & 0x0000ffff;
|
||||
content->limit = *buffer & 0x0000ffff;
|
||||
|
@ -52,6 +56,26 @@ static void LDT_BytesToEntry( unsigned long *buffer, ldt_entry *content )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* LDT_EntryToBytes
|
||||
*
|
||||
* Convert an ldt_entry structure to the raw bytes of the descriptor.
|
||||
*/
|
||||
void LDT_EntryToBytes( unsigned long *buffer, const ldt_entry *content )
|
||||
{
|
||||
*buffer++ = ((content->base & 0x0000ffff) << 16) |
|
||||
(content->limit & 0x0ffff);
|
||||
*buffer = (content->base & 0xff000000) |
|
||||
((content->base & 0x00ff0000)>>16) |
|
||||
(content->limit & 0xf0000) |
|
||||
(content->type << 10) |
|
||||
((content->read_only == 0) << 9) |
|
||||
((content->seg_32bit != 0) << 22) |
|
||||
((content->limit_in_pages != 0) << 23) |
|
||||
0xf000;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* LDT_GetEntry
|
||||
*
|
||||
|
@ -61,31 +85,12 @@ int LDT_GetEntry( int entry, ldt_entry *content )
|
|||
{
|
||||
int ret = 0;
|
||||
|
||||
#ifdef WINELIB
|
||||
content->base = ldt_copy[entry].base;
|
||||
content->limit = ldt_copy[entry].limit;
|
||||
content->type = SEGMENT_DATA;
|
||||
content->seg_32bit = 0;
|
||||
content->read_only = 0;
|
||||
content->limit_in_pages = 0;
|
||||
#else /* WINELIB */
|
||||
|
||||
#ifdef linux
|
||||
int size = (entry + 1) * 2 * sizeof(long);
|
||||
long *buffer = (long *) malloc( size );
|
||||
ret = modify_ldt( 0, buffer, size );
|
||||
LDT_BytesToEntry( &buffer[entry*2], content );
|
||||
free( buffer );
|
||||
#endif /* linux */
|
||||
|
||||
#if defined(__NetBSD__) || defined(__FreeBSD__)
|
||||
long buffer[2];
|
||||
ret = i386_get_ldt( entry, (union descriptor *)buffer, 1 );
|
||||
LDT_BytesToEntry( buffer, content );
|
||||
#endif /* __NetBSD__ || __FreeBSD__ */
|
||||
|
||||
#endif /* WINELIB */
|
||||
|
||||
content->type = (ldt_flags_copy[entry] & LDT_FLAGS_TYPE);
|
||||
content->seg_32bit = (ldt_flags_copy[entry] & LDT_FLAGS_32BIT) != 0;
|
||||
content->read_only = (ldt_flags_copy[entry] & LDT_FLAGS_READONLY) !=0;
|
||||
content->limit_in_pages = (ldt_flags_copy[entry] & LDT_FLAGS_BIG) !=0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -95,7 +100,7 @@ int LDT_GetEntry( int entry, ldt_entry *content )
|
|||
*
|
||||
* Set an LDT entry.
|
||||
*/
|
||||
int LDT_SetEntry( int entry, ldt_entry *content )
|
||||
int LDT_SetEntry( int entry, const ldt_entry *content )
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
|
@ -108,6 +113,9 @@ int LDT_SetEntry( int entry, ldt_entry *content )
|
|||
content->read_only || (content->type & SEGMENT_CODE) ? '-' : 'w',
|
||||
(content->type & SEGMENT_CODE) ? 'x' : '-' );
|
||||
|
||||
/* Entry 0 must not be modified; its base and limit are always 0 */
|
||||
if (!entry) return 0;
|
||||
|
||||
#ifndef WINELIB
|
||||
#ifdef linux
|
||||
{
|
||||
|
@ -129,16 +137,7 @@ int LDT_SetEntry( int entry, ldt_entry *content )
|
|||
{
|
||||
long d[2];
|
||||
|
||||
d[0] = ((content->base & 0x0000ffff) << 16) |
|
||||
(content->limit & 0x0ffff);
|
||||
d[1] = (content->base & 0xff000000) |
|
||||
((content->base & 0x00ff0000)>>16) |
|
||||
(content->limit & 0xf0000) |
|
||||
(content->type << 10) |
|
||||
((content->read_only == 0) << 9) |
|
||||
((content->seg_32bit != 0) << 22) |
|
||||
((content->limit_in_pages != 0) << 23) |
|
||||
0xf000;
|
||||
LDT_EntryToBytes( d, content );
|
||||
ret = i386_set_ldt(entry, (union descriptor *)d, 1);
|
||||
if (ret < 0)
|
||||
{
|
||||
|
@ -155,6 +154,10 @@ int LDT_SetEntry( int entry, ldt_entry *content )
|
|||
ldt_copy[entry].base = content->base;
|
||||
if (!content->limit_in_pages) ldt_copy[entry].limit = content->limit;
|
||||
else ldt_copy[entry].limit = (content->limit << 12) | 0x0fff;
|
||||
ldt_flags_copy[entry] = (content->type & LDT_FLAGS_TYPE) |
|
||||
(content->read_only ? LDT_FLAGS_READONLY : 0) |
|
||||
(content->seg_32bit ? LDT_FLAGS_32BIT : 0) |
|
||||
(content->limit_in_pages ? LDT_FLAGS_BIG : 0);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -167,40 +170,28 @@ int LDT_SetEntry( int entry, ldt_entry *content )
|
|||
void LDT_Print()
|
||||
{
|
||||
int i;
|
||||
char flags[3];
|
||||
|
||||
#ifdef WINELIB
|
||||
for (i = 0; i < LDT_SIZE; i++)
|
||||
{
|
||||
if (ldt_copy[i].base || ldt_copy[i].limit)
|
||||
if (!ldt_copy[i].base && !ldt_copy[i].limit) continue; /* Free entry */
|
||||
if ((ldt_flags_copy[i] & LDT_FLAGS_TYPE) == SEGMENT_CODE)
|
||||
{
|
||||
fprintf( stderr, "%04x: sel=%04x base=%08x limit=%05x\n",
|
||||
i, ENTRY_TO_SELECTOR(i),
|
||||
ldt_copy[i].base, ldt_copy[i].limit );
|
||||
flags[0] = (ldt_flags_copy[i] & LDT_FLAGS_EXECONLY) ? '-' : 'r';
|
||||
flags[1] = '-';
|
||||
flags[2] = 'x';
|
||||
}
|
||||
}
|
||||
#else /* WINELIB */
|
||||
|
||||
long buffer[2*LDT_SIZE];
|
||||
ldt_entry content;
|
||||
int n;
|
||||
|
||||
#ifdef linux
|
||||
n = modify_ldt( 0, buffer, sizeof(buffer) ) / 8;
|
||||
#endif /* linux */
|
||||
#if defined(__NetBSD__) || defined(__FreeBSD__)
|
||||
n = i386_get_ldt( 0, (union descriptor *)buffer, LDT_SIZE );
|
||||
#endif /* __NetBSD__ || __FreeBSD__ */
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
LDT_BytesToEntry( &buffer[2*i], &content );
|
||||
if (content.base || content.limit)
|
||||
else
|
||||
{
|
||||
fprintf( stderr, "%04x: sel=%04x base=%08lx limit=%05lx %s type=%d\n",
|
||||
i, ENTRY_TO_SELECTOR(i),
|
||||
content.base, content.limit,
|
||||
content.limit_in_pages ? "(pages)" : "(bytes)",
|
||||
content.type );
|
||||
flags[0] = 'r';
|
||||
flags[1] = (ldt_flags_copy[i] & LDT_FLAGS_READONLY) ? '-' : 'w';
|
||||
flags[2] = '-';
|
||||
}
|
||||
printf("%04x: sel=%04x base=%08lx limit=%05lx %s %d-bit %c%c%c\n",
|
||||
i, ENTRY_TO_SELECTOR(i),
|
||||
ldt_copy[i].base, ldt_copy[i].limit,
|
||||
ldt_flags_copy[i] & LDT_FLAGS_BIG ? "(pages)" : "(bytes)",
|
||||
ldt_flags_copy[i] & LDT_FLAGS_32BIT ? 32 : 16,
|
||||
flags[0], flags[1], flags[2] );
|
||||
}
|
||||
#endif /* WINELIB */
|
||||
}
|
||||
|
|
190
memory/local.c
190
memory/local.c
|
@ -47,9 +47,6 @@ typedef struct
|
|||
#define LOCAL_ARENA_FIXED 1
|
||||
#define LOCAL_ARENA_MOVEABLE 3
|
||||
|
||||
#define LMEM_NOCOMPACT 0x0010
|
||||
#define LMEM_NODISCARD 0x0020
|
||||
|
||||
typedef struct
|
||||
{
|
||||
WORD addr; /* Address of the MOVEABLE block */
|
||||
|
@ -109,7 +106,7 @@ static LOCALHEAPINFO *LOCAL_GetHeap( WORD ds )
|
|||
{
|
||||
LOCALHEAPINFO *pInfo;
|
||||
INSTANCEDATA *ptr = (INSTANCEDATA *)PTR_SEG_OFF_TO_LIN( ds, 0 );
|
||||
dprintf_local( stddeb, "Heap at %04x\n", ptr->heap );
|
||||
dprintf_local( stddeb, "Heap at %p, %04x\n", ptr, ptr->heap );
|
||||
if (!ptr->heap) return 0;
|
||||
pInfo = (LOCALHEAPINFO*)((char*)ptr + ptr->heap);
|
||||
if (pInfo->magic != LOCAL_HEAP_MAGIC) return NULL;
|
||||
|
@ -304,26 +301,30 @@ HLOCAL LocalInit( WORD selector, WORD start, WORD end )
|
|||
|
||||
dprintf_local(stddeb, "LocalInit: %04x %04x-%04x\n", selector, start, end);
|
||||
if (!selector) selector = CURRENT_DS;
|
||||
ptr = PTR_SEG_OFF_TO_LIN( selector, 0 );
|
||||
pHeapInfo = LOCAL_GetHeap(selector);
|
||||
/* If there's already a local heap in this segment, */
|
||||
/* we simply return TRUE. This helps some programs. */
|
||||
|
||||
if (pHeapInfo) {
|
||||
dprintf_local(stddeb,"LocalInit: Heap %04x initialized twice.\n",selector);
|
||||
fprintf( stderr, "LocalInit: Heap %04x initialized twice.\n", selector);
|
||||
if (debugging_local) LOCAL_PrintHeap(selector);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#if 0
|
||||
#if 1
|
||||
if (start == 0) {
|
||||
/* Check if the segment is the DGROUP of a module */
|
||||
|
||||
if ((pModule = (NE_MODULE *)GlobalLock( GetExePtr( selector ) )))
|
||||
{
|
||||
SEGTABLEENTRY *pSeg = NE_SEG_TABLE( pModule ) + pModule->dgroup - 1;
|
||||
if (pModule->dgroup && (pSeg->selector == selector))
|
||||
start = max( start, pSeg->minsize );
|
||||
if ((pModule = (NE_MODULE *)GlobalLock( GetExePtr( selector ) )))
|
||||
{
|
||||
SEGTABLEENTRY *pSeg = NE_SEG_TABLE( pModule ) + pModule->dgroup - 1;
|
||||
if (pModule->dgroup && (pSeg->selector == selector)) {
|
||||
start = GlobalSize( GlobalHandle( selector ) );
|
||||
start -= end;
|
||||
end += start;
|
||||
dprintf_local( stddeb," new start %04x, minstart: %04x\n", start, pSeg->minsize + pModule->stack_size);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
ptr = PTR_SEG_OFF_TO_LIN( selector, 0 );
|
||||
|
||||
start = LALIGN( max( start, sizeof(INSTANCEDATA) ) );
|
||||
heapInfoArena = LALIGN(start + sizeof(LOCALARENA) );
|
||||
|
@ -388,14 +389,86 @@ HLOCAL LocalInit( WORD selector, WORD start, WORD end )
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* LOCAL_GrowHeap
|
||||
*/
|
||||
static void LOCAL_GrowHeap( WORD ds )
|
||||
{
|
||||
HANDLE hseg = GlobalHandle( ds );
|
||||
LONG oldsize = GlobalSize( hseg );
|
||||
LONG end;
|
||||
LOCALHEAPINFO *pHeapInfo;
|
||||
WORD freeArena, lastArena;
|
||||
LOCALARENA *pArena, *pLastArena;
|
||||
char *ptr;
|
||||
|
||||
/* if nothing can be gained, return */
|
||||
if (oldsize > 0xfff0) return;
|
||||
hseg = GlobalReAlloc( hseg, 0x10000, GMEM_FIXED );
|
||||
ptr = PTR_SEG_OFF_TO_LIN( ds, 0 );
|
||||
pHeapInfo = LOCAL_GetHeap( ds );
|
||||
if (pHeapInfo == NULL) {
|
||||
fprintf( stderr, "Local_GrowHeap: heap not found\n" );
|
||||
return;
|
||||
}
|
||||
end = GlobalSize( hseg );
|
||||
lastArena = (end - sizeof(LOCALARENA)) & ~3;
|
||||
|
||||
/* Update the HeapInfo */
|
||||
pHeapInfo->items++;
|
||||
freeArena = pHeapInfo->last;
|
||||
pHeapInfo->last = lastArena;
|
||||
pHeapInfo->minsize += end - oldsize;
|
||||
|
||||
/* grow the old last block */
|
||||
/* FIXME: merge two adjacent free blocks */
|
||||
pArena = ARENA_PTR( ptr, freeArena );
|
||||
pArena->size = lastArena - freeArena;
|
||||
pArena->next = lastArena;
|
||||
pArena->free_next = lastArena;
|
||||
|
||||
/* Initialise the new last block */
|
||||
|
||||
pLastArena = ARENA_PTR( ptr, lastArena );
|
||||
pLastArena->prev = freeArena | LOCAL_ARENA_FREE;
|
||||
pLastArena->next = lastArena; /* this one */
|
||||
pLastArena->size = LALIGN(sizeof(LOCALARENA));
|
||||
pLastArena->free_prev = freeArena;
|
||||
pLastArena->free_next = lastArena; /* this one */
|
||||
|
||||
dprintf_local( stddeb, "Heap expanded\n" );
|
||||
LOCAL_PrintHeap( ds );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* LOCAL_Compact
|
||||
*/
|
||||
static WORD LOCAL_Compact( WORD ds, WORD minfree, WORD flags )
|
||||
{
|
||||
if (flags & LMEM_NOCOMPACT) return 0;
|
||||
char *ptr = PTR_SEG_OFF_TO_LIN( ds, 0 );
|
||||
LOCALHEAPINFO *pInfo;
|
||||
LOCALARENA *pArena;
|
||||
WORD arena;
|
||||
WORD freespace = 0;
|
||||
|
||||
return 0;
|
||||
if (!(pInfo = LOCAL_GetHeap( ds ))) {
|
||||
dprintf_local( stddeb, "Local_FindFreeBlock: Local heap not found\n" );
|
||||
LOCAL_PrintHeap(ds);
|
||||
return 0;
|
||||
}
|
||||
|
||||
arena = pInfo->first;
|
||||
pArena = ARENA_PTR( ptr, arena );
|
||||
while (arena != pArena->free_next) {
|
||||
arena = pArena->free_next;
|
||||
pArena = ARENA_PTR( ptr, arena );
|
||||
if (pArena->size >= freespace) freespace = pArena->size;
|
||||
}
|
||||
|
||||
if (flags & LMEM_NOCOMPACT) return freespace;
|
||||
|
||||
if (flags & LMEM_NODISCARD) return freespace;
|
||||
return freespace;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -428,6 +501,8 @@ static HLOCAL LOCAL_FindFreeBlock( WORD ds, WORD size )
|
|||
|
||||
/***********************************************************************
|
||||
* LOCAL_GetBlock
|
||||
* The segment may get moved around in this function, so all callers
|
||||
* should reset their pointer variables.
|
||||
*/
|
||||
static HLOCAL LOCAL_GetBlock( WORD ds, WORD size, WORD flags )
|
||||
{
|
||||
|
@ -448,11 +523,20 @@ static HLOCAL LOCAL_GetBlock( WORD ds, WORD size, WORD flags )
|
|||
/* Find a suitable free block */
|
||||
arena = LOCAL_FindFreeBlock( ds, size );
|
||||
if (arena == 0) {
|
||||
/* no space: try to make some */
|
||||
LOCAL_Compact( ds, size, flags );
|
||||
arena = LOCAL_FindFreeBlock( ds, size );
|
||||
}
|
||||
if (arena == 0) {
|
||||
/* still no space: try to grow the segment */
|
||||
LOCAL_GrowHeap( ds );
|
||||
ptr = PTR_SEG_OFF_TO_LIN( ds, 0 );
|
||||
pInfo = LOCAL_GetHeap( ds );
|
||||
arena = LOCAL_FindFreeBlock( ds, size );
|
||||
}
|
||||
if (arena == 0) {
|
||||
fprintf( stderr, "Local_GetBlock: not enough space!\n" );
|
||||
return 0;
|
||||
}
|
||||
|
||||
dprintf_local( stddeb, "LOCAL_GetBlock size = %04x\n", size );
|
||||
|
@ -466,6 +550,10 @@ static HLOCAL LOCAL_GetBlock( WORD ds, WORD size, WORD flags )
|
|||
}
|
||||
LOCAL_RemoveFreeBlock( ptr, arena );
|
||||
|
||||
if (flags & LMEM_ZEROINIT) {
|
||||
memset( (char *)pArena + ARENA_HEADER_SIZE, 0, size - ARENA_HEADER_SIZE );
|
||||
}
|
||||
|
||||
dprintf_local( stddeb, "Local_GetBlock: arena at %04x\n", arena );
|
||||
return arena + ARENA_HEADER_SIZE;
|
||||
}
|
||||
|
@ -487,6 +575,8 @@ static BOOL LOCAL_NewHTable( WORD ds )
|
|||
}
|
||||
|
||||
handle = LOCAL_GetBlock( ds, pInfo->hdelta*4 + 2, LMEM_FIXED );
|
||||
ptr = PTR_SEG_OFF_TO_LIN( ds, 0 );
|
||||
pInfo = LOCAL_GetHeap( ds );
|
||||
if (handle == 0) return FALSE;
|
||||
*(WORD *)(ptr + handle) = 0; /* no handles in this block yet */
|
||||
pInfo->htable = handle;
|
||||
|
@ -508,10 +598,16 @@ static HLOCAL LOCAL_GetNewHandle( WORD ds )
|
|||
return 0;
|
||||
}
|
||||
/* Check if we need a new handle table */
|
||||
if (pInfo->htable == 0)
|
||||
if (pInfo->htable == 0) {
|
||||
if (!LOCAL_NewHTable( ds )) return 0;
|
||||
if (*(WORD *)(ptr + pInfo->htable) == pInfo->hdelta)
|
||||
ptr = PTR_SEG_OFF_TO_LIN( ds, 0 );
|
||||
pInfo = LOCAL_GetHeap( ds );
|
||||
}
|
||||
if (*(WORD *)(ptr + pInfo->htable) == pInfo->hdelta) {
|
||||
if (!LOCAL_NewHTable( ds )) return 0;
|
||||
ptr = PTR_SEG_OFF_TO_LIN( ds, 0 );
|
||||
pInfo = LOCAL_GetHeap( ds );
|
||||
}
|
||||
|
||||
/* increase count */
|
||||
count = (*(WORD *)(ptr + pInfo->htable))++;
|
||||
|
@ -598,7 +694,7 @@ HLOCAL LOCAL_Free( WORD ds, HLOCAL handle )
|
|||
*/
|
||||
HLOCAL LOCAL_Alloc( WORD ds, WORD flags, WORD size )
|
||||
{
|
||||
char *ptr = PTR_SEG_OFF_TO_LIN( ds, 0 );
|
||||
char *ptr;
|
||||
HLOCAL handle;
|
||||
|
||||
dprintf_local( stddeb, "LocalAlloc: %04x %d ds=%04x\n", flags, size, ds );
|
||||
|
@ -615,6 +711,7 @@ HLOCAL LOCAL_Alloc( WORD ds, WORD flags, WORD size )
|
|||
LOCAL_FreeArena( ds, ARENA_HEADER(hmem) );
|
||||
return 0;
|
||||
}
|
||||
ptr = PTR_SEG_OFF_TO_LIN( ds, 0 );
|
||||
*(WORD *)(ptr + hmem) = handle;
|
||||
plhe = (LOCALHANDLEENTRY *)(ptr + handle);
|
||||
plhe->addr = hmem + 2;
|
||||
|
@ -636,7 +733,8 @@ HLOCAL LOCAL_ReAlloc( WORD ds, HLOCAL handle, WORD size, WORD flags )
|
|||
char *ptr = PTR_SEG_OFF_TO_LIN( ds, 0 );
|
||||
LOCALHEAPINFO *pInfo;
|
||||
LOCALARENA *pArena, *pNext;
|
||||
WORD arena, newhandle, blockhandle, nextarena;
|
||||
WORD arena, newhandle, blockhandle;
|
||||
LONG nextarena;
|
||||
|
||||
dprintf_local( stddeb, "LocalReAlloc: %04x %d %04x ds=%04x\n",
|
||||
handle, size, flags, ds );
|
||||
|
@ -701,6 +799,7 @@ HLOCAL LOCAL_ReAlloc( WORD ds, HLOCAL handle, WORD size, WORD flags )
|
|||
|
||||
newhandle = LOCAL_GetBlock( ds, size, flags );
|
||||
if (newhandle == 0) return 0;
|
||||
ptr = PTR_SEG_OFF_TO_LIN( ds, 0 );
|
||||
memcpy( ptr + newhandle, ptr + (arena + ARENA_HEADER_SIZE), size );
|
||||
LOCAL_FreeArena( ds, arena );
|
||||
if (HANDLE_MOVEABLE( handle )) {
|
||||
|
@ -714,6 +813,31 @@ HLOCAL LOCAL_ReAlloc( WORD ds, HLOCAL handle, WORD size, WORD flags )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* LOCAL_Lock
|
||||
*/
|
||||
WORD LOCAL_Lock( WORD ds, HLOCAL handle )
|
||||
{
|
||||
char *ptr = PTR_SEG_OFF_TO_LIN( ds, 0 );
|
||||
|
||||
dprintf_local( stddeb, "LocalLock: %04x ", handle );
|
||||
if (HANDLE_MOVEABLE(handle)) {
|
||||
handle = *(WORD *)(ptr + handle);
|
||||
}
|
||||
dprintf_local( stddeb, "returning %04x\n", handle );
|
||||
return handle;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* LOCAL_Unlock
|
||||
*/
|
||||
BOOL LOCAL_Unlock( WORD ds, HLOCAL handle )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* LOCAL_Size
|
||||
*
|
||||
|
@ -721,7 +845,18 @@ HLOCAL LOCAL_ReAlloc( WORD ds, HLOCAL handle, WORD size, WORD flags )
|
|||
*/
|
||||
WORD LOCAL_Size( WORD ds, HLOCAL handle )
|
||||
{
|
||||
LOCALARENA *pArena = PTR_SEG_OFF_TO_LIN( ds, handle - ARENA_HEADER_SIZE );
|
||||
char *ptr = PTR_SEG_OFF_TO_LIN( CURRENT_DS, 0 );
|
||||
LOCALARENA *pArena;
|
||||
WORD arena;
|
||||
|
||||
dprintf_local( stddeb, "LocalSize: %04x ds=%04x\n", handle, ds );
|
||||
|
||||
if (HANDLE_FIXED( handle )) {
|
||||
arena = ARENA_HEADER( handle );
|
||||
} else {
|
||||
arena = ARENA_HEADER( handle = *(WORD *)(ptr + handle) );
|
||||
}
|
||||
pArena = ARENA_PTR( ptr, arena );
|
||||
return pArena->next - handle;
|
||||
}
|
||||
|
||||
|
@ -771,12 +906,7 @@ HLOCAL LocalFree( HLOCAL handle )
|
|||
*/
|
||||
WORD LocalLock( HLOCAL handle )
|
||||
{
|
||||
char *ptr = PTR_SEG_OFF_TO_LIN( CURRENT_DS, 0 );
|
||||
|
||||
if (HANDLE_MOVEABLE(handle)) {
|
||||
handle = *(WORD *)(ptr + handle);
|
||||
}
|
||||
return handle;
|
||||
return LOCAL_Lock( CURRENT_DS, handle );
|
||||
}
|
||||
|
||||
|
||||
|
@ -785,7 +915,7 @@ WORD LocalLock( HLOCAL handle )
|
|||
*/
|
||||
BOOL LocalUnlock( HLOCAL handle )
|
||||
{
|
||||
return TRUE;
|
||||
return LOCAL_Unlock( CURRENT_DS, handle );
|
||||
}
|
||||
|
||||
|
||||
|
@ -829,7 +959,7 @@ WORD LocalFlags( HLOCAL handle )
|
|||
WORD LocalCompact( WORD minfree )
|
||||
{
|
||||
dprintf_local( stddeb, "LocalCompact: %04x\n", minfree );
|
||||
return 0;
|
||||
return LOCAL_Compact( CURRENT_DS, minfree, 0 );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include "stddebug.h"
|
||||
#include "debug.h"
|
||||
|
||||
ldt_copy_entry ldt_copy[LDT_SIZE] = { {0,0}, };
|
||||
|
||||
#define FIRST_LDT_ENTRY_TO_ALLOC 6
|
||||
|
||||
|
@ -323,12 +322,12 @@ BOOL IsBadCodePtr( SEGPTR lpfn )
|
|||
ldt_entry entry;
|
||||
|
||||
sel = SELECTOROF(lpfn);
|
||||
if (!sel) return FALSE;
|
||||
if (IS_SELECTOR_FREE(sel)) return FALSE;
|
||||
if (!sel) return TRUE;
|
||||
if (IS_SELECTOR_FREE(sel)) return TRUE;
|
||||
LDT_GetEntry( SELECTOR_TO_ENTRY(sel), &entry );
|
||||
if (entry.type != SEGMENT_CODE) return FALSE;
|
||||
if (OFFSETOF(lpfn) > entry.limit) return FALSE;
|
||||
return TRUE;
|
||||
if (entry.type != SEGMENT_CODE) return TRUE;
|
||||
if (OFFSETOF(lpfn) > entry.limit) return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -341,13 +340,13 @@ BOOL IsBadStringPtr( SEGPTR ptr, WORD size )
|
|||
ldt_entry entry;
|
||||
|
||||
sel = SELECTOROF(ptr);
|
||||
if (!sel) return FALSE;
|
||||
if (IS_SELECTOR_FREE(sel)) return FALSE;
|
||||
if (!sel) return TRUE;
|
||||
if (IS_SELECTOR_FREE(sel)) return TRUE;
|
||||
LDT_GetEntry( SELECTOR_TO_ENTRY(sel), &entry );
|
||||
if ((entry.type == SEGMENT_CODE) && entry.read_only) return FALSE;
|
||||
if ((entry.type == SEGMENT_CODE) && entry.read_only) return TRUE;
|
||||
if (strlen(PTR_SEG_TO_LIN(ptr)) < size) size = strlen(PTR_SEG_TO_LIN(ptr));
|
||||
if (OFFSETOF(ptr) + size > entry.limit) return FALSE;
|
||||
return TRUE;
|
||||
if (OFFSETOF(ptr) + size > entry.limit) return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -360,12 +359,12 @@ BOOL IsBadHugeReadPtr( SEGPTR ptr, DWORD size )
|
|||
ldt_entry entry;
|
||||
|
||||
sel = SELECTOROF(ptr);
|
||||
if (!sel) return FALSE;
|
||||
if (IS_SELECTOR_FREE(sel)) return FALSE;
|
||||
if (!sel) return TRUE;
|
||||
if (IS_SELECTOR_FREE(sel)) return TRUE;
|
||||
LDT_GetEntry( SELECTOR_TO_ENTRY(sel), &entry );
|
||||
if ((entry.type == SEGMENT_CODE) && entry.read_only) return FALSE;
|
||||
if (OFFSETOF(ptr) + size > entry.limit) return FALSE;
|
||||
return TRUE;
|
||||
if ((entry.type == SEGMENT_CODE) && entry.read_only) return TRUE;
|
||||
if (OFFSETOF(ptr) + size > entry.limit) return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -378,12 +377,12 @@ BOOL IsBadHugeWritePtr( SEGPTR ptr, DWORD size )
|
|||
ldt_entry entry;
|
||||
|
||||
sel = SELECTOROF(ptr);
|
||||
if (!sel) return FALSE;
|
||||
if (IS_SELECTOR_FREE(sel)) return FALSE;
|
||||
if (!sel) return TRUE;
|
||||
if (IS_SELECTOR_FREE(sel)) return TRUE;
|
||||
LDT_GetEntry( SELECTOR_TO_ENTRY(sel), &entry );
|
||||
if ((entry.type == SEGMENT_CODE) || entry.read_only) return FALSE;
|
||||
if (OFFSETOF(ptr) + size > entry.limit) return FALSE;
|
||||
return TRUE;
|
||||
if ((entry.type == SEGMENT_CODE) || entry.read_only) return TRUE;
|
||||
if (OFFSETOF(ptr) + size > entry.limit) return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
@ -17,6 +17,7 @@ SRCS = \
|
|||
kernel32.c \
|
||||
lstr.c \
|
||||
main.c \
|
||||
ole2.c \
|
||||
ole2nls.c \
|
||||
olecli.c \
|
||||
olesvr.c \
|
||||
|
|
|
@ -210,23 +210,23 @@ static LPSTR FILEDLG_GetFileType(LPSTR ptr, WORD index)
|
|||
static LONG FILEDLG_WMDrawItem(HWND hWnd, WORD wParam, LONG lParam)
|
||||
{
|
||||
LPDRAWITEMSTRUCT lpdis = (LPDRAWITEMSTRUCT)PTR_SEG_TO_LIN(lParam);
|
||||
LPSTR str;
|
||||
char str[512];
|
||||
HBRUSH hBrush;
|
||||
HBITMAP hBitmap, hPrevBitmap;
|
||||
BITMAP bm;
|
||||
HDC hMemDC;
|
||||
|
||||
|
||||
strcpy(str, "");
|
||||
if (lpdis->CtlType == ODT_LISTBOX && lpdis->CtlID == lst1) {
|
||||
hBrush = SelectObject(lpdis->hDC, GetStockObject(LTGRAY_BRUSH));
|
||||
SelectObject(lpdis->hDC, hBrush);
|
||||
FillRect(lpdis->hDC, &lpdis->rcItem, hBrush);
|
||||
str = (LPSTR) PTR_SEG_TO_LIN(lpdis->itemData);
|
||||
if (str != NULL) {
|
||||
TextOut(lpdis->hDC, lpdis->rcItem.left, lpdis->rcItem.top,
|
||||
str, strlen(str));
|
||||
if (lpdis->itemState != 0) {
|
||||
InvertRect(lpdis->hDC, &lpdis->rcItem);
|
||||
}
|
||||
SendMessage(lpdis->hwndItem, LB_GETTEXT, lpdis->itemID,
|
||||
MAKE_SEGPTR(str));
|
||||
TextOut(lpdis->hDC, lpdis->rcItem.left, lpdis->rcItem.top,
|
||||
str, strlen(str));
|
||||
if (lpdis->itemState != 0) {
|
||||
InvertRect(lpdis->hDC, &lpdis->rcItem);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -235,21 +235,21 @@ static LONG FILEDLG_WMDrawItem(HWND hWnd, WORD wParam, LONG lParam)
|
|||
hBrush = SelectObject(lpdis->hDC, GetStockObject(LTGRAY_BRUSH));
|
||||
SelectObject(lpdis->hDC, hBrush);
|
||||
FillRect(lpdis->hDC, &lpdis->rcItem, hBrush);
|
||||
str = (LPSTR) PTR_SEG_TO_LIN(lpdis->itemData);
|
||||
if (str != NULL) {
|
||||
hBitmap = hFolder;
|
||||
GetObject(hBitmap, sizeof(BITMAP), (LPSTR)&bm);
|
||||
TextOut(lpdis->hDC, lpdis->rcItem.left + bm.bmWidth,
|
||||
lpdis->rcItem.top, str, strlen(str));
|
||||
hMemDC = CreateCompatibleDC(lpdis->hDC);
|
||||
hPrevBitmap = SelectObject(hMemDC, hBitmap);
|
||||
BitBlt(lpdis->hDC, lpdis->rcItem.left, lpdis->rcItem.top,
|
||||
bm.bmWidth, bm.bmHeight, hMemDC, 0, 0, SRCCOPY);
|
||||
SelectObject(hMemDC, hPrevBitmap);
|
||||
DeleteDC(hMemDC);
|
||||
if (lpdis->itemState != 0) {
|
||||
InvertRect(lpdis->hDC, &lpdis->rcItem);
|
||||
}
|
||||
SendMessage(lpdis->hwndItem, LB_GETTEXT, lpdis->itemID,
|
||||
MAKE_SEGPTR(str));
|
||||
|
||||
hBitmap = hFolder;
|
||||
GetObject(hBitmap, sizeof(BITMAP), (LPSTR)&bm);
|
||||
TextOut(lpdis->hDC, lpdis->rcItem.left + bm.bmWidth,
|
||||
lpdis->rcItem.top, str, strlen(str));
|
||||
hMemDC = CreateCompatibleDC(lpdis->hDC);
|
||||
hPrevBitmap = SelectObject(hMemDC, hBitmap);
|
||||
BitBlt(lpdis->hDC, lpdis->rcItem.left, lpdis->rcItem.top,
|
||||
bm.bmWidth, bm.bmHeight, hMemDC, 0, 0, SRCCOPY);
|
||||
SelectObject(hMemDC, hPrevBitmap);
|
||||
DeleteDC(hMemDC);
|
||||
if (lpdis->itemState != 0) {
|
||||
InvertRect(lpdis->hDC, &lpdis->rcItem);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -257,28 +257,27 @@ static LONG FILEDLG_WMDrawItem(HWND hWnd, WORD wParam, LONG lParam)
|
|||
hBrush = SelectObject(lpdis->hDC, GetStockObject(LTGRAY_BRUSH));
|
||||
SelectObject(lpdis->hDC, hBrush);
|
||||
FillRect(lpdis->hDC, &lpdis->rcItem, hBrush);
|
||||
str = (LPSTR) PTR_SEG_TO_LIN(lpdis->itemData);
|
||||
if (str != NULL) {
|
||||
switch(str[2]) {
|
||||
case 'a': case 'b':
|
||||
hBitmap = hFloppy;
|
||||
break;
|
||||
default:
|
||||
hBitmap = hHDisk;
|
||||
break;
|
||||
}
|
||||
GetObject(hBitmap, sizeof(BITMAP), (LPSTR)&bm);
|
||||
TextOut(lpdis->hDC, lpdis->rcItem.left + bm.bmWidth,
|
||||
lpdis->rcItem.top, str, strlen(str));
|
||||
hMemDC = CreateCompatibleDC(lpdis->hDC);
|
||||
hPrevBitmap = SelectObject(hMemDC, hBitmap);
|
||||
BitBlt(lpdis->hDC, lpdis->rcItem.left, lpdis->rcItem.top,
|
||||
bm.bmWidth, bm.bmHeight, hMemDC, 0, 0, SRCCOPY);
|
||||
SelectObject(hMemDC, hPrevBitmap);
|
||||
DeleteDC(hMemDC);
|
||||
if (lpdis->itemState != 0) {
|
||||
InvertRect(lpdis->hDC, &lpdis->rcItem);
|
||||
}
|
||||
SendMessage(lpdis->hwndItem, CB_GETLBTEXT, lpdis->itemID,
|
||||
MAKE_SEGPTR(str));
|
||||
switch(str[2]) {
|
||||
case 'a': case 'b':
|
||||
hBitmap = hFloppy;
|
||||
break;
|
||||
default:
|
||||
hBitmap = hHDisk;
|
||||
break;
|
||||
}
|
||||
GetObject(hBitmap, sizeof(BITMAP), (LPSTR)&bm);
|
||||
TextOut(lpdis->hDC, lpdis->rcItem.left + bm.bmWidth,
|
||||
lpdis->rcItem.top, str, strlen(str));
|
||||
hMemDC = CreateCompatibleDC(lpdis->hDC);
|
||||
hPrevBitmap = SelectObject(hMemDC, hBitmap);
|
||||
BitBlt(lpdis->hDC, lpdis->rcItem.left, lpdis->rcItem.top,
|
||||
bm.bmWidth, bm.bmHeight, hMemDC, 0, 0, SRCCOPY);
|
||||
SelectObject(hMemDC, hPrevBitmap);
|
||||
DeleteDC(hMemDC);
|
||||
if (lpdis->itemState != 0) {
|
||||
InvertRect(lpdis->hDC, &lpdis->rcItem);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -10,9 +10,36 @@
|
|||
#include "windows.h"
|
||||
#include "compobj.h"
|
||||
#include "ole.h"
|
||||
#include "ole2.h"
|
||||
#include "stddebug.h"
|
||||
#include "debug.h"
|
||||
|
||||
/***********************************************************************
|
||||
* CoBuildVersion [COMPOBJ.1]
|
||||
*/
|
||||
DWORD WINAPI CoBuildVersion()
|
||||
{
|
||||
dprintf_ole(stddeb,"CoBuildVersion()\n");
|
||||
return (rmm<<16)+rup;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* CoInitialize [COMPOBJ.2]
|
||||
*/
|
||||
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
|
||||
{
|
||||
dprintf_ole(stdnimp,"CoInitialize\n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* CoUnitialize [COMPOBJ.3]
|
||||
*/
|
||||
void CoUnitialize()
|
||||
{
|
||||
dprintf_ole(stdnimp,"CoUnitialize()\n");
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* CoDisconnectObject
|
||||
*/
|
||||
|
|
|
@ -301,7 +301,7 @@ int DOS_ValidDrive(int drive)
|
|||
|
||||
dprintf_dosfs(stddeb,"ValidDrive %c (%d) -- ",'A'+drive,drive);
|
||||
|
||||
if (drive >= MAX_DOS_DRIVES)
|
||||
if (drive < 0 || drive >= MAX_DOS_DRIVES)
|
||||
valid = 0;
|
||||
if (DosDrives[drive].rootdir == NULL)
|
||||
valid = 0;
|
||||
|
@ -446,12 +446,14 @@ static void GetUnixDirName(char *rootdir, char *name)
|
|||
char *DOS_GetUnixFileName(char *dosfilename)
|
||||
{
|
||||
/* a:\windows\system.ini => /dos/windows/system.ini */
|
||||
|
||||
|
||||
/* FIXME: should handle devices here (like LPT: or NUL:) */
|
||||
|
||||
static char temp[256];
|
||||
static char dostemp[256];
|
||||
int drive;
|
||||
|
||||
if (dosfilename[1] == ':')
|
||||
if (dosfilename[0] && (dosfilename[1] == ':'))
|
||||
{
|
||||
drive = (islower(*dosfilename) ? toupper(*dosfilename) : *dosfilename) - 'A';
|
||||
|
||||
|
@ -463,7 +465,8 @@ char *DOS_GetUnixFileName(char *dosfilename)
|
|||
drive = CurrentDrive;
|
||||
|
||||
/* Consider dosfilename const */
|
||||
strcpy(dostemp,dosfilename);
|
||||
strncpy( dostemp, dosfilename, 255 );
|
||||
dostemp[255] = '\0';
|
||||
|
||||
/* Expand the filename to it's full path if it doesn't
|
||||
* start from the root.
|
||||
|
@ -675,7 +678,7 @@ char *DOS_FindFile(char *buffer, int buflen, char *filename, char **extensions,
|
|||
char *workingpath, *dirname, *rootname, **e;
|
||||
DIR *d;
|
||||
struct dirent *f;
|
||||
int rootnamelen, found = 0;
|
||||
int rootnamelen;
|
||||
struct stat filestat;
|
||||
|
||||
if (strchr(filename, '\\') != NULL)
|
||||
|
@ -713,41 +716,35 @@ char *DOS_FindFile(char *buffer, int buflen, char *filename, char **extensions,
|
|||
if (d != NULL)
|
||||
{
|
||||
while ((f = readdir(d)) != NULL)
|
||||
{
|
||||
if (strncasecmp(rootname, f->d_name, rootnamelen) == 0)
|
||||
{
|
||||
if (extensions == NULL ||
|
||||
strcasecmp(rootname, f->d_name) == 0)
|
||||
found = 1;
|
||||
else
|
||||
if (f->d_name[rootnamelen] == '.')
|
||||
for (e = extensions; *e != NULL; e++)
|
||||
if (strcasecmp(*e, f->d_name + rootnamelen + 1)
|
||||
== 0)
|
||||
{
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
{
|
||||
if (strcasecmp(rootname, f->d_name) != 0) {
|
||||
if (strncasecmp(rootname, f->d_name, rootnamelen) != 0
|
||||
|| extensions == NULL
|
||||
|| f->d_name[rootnamelen] != '.')
|
||||
continue;
|
||||
|
||||
if (found)
|
||||
{
|
||||
if (strchr(dirname, '\\') != NULL)
|
||||
strncpy(buffer, DOS_GetUnixFileName(dirname), buflen);
|
||||
else
|
||||
strncpy(buffer, dirname, buflen);
|
||||
|
||||
strncat(buffer, "/", buflen - strlen(buffer));
|
||||
strncat(buffer, f->d_name, buflen - strlen(buffer));
|
||||
|
||||
stat(buffer, &filestat);
|
||||
if (S_ISREG(filestat.st_mode)) {
|
||||
closedir(d);
|
||||
free(rootname);
|
||||
return buffer;
|
||||
} else
|
||||
found = 0;
|
||||
for (e = extensions; *e != NULL; e++) {
|
||||
if (strcasecmp(*e, f->d_name + rootnamelen + 1) == 0)
|
||||
break;
|
||||
}
|
||||
if (*e == NULL) continue;
|
||||
}
|
||||
|
||||
if (strchr(dirname, '\\') != NULL) {
|
||||
strncpy(buffer, DOS_GetUnixFileName(dirname), buflen);
|
||||
} else {
|
||||
strncpy(buffer, dirname, buflen);
|
||||
}
|
||||
|
||||
strncat(buffer, "/", buflen - strlen(buffer));
|
||||
strncat(buffer, f->d_name, buflen - strlen(buffer));
|
||||
|
||||
stat(buffer, &filestat);
|
||||
if (S_ISREG(filestat.st_mode)) {
|
||||
closedir(d);
|
||||
free(rootname);
|
||||
return buffer;
|
||||
}
|
||||
}
|
||||
closedir(d);
|
||||
}
|
||||
|
@ -897,7 +894,8 @@ struct dosdirent *DOS_opendir(char *dosdirname)
|
|||
if (strcmp(DosDirs[x].unixpath,temp) == 0) break;
|
||||
}
|
||||
|
||||
strcpy(DosDirs[x].filemask, unixdirname);
|
||||
strncpy(DosDirs[x].filemask, unixdirname, 12);
|
||||
DosDirs[x].filemask[12] = 0;
|
||||
ToDos(DosDirs[x].filemask);
|
||||
dprintf_dosfs(stddeb,"DOS_opendir: %s / %s\n", unixdirname, temp);
|
||||
|
||||
|
|
11
misc/exec.c
11
misc/exec.c
|
@ -34,12 +34,15 @@
|
|||
/**********************************************************************
|
||||
* ExitWindows [USER.7]
|
||||
*/
|
||||
BOOL ExitWindows(DWORD dwReserved, WORD wRetCode)
|
||||
BOOL ExitWindows(DWORD dwReturnCode, WORD wReserved)
|
||||
{
|
||||
dprintf_exec(stdnimp,"EMPTY STUB !!! ExitWindows(%08lX, %04X) !\n",
|
||||
dwReserved, wRetCode);
|
||||
api_assert("ExitWindows", wReserved == 0);
|
||||
api_assert("ExitWindows", HIWORD(dwReturnCode) == 0);
|
||||
|
||||
exit(wRetCode);
|
||||
dprintf_exec( stdnimp,"PARTIAL STUB ExitWindows(%08lX, %04X)\n",
|
||||
dwReturnCode, wReserved);
|
||||
|
||||
exit( LOWORD(dwReturnCode) );
|
||||
}
|
||||
|
||||
|
||||
|
|
149
misc/file.c
149
misc/file.c
|
@ -86,19 +86,19 @@ INT _lread (INT hFile, LPSTR lpBuffer, WORD wBytes)
|
|||
/****************************************************************************
|
||||
_lwrite
|
||||
****************************************************************************/
|
||||
INT _lwrite (INT hFile, LPSTR lpBuffer, WORD wBytes)
|
||||
INT _lwrite (INT hFile, LPCSTR lpBuffer, WORD wBytes)
|
||||
{
|
||||
int result;
|
||||
int result;
|
||||
|
||||
dprintf_file(stddeb, "_lwrite: handle %d, buffer = %ld, length = %d\n",
|
||||
hFile, (long) lpBuffer, wBytes);
|
||||
dprintf_file(stddeb, "_lwrite: handle %d, buffer = %ld, length = %d\n",
|
||||
hFile, (long) lpBuffer, wBytes);
|
||||
|
||||
result = write (hFile, lpBuffer, wBytes);
|
||||
|
||||
if (result == -1)
|
||||
return HFILE_ERROR;
|
||||
else
|
||||
return result;
|
||||
if (result == -1)
|
||||
return HFILE_ERROR;
|
||||
else
|
||||
return result;
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
|
@ -106,11 +106,16 @@ INT _lwrite (INT hFile, LPSTR lpBuffer, WORD wBytes)
|
|||
***************************************************************************/
|
||||
INT _lclose (INT hFile)
|
||||
{
|
||||
dprintf_file(stddeb, "_lclose: handle %d\n", hFile);
|
||||
if (close (hFile))
|
||||
return HFILE_ERROR;
|
||||
else
|
||||
return 0;
|
||||
dprintf_file(stddeb, "_lclose: handle %d\n", hFile);
|
||||
|
||||
if (hFile == 1 || hFile == 2) {
|
||||
fprintf( stderr, "Program attempted to close stdout or stderr!\n" );
|
||||
return 0;
|
||||
}
|
||||
if (close (hFile))
|
||||
return HFILE_ERROR;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
@ -123,7 +128,7 @@ INT OpenFile (LPSTR lpFileName, LPOFSTRUCT ofs, WORD wStyle)
|
|||
struct stat s;
|
||||
struct tm *now;
|
||||
int res, handle;
|
||||
int verify_time;
|
||||
int verify_time = 0;
|
||||
|
||||
dprintf_file(stddeb,"Openfile(%s,<struct>,%d)\n",lpFileName,wStyle);
|
||||
|
||||
|
@ -162,64 +167,62 @@ INT OpenFile (LPSTR lpFileName, LPOFSTRUCT ofs, WORD wStyle)
|
|||
/* If path isn't given, try to find the file. */
|
||||
|
||||
if (!(action & OF_REOPEN))
|
||||
{
|
||||
if( !( index(lpFileName,'\\') || index(lpFileName,'/') ||
|
||||
index(lpFileName,':')))
|
||||
while(1)
|
||||
{
|
||||
char temp[MAX_PATH + 1];
|
||||
|
||||
if(index(lpFileName,'\\') || index(lpFileName,'/') ||
|
||||
index(lpFileName,':'))
|
||||
{
|
||||
char temp[MAX_PATH+1];
|
||||
/* Try current directory */
|
||||
strcpy (filename, lpFileName);
|
||||
if ( (!stat(DOS_GetUnixFileName(filename), &s)) && (S_ISREG(s.st_mode)) )
|
||||
break;
|
||||
|
||||
/* Try Windows directory */
|
||||
|
||||
GetWindowsDirectory (filename,MAX_PATH);
|
||||
if ((!filename[0])||(filename[strlen(filename)-1]!='\\'))
|
||||
strcat(filename, "\\");
|
||||
strcat (filename, lpFileName);
|
||||
if ( (!stat(DOS_GetUnixFileName(filename), &s)) && (S_ISREG(s.st_mode)) )
|
||||
break;
|
||||
|
||||
/* Try Windows system directory */
|
||||
|
||||
GetSystemDirectory (filename,MAX_PATH);
|
||||
if ((!filename[0])||(filename[strlen(filename)-1]!='\\'))
|
||||
strcat(filename, "\\");
|
||||
strcat (filename, lpFileName);
|
||||
if ( (!stat(DOS_GetUnixFileName(filename), &s)) && (S_ISREG(s.st_mode)) )
|
||||
break;
|
||||
|
||||
/* Try the path of the current executable */
|
||||
|
||||
if (GetCurrentTask())
|
||||
{
|
||||
char *p;
|
||||
GetModuleFileName( GetCurrentTask(), filename, MAX_PATH );
|
||||
if ((p = strrchr( filename, '\\' )))
|
||||
{
|
||||
p[1] = '\0';
|
||||
strcat( filename, lpFileName );
|
||||
if ((!stat(DOS_GetUnixFileName(filename), &s)) &&
|
||||
(S_ISREG(s.st_mode)) )
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Try all directories in path */
|
||||
|
||||
if (DOS_FindFile(temp,MAX_PATH,lpFileName,NULL,WindowsPath))
|
||||
{
|
||||
strcpy(filename, DOS_GetDosFileName(temp));
|
||||
break;
|
||||
}
|
||||
strcpy (filename, lpFileName);
|
||||
break;
|
||||
strcpy (filename,lpFileName);
|
||||
goto found;
|
||||
}
|
||||
/* Try current directory */
|
||||
if (DOS_FindFile(temp, MAX_PATH, lpFileName, NULL, ".")) {
|
||||
strcpy(filename, DOS_GetDosFileName(temp));
|
||||
goto found;
|
||||
}
|
||||
else
|
||||
strcpy (filename,lpFileName);
|
||||
|
||||
/* Try Windows directory */
|
||||
GetWindowsDirectory(filename, MAX_PATH);
|
||||
if (DOS_FindFile(temp, MAX_PATH, lpFileName, NULL, filename)) {
|
||||
strcpy(filename, DOS_GetDosFileName(temp));
|
||||
goto found;
|
||||
}
|
||||
|
||||
/* Try Windows system directory */
|
||||
GetSystemDirectory(filename, MAX_PATH);
|
||||
if (DOS_FindFile(temp, MAX_PATH, lpFileName, NULL, filename)) {
|
||||
strcpy(filename, DOS_GetDosFileName(temp));
|
||||
goto found;
|
||||
}
|
||||
|
||||
/* Try the path of the current executable */
|
||||
if (GetCurrentTask())
|
||||
{
|
||||
char *p;
|
||||
GetModuleFileName( GetCurrentTask(), filename, MAX_PATH );
|
||||
if ((p = strrchr( filename, '\\' )))
|
||||
{
|
||||
p[1] = '\0';
|
||||
if (DOS_FindFile(temp, MAX_PATH, lpFileName, NULL, filename)) {
|
||||
strcpy(filename, DOS_GetDosFileName(temp));
|
||||
goto found;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Try all directories in path */
|
||||
|
||||
if (DOS_FindFile(temp,MAX_PATH,lpFileName,NULL,WindowsPath))
|
||||
{
|
||||
strcpy(filename, DOS_GetDosFileName(temp));
|
||||
goto found;
|
||||
}
|
||||
/* ??? shouldn't we give an error here? */
|
||||
strcpy (filename, lpFileName);
|
||||
|
||||
found:
|
||||
|
||||
ofs->cBytes = sizeof(OFSTRUCT);
|
||||
ofs->fFixedDisk = FALSE;
|
||||
strcpy(ofs->szPathName, filename);
|
||||
|
@ -305,9 +308,9 @@ LONG _llseek (INT hFile, LONG lOffset, INT nOrigin)
|
|||
break;
|
||||
default: origin = SEEK_SET;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return ( lseek(hFile, lOffset, origin) );
|
||||
return lseek(hFile, lOffset, origin);
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
|
@ -413,7 +416,7 @@ INT GetTempFileName(BYTE bDriveLetter, LPCSTR lpszPrefixString, UINT uUnique, LP
|
|||
lpszPrefixString,uUnique,lpszTempFileName);
|
||||
if ((handle = _lcreat (lpszTempFileName, 0x0000)) == -1) {
|
||||
fprintf(stderr,"GetTempFilename: can't create temp file '%s' !\n", lpszTempFileName);
|
||||
}
|
||||
}
|
||||
else
|
||||
close(handle);
|
||||
|
||||
|
@ -440,7 +443,7 @@ LONG _hread(INT hf, LPSTR hpvBuffer, LONG cbBuffer)
|
|||
/***************************************************************************
|
||||
_hwrite
|
||||
***************************************************************************/
|
||||
LONG _hwrite(INT hf, const LPSTR hpvBuffer, LONG cbBuffer)
|
||||
LONG _hwrite(INT hf, LPCSTR hpvBuffer, LONG cbBuffer)
|
||||
{
|
||||
return write(hf, hpvBuffer, cbBuffer);
|
||||
}
|
||||
|
|
|
@ -550,7 +550,7 @@ void MessageBeep(WORD i)
|
|||
*/
|
||||
LONG GetVersion(void)
|
||||
{
|
||||
return( 0x03300a03 ); /* dos 3.30 & win 3.10 */
|
||||
return MAKELONG( WINVERSION, DOSVERSION );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
39
misc/ole2.c
Normal file
39
misc/ole2.c
Normal file
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* OLE2 library
|
||||
*
|
||||
* Copyright 1995 Martin von Loewis
|
||||
*/
|
||||
|
||||
/* At the moment, these are only empty stubs.
|
||||
*/
|
||||
|
||||
#include "windows.h"
|
||||
#include "ole2.h"
|
||||
#include "stddebug.h"
|
||||
#include "debug.h"
|
||||
|
||||
/***********************************************************************
|
||||
* OleBuildVersion [OLE.1]
|
||||
*/
|
||||
DWORD OleBuildVersion()
|
||||
{
|
||||
dprintf_ole(stddeb,"OleBuildVersion()\n");
|
||||
return (rmm<<16)+rup;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* OleInitialize [OLE2.2]
|
||||
*/
|
||||
HRESULT WINAPI OleInitialize(LPVOID reserved)
|
||||
{
|
||||
dprintf_ole(stdnimp,"OleInitialize\n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* OleUnitialize [OLE2.3]
|
||||
*/
|
||||
void WINAPI OleUninitialize()
|
||||
{
|
||||
dprintf_ole(stdnimp,"OleUninitialize()\n");
|
||||
}
|
276
misc/ole2nls.c
276
misc/ole2nls.c
|
@ -7,8 +7,10 @@
|
|||
/* At the moment, these are only empty stubs.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include "windows.h"
|
||||
#include "ole.h"
|
||||
#include "winnls.h"
|
||||
#include "stddebug.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
@ -53,3 +55,277 @@ WORD WINAPI GetSystemDefaultLangID()
|
|||
{
|
||||
return GetUserDefaultLangID();
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetLocaleInfoA (OLE2NLS.5)
|
||||
* Is the last parameter really WORD for Win16?
|
||||
*/
|
||||
int WINAPI GetLocaleInfoA(DWORD lcid,DWORD LCType,LPSTR buf,WORD len)
|
||||
{
|
||||
char *retString;
|
||||
int retLen;
|
||||
dprintf_ole(stddeb,"GetLocaleInfoA(%8lX,%8lX,%p,%4X)\n",
|
||||
lcid,LCType,buf,len);
|
||||
/* Wine is supporting only the default locale */
|
||||
if(lcid!=GetUserDefaultLCID())
|
||||
{
|
||||
dprintf_ole(stdnimp,"GetLocaleInfoA: Unknown locale\n");
|
||||
return 0;
|
||||
}
|
||||
/* As an option, we could obtain the value from win.ini.
|
||||
This would not match the Wine compile-time option.
|
||||
Also, not all identifiers are available from win.ini */
|
||||
retString=0;
|
||||
retLen=0;
|
||||
/* If we are through all of this, retLen should not be zero anymore.
|
||||
If it is, the value is not supported */
|
||||
#define LOCVAL(type,value) if(type==LCType) \
|
||||
{retLen=strlen(value)+1;\
|
||||
retString=value; \
|
||||
}
|
||||
#define UNSUPPORTED(type) if(type==lcid)retString=#type;
|
||||
|
||||
/* I really wish I would know a better way to do this */
|
||||
UNSUPPORTED(LOCALE_ILANGUAGE)
|
||||
UNSUPPORTED(LOCALE_SLANGUAGE)
|
||||
UNSUPPORTED(LOCALE_SENGLANGUAGE)
|
||||
UNSUPPORTED(LOCALE_SABBREVLANGNAME)
|
||||
UNSUPPORTED(LOCALE_SNATIVELANGNAME)
|
||||
UNSUPPORTED(LOCALE_ICOUNTRY)
|
||||
UNSUPPORTED(LOCALE_SCOUNTRY)
|
||||
UNSUPPORTED(LOCALE_SENGCOUNTRY)
|
||||
UNSUPPORTED(LOCALE_SABBREVCTRYNAME)
|
||||
UNSUPPORTED(LOCALE_SNATIVECTRYNAME)
|
||||
UNSUPPORTED(LOCALE_IDEFAULTLANGUAGE)
|
||||
UNSUPPORTED(LOCALE_IDEFAULTCOUNTRY)
|
||||
UNSUPPORTED(LOCALE_IDEFAULTCODEPAGE)
|
||||
UNSUPPORTED(LOCALE_IDEFAULTANSICODEPAGE)
|
||||
UNSUPPORTED(LOCALE_SLIST)
|
||||
UNSUPPORTED(LOCALE_IMEASURE)
|
||||
UNSUPPORTED(LOCALE_SDECIMAL)
|
||||
UNSUPPORTED(LOCALE_STHOUSAND)
|
||||
UNSUPPORTED(LOCALE_SGROUPING)
|
||||
UNSUPPORTED(LOCALE_IDIGITS)
|
||||
UNSUPPORTED(LOCALE_ILZERO)
|
||||
UNSUPPORTED(LOCALE_INEGNUMBER)
|
||||
UNSUPPORTED(LOCALE_SNATIVEDIGITS)
|
||||
UNSUPPORTED(LOCALE_SCURRENCY)
|
||||
UNSUPPORTED(LOCALE_SINTLSYMBOL)
|
||||
UNSUPPORTED(LOCALE_SMONDECIMALSEP)
|
||||
UNSUPPORTED(LOCALE_SMONTHOUSANDSEP)
|
||||
UNSUPPORTED(LOCALE_SMONGROUPING)
|
||||
UNSUPPORTED(LOCALE_ICURRDIGITS)
|
||||
UNSUPPORTED(LOCALE_IINTLCURRDIGITS)
|
||||
UNSUPPORTED(LOCALE_ICURRENCY)
|
||||
UNSUPPORTED(LOCALE_INEGCURR)
|
||||
UNSUPPORTED(LOCALE_SDATE)
|
||||
UNSUPPORTED(LOCALE_STIME)
|
||||
UNSUPPORTED(LOCALE_SSHORTDATE)
|
||||
UNSUPPORTED(LOCALE_SLONGDATE)
|
||||
UNSUPPORTED(LOCALE_STIMEFORMAT)
|
||||
UNSUPPORTED(LOCALE_IDATE)
|
||||
UNSUPPORTED(LOCALE_ILDATE)
|
||||
UNSUPPORTED(LOCALE_ITIME)
|
||||
UNSUPPORTED(LOCALE_ITIMEMARKPOSN)
|
||||
UNSUPPORTED(LOCALE_ICENTURY)
|
||||
UNSUPPORTED(LOCALE_ITLZERO)
|
||||
UNSUPPORTED(LOCALE_IDAYLZERO)
|
||||
UNSUPPORTED(LOCALE_IMONLZERO)
|
||||
UNSUPPORTED(LOCALE_S1159)
|
||||
UNSUPPORTED(LOCALE_S2359)
|
||||
UNSUPPORTED(LOCALE_ICALENDARTYPE)
|
||||
UNSUPPORTED(LOCALE_IOPTIONALCALENDAR)
|
||||
UNSUPPORTED(LOCALE_IFIRSTDAYOFWEEK)
|
||||
UNSUPPORTED(LOCALE_IFIRSTWEEKOFYEAR)
|
||||
UNSUPPORTED(LOCALE_SDAYNAME1)
|
||||
UNSUPPORTED(LOCALE_SDAYNAME2)
|
||||
UNSUPPORTED(LOCALE_SDAYNAME3)
|
||||
UNSUPPORTED(LOCALE_SDAYNAME4)
|
||||
UNSUPPORTED(LOCALE_SDAYNAME5)
|
||||
UNSUPPORTED(LOCALE_SDAYNAME6)
|
||||
UNSUPPORTED(LOCALE_SDAYNAME7)
|
||||
UNSUPPORTED(LOCALE_SABBREVDAYNAME1)
|
||||
UNSUPPORTED(LOCALE_SABBREVDAYNAME2)
|
||||
UNSUPPORTED(LOCALE_SABBREVDAYNAME3)
|
||||
UNSUPPORTED(LOCALE_SABBREVDAYNAME4)
|
||||
UNSUPPORTED(LOCALE_SABBREVDAYNAME5)
|
||||
UNSUPPORTED(LOCALE_SABBREVDAYNAME6)
|
||||
UNSUPPORTED(LOCALE_SABBREVDAYNAME7)
|
||||
UNSUPPORTED(LOCALE_SMONTHNAME1)
|
||||
UNSUPPORTED(LOCALE_SMONTHNAME2)
|
||||
UNSUPPORTED(LOCALE_SMONTHNAME3)
|
||||
UNSUPPORTED(LOCALE_SMONTHNAME4)
|
||||
UNSUPPORTED(LOCALE_SMONTHNAME5)
|
||||
UNSUPPORTED(LOCALE_SMONTHNAME6)
|
||||
UNSUPPORTED(LOCALE_SMONTHNAME7)
|
||||
UNSUPPORTED(LOCALE_SMONTHNAME8)
|
||||
UNSUPPORTED(LOCALE_SMONTHNAME9)
|
||||
UNSUPPORTED(LOCALE_SMONTHNAME10)
|
||||
UNSUPPORTED(LOCALE_SMONTHNAME11)
|
||||
UNSUPPORTED(LOCALE_SMONTHNAME12)
|
||||
UNSUPPORTED(LOCALE_SMONTHNAME13)
|
||||
UNSUPPORTED(LOCALE_SABBREVMONTHNAME1)
|
||||
UNSUPPORTED(LOCALE_SABBREVMONTHNAME2)
|
||||
UNSUPPORTED(LOCALE_SABBREVMONTHNAME3)
|
||||
UNSUPPORTED(LOCALE_SABBREVMONTHNAME4)
|
||||
UNSUPPORTED(LOCALE_SABBREVMONTHNAME5)
|
||||
UNSUPPORTED(LOCALE_SABBREVMONTHNAME6)
|
||||
UNSUPPORTED(LOCALE_SABBREVMONTHNAME7)
|
||||
UNSUPPORTED(LOCALE_SABBREVMONTHNAME8)
|
||||
UNSUPPORTED(LOCALE_SABBREVMONTHNAME9)
|
||||
UNSUPPORTED(LOCALE_SABBREVMONTHNAME10)
|
||||
UNSUPPORTED(LOCALE_SABBREVMONTHNAME11)
|
||||
UNSUPPORTED(LOCALE_SABBREVMONTHNAME12)
|
||||
UNSUPPORTED(LOCALE_SABBREVMONTHNAME13)
|
||||
UNSUPPORTED(LOCALE_SPOSITIVESIGN)
|
||||
UNSUPPORTED(LOCALE_SNEGATIVESIGN)
|
||||
UNSUPPORTED(LOCALE_IPOSSIGNPOSN)
|
||||
UNSUPPORTED(LOCALE_INEGSIGNPOSN)
|
||||
UNSUPPORTED(LOCALE_IPOSSYMPRECEDES)
|
||||
UNSUPPORTED(LOCALE_IPOSSEPBYSPACE)
|
||||
UNSUPPORTED(LOCALE_INEGSYMPRECEDES)
|
||||
UNSUPPORTED(LOCALE_INEGSEPBYSPACE)
|
||||
|
||||
/* Now, the language specific definitions. They don't have to be
|
||||
complete */
|
||||
#if #LANG(De)
|
||||
/* This definitions apply to Germany only. Users in Austria
|
||||
or Switzerland might want to modify them */
|
||||
LOCVAL(LOCALE_ILANGUAGE,"9")
|
||||
LOCVAL(LOCALE_SLANGUAGE,"Deutsch")
|
||||
LOCVAL(LOCALE_SENGLANGUAGE,"German")
|
||||
LOCVAL(LOCALE_SABBREVLANGNAME,"deu")
|
||||
LOCVAL(LOCALE_SNATIVELANGNAME,"Deutsch")
|
||||
LOCVAL(LOCALE_ICOUNTRY,"49")
|
||||
LOCVAL(LOCALE_SCOUNTRY,"Deutschland")
|
||||
LOCVAL(LOCALE_SENGCOUNTRY,"Deutschland")
|
||||
LOCVAL(LOCALE_SABBREVCTRYNAME,"De")
|
||||
LOCVAL(LOCALE_SNATIVECTRYNAME,"Deutschland")
|
||||
LOCVAL(LOCALE_IDEFAULTLANGUAGE,"9")
|
||||
LOCVAL(LOCALE_IDEFAULTCOUNTRY,"49")
|
||||
/* Dunno
|
||||
LOCVAL(LOCALE_IDEFAULTCODEPAGE)
|
||||
LOCVAL(LOCALE_IDEFAULTANSICODEPAGE)
|
||||
*/
|
||||
LOCVAL(LOCALE_SLIST,";")
|
||||
LOCVAL(LOCALE_IMEASURE,"0")
|
||||
LOCVAL(LOCALE_SDECIMAL,",")
|
||||
LOCVAL(LOCALE_STHOUSAND,".")
|
||||
/*
|
||||
LOCVAL(LOCALE_SGROUPING)
|
||||
*/
|
||||
LOCVAL(LOCALE_IDIGITS,"2")
|
||||
LOCVAL(LOCALE_ILZERO,"1")
|
||||
/*
|
||||
LOCVAL(LOCALE_INEGNUMBER)
|
||||
Is this "0123456789" ??
|
||||
LOCVAL(LOCALE_SNATIVEDIGITS)
|
||||
*/
|
||||
LOCVAL(LOCALE_SCURRENCY,"DM")
|
||||
/*
|
||||
LOCVAL(LOCALE_SINTLSYMBOL)
|
||||
LOCVAL(LOCALE_SMONDECIMALSEP)
|
||||
LOCVAL(LOCALE_SMONTHOUSANDSEP)
|
||||
LOCVAL(LOCALE_SMONGROUPING)
|
||||
*/
|
||||
LOCVAL(LOCALE_ICURRDIGITS,"2")
|
||||
/*
|
||||
LOCVAL(LOCALE_IINTLCURRDIGITS)
|
||||
*/
|
||||
LOCVAL(LOCALE_ICURRENCY,"3")
|
||||
LOCVAL(LOCALE_INEGCURR,"8")
|
||||
LOCVAL(LOCALE_SDATE,".")
|
||||
LOCVAL(LOCALE_STIME,":")
|
||||
LOCVAL(LOCALE_SSHORTDATE,"dd.MM.yyyy")
|
||||
LOCVAL(LOCALE_SLONGDATEi,"ddd, d. MMMM yyyy")
|
||||
/*
|
||||
LOCVAL(LOCALE_STIMEFORMAT)
|
||||
*/
|
||||
LOCVAL(LOCALE_IDATE,"1")
|
||||
/*
|
||||
LOCVAL(LOCALE_ILDATE)
|
||||
*/
|
||||
LOCVAL(LOCALE_ITIME,"1")
|
||||
/*
|
||||
LOCVAL(LOCALE_ITIMEMARKPOSN)
|
||||
LOCVAL(LOCALE_ICENTURY)
|
||||
*/
|
||||
LOCVAL(LOCALE_ITLZERO,"1")
|
||||
/*
|
||||
LOCVAL(LOCALE_IDAYLZERO)
|
||||
LOCVAL(LOCALE_IMONLZERO)
|
||||
LOCVAL(LOCALE_S1159)
|
||||
LOCVAL(LOCALE_S2359)
|
||||
LOCVAL(LOCALE_ICALENDARTYPE)
|
||||
LOCVAL(LOCALE_IOPTIONALCALENDAR)
|
||||
LOCVAL(LOCALE_IFIRSTDAYOFWEEK)
|
||||
LOCVAL(LOCALE_IFIRSTWEEKOFYEAR)
|
||||
*/
|
||||
LOCVAL(LOCALE_SDAYNAME1,"Montag")
|
||||
LOCVAL(LOCALE_SDAYNAME2,"Dienstag")
|
||||
LOCVAL(LOCALE_SDAYNAME3,"Mittwoch")
|
||||
LOCVAL(LOCALE_SDAYNAME4,"Donnerstag")
|
||||
LOCVAL(LOCALE_SDAYNAME5,"Freitag")
|
||||
LOCVAL(LOCALE_SDAYNAME6,"Sonnabend")
|
||||
LOCVAL(LOCALE_SDAYNAME7,"Sonntag")
|
||||
LOCVAL(LOCALE_SABBREVDAYNAME1,"Mo")
|
||||
LOCVAL(LOCALE_SABBREVDAYNAME2,"Di")
|
||||
LOCVAL(LOCALE_SABBREVDAYNAME3,"Mi")
|
||||
LOCVAL(LOCALE_SABBREVDAYNAME4,"Do")
|
||||
LOCVAL(LOCALE_SABBREVDAYNAME5,"Fr")
|
||||
LOCVAL(LOCALE_SABBREVDAYNAME6,"Sa")
|
||||
LOCVAL(LOCALE_SABBREVDAYNAME7,"So")
|
||||
LOCVAL(LOCALE_SMONTHNAME1,"Januar")
|
||||
LOCVAL(LOCALE_SMONTHNAME2,"Februar")
|
||||
LOCVAL(LOCALE_SMONTHNAME3,"März")
|
||||
LOCVAL(LOCALE_SMONTHNAME4,"April")
|
||||
LOCVAL(LOCALE_SMONTHNAME5,"Mai")
|
||||
LOCVAL(LOCALE_SMONTHNAME6,"Juni")
|
||||
LOCVAL(LOCALE_SMONTHNAME7,"Juli")
|
||||
LOCVAL(LOCALE_SMONTHNAME8,"August")
|
||||
LOCVAL(LOCALE_SMONTHNAME9,"September")
|
||||
LOCVAL(LOCALE_SMONTHNAME10,"Oktober")
|
||||
LOCVAL(LOCALE_SMONTHNAME11,"November")
|
||||
LOCVAL(LOCALE_SMONTHNAME12,"Dezember")
|
||||
LOCVAL(LOCALE_SMONTHNAME13,"")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME1,"Jan")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME2,"Feb")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME3,"Mär")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME4,"Apr")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME5,"Mai")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME6,"Jun")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME7,"Jul")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME8,"Aug")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME9,"Sep")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME10,"Okt")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME11,"Nov")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME12,"Dez")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME13,"")
|
||||
/*
|
||||
LOCVAL(LOCALE_SPOSITIVESIGN)
|
||||
LOCVAL(LOCALE_SNEGATIVESIGN)
|
||||
LOCVAL(LOCALE_IPOSSIGNPOSN)
|
||||
LOCVAL(LOCALE_INEGSIGNPOSN)
|
||||
LOCVAL(LOCALE_IPOSSYMPRECEDES)
|
||||
LOCVAL(LOCALE_IPOSSEPBYSPACE)
|
||||
LOCVAL(LOCALE_INEGSYMPRECEDES)
|
||||
LOCVAL(LOCALE_INEGSEPBYSPACE)
|
||||
*/
|
||||
#endif /* LANG(De) */
|
||||
|
||||
/*Insert other languages here*/
|
||||
|
||||
|
||||
|
||||
if(!retLen)
|
||||
{
|
||||
if(!retString)fprintf(stderr,"Unkown LC type %lX\n",LCType);
|
||||
else fprintf(stderr,"'%s' not supported for your language.\n",
|
||||
retString);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(retLen>len)retLen=len;
|
||||
strncpy(buf,retString,len);
|
||||
return retLen;
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include "windows.h"
|
||||
#include "ole.h"
|
||||
#include "gdi.h"
|
||||
#include "stddebug.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
@ -45,3 +46,12 @@ OLESTATUS WINAPI OleRevokeClientDoc(LHCLIENTDOC hServerDoc)
|
|||
dprintf_ole(stdnimp,"OleRevokeClientDoc:%ld\n",hServerDoc);
|
||||
return OLE_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* OleIsDcMeta
|
||||
*/
|
||||
BOOL WINAPI OleIsDcMeta(HDC hdc)
|
||||
{
|
||||
dprintf_ole(stddeb,"OleIsDCMeta(%04X)\n",hdc);
|
||||
return GDI_GetObjPtr( hdc, METAFILE_DC_MAGIC ) != 0;
|
||||
}
|
||||
|
|
|
@ -24,6 +24,8 @@ static char Copyright [] = "Copyright (C) 1993 Miguel de Icaza";
|
|||
#include "wine.h"
|
||||
#include "windows.h"
|
||||
#include "dos_fs.h"
|
||||
#include "module.h"
|
||||
#include "toolhelp.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_PROFILE */
|
||||
#include "debug.h"
|
||||
|
@ -48,6 +50,7 @@ typedef struct TSecHeader {
|
|||
|
||||
typedef struct TProfile {
|
||||
char *FileName;
|
||||
char *FullName;
|
||||
TSecHeader *Section;
|
||||
struct TProfile *link;
|
||||
int changed;
|
||||
|
@ -70,7 +73,7 @@ static TSecHeader *is_loaded (char *FileName)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static char *GetIniFileName(char *name)
|
||||
static char *GetIniFileName(char *name, char *dir)
|
||||
{
|
||||
char temp[256];
|
||||
|
||||
|
@ -79,15 +82,15 @@ static char *GetIniFileName(char *name)
|
|||
|
||||
if (strchr(name, '\\'))
|
||||
return DOS_GetUnixFileName(name);
|
||||
|
||||
GetWindowsDirectory(temp, sizeof(temp) );
|
||||
strcat(temp, "\\");
|
||||
|
||||
strcpy(temp, dir);
|
||||
strcat(temp, "\\");
|
||||
strcat(temp, name);
|
||||
|
||||
return DOS_GetUnixFileName(temp);
|
||||
}
|
||||
|
||||
static TSecHeader *load (char *filename)
|
||||
static TSecHeader *load (char *filename, char **pfullname)
|
||||
{
|
||||
FILE *f;
|
||||
int state;
|
||||
|
@ -95,13 +98,37 @@ static TSecHeader *load (char *filename)
|
|||
char CharBuffer [STRSIZE];
|
||||
char *next, *file;
|
||||
char c;
|
||||
char path[MAX_PATH+1];
|
||||
|
||||
file = GetIniFileName(filename);
|
||||
/* Try the Windows directory */
|
||||
|
||||
GetWindowsDirectory(path, sizeof(path));
|
||||
file = GetIniFileName(filename, path);
|
||||
|
||||
dprintf_profile(stddeb,"Load %s\n", file);
|
||||
if ((f = fopen (file, "r"))==NULL)
|
||||
f = fopen(file, "r");
|
||||
|
||||
if (f == NULL) {
|
||||
/* Try the path of the current executable */
|
||||
|
||||
if (GetCurrentTask())
|
||||
{
|
||||
char *p;
|
||||
GetModuleFileName( GetCurrentTask(), path, MAX_PATH );
|
||||
if ((p = strrchr( path, '\\' )))
|
||||
{
|
||||
p[1] = '\0';
|
||||
file = GetIniFileName(filename, path);
|
||||
f = fopen(file, "r");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (f == NULL) {
|
||||
fprintf(stderr, "profile.c: load() can't find file %s\n", filename);
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
*pfullname = strdup(file);
|
||||
dprintf_profile(stddeb,"Loading %s\n", file);
|
||||
|
||||
|
||||
|
@ -220,7 +247,7 @@ static short GetSetProfile (int set, LPSTR AppName, LPSTR KeyName,
|
|||
New = (TProfile *) xmalloc (sizeof (TProfile));
|
||||
New->link = Base;
|
||||
New->FileName = strdup (FileName);
|
||||
New->Section = load (FileName);
|
||||
New->Section = load (FileName, &New->FullName);
|
||||
New->changed = FALSE;
|
||||
Base = New;
|
||||
section = New->Section;
|
||||
|
@ -242,7 +269,7 @@ static short GetSetProfile (int set, LPSTR AppName, LPSTR KeyName,
|
|||
if (left < 1) {
|
||||
dprintf_profile(stddeb,"GetSetProfile // No more storage for enum !\n");
|
||||
return (Size - 2);
|
||||
}
|
||||
}
|
||||
slen = min(strlen(key->KeyName) + 1, left);
|
||||
dprintf_profile(stddeb,"GetSetProfile // strncpy(%p, %p, %d);\n",
|
||||
ReturnedString, key->Value, slen);
|
||||
|
@ -376,7 +403,7 @@ static void dump_profile (TProfile *p)
|
|||
dump_profile (p->link);
|
||||
if(!p->changed)
|
||||
return;
|
||||
if ((profile = fopen (GetIniFileName(p->FileName), "w")) != NULL){
|
||||
if ((profile = fopen (p->FullName, "w")) != NULL){
|
||||
dump_sections (profile, p->Section);
|
||||
fclose (profile);
|
||||
}
|
||||
|
|
36
misc/shell.c
36
misc/shell.c
|
@ -351,15 +351,32 @@ BOOL DragQueryPoint(HDROP h, POINT FAR *p)
|
|||
*/
|
||||
HINSTANCE ShellExecute(HWND hWnd, LPCSTR lpOperation, LPCSTR lpFile, LPCSTR lpParameters, LPCSTR lpDirectory, int iShowCmd)
|
||||
{
|
||||
fprintf(stdnimp, "ShellExecute: empty stub\n");
|
||||
char cmd[400];
|
||||
dprintf_exec(stddeb, "ShellExecute(%4X,'%s','%s','%s','%s',%x)\n",
|
||||
hWnd, lpOperation ? lpOperation:"<null>", lpFile ? lpFile:"<null>",
|
||||
lpParameters ? lpParameters : "<null>",
|
||||
lpDirectory ? lpDirectory : "<null>", iShowCmd);
|
||||
if(lpOperation && !strcasecmp(lpOperation,"print"))
|
||||
{
|
||||
fprintf(stderr, "Shell print %s: not supported\n", lpFile);
|
||||
return 2; /* file not found */
|
||||
}
|
||||
if(lpOperation && !strcasecmp(lpOperation,"open"))
|
||||
{
|
||||
fprintf(stderr, "ShellExecute: Unknown operation %s\n",lpOperation);
|
||||
return 2;
|
||||
fprintf(stdnimp, "ShellExecute // hWnd=%04X\n", hWnd);
|
||||
fprintf(stdnimp, "ShellExecute // lpOperation='%s'\n", lpOperation);
|
||||
fprintf(stdnimp, "ShellExecute // lpFile='%s'\n", lpFile);
|
||||
fprintf(stdnimp, "ShellExecute // lpParameters='%s'\n", lpParameters);
|
||||
fprintf(stdnimp, "ShellExecute // lpDirectory='%s'\n", lpDirectory);
|
||||
fprintf(stdnimp, "ShellExecute // iShowCmd=%04X\n", iShowCmd);
|
||||
return 2; /* file not found */
|
||||
}
|
||||
/* OK. We are supposed to lookup the program associated with lpFile,
|
||||
then to execute it using that program. If lpFile is a program,
|
||||
we have to pass the parameters. If an instance is already running,
|
||||
we might have to send DDE commands.
|
||||
This implementation does none of that. It assumes lpFile is a program.
|
||||
Plain WinExec will do what we need */
|
||||
if(lpParameters)
|
||||
sprintf(cmd,"%s %s",lpFile,lpParameters);
|
||||
else
|
||||
strcpy(cmd,lpFile);
|
||||
return WinExec(cmd,iShowCmd);
|
||||
}
|
||||
|
||||
|
||||
|
@ -430,8 +447,9 @@ HICON ExtractIcon(HINSTANCE hInst, LPCSTR lpszExeFileName, UINT nIconIndex)
|
|||
HINSTANCE hInst2 = hInst;
|
||||
dprintf_reg(stddeb, "ExtractIcon(%04X, '%s', %d\n",
|
||||
hInst, lpszExeFileName, nIconIndex);
|
||||
return 0;
|
||||
if (lpszExeFileName != NULL) {
|
||||
hInst2 = LoadLibrary(lpszExeFileName);
|
||||
hInst2 = LoadModule(lpszExeFileName,(LPVOID)-1);
|
||||
}
|
||||
if (hInst2 != 0 && nIconIndex == (UINT)-1) {
|
||||
#if 0
|
||||
|
|
|
@ -288,6 +288,7 @@ void SpyMessage(HWND hwnd, WORD msg, WORD wParam, LONG lParam)
|
|||
*/
|
||||
void SpyInit(void)
|
||||
{
|
||||
#ifndef NOSPY
|
||||
char filename[100];
|
||||
|
||||
if (SpyFp != NULL)
|
||||
|
@ -322,4 +323,5 @@ void SpyInit(void)
|
|||
if (*SpyFilters != 0) {
|
||||
strcat(SpyFilters, ";");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
MODULE = miscemu
|
||||
|
||||
SRCS = \
|
||||
dpmi.c \
|
||||
emulate.c \
|
||||
instr.c \
|
||||
int10.c \
|
||||
int13.c \
|
||||
int15.c \
|
||||
|
@ -14,7 +16,6 @@ SRCS = \
|
|||
int26.c \
|
||||
int2a.c \
|
||||
int2f.c \
|
||||
int31.c \
|
||||
int5c.c \
|
||||
interrupts.c \
|
||||
ioports.c
|
||||
|
|
173
miscemu/dpmi.c
Normal file
173
miscemu/dpmi.c
Normal file
|
@ -0,0 +1,173 @@
|
|||
/*
|
||||
* DPMI 0.9 emulation
|
||||
*
|
||||
* Copyright 1995 Alexandre Julliard
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "windows.h"
|
||||
#include "ldt.h"
|
||||
#include "registers.h"
|
||||
#include "wine.h"
|
||||
#include "miscemu.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_INT */
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* do_int31
|
||||
*
|
||||
* Handle the DPMI interrupt (int 31h).
|
||||
*/
|
||||
int do_int31( struct sigcontext_struct *context )
|
||||
{
|
||||
DWORD dw;
|
||||
BYTE *ptr;
|
||||
|
||||
dprintf_int( stddeb, "int31 (DPMI): AX %04x, BX %04x, CX %04x, DX %04x, "
|
||||
"SI %04x, DI %04x, DS %04x, ES %04x\n",
|
||||
AX, BX, CX, DX, SI, DI, DS, ES );
|
||||
|
||||
ResetCflag;
|
||||
switch(AX)
|
||||
{
|
||||
case 0x0000: /* Allocate LDT descriptors */
|
||||
if (!(AX = AllocSelectorArray( CX )))
|
||||
{
|
||||
AX = 0x8011; /* descriptor unavailable */
|
||||
SetCflag;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x0001: /* Free LDT descriptor */
|
||||
if (FreeSelector( BX ))
|
||||
{
|
||||
AX = 0x8022; /* invalid selector */
|
||||
SetCflag;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x0003: /* Get next selector increment */
|
||||
AX = __AHINCR;
|
||||
break;
|
||||
|
||||
case 0x0004: /* Lock selector (not supported) */
|
||||
AX = 0; /* FIXME: is this a correct return value? */
|
||||
break;
|
||||
|
||||
case 0x0005: /* Unlock selector (not supported) */
|
||||
AX = 0; /* FIXME: is this a correct return value? */
|
||||
break;
|
||||
|
||||
case 0x0006: /* Get selector base address */
|
||||
if (!(dw = GetSelectorBase( BX )))
|
||||
{
|
||||
AX = 0x8022; /* invalid selector */
|
||||
SetCflag;
|
||||
}
|
||||
else
|
||||
{
|
||||
CX = HIWORD(dw);
|
||||
DX = LOWORD(dw);
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x0007: /* Set selector base address */
|
||||
SetSelectorBase( BX, MAKELONG( DX, CX ) );
|
||||
break;
|
||||
|
||||
case 0x0008: /* Set selector limit */
|
||||
SetSelectorLimit( BX, MAKELONG( DX, CX ) );
|
||||
break;
|
||||
|
||||
case 0x0009: /* Set selector access rights */
|
||||
SelectorAccessRights( BX, 1, CX );
|
||||
|
||||
case 0x000a: /* Allocate selector alias */
|
||||
if (!(AX = AllocCStoDSAlias( BX )))
|
||||
{
|
||||
AX = 0x8011; /* descriptor unavailable */
|
||||
SetCflag;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x000b: /* Get descriptor */
|
||||
{
|
||||
ldt_entry entry;
|
||||
LDT_GetEntry( SELECTOR_TO_ENTRY(BX), &entry );
|
||||
/* FIXME: should use ES:EDI for 32-bit clients */
|
||||
LDT_EntryToBytes( PTR_SEG_OFF_TO_LIN( ES, DI ), &entry );
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x000c: /* Set descriptor */
|
||||
{
|
||||
ldt_entry entry;
|
||||
LDT_BytesToEntry( PTR_SEG_OFF_TO_LIN( ES, DI ), &entry );
|
||||
LDT_GetEntry( SELECTOR_TO_ENTRY(BX), &entry );
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x000d: /* Allocate specific LDT descriptor */
|
||||
AX = 0x8011; /* descriptor unavailable */
|
||||
SetCflag;
|
||||
break;
|
||||
|
||||
case 0x0400: /* Get DPMI version */
|
||||
AX = 0x0009; /* DPMI version 0.9 */
|
||||
BX = 0x0005; /* Flags: 32-bit, virtual memory */
|
||||
CL = 4; /* CPU type: 486 */
|
||||
DX = 0x0102; /* Master and slave interrupt controller base */
|
||||
break;
|
||||
|
||||
case 0x0500: /* Get free memory information */
|
||||
memset( PTR_SEG_OFF_TO_LIN( ES, DI ),
|
||||
0xff, 0x30 ); /* No information supported */
|
||||
break;
|
||||
|
||||
case 0x0501: /* Allocate memory block */
|
||||
if (!(ptr = (BYTE *)malloc( MAKELONG( CX, BX ) )))
|
||||
{
|
||||
AX = 0x8012; /* linear memory not available */
|
||||
SetCflag;
|
||||
}
|
||||
else
|
||||
{
|
||||
BX = SI = HIWORD(ptr);
|
||||
CX = DI = LOWORD(ptr);
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x0502: /* Free memory block */
|
||||
free( (void *)MAKELONG( DI, SI ) );
|
||||
break;
|
||||
|
||||
case 0x0503: /* Resize memory block */
|
||||
if (!(ptr = (BYTE *)realloc( (void *)MAKELONG(DI,SI),MAKELONG(CX,BX))))
|
||||
{
|
||||
AX = 0x8012; /* linear memory not available */
|
||||
SetCflag;
|
||||
}
|
||||
else
|
||||
{
|
||||
BX = SI = HIWORD(ptr);
|
||||
CX = DI = LOWORD(ptr);
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x0600: /* Lock linear region */
|
||||
break; /* Just ignore it */
|
||||
|
||||
case 0x0601: /* Unlock linear region */
|
||||
break; /* Just ignore it */
|
||||
|
||||
default:
|
||||
AX = 0x8001; /* unsupported function */
|
||||
SetCflag;
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include "wine.h"
|
||||
#include "registers.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_INT */
|
||||
#include "debug.h"
|
||||
|
@ -15,18 +16,20 @@ struct Win87EmInfoStruct {
|
|||
};
|
||||
|
||||
void
|
||||
WIN87_fpmath( struct sigcontext_struct context )
|
||||
WIN87_fpmath( struct sigcontext_struct sigcontext )
|
||||
{
|
||||
dprintf_int(stddeb, "_fpmath: (%x:%lx %x %x)\n",context.sc_cs,
|
||||
context.sc_eip, context.sc_es, (int)context.sc_ebx & 0xffff );
|
||||
/* Declare a context pointer so that registers macros work */
|
||||
struct sigcontext_struct *context = &sigcontext;
|
||||
|
||||
switch(context.sc_ebx & 0xffff)
|
||||
dprintf_int(stddeb, "_fpmath: (%x:%lx %x %x)\n", CS, EIP, ES, BX );
|
||||
|
||||
switch(BX)
|
||||
{
|
||||
case 11:
|
||||
context.sc_eax = 1;
|
||||
AX = 1;
|
||||
break;
|
||||
default:
|
||||
context.sc_eax = 0;
|
||||
AX = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
201
miscemu/instr.c
Normal file
201
miscemu/instr.c
Normal file
|
@ -0,0 +1,201 @@
|
|||
/*
|
||||
* Emulation of priviledged instructions
|
||||
*
|
||||
* Copyright 1995 Alexandre Julliard
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "windows.h"
|
||||
#include "dos_fs.h"
|
||||
#include "ldt.h"
|
||||
#include "miscemu.h"
|
||||
#include "registers.h"
|
||||
|
||||
|
||||
static int do_int(int intnum, struct sigcontext_struct *context)
|
||||
{
|
||||
switch(intnum)
|
||||
{
|
||||
case 0x10: return do_int10(context);
|
||||
|
||||
case 0x11:
|
||||
AX = DOS_GetEquipment();
|
||||
return 1;
|
||||
|
||||
case 0x12:
|
||||
AX = 640;
|
||||
return 1; /* get base mem size */
|
||||
|
||||
case 0x13: return do_int13(context);
|
||||
case 0x15: return do_int15(context);
|
||||
case 0x16: return do_int16(context);
|
||||
case 0x1a: return do_int1a(context);
|
||||
case 0x21: return do_int21(context);
|
||||
|
||||
case 0x22:
|
||||
AX = 0x1234;
|
||||
BX = 0x5678;
|
||||
CX = 0x9abc;
|
||||
DX = 0xdef0;
|
||||
return 1;
|
||||
|
||||
case 0x25: return do_int25(context);
|
||||
case 0x26: return do_int26(context);
|
||||
case 0x2a: return do_int2a(context);
|
||||
case 0x2f: return do_int2f(context);
|
||||
case 0x31: return do_int31(context);
|
||||
case 0x3d: return 1;
|
||||
case 0x5c: return do_int5c(context);
|
||||
|
||||
default:
|
||||
fprintf(stderr,"int%02x: Unimplemented!\n", intnum);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* INSTR_EmulateInstruction
|
||||
*
|
||||
* Emulate a priviledged instruction. Returns TRUE if emulation successful.
|
||||
*/
|
||||
BOOL INSTR_EmulateInstruction( struct sigcontext_struct *context )
|
||||
{
|
||||
int prefix, segprefix, long_op, long_addr;
|
||||
BYTE *instr = (BYTE *) PTR_SEG_OFF_TO_LIN( CS, IP );
|
||||
|
||||
/* First handle any possible prefix */
|
||||
|
||||
long_op = long_addr = (GET_SEL_FLAGS(CS) & LDT_FLAGS_32BIT) != 0;
|
||||
segprefix = 0; /* no prefix */
|
||||
prefix = 1;
|
||||
while(prefix)
|
||||
{
|
||||
switch(*instr)
|
||||
{
|
||||
case 0x2e:
|
||||
segprefix = 1; /* CS */
|
||||
break;
|
||||
case 0x36:
|
||||
segprefix = 2; /* SS */
|
||||
break;
|
||||
case 0x3e:
|
||||
segprefix = 3; /* DS */
|
||||
break;
|
||||
case 0x26:
|
||||
segprefix = 4; /* ES */
|
||||
break;
|
||||
case 0x64:
|
||||
segprefix = 5; /* FS */
|
||||
break;
|
||||
case 0x65:
|
||||
segprefix = 6; /* GS */
|
||||
break;
|
||||
case 0x66:
|
||||
long_op = !long_op; /* opcode size prefix */
|
||||
break;
|
||||
case 0x67:
|
||||
long_addr = !long_addr; /* addr size prefix */
|
||||
break;
|
||||
default:
|
||||
prefix = 0; /* no more prefixes */
|
||||
break;
|
||||
}
|
||||
if (prefix)
|
||||
{
|
||||
instr++;
|
||||
EIP++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Now look at the actual instruction */
|
||||
|
||||
switch(*instr)
|
||||
{
|
||||
case 0xcd: /* int <XX> */
|
||||
instr++;
|
||||
if (!do_int(*instr, context))
|
||||
{
|
||||
fprintf(stderr,"Unexpected Windows interrupt %x\n", *instr);
|
||||
return FALSE;
|
||||
}
|
||||
EIP += 2; /* Bypass the int instruction */
|
||||
break;
|
||||
|
||||
case 0xcf: /* iret */
|
||||
if (long_op)
|
||||
{
|
||||
/* FIXME: should check the stack 'big' bit */
|
||||
DWORD *stack = (WORD *)PTR_SEG_OFF_TO_LIN( SS, SP );
|
||||
EIP = *stack++;
|
||||
CS = *stack++;
|
||||
EFL = *stack;
|
||||
SP += 3*sizeof(DWORD); /* Pop the return address and flags */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* FIXME: should check the stack 'big' bit */
|
||||
WORD *stack = (WORD *)PTR_SEG_OFF_TO_LIN( SS, SP );
|
||||
EIP = *stack++;
|
||||
CS = *stack++;
|
||||
EFL = (EFL & 0xffff0000) | *stack;
|
||||
SP += 3*sizeof(WORD); /* Pop the return address and flags */
|
||||
}
|
||||
break;
|
||||
|
||||
case 0xe4: /* inb al,XX */
|
||||
inportb_abs(context);
|
||||
EIP += 2;
|
||||
break;
|
||||
|
||||
case 0xe5: /* in ax,XX */
|
||||
inport_abs( context, long_op );
|
||||
EIP += 2;
|
||||
break;
|
||||
|
||||
case 0xe6: /* outb XX,al */
|
||||
outportb_abs(context);
|
||||
EIP += 2;
|
||||
break;
|
||||
|
||||
case 0xe7: /* out XX,ax */
|
||||
outport_abs( context, long_op );
|
||||
EIP += 2;
|
||||
break;
|
||||
|
||||
case 0xec: /* inb al,dx */
|
||||
inportb(context);
|
||||
EIP++;
|
||||
break;
|
||||
|
||||
case 0xed: /* in ax,dx */
|
||||
inport( context, long_op );
|
||||
EIP++;
|
||||
break;
|
||||
|
||||
case 0xee: /* outb dx,al */
|
||||
outportb(context);
|
||||
EIP++;
|
||||
break;
|
||||
|
||||
case 0xef: /* out dx,ax */
|
||||
outport( context, long_op );
|
||||
EIP++;
|
||||
break;
|
||||
|
||||
case 0xfa: /* cli, ignored */
|
||||
EIP++;
|
||||
break;
|
||||
|
||||
case 0xfb: /* sti, ignored */
|
||||
EIP++;
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr, "Unexpected Windows program segfault"
|
||||
" - opcode = %x\n", *instr);
|
||||
return FALSE; /* Unable to emulate it */
|
||||
}
|
||||
return TRUE;
|
||||
}
|
194
miscemu/int21.c
194
miscemu/int21.c
|
@ -222,9 +222,9 @@ static void GetDriveAllocInfo(struct sigcontext_struct *context)
|
|||
return;
|
||||
}
|
||||
|
||||
EAX = 4;
|
||||
ECX = 512;
|
||||
EDX = (size / (CX * AX));
|
||||
AX = 4;
|
||||
CX = 512;
|
||||
DX = (size / (CX * AX));
|
||||
|
||||
heap->mediaID = 0xf0;
|
||||
|
||||
|
@ -312,7 +312,7 @@ static void ReadFile(struct sigcontext_struct *context)
|
|||
BX, CX, size);
|
||||
if (size == -1) {
|
||||
errno_to_doserr();
|
||||
AL = ExtendedError;
|
||||
AX = ExtendedError;
|
||||
SetCflag;
|
||||
return;
|
||||
}
|
||||
|
@ -343,19 +343,19 @@ static void WriteFile(struct sigcontext_struct *context)
|
|||
fflush(stddeb);
|
||||
|
||||
Error (0,0,0);
|
||||
AL = CX;
|
||||
AX = CX;
|
||||
ResetCflag;
|
||||
} else {
|
||||
size = write(BX, ptr , CX);
|
||||
if (size == 0) {
|
||||
Error (WriteFault, EC_Unknown, EL_Unknown);
|
||||
AL = ExtendedError;
|
||||
AX = ExtendedError;
|
||||
return;
|
||||
}
|
||||
|
||||
if (size == -1) {
|
||||
errno_to_doserr();
|
||||
AL = ExtendedError;
|
||||
AX = ExtendedError;
|
||||
SetCflag;
|
||||
return;
|
||||
}
|
||||
|
@ -385,13 +385,13 @@ static void SeekFile(struct sigcontext_struct *context)
|
|||
|
||||
if (status == -1) {
|
||||
errno_to_doserr();
|
||||
AL = ExtendedError; SetCflag;
|
||||
AX = ExtendedError;
|
||||
SetCflag;
|
||||
return;
|
||||
}
|
||||
Error (0,0,0);
|
||||
AX = (status & 0xffff);
|
||||
DX = ((status >> 16) & 0xffff);
|
||||
|
||||
AX = LOWORD(status);
|
||||
DX = HIWORD(status);
|
||||
ResetCflag;
|
||||
}
|
||||
|
||||
|
@ -404,7 +404,7 @@ static void ioctlGetDeviceInfo(struct sigcontext_struct *context)
|
|||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
DX = 0x80d0 + (1 << BX);
|
||||
DX = 0x80d0 | (1 << (BX != 0));
|
||||
ResetCflag;
|
||||
break;
|
||||
|
||||
|
@ -415,7 +415,6 @@ static void ioctlGetDeviceInfo(struct sigcontext_struct *context)
|
|||
if (fstat(BX, &sbuf) < 0)
|
||||
{
|
||||
IntBarf(0x21, context);
|
||||
DX = 0x50;
|
||||
SetCflag;
|
||||
return;
|
||||
}
|
||||
|
@ -481,7 +480,7 @@ static void GetSystemDate(struct sigcontext_struct *context)
|
|||
ltime = time(NULL);
|
||||
now = localtime(<ime);
|
||||
|
||||
CX = now->tm_year + 1900 - 1980;
|
||||
CX = now->tm_year + 1900;
|
||||
DX = ((now->tm_mon + 1) << 8) | now->tm_mday;
|
||||
AX = now->tm_wday;
|
||||
}
|
||||
|
@ -501,7 +500,7 @@ static void GetSystemTime(struct sigcontext_struct *context)
|
|||
|
||||
static void GetExtendedErrorInfo(struct sigcontext_struct *context)
|
||||
{
|
||||
AL = ExtendedError;
|
||||
AX = ExtendedError;
|
||||
BX = (ErrorClass << 8) | Action;
|
||||
CH = ErrorLocus << 8;
|
||||
}
|
||||
|
@ -513,12 +512,12 @@ static void CreateFile(struct sigcontext_struct *context)
|
|||
if ((handle = open(DOS_GetUnixFileName( PTR_SEG_OFF_TO_LIN(DS,DX)),
|
||||
O_CREAT | O_TRUNC | O_RDWR )) == -1) {
|
||||
errno_to_doserr();
|
||||
AL = ExtendedError;
|
||||
AX = ExtendedError;
|
||||
SetCflag;
|
||||
return;
|
||||
}
|
||||
Error (0,0,0);
|
||||
EAX = (EAX & 0xffff0000) | handle;
|
||||
AX = handle;
|
||||
ResetCflag;
|
||||
}
|
||||
|
||||
|
@ -554,7 +553,7 @@ void OpenExistingFile(struct sigcontext_struct *context)
|
|||
dprintf_int (stddeb, "int21: open (%s, %d) = -1\n",
|
||||
DOS_GetUnixFileName(PTR_SEG_OFF_TO_LIN(DS,DX)), mode);
|
||||
errno_to_doserr();
|
||||
AL = ExtendedError;
|
||||
AX = ExtendedError;
|
||||
SetCflag;
|
||||
return;
|
||||
}
|
||||
|
@ -606,7 +605,7 @@ void OpenExistingFile(struct sigcontext_struct *context)
|
|||
if(result)
|
||||
{
|
||||
errno_to_doserr();
|
||||
EAX = (EAX & 0xffffff00) | ExtendedError;
|
||||
AX = ExtendedError;
|
||||
close(handle);
|
||||
SetCflag;
|
||||
return;
|
||||
|
@ -615,7 +614,7 @@ void OpenExistingFile(struct sigcontext_struct *context)
|
|||
}
|
||||
|
||||
Error (0,0,0);
|
||||
EAX = (EAX & 0xffff0000) | handle;
|
||||
AX = handle;
|
||||
ResetCflag;
|
||||
}
|
||||
|
||||
|
@ -625,12 +624,12 @@ static void CloseFile(struct sigcontext_struct *context)
|
|||
|
||||
if (close(BX) == -1) {
|
||||
errno_to_doserr();
|
||||
AL = ExtendedError;
|
||||
AX = ExtendedError;
|
||||
SetCflag;
|
||||
return;
|
||||
}
|
||||
Error (0,0,0);
|
||||
AL = NoError;
|
||||
AX = NoError;
|
||||
ResetCflag;
|
||||
}
|
||||
|
||||
|
@ -638,6 +637,7 @@ static void RenameFile(struct sigcontext_struct *context)
|
|||
{
|
||||
char *newname, *oldname;
|
||||
|
||||
/* FIXME: should not rename over an existing file */
|
||||
dprintf_int(stddeb,"int21: renaming %s to %s\n",
|
||||
(char *)PTR_SEG_OFF_TO_LIN(DS,DX), (char *)PTR_SEG_OFF_TO_LIN(ES,DI) );
|
||||
|
||||
|
@ -656,13 +656,13 @@ static void MakeDir(struct sigcontext_struct *context)
|
|||
dprintf_int(stddeb,"int21: makedir %s\n", (char *)PTR_SEG_OFF_TO_LIN(DS,DX) );
|
||||
|
||||
if ((dirname = DOS_GetUnixFileName( PTR_SEG_OFF_TO_LIN(DS,DX) ))== NULL) {
|
||||
AL = CanNotMakeDir;
|
||||
AX = CanNotMakeDir;
|
||||
SetCflag;
|
||||
return;
|
||||
}
|
||||
|
||||
if (mkdir(dirname,0) == -1) {
|
||||
AL = CanNotMakeDir;
|
||||
AX = CanNotMakeDir;
|
||||
SetCflag;
|
||||
return;
|
||||
}
|
||||
|
@ -693,7 +693,7 @@ static void RemoveDir(struct sigcontext_struct *context)
|
|||
dprintf_int(stddeb,"int21: removedir %s\n", (char *)PTR_SEG_OFF_TO_LIN(DS,DX) );
|
||||
|
||||
if ((dirname = DOS_GetUnixFileName( PTR_SEG_OFF_TO_LIN(DS,DX) ))== NULL) {
|
||||
AL = CanNotMakeDir;
|
||||
AX = PathNotFound;
|
||||
SetCflag;
|
||||
return;
|
||||
}
|
||||
|
@ -705,17 +705,13 @@ static void RemoveDir(struct sigcontext_struct *context)
|
|||
}
|
||||
*/
|
||||
if (rmdir(dirname) == -1) {
|
||||
AL = CanNotMakeDir;
|
||||
AX = AccessDenied;
|
||||
SetCflag;
|
||||
return;
|
||||
}
|
||||
ResetCflag;
|
||||
}
|
||||
|
||||
static void ExecProgram(struct sigcontext_struct *context)
|
||||
{
|
||||
execl("wine", DOS_GetUnixFileName( PTR_SEG_OFF_TO_LIN(DS,DX)) );
|
||||
}
|
||||
|
||||
static void FindNext(struct sigcontext_struct *context)
|
||||
{
|
||||
struct dosdirent *dp;
|
||||
|
@ -727,7 +723,7 @@ static void FindNext(struct sigcontext_struct *context)
|
|||
do {
|
||||
if ((dp = DOS_readdir(dp)) == NULL) {
|
||||
Error(NoMoreFiles, EC_MediaError , EL_Disk);
|
||||
AL = NoMoreFiles;
|
||||
AX = NoMoreFiles;
|
||||
SetCflag;
|
||||
return;
|
||||
}
|
||||
|
@ -745,7 +741,7 @@ static void FindNext(struct sigcontext_struct *context)
|
|||
setdword(&dta[0x1a], dp->filesize);
|
||||
strncpy(dta + 0x1e, dp->filename, 13);
|
||||
|
||||
AL = 0;
|
||||
AX = 0;
|
||||
ResetCflag;
|
||||
|
||||
dprintf_int(stddeb, "int21: FindNext -- (%s) index=%d size=%ld\n", dp->filename, dp->entnum, dp->filesize);
|
||||
|
@ -766,7 +762,7 @@ static void FindFirst(struct sigcontext_struct *context)
|
|||
|
||||
if (!DOS_ValidDrive(drive)) {
|
||||
Error(InvalidDrive, EC_MediaError , EL_Disk);
|
||||
AL = InvalidDrive;
|
||||
AX = InvalidDrive;
|
||||
SetCflag;
|
||||
return;
|
||||
}
|
||||
|
@ -783,14 +779,14 @@ static void FindFirst(struct sigcontext_struct *context)
|
|||
if (DOS_GetVolumeLabel(drive) != NULL)
|
||||
strncpy(dta + 0x1e, DOS_GetVolumeLabel(drive), 8);
|
||||
|
||||
AL = 0;
|
||||
AX = 0;
|
||||
ResetCflag;
|
||||
return;
|
||||
}
|
||||
|
||||
if ((dp = DOS_opendir(path)) == NULL) {
|
||||
Error(PathNotFound, EC_MediaError, EL_Disk);
|
||||
AL = FileNotFound;
|
||||
AX = FileNotFound;
|
||||
SetCflag;
|
||||
return;
|
||||
}
|
||||
|
@ -809,7 +805,8 @@ static void GetFileDateTime(struct sigcontext_struct *context)
|
|||
now = localtime (&filestat.st_mtime);
|
||||
|
||||
CX = ((now->tm_hour * 0x2000) + (now->tm_min * 0x20) + now->tm_sec/2);
|
||||
DX = ((now->tm_year * 0x200) + (now->tm_mon * 0x20) + now->tm_mday);
|
||||
DX = (((now->tm_year + 1900 - 1980) * 0x200) +
|
||||
(now->tm_mon * 0x20) + now->tm_mday);
|
||||
|
||||
ResetCflag;
|
||||
}
|
||||
|
@ -842,7 +839,7 @@ static void CreateTempFile(struct sigcontext_struct *context)
|
|||
handle = open(DOS_GetUnixFileName(temp), O_CREAT | O_TRUNC | O_RDWR);
|
||||
|
||||
if (handle == -1) {
|
||||
AL = WriteProtected;
|
||||
AX = WriteProtected;
|
||||
SetCflag;
|
||||
return;
|
||||
}
|
||||
|
@ -858,7 +855,7 @@ static void CreateNewFile(struct sigcontext_struct *context)
|
|||
int handle;
|
||||
|
||||
if ((handle = open(DOS_GetUnixFileName( PTR_SEG_OFF_TO_LIN(DS,DX) ), O_CREAT | O_EXCL | O_RDWR)) == -1) {
|
||||
AL = WriteProtected;
|
||||
AX = WriteProtected;
|
||||
SetCflag;
|
||||
return;
|
||||
}
|
||||
|
@ -877,7 +874,7 @@ static void GetCurrentDirectory(struct sigcontext_struct *context)
|
|||
drive = DL - 1;
|
||||
|
||||
if (!DOS_ValidDrive(drive)) {
|
||||
AL = InvalidDrive;
|
||||
AX = InvalidDrive;
|
||||
SetCflag;
|
||||
return;
|
||||
}
|
||||
|
@ -898,7 +895,7 @@ static void GetDiskSerialNumber(struct sigcontext_struct *context)
|
|||
drive = BL - 1;
|
||||
|
||||
if (!DOS_ValidDrive(drive)) {
|
||||
AL =InvalidDrive;
|
||||
AX =InvalidDrive;
|
||||
SetCflag;
|
||||
return;
|
||||
}
|
||||
|
@ -910,7 +907,7 @@ static void GetDiskSerialNumber(struct sigcontext_struct *context)
|
|||
strncpy(dataptr + 6, DOS_GetVolumeLabel(drive), 8);
|
||||
strncpy(dataptr + 0x11, "FAT16 ", 8);
|
||||
|
||||
AL = 0;
|
||||
AX = 0;
|
||||
ResetCflag;
|
||||
}
|
||||
|
||||
|
@ -926,7 +923,7 @@ static void SetDiskSerialNumber(struct sigcontext_struct *context)
|
|||
drive = BL - 1;
|
||||
|
||||
if (!DOS_ValidDrive(drive)) {
|
||||
AL = InvalidDrive;
|
||||
AX = InvalidDrive;
|
||||
SetCflag;
|
||||
return;
|
||||
}
|
||||
|
@ -935,7 +932,7 @@ static void SetDiskSerialNumber(struct sigcontext_struct *context)
|
|||
(dataptr[4] << 24);
|
||||
|
||||
DOS_SetSerialNumber(drive, serialnumber);
|
||||
AL = 1L;
|
||||
AX = 1;
|
||||
ResetCflag;
|
||||
}
|
||||
|
||||
|
@ -985,7 +982,7 @@ static void FindFirstFCB(struct sigcontext_struct *context)
|
|||
if (!DOS_ValidDrive(drive))
|
||||
{
|
||||
Error (InvalidDrive, EC_MediaError, EL_Disk);
|
||||
AL = 0xff;
|
||||
AX = 0xff;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1003,7 +1000,7 @@ static void FindFirstFCB(struct sigcontext_struct *context)
|
|||
if (DOS_GetVolumeLabel(drive) != NULL)
|
||||
{
|
||||
strncpy(output_fcb->name, DOS_GetVolumeLabel(drive), 11);
|
||||
AL = 0x00;
|
||||
AX = 0x00;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1017,7 +1014,7 @@ static void FindFirstFCB(struct sigcontext_struct *context)
|
|||
if ((output_fcb->directory = DOS_opendir(path))==NULL)
|
||||
{
|
||||
Error (PathNotFound, EC_MediaError, EL_Disk);
|
||||
AL = 0xff;
|
||||
AX = 0xff;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1047,7 +1044,7 @@ static void DeleteFileFCB(struct sigcontext_struct *context)
|
|||
|
||||
if ((dp = DOS_opendir(temp)) == NULL) {
|
||||
Error(InvalidDrive, EC_MediaError , EL_Disk);
|
||||
AL = 0xffL;
|
||||
AX = 0xff;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1063,7 +1060,7 @@ static void DeleteFileFCB(struct sigcontext_struct *context)
|
|||
/* unlink(DOS_GetUnixFileName(temp)); */
|
||||
}
|
||||
DOS_closedir(dp);
|
||||
AL = 0;
|
||||
AX = 0;
|
||||
}
|
||||
|
||||
static void RenameFileFCB(struct sigcontext_struct *context)
|
||||
|
@ -1089,7 +1086,7 @@ static void RenameFileFCB(struct sigcontext_struct *context)
|
|||
|
||||
if ((dp = DOS_opendir(temp)) == NULL) {
|
||||
Error(InvalidDrive, EC_MediaError , EL_Disk);
|
||||
AL = 0xffL;
|
||||
AX = 0xff;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1109,7 +1106,7 @@ static void RenameFileFCB(struct sigcontext_struct *context)
|
|||
oldname, newname);
|
||||
}
|
||||
DOS_closedir(dp);
|
||||
AL = 0;
|
||||
AX = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1135,7 +1132,7 @@ static void fLock (struct sigcontext_struct * context)
|
|||
break;
|
||||
|
||||
default:
|
||||
EAX = (EAX & 0xffff0000) | 0x0001;
|
||||
AX = 0x0001;
|
||||
SetCflag;
|
||||
return;
|
||||
}
|
||||
|
@ -1156,7 +1153,7 @@ static void fLock (struct sigcontext_struct * context)
|
|||
if(result)
|
||||
{
|
||||
errno_to_doserr();
|
||||
EAX = (EAX & 0xffffff00) | ExtendedError;
|
||||
AX = ExtendedError;
|
||||
SetCflag;
|
||||
return;
|
||||
}
|
||||
|
@ -1170,27 +1167,26 @@ static void GetFileAttribute (struct sigcontext_struct * context)
|
|||
{
|
||||
char *filename = PTR_SEG_OFF_TO_LIN (DS,DX);
|
||||
struct stat s;
|
||||
int res,cx;
|
||||
int res;
|
||||
|
||||
res = stat(DOS_GetUnixFileName(filename), &s);
|
||||
if (res==-1)
|
||||
{
|
||||
errno_to_doserr();
|
||||
EAX = (EAX & 0xffffff00) | ExtendedError;
|
||||
AX = ExtendedError;
|
||||
SetCflag;
|
||||
return;
|
||||
}
|
||||
|
||||
cx = 0;
|
||||
CX = 0;
|
||||
if (S_ISDIR(s.st_mode))
|
||||
cx|=0x10;
|
||||
CX |= 0x10;
|
||||
if ((S_IWRITE & s.st_mode) != S_IWRITE)
|
||||
cx|=0x01;
|
||||
CX |= 0x01;
|
||||
|
||||
dprintf_int (stddeb, "int21: GetFileAttributes (%s) = 0x%x\n",
|
||||
filename, cx);
|
||||
filename, CX );
|
||||
|
||||
ECX = (ECX & 0xffff0000) | cx;
|
||||
ResetCflag;
|
||||
Error (0,0,0);
|
||||
}
|
||||
|
@ -1252,19 +1248,21 @@ int do_int21(struct sigcontext_struct * context)
|
|||
IntBarf(0x21, context);
|
||||
break;
|
||||
|
||||
case 0x18: /* NULL FUNCTIONS FOR CP/M COMPATIBILITY */
|
||||
case 0x1d:
|
||||
case 0x1e:
|
||||
case 0x20:
|
||||
case 0x2b: /* SET SYSTEM DATE */
|
||||
case 0x2d: /* SET SYSTEM TIME */
|
||||
case 0x37: /* "SWITCHAR" - GET SWITCH CHARACTER
|
||||
"SWITCHAR" - SET SWITCH CHARACTER
|
||||
"AVAILDEV" - SPECIFY \DEV\ PREFIX USE */
|
||||
case 0x54: /* GET VERIFY FLAG */
|
||||
case 0x6b: /* NULL FUNCTION */
|
||||
IntBarf(0x21, context);
|
||||
EAX &= 0xff00;
|
||||
break;
|
||||
|
||||
case 0x18: /* NULL FUNCTIONS FOR CP/M COMPATIBILITY */
|
||||
case 0x1d:
|
||||
case 0x1e:
|
||||
case 0x20:
|
||||
case 0x6b: /* NULL FUNCTION */
|
||||
AL = 0;
|
||||
break;
|
||||
|
||||
case 0x5c: /* "FLOCK" - RECORD LOCKING */
|
||||
|
@ -1278,6 +1276,7 @@ int do_int21(struct sigcontext_struct * context)
|
|||
case 0x0e: /* SELECT DEFAULT DRIVE */
|
||||
if (!DOS_ValidDrive(DL)) {
|
||||
Error (InvalidDrive, EC_MediaError, EL_Disk);
|
||||
AX = MAX_DOS_DRIVES;
|
||||
break;
|
||||
} else {
|
||||
DOS_SetDefaultDrive(DL);
|
||||
|
@ -1360,8 +1359,7 @@ int do_int21(struct sigcontext_struct * context)
|
|||
case 0x33: /* MULTIPLEXED */
|
||||
switch (AL) {
|
||||
case 0x00: /* GET CURRENT EXTENDED BREAK STATE */
|
||||
if (!(AL))
|
||||
EDX &= 0xff00L;
|
||||
DL = 0;
|
||||
break;
|
||||
|
||||
case 0x01: /* SET EXTENDED BREAK STATE */
|
||||
|
@ -1377,8 +1375,8 @@ int do_int21(struct sigcontext_struct * context)
|
|||
break;
|
||||
|
||||
case 0x06: /* GET TRUE VERSION NUMBER */
|
||||
EBX = DOSVERSION;
|
||||
EDX = 0x00;
|
||||
BX = DOSVERSION;
|
||||
DX = 0x00;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -1444,7 +1442,7 @@ int do_int21(struct sigcontext_struct * context)
|
|||
case 0x41: /* "UNLINK" - DELETE FILE */
|
||||
if (unlink( DOS_GetUnixFileName( PTR_SEG_OFF_TO_LIN(DS,DX)) ) == -1) {
|
||||
errno_to_doserr();
|
||||
AL = ExtendedError;
|
||||
AX = ExtendedError;
|
||||
SetCflag;
|
||||
break;
|
||||
}
|
||||
|
@ -1484,10 +1482,10 @@ int do_int21(struct sigcontext_struct * context)
|
|||
}
|
||||
else
|
||||
{
|
||||
if(drive > 1)
|
||||
EAX = (EAX & 0xFFFF0000) | 0x0001; /* not removable */
|
||||
if (drive > 1)
|
||||
AX = 1; /* not removable */
|
||||
else
|
||||
EAX = (EAX & 0xFFFF0000); /* removable */
|
||||
AX = 0; /* removable */
|
||||
ResetCflag;
|
||||
}
|
||||
break;
|
||||
|
@ -1501,7 +1499,7 @@ int do_int21(struct sigcontext_struct * context)
|
|||
}
|
||||
else
|
||||
{
|
||||
EDX = (EDX & 0xffff0000) | (1<<9) | (1<<12) | (1<<15);
|
||||
DX = (1<<9) | (1<<12) | (1<<15);
|
||||
ResetCflag;
|
||||
}
|
||||
break;
|
||||
|
@ -1509,7 +1507,7 @@ int do_int21(struct sigcontext_struct * context)
|
|||
case 0x0b: /* SET SHARING RETRY COUNT */
|
||||
if (!CX)
|
||||
{
|
||||
EAX = (EAX & 0xffff0000) | 0x0001;
|
||||
AX = 1;
|
||||
SetCflag;
|
||||
break;
|
||||
}
|
||||
|
@ -1526,7 +1524,7 @@ int do_int21(struct sigcontext_struct * context)
|
|||
case 0x0F: /* Set logical drive mapping */
|
||||
/* FIXME: Not implemented at the moment, always returns error
|
||||
*/
|
||||
EAX = (EAX & 0xFFFF0000) | 0x0001; /* invalid function */
|
||||
AX = 0x0001; /* invalid function */
|
||||
SetCflag;
|
||||
break;
|
||||
|
||||
|
@ -1537,11 +1535,25 @@ int do_int21(struct sigcontext_struct * context)
|
|||
break;
|
||||
|
||||
case 0x45: /* "DUP" - DUPLICATE FILE HANDLE */
|
||||
case 0x46: /* "DUP2", "FORCEDUP" - FORCE DUPLICATE FILE HANDLE */
|
||||
AX = dup(BX);
|
||||
ResetCflag;
|
||||
if ((AX = dup(BX)) == 0xffff)
|
||||
{
|
||||
errno_to_doserr();
|
||||
AX = ExtendedError;
|
||||
SetCflag;
|
||||
}
|
||||
else ResetCflag;
|
||||
break;
|
||||
|
||||
case 0x46: /* "DUP2", "FORCEDUP" - FORCE DUPLICATE FILE HANDLE */
|
||||
if (dup2( BX, CX ) == -1)
|
||||
{
|
||||
errno_to_doserr();
|
||||
AX = ExtendedError;
|
||||
SetCflag;
|
||||
}
|
||||
else ResetCflag;
|
||||
break;
|
||||
|
||||
case 0x47: /* "CWD" - GET CURRENT DIRECTORY */
|
||||
GetCurrentDirectory(context);
|
||||
AX = 0x0100;
|
||||
|
@ -1555,7 +1567,7 @@ int do_int21(struct sigcontext_struct * context)
|
|||
break;
|
||||
|
||||
case 0x4b: /* "EXEC" - LOAD AND/OR EXECUTE PROGRAM */
|
||||
ExecProgram(context);
|
||||
WinExec( PTR_SEG_OFF_TO_LIN(DS,DX), SW_NORMAL );
|
||||
break;
|
||||
|
||||
case 0x4c: /* "EXIT" - TERMINATE WITH RETURN CODE */
|
||||
|
@ -1563,7 +1575,7 @@ int do_int21(struct sigcontext_struct * context)
|
|||
break;
|
||||
|
||||
case 0x4d: /* GET RETURN CODE */
|
||||
AL = NoError; /* normal exit */
|
||||
AX = NoError; /* normal exit */
|
||||
break;
|
||||
|
||||
case 0x4e: /* "FINDFIRST" - FIND FIRST MATCHING FILE */
|
||||
|
@ -1600,10 +1612,10 @@ int do_int21(struct sigcontext_struct * context)
|
|||
switch (AL)
|
||||
{
|
||||
case 0x00:
|
||||
AL = 0x01L;
|
||||
AX = 1;
|
||||
break;
|
||||
case 0x02:
|
||||
EAX &= 0xff00L;
|
||||
AX = 0;
|
||||
break;
|
||||
case 0x01:
|
||||
case 0x03:
|
||||
|
@ -1623,7 +1635,7 @@ int do_int21(struct sigcontext_struct * context)
|
|||
case 0x5d: /* NETWORK */
|
||||
case 0x5e:
|
||||
/* network software not installed */
|
||||
AL = NoNetwork;
|
||||
AX = NoNetwork;
|
||||
SetCflag;
|
||||
break;
|
||||
|
||||
|
@ -1634,7 +1646,7 @@ int do_int21(struct sigcontext_struct * context)
|
|||
if (!DOS_EnableDrive(DL))
|
||||
{
|
||||
Error(InvalidDrive, EC_MediaError , EL_Disk);
|
||||
AL = InvalidDrive;
|
||||
AX = InvalidDrive;
|
||||
SetCflag;
|
||||
break;
|
||||
}
|
||||
|
@ -1647,7 +1659,7 @@ int do_int21(struct sigcontext_struct * context)
|
|||
if (!DOS_DisableDrive(DL))
|
||||
{
|
||||
Error(InvalidDrive, EC_MediaError , EL_Disk);
|
||||
AL = InvalidDrive;
|
||||
AX = InvalidDrive;
|
||||
SetCflag;
|
||||
break;
|
||||
}
|
||||
|
@ -1658,7 +1670,7 @@ int do_int21(struct sigcontext_struct * context)
|
|||
}
|
||||
default:
|
||||
/* network software not installed */
|
||||
AL = NoNetwork;
|
||||
AX = NoNetwork;
|
||||
SetCflag;
|
||||
break;
|
||||
}
|
||||
|
@ -1696,6 +1708,8 @@ int do_int21(struct sigcontext_struct * context)
|
|||
break;
|
||||
|
||||
case 0x68: /* "FFLUSH" - COMMIT FILE */
|
||||
case 0x6a: /* COMMIT FILE */
|
||||
fsync( BX );
|
||||
ResetCflag;
|
||||
break;
|
||||
|
||||
|
@ -1711,10 +1725,6 @@ int do_int21(struct sigcontext_struct * context)
|
|||
}
|
||||
break;
|
||||
|
||||
case 0x6a: /* COMMIT FILE */
|
||||
ResetCflag;
|
||||
break;
|
||||
|
||||
case 0xea: /* NOVELL NETWARE - RETURN SHELL VERSION */
|
||||
break;
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ int do_int25(struct sigcontext_struct *context)
|
|||
length = CX;
|
||||
}
|
||||
dprintf_int(stdnimp, "int25: abs diskread, drive %d, sector %ld, "
|
||||
"count %ld, buffer %d\n", (int)EAX & 0xff, begin, length, (int) dataptr);
|
||||
"count %ld, buffer %d\n", AL, begin, length, (int) dataptr);
|
||||
|
||||
memset(dataptr, 0, length * 512);
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ int do_int26(struct sigcontext_struct *context)
|
|||
}
|
||||
|
||||
dprintf_int(stdnimp,"int26: abs diskwrite, drive %d, sector %ld, "
|
||||
"count %ld, buffer %d\n", (int)EAX & 0xff, begin, length, (int) dataptr);
|
||||
"count %ld, buffer %d\n", AL, begin, length, (int) dataptr);
|
||||
|
||||
ResetCflag;
|
||||
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
#include <stdlib.h>
|
||||
#include "registers.h"
|
||||
#include "wine.h"
|
||||
#include "msdos.h"
|
||||
#include "miscemu.h"
|
||||
#include "options.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_INT */
|
||||
#include "debug.h"
|
||||
|
@ -15,10 +17,10 @@ int do_int2f(struct sigcontext_struct *context)
|
|||
"SI %04x, DI %04x, DS %04x, ES %04x\n",
|
||||
AX, BX, CX, DX, SI, DI, DS, ES);
|
||||
|
||||
switch((context->sc_eax >> 8) & 0xff)
|
||||
switch(AH)
|
||||
{
|
||||
case 0x10: /* share is installed */
|
||||
EAX = (EAX & 0xffffff00) | 0xff;
|
||||
case 0x10:
|
||||
AL = 0xff; /* share is installed */
|
||||
break;
|
||||
|
||||
case 0x15: /* mscdex */
|
||||
|
@ -37,30 +39,36 @@ int do_int2f(struct sigcontext_struct *context)
|
|||
|
||||
int do_int2f_16(struct sigcontext_struct *context)
|
||||
{
|
||||
switch(context->sc_eax & 0xff) {
|
||||
case 0x00:
|
||||
/* return 'major/minor' for MSWin 3.1 */
|
||||
dprintf_int(stddeb,"do_int2f_16 // return 'major/minor' for MSWin 3.1 !\n");
|
||||
context->sc_eax = 0x0310;
|
||||
return 1;
|
||||
case 0x86:
|
||||
/* operating in protected mode under DPMI */
|
||||
dprintf_int(stddeb,"do_int2f_16 // operating in protected mode under DPMI !\n");
|
||||
context->sc_eax = 0x0000;
|
||||
return 1;
|
||||
case 0x87:
|
||||
dprintf_int(stddeb,"do_int2f_16 // return DPMI flags !\n");
|
||||
context->sc_eax = 0x0000; /* DPMI Installed */
|
||||
context->sc_ebx = 0x0001; /* 32bits available */
|
||||
context->sc_ecx = 0x04; /* processor 486 */
|
||||
context->sc_edx = 0x0100; /* DPMI major/minor */
|
||||
context->sc_esi = 0; /* # of para. of DOS */
|
||||
/* extended private data */
|
||||
return 1;
|
||||
default:
|
||||
IntBarf(0x2f, context);
|
||||
}
|
||||
return 1;
|
||||
switch(AL)
|
||||
{
|
||||
case 0x00: /* Windows enhanced mode installation check */
|
||||
AX = Options.enhanced ? WINVERSION : 0;
|
||||
break;
|
||||
|
||||
case 0x0a: /* Get Windows version and type */
|
||||
AX = 0;
|
||||
BX = (WINVERSION >> 8) | ((WINVERSION << 8) & 0xff00);
|
||||
CX = Options.enhanced ? 3 : 2;
|
||||
break;
|
||||
|
||||
case 0x86: /* DPMI detect mode */
|
||||
AX = 0; /* Running under DPMI */
|
||||
break;
|
||||
|
||||
case 0x87: /* DPMI installation check */
|
||||
AX = 0x0000; /* DPMI Installed */
|
||||
BX = 0x0001; /* 32bits available */
|
||||
CX = 0x04; /* processor 486 */
|
||||
DX = 0x0009; /* DPMI major/minor 0.9 */
|
||||
SI = 0; /* # of para. of DOS extended private data */
|
||||
ES = 0; /* ES:DI is DPMI switch entry point */
|
||||
DI = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
IntBarf(0x2f, context);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
|
108
miscemu/int31.c
108
miscemu/int31.c
|
@ -1,108 +0,0 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "registers.h"
|
||||
#include "wine.h"
|
||||
#include "miscemu.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_INT */
|
||||
#include "debug.h"
|
||||
|
||||
typedef struct {
|
||||
WORD accessed : 1;
|
||||
WORD read_write : 1;
|
||||
WORD conf_exp : 1;
|
||||
WORD code : 1;
|
||||
WORD xsystem : 1;
|
||||
WORD dpl : 2;
|
||||
WORD present : 1;
|
||||
WORD dummy : 8;
|
||||
} ACCESS;
|
||||
typedef ACCESS *LPACCESS;
|
||||
|
||||
typedef struct {
|
||||
WORD Limit;
|
||||
WORD addr_lo;
|
||||
BYTE addr_hi;
|
||||
ACCESS access;
|
||||
WORD reserved;
|
||||
} DESCRIPTOR;
|
||||
typedef DESCRIPTOR *LPDESCRIPTOR;
|
||||
|
||||
HANDLE DPMI_GetNewSelector(WORD selcount);
|
||||
BOOL DPMI_FreeSelector(HANDLE pmSel);
|
||||
BOOL DPMI_SetDescriptor(HANDLE pmSel, LPDESCRIPTOR lpDesc);
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
int do_int31(struct sigcontext_struct *context)
|
||||
{
|
||||
LPDESCRIPTOR lpDesc;
|
||||
dprintf_int(stddeb,"do_int31 // context->sc_eax=%08lX\n",
|
||||
context->sc_eax);
|
||||
switch(context->sc_eax)
|
||||
{
|
||||
case 0x0000:
|
||||
context->sc_eax = DPMI_GetNewSelector(context->sc_ecx);
|
||||
break;
|
||||
case 0x0001:
|
||||
context->sc_eax = DPMI_FreeSelector(context->sc_ebx);
|
||||
break;
|
||||
case 0x000C:
|
||||
lpDesc = (LPDESCRIPTOR) MAKELONG(context->sc_edi,
|
||||
context->sc_es);
|
||||
context->sc_eax = DPMI_SetDescriptor(context->sc_ebx, lpDesc);
|
||||
break;
|
||||
default:
|
||||
IntBarf(0x31, context);
|
||||
};
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
HANDLE DPMI_GetNewSelector(WORD selcount)
|
||||
{
|
||||
LPSTR ptr;
|
||||
HANDLE pmSel;
|
||||
dprintf_int(stddeb,"DPMI_GetNewSelector(%d); !\n", selcount);
|
||||
pmSel = GlobalAlloc(GMEM_FIXED, 4096);
|
||||
ptr = GlobalLock(pmSel);
|
||||
dprintf_int(stddeb,"DPMI_GetNewSelector() return %04X !\n", pmSel);
|
||||
return pmSel;
|
||||
}
|
||||
|
||||
|
||||
BOOL DPMI_FreeSelector(HANDLE pmSel)
|
||||
{
|
||||
dprintf_int(stddeb,"DPMI_FreeSelector(%04X); !\n", pmSel);
|
||||
GlobalFree(pmSel);
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL DPMI_SetDescriptor(HANDLE pmSel, LPDESCRIPTOR lpDesc)
|
||||
{
|
||||
dprintf_int(stdnimp,"DPMI_SetDescriptor(%04X, %p); !\n",
|
||||
pmSel, lpDesc);
|
||||
dprintf_int(stdnimp,"DPMI lpDesc->Limit=%u \n", lpDesc->Limit);
|
||||
dprintf_int(stdnimp,"DPMI lpDesc->addr_lo=%04X \n", lpDesc->addr_lo);
|
||||
dprintf_int(stdnimp,"DPMI lpDesc->addr_hi=%02X \n", lpDesc->addr_hi);
|
||||
dprintf_int(stdnimp,"DPMI lpDesc->access.accessed=%u \n",
|
||||
lpDesc->access.accessed);
|
||||
dprintf_int(stdnimp,"DPMI lpDesc->access.read_write=%u \n",
|
||||
lpDesc->access.read_write);
|
||||
dprintf_int(stdnimp,"DPMI lpDesc->access.conf_exp=%u \n",
|
||||
lpDesc->access.conf_exp);
|
||||
dprintf_int(stdnimp,"DPMI lpDesc->access.code=%u \n",
|
||||
lpDesc->access.code);
|
||||
dprintf_int(stdnimp,"DPMI lpDesc->access.xsystem=%u \n",
|
||||
lpDesc->access.xsystem);
|
||||
dprintf_int(stdnimp,"DPMI lpDesc->access.dpl=%u \n",
|
||||
lpDesc->access.dpl);
|
||||
dprintf_int(stdnimp,"DPMI lpDesc->access.present=%u \n",
|
||||
lpDesc->access.present);
|
||||
dprintf_int(stdnimp,"DPMI lpDesc->reserved=%04X \n", lpDesc->reserved);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -34,11 +34,11 @@ void inportb(struct sigcontext_struct *context)
|
|||
}
|
||||
}
|
||||
|
||||
void inport(struct sigcontext_struct *context)
|
||||
void inport( struct sigcontext_struct *context, int long_op )
|
||||
{
|
||||
dprintf_int(stdnimp, "IO: in (%x)\n", DX);
|
||||
|
||||
AX = 0xffff;
|
||||
dprintf_int(stdnimp, "IO: in (%x)\n", DX);
|
||||
if (long_op) EAX = 0xffffffff;
|
||||
else AX = 0xffff;
|
||||
}
|
||||
|
||||
void inportb_abs(struct sigcontext_struct *context)
|
||||
|
@ -47,10 +47,11 @@ void inportb_abs(struct sigcontext_struct *context)
|
|||
AL = 0xff;
|
||||
}
|
||||
|
||||
void inport_abs(struct sigcontext_struct *context)
|
||||
void inport_abs( struct sigcontext_struct *context, int long_op )
|
||||
{
|
||||
dprintf_int(stdnimp, "IO: in (%x)\n", *(BYTE *)(EIP+1));
|
||||
AX = 0xffff;
|
||||
dprintf_int(stdnimp, "IO: in (%x)\n", *(BYTE *)(EIP+1));
|
||||
if (long_op) EAX = 0xffffffff;
|
||||
else AX = 0xffff;
|
||||
}
|
||||
|
||||
void outportb(struct sigcontext_struct *context)
|
||||
|
@ -69,9 +70,9 @@ void outportb(struct sigcontext_struct *context)
|
|||
}
|
||||
}
|
||||
|
||||
void outport(struct sigcontext_struct *context)
|
||||
void outport( struct sigcontext_struct *context, int long_op )
|
||||
{
|
||||
dprintf_int(stdnimp, "IO: out (%x), %x\n", DX, AX);
|
||||
dprintf_int(stdnimp, "IO: out (%x), %lx\n", DX, long_op ? EAX : AX);
|
||||
}
|
||||
|
||||
void outportb_abs(struct sigcontext_struct *context)
|
||||
|
@ -79,7 +80,8 @@ void outportb_abs(struct sigcontext_struct *context)
|
|||
dprintf_int(stdnimp, "IO: out (%x), %x\n", *(BYTE *)(EIP+1), AL);
|
||||
}
|
||||
|
||||
void outport_abs(struct sigcontext_struct *context)
|
||||
void outport_abs( struct sigcontext_struct *context, int long_op )
|
||||
{
|
||||
dprintf_int(stdnimp, "IO: out (%x), %x\n", *(BYTE *)(EIP+1), AX);
|
||||
dprintf_int(stdnimp, "IO: out (%x), %lx\n", *(BYTE *)(EIP+1),
|
||||
long_op ? EAX : AX);
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -2,9 +2,8 @@
|
|||
* Sample MCI ANIMATION Wine Driver for Linux
|
||||
*
|
||||
* Copyright 1994 Martin Ayotte
|
||||
*
|
||||
static char Copyright[] = "Copyright Martin Ayotte, 1994";
|
||||
*/
|
||||
*/
|
||||
|
||||
#ifndef WINELIB
|
||||
#define BUILTIN_MMSYSTEM
|
||||
#endif
|
||||
|
@ -22,8 +21,6 @@ static char Copyright[] = "Copyright Martin Ayotte, 1994";
|
|||
#include "driver.h"
|
||||
#include "mmsystem.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_MCIANIM */
|
||||
#define DEBUG_MCIANIM
|
||||
#include "debug.h"
|
||||
|
||||
#define MAX_ANIMDRV 2
|
||||
|
@ -53,16 +50,12 @@ static LINUX_ANIM AnimDev[MAX_ANIMDRV];
|
|||
#endif
|
||||
|
||||
|
||||
DWORD ANIM_CalcTime(UINT wDevID, DWORD dwFormatType, DWORD dwFrame);
|
||||
DWORD ANIM_CalcFrame(UINT wDevID, DWORD dwFormatType, DWORD dwTime);
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
|
||||
/**************************************************************************
|
||||
* ANIM_mciOpen [internal]
|
||||
*/
|
||||
DWORD ANIM_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMS lpParms)
|
||||
static DWORD ANIM_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
LPSTR lpstrElementName;
|
||||
|
@ -120,7 +113,7 @@ DWORD ANIM_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMS lpParms)
|
|||
/**************************************************************************
|
||||
* ANIM_mciClose [internal]
|
||||
*/
|
||||
DWORD ANIM_mciClose(UINT wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms)
|
||||
static DWORD ANIM_mciClose(UINT wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_mcianim(stddeb,"ANIM_mciClose(%u, %08lX, %p);\n",
|
||||
|
@ -134,7 +127,7 @@ DWORD ANIM_mciClose(UINT wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms)
|
|||
/**************************************************************************
|
||||
* ANIM_mciGetDevCaps [internal]
|
||||
*/
|
||||
DWORD ANIM_mciGetDevCaps(UINT wDevID, DWORD dwFlags,
|
||||
static DWORD ANIM_mciGetDevCaps(UINT wDevID, DWORD dwFlags,
|
||||
LPMCI_GETDEVCAPS_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
|
@ -186,10 +179,114 @@ DWORD ANIM_mciGetDevCaps(UINT wDevID, DWORD dwFlags,
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* ANIM_CalcTime [internal]
|
||||
*/
|
||||
static DWORD ANIM_CalcTime(UINT wDevID, DWORD dwFormatType, DWORD dwFrame)
|
||||
{
|
||||
DWORD dwTime = 0;
|
||||
#ifdef linux
|
||||
UINT wTrack;
|
||||
UINT wMinutes;
|
||||
UINT wSeconds;
|
||||
UINT wFrames;
|
||||
dprintf_mcianim(stddeb,"ANIM_CalcTime(%u, %08lX, %lu);\n",
|
||||
wDevID, dwFormatType, dwFrame);
|
||||
|
||||
switch (dwFormatType) {
|
||||
case MCI_FORMAT_MILLISECONDS:
|
||||
dwTime = dwFrame / ANIMFRAMES_PERSEC * 1000;
|
||||
dprintf_mcianim(stddeb,
|
||||
"ANIM_CalcTime // MILLISECONDS %lu\n", dwTime);
|
||||
break;
|
||||
case MCI_FORMAT_MSF:
|
||||
wMinutes = dwFrame / ANIMFRAMES_PERMIN;
|
||||
wSeconds = (dwFrame - ANIMFRAMES_PERMIN * wMinutes) / ANIMFRAMES_PERSEC;
|
||||
wFrames = dwFrame - ANIMFRAMES_PERMIN * wMinutes -
|
||||
ANIMFRAMES_PERSEC * wSeconds;
|
||||
dwTime = MCI_MAKE_MSF(wMinutes, wSeconds, wFrames);
|
||||
dprintf_mcianim(stddeb,"ANIM_CalcTime // MSF %02u:%02u:%02u -> dwTime=%lu\n",
|
||||
wMinutes, wSeconds, wFrames, dwTime);
|
||||
break;
|
||||
default:
|
||||
/* unknown format ! force TMSF ! ... */
|
||||
dwFormatType = MCI_FORMAT_TMSF;
|
||||
case MCI_FORMAT_TMSF:
|
||||
for (wTrack = 0; wTrack < AnimDev[wDevID].nTracks; wTrack++) {
|
||||
/* dwTime += AnimDev[wDevID].lpdwTrackLen[wTrack - 1];
|
||||
printf("Adding trk#%u curpos=%u \n", dwTime);
|
||||
if (dwTime >= dwFrame) break; */
|
||||
if (AnimDev[wDevID].lpdwTrackPos[wTrack - 1] >= dwFrame) break;
|
||||
}
|
||||
wMinutes = dwFrame / ANIMFRAMES_PERMIN;
|
||||
wSeconds = (dwFrame - ANIMFRAMES_PERMIN * wMinutes) / ANIMFRAMES_PERSEC;
|
||||
wFrames = dwFrame - ANIMFRAMES_PERMIN * wMinutes -
|
||||
ANIMFRAMES_PERSEC * wSeconds;
|
||||
dwTime = MCI_MAKE_TMSF(wTrack, wMinutes, wSeconds, wFrames);
|
||||
dprintf_mcianim(stddeb,
|
||||
"ANIM_CalcTime // %02u-%02u:%02u:%02u\n",
|
||||
wTrack, wMinutes, wSeconds, wFrames);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
return dwTime;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* ANIM_CalcFrame [internal]
|
||||
*/
|
||||
static DWORD ANIM_CalcFrame(UINT wDevID, DWORD dwFormatType, DWORD dwTime)
|
||||
{
|
||||
DWORD dwFrame = 0;
|
||||
#ifdef linux
|
||||
UINT wTrack;
|
||||
dprintf_mcianim(stddeb,"ANIM_CalcFrame(%u, %08lX, %lu);\n",
|
||||
wDevID, dwFormatType, dwTime);
|
||||
|
||||
switch (dwFormatType) {
|
||||
case MCI_FORMAT_MILLISECONDS:
|
||||
dwFrame = dwTime * ANIMFRAMES_PERSEC / 1000;
|
||||
dprintf_mcianim(stddeb,
|
||||
"ANIM_CalcFrame // MILLISECONDS %lu\n", dwFrame);
|
||||
break;
|
||||
case MCI_FORMAT_MSF:
|
||||
dprintf_mcianim(stddeb,
|
||||
"ANIM_CalcFrame // MSF %02u:%02u:%02u\n",
|
||||
MCI_MSF_MINUTE(dwTime), MCI_MSF_SECOND(dwTime),
|
||||
MCI_MSF_FRAME(dwTime));
|
||||
dwFrame += ANIMFRAMES_PERMIN * MCI_MSF_MINUTE(dwTime);
|
||||
dwFrame += ANIMFRAMES_PERSEC * MCI_MSF_SECOND(dwTime);
|
||||
dwFrame += MCI_MSF_FRAME(dwTime);
|
||||
break;
|
||||
default:
|
||||
/* unknown format ! force TMSF ! ... */
|
||||
dwFormatType = MCI_FORMAT_TMSF;
|
||||
case MCI_FORMAT_TMSF:
|
||||
wTrack = MCI_TMSF_TRACK(dwTime);
|
||||
dprintf_mcianim(stddeb,
|
||||
"ANIM_CalcFrame // TMSF %02u-%02u:%02u:%02u\n",
|
||||
MCI_TMSF_TRACK(dwTime), MCI_TMSF_MINUTE(dwTime),
|
||||
MCI_TMSF_SECOND(dwTime), MCI_TMSF_FRAME(dwTime));
|
||||
dprintf_mcianim(stddeb,
|
||||
"ANIM_CalcFrame // TMSF trackpos[%u]=%lu\n",
|
||||
wTrack, AnimDev[wDevID].lpdwTrackPos[wTrack - 1]);
|
||||
dwFrame = AnimDev[wDevID].lpdwTrackPos[wTrack - 1];
|
||||
dwFrame += ANIMFRAMES_PERMIN * MCI_TMSF_MINUTE(dwTime);
|
||||
dwFrame += ANIMFRAMES_PERSEC * MCI_TMSF_SECOND(dwTime);
|
||||
dwFrame += MCI_TMSF_FRAME(dwTime);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
return dwFrame;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* ANIM_mciInfo [internal]
|
||||
*/
|
||||
DWORD ANIM_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_INFO_PARMS lpParms)
|
||||
static DWORD ANIM_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_INFO_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_mcianim(stddeb,"ANIM_mciInfo(%u, %08lX, %p);\n",
|
||||
|
@ -223,7 +320,7 @@ DWORD ANIM_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_INFO_PARMS lpParms)
|
|||
/**************************************************************************
|
||||
* ANIM_mciStatus [internal]
|
||||
*/
|
||||
DWORD ANIM_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
||||
static DWORD ANIM_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_mcianim(stddeb,"ANIM_mciStatus(%u, %08lX, %p);\n",
|
||||
|
@ -309,116 +406,10 @@ DWORD ANIM_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
|||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* ANIM_CalcTime [internal]
|
||||
*/
|
||||
DWORD ANIM_CalcTime(UINT wDevID, DWORD dwFormatType, DWORD dwFrame)
|
||||
{
|
||||
DWORD dwTime = 0;
|
||||
#ifdef linux
|
||||
UINT wTrack;
|
||||
UINT wMinutes;
|
||||
UINT wSeconds;
|
||||
UINT wFrames;
|
||||
dprintf_mcianim(stddeb,"ANIM_CalcTime(%u, %08lX, %lu);\n",
|
||||
wDevID, dwFormatType, dwFrame);
|
||||
TryAGAIN:
|
||||
switch (dwFormatType) {
|
||||
case MCI_FORMAT_MILLISECONDS:
|
||||
dwTime = dwFrame / ANIMFRAMES_PERSEC * 1000;
|
||||
dprintf_mcianim(stddeb,
|
||||
"ANIM_CalcTime // MILLISECONDS %lu\n", dwTime);
|
||||
break;
|
||||
case MCI_FORMAT_MSF:
|
||||
wMinutes = dwFrame / ANIMFRAMES_PERMIN;
|
||||
wSeconds = (dwFrame - ANIMFRAMES_PERMIN * wMinutes) / ANIMFRAMES_PERSEC;
|
||||
wFrames = dwFrame - ANIMFRAMES_PERMIN * wMinutes -
|
||||
ANIMFRAMES_PERSEC * wSeconds;
|
||||
dwTime = MCI_MAKE_MSF(wMinutes, wSeconds, wFrames);
|
||||
dprintf_mcianim(stddeb,"ANIM_CalcTime // MSF %02u:%02u:%02u -> dwTime=%lu\n",
|
||||
wMinutes, wSeconds, wFrames, dwTime);
|
||||
break;
|
||||
case MCI_FORMAT_TMSF:
|
||||
for (wTrack = 0; wTrack < AnimDev[wDevID].nTracks; wTrack++) {
|
||||
/* dwTime += AnimDev[wDevID].lpdwTrackLen[wTrack - 1];
|
||||
printf("Adding trk#%u curpos=%u \n", dwTime);
|
||||
if (dwTime >= dwFrame) break; */
|
||||
if (AnimDev[wDevID].lpdwTrackPos[wTrack - 1] >= dwFrame) break;
|
||||
}
|
||||
wMinutes = dwFrame / ANIMFRAMES_PERMIN;
|
||||
wSeconds = (dwFrame - ANIMFRAMES_PERMIN * wMinutes) / ANIMFRAMES_PERSEC;
|
||||
wFrames = dwFrame - ANIMFRAMES_PERMIN * wMinutes -
|
||||
ANIMFRAMES_PERSEC * wSeconds;
|
||||
dwTime = MCI_MAKE_TMSF(wTrack, wMinutes, wSeconds, wFrames);
|
||||
dprintf_mcianim(stddeb,
|
||||
"ANIM_CalcTime // %02u-%02u:%02u:%02u\n",
|
||||
wTrack, wMinutes, wSeconds, wFrames);
|
||||
break;
|
||||
default:
|
||||
/* unknown format ! force TMSF ! ... */
|
||||
dwFormatType = MCI_FORMAT_TMSF;
|
||||
goto TryAGAIN;
|
||||
}
|
||||
#endif
|
||||
return dwTime;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* ANIM_CalcFrame [internal]
|
||||
*/
|
||||
DWORD ANIM_CalcFrame(UINT wDevID, DWORD dwFormatType, DWORD dwTime)
|
||||
{
|
||||
DWORD dwFrame = 0;
|
||||
#ifdef linux
|
||||
UINT wTrack;
|
||||
dprintf_mcianim(stddeb,"ANIM_CalcFrame(%u, %08lX, %lu);\n",
|
||||
wDevID, dwFormatType, dwTime);
|
||||
TryAGAIN:
|
||||
switch (dwFormatType) {
|
||||
case MCI_FORMAT_MILLISECONDS:
|
||||
dwFrame = dwTime * ANIMFRAMES_PERSEC / 1000;
|
||||
dprintf_mcianim(stddeb,
|
||||
"ANIM_CalcFrame // MILLISECONDS %lu\n", dwFrame);
|
||||
break;
|
||||
case MCI_FORMAT_MSF:
|
||||
dprintf_mcianim(stddeb,
|
||||
"ANIM_CalcFrame // MSF %02u:%02u:%02u\n",
|
||||
MCI_MSF_MINUTE(dwTime), MCI_MSF_SECOND(dwTime),
|
||||
MCI_MSF_FRAME(dwTime));
|
||||
dwFrame += ANIMFRAMES_PERMIN * MCI_MSF_MINUTE(dwTime);
|
||||
dwFrame += ANIMFRAMES_PERSEC * MCI_MSF_SECOND(dwTime);
|
||||
dwFrame += MCI_MSF_FRAME(dwTime);
|
||||
break;
|
||||
case MCI_FORMAT_TMSF:
|
||||
wTrack = MCI_TMSF_TRACK(dwTime);
|
||||
dprintf_mcianim(stddeb,
|
||||
"ANIM_CalcFrame // TMSF %02u-%02u:%02u:%02u\n",
|
||||
MCI_TMSF_TRACK(dwTime), MCI_TMSF_MINUTE(dwTime),
|
||||
MCI_TMSF_SECOND(dwTime), MCI_TMSF_FRAME(dwTime));
|
||||
dprintf_mcianim(stddeb,
|
||||
"ANIM_CalcFrame // TMSF trackpos[%u]=%lu\n",
|
||||
wTrack, AnimDev[wDevID].lpdwTrackPos[wTrack - 1]);
|
||||
dwFrame = AnimDev[wDevID].lpdwTrackPos[wTrack - 1];
|
||||
dwFrame += ANIMFRAMES_PERMIN * MCI_TMSF_MINUTE(dwTime);
|
||||
dwFrame += ANIMFRAMES_PERSEC * MCI_TMSF_SECOND(dwTime);
|
||||
dwFrame += MCI_TMSF_FRAME(dwTime);
|
||||
break;
|
||||
default:
|
||||
/* unknown format ! force TMSF ! ... */
|
||||
dwFormatType = MCI_FORMAT_TMSF;
|
||||
goto TryAGAIN;
|
||||
}
|
||||
#endif
|
||||
return dwFrame;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* ANIM_mciPlay [internal]
|
||||
*/
|
||||
DWORD ANIM_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
||||
static DWORD ANIM_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
int start, end;
|
||||
|
@ -457,7 +448,7 @@ DWORD ANIM_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
|||
/**************************************************************************
|
||||
* ANIM_mciStop [internal]
|
||||
*/
|
||||
DWORD ANIM_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
static DWORD ANIM_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_mcianim(stddeb,"ANIM_mciStop(%u, %08lX, %p);\n",
|
||||
|
@ -480,7 +471,7 @@ DWORD ANIM_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
|||
/**************************************************************************
|
||||
* ANIM_mciPause [internal]
|
||||
*/
|
||||
DWORD ANIM_mciPause(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
static DWORD ANIM_mciPause(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_mcianim(stddeb,"ANIM_mciPause(%u, %08lX, %p);\n",
|
||||
|
@ -503,7 +494,7 @@ DWORD ANIM_mciPause(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
|||
/**************************************************************************
|
||||
* ANIM_mciResume [internal]
|
||||
*/
|
||||
DWORD ANIM_mciResume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
static DWORD ANIM_mciResume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_mcianim(stddeb,"ANIM_mciResume(%u, %08lX, %p);\n",
|
||||
|
@ -526,7 +517,7 @@ DWORD ANIM_mciResume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
|||
/**************************************************************************
|
||||
* ANIM_mciSeek [internal]
|
||||
*/
|
||||
DWORD ANIM_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms)
|
||||
static DWORD ANIM_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
DWORD dwRet;
|
||||
|
@ -566,7 +557,7 @@ DWORD ANIM_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms)
|
|||
/**************************************************************************
|
||||
* ANIM_mciSet [internal]
|
||||
*/
|
||||
DWORD ANIM_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
|
||||
static DWORD ANIM_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_mcianim(stddeb,"ANIM_mciSet(%u, %08lX, %p);\n",
|
||||
|
@ -614,15 +605,15 @@ DWORD ANIM_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
|
|||
/**************************************************************************
|
||||
* ANIM_DriverProc [sample driver]
|
||||
*/
|
||||
LRESULT ANIM_DriverProc(DWORD dwDevID, HDRVR hDriv, WORD wMsg,
|
||||
LONG ANIM_DriverProc(DWORD dwDevID, HDRVR hDriv, WORD wMsg,
|
||||
DWORD dwParam1, DWORD dwParam2)
|
||||
{
|
||||
#ifdef linux
|
||||
switch(wMsg) {
|
||||
case DRV_LOAD:
|
||||
return (LRESULT)1L;
|
||||
return 1;
|
||||
case DRV_FREE:
|
||||
return (LRESULT)1L;
|
||||
return 1;
|
||||
case DRV_OPEN:
|
||||
case MCI_OPEN_DRIVER:
|
||||
case MCI_OPEN:
|
||||
|
@ -634,19 +625,19 @@ LRESULT ANIM_DriverProc(DWORD dwDevID, HDRVR hDriv, WORD wMsg,
|
|||
return ANIM_mciClose(dwDevID, dwParam1,
|
||||
(LPMCI_GENERIC_PARMS)PTR_SEG_TO_LIN(dwParam2));
|
||||
case DRV_ENABLE:
|
||||
return (LRESULT)1L;
|
||||
return 1;
|
||||
case DRV_DISABLE:
|
||||
return (LRESULT)1L;
|
||||
return 1;
|
||||
case DRV_QUERYCONFIGURE:
|
||||
return (LRESULT)1L;
|
||||
return 1;
|
||||
case DRV_CONFIGURE:
|
||||
MessageBox((HWND)NULL, "Sample MultiMedia Linux Driver !",
|
||||
"MMLinux Driver", MB_OK);
|
||||
return (LRESULT)1L;
|
||||
return 1;
|
||||
case DRV_INSTALL:
|
||||
return (LRESULT)DRVCNF_RESTART;
|
||||
return DRVCNF_RESTART;
|
||||
case DRV_REMOVE:
|
||||
return (LRESULT)DRVCNF_RESTART;
|
||||
return DRVCNF_RESTART;
|
||||
case MCI_GETDEVCAPS:
|
||||
return ANIM_mciGetDevCaps(dwDevID, dwParam1,
|
||||
(LPMCI_GETDEVCAPS_PARMS)PTR_SEG_TO_LIN(dwParam2));
|
||||
|
|
|
@ -2,9 +2,8 @@
|
|||
* Sample MCI CDAUDIO Wine Driver for Linux
|
||||
*
|
||||
* Copyright 1994 Martin Ayotte
|
||||
*
|
||||
static char Copyright[] = "Copyright Martin Ayotte, 1994";
|
||||
*/
|
||||
*/
|
||||
|
||||
#ifndef WINELIB
|
||||
#define BUILTIN_MMSYSTEM
|
||||
#endif
|
||||
|
@ -22,7 +21,6 @@ static char Copyright[] = "Copyright Martin Ayotte, 1994";
|
|||
#include "driver.h"
|
||||
#include "mmsystem.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_CDAUDIO */
|
||||
#include "debug.h"
|
||||
|
||||
#ifdef linux
|
||||
|
@ -69,19 +67,114 @@ typedef struct {
|
|||
static LINUX_CDAUDIO CDADev[MAX_CDAUDIODRV];
|
||||
#endif
|
||||
|
||||
UINT CDAUDIO_GetNumberOfTracks(UINT wDevID);
|
||||
BOOL CDAUDIO_GetTracksInfo(UINT wDevID);
|
||||
BOOL CDAUDIO_GetCDStatus(UINT wDevID);
|
||||
DWORD CDAUDIO_CalcTime(UINT wDevID, DWORD dwFormatType, DWORD dwFrame);
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* CDAUDIO_GetNumberOfTracks [internal]
|
||||
*/
|
||||
static UINT CDAUDIO_GetNumberOfTracks(UINT wDevID)
|
||||
{
|
||||
#ifdef linux
|
||||
struct cdrom_tochdr hdr;
|
||||
if (CDADev[wDevID].nTracks == 0) {
|
||||
if (ioctl(CDADev[wDevID].unixdev, CDROMREADTOCHDR, &hdr)) {
|
||||
dprintf_cdaudio(stddeb,
|
||||
"GetNumberOfTracks(%u) // Error occured !\n",
|
||||
wDevID);
|
||||
return (WORD)-1;
|
||||
}
|
||||
CDADev[wDevID].nTracks = hdr.cdth_trk1;
|
||||
}
|
||||
return CDADev[wDevID].nTracks;
|
||||
#else
|
||||
return (WORD)-1;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* CDAUDIO_GetTracksInfo [internal]
|
||||
*/
|
||||
static BOOL CDAUDIO_GetTracksInfo(UINT wDevID)
|
||||
{
|
||||
#ifdef linux
|
||||
int i, length;
|
||||
int start, last_start = 0;
|
||||
int total_length = 0;
|
||||
struct cdrom_tocentry entry;
|
||||
if (CDADev[wDevID].nTracks == 0) {
|
||||
if (CDAUDIO_GetNumberOfTracks(wDevID) == (WORD)-1) return FALSE;
|
||||
}
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_GetTracksInfo // nTracks=%u\n",
|
||||
CDADev[wDevID].nTracks);
|
||||
if (CDADev[wDevID].lpdwTrackLen != NULL)
|
||||
free(CDADev[wDevID].lpdwTrackLen);
|
||||
CDADev[wDevID].lpdwTrackLen = (LPDWORD)malloc(
|
||||
(CDADev[wDevID].nTracks + 1) * sizeof(DWORD));
|
||||
if (CDADev[wDevID].lpdwTrackPos != NULL)
|
||||
free(CDADev[wDevID].lpdwTrackPos);
|
||||
CDADev[wDevID].lpdwTrackPos = (LPDWORD)malloc(
|
||||
(CDADev[wDevID].nTracks + 1) * sizeof(DWORD));
|
||||
if (CDADev[wDevID].lpdwTrackLen == NULL ||
|
||||
CDADev[wDevID].lpdwTrackPos == NULL) {
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_GetTracksInfo // error allocating track table !\n");
|
||||
return FALSE;
|
||||
}
|
||||
memset(CDADev[wDevID].lpdwTrackLen, 0,
|
||||
(CDADev[wDevID].nTracks + 1) * sizeof(DWORD));
|
||||
memset(CDADev[wDevID].lpdwTrackPos, 0,
|
||||
(CDADev[wDevID].nTracks + 1) * sizeof(DWORD));
|
||||
for (i = 0; i <= CDADev[wDevID].nTracks; i++) {
|
||||
if (i == CDADev[wDevID].nTracks)
|
||||
entry.cdte_track = CDROM_LEADOUT;
|
||||
else
|
||||
entry.cdte_track = i + 1;
|
||||
entry.cdte_format = CDROM_MSF;
|
||||
if (ioctl(CDADev[wDevID].unixdev, CDROMREADTOCENTRY, &entry)) {
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_GetTracksInfo // error read entry\n");
|
||||
return FALSE;
|
||||
}
|
||||
start = CDFRAMES_PERSEC * (SECONDS_PERMIN *
|
||||
entry.cdte_addr.msf.minute + entry.cdte_addr.msf.second) +
|
||||
entry.cdte_addr.msf.frame;
|
||||
if (i == 0) {
|
||||
last_start = start;
|
||||
CDADev[wDevID].dwFirstOffset = start;
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_GetTracksInfo // dwFirstOffset=%u\n",
|
||||
start);
|
||||
}
|
||||
else {
|
||||
length = start - last_start;
|
||||
last_start = start;
|
||||
start = last_start - length;
|
||||
total_length += length;
|
||||
CDADev[wDevID].lpdwTrackLen[i - 1] = length;
|
||||
CDADev[wDevID].lpdwTrackPos[i - 1] = start;
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_GetTracksInfo // track #%u start=%u len=%u\n",
|
||||
i, start, length);
|
||||
}
|
||||
}
|
||||
CDADev[wDevID].dwTotalLen = total_length;
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_GetTracksInfo // total_len=%u\n",
|
||||
total_length);
|
||||
fflush(stdout);
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* CDAUDIO_mciOpen [internal]
|
||||
*/
|
||||
DWORD CDAUDIO_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMS lpParms)
|
||||
static DWORD CDAUDIO_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciOpen(%04X, %08lX, %p);\n",
|
||||
|
@ -109,7 +202,7 @@ DWORD CDAUDIO_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMS lpParms)
|
|||
CDADev[wDevID].wNotifyDeviceID = lpParms->wDeviceID;
|
||||
CDADev[wDevID].unixdev = open (CDAUDIO_DEV, O_RDONLY, 0);
|
||||
if (CDADev[wDevID].unixdev == -1) {
|
||||
fprintf(stderr,"CDAUDIO_mciOpen // can't open '%s' !\n", CDAUDIO_DEV);
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciOpen // can't open '%s' !\n", CDAUDIO_DEV);
|
||||
return MCIERR_HARDWARE;
|
||||
}
|
||||
CDADev[wDevID].mode = 0;
|
||||
|
@ -121,7 +214,7 @@ DWORD CDAUDIO_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMS lpParms)
|
|||
CDADev[wDevID].lpdwTrackLen = NULL;
|
||||
CDADev[wDevID].lpdwTrackPos = NULL;
|
||||
if (!CDAUDIO_GetTracksInfo(wDevID)) {
|
||||
fprintf(stderr,"CDAUDIO_mciOpen // error reading TracksInfo !\n");
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciOpen // error reading TracksInfo !\n");
|
||||
/* return MCIERR_INTERNAL; */
|
||||
}
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
|
@ -140,7 +233,7 @@ DWORD CDAUDIO_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMS lpParms)
|
|||
/**************************************************************************
|
||||
* CDAUDIO_mciClose [internal]
|
||||
*/
|
||||
DWORD CDAUDIO_mciClose(UINT wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms)
|
||||
static DWORD CDAUDIO_mciClose(UINT wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciClose(%u, %08lX, %p);\n",
|
||||
|
@ -155,7 +248,7 @@ DWORD CDAUDIO_mciClose(UINT wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms)
|
|||
/**************************************************************************
|
||||
* CDAUDIO_mciGetDevCaps [internal]
|
||||
*/
|
||||
DWORD CDAUDIO_mciGetDevCaps(UINT wDevID, DWORD dwFlags,
|
||||
static DWORD CDAUDIO_mciGetDevCaps(UINT wDevID, DWORD dwFlags,
|
||||
LPMCI_GETDEVCAPS_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
|
@ -210,7 +303,7 @@ DWORD CDAUDIO_mciGetDevCaps(UINT wDevID, DWORD dwFlags,
|
|||
/**************************************************************************
|
||||
* CDAUDIO_mciInfo [internal]
|
||||
*/
|
||||
DWORD CDAUDIO_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_INFO_PARMS lpParms)
|
||||
static DWORD CDAUDIO_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_INFO_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciInfo(%u, %08lX, %p);\n",
|
||||
|
@ -234,10 +327,173 @@ DWORD CDAUDIO_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_INFO_PARMS lpParms)
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* CDAUDIO_CalcFrame [internal]
|
||||
*/
|
||||
static DWORD CDAUDIO_CalcFrame(UINT wDevID, DWORD dwFormatType, DWORD dwTime)
|
||||
{
|
||||
DWORD dwFrame = 0;
|
||||
#ifdef linux
|
||||
UINT wTrack;
|
||||
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_CalcFrame(%u, %08lX, %lu);\n",
|
||||
wDevID, dwFormatType, dwTime);
|
||||
|
||||
switch (dwFormatType) {
|
||||
case MCI_FORMAT_MILLISECONDS:
|
||||
dwFrame = dwTime * CDFRAMES_PERSEC / 1000;
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_CalcFrame // MILLISECONDS %lu\n",
|
||||
dwFrame);
|
||||
break;
|
||||
case MCI_FORMAT_MSF:
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_CalcFrame // MSF %02u:%02u:%02u\n",
|
||||
MCI_MSF_MINUTE(dwTime), MCI_MSF_SECOND(dwTime),
|
||||
MCI_MSF_FRAME(dwTime));
|
||||
dwFrame += CDFRAMES_PERMIN * MCI_MSF_MINUTE(dwTime);
|
||||
dwFrame += CDFRAMES_PERSEC * MCI_MSF_SECOND(dwTime);
|
||||
dwFrame += MCI_MSF_FRAME(dwTime);
|
||||
break;
|
||||
default:
|
||||
/* unknown format ! force TMSF ! ... */
|
||||
dwFormatType = MCI_FORMAT_TMSF;
|
||||
case MCI_FORMAT_TMSF:
|
||||
wTrack = MCI_TMSF_TRACK(dwTime);
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_CalcFrame // TMSF %02u-%02u:%02u:%02u\n",
|
||||
MCI_TMSF_TRACK(dwTime), MCI_TMSF_MINUTE(dwTime),
|
||||
MCI_TMSF_SECOND(dwTime), MCI_TMSF_FRAME(dwTime));
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_CalcFrame // TMSF trackpos[%u]=%lu\n",
|
||||
wTrack, CDADev[wDevID].lpdwTrackPos[wTrack - 1]);
|
||||
dwFrame = CDADev[wDevID].lpdwTrackPos[wTrack - 1];
|
||||
dwFrame += CDFRAMES_PERMIN * MCI_TMSF_MINUTE(dwTime);
|
||||
dwFrame += CDFRAMES_PERSEC * MCI_TMSF_SECOND(dwTime);
|
||||
dwFrame += MCI_TMSF_FRAME(dwTime);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
return dwFrame;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* CDAUDIO_GetCDStatus [internal]
|
||||
*/
|
||||
static BOOL CDAUDIO_GetCDStatus(UINT wDevID)
|
||||
{
|
||||
#ifdef linux
|
||||
int oldmode = CDADev[wDevID].mode;
|
||||
CDADev[wDevID].sc.cdsc_format = CDROM_MSF;
|
||||
if (ioctl(CDADev[wDevID].unixdev, CDROMSUBCHNL, &CDADev[wDevID].sc)) {
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_GetCDStatus // opened or no_media !\n");
|
||||
CDADev[wDevID].mode = MCI_MODE_NOT_READY;
|
||||
return TRUE;
|
||||
}
|
||||
switch (CDADev[wDevID].sc.cdsc_audiostatus) {
|
||||
case CDROM_AUDIO_INVALID:
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_GetCDStatus // device doesn't support status !\n");
|
||||
return FALSE;
|
||||
case CDROM_AUDIO_NO_STATUS:
|
||||
CDADev[wDevID].mode = MCI_MODE_STOP;
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_GetCDStatus // MCI_MODE_STOP !\n");
|
||||
break;
|
||||
case CDROM_AUDIO_PLAY:
|
||||
CDADev[wDevID].mode = MCI_MODE_PLAY;
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_GetCDStatus // MCI_MODE_PLAY !\n");
|
||||
break;
|
||||
case CDROM_AUDIO_PAUSED:
|
||||
CDADev[wDevID].mode = MCI_MODE_PAUSE;
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_GetCDStatus // MCI_MODE_PAUSE !\n");
|
||||
break;
|
||||
default:
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_GetCDStatus // status=%02X !\n",
|
||||
CDADev[wDevID].sc.cdsc_audiostatus);
|
||||
}
|
||||
CDADev[wDevID].nCurTrack = CDADev[wDevID].sc.cdsc_trk;
|
||||
CDADev[wDevID].dwCurFrame =
|
||||
CDFRAMES_PERMIN * CDADev[wDevID].sc.cdsc_absaddr.msf.minute +
|
||||
CDFRAMES_PERSEC * CDADev[wDevID].sc.cdsc_absaddr.msf.second +
|
||||
CDADev[wDevID].sc.cdsc_absaddr.msf.frame;
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_GetCDStatus // %02u-%02u:%02u:%02u \n",
|
||||
CDADev[wDevID].sc.cdsc_trk,
|
||||
CDADev[wDevID].sc.cdsc_absaddr.msf.minute,
|
||||
CDADev[wDevID].sc.cdsc_absaddr.msf.second,
|
||||
CDADev[wDevID].sc.cdsc_absaddr.msf.frame);
|
||||
if (oldmode != CDADev[wDevID].mode && oldmode == MCI_MODE_OPEN) {
|
||||
if (!CDAUDIO_GetTracksInfo(wDevID)) {
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_GetCDStatus // error updating TracksInfo !\n");
|
||||
return MCIERR_INTERNAL;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* CDAUDIO_CalcTime [internal]
|
||||
*/
|
||||
static DWORD CDAUDIO_CalcTime(UINT wDevID, DWORD dwFormatType, DWORD dwFrame)
|
||||
{
|
||||
DWORD dwTime = 0;
|
||||
#ifdef linux
|
||||
UINT wTrack;
|
||||
UINT wMinutes;
|
||||
UINT wSeconds;
|
||||
UINT wFrames;
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_CalcTime(%u, %08lX, %lu);\n",
|
||||
wDevID, dwFormatType, dwFrame);
|
||||
|
||||
switch (dwFormatType) {
|
||||
case MCI_FORMAT_MILLISECONDS:
|
||||
dwTime = dwFrame / CDFRAMES_PERSEC * 1000;
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_CalcTime // MILLISECONDS %lu\n",
|
||||
dwTime);
|
||||
break;
|
||||
case MCI_FORMAT_MSF:
|
||||
wMinutes = dwFrame / CDFRAMES_PERMIN;
|
||||
wSeconds = (dwFrame - CDFRAMES_PERMIN * wMinutes) / CDFRAMES_PERSEC;
|
||||
wFrames = dwFrame - CDFRAMES_PERMIN * wMinutes -
|
||||
CDFRAMES_PERSEC * wSeconds;
|
||||
dwTime = MCI_MAKE_MSF(wMinutes, wSeconds, wFrames);
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_CalcTime // MSF %02u:%02u:%02u -> dwTime=%lu\n",
|
||||
wMinutes, wSeconds, wFrames, dwTime);
|
||||
break;
|
||||
default:
|
||||
/* unknown format ! force TMSF ! ... */
|
||||
dwFormatType = MCI_FORMAT_TMSF;
|
||||
case MCI_FORMAT_TMSF:
|
||||
for (wTrack = 0; wTrack < CDADev[wDevID].nTracks; wTrack++) {
|
||||
/* dwTime += CDADev[wDevID].lpdwTrackLen[wTrack - 1];
|
||||
printf("Adding trk#%u curpos=%u \n", dwTime);
|
||||
if (dwTime >= dwFrame) break; */
|
||||
if (CDADev[wDevID].lpdwTrackPos[wTrack - 1] >= dwFrame) break;
|
||||
}
|
||||
wMinutes = dwFrame / CDFRAMES_PERMIN;
|
||||
wSeconds = (dwFrame - CDFRAMES_PERMIN * wMinutes) / CDFRAMES_PERSEC;
|
||||
wFrames = dwFrame - CDFRAMES_PERMIN * wMinutes -
|
||||
CDFRAMES_PERSEC * wSeconds;
|
||||
dwTime = MCI_MAKE_TMSF(wTrack, wMinutes, wSeconds, wFrames);
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_CalcTime // %02u-%02u:%02u:%02u\n",
|
||||
wTrack, wMinutes, wSeconds, wFrames);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
return dwTime;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* CDAUDIO_mciStatus [internal]
|
||||
*/
|
||||
DWORD CDAUDIO_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
||||
static DWORD CDAUDIO_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciStatus(%u, %08lX, %p);\n",
|
||||
|
@ -261,7 +517,7 @@ DWORD CDAUDIO_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
|||
case MCI_STATUS_LENGTH:
|
||||
if (CDADev[wDevID].nTracks == 0) {
|
||||
if (!CDAUDIO_GetTracksInfo(wDevID)) {
|
||||
fprintf(stderr,"CDAUDIO_mciStatus // error reading TracksInfo !\n");
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciStatus // error reading TracksInfo !\n");
|
||||
return MCIERR_INTERNAL;
|
||||
}
|
||||
}
|
||||
|
@ -287,7 +543,7 @@ DWORD CDAUDIO_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
|||
case MCI_STATUS_MEDIA_PRESENT:
|
||||
lpParms->dwReturn = (CDADev[wDevID].nTracks > 0) ? TRUE : FALSE;
|
||||
if (lpParms->dwReturn == FALSE)
|
||||
fprintf(stderr,"CDAUDIO_mciStatus // MEDIA_NOT_PRESENT !\n");
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciStatus // MEDIA_NOT_PRESENT !\n");
|
||||
else
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciStatus // MCI_STATUS_MEDIA_PRESENT !\n");
|
||||
return 0;
|
||||
|
@ -324,11 +580,11 @@ DWORD CDAUDIO_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
|||
lpParms->dwReturn = MCI_FORMAT_MILLISECONDS;
|
||||
return 0;
|
||||
default:
|
||||
fprintf(stderr,"CDAUDIO_mciStatus // unknown command %08lX !\n", lpParms->dwItem);
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciStatus // unknown command %08lX !\n", lpParms->dwItem);
|
||||
return MCIERR_UNRECOGNIZED_COMMAND;
|
||||
}
|
||||
}
|
||||
fprintf(stderr,"CDAUDIO_mciStatus // not MCI_STATUS_ITEM !\n");
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciStatus // not MCI_STATUS_ITEM !\n");
|
||||
return 0;
|
||||
#else
|
||||
return MMSYSERR_NOTENABLED;
|
||||
|
@ -336,271 +592,10 @@ DWORD CDAUDIO_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
|||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* CDAUDIO_CalcTime [internal]
|
||||
*/
|
||||
DWORD CDAUDIO_CalcTime(UINT wDevID, DWORD dwFormatType, DWORD dwFrame)
|
||||
{
|
||||
DWORD dwTime = 0;
|
||||
#ifdef linux
|
||||
UINT wTrack;
|
||||
UINT wMinutes;
|
||||
UINT wSeconds;
|
||||
UINT wFrames;
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_CalcTime(%u, %08lX, %lu);\n",
|
||||
wDevID, dwFormatType, dwFrame);
|
||||
TryAGAIN:
|
||||
switch (dwFormatType) {
|
||||
case MCI_FORMAT_MILLISECONDS:
|
||||
dwTime = dwFrame / CDFRAMES_PERSEC * 1000;
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_CalcTime // MILLISECONDS %lu\n",
|
||||
dwTime);
|
||||
break;
|
||||
case MCI_FORMAT_MSF:
|
||||
wMinutes = dwFrame / CDFRAMES_PERMIN;
|
||||
wSeconds = (dwFrame - CDFRAMES_PERMIN * wMinutes) / CDFRAMES_PERSEC;
|
||||
wFrames = dwFrame - CDFRAMES_PERMIN * wMinutes -
|
||||
CDFRAMES_PERSEC * wSeconds;
|
||||
dwTime = MCI_MAKE_MSF(wMinutes, wSeconds, wFrames);
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_CalcTime // MSF %02u:%02u:%02u -> dwTime=%lu\n",
|
||||
wMinutes, wSeconds, wFrames, dwTime);
|
||||
break;
|
||||
case MCI_FORMAT_TMSF:
|
||||
for (wTrack = 0; wTrack < CDADev[wDevID].nTracks; wTrack++) {
|
||||
/* dwTime += CDADev[wDevID].lpdwTrackLen[wTrack - 1];
|
||||
printf("Adding trk#%u curpos=%u \n", dwTime);
|
||||
if (dwTime >= dwFrame) break; */
|
||||
if (CDADev[wDevID].lpdwTrackPos[wTrack - 1] >= dwFrame) break;
|
||||
}
|
||||
wMinutes = dwFrame / CDFRAMES_PERMIN;
|
||||
wSeconds = (dwFrame - CDFRAMES_PERMIN * wMinutes) / CDFRAMES_PERSEC;
|
||||
wFrames = dwFrame - CDFRAMES_PERMIN * wMinutes -
|
||||
CDFRAMES_PERSEC * wSeconds;
|
||||
dwTime = MCI_MAKE_TMSF(wTrack, wMinutes, wSeconds, wFrames);
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_CalcTime // %02u-%02u:%02u:%02u\n",
|
||||
wTrack, wMinutes, wSeconds, wFrames);
|
||||
break;
|
||||
default:
|
||||
/* unknown format ! force TMSF ! ... */
|
||||
dwFormatType = MCI_FORMAT_TMSF;
|
||||
goto TryAGAIN;
|
||||
}
|
||||
#endif
|
||||
return dwTime;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* CDAUDIO_CalcFrame [internal]
|
||||
*/
|
||||
DWORD CDAUDIO_CalcFrame(UINT wDevID, DWORD dwFormatType, DWORD dwTime)
|
||||
{
|
||||
DWORD dwFrame = 0;
|
||||
#ifdef linux
|
||||
UINT wTrack;
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_CalcFrame(%u, %08lX, %lu);\n",
|
||||
wDevID, dwFormatType, dwTime);
|
||||
TryAGAIN:
|
||||
switch (dwFormatType) {
|
||||
case MCI_FORMAT_MILLISECONDS:
|
||||
dwFrame = dwTime * CDFRAMES_PERSEC / 1000;
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_CalcFrame // MILLISECONDS %lu\n",
|
||||
dwFrame);
|
||||
break;
|
||||
case MCI_FORMAT_MSF:
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_CalcFrame // MSF %02u:%02u:%02u\n",
|
||||
MCI_MSF_MINUTE(dwTime), MCI_MSF_SECOND(dwTime),
|
||||
MCI_MSF_FRAME(dwTime));
|
||||
dwFrame += CDFRAMES_PERMIN * MCI_MSF_MINUTE(dwTime);
|
||||
dwFrame += CDFRAMES_PERSEC * MCI_MSF_SECOND(dwTime);
|
||||
dwFrame += MCI_MSF_FRAME(dwTime);
|
||||
break;
|
||||
case MCI_FORMAT_TMSF:
|
||||
wTrack = MCI_TMSF_TRACK(dwTime);
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_CalcFrame // TMSF %02u-%02u:%02u:%02u\n",
|
||||
MCI_TMSF_TRACK(dwTime), MCI_TMSF_MINUTE(dwTime),
|
||||
MCI_TMSF_SECOND(dwTime), MCI_TMSF_FRAME(dwTime));
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_CalcFrame // TMSF trackpos[%u]=%lu\n",
|
||||
wTrack, CDADev[wDevID].lpdwTrackPos[wTrack - 1]);
|
||||
dwFrame = CDADev[wDevID].lpdwTrackPos[wTrack - 1];
|
||||
dwFrame += CDFRAMES_PERMIN * MCI_TMSF_MINUTE(dwTime);
|
||||
dwFrame += CDFRAMES_PERSEC * MCI_TMSF_SECOND(dwTime);
|
||||
dwFrame += MCI_TMSF_FRAME(dwTime);
|
||||
break;
|
||||
default:
|
||||
/* unknown format ! force TMSF ! ... */
|
||||
dwFormatType = MCI_FORMAT_TMSF;
|
||||
goto TryAGAIN;
|
||||
}
|
||||
#endif
|
||||
return dwFrame;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* CDAUDIO_GetNumberOfTracks [internal]
|
||||
*/
|
||||
UINT CDAUDIO_GetNumberOfTracks(UINT wDevID)
|
||||
{
|
||||
#ifdef linux
|
||||
struct cdrom_tochdr hdr;
|
||||
if (CDADev[wDevID].nTracks == 0) {
|
||||
if (ioctl(CDADev[wDevID].unixdev, CDROMREADTOCHDR, &hdr)) {
|
||||
fprintf(stderr,
|
||||
"GetNumberOfTracks(%u) // Error occured !\n",
|
||||
wDevID);
|
||||
return (WORD)-1;
|
||||
}
|
||||
CDADev[wDevID].nTracks = hdr.cdth_trk1;
|
||||
}
|
||||
return CDADev[wDevID].nTracks;
|
||||
#else
|
||||
return (WORD)-1;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* CDAUDIO_GetTracksInfo [internal]
|
||||
*/
|
||||
BOOL CDAUDIO_GetTracksInfo(UINT wDevID)
|
||||
{
|
||||
#ifdef linux
|
||||
int i, length;
|
||||
int start, last_start;
|
||||
int total_length = 0;
|
||||
struct cdrom_tocentry entry;
|
||||
if (CDADev[wDevID].nTracks == 0) {
|
||||
if (CDAUDIO_GetNumberOfTracks(wDevID) == (WORD)-1) return FALSE;
|
||||
}
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_GetTracksInfo // nTracks=%u\n",
|
||||
CDADev[wDevID].nTracks);
|
||||
if (CDADev[wDevID].lpdwTrackLen != NULL)
|
||||
free(CDADev[wDevID].lpdwTrackLen);
|
||||
CDADev[wDevID].lpdwTrackLen = (LPDWORD)malloc(
|
||||
(CDADev[wDevID].nTracks + 1) * sizeof(DWORD));
|
||||
if (CDADev[wDevID].lpdwTrackPos != NULL)
|
||||
free(CDADev[wDevID].lpdwTrackPos);
|
||||
CDADev[wDevID].lpdwTrackPos = (LPDWORD)malloc(
|
||||
(CDADev[wDevID].nTracks + 1) * sizeof(DWORD));
|
||||
if (CDADev[wDevID].lpdwTrackLen == NULL ||
|
||||
CDADev[wDevID].lpdwTrackPos == NULL) {
|
||||
fprintf(stderr,
|
||||
"CDAUDIO_GetTracksInfo // error allocating track table !\n");
|
||||
return FALSE;
|
||||
}
|
||||
memset(CDADev[wDevID].lpdwTrackLen, 0,
|
||||
(CDADev[wDevID].nTracks + 1) * sizeof(DWORD));
|
||||
memset(CDADev[wDevID].lpdwTrackPos, 0,
|
||||
(CDADev[wDevID].nTracks + 1) * sizeof(DWORD));
|
||||
for (i = 0; i <= CDADev[wDevID].nTracks; i++) {
|
||||
if (i == CDADev[wDevID].nTracks)
|
||||
entry.cdte_track = CDROM_LEADOUT;
|
||||
else
|
||||
entry.cdte_track = i + 1;
|
||||
entry.cdte_format = CDROM_MSF;
|
||||
if (ioctl(CDADev[wDevID].unixdev, CDROMREADTOCENTRY, &entry)) {
|
||||
fprintf(stderr,
|
||||
"CDAUDIO_GetTracksInfo // error read entry\n");
|
||||
return FALSE;
|
||||
}
|
||||
start = CDFRAMES_PERSEC * (SECONDS_PERMIN *
|
||||
entry.cdte_addr.msf.minute + entry.cdte_addr.msf.second) +
|
||||
entry.cdte_addr.msf.frame;
|
||||
if (i == 0) {
|
||||
last_start = start;
|
||||
CDADev[wDevID].dwFirstOffset = start;
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_GetTracksInfo // dwFirstOffset=%u\n",
|
||||
start);
|
||||
}
|
||||
else {
|
||||
length = start - last_start;
|
||||
last_start = start;
|
||||
start = last_start - length;
|
||||
total_length += length;
|
||||
CDADev[wDevID].lpdwTrackLen[i - 1] = length;
|
||||
CDADev[wDevID].lpdwTrackPos[i - 1] = start;
|
||||
dprintf_cdaudio(stddeb,
|
||||
"CDAUDIO_GetTracksInfo // track #%u start=%u len=%u\n",
|
||||
i, start, length);
|
||||
}
|
||||
}
|
||||
CDADev[wDevID].dwTotalLen = total_length;
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_GetTracksInfo // total_len=%u\n",
|
||||
total_length);
|
||||
fflush(stdout);
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* CDAUDIO_GetCDStatus [internal]
|
||||
*/
|
||||
BOOL CDAUDIO_GetCDStatus(UINT wDevID)
|
||||
{
|
||||
#ifdef linux
|
||||
int oldmode = CDADev[wDevID].mode;
|
||||
CDADev[wDevID].sc.cdsc_format = CDROM_MSF;
|
||||
if (ioctl(CDADev[wDevID].unixdev, CDROMSUBCHNL, &CDADev[wDevID].sc)) {
|
||||
fprintf(stderr,"CDAUDIO_GetCDStatus // opened or no_media !\n");
|
||||
CDADev[wDevID].mode = MCI_MODE_NOT_READY;
|
||||
return TRUE;
|
||||
}
|
||||
switch (CDADev[wDevID].sc.cdsc_audiostatus) {
|
||||
case CDROM_AUDIO_INVALID:
|
||||
fprintf(stderr,"CDAUDIO_GetCDStatus // device doesn't support status !\n");
|
||||
return FALSE;
|
||||
case CDROM_AUDIO_NO_STATUS:
|
||||
CDADev[wDevID].mode = MCI_MODE_STOP;
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_GetCDStatus // MCI_MODE_STOP !\n");
|
||||
break;
|
||||
case CDROM_AUDIO_PLAY:
|
||||
CDADev[wDevID].mode = MCI_MODE_PLAY;
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_GetCDStatus // MCI_MODE_PLAY !\n");
|
||||
break;
|
||||
case CDROM_AUDIO_PAUSED:
|
||||
CDADev[wDevID].mode = MCI_MODE_PAUSE;
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_GetCDStatus // MCI_MODE_PAUSE !\n");
|
||||
break;
|
||||
default:
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_GetCDStatus // status=%02X !\n",
|
||||
CDADev[wDevID].sc.cdsc_audiostatus);
|
||||
}
|
||||
CDADev[wDevID].nCurTrack = CDADev[wDevID].sc.cdsc_trk;
|
||||
CDADev[wDevID].dwCurFrame =
|
||||
CDFRAMES_PERMIN * CDADev[wDevID].sc.cdsc_absaddr.msf.minute +
|
||||
CDFRAMES_PERSEC * CDADev[wDevID].sc.cdsc_absaddr.msf.second +
|
||||
CDADev[wDevID].sc.cdsc_absaddr.msf.frame;
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_GetCDStatus // %02u-%02u:%02u:%02u \n",
|
||||
CDADev[wDevID].sc.cdsc_trk,
|
||||
CDADev[wDevID].sc.cdsc_absaddr.msf.minute,
|
||||
CDADev[wDevID].sc.cdsc_absaddr.msf.second,
|
||||
CDADev[wDevID].sc.cdsc_absaddr.msf.frame);
|
||||
if (oldmode != CDADev[wDevID].mode && oldmode == MCI_MODE_OPEN) {
|
||||
if (!CDAUDIO_GetTracksInfo(wDevID)) {
|
||||
fprintf(stderr,"CDAUDIO_GetCDStatus // error updating TracksInfo !\n");
|
||||
return MCIERR_INTERNAL;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* CDAUDIO_mciPlay [internal]
|
||||
*/
|
||||
DWORD CDAUDIO_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
||||
static DWORD CDAUDIO_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
int start, end;
|
||||
|
@ -633,11 +628,11 @@ DWORD CDAUDIO_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
|||
msf.cdmsf_sec1 = (end % CDFRAMES_PERMIN) / CDFRAMES_PERSEC;
|
||||
msf.cdmsf_frame1 = end % CDFRAMES_PERSEC;
|
||||
if (ioctl(CDADev[wDevID].unixdev, CDROMSTART)) {
|
||||
fprintf(stderr,"CDAUDIO_mciPlay // motor doesn't start !\n");
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciPlay // motor doesn't start !\n");
|
||||
return MCIERR_HARDWARE;
|
||||
}
|
||||
if (ioctl(CDADev[wDevID].unixdev, CDROMPLAYMSF, &msf)) {
|
||||
fprintf(stderr,"CDAUDIO_mciPlay // device doesn't play !\n");
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciPlay // device doesn't play !\n");
|
||||
return MCIERR_HARDWARE;
|
||||
}
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciPlay // msf = %d:%d:%d %d:%d:%d\n",
|
||||
|
@ -662,7 +657,7 @@ DWORD CDAUDIO_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
|||
/**************************************************************************
|
||||
* CDAUDIO_mciStop [internal]
|
||||
*/
|
||||
DWORD CDAUDIO_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
static DWORD CDAUDIO_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciStop(%u, %08lX, %p);\n",
|
||||
|
@ -686,7 +681,7 @@ DWORD CDAUDIO_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
|||
/**************************************************************************
|
||||
* CDAUDIO_mciPause [internal]
|
||||
*/
|
||||
DWORD CDAUDIO_mciPause(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
static DWORD CDAUDIO_mciPause(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciPause(%u, %08lX, %p);\n",
|
||||
|
@ -710,7 +705,7 @@ DWORD CDAUDIO_mciPause(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
|||
/**************************************************************************
|
||||
* CDAUDIO_mciResume [internal]
|
||||
*/
|
||||
DWORD CDAUDIO_mciResume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
static DWORD CDAUDIO_mciResume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciResume(%u, %08lX, %p);\n",
|
||||
|
@ -734,7 +729,7 @@ DWORD CDAUDIO_mciResume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
|||
/**************************************************************************
|
||||
* CDAUDIO_mciSeek [internal]
|
||||
*/
|
||||
DWORD CDAUDIO_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms)
|
||||
static DWORD CDAUDIO_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
DWORD dwRet;
|
||||
|
@ -775,7 +770,7 @@ DWORD CDAUDIO_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms)
|
|||
/**************************************************************************
|
||||
* CDAUDIO_mciSet [internal]
|
||||
*/
|
||||
DWORD CDAUDIO_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
|
||||
static DWORD CDAUDIO_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciSet(%u, %08lX, %p);\n",
|
||||
|
@ -798,7 +793,7 @@ DWORD CDAUDIO_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
|
|||
dprintf_cdaudio(stddeb,"CDAUDIO_mciSet // MCI_FORMAT_TMSF !\n");
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr,"CDAUDIO_mciSet // bad time format !\n");
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_mciSet // bad time format !\n");
|
||||
return MCIERR_BAD_TIME_FORMAT;
|
||||
}
|
||||
CDADev[wDevID].dwTimeFormat = lpParms->dwTimeFormat;
|
||||
|
@ -835,15 +830,15 @@ DWORD CDAUDIO_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
|
|||
/**************************************************************************
|
||||
* CDAUDIO_DriverProc [sample driver]
|
||||
*/
|
||||
LRESULT CDAUDIO_DriverProc(DWORD dwDevID, HDRVR hDriv, WORD wMsg,
|
||||
LONG CDAUDIO_DriverProc(DWORD dwDevID, HDRVR hDriv, WORD wMsg,
|
||||
DWORD dwParam1, DWORD dwParam2)
|
||||
{
|
||||
#ifdef linux
|
||||
switch(wMsg) {
|
||||
case DRV_LOAD:
|
||||
return (LRESULT)1L;
|
||||
return 1;
|
||||
case DRV_FREE:
|
||||
return (LRESULT)1L;
|
||||
return 1;
|
||||
case DRV_OPEN:
|
||||
case MCI_OPEN_DRIVER:
|
||||
case MCI_OPEN:
|
||||
|
@ -854,19 +849,19 @@ LRESULT CDAUDIO_DriverProc(DWORD dwDevID, HDRVR hDriv, WORD wMsg,
|
|||
return CDAUDIO_mciClose(dwDevID, dwParam1,
|
||||
(LPMCI_GENERIC_PARMS)dwParam2);
|
||||
case DRV_ENABLE:
|
||||
return (LRESULT)1L;
|
||||
return 1;
|
||||
case DRV_DISABLE:
|
||||
return (LRESULT)1L;
|
||||
return 1;
|
||||
case DRV_QUERYCONFIGURE:
|
||||
return (LRESULT)1L;
|
||||
return 1;
|
||||
case DRV_CONFIGURE:
|
||||
MessageBox((HWND)NULL, "Sample MultiMedia Linux Driver !",
|
||||
"MMLinux Driver", MB_OK);
|
||||
return (LRESULT)1L;
|
||||
return 1;
|
||||
case DRV_INSTALL:
|
||||
return (LRESULT)DRVCNF_RESTART;
|
||||
return DRVCNF_RESTART;
|
||||
case DRV_REMOVE:
|
||||
return (LRESULT)DRVCNF_RESTART;
|
||||
return DRVCNF_RESTART;
|
||||
case MCI_GETDEVCAPS:
|
||||
return CDAUDIO_mciGetDevCaps(dwDevID, dwParam1,
|
||||
(LPMCI_GETDEVCAPS_PARMS)PTR_SEG_TO_LIN(dwParam2));
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -2,9 +2,8 @@
|
|||
* Sample AUXILARY Wine Driver for Linux
|
||||
*
|
||||
* Copyright 1994 Martin Ayotte
|
||||
*
|
||||
static char Copyright[] = "Copyright Martin Ayotte, 1994";
|
||||
*/
|
||||
*/
|
||||
|
||||
#ifndef WINELIB
|
||||
#define BUILTIN_MMSYSTEM
|
||||
#endif
|
||||
|
@ -45,7 +44,7 @@ static int NumDev = 6;
|
|||
/**************************************************************************
|
||||
* AUX_GetDevCaps [internal]
|
||||
*/
|
||||
DWORD AUX_GetDevCaps(WORD wDevID, LPAUXCAPS lpCaps, DWORD dwSize)
|
||||
static DWORD AUX_GetDevCaps(WORD wDevID, LPAUXCAPS lpCaps, DWORD dwSize)
|
||||
{
|
||||
#ifdef linux
|
||||
int mixer;
|
||||
|
@ -116,7 +115,7 @@ DWORD AUX_GetDevCaps(WORD wDevID, LPAUXCAPS lpCaps, DWORD dwSize)
|
|||
/**************************************************************************
|
||||
* AUX_GetVolume [internal]
|
||||
*/
|
||||
DWORD AUX_GetVolume(WORD wDevID, LPDWORD lpdwVol)
|
||||
static DWORD AUX_GetVolume(WORD wDevID, LPDWORD lpdwVol)
|
||||
{
|
||||
#ifdef linux
|
||||
int mixer;
|
||||
|
@ -175,7 +174,7 @@ DWORD AUX_GetVolume(WORD wDevID, LPDWORD lpdwVol)
|
|||
/**************************************************************************
|
||||
* AUX_SetVolume [internal]
|
||||
*/
|
||||
DWORD AUX_SetVolume(WORD wDevID, DWORD dwParam)
|
||||
static DWORD AUX_SetVolume(WORD wDevID, DWORD dwParam)
|
||||
{
|
||||
#ifdef linux
|
||||
int mixer;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1240,8 +1240,12 @@ BOOL BitBlt( HDC hdcDst, short xDst, short yDst, short width, short height,
|
|||
"BitBlt: %04x %d,%d %d bpp -> %04x %d,%d %dx%dx%d rop=%06lx\n",
|
||||
hdcSrc, xSrc, ySrc, dcSrc ? dcSrc->w.bitsPerPixel : 0,
|
||||
hdcDst, xDst, yDst, width, height, dcDst->w.bitsPerPixel, rop);
|
||||
dprintf_bitblt(stddeb," src org=%d,%d dst org=%d,%d\n",
|
||||
dcSrc->w.DCOrgX, dcSrc->w.DCOrgY, dcDst->w.DCOrgX, dcDst->w.DCOrgY );
|
||||
if (dcSrc != NULL) {
|
||||
dprintf_bitblt(stddeb," src org=%d,%d",
|
||||
dcSrc->w.DCOrgX, dcSrc->w.DCOrgY);
|
||||
}
|
||||
dprintf_bitblt(stddeb," dst org=%d,%d\n", dcDst->w.DCOrgX,
|
||||
dcDst->w.DCOrgY);
|
||||
return CallTo32_LargeStack( (int(*)())BITBLT_InternalStretchBlt, 11,
|
||||
dcDst, xDst, yDst, width, height,
|
||||
dcSrc, xSrc, ySrc, width, height, rop );
|
||||
|
|
|
@ -334,6 +334,7 @@ HDC GetDCState( HDC hdc )
|
|||
|
||||
dprintf_dc(stddeb, "GetDCState(%d): returning %d\n", hdc, handle );
|
||||
|
||||
memset( &newdc->u.x, 0, sizeof(newdc->u.x) );
|
||||
memcpy( &newdc->w, &dc->w, sizeof(dc->w) );
|
||||
memcpy( &newdc->u.x.pen, &dc->u.x.pen, sizeof(dc->u.x.pen) );
|
||||
newdc->saveLevel = 0;
|
||||
|
|
|
@ -22,7 +22,7 @@ func_type func_name( HDC hdc ) \
|
|||
{ \
|
||||
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); \
|
||||
if (!dc) return 0; \
|
||||
return MAKELONG( dc->w.ret_x, dc->w.ret_y << 16 ); \
|
||||
return MAKELONG( dc->w.ret_x, dc->w.ret_y ); \
|
||||
}
|
||||
|
||||
#define DC_GET_VAL_EX( func_name, ret_x, ret_y ) \
|
||||
|
|
|
@ -473,8 +473,8 @@ static int DIB_SetImageBits( DC *dc, WORD lines, WORD depth, LPSTR bits,
|
|||
if (coloruse == DIB_RGB_COLORS)
|
||||
{
|
||||
RGBQUAD * rgbPtr = info->bmiColors;
|
||||
for (i = 0; i < colors; i++, rgbPtr++)
|
||||
colorMapping[i] = COLOR_ToPhysical( dc, RGB(rgbPtr->rgbRed,
|
||||
for (i = 0; i < colors; i++, rgbPtr++)
|
||||
colorMapping[i] = COLOR_ToPhysical( dc, RGB(rgbPtr->rgbRed,
|
||||
rgbPtr->rgbGreen,
|
||||
rgbPtr->rgbBlue) );
|
||||
}
|
||||
|
@ -677,6 +677,9 @@ HBITMAP CreateDIBitmap( HDC hdc, BITMAPINFOHEADER * header, DWORD init,
|
|||
HBITMAP handle;
|
||||
|
||||
handle = CreateCompatibleBitmap( hdc, header->biWidth, header->biHeight );
|
||||
/* handle = CreateBitmap( header->biWidth, header->biHeight,
|
||||
1, header->biBitCount, NULL );
|
||||
*/
|
||||
if (!handle) return 0;
|
||||
if (init == CBM_INIT) SetDIBits( hdc, handle, 0, header->biHeight,
|
||||
bits, data, coloruse );
|
||||
|
|
|
@ -15,7 +15,6 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
|||
#include "wine.h"
|
||||
#include "callback.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_FONT */
|
||||
#include "debug.h"
|
||||
|
||||
#define MAX_FONTS 256
|
||||
|
@ -122,7 +121,7 @@ static XFontStruct * FONT_MatchFont( LOGFONT * font, DC * dc )
|
|||
const char *family, *weight, *charset;
|
||||
char **names;
|
||||
char slant, spacing;
|
||||
int width, height, count;
|
||||
int width, height, oldheight, count;
|
||||
XFontStruct * fontStruct;
|
||||
|
||||
weight = (font->lfWeight > 550) ? "bold" : "medium";
|
||||
|
@ -138,6 +137,11 @@ static XFontStruct * FONT_MatchFont( LOGFONT * font, DC * dc )
|
|||
}
|
||||
else height *= 10;
|
||||
width = 10 * (font->lfWidth * dc->w.VportExtY / dc->w.WndExtY);
|
||||
if (width < 0) {
|
||||
dprintf_font( stddeb, "FONT_MatchFont: negative width %d(%d)\n",
|
||||
width, font->lfWidth );
|
||||
width = -width;
|
||||
}
|
||||
spacing = (font->lfPitchAndFamily & FIXED_PITCH) ? 'm' :
|
||||
(font->lfPitchAndFamily & VARIABLE_PITCH) ? 'p' : '*';
|
||||
charset = (font->lfCharSet == ANSI_CHARSET) ? "iso8859-1" : "*-*";
|
||||
|
@ -164,6 +168,7 @@ static XFontStruct * FONT_MatchFont( LOGFONT * font, DC * dc )
|
|||
break;
|
||||
}
|
||||
|
||||
oldheight = height;
|
||||
while (TRUE) {
|
||||
/* Width==0 seems not to be a valid wildcard on SGI's, using * instead */
|
||||
if ( width == 0 )
|
||||
|
@ -178,11 +183,20 @@ static XFontStruct * FONT_MatchFont( LOGFONT * font, DC * dc )
|
|||
height -= 10;
|
||||
if (height < 10) {
|
||||
dprintf_font(stddeb,"*** No match for %s\n", pattern );
|
||||
if(slant == 'i')
|
||||
/* try oblique if no italic font */
|
||||
slant = 'o';
|
||||
else
|
||||
return NULL;
|
||||
if(slant == 'i') {
|
||||
/* try oblique if no italic font */
|
||||
slant = 'o';
|
||||
height = oldheight;
|
||||
continue;
|
||||
}
|
||||
if (spacing == 'm') {
|
||||
/* If a fixed spacing font could not be found, ignore
|
||||
* the family */
|
||||
family = "*-*";
|
||||
height = oldheight;
|
||||
continue;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
dprintf_font(stddeb," Found '%s'\n", *names );
|
||||
|
@ -630,7 +644,7 @@ void InitFontsList(void)
|
|||
names = XListFonts( display, pattern, MAX_FONTS, &count );
|
||||
dprintf_font(stddeb,"InitFontsList // count=%d \n", count);
|
||||
for (i = 0; i < count; i++) {
|
||||
lpNewFont = malloc(sizeof(LOGFONT));
|
||||
lpNewFont = malloc(sizeof(LOGFONT) + LF_FACESIZE);
|
||||
if (lpNewFont == NULL) {
|
||||
dprintf_font(stddeb, "InitFontsList // Error alloc new font structure !\n");
|
||||
break;
|
||||
|
@ -731,6 +745,7 @@ int EnumFonts(HDC hDC, LPSTR lpFaceName, FARPROC lpEnumFunc, LPSTR lpData)
|
|||
if (strcmp(FaceName, lpLogFontList[i]->lfFaceName) != 0) continue;
|
||||
}
|
||||
dprintf_font(stddeb,"EnumFonts // enum '%s' !\n", lpLogFontList[i]->lfFaceName);
|
||||
dprintf_font(stddeb,"EnumFonts // %p !\n", lpLogFontList[i]);
|
||||
memcpy(lpLogFont, lpLogFontList[i], sizeof(LOGFONT) + LF_FACESIZE);
|
||||
hFont = CreateFontIndirect(lpLogFont);
|
||||
hOldFont = SelectObject(hDC, hFont);
|
||||
|
@ -836,3 +851,13 @@ BOOL GetRasterizerCaps(LPRASTERIZER_STATUS lprs, WORD cbNumBytes)
|
|||
rs.nLanguageID = 0;
|
||||
return True;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* GetKerningPairs [GDI.332]
|
||||
* FIXME: The last parameter is actually LPKERNINGPAIR
|
||||
*/
|
||||
int GetKerningPairs(WORD hDC,int cBufLen,LPVOID lpKerningPairs)
|
||||
{
|
||||
/* Wine fonts are ugly and don't support kerning :) */
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -262,7 +262,7 @@ int DrawText( HDC hdc, LPSTR str, int count, LPRECT rect, WORD flags )
|
|||
y += lh;
|
||||
if (strPtr)
|
||||
{
|
||||
if (!(flags & DT_NOCLIP))
|
||||
if (!(flags & DT_NOCLIP) && !(flags & DT_CALCRECT))
|
||||
{
|
||||
if (y > rect->bottom - lh)
|
||||
break;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
* Copyright Martin von Loewis, 1994
|
||||
*
|
||||
*/
|
||||
static char Copyright[] = "Copyright Martin von Loewis, 1994";
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
* Copyright Martin von Loewis, 1994
|
||||
*/
|
||||
|
||||
static char Copyright[] = "Copyright Martin von Loewis, 1994";
|
||||
|
||||
#include <stdio.h>
|
||||
#include "parser.h"
|
||||
#include "windows.h"
|
||||
|
|
44
rc/sysres.rc
44
rc/sysres.rc
|
@ -85,50 +85,6 @@ FONT 8, "Helv"
|
|||
}
|
||||
|
||||
|
||||
11 DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Open"
|
||||
FONT 8, "Helv"
|
||||
{
|
||||
LTEXT "File &Name:", 1090, 6, 6, 76, 9
|
||||
LTEXT "", 1152, 6, 16, 90, 12
|
||||
LISTBOX 1120, 6, 32, 90, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP
|
||||
LTEXT "&Directories:", -1, 110, 6, 92, 9
|
||||
LTEXT "", 1088, 110, 18, 92, 9, SS_NOPREFIX | WS_GROUP
|
||||
LISTBOX 1121, 110, 32, 92, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP
|
||||
LTEXT "List Files of &Type:", 1089, 6, 104, 90, 9
|
||||
COMBOBOX 1136, 6, 114, 90, 36, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Dri&ves:", 1091, 110, 104, 92, 9
|
||||
COMBOBOX 1137, 110, 114, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP
|
||||
DEFPUSHBUTTON "Open", 1, 208, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "Cancel", 2, 208, 24, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "&Help", 1038, 208, 46, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
CHECKBOX "&Read Only", 1040, 208, 68, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
}
|
||||
|
||||
|
||||
12 DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Save As ..."
|
||||
FONT 8, "Helv"
|
||||
{
|
||||
LTEXT "File &Name:", 1090, 6, 6, 76, 9
|
||||
LTEXT "", 1152, 6, 16, 90, 12
|
||||
LISTBOX 1120, 6, 32, 90, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP
|
||||
LTEXT "&Directories:", -1, 110, 6, 92, 9
|
||||
LTEXT "", 1088, 110, 18, 92, 9, SS_NOPREFIX | WS_GROUP
|
||||
LISTBOX 1121, 110, 32, 92, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP
|
||||
LTEXT "List Files of &Type:", 1089, 6, 104, 90, 9
|
||||
COMBOBOX 1136, 6, 114, 90, 36, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Dri&ves:", 1091, 110, 104, 92, 9
|
||||
COMBOBOX 1137, 110, 114, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP
|
||||
DEFPUSHBUTTON "Save As", 1, 208, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "Cancel", 2, 208, 24, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "&Help", 1038, 208, 46, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
CHECKBOX "&Read Only", 1040, 208, 68, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
}
|
||||
|
||||
|
||||
5 DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 134
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Print"
|
||||
|
|
|
@ -83,50 +83,6 @@ FONT 8, "Helv"
|
|||
}
|
||||
|
||||
|
||||
11 DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Öffnen"
|
||||
FONT 8, "Helv"
|
||||
{
|
||||
LTEXT "Datei&name:", 1090, 6, 6, 76, 9
|
||||
LTEXT "", 1152, 6, 16, 90, 12
|
||||
LISTBOX 1120, 6, 32, 90, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP
|
||||
LTEXT "&Verzeichnisse:", -1, 110, 6, 92, 9
|
||||
LTEXT "", 1088, 110, 18, 92, 9, SS_NOPREFIX | WS_GROUP
|
||||
LISTBOX 1121, 110, 32, 92, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP
|
||||
LTEXT "Liste der Datei&typen:", 1089, 6, 104, 90, 9
|
||||
COMBOBOX 1136, 6, 114, 90, 36, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "&Laufwerke:", 1091, 110, 104, 92, 9
|
||||
COMBOBOX 1137, 110, 114, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP
|
||||
DEFPUSHBUTTON "Öffnen", 1, 208, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "Abbrechen", 2, 208, 24, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "&Hilfe", 1038, 208, 46, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
CHECKBOX "&Schreibgeschützt", 1040, 208, 68, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
}
|
||||
|
||||
|
||||
12 DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Speichern als ..."
|
||||
FONT 8, "Helv"
|
||||
{
|
||||
LTEXT "Datei&name:", 1090, 6, 6, 76, 9
|
||||
LTEXT "", 1152, 6, 16, 90, 12
|
||||
LISTBOX 1120, 6, 32, 90, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP
|
||||
LTEXT "&Verzeichnisse:", -1, 110, 6, 92, 9
|
||||
LTEXT "", 1088, 110, 18, 92, 9, SS_NOPREFIX | WS_GROUP
|
||||
LISTBOX 1121, 110, 32, 92, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP
|
||||
LTEXT "Liste der Datei&typen:", 1089, 6, 104, 90, 9
|
||||
COMBOBOX 1136, 6, 114, 90, 36, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "&Laufwerke:", 1091, 110, 104, 92, 9
|
||||
COMBOBOX 1137, 110, 114, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP
|
||||
DEFPUSHBUTTON "Speichern als", 1, 208, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "Abbrechen", 2, 208, 24, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "&Hilfe", 1038, 208, 46, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
CHECKBOX "&Schreibgeschützt", 1040, 208, 68, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
}
|
||||
|
||||
|
||||
5 DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 134
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Drucken"
|
||||
|
|
|
@ -83,50 +83,6 @@ FONT 8, "Helv"
|
|||
}
|
||||
|
||||
|
||||
11 DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Åpne"
|
||||
FONT 8, "Helv"
|
||||
{
|
||||
LTEXT "&Filnavn:", 1090, 6, 6, 76, 9
|
||||
LTEXT "", 1152, 6, 16, 90, 12
|
||||
LISTBOX 1120, 6, 32, 90, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP
|
||||
LTEXT "&Kataloger:", -1, 110, 6, 92, 9
|
||||
LTEXT "", 1088, 110, 18, 92, 9, SS_NOPREFIX | WS_GROUP
|
||||
LISTBOX 1121, 110, 32, 92, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP
|
||||
LTEXT "Liste over filer av &type:", 1089, 6, 104, 90, 9
|
||||
COMBOBOX 1136, 6, 114, 90, 36, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "&Kataloger:", 1091, 110, 104, 92, 9
|
||||
COMBOBOX 1137, 110, 114, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP
|
||||
DEFPUSHBUTTON "Åpne", 1, 208, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "Avbryt", 2, 208, 24, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "&Hjelp", 1038, 208, 46, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
CHECKBOX "&Skrivebeskyttet", 1040, 208, 68, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
}
|
||||
|
||||
|
||||
12 DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Lagre som ..."
|
||||
FONT 8, "Helv"
|
||||
{
|
||||
LTEXT "&Filnavn:", 1090, 6, 6, 76, 9
|
||||
LTEXT "", 1152, 6, 16, 90, 12
|
||||
LISTBOX 1120, 6, 32, 90, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP
|
||||
LTEXT "&Kataloger:", -1, 110, 6, 92, 9
|
||||
LTEXT "", 1088, 110, 18, 92, 9, SS_NOPREFIX | WS_GROUP
|
||||
LISTBOX 1121, 110, 32, 92, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP
|
||||
LTEXT "Liste over filer av &type:", 1089, 6, 104, 90, 9
|
||||
COMBOBOX 1136, 6, 114, 90, 36, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "&Kataloger:", 1091, 110, 104, 92, 9
|
||||
COMBOBOX 1137, 110, 114, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP
|
||||
DEFPUSHBUTTON "Lagre som", 1, 208, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "Avbryt", 2, 208, 24, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "&Hjelp", 1038, 208, 46, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
CHECKBOX "&Skrivebeskyttet", 1040, 208, 68, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
}
|
||||
|
||||
|
||||
5 DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 134
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Skriv"
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
* Copyright Martin von Loewis, 1994
|
||||
*
|
||||
*/
|
||||
static char Copyright[] = "Copyright Martin von Loewis, 1994";
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
101
tools/build.c
101
tools/build.c
|
@ -974,27 +974,32 @@ static void BuildCall32LargeStack(void)
|
|||
printf( "\tpushl %%ebp\n" );
|
||||
printf( "\tmovl %%esp,%%ebp\n" );
|
||||
|
||||
/* Retrieve the original 32-bit stack pointer */
|
||||
|
||||
printf( "\tmovl " PREFIX "IF1632_Original32_esp, %%eax\n" );
|
||||
printf( "\torl %%eax,%%eax\n" );
|
||||
printf( "\tje 0f\n" );
|
||||
|
||||
/* Save registers */
|
||||
|
||||
printf( "\tpushl %%ecx\n" );
|
||||
printf( "\tpushl %%esi\n" );
|
||||
printf( "\tpushl %%edi\n" );
|
||||
|
||||
/* Switch to the new stack (if any) */
|
||||
/* Switch to the new stack */
|
||||
|
||||
printf( "\tleal 16(%%ebp),%%esi\n" );
|
||||
printf( "\tmovl " PREFIX "IF1632_Original32_esp, %%ecx\n" );
|
||||
printf( "\tjcxz 0f\n" );
|
||||
printf( "\tmovl %%ecx,%%esp\n" );
|
||||
printf( "\tmovl %%eax,%%esp\n" );
|
||||
|
||||
/* Transfer the arguments */
|
||||
|
||||
printf( "\tleal 16(%%ebp),%%esi\n" );
|
||||
printf( "\tmovl 12(%%ebp),%%ecx\n" );
|
||||
printf( "\tjcxz 1f\n" );
|
||||
printf( "\tshl $2,%%ecx\n" );
|
||||
printf( "\torl %%ecx,%%ecx\n" );
|
||||
printf( "\tje 1f\n" );
|
||||
printf( "\tshll $2,%%ecx\n" );
|
||||
printf( "\tsubl %%ecx,%%esp\n" );
|
||||
printf( "\tmovl %%esp,%%edi\n" );
|
||||
printf( "\tshr $2,%%ecx\n" );
|
||||
printf( "\tshrl $2,%%ecx\n" );
|
||||
printf( "\trep; movsl\n" );
|
||||
printf( "1:\n" );
|
||||
|
||||
|
@ -1020,12 +1025,6 @@ static void BuildCall32LargeStack(void)
|
|||
|
||||
printf( "0:\n" );
|
||||
|
||||
/* Restore the registers */
|
||||
|
||||
printf( "\tpopl %%edi\n" );
|
||||
printf( "\tpopl %%esi\n" );
|
||||
printf( "\tpopl %%ecx\n" );
|
||||
|
||||
/* Move the return address up the stack */
|
||||
|
||||
printf( "\tmovl 4(%%ebp),%%eax\n" );
|
||||
|
@ -1267,6 +1266,11 @@ static void BuildCall32Func( char *profile )
|
|||
|
||||
printf( "\tmovl -8(%%ebp),%%eax\n" );
|
||||
|
||||
/* If necessary, save %edx over the API function address */
|
||||
|
||||
if (!reg_func && short_ret)
|
||||
printf( "\tmovl %%edx,-8(%%ebp)\n" );
|
||||
|
||||
/* Setup es */
|
||||
|
||||
printf( "\tpushw %%ds\n" );
|
||||
|
@ -1284,7 +1288,7 @@ static void BuildCall32Func( char *profile )
|
|||
|
||||
printf( "\taddl $24,%%ebp\n" );
|
||||
|
||||
/* Call the entry point */
|
||||
/* Print the debug information before the call */
|
||||
|
||||
if (debugging)
|
||||
{
|
||||
|
@ -1295,22 +1299,21 @@ static void BuildCall32Func( char *profile )
|
|||
printf( "\tpopl %%eax\n" );
|
||||
}
|
||||
|
||||
/* Call the entry point */
|
||||
|
||||
printf( "\tcall %%eax\n" );
|
||||
|
||||
/* Print the debug information after the call */
|
||||
|
||||
if (debugging)
|
||||
{
|
||||
printf( "\tpushl %%eax\n" );
|
||||
printf( "\tpushl $%d\n", short_ret );
|
||||
printf( "\tpushl $%d\n", reg_func ? 2 : (short_ret ? 1 : 0) );
|
||||
printf( "\tcall " PREFIX "RELAY_DebugReturn\n" );
|
||||
printf( "\tpopl %%eax\n" );
|
||||
printf( "\tpopl %%eax\n" );
|
||||
}
|
||||
|
||||
if (reg_func)
|
||||
printf( "\taddl $%d,%%esp\n", sizeof(struct sigcontext_struct) );
|
||||
else if (*args)
|
||||
printf( "\taddl $%d,%%esp\n", 4 * strlen(args) );
|
||||
|
||||
/* Restore the 16-bit stack */
|
||||
|
||||
printf( "\tmovw " PREFIX "IF1632_Saved16_ss,%%ss\n" );
|
||||
|
@ -1342,21 +1345,40 @@ static void BuildCall32Func( char *profile )
|
|||
args++;
|
||||
}
|
||||
}
|
||||
else /* Store the return value in dx:ax if needed */
|
||||
{
|
||||
if (!short_ret)
|
||||
{
|
||||
printf( "\tpushl %%eax\n" );
|
||||
printf( "\tpopw %%dx\n" );
|
||||
printf( "\tpopw %%dx\n" );
|
||||
}
|
||||
}
|
||||
|
||||
/* Restore ds and bp */
|
||||
/* Restore ds */
|
||||
|
||||
printf( "\tpopw %%ds\n" );
|
||||
printf( "\tpopl %%ebp\n" ); /* Remove entry point address */
|
||||
printf( "\tpopl %%ebp\n" ); /* Remove DLL id and ordinal */
|
||||
|
||||
/* Get the return value into dx:ax and clean up the stack */
|
||||
|
||||
if (!reg_func)
|
||||
{
|
||||
if (short_ret)
|
||||
{
|
||||
printf( "\tpopl %%edx\n" ); /* Restore %edx */
|
||||
printf( "\taddl $4,%%esp\n" ); /* Remove DLL id and ordinal */
|
||||
}
|
||||
else
|
||||
{
|
||||
printf( "\tpushl %%eax\n" );
|
||||
printf( "\tpopw %%ax\n" );
|
||||
printf( "\tpopw %%dx\n" );
|
||||
/* Remove API entry point, DLL id and ordinal from the stack */
|
||||
printf( "\taddl $8,%%esp\n" );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Remove API entry point, DLL id and ordinal from the stack, */
|
||||
/* but take care not to change the value of the carry flag. */
|
||||
|
||||
printf( "\tpopl %%ebp\n" );
|
||||
printf( "\tpopl %%ebp\n" );
|
||||
}
|
||||
|
||||
/* Restore bp */
|
||||
|
||||
printf( "\tpopw %%bp\n" );
|
||||
|
||||
/* Remove the arguments and return */
|
||||
|
@ -1451,7 +1473,7 @@ static void BuildCall16Func( char *profile )
|
|||
/* Push the address of the first argument */
|
||||
printf( "\tmovl %%ebx,%%eax\n" );
|
||||
printf( "\taddl $12,%%eax\n" );
|
||||
printf( "\tpushl $%d\n", reg_func ? 7 : strlen(args) );
|
||||
printf( "\tpushl $%d\n", reg_func ? 8 : strlen(args) );
|
||||
printf( "\tpushl %%eax\n" );
|
||||
printf( "\tcall " PREFIX "RELAY_DebugCall16\n" );
|
||||
printf( "\tpopl %%eax\n" );
|
||||
|
@ -1512,18 +1534,17 @@ static void BuildCall16Func( char *profile )
|
|||
/* Get the 16-bit ds */
|
||||
/* FIXME: this shouldn't be necessary if function prologs fixup worked. */
|
||||
|
||||
printf( "\tpushw 16(%%ebx)\n" );
|
||||
printf( "\tpopw %%ds\n" );
|
||||
|
||||
if (reg_func)
|
||||
{
|
||||
/* Retrieve ebx from the 32-bit stack */
|
||||
printf( "\tmovl %%fs:28(%%ebx),%%ebx\n" );
|
||||
printf( "\tpushw 16(%%ebx)\n" );
|
||||
printf( "\tmovl 32(%%ebx),%%ebx\n" ); /*Get ebx from the 32-bit stack*/
|
||||
printf( "\tpopw %%ds\n" );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Set ax equal to ds for window procedures */
|
||||
printf( "\tmovw %%ds,%%ax\n" );
|
||||
printf( "\tmovw 16(%%ebx),%%ax\n" );
|
||||
/* printf( "\tmovw %%ax,%%ds\n" ); */
|
||||
}
|
||||
|
||||
/* Jump to the called routine */
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
* Window classes functions
|
||||
*
|
||||
* Copyright 1993 Alexandre Julliard
|
||||
*
|
||||
static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
||||
*/
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
@ -55,12 +53,7 @@ HCLASS CLASS_FindClassByName( char * name, WORD hinstance, CLASS **ptr )
|
|||
for (class = firstClass; (class); class = classPtr->hNext)
|
||||
{
|
||||
classPtr = (CLASS *) USER_HEAP_LIN_ADDR(class);
|
||||
#if 0
|
||||
/* This breaks Borland's Resource Workshop: A DLL creates a class,
|
||||
* and the main program tries to use it, but passes a different
|
||||
* hInstance */
|
||||
if (!(classPtr->wc.style & CS_GLOBALCLASS)) continue;
|
||||
#endif
|
||||
if (!(classPtr->wc.style & CS_GLOBALCLASS)) continue;
|
||||
if (classPtr->atomName == atom)
|
||||
{
|
||||
if (ptr) *ptr = classPtr;
|
||||
|
@ -98,11 +91,14 @@ ATOM RegisterClass( LPWNDCLASS class )
|
|||
int classExtra;
|
||||
char *name = PTR_SEG_TO_LIN( class->lpszClassName );
|
||||
|
||||
dprintf_class(stddeb, "RegisterClass: wndproc=%08lx hinst=%d name='%s' background %04x\n",
|
||||
dprintf_class(stddeb, "RegisterClass: wndproc=%08lx hinst=%04x name='%s' background %04x\n",
|
||||
(DWORD)class->lpfnWndProc, class->hInstance, name, class->hbrBackground );
|
||||
dprintf_class(stddeb, " style %04x\n",class->style);
|
||||
|
||||
/* Window classes are owned by modules, not instances */
|
||||
class->hInstance = GetExePtr( class->hInstance );
|
||||
|
||||
/* Check if a class with this name already exists */
|
||||
|
||||
prevClass = CLASS_FindClassByName( name, class->hInstance, &prevClassPtr );
|
||||
if (prevClass)
|
||||
{
|
||||
|
@ -155,15 +151,16 @@ ATOM RegisterClass( LPWNDCLASS class )
|
|||
/***********************************************************************
|
||||
* UnregisterClass (USER.403)
|
||||
*/
|
||||
BOOL UnregisterClass( LPSTR className, HANDLE instance )
|
||||
BOOL UnregisterClass( LPSTR className, HANDLE hinstance )
|
||||
{
|
||||
HANDLE class, prevClass;
|
||||
CLASS * classPtr, * prevClassPtr;
|
||||
|
||||
hinstance = GetExePtr( hinstance );
|
||||
/* Check if we can remove this class */
|
||||
class = CLASS_FindClassByName( className, instance, &classPtr );
|
||||
class = CLASS_FindClassByName( className, hinstance, &classPtr );
|
||||
if (!class) return FALSE;
|
||||
if ((classPtr->wc.hInstance != instance) || (classPtr->cWindows > 0))
|
||||
if ((classPtr->wc.hInstance != hinstance) || (classPtr->cWindows > 0))
|
||||
return FALSE;
|
||||
|
||||
/* Remove the class from the linked list */
|
||||
|
@ -289,7 +286,8 @@ BOOL GetClassInfo(HANDLE hInstance, SEGPTR ClassName,
|
|||
dprintf_class(stddeb, "GetClassInfo hInstance=%04x lpClassName=%s\n",
|
||||
hInstance, lpClassName);
|
||||
|
||||
|
||||
hInstance = GetExePtr(hInstance);
|
||||
|
||||
/* if (!(CLASS_FindClassByName(lpClassName, &classPtr))) return FALSE; */
|
||||
if (!(CLASS_FindClassByName(lpClassName, hInstance, &classPtr)))
|
||||
{
|
||||
|
|
|
@ -230,6 +230,23 @@ HCURSOR LoadCursor(HANDLE instance, SEGPTR cursor_name)
|
|||
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* CreateCursorIconIndirect (USER.408)
|
||||
*
|
||||
* Returns handle to either an icon or a cursor. Used by CreateCursor
|
||||
* and CreateIcon in Windoze, but will use same in this version.
|
||||
*/
|
||||
HANDLE CreateCursorIconIndirect(HANDLE hInstance, LPCURSORICONINFO lpInfo,
|
||||
LPSTR lpANDBits, /* bitmap data */
|
||||
LPSTR lpXORBits /* masking data */)
|
||||
{
|
||||
return CreateIcon(hInstance,
|
||||
lpInfo->nWidth, lpInfo->nHeight,
|
||||
lpInfo->byPlanes, lpInfo->byBitsPix,
|
||||
lpANDBits, lpXORBits);
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* CreateCursor [USER.406]
|
||||
*/
|
||||
|
|
|
@ -31,6 +31,7 @@ void DEFWND_SetText( HWND hwnd, LPSTR text )
|
|||
LPSTR textPtr;
|
||||
WND *wndPtr = WIN_FindWndPtr( hwnd );
|
||||
|
||||
if (!text) text = "";
|
||||
if (wndPtr->hText) USER_HEAP_FREE( wndPtr->hText );
|
||||
wndPtr->hText = USER_HEAP_ALLOC( strlen(text) + 1 );
|
||||
textPtr = (LPSTR) USER_HEAP_LIN_ADDR( wndPtr->hText );
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue