Release 940301
Tue Mar 1 11:30:21 1994 Bob Amstadt (bob@pooh) * [Configure] [*/Imakefile] Created configure script to handle different types of Wine builds. * [Configure] [tools/build.c] [if1632/Imakefile] [Wine.tmpl] Added ability to compile Wine on systems with 14-char filename limit. * [if1632/relay.c] [include/options.h] [misc/main.c] Added -relaydbg option to command line if DEBUG_RELAY is defined. * [loader/selector.c] Fixed bug in GetEntryDLLName() that caused Wine to seg fault. * [memory/heap.c] Fixed LocalInit() to work correctly. * [misc/user.c] Added code to call loaded DLLs' initialization routines. Tue Mar 1 01:01:17 MET 1994 julliard@di.epfl.ch (Alexandre Julliard) * [windows/dce.c] Added clipping of child windows by their parent's client area. * [windows/nonclient.c] Bug fix in NC_DoNCPaint(). * [windows/painting.c] Bug fix in RedrawWindow(). Feb 27, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte) * [mem/atom.c] Bug fix again in ATOM_DeleteAtom() : change LocalFree() by USER_HEAP_FREE(). (Previous patch done Feb 13th had been lost) * [controls/scroll.c] Move bitmaps loading in AllocScrollBar() instead of in WM_CREATE. * [windows/class.c] (sorry Alex ...) There was no bug there "in RegisterClass() : WNDCLASS->lpszClassName was reset to NULL." ^^^^^ * [misc/clipboard.c] --- New File --- New function EnumClipboardFormats(). New function OpenClipboard(). New function CloseClipboard(). New function EmptyClipboard(). New function GetClipboardOwner(). New function GetClipboardViewer(). New function CountClipboardFormats(). New function IsClipboardFormatAvailable(). New function OpenClipboard(). New function GetClipboardData(). New function SetClipboardViewer(). New function EnumClipboardFormats(). New function RegisterClipboardFormat(). New function ChangeClipboardChain(). New function SetClipboardData(). New function GetOpenClipboardWindow(). New function GetPriorityClipboardFormat(). New function GetClipboardFormatName(). Tue Mar 1 20:15:45 1994 Erik Bos <erik@trashcan.hacktic.nl> * [misc/comm.c] bugfix in OpenComm(). Tue Feb 22 18:04:02 1994 Jeffrey Hsu <hsu@freefall.cdrom.com> * [include/winsock.h] The sockproto struct is already defined in <sys/socket.h> * [misc/winsock.c] Need to include <netinet/in.h> for struct in-addr. Use sys_errlist[] instead of strerror[]. *[toolkit/heap.c] ANSI C specifies that the malloc functions are defined in stdlib.h, so we don't need to include malloc.h. *[loader/ldtlib.c] Print informative error message about probable cause of i386_set_ldt() failure and then exit. *[Imakefile] For systems that don't use gmake by default, set the MAKE variable to gmake and propagate it on recursive makes. Take out -li386 for FreeBSD systems and define __FreeBSD__ so Wine can be built with the FreeBSD 1.0.2 compiler. Tue Feb 22 02:52:19 EST 1994 jrichard@cs.uml.edu (John Richardson) * [objects/bitblt.c] Added in three functions to do stretching and compression for WHITEONBLACK, BLACKONWHITE, and color copies. Tue Feb 22 15:01:31 EST 1994 jrichard@cs.uml.edu (John Richardson) * [windows/graphics.c] Added FloodFill and FloodFill_rec. FloodFill_rec is pretty inefficent, but should suffice for now. * [include/windows.h] Changed the x,y paramaters for the FloodFill prototype from ints to shorts Tue Feb 22 00:58:28 MET 1994 julliard@di.epfl.ch (Alexandre Julliard) * [windows/widgets.c] Added desktop window class. * [windows/painting.c] Bug fix in RedrawWindow(). Implemented ExcludeUpdateRgn(). * [windows/win.c] [windows/winpos.c] Implemented desktop window. * [controls/desktop.c] Preliminary desktop window procedure. Feb 20, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte) * [controls/menu.c] New function LoadMenuIndirect(). New function GetMenuCheckMarkDimensions(). * [if1632/user.spec] Entry for DefDlgProc(). * [windows/class.c] Fix bug in RegisterClass() : WNDCLASS->lpszMenuName was reset to NULL. * [windows/win.c] In CreateWindowEx(), if hMenu == 0 then use wndclass->lpszMenuName to load Menu from resource; Mon Feb 21 22:38:28 1994 Erik Bos (erik@trashcan.hacktic.nl) * [loader/library.c] [loader/wine.c] Fixed runing DLL's as main executable problem. * [misc/dos_fs.c] Added wildcard support in DOS_readdir(). * [misc/winsocket.c] Added proper error handling of BSD winsocket functions. * [miscemu/int21.c] KERNEL_DOS3Call renamed to DOS3Call and modified to use do_int21(). * [main/main.c] Added functions for GetVersion, GetWinFlags and GetTimerResolution for libwine.a, SystemParametersInfo() partly implemented. Tue Feb 22 19:00:02 1994 Miguel de Icaza (miguel@xochitl.nuclecu.unam.mx) * [toolkit/winmain.c] Added _WinMain function. Setups the library (calls USER_InitApp). * [toolkit/sup.c] Added load_mz_header, load_ne_header, load_type_info and load_name_info functions. * [toolkit/heap.c] Code cleanup. * [misc/user.c] Moved from loader/misc.c. I hope to put back all the loader functions in the ~loader subdirectory in the future. CUrrently is needed since it has USER_InitApp. * [misc/resource.c] Since WineLib will probably need DLLs (currently it needs Sysres.dll). WineLib will be using much code of the loader again. So I removed some ifdefs that were used by WineLib. Added load_typeinfo and load_nameinfo (and the corresponding functions in [toolkit/sup.c] Added integer convertion functions in the needed places. Added very ugly patch (includes wine.c). In the next release I plan to move back all the loader routines to ~/loader. In the meantime I needed this patch. It doesn't affect any of the emulator code (its ifdefed for WineLib). * [misc/main.c] Cleaned up call to WinMain (now uses [toolkit/winmain.c] Ifdefed argument number checking when compiling the library. * [loader/wine.c] Modified to use load_(mz|ne)_header instead of doing a direct read. When compiling the emulator it still uses the direct read for performance. * [include/wine.h] Prototypes for loading routines. * [include/class.h] Added WINE_PACKED macro instead of __attribute__ ((packed)) * [include/arch.h] Macros for converting integers (Little endian to big-endian). Needed in the Sun to allow loading of DLL files. Mon Feb 14 23:48:09 MET 1994 julliard@di.epfl.ch (Alexandre Julliard) * [windows/clipping.c] Moved everything into windows/painting.c and removed this file. * [windows/message.c] Removed calls to memmove() in MSG_RemoveMsg(). * [windows/nonclient.c] Added WM_GETMINMAXINFO support for window resizing. * [windows/painting.c] Implemented RedrawWindow(). * [windows/scroll.c] Bug fix in ScrollWindowEx(). * [windows/win.c] Moved UpdateWindow() to windows/painting.c. Fri Feb 11 12:41:28 1994 Erik Bos (erik@trashcan.hacktic.nl) * [loader/wine.c] [misc/dos_fs.c] getenv() eq NULL bugfixes. * [misc/comm.c] cfmakeraw changed for SunOS. Feb 13, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte) * [mem/atom.c] Bug fix in ATOM_DeleteAtom() : change LocalFree() by USER_HEAP_FREE(). * [misc/message.c] New function FatalAppExit(). * [objects/font.c] New empty stub SetMapperFlags(). * [controls/menu.c] Better CheckMark & other bitmaps placement. * [windows/graphics.c] New function RoundRect() : calc.exe now working... Tue Feb 15 14:29:37 1994 John Richardson * [objects/bitblt.c] Fixed StretchBlt so it works quicker and faster. It still doesn't use the StretchMode bits for bitmap compression, but that will come soon. Mon Feb 14 13:21:04 1994 Miguel de Icaza (miguel@roxanne.nuclecu.unam.mx) * [include/windows.h,dialog.h,gdi.h] Changed __atribute__ ((packed)) for WINE_PACKED. When compiling the library this is defined as nothing. This gets rid with all the problems compiling under SunOS. Also * [windows/utility.c] Added DebugPrintString. * [toolkit/sup.c] Added hSysRes = 1 definition to resolve externals. Added CallLineDDAProc function (toolkit version). Added toy, and hi ineficient memmove until code in message.c get rewritten. * [objects/gdiobj.c] Ifdefed linux/emulator-dependent code to allow compilation of WineLib. * [misc/winsocket.c] Added ifdef to allow compilation under SunOS. * [misc/resource.c] When compiling the library, the resource file is expected to be in a file called $argv[0].Res. Also the information of the resource is expected to be at offset 0 of the .Res file. * [misc/main.c] Call WinMain with arguments if compiling WineLib. Call shutdown functions (Comm_DeInit, DOS_DeInitFS). Call sync_profiles to preserve changes to .INI files. * [misc/comm.c,dos_fs.c] removed call to atexit(Comm_DeInit) removed call to atexit(DOS_DeInitFS) Shutdown functions are now called from the return of WinMain * removed memorylib subdirectory * moved memory/atom.c to misc/atom.c moved memorylib/heap.c to toolkit/heap.c * [loader/wine.c] Moved DebugPrintString to windows/utility.c * [include/winsock.h] Define SO_DONTLINGER only if it has not been previously defined. * [include/windows.h] added definition for DLGPROC. added definition for LMEM_WINE_ALIGN and other LMEM_* constants. When compiling WineLib WNDPROC is defined with all the parameters to avoid compilation problems. * [include/user.h] When compiling WineLib USER_HEAP_(ALLOC|REALLOC|ADDR|FREE) the calls are translated to the library allocation routines. * [include/gdi.h,user.h] When compiling WineLib GDI_HEAP_(ALLOC|ADDR|FREE) the calls are translated to the library allocation routines. * [include/atom.h] Defined LocalAlign. When compiling the emulator it's translated as a call to LocalAlloc (the original code), when compiling WineLib as a call to LocalAlloc with a WINE-flag called LMEM_WINE_ALIGN (atom.c needs aligned data on a 4 byte boundary). * [misc/file.c] Renamed KERNEL_* functions and fixed prototypes. * [if1632/kernel.spec] Renamed KERNEL_* functions in order to be used by applications using Wine as a library (OpeFile, _lclose, _lread, _lcreate, _llseek, _lopen, _lwrite). * [Makefile] Create library instead of executable when building target libwine.a Tue Feb 8 13:52:11 1994 Miguel de Icaza (miguel@roxanne) * [Makefiles] Use $(CC) instead of cc. Added libwine target. * [include/prototypes] #ifdefed section for WineLib * moved loader/cursor.c to misc/cursor.c moved loader/resource.c to misc/resource.c moved misc/emulate.c to miscemu/emulate.c moved misc/int1a.c to miscemu/int1a.c moved misc/int21.c to miscemu/int21.c moved misc/kernel.c to miscemu/kernel.c moved misc/user.c to miscemu/user.c * [memorylib/heap.c] Heap management for WineLib * [misc/comm.c] Modified to allow compilation under SunOS (#include errno, SunOS doesn't have atexit ()). * [misc/dos_fs.c] Modified to allow compilation under SunOS (#include vfs.h) * [misc/file.c] Modified to allow compilation under SunOS (OPEN_MAX constant, #include unistd.h) * [objects/palette.c] Modified to allow compilation under SunOS (#include limits) * [toolkit/sup.c] WineLib version of CallWindowProc. * [windows/event.c] Typedef XPointer under X11R4 (OpenWindows). * [windows/win.c] When compiling WineLib, use direct callbacks instead of the windows supplied callbacks. Mon Feb 7 22:37:34 MET 1994 julliard@di.epfl.ch (Alexandre Julliard) * [loader/cursor.c] New function CURSOR_SetWinCursor(), for internal use, to set the cursor of a specific window more reliably than with SetCursor(). * [windows/nonclient.c] Better window management. Moving and resizing from the system menu should work now. Added scroll-bar mouse tracking. * [windows/win.c] Moved scroll-bar creation and destruction to defwnd.c. Feb 5, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte) * [windows/nonclient.c] Call to StdDrawMenuBar() during NC's drawing. New NC_TrackMouseMenuBar() function which call MenuButtonDown(), MenuButtonUp() & MenuMouseMove(). * [controls/menu.c] New ChangeMenu() function. Remove permanently old Xt menu code. Make common functions MenuButtonDown(), MenuButtonUp() & MenuMouseMove() for both popups & menubar. * [controls/combo.c] Paint OBM_COMBO directly in combo client. * [controls/listbox.c] Fix bug in multicolumns calculations. * [controls/Makefile] Remove rules for old file 'caption.c'. * [misc/kernel.c] Remove empty stub GetModuleFileName(). * [loader/library.c] New GetModuleHandle() function. New GetModuleUsage() function. New GetModuleFileName() function. * [loader/resource.c] Try to find the bug a missing menu loading ... Not found yet ! * [windows/win.c] Remove old menubar creation. Thu Feb 3 22:30:11 1994 Erik Bos (erik@trashcan.hacktic.nl) * [misc/winsocket.c] More functions added. * [if1632/winsock.spec] [misc/winsocket.c] Added John Brezak's winsock.dll stuff.
This commit is contained in:
parent
dba420a731
commit
fb9a919f8a
454
ChangeLog
454
ChangeLog
|
@ -1,3 +1,455 @@
|
|||
----------------------------------------------------------------------
|
||||
Tue Mar 1 11:30:21 1994 Bob Amstadt (bob@pooh)
|
||||
|
||||
* [Configure] [*/Imakefile]
|
||||
Created configure script to handle different types of Wine builds.
|
||||
|
||||
* [Configure] [tools/build.c] [if1632/Imakefile] [Wine.tmpl]
|
||||
Added ability to compile Wine on systems with 14-char filename limit.
|
||||
|
||||
* [if1632/relay.c] [include/options.h] [misc/main.c]
|
||||
Added -relaydbg option to command line if DEBUG_RELAY is defined.
|
||||
|
||||
* [loader/selector.c]
|
||||
Fixed bug in GetEntryDLLName() that caused Wine to seg fault.
|
||||
|
||||
* [memory/heap.c]
|
||||
Fixed LocalInit() to work correctly.
|
||||
|
||||
* [misc/user.c]
|
||||
Added code to call loaded DLLs' initialization routines.
|
||||
|
||||
Tue Mar 1 01:01:17 MET 1994 julliard@di.epfl.ch (Alexandre Julliard)
|
||||
|
||||
* [windows/dce.c]
|
||||
Added clipping of child windows by their parent's client area.
|
||||
|
||||
* [windows/nonclient.c]
|
||||
Bug fix in NC_DoNCPaint().
|
||||
|
||||
* [windows/painting.c]
|
||||
Bug fix in RedrawWindow().
|
||||
|
||||
Feb 27, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
|
||||
|
||||
* [mem/atom.c]
|
||||
Bug fix again in ATOM_DeleteAtom() :
|
||||
change LocalFree() by USER_HEAP_FREE().
|
||||
(Previous patch done Feb 13th had been lost)
|
||||
|
||||
* [controls/scroll.c]
|
||||
Move bitmaps loading in AllocScrollBar() instead of in WM_CREATE.
|
||||
|
||||
* [windows/class.c] (sorry Alex ...)
|
||||
There was no bug there "in RegisterClass() :
|
||||
WNDCLASS->lpszClassName was reset to NULL."
|
||||
^^^^^
|
||||
|
||||
* [misc/clipboard.c] --- New File ---
|
||||
New function EnumClipboardFormats().
|
||||
New function OpenClipboard().
|
||||
New function CloseClipboard().
|
||||
New function EmptyClipboard().
|
||||
New function GetClipboardOwner().
|
||||
New function GetClipboardViewer().
|
||||
New function CountClipboardFormats().
|
||||
New function IsClipboardFormatAvailable().
|
||||
New function OpenClipboard().
|
||||
New function GetClipboardData().
|
||||
New function SetClipboardViewer().
|
||||
New function EnumClipboardFormats().
|
||||
New function RegisterClipboardFormat().
|
||||
New function ChangeClipboardChain().
|
||||
New function SetClipboardData().
|
||||
New function GetOpenClipboardWindow().
|
||||
New function GetPriorityClipboardFormat().
|
||||
New function GetClipboardFormatName().
|
||||
|
||||
Tue Mar 1 20:15:45 1994 Erik Bos <erik@trashcan.hacktic.nl>
|
||||
|
||||
* [misc/comm.c]
|
||||
bugfix in OpenComm().
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Tue Feb 22 18:04:02 1994 Jeffrey Hsu <hsu@freefall.cdrom.com>
|
||||
|
||||
* [include/winsock.h]
|
||||
The sockproto struct is already defined in <sys/socket.h>
|
||||
|
||||
* [misc/winsock.c]
|
||||
Need to include <netinet/in.h> for struct in-addr.
|
||||
Use sys_errlist[] instead of strerror[].
|
||||
|
||||
*[toolkit/heap.c]
|
||||
ANSI C specifies that the malloc functions are defined in stdlib.h,
|
||||
so we don't need to include malloc.h.
|
||||
|
||||
*[loader/ldtlib.c]
|
||||
Print informative error message about probable cause of i386_set_ldt()
|
||||
failure and then exit.
|
||||
|
||||
*[Imakefile]
|
||||
For systems that don't use gmake by default, set the MAKE variable
|
||||
to gmake and propagate it on recursive makes.
|
||||
Take out -li386 for FreeBSD systems and define __FreeBSD__ so Wine
|
||||
can be built with the FreeBSD 1.0.2 compiler.
|
||||
|
||||
Tue Feb 22 02:52:19 EST 1994 jrichard@cs.uml.edu (John Richardson)
|
||||
|
||||
* [objects/bitblt.c]
|
||||
Added in three functions to do stretching and compression
|
||||
for WHITEONBLACK, BLACKONWHITE, and color copies.
|
||||
|
||||
Tue Feb 22 15:01:31 EST 1994 jrichard@cs.uml.edu (John Richardson)
|
||||
|
||||
* [windows/graphics.c]
|
||||
Added FloodFill and FloodFill_rec. FloodFill_rec is pretty
|
||||
inefficent, but should suffice for now.
|
||||
|
||||
* [include/windows.h]
|
||||
Changed the x,y paramaters for the FloodFill prototype
|
||||
from ints to shorts
|
||||
|
||||
Tue Feb 22 00:58:28 MET 1994 julliard@di.epfl.ch (Alexandre Julliard)
|
||||
|
||||
* [windows/widgets.c]
|
||||
Added desktop window class.
|
||||
|
||||
* [windows/painting.c]
|
||||
Bug fix in RedrawWindow().
|
||||
Implemented ExcludeUpdateRgn().
|
||||
|
||||
* [windows/win.c] [windows/winpos.c]
|
||||
Implemented desktop window.
|
||||
|
||||
* [controls/desktop.c]
|
||||
Preliminary desktop window procedure.
|
||||
|
||||
Feb 20, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
|
||||
|
||||
* [controls/menu.c]
|
||||
New function LoadMenuIndirect().
|
||||
New function GetMenuCheckMarkDimensions().
|
||||
|
||||
* [if1632/user.spec]
|
||||
Entry for DefDlgProc().
|
||||
|
||||
* [windows/class.c]
|
||||
Fix bug in RegisterClass() :
|
||||
WNDCLASS->lpszMenuName was reset to NULL.
|
||||
|
||||
* [windows/win.c]
|
||||
In CreateWindowEx(), if hMenu == 0 then use
|
||||
wndclass->lpszMenuName to load Menu from resource;
|
||||
|
||||
Mon Feb 21 22:38:28 1994 Erik Bos (erik@trashcan.hacktic.nl)
|
||||
|
||||
* [loader/library.c] [loader/wine.c]
|
||||
Fixed runing DLL's as main executable problem.
|
||||
|
||||
* [misc/dos_fs.c]
|
||||
Added wildcard support in DOS_readdir().
|
||||
|
||||
* [misc/winsocket.c]
|
||||
Added proper error handling of BSD winsocket functions.
|
||||
|
||||
* [miscemu/int21.c]
|
||||
KERNEL_DOS3Call renamed to DOS3Call and modified to use do_int21().
|
||||
|
||||
* [main/main.c]
|
||||
Added functions for GetVersion, GetWinFlags and GetTimerResolution
|
||||
for libwine.a, SystemParametersInfo() partly implemented.
|
||||
|
||||
Tue Feb 22 19:00:02 1994 Miguel de Icaza (miguel@xochitl.nuclecu.unam.mx)
|
||||
|
||||
* [toolkit/winmain.c]
|
||||
Added _WinMain function. Setups the library (calls USER_InitApp).
|
||||
|
||||
* [toolkit/sup.c]
|
||||
Added load_mz_header, load_ne_header, load_type_info and
|
||||
load_name_info functions.
|
||||
|
||||
* [toolkit/heap.c]
|
||||
Code cleanup.
|
||||
|
||||
* [misc/user.c]
|
||||
Moved from loader/misc.c. I hope to put back all the loader
|
||||
functions in the ~loader subdirectory in the future. CUrrently is
|
||||
needed since it has USER_InitApp.
|
||||
|
||||
* [misc/resource.c]
|
||||
Since WineLib will probably need DLLs (currently it needs
|
||||
Sysres.dll). WineLib will be using much code of the loader again.
|
||||
So I removed some ifdefs that were used by WineLib.
|
||||
|
||||
Added load_typeinfo and load_nameinfo (and the corresponding
|
||||
functions in [toolkit/sup.c]
|
||||
|
||||
Added integer convertion functions in the needed places.
|
||||
|
||||
Added very ugly patch (includes wine.c). In the next release I
|
||||
plan to move back all the loader routines to ~/loader. In the
|
||||
meantime I needed this patch. It doesn't affect any of the
|
||||
emulator code (its ifdefed for WineLib).
|
||||
|
||||
* [misc/main.c]
|
||||
Cleaned up call to WinMain (now uses [toolkit/winmain.c]
|
||||
Ifdefed argument number checking when compiling the library.
|
||||
|
||||
* [loader/wine.c]
|
||||
Modified to use load_(mz|ne)_header instead of doing a direct
|
||||
read. When compiling the emulator it still uses the direct read
|
||||
for performance.
|
||||
|
||||
* [include/wine.h]
|
||||
Prototypes for loading routines.
|
||||
|
||||
* [include/class.h]
|
||||
Added WINE_PACKED macro instead of __attribute__ ((packed))
|
||||
|
||||
* [include/arch.h]
|
||||
Macros for converting integers (Little endian to big-endian).
|
||||
Needed in the Sun to allow loading of DLL files.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Mon Feb 14 23:48:09 MET 1994 julliard@di.epfl.ch (Alexandre Julliard)
|
||||
|
||||
* [windows/clipping.c]
|
||||
Moved everything into windows/painting.c and removed this file.
|
||||
|
||||
* [windows/message.c]
|
||||
Removed calls to memmove() in MSG_RemoveMsg().
|
||||
|
||||
* [windows/nonclient.c]
|
||||
Added WM_GETMINMAXINFO support for window resizing.
|
||||
|
||||
* [windows/painting.c]
|
||||
Implemented RedrawWindow().
|
||||
|
||||
* [windows/scroll.c]
|
||||
Bug fix in ScrollWindowEx().
|
||||
|
||||
* [windows/win.c]
|
||||
Moved UpdateWindow() to windows/painting.c.
|
||||
|
||||
Fri Feb 11 12:41:28 1994 Erik Bos (erik@trashcan.hacktic.nl)
|
||||
|
||||
* [loader/wine.c] [misc/dos_fs.c]
|
||||
getenv() eq NULL bugfixes.
|
||||
|
||||
* [misc/comm.c]
|
||||
cfmakeraw changed for SunOS.
|
||||
|
||||
Feb 13, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
|
||||
|
||||
* [mem/atom.c]
|
||||
Bug fix in ATOM_DeleteAtom() :
|
||||
change LocalFree() by USER_HEAP_FREE().
|
||||
|
||||
* [misc/message.c]
|
||||
New function FatalAppExit().
|
||||
|
||||
* [objects/font.c]
|
||||
New empty stub SetMapperFlags().
|
||||
|
||||
* [controls/menu.c]
|
||||
Better CheckMark & other bitmaps placement.
|
||||
|
||||
* [windows/graphics.c]
|
||||
New function RoundRect() : calc.exe now working...
|
||||
|
||||
Tue Feb 15 14:29:37 1994 John Richardson
|
||||
|
||||
* [objects/bitblt.c]
|
||||
Fixed StretchBlt so it works quicker and faster. It still doesn't
|
||||
use the StretchMode bits for bitmap compression, but that will
|
||||
come soon.
|
||||
|
||||
Mon Feb 14 13:21:04 1994 Miguel de Icaza (miguel@roxanne.nuclecu.unam.mx)
|
||||
|
||||
* [include/windows.h,dialog.h,gdi.h]
|
||||
Changed __atribute__ ((packed)) for WINE_PACKED.
|
||||
When compiling the library this is defined as nothing. This gets
|
||||
rid with all the problems compiling under SunOS. Also
|
||||
|
||||
* [windows/utility.c]
|
||||
Added DebugPrintString.
|
||||
|
||||
* [toolkit/sup.c]
|
||||
Added hSysRes = 1 definition to resolve externals.
|
||||
Added CallLineDDAProc function (toolkit version).
|
||||
Added toy, and hi ineficient memmove until code in message.c get
|
||||
rewritten.
|
||||
|
||||
* [objects/gdiobj.c]
|
||||
Ifdefed linux/emulator-dependent code to allow compilation of
|
||||
WineLib.
|
||||
|
||||
* [misc/winsocket.c]
|
||||
Added ifdef to allow compilation under SunOS.
|
||||
|
||||
* [misc/resource.c]
|
||||
When compiling the library, the resource file is expected to be in
|
||||
a file called $argv[0].Res. Also the information of the resource
|
||||
is expected to be at offset 0 of the .Res file.
|
||||
|
||||
* [misc/main.c]
|
||||
Call WinMain with arguments if compiling WineLib.
|
||||
Call shutdown functions (Comm_DeInit, DOS_DeInitFS).
|
||||
Call sync_profiles to preserve changes to .INI files.
|
||||
|
||||
* [misc/comm.c,dos_fs.c]
|
||||
removed call to atexit(Comm_DeInit)
|
||||
removed call to atexit(DOS_DeInitFS)
|
||||
Shutdown functions are now called from the return of WinMain
|
||||
|
||||
* removed memorylib subdirectory
|
||||
|
||||
* moved memory/atom.c to misc/atom.c
|
||||
moved memorylib/heap.c to toolkit/heap.c
|
||||
|
||||
* [loader/wine.c]
|
||||
Moved DebugPrintString to windows/utility.c
|
||||
|
||||
* [include/winsock.h]
|
||||
Define SO_DONTLINGER only if it has not been previously defined.
|
||||
|
||||
* [include/windows.h]
|
||||
added definition for DLGPROC.
|
||||
added definition for LMEM_WINE_ALIGN and other LMEM_* constants.
|
||||
When compiling WineLib WNDPROC is defined with all the parameters
|
||||
to avoid compilation problems.
|
||||
|
||||
* [include/user.h]
|
||||
When compiling WineLib USER_HEAP_(ALLOC|REALLOC|ADDR|FREE) the
|
||||
calls are translated to the library allocation routines.
|
||||
|
||||
* [include/gdi.h,user.h]
|
||||
When compiling WineLib GDI_HEAP_(ALLOC|ADDR|FREE) the calls are
|
||||
translated to the library allocation routines.
|
||||
|
||||
* [include/atom.h]
|
||||
Defined LocalAlign. When compiling the emulator it's translated as
|
||||
a call to LocalAlloc (the original code), when compiling WineLib
|
||||
as a call to LocalAlloc with a WINE-flag called LMEM_WINE_ALIGN
|
||||
(atom.c needs aligned data on a 4 byte boundary).
|
||||
|
||||
* [misc/file.c]
|
||||
Renamed KERNEL_* functions and fixed prototypes.
|
||||
|
||||
* [if1632/kernel.spec]
|
||||
Renamed KERNEL_* functions in order to be used by applications
|
||||
using Wine as a library (OpeFile, _lclose, _lread, _lcreate,
|
||||
_llseek, _lopen, _lwrite).
|
||||
|
||||
* [Makefile]
|
||||
Create library instead of executable when building target
|
||||
libwine.a
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Tue Feb 8 13:52:11 1994 Miguel de Icaza (miguel@roxanne)
|
||||
|
||||
* [Makefiles]
|
||||
Use $(CC) instead of cc.
|
||||
Added libwine target.
|
||||
|
||||
* [include/prototypes]
|
||||
#ifdefed section for WineLib
|
||||
|
||||
* moved loader/cursor.c to misc/cursor.c
|
||||
moved loader/resource.c to misc/resource.c
|
||||
moved misc/emulate.c to miscemu/emulate.c
|
||||
moved misc/int1a.c to miscemu/int1a.c
|
||||
moved misc/int21.c to miscemu/int21.c
|
||||
moved misc/kernel.c to miscemu/kernel.c
|
||||
moved misc/user.c to miscemu/user.c
|
||||
|
||||
* [memorylib/heap.c]
|
||||
Heap management for WineLib
|
||||
|
||||
* [misc/comm.c]
|
||||
Modified to allow compilation under SunOS (#include errno, SunOS
|
||||
doesn't have atexit ()).
|
||||
|
||||
* [misc/dos_fs.c]
|
||||
Modified to allow compilation under SunOS (#include vfs.h)
|
||||
|
||||
* [misc/file.c]
|
||||
Modified to allow compilation under SunOS (OPEN_MAX constant,
|
||||
#include unistd.h)
|
||||
|
||||
* [objects/palette.c]
|
||||
Modified to allow compilation under SunOS (#include limits)
|
||||
|
||||
* [toolkit/sup.c]
|
||||
WineLib version of CallWindowProc.
|
||||
|
||||
* [windows/event.c]
|
||||
Typedef XPointer under X11R4 (OpenWindows).
|
||||
|
||||
* [windows/win.c]
|
||||
When compiling WineLib, use direct callbacks instead of the
|
||||
windows supplied callbacks.
|
||||
|
||||
Mon Feb 7 22:37:34 MET 1994 julliard@di.epfl.ch (Alexandre Julliard)
|
||||
|
||||
* [loader/cursor.c]
|
||||
New function CURSOR_SetWinCursor(), for internal use, to set
|
||||
the cursor of a specific window more reliably than with SetCursor().
|
||||
|
||||
* [windows/nonclient.c]
|
||||
Better window management. Moving and resizing from the system
|
||||
menu should work now.
|
||||
Added scroll-bar mouse tracking.
|
||||
|
||||
* [windows/win.c]
|
||||
Moved scroll-bar creation and destruction to defwnd.c.
|
||||
|
||||
Feb 5, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
|
||||
|
||||
* [windows/nonclient.c]
|
||||
Call to StdDrawMenuBar() during NC's drawing.
|
||||
New NC_TrackMouseMenuBar() function which call
|
||||
MenuButtonDown(), MenuButtonUp() & MenuMouseMove().
|
||||
|
||||
* [controls/menu.c]
|
||||
New ChangeMenu() function.
|
||||
Remove permanently old Xt menu code.
|
||||
Make common functions MenuButtonDown(), MenuButtonUp()
|
||||
& MenuMouseMove() for both popups & menubar.
|
||||
|
||||
* [controls/combo.c]
|
||||
Paint OBM_COMBO directly in combo client.
|
||||
|
||||
* [controls/listbox.c]
|
||||
Fix bug in multicolumns calculations.
|
||||
|
||||
* [controls/Makefile]
|
||||
Remove rules for old file 'caption.c'.
|
||||
|
||||
* [misc/kernel.c]
|
||||
Remove empty stub GetModuleFileName().
|
||||
|
||||
* [loader/library.c]
|
||||
New GetModuleHandle() function.
|
||||
New GetModuleUsage() function.
|
||||
New GetModuleFileName() function.
|
||||
|
||||
* [loader/resource.c]
|
||||
Try to find the bug a missing menu loading ... Not found yet !
|
||||
|
||||
* [windows/win.c]
|
||||
Remove old menubar creation.
|
||||
|
||||
Thu Feb 3 22:30:11 1994 Erik Bos (erik@trashcan.hacktic.nl)
|
||||
|
||||
* [misc/winsocket.c]
|
||||
More functions added.
|
||||
|
||||
* [if1632/winsock.spec] [misc/winsocket.c]
|
||||
Added John Brezak's winsock.dll stuff.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Tue Feb 1 21:14:47 1994 Bob Amstadt (bob@pooh)
|
||||
|
||||
* [loader/selector.c]
|
||||
|
@ -58,7 +510,7 @@ Jan 31, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
|
|||
New GetSubMenu() function.
|
||||
Move GetMenu() & SetMenu() functions from 'windows/win.c'.
|
||||
|
||||
* [controls/combo.c]
|
||||
* [controls/listbox.c]
|
||||
Start changes to satisfy recent changes in scrollbars/windows.
|
||||
|
||||
* [loader/resource.c]
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
#! /bin/sh
|
||||
|
||||
ALLDEFINES=''
|
||||
|
||||
echo -n 'Build Wine as emulator or library (E/L) [E]? '
|
||||
read input
|
||||
if [ "$input" = 'l' -o "$input" = 'L' ]
|
||||
then
|
||||
WINELIB='#define WineLib -DWINELIB'
|
||||
ALLDEFINES=$ALLDEFINES -DWINELIB
|
||||
else
|
||||
WINELIB=''
|
||||
fi
|
||||
|
||||
echo -n 'Short filenames (Y/N) [N]? '
|
||||
read input
|
||||
if [ "$input" = 'y' -o "$input" = 'Y' ]
|
||||
then
|
||||
SHORTNAMES='#define ShortNames -DSHORTNAMES'
|
||||
ALLDEFINES=$ALLDEFINES -DSHORTNAMES
|
||||
else
|
||||
SHORTNAMES=''
|
||||
fi
|
||||
|
||||
echo '/* autoconf.h generated automatically. Run Configure. */' > autoconf.h
|
||||
echo $WINELIB >> autoconf.h
|
||||
echo $SHORTNAMES >> autoconf.h
|
||||
echo "#define AutoDefines $ALLDEFINES" >> autoconf.h
|
||||
|
||||
xmkmf -a
|
88
Imakefile
88
Imakefile
|
@ -1,5 +1,13 @@
|
|||
#include "autoconf.h"
|
||||
#include "Wine.tmpl"
|
||||
|
||||
#if defined(i386FreeBsd)
|
||||
MAKE = gmake
|
||||
CC = gcc -D__FreeBSD__
|
||||
#endif
|
||||
|
||||
DEFINES = AutoDefines -DUSE_READLINE -DWINESTAT
|
||||
|
||||
/*
|
||||
* This is the second try at using Imakefiles. There are probably many
|
||||
* problems and things I haven't even considered. I do not have a fixed
|
||||
|
@ -12,66 +20,76 @@
|
|||
*/
|
||||
|
||||
#define IHaveSubdirs
|
||||
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)' 'CC=$(CC)'
|
||||
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)' 'CC=$(CC)' 'MAKE=$(MAKE)'\
|
||||
'DEFINES=$(DEFINES)'
|
||||
|
||||
SUBDIRS = \
|
||||
tools \
|
||||
COMMONSUBDIRS = \
|
||||
controls \
|
||||
etc \
|
||||
if1632 \
|
||||
include \
|
||||
loader \
|
||||
memory \
|
||||
misc \
|
||||
objects \
|
||||
test \
|
||||
windows
|
||||
|
||||
/*
|
||||
* due to me not having the time and resources to test this, debugging
|
||||
* has been left out by for now of the Imakefiles. To put it back you have
|
||||
* to add:
|
||||
* debugger
|
||||
* to the SUBDIRS list and:
|
||||
* debugger
|
||||
* readline.o
|
||||
* to the OBJS list.
|
||||
*
|
||||
* Not doing this will make the build fail in loader/signal.c, with an
|
||||
* unresolved reference to wine_debug. Comment out the line for now...
|
||||
* sigh. Fixed soon.
|
||||
*/
|
||||
EMUSUBDIRS = \
|
||||
tools \
|
||||
debugger \
|
||||
if1632 \
|
||||
loader \
|
||||
memory \
|
||||
miscemu
|
||||
|
||||
LIBSUBDIRS = \
|
||||
toolkit
|
||||
|
||||
WINEDIR = $(LIBDIR)/wine
|
||||
|
||||
OBJS = \
|
||||
if1632.o \
|
||||
COMMONOBJS = \
|
||||
controls.o \
|
||||
loader.o \
|
||||
memory.o \
|
||||
misc.o \
|
||||
objects.o \
|
||||
windows.o
|
||||
|
||||
#ifdef i386BsdArchitecture
|
||||
SYSLIBS = -ll -lm -li386 -lgnumalloc
|
||||
/*
|
||||
* WARNING: if1632.o must be the first object file because its code must be
|
||||
* linked at the lowest possible addresses.
|
||||
*/
|
||||
EMUOBJS = \
|
||||
if1632.o \
|
||||
debugger.o \
|
||||
loader.o \
|
||||
memory.o \
|
||||
miscemu.o \
|
||||
readline.o
|
||||
|
||||
LIBOBJS = \
|
||||
toolkit.o
|
||||
|
||||
#ifndef WINELIB
|
||||
SUBDIRS = $(COMMONSUBDIRS) $(EMUSUBDIRS)
|
||||
OBJS = $(COMMONOBJS) $(EMUOBJS)
|
||||
#else
|
||||
#ifdef LinuxArchitecture
|
||||
SYSLIBS = -lm
|
||||
SUBDIRS = $(COMMONSUBDIRS) $(LIBSUBDIRS)
|
||||
OBJS = $(COMMONOBJS) $(LIBOBJS)
|
||||
#endif
|
||||
|
||||
#if defined(i386BsdArchitecture)
|
||||
SYSLIBS = -ll -lm -li386 -lgnumalloc
|
||||
#elif defined(i386FreeBsd)
|
||||
SYSLIBS = -ll -lm -lgnumalloc
|
||||
#elif defined(LinuxArchitecture)
|
||||
SYSLIBS = -lm -lg
|
||||
#endif
|
||||
|
||||
MakeSubdirs($(SUBDIRS))
|
||||
DependSubdirs($(SUBDIRS))
|
||||
|
||||
#ifdef i386BsdArchitecture
|
||||
AllTarget(wine)
|
||||
#endif
|
||||
|
||||
NormalProgramTarget(wine,$(OBJS),XawClientDepLibs,XawClientLibs,$(SYSLIBS))
|
||||
|
||||
#ifdef LinuxArchitecture
|
||||
AllTarget(wine)
|
||||
#ifndef WINELIB
|
||||
NormalProgramTarget(wine,$(EMUOBJS) $(COMMONOBJS),$(DEPXLIB),$(XLIB),$(SYSLIBS))
|
||||
#else
|
||||
NormalLibraryTarget(wine,$(LIBOBJS) $(COMMONOBJS))
|
||||
#endif
|
||||
|
||||
depend::
|
||||
|
|
43
Makefile
43
Makefile
|
@ -1,43 +0,0 @@
|
|||
######################################################################
|
||||
# These variables are inherited by the sub-makefiles
|
||||
DEBUGOPTS=
|
||||
COPTS=-O2 -m486
|
||||
INCLUDE_DIR=include
|
||||
LDFLAGS=
|
||||
|
||||
######################################################################
|
||||
# These definitions are for the top level
|
||||
TARGET=wine
|
||||
LIBS=-L/usr/X386/lib -lX11 -lm
|
||||
OBJS=if1632/if1632.o controls/controls.o loader/loader.o \
|
||||
memory/memory.o misc/misc.o objects/objects.o windows/windows.o debugger/debugger.o
|
||||
SUBDIRS=if1632 controls loader memory misc objects windows debugger
|
||||
TAGFILES=if1632/{*.c,*.S} controls/{*.c,*.S} loader/{*.c,*.S} \
|
||||
memory/{*.c,*.S} misc/{*.c,*.S} objects/{*.c,*.S} \
|
||||
windows/{*.c,*.S} debugger/{*.c,*.S}
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
dummy:
|
||||
|
||||
tags:
|
||||
etags $(TAGFILES)
|
||||
|
||||
clean:
|
||||
rm -f *~ *.o *#
|
||||
@for i in tools $(SUBDIRS); do (cd $$i && $(MAKE) clean) || exit; done
|
||||
|
||||
patchclean:
|
||||
rm -f `find . -name '*.orig' -o -name '*.rej'`
|
||||
|
||||
$(TARGET): dummy
|
||||
@for i in tools $(SUBDIRS); \
|
||||
do (cd $$i && echo $$i && $(MAKE) INCLUDE_DIR=../$(INCLUDE_DIR) \
|
||||
COPTS="$(COPTS)" DEBUGOPTS="$(DEBUGOPTS)") || exit; done
|
||||
$(CC) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LIBS)
|
||||
|
||||
depend:
|
||||
@for i in tools $(SUBDIRS); \
|
||||
do (cd $$i && echo $$i && \
|
||||
$(MAKE) INCLUDE_DIR=../$(INCLUDE_DIR) COPTS="$(COPTS)" depend) \
|
||||
|| exit; done
|
44
README
44
README
|
@ -4,23 +4,16 @@ LICENSE unless explicitly stated in the individual source file.
|
|||
|
||||
INSTALLATION:
|
||||
|
||||
Linux:
|
||||
You must have one of:
|
||||
|
||||
Uncompress and untar this archive into the directory of your
|
||||
choice. This release requires a Linux version 0.99 pl13 kernel
|
||||
or above.
|
||||
Linux version 0.99.13 or above
|
||||
NetBSD-current
|
||||
FreeBSD-current or FreeBSD 1.1
|
||||
|
||||
NetBSD:
|
||||
|
||||
If you use BSD make rather than GNU make, you must apply the patches
|
||||
in the file "bsdmake.patch". This release requires NetBSD-current.
|
||||
|
||||
All:
|
||||
|
||||
To build Wine, first do a "make depend" and then a "make". The
|
||||
To build Wine, first do a "./Configure" and then a "make". The
|
||||
executable "wine" will be built. "wine" will load and run Windows'
|
||||
executables. You must have a file "wine.ini" in the current directory,
|
||||
your homedirectory, or in the path specified by the environment
|
||||
your home directory, or in the path specified by the environment
|
||||
variable WINEPATH. Multiple directories in WINEPATH should be seperated
|
||||
by semi-colons and NOT by colons!
|
||||
|
||||
|
@ -41,6 +34,31 @@ For example: to run Windows' solitaire:
|
|||
Have a nice game of solitaire, but be careful. Emulation isn't perfect.
|
||||
So, occassionally it will crash.
|
||||
|
||||
WHAT'S NEW with Wine-940301: (see ChangeLog for details)
|
||||
- NEW Configure script to set compile time options!
|
||||
- Support for filesystems with short (less than 14 chars) filenames.
|
||||
- Clipboard functions!
|
||||
- and more...
|
||||
|
||||
WHAT'S NEW with Wine-940223: (see ChangeLog for details)
|
||||
- FreeBSD support
|
||||
- FloodFill()
|
||||
- Desktop window support
|
||||
- Menu fixes
|
||||
- and more...
|
||||
|
||||
WHAT'S NEW with Wine-940216: (see ChangeLog for details)
|
||||
- Many many bug fixes
|
||||
- Switched to using Imakefile's instead of Makefile's.
|
||||
- Lot's of changes for libwine.a
|
||||
|
||||
WHAT'S NEW with Wine-940209: (see ChangeLog for details)
|
||||
- Many many bug fixes
|
||||
- Minor directory structure reorganization
|
||||
- New GetModule*() functions.
|
||||
- WINSOCK DLL
|
||||
- First stab at Wine as a library
|
||||
|
||||
WHAT'S NEW with Wine-940201: (see ChangeLog for details)
|
||||
- Support for huge data structures.
|
||||
- FreeBSD support.
|
||||
|
|
11
Wine.tmpl
11
Wine.tmpl
|
@ -6,13 +6,22 @@ XCOMM Imake rules go here
|
|||
|
||||
XCOMM First, dll description to files etc
|
||||
#ifndef MakeDllFromSpec
|
||||
#ifndef ShortNames
|
||||
#define MakeDllFromSpec(name,objfile) @@\
|
||||
objfile.o: Concat(dll_,name.o) Concat3(dll_,name,_tab.o) @@\
|
||||
@@\
|
||||
Concat(dll_,name.S) Concat3(dll_,name,_tab.c): name.spec $(TOP)/tools/build @@\
|
||||
$(TOP)/tools/build name.spec @@\
|
||||
|
||||
#endif
|
||||
#else
|
||||
#define MakeDllFromSpec(name,objfile) @@\
|
||||
objfile.o: Concat(dll_,name.o) Concat(dtb_,name.o) @@\
|
||||
@@\
|
||||
Concat(dll_,name.S) Concat(dtb_,name.c): name.spec $(TOP)/tools/build @@\
|
||||
$(TOP)/tools/build name.spec @@\
|
||||
|
||||
#endif /* SHORTNAMES */
|
||||
#endif /* MakeDllFromSpec */
|
||||
|
||||
/*
|
||||
* WineRelocatableTarget - generate rules to produce a relocatable object
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
/* autoconf.h generated automatically. Run Configure. */
|
||||
#error You must run Configure before you can build the makefiles.
|
140
bsdmake.patch
140
bsdmake.patch
|
@ -1,140 +0,0 @@
|
|||
*** Makefile.orig Tue Jan 18 12:36:47 1994
|
||||
--- Makefile Mon Jan 24 22:34:06 1994
|
||||
***************
|
||||
*** 8,14 ****
|
||||
######################################################################
|
||||
# These definitions are for the top level
|
||||
TARGET=wine
|
||||
! LIBS=-L/usr/X386/lib -lX11 -lm
|
||||
OBJS=if1632/if1632.o controls/controls.o loader/loader.o \
|
||||
memory/memory.o misc/misc.o objects/objects.o windows/windows.o debugger/debugger.o
|
||||
SUBDIRS=if1632 controls loader memory misc objects windows debugger
|
||||
--- 8,14 ----
|
||||
######################################################################
|
||||
# These definitions are for the top level
|
||||
TARGET=wine
|
||||
! LIBS=-L/usr/X386/lib -lX11 -lm -li386 -lgnumalloc -ll
|
||||
OBJS=if1632/if1632.o controls/controls.o loader/loader.o \
|
||||
memory/memory.o misc/misc.o objects/objects.o windows/windows.o debugger/debugger.o
|
||||
SUBDIRS=if1632 controls loader memory misc objects windows debugger
|
||||
diff -ruN ../Backup//controls/Makefile ./controls/Makefile
|
||||
--- ../Backup//controls/Makefile Sat Sep 11 22:13:44 1993
|
||||
+++ ./controls/Makefile Thu Sep 16 10:00:24 1993
|
||||
@@ -14,6 +14,7 @@
|
||||
depend:
|
||||
$(CC) $(CFLAGS) -M *.c > .depend
|
||||
|
||||
-ifeq (.depend,$(wildcard .depend))
|
||||
-include .depend
|
||||
-endif
|
||||
+.if exists(.depend)
|
||||
+.include ".depend"
|
||||
+.endif
|
||||
+
|
||||
diff -ruN ../Backup//if1632/Makefile ./if1632/Makefile
|
||||
--- ../Backup//if1632/Makefile Tue Sep 14 08:56:17 1993
|
||||
+++ ./if1632/Makefile Thu Sep 16 10:00:24 1993
|
||||
@@ -45,9 +45,9 @@
|
||||
depend:
|
||||
$(CC) $(CFLAGS) -M *.c > .depend
|
||||
|
||||
-ifeq (.depend,$(wildcard .depend))
|
||||
-include .depend
|
||||
-endif
|
||||
+.if exists(.depend)
|
||||
+.include ".depend"
|
||||
+.endif
|
||||
|
||||
|
||||
|
||||
diff -ruN ../Backup//loader/Makefile ./loader/Makefile
|
||||
--- ../Backup//loader/Makefile Sat Sep 11 21:42:05 1993
|
||||
+++ ./loader/Makefile Thu Sep 16 10:00:24 1993
|
||||
@@ -13,6 +13,6 @@
|
||||
depend:
|
||||
$(CC) $(CFLAGS) -M *.c > .depend
|
||||
|
||||
-ifeq (.depend,$(wildcard .depend))
|
||||
-include .depend
|
||||
-endif
|
||||
+.if exists(.depend)
|
||||
+.include ".depend"
|
||||
+.endif
|
||||
diff -ruN ../Backup//memory/Makefile ./memory/Makefile
|
||||
--- ../Backup//memory/Makefile Sat Sep 11 21:42:05 1993
|
||||
+++ ./memory/Makefile Thu Sep 16 10:00:24 1993
|
||||
@@ -13,6 +13,6 @@
|
||||
depend:
|
||||
$(CC) $(CFLAGS) -M *.c > .depend
|
||||
|
||||
-ifeq (.depend,$(wildcard .depend))
|
||||
-include .depend
|
||||
-endif
|
||||
+.if exists(.depend)
|
||||
+.include ".depend"
|
||||
+.endif
|
||||
diff -ruN ../Backup//misc/Makefile ./misc/Makefile
|
||||
--- ../Backup//misc/Makefile Tue Sep 14 09:17:00 1993
|
||||
+++ ./misc/Makefile Thu Sep 16 10:00:24 1993
|
||||
@@ -14,6 +14,6 @@
|
||||
depend:
|
||||
$(CC) $(CFLAGS) -M *.c > .depend
|
||||
|
||||
-ifeq (.depend,$(wildcard .depend))
|
||||
-include .depend
|
||||
-endif
|
||||
+.if exists(.depend)
|
||||
+.include ".depend"
|
||||
+.endif
|
||||
diff -ruN ../Backup//objects/Makefile ./objects/Makefile
|
||||
--- ../Backup//objects/Makefile Tue Sep 14 13:59:04 1993
|
||||
+++ ./objects/Makefile Thu Sep 16 10:00:24 1993
|
||||
@@ -14,6 +14,6 @@
|
||||
depend:
|
||||
$(CC) $(CFLAGS) -M *.c > .depend
|
||||
|
||||
-ifeq (.depend,$(wildcard .depend))
|
||||
-include .depend
|
||||
-endif
|
||||
+.if exists(.depend)
|
||||
+.include ".depend"
|
||||
+.endif
|
||||
diff -ruN ../Backup//tools/Makefile ./tools/Makefile
|
||||
--- ../Backup//tools/Makefile Tue Sep 14 09:46:40 1993
|
||||
+++ ./tools/Makefile Thu Sep 16 10:00:24 1993
|
||||
@@ -14,6 +14,10 @@
|
||||
#
|
||||
# Dependency lists
|
||||
#
|
||||
-ifeq (.depend,$(wildcard .depend))
|
||||
-include .depend
|
||||
-endif
|
||||
+.if exists(.depend)
|
||||
+.include ".depend"
|
||||
+.endif
|
||||
+
|
||||
+#ifeq (.depend,$(wildcard .depend))
|
||||
+#include .depend
|
||||
+#endif
|
||||
diff -ruN ../Backup//windows/Makefile ./windows/Makefile
|
||||
--- ../Backup//windows/Makefile Tue Sep 14 08:39:45 1993
|
||||
+++ ./windows/Makefile Thu Sep 16 10:00:24 1993
|
||||
@@ -14,6 +14,6 @@
|
||||
depend:
|
||||
$(CC) $(CFLAGS) -M *.c > .depend
|
||||
|
||||
-ifeq (.depend,$(wildcard .depend))
|
||||
-include .depend
|
||||
-endif
|
||||
+.if exists(.depend)
|
||||
+.include ".depend"
|
||||
+.endif
|
||||
--- debugger/Makefile.orig Thu Sep 30 07:29:39 1993
|
||||
+++ debugger/Makefile Thu Sep 30 07:27:00 1993
|
||||
@@ -37,3 +37,6 @@
|
||||
depend: dbg.tab.c dbg.tab.h lex.yy.c
|
||||
$(CC) $(CFLAGS) -M *.c > .depend
|
||||
|
||||
+.if exists(.depend)
|
||||
+.include ".depend"
|
||||
+.endif
|
|
@ -4,23 +4,15 @@ MODULE = controls
|
|||
|
||||
SRCS = \
|
||||
button.c \
|
||||
caption.c \
|
||||
combo.c \
|
||||
listbox.c \
|
||||
menu.c \
|
||||
scroll.c \
|
||||
static.c \
|
||||
desktop.c \
|
||||
widgets.c
|
||||
|
||||
OBJS = \
|
||||
button.o \
|
||||
caption.o \
|
||||
combo.o \
|
||||
listbox.o \
|
||||
menu.o \
|
||||
scroll.o \
|
||||
static.o \
|
||||
widgets.o
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
|
||||
WineRelocatableTarget($(TOP)/$(MODULE),,$(OBJS))
|
||||
DependTarget()
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
CFLAGS=$(COPTS) $(DEBUGOPTS) -I$(INCLUDE_DIR)
|
||||
|
||||
OBJS = menu.o caption.o widgets.o button.o \
|
||||
scroll.o listbox.o combo.o static.o
|
||||
|
||||
default: controls.o
|
||||
|
||||
controls.o: $(OBJS)
|
||||
$(LD) -r -o controls.o $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -f *.o *~ *.s dll_* *.a *#
|
||||
|
||||
depend:
|
||||
$(CC) $(CFLAGS) -M *.c > .depend
|
||||
|
||||
ifeq (.depend,$(wildcard .depend))
|
||||
include .depend
|
||||
endif
|
|
@ -1,296 +0,0 @@
|
|||
/*
|
||||
* Interface code to CAPTION widget
|
||||
*
|
||||
* Copyright Martin Ayotte, 1994
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
#define DEBUG_CAPTION
|
||||
*/
|
||||
|
||||
static char Copyright[] = "Copyright Martin Ayotte, 1994";
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <X11/StringDefs.h>
|
||||
#include "windows.h"
|
||||
#include "caption.h"
|
||||
#include "heap.h"
|
||||
#include "win.h"
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
HBITMAP hStdClose = (HBITMAP)NULL;
|
||||
HBITMAP hStdCloseD = (HBITMAP)NULL;
|
||||
HBITMAP hStdMinim = (HBITMAP)NULL;
|
||||
HBITMAP hStdMinimD = (HBITMAP)NULL;
|
||||
HBITMAP hStdMaxim = (HBITMAP)NULL;
|
||||
HBITMAP hStdMaximD = (HBITMAP)NULL;
|
||||
HMENU hStdSysMenu = (HMENU)NULL;
|
||||
|
||||
LPHEADCAPTION CaptionBarGetWindowAndStorage(HWND hWnd, WND **wndPtr);
|
||||
LPHEADCAPTION CaptionBarGetStorageHeader(HWND hWnd);
|
||||
void SetMenuLogicalParent(HMENU hMenu, HWND hWnd);
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* CaptionBarWndProc
|
||||
*/
|
||||
LONG CaptionBarWndProc( HWND hWnd, WORD message, WORD wParam, LONG lParam )
|
||||
{
|
||||
WORD wRet;
|
||||
short x, y;
|
||||
short width, height;
|
||||
WND *wndPtr;
|
||||
LPHEADCAPTION lphs;
|
||||
PAINTSTRUCT ps;
|
||||
HDC hDC;
|
||||
HDC hMemDC;
|
||||
BITMAP bm;
|
||||
RECT rect;
|
||||
char str[128];
|
||||
switch(message)
|
||||
{
|
||||
case WM_CREATE:
|
||||
wndPtr = WIN_FindWndPtr(hWnd);
|
||||
lphs = (LPHEADCAPTION)malloc(sizeof(HEADCAPTION));
|
||||
if (lphs == 0) {
|
||||
printf("Bad Memory Alloc on CAPTIONBAR !\n");
|
||||
return 0;
|
||||
}
|
||||
memset(lphs, 0, sizeof(HEADCAPTION));
|
||||
#ifdef DEBUG_CAPTION
|
||||
printf("CreateCaptionBarStruct %lX !\n", lphs);
|
||||
#endif
|
||||
*((LPHEADCAPTION *)&wndPtr->wExtra[1]) = lphs;
|
||||
if (hStdClose == (HBITMAP)NULL)
|
||||
hStdClose = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_CLOSE));
|
||||
lphs->hClose = hStdClose;
|
||||
if (hStdMinim == (HBITMAP)NULL)
|
||||
hStdMinim = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_REDUCE));
|
||||
lphs->hMinim = hStdMinim;
|
||||
if (hStdMaxim == (HBITMAP)NULL)
|
||||
hStdMaxim = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_RESTORE));
|
||||
lphs->hMaxim = hStdMaxim;
|
||||
if (hStdCloseD == (HBITMAP)NULL)
|
||||
hStdCloseD = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_CLOSE));
|
||||
if (hStdMinimD == (HBITMAP)NULL)
|
||||
hStdMinimD = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_REDUCED));
|
||||
if (hStdMaximD == (HBITMAP)NULL)
|
||||
hStdMaximD = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_RESTORED));
|
||||
if (hStdSysMenu == (HBITMAP)NULL)
|
||||
hStdSysMenu = LoadMenu((HINSTANCE)NULL, "SYSMENU");
|
||||
lphs->hSysMenu = hStdSysMenu;
|
||||
printf("CaptionBar SYSMENU %04X !\n", lphs->hSysMenu);
|
||||
if (lphs->hSysMenu == 0) lphs->hSysMenu = CreatePopupMenu();
|
||||
AppendMenu(lphs->hSysMenu, MF_STRING, 9999, "About &Wine ...");
|
||||
GetClientRect(hWnd, &rect);
|
||||
CopyRect(&lphs->rectClose, &rect);
|
||||
CopyRect(&lphs->rectMaxim, &rect);
|
||||
lphs->rectClose.right = lphs->rectClose.left +
|
||||
lphs->rectClose.bottom + lphs->rectClose.top;
|
||||
lphs->rectMaxim.left = lphs->rectMaxim.right -
|
||||
lphs->rectMaxim.bottom + lphs->rectMaxim.top;
|
||||
CopyRect(&lphs->rectMinim, &lphs->rectMaxim);
|
||||
if (lphs->hMaxim != 0) {
|
||||
lphs->rectMinim.left = lphs->rectMaxim.bottom + lphs->rectMaxim.top;
|
||||
lphs->rectMinim.right = lphs->rectMaxim.bottom + lphs->rectMaxim.top;
|
||||
}
|
||||
if (lphs->hClose == 0) lphs->rectClose.right = lphs->rectClose.left;
|
||||
printf("CAPTION Close.right=%d Maxim.left=%d Minim.left=%d !\n",
|
||||
lphs->rectClose.right, lphs->rectMaxim.left, lphs->rectMinim.left);
|
||||
return 0;
|
||||
case WM_DESTROY:
|
||||
lphs = CaptionBarGetWindowAndStorage(hWnd, &wndPtr);
|
||||
if (lphs == 0) return 0;
|
||||
#ifdef DEBUG_CAPTION
|
||||
printf("CaptionBar WM_DESTROY %lX !\n", lphs);
|
||||
#endif
|
||||
DestroyMenu(lphs->hSysMenu);
|
||||
free(lphs);
|
||||
*((LPHEADCAPTION *)&wndPtr->wExtra[1]) = 0;
|
||||
return 0;
|
||||
case WM_COMMAND:
|
||||
#ifdef DEBUG_CAPTION
|
||||
printf("CaptionBar WM_COMMAND %04X %08X !\n", wParam, lParam);
|
||||
#endif
|
||||
lphs = CaptionBarGetWindowAndStorage(hWnd, &wndPtr);
|
||||
if (wParam == 9999) {
|
||||
printf("CaptionBar Show 'About Wine ...' !\n");
|
||||
}
|
||||
SendMessage(wndPtr->hwndParent, message, wParam, lParam);
|
||||
break;
|
||||
case WM_SIZE:
|
||||
lphs = CaptionBarGetWindowAndStorage(hWnd, &wndPtr);
|
||||
width = LOWORD(lParam);
|
||||
height = HIWORD(lParam);
|
||||
if (lphs->hClose != 0)
|
||||
SetRect(&lphs->rectClose, 0, 0, height, height);
|
||||
if (lphs->hMinim != 0) {
|
||||
if (lphs->hMaxim != 0)
|
||||
SetRect(&lphs->rectMinim, width - 2 * height, 0,
|
||||
width - height, height);
|
||||
else
|
||||
SetRect(&lphs->rectMinim, width - height, 0, width, height);
|
||||
}
|
||||
if (lphs->hMaxim != 0)
|
||||
SetRect(&lphs->rectMaxim, width - height, 0, width, height);
|
||||
break;
|
||||
case WM_LBUTTONDOWN:
|
||||
lphs = CaptionBarGetWindowAndStorage(hWnd, &wndPtr);
|
||||
SetCapture(hWnd);
|
||||
x = LOWORD(lParam);
|
||||
y = HIWORD(lParam);
|
||||
hDC = GetDC(hWnd);
|
||||
if (x > lphs->rectClose.left && x < lphs->rectClose.right) {
|
||||
lphs->hClose = hStdCloseD;
|
||||
InvalidateRect(hWnd, &lphs->rectClose, TRUE);
|
||||
UpdateWindow(hWnd);
|
||||
}
|
||||
if (x > lphs->rectMinim.left && x < lphs->rectMinim.right) {
|
||||
lphs->hMinim = hStdMinimD;
|
||||
InvalidateRect(hWnd, &lphs->rectMinim, TRUE);
|
||||
UpdateWindow(hWnd);
|
||||
}
|
||||
if (x > lphs->rectMaxim.left && x < lphs->rectMaxim.right &&
|
||||
lphs->hMaxim != 0) {
|
||||
lphs->hMaxim = hStdMaximD;
|
||||
InvalidateRect(hWnd, &lphs->rectMaxim, TRUE);
|
||||
UpdateWindow(hWnd);
|
||||
}
|
||||
ReleaseDC(hWnd, hDC);
|
||||
break;
|
||||
case WM_LBUTTONUP:
|
||||
lphs = CaptionBarGetWindowAndStorage(hWnd, &wndPtr);
|
||||
ReleaseCapture();
|
||||
#ifdef DEBUG_CAPTION
|
||||
printf("CaptionBar WM_LBUTTONUP %lX !\n", lParam);
|
||||
#endif
|
||||
x = LOWORD(lParam);
|
||||
y = HIWORD(lParam);
|
||||
if (x > lphs->rectClose.left && x < lphs->rectClose.right) {
|
||||
lphs->hClose = hStdClose;
|
||||
InvalidateRect(hWnd, &lphs->rectClose, TRUE);
|
||||
UpdateWindow(hWnd);
|
||||
TrackPopupMenu(lphs->hSysMenu, TPM_LEFTBUTTON, 0, -20,
|
||||
0, wndPtr->hwndParent, (LPRECT)NULL);
|
||||
SetMenuLogicalParent(lphs->hSysMenu, hWnd);
|
||||
printf("CAPTION Pop the SYSMENU !\n");
|
||||
break;
|
||||
}
|
||||
if (x > lphs->rectMinim.left && x < lphs->rectMinim.right) {
|
||||
SendMessage(wndPtr->hwndParent, WM_SYSCOMMAND, SC_MINIMIZE, 0L);
|
||||
lphs->hMinim = hStdMinim;
|
||||
InvalidateRect(hWnd, &lphs->rectMinim, TRUE);
|
||||
UpdateWindow(hWnd);
|
||||
printf("CAPTION Minimize Window !\n");
|
||||
break;
|
||||
}
|
||||
if (x > lphs->rectMaxim.left && x < lphs->rectMaxim.right) {
|
||||
lphs->hMaxim = hStdMaxim;
|
||||
InvalidateRect(hWnd, &lphs->rectMaxim, TRUE);
|
||||
UpdateWindow(hWnd);
|
||||
SendMessage(wndPtr->hwndParent, WM_SYSCOMMAND, SC_MAXIMIZE, 0L);
|
||||
printf("CAPTION Maximize Window !\n");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_LBUTTONDBLCLK:
|
||||
lphs = CaptionBarGetWindowAndStorage(hWnd, &wndPtr);
|
||||
#ifdef DEBUG_CAPTION
|
||||
printf("CaptionBar WM_LBUTTONDBLCLK %lX !\n", lParam);
|
||||
#endif
|
||||
x = LOWORD(lParam);
|
||||
y = HIWORD(lParam);
|
||||
if (x > lphs->rectClose.left && x < lphs->rectClose.right) {
|
||||
SendMessage(wndPtr->hwndParent, WM_SYSCOMMAND, SC_CLOSE, 0L);
|
||||
printf("CAPTION DoubleClick Close Window !\n");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_KEYDOWN:
|
||||
case WM_KEYUP:
|
||||
case WM_CHAR:
|
||||
lphs = CaptionBarGetWindowAndStorage(hWnd, &wndPtr);
|
||||
return(SendMessage(wndPtr->hwndParent, message, wParam, lParam));
|
||||
|
||||
case WM_PAINT:
|
||||
GetWindowRect(hWnd, &rect);
|
||||
#ifdef DEBUG_CAPTION
|
||||
printf("CaptionBar WM_PAINT left=%d top=%d right=%d bottom=%d !\n",
|
||||
rect.left, rect.top, rect.right, rect.bottom);
|
||||
#endif
|
||||
lphs = CaptionBarGetWindowAndStorage(hWnd, &wndPtr);
|
||||
hDC = BeginPaint(hWnd, &ps);
|
||||
hMemDC = CreateCompatibleDC(hDC);
|
||||
if (lphs->hClose != 0) {
|
||||
GetObject(lphs->hClose, sizeof(BITMAP), (LPSTR)&bm);
|
||||
SelectObject(hMemDC, lphs->hClose);
|
||||
BitBlt(hDC, 0, 0, bm.bmWidth, bm.bmHeight, hMemDC, 0, 0, SRCCOPY);
|
||||
}
|
||||
if (lphs->hMinim != 0) {
|
||||
GetObject(lphs->hMinim, sizeof(BITMAP), (LPSTR)&bm);
|
||||
SelectObject(hMemDC, lphs->hMinim);
|
||||
BitBlt(hDC, lphs->rectMinim.left, 0, bm.bmWidth, bm.bmHeight, hMemDC, 0, 0, SRCCOPY);
|
||||
}
|
||||
if (lphs->hMaxim != 0) {
|
||||
GetObject(lphs->hMaxim, sizeof(BITMAP), (LPSTR)&bm);
|
||||
SelectObject(hMemDC, lphs->hMaxim);
|
||||
BitBlt(hDC, lphs->rectMaxim.left, 0, bm.bmWidth, bm.bmHeight, hMemDC, 0, 0, SRCCOPY);
|
||||
}
|
||||
DeleteDC(hMemDC);
|
||||
GetClientRect(hWnd, &rect);
|
||||
FrameRect(hDC, &rect, GetStockObject(BLACK_BRUSH));
|
||||
rect.left = lphs->rectClose.right;
|
||||
rect.right = lphs->rectMinim.left;
|
||||
#ifdef DEBUG_CAPTION
|
||||
printf("CaptionBar WM_PAINT left=%d top=%d right=%d bottom=%d !\n",
|
||||
rect.left, rect.top, rect.right, rect.bottom);
|
||||
#endif
|
||||
FillRect(hDC, &rect, GetStockObject(GRAY_BRUSH));
|
||||
if (GetWindowTextLength(wndPtr->hwndParent) > 0) {
|
||||
GetWindowText(wndPtr->hwndParent, str, sizeof(str));
|
||||
width = GetTextExtent(hDC, str, strlen(str));
|
||||
DrawText(hDC, str, -1, &rect, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
|
||||
}
|
||||
EndPaint(hWnd, &ps);
|
||||
break;
|
||||
default:
|
||||
return DefWindowProc( hWnd, message, wParam, lParam );
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
LPHEADCAPTION CaptionBarGetWindowAndStorage(HWND hWnd, WND **wndPtr)
|
||||
{
|
||||
WND *Ptr;
|
||||
LPHEADCAPTION lphs;
|
||||
*(wndPtr) = Ptr = WIN_FindWndPtr(hWnd);
|
||||
if (Ptr == 0) {
|
||||
printf("Bad Window handle on CaptionBar !\n");
|
||||
return 0;
|
||||
}
|
||||
lphs = *((LPHEADCAPTION *)&Ptr->wExtra[1]);
|
||||
return lphs;
|
||||
}
|
||||
|
||||
|
||||
LPHEADCAPTION CaptionBarGetStorageHeader(HWND hWnd)
|
||||
{
|
||||
WND *wndPtr;
|
||||
LPHEADCAPTION lphs;
|
||||
wndPtr = WIN_FindWndPtr(hWnd);
|
||||
if (wndPtr == 0) {
|
||||
printf("Bad Window handle on CaptionBar !\n");
|
||||
return 0;
|
||||
}
|
||||
lphs = *((LPHEADCAPTION *)&wndPtr->wExtra[1]);
|
||||
return lphs;
|
||||
}
|
||||
|
||||
|
125
controls/combo.c
125
controls/combo.c
|
@ -11,8 +11,6 @@
|
|||
|
||||
static char Copyright[] = "Copyright Martin Ayotte, 1993";
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <X11/StringDefs.h>
|
||||
#include "windows.h"
|
||||
#include "combo.h"
|
||||
#include "heap.h"
|
||||
|
@ -39,8 +37,7 @@ LONG ComboBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
|||
int AltState;
|
||||
WND *wndPtr;
|
||||
LPHEADCOMBO lphc;
|
||||
LPDRAWITEMSTRUCT lpdis;
|
||||
HDC hMemDC;
|
||||
HDC hDC, hMemDC;
|
||||
BITMAP bm;
|
||||
char str[128];
|
||||
PAINTSTRUCT paintstruct;
|
||||
|
@ -48,47 +45,48 @@ LONG ComboBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
|||
switch(message)
|
||||
{
|
||||
case WM_CREATE:
|
||||
ShowScrollBar(hwnd, SB_BOTH, FALSE);
|
||||
GetClientRect(hwnd, &rect);
|
||||
width = rect.right - rect.left;
|
||||
height = rect.bottom - rect.top;
|
||||
/* SetWindowPos(hwnd, 0, 0, 0, width, 16,
|
||||
SWP_NOMOVE | SWP_NOZORDER); */
|
||||
CreateComboStruct(hwnd);
|
||||
wndPtr = WIN_FindWndPtr(hwnd);
|
||||
lphc = ComboGetStorageHeader(hwnd);
|
||||
if (lphc == NULL) return 0;
|
||||
if (wndPtr == NULL) return 0;
|
||||
#ifdef DEBUG_COMBO
|
||||
printf("Combo WM_CREATE %lX !\n", lphc);
|
||||
#endif
|
||||
if (hComboBit == (HBITMAP)NULL)
|
||||
hComboBit = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_COMBO));
|
||||
lphc->hWndDrop = CreateWindow("BUTTON", "",
|
||||
WS_CHILD | WS_CLIPCHILDREN | WS_VISIBLE | BS_OWNERDRAW,
|
||||
width - 16, 0, 16, 16, hwnd, 1, wndPtr->hInstance, 0L);
|
||||
GetObject(hComboBit, sizeof(BITMAP), (LPSTR)&bm);
|
||||
wndPtr->dwStyle &= 0xFFFFFFFFL ^ (WS_VSCROLL | WS_HSCROLL);
|
||||
GetWindowRect(hwnd, &rect);
|
||||
width = rect.right - rect.left;
|
||||
height = rect.bottom - rect.top;
|
||||
SetWindowPos(hwnd, 0, 0, 0, width + bm.bmHeight, bm.bmHeight,
|
||||
SWP_NOMOVE | SWP_NOZORDER);
|
||||
CreateComboStruct(hwnd);
|
||||
lphc = ComboGetStorageHeader(hwnd);
|
||||
if (lphc == NULL) return 0;
|
||||
if (wndPtr->dwStyle & CBS_SIMPLE)
|
||||
/* lphc->hWndEdit = CreateWindow("EDIT", "", */
|
||||
lphc->hWndEdit = CreateWindow("STATIC", "",
|
||||
WS_CHILD | WS_CLIPCHILDREN | WS_VISIBLE | SS_LEFT,
|
||||
0, 0, width - 16, 16, hwnd, 1, wndPtr->hInstance, 0L);
|
||||
0, 0, width - bm.bmHeight, bm.bmHeight,
|
||||
hwnd, 1, wndPtr->hInstance, 0L);
|
||||
else
|
||||
lphc->hWndEdit = CreateWindow("STATIC", "",
|
||||
WS_CHILD | WS_CLIPCHILDREN | WS_VISIBLE | SS_LEFT,
|
||||
0, 0, width - 16, 16, hwnd, 1, wndPtr->hInstance, 0L);
|
||||
0, 0, width - bm.bmHeight, bm.bmHeight,
|
||||
hwnd, 1, wndPtr->hInstance, 0L);
|
||||
lphc->hWndLBox = CreateWindow("LISTBOX", "",
|
||||
WS_CHILD | WS_CLIPCHILDREN | WS_BORDER | WS_VSCROLL | LBS_NOTIFY,
|
||||
wndPtr->rectClient.left, wndPtr->rectClient.top + 16, width, height,
|
||||
wndPtr->hwndParent, 1, wndPtr->hInstance, (LPSTR)MAKELONG(0, hwnd));
|
||||
wndPtr->rectClient.left, wndPtr->rectClient.top + bm.bmHeight,
|
||||
width, height, wndPtr->hwndParent, 1,
|
||||
wndPtr->hInstance, (LPSTR)MAKELONG(0, hwnd));
|
||||
ShowWindow(lphc->hWndLBox, SW_HIDE);
|
||||
#ifdef DEBUG_COMBO
|
||||
printf("Combo Creation Drop=%X LBox=%X!\n", lphc->hWndDrop, lphc->hWndLBox);
|
||||
printf("Combo Creation LBox=%X!\n", lphc->hWndLBox);
|
||||
#endif
|
||||
return 0;
|
||||
case WM_DESTROY:
|
||||
lphc = ComboGetStorageHeader(hwnd);
|
||||
if (lphc == 0) return 0;
|
||||
/*
|
||||
DestroyWindow(lphc->hWndDrop);
|
||||
DestroyWindow(lphc->hWndEdit);
|
||||
*/
|
||||
DestroyWindow(lphc->hWndLBox);
|
||||
|
@ -106,30 +104,6 @@ LONG ComboBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
|||
wndPtr = WIN_FindWndPtr(hwnd);
|
||||
lphc = ComboGetStorageHeader(hwnd);
|
||||
if (lphc == NULL) return 0;
|
||||
if (LOWORD(lParam) == lphc->hWndDrop) {
|
||||
if (HIWORD(lParam) != BN_CLICKED) return 0;
|
||||
#ifdef DEBUG_COMBO
|
||||
printf("CB_SHOWDROPDOWN !\n");
|
||||
#endif
|
||||
lphc->dwState = lphc->dwState ^ CB_SHOWDROPDOWN;
|
||||
if ((lphc->dwState & CB_SHOWDROPDOWN) == CB_SHOWDROPDOWN) {
|
||||
ShowWindow(lphc->hWndLBox, SW_SHOW);
|
||||
/*
|
||||
SetFocus(lphc->hWndLBox);
|
||||
*/
|
||||
}
|
||||
else {
|
||||
/*
|
||||
SetFocus(lphc->hWndEdit);
|
||||
*/
|
||||
ShowWindow(lphc->hWndLBox, SW_HIDE);
|
||||
y = SendMessage(lphc->hWndLBox, LB_GETCURSEL, 0, 0L);
|
||||
if (y != LB_ERR) {
|
||||
SendMessage(lphc->hWndLBox, LB_GETTEXT, (WORD)y, (LPARAM)str);
|
||||
SendMessage(lphc->hWndEdit, WM_SETTEXT, (WORD)y, (LPARAM)str);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (LOWORD(lParam) == lphc->hWndLBox) {
|
||||
switch(HIWORD(lParam))
|
||||
{
|
||||
|
@ -153,13 +127,39 @@ LONG ComboBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
|||
break;
|
||||
case WM_LBUTTONDOWN:
|
||||
printf("Combo WM_LBUTTONDOWN wParam=%x lParam=%lX !\n", wParam, lParam);
|
||||
GetClientRect(hwnd, &rect);
|
||||
rect.left = rect.right - (rect.bottom - rect.top);
|
||||
hDC = GetDC(hwnd);
|
||||
InflateRect(&rect, -1, -1);
|
||||
DrawReliefRect(hDC, rect, 1, 1);
|
||||
ReleaseDC(hwnd, hDC);
|
||||
wndPtr = WIN_FindWndPtr(hwnd);
|
||||
lphc = ComboGetStorageHeader(hwnd);
|
||||
lphc->dwState = lphc->dwState ^ CB_SHOWDROPDOWN;
|
||||
if ((lphc->dwState & CB_SHOWDROPDOWN) == CB_SHOWDROPDOWN)
|
||||
ShowWindow(lphc->hWndLBox, SW_SHOW);
|
||||
else {
|
||||
/*
|
||||
SetFocus(lphc->hWndEdit);
|
||||
*/
|
||||
ShowWindow(lphc->hWndLBox, SW_HIDE);
|
||||
y = SendMessage(lphc->hWndLBox, LB_GETCURSEL, 0, 0L);
|
||||
if (y != LB_ERR) {
|
||||
SendMessage(lphc->hWndLBox, LB_GETTEXT, (WORD)y, (LPARAM)str);
|
||||
SendMessage(lphc->hWndEdit, WM_SETTEXT, (WORD)y, (LPARAM)str);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case WM_KEYDOWN:
|
||||
case WM_LBUTTONUP:
|
||||
printf("Combo WM_LBUTTONUP wParam=%x lParam=%lX !\n", wParam, lParam);
|
||||
GetClientRect(hwnd, &rect);
|
||||
rect.left = rect.right - (rect.bottom - rect.top);
|
||||
hDC = GetDC(hwnd);
|
||||
InflateRect(&rect, -1, -1);
|
||||
DrawReliefRect(hDC, rect, 1, 0);
|
||||
ReleaseDC(hwnd, hDC);
|
||||
break;
|
||||
case WM_KEYDOWN:
|
||||
wndPtr = WIN_FindWndPtr(hwnd);
|
||||
lphc = ComboGetStorageHeader(hwnd);
|
||||
y = SendMessage(lphc->hWndLBox, LB_GETCURSEL, 0, 0L);
|
||||
|
@ -206,32 +206,19 @@ LONG ComboBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
|||
break;
|
||||
case WM_CTLCOLOR:
|
||||
return(SendMessage(GetParent(hwnd), WM_CTLCOLOR, wParam, lParam));
|
||||
case WM_DRAWITEM:
|
||||
#ifdef DEBUG_SCROLL
|
||||
printf("ComboBox WM_DRAWITEM w=%04X l=%08X\n", wParam, lParam);
|
||||
#endif
|
||||
lpdis = (LPDRAWITEMSTRUCT)lParam;
|
||||
if (lpdis->CtlType == ODT_BUTTON && lpdis->itemAction == ODA_DRAWENTIRE) {
|
||||
hMemDC = CreateCompatibleDC(lpdis->hDC);
|
||||
GetObject(hComboBit, sizeof(BITMAP), (LPSTR)&bm);
|
||||
SelectObject(hMemDC, hComboBit);
|
||||
BitBlt(lpdis->hDC, 0, 0, bm.bmWidth, bm.bmHeight, hMemDC, 0, 0, SRCCOPY);
|
||||
DeleteDC(hMemDC);
|
||||
}
|
||||
if (lpdis->CtlType == ODT_BUTTON && lpdis->itemAction == ODA_SELECT) {
|
||||
CopyRect(&rect, &lpdis->rcItem);
|
||||
InflateRect(&rect, -1, -1);
|
||||
DrawReliefRect(lpdis->hDC, rect, 1, 1);
|
||||
}
|
||||
break;
|
||||
case WM_PAINT:
|
||||
BeginPaint( hwnd, &paintstruct );
|
||||
EndPaint( hwnd, &paintstruct );
|
||||
GetClientRect(hwnd, &rect);
|
||||
hDC = BeginPaint(hwnd, &paintstruct);
|
||||
hMemDC = CreateCompatibleDC(hDC);
|
||||
GetObject(hComboBit, sizeof(BITMAP), (LPSTR)&bm);
|
||||
SelectObject(hMemDC, hComboBit);
|
||||
BitBlt(hDC, rect.right - bm.bmWidth, 0,
|
||||
bm.bmWidth, bm.bmHeight, hMemDC, 0, 0, SRCCOPY);
|
||||
DeleteDC(hMemDC);
|
||||
EndPaint(hwnd, &paintstruct);
|
||||
lphc = ComboGetStorageHeader(hwnd);
|
||||
InvalidateRect(lphc->hWndEdit, NULL, TRUE);
|
||||
UpdateWindow(lphc->hWndEdit);
|
||||
InvalidateRect(lphc->hWndDrop, NULL, TRUE);
|
||||
UpdateWindow(lphc->hWndDrop);
|
||||
if ((lphc->dwState & CB_SHOWDROPDOWN) == CB_SHOWDROPDOWN) {
|
||||
InvalidateRect(lphc->hWndLBox, NULL, TRUE);
|
||||
UpdateWindow(lphc->hWndLBox);
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Desktop window class.
|
||||
*
|
||||
* Copyright 1994 Alexandre Julliard
|
||||
*/
|
||||
|
||||
static char Copyright[] = "Copyright Alexandre Julliard, 1994";
|
||||
|
||||
#include "windows.h"
|
||||
|
||||
LONG DesktopWndProc ( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
||||
{
|
||||
/* Most messages are ignored (we DON'T call DefWindowProc) */
|
||||
|
||||
switch(message)
|
||||
{
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -12,8 +12,6 @@
|
|||
static char Copyright[] = "Copyright Martin Ayotte, 1993";
|
||||
|
||||
#include <stdio.h>
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <X11/StringDefs.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <dirent.h>
|
||||
|
@ -87,14 +85,11 @@ LONG ListBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
|||
SetScrollRange(hwnd, SB_HORZ, 1, 1, TRUE);
|
||||
ShowScrollBar(hwnd, SB_HORZ, FALSE);
|
||||
}
|
||||
if (wndPtr->hCursor == (HCURSOR)NULL)
|
||||
wndPtr->hCursor = LoadCursor((HINSTANCE)NULL, IDC_ARROW);
|
||||
return 0;
|
||||
case WM_DESTROY:
|
||||
lphl = ListBoxGetWindowAndStorage(hwnd, &wndPtr);
|
||||
if (lphl == 0) return 0;
|
||||
ListBoxResetContent(hwnd);
|
||||
DestroyCursor(wndPtr->hCursor);
|
||||
free(lphl);
|
||||
*((LPHEADLIST *)&wndPtr->wExtra[1]) = 0;
|
||||
#ifdef DEBUG_LISTBOX
|
||||
|
@ -496,6 +491,19 @@ void StdDrawListBox(HWND hwnd)
|
|||
lphl->ItemsPerColumn = ipc = 0;
|
||||
for(i = 1; i <= lphl->ItemsCount; i++) {
|
||||
if (i >= lphl->FirstVisible) {
|
||||
if (lpls == NULL) break;
|
||||
if ((h + lpls->dis.rcItem.bottom - lpls->dis.rcItem.top) > rect.bottom) {
|
||||
if ((wndPtr->dwStyle & LBS_MULTICOLUMN) == LBS_MULTICOLUMN) {
|
||||
lphl->ItemsPerColumn = max(lphl->ItemsPerColumn, ipc);
|
||||
ipc = 0;
|
||||
h = 0;
|
||||
rect.left += lphl->ColumnsWidth;
|
||||
rect.right += lphl->ColumnsWidth;
|
||||
if (rect.left > maxwidth) break;
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
h2 = lpls->dis.rcItem.bottom - lpls->dis.rcItem.top;
|
||||
lpls->dis.rcItem.top = h;
|
||||
lpls->dis.rcItem.bottom = h + h2;
|
||||
|
@ -512,18 +520,6 @@ void StdDrawListBox(HWND hwnd)
|
|||
h += h2;
|
||||
lphl->ItemsVisible++;
|
||||
ipc++;
|
||||
if (h > rect.bottom) {
|
||||
if ((wndPtr->dwStyle & LBS_MULTICOLUMN) == LBS_MULTICOLUMN) {
|
||||
lphl->ItemsPerColumn = max(lphl->ItemsPerColumn, ipc);
|
||||
ipc = 0;
|
||||
h = 0;
|
||||
rect.left += lphl->ColumnsWidth;
|
||||
rect.right += lphl->ColumnsWidth;
|
||||
if (rect.left > maxwidth) break;
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (lpls->lpNext == NULL) goto EndOfPaint;
|
||||
lpls = (LPLISTSTRUCT)lpls->lpNext;
|
||||
|
@ -624,7 +620,7 @@ EndOfPaint:
|
|||
|
||||
int ListBoxFindMouse(HWND hwnd, int X, int Y)
|
||||
{
|
||||
WND *wndPtr;
|
||||
WND *wndPtr;
|
||||
LPHEADLIST lphl;
|
||||
LPLISTSTRUCT lpls;
|
||||
RECT rect;
|
||||
|
|
1277
controls/menu.c
1277
controls/menu.c
File diff suppressed because it is too large
Load Diff
|
@ -10,8 +10,6 @@
|
|||
*/
|
||||
static char Copyright[] = "Copyright Martin Ayotte, 1993";
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <X11/StringDefs.h>
|
||||
#include "windows.h"
|
||||
#include "sysmetrics.h"
|
||||
#include "scroll.h"
|
||||
|
@ -32,7 +30,7 @@ HBITMAP hRgArrowD = 0;
|
|||
|
||||
LPHEADSCROLL ScrollBarGetWindowAndStorage(HWND hWnd, WND **wndPtr);
|
||||
LPHEADSCROLL ScrollBarGetStorageHeader(HWND hWnd);
|
||||
LPHEADSCROLL GetScrollObjectHandle(HWND hWnd, int nBar);
|
||||
LPHEADSCROLL GetScrollObjectStruct(HWND hWnd, int nBar);
|
||||
void ScrollBarButtonDown(HWND hWnd, int nBar, int x, int y);
|
||||
void ScrollBarButtonUp(HWND hWnd, int nBar, int x, int y);
|
||||
void ScrollBarMouseMove(HWND hWnd, int nBar, WORD wParam, int x, int y);
|
||||
|
@ -64,22 +62,6 @@ LONG ScrollBarWndProc( HWND hWnd, WORD message, WORD wParam, LONG lParam )
|
|||
#ifdef DEBUG_SCROLL
|
||||
printf("ScrollBar Creation !\n");
|
||||
#endif
|
||||
if (hUpArrow == (HBITMAP)NULL)
|
||||
hUpArrow = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_UPARROWI));
|
||||
if (hDnArrow == (HBITMAP)NULL)
|
||||
hDnArrow = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_DNARROWI));
|
||||
if (hLfArrow == (HBITMAP)NULL)
|
||||
hLfArrow = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_LFARROWI));
|
||||
if (hRgArrow == (HBITMAP)NULL)
|
||||
hRgArrow = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_RGARROWI));
|
||||
if (hUpArrowD == (HBITMAP)NULL)
|
||||
hUpArrowD = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_UPARROWD));
|
||||
if (hDnArrowD == (HBITMAP)NULL)
|
||||
hDnArrowD = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_DNARROWD));
|
||||
if (hLfArrowD == (HBITMAP)NULL)
|
||||
hLfArrowD = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_LFARROWD));
|
||||
if (hRgArrowD == (HBITMAP)NULL)
|
||||
hRgArrowD = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_RGARROWD));
|
||||
return 0;
|
||||
case WM_DESTROY:
|
||||
lphs = ScrollBarGetWindowAndStorage(hWnd, &wndPtr);
|
||||
|
@ -165,10 +147,9 @@ void ScrollBarButtonDown(HWND hWnd, int nBar, int x, int y)
|
|||
RECT rect, rect2;
|
||||
int width, height;
|
||||
LONG dwOwner;
|
||||
lphs = GetScrollObjectHandle(hWnd, nBar);
|
||||
printf("ScrollBarButtonDown // x=%d y=%d\n", x, y);
|
||||
lphs = GetScrollObjectStruct(hWnd, nBar);
|
||||
#ifdef DEBUG_SCROLL
|
||||
printf("ScrollBarButtonDown // x=%d y=%d\n", x, y);
|
||||
printf("ScrollBarButtonDown // x=%d y=%d\n", x, y);
|
||||
#endif
|
||||
if (nBar == SB_CTL) {
|
||||
hWndParent = GetParent(hWnd);
|
||||
|
@ -181,16 +162,12 @@ void ScrollBarButtonDown(HWND hWnd, int nBar, int x, int y)
|
|||
/*
|
||||
SetFocus(lphs->hWndOwner);
|
||||
*/
|
||||
if (nBar != SB_CTL) {
|
||||
GetWindowRect(lphs->hWndOwner, &rect);
|
||||
x -= rect.left;
|
||||
y -= rect.top;
|
||||
}
|
||||
CopyRect(&rect, &lphs->rect);
|
||||
#ifdef DEBUG_SCROLL
|
||||
printf("ScrollDown / x=%d y=%d left=%d top=%d right=%d bottom=%d \n",
|
||||
x, y, rect.left, rect.top, rect.right, rect.bottom);
|
||||
#endif
|
||||
if (lphs->Direction == WM_VSCROLL) {
|
||||
y -= rect.top;
|
||||
width = rect.right - rect.left;
|
||||
if (y < (lphs->CurPix + width)) {
|
||||
if (y < width) {
|
||||
|
@ -198,30 +175,26 @@ void ScrollBarButtonDown(HWND hWnd, int nBar, int x, int y)
|
|||
CopyRect(&rect2, &rect);
|
||||
rect2.bottom = rect2.top + width;
|
||||
InvalidateRect(lphs->hWndOwner, &rect2, TRUE);
|
||||
printf("ScrollBarButtonDown // SB_LINEUP \n");
|
||||
SendMessage(hWndParent, lphs->Direction,
|
||||
SB_LINEUP, dwOwner);
|
||||
}
|
||||
else {
|
||||
lphs->ButtonDown = 5;
|
||||
printf("ScrollBarButtonDown // SB_PAGEUP \n");
|
||||
SendMessage(hWndParent, lphs->Direction,
|
||||
SB_PAGEUP, dwOwner);
|
||||
}
|
||||
}
|
||||
if (y > (lphs->CurPix + (width << 1))) {
|
||||
if (y > (rect.bottom - width)) {
|
||||
if (y > (rect.bottom - rect.top - width)) {
|
||||
lphs->ButtonDown = 2;
|
||||
CopyRect(&rect2, &rect);
|
||||
rect2.top = rect2.bottom - width;
|
||||
InvalidateRect(lphs->hWndOwner, &rect2, TRUE);
|
||||
printf("ScrollBarButtonDown // SB_LINEDOWN \n");
|
||||
SendMessage(hWndParent, lphs->Direction,
|
||||
SB_LINEDOWN, dwOwner);
|
||||
}
|
||||
else {
|
||||
lphs->ButtonDown = 6;
|
||||
printf("ScrollBarButtonDown // SB_PAGEDOWN \n");
|
||||
SendMessage(hWndParent, lphs->Direction,
|
||||
SB_PAGEDOWN, dwOwner);
|
||||
}
|
||||
|
@ -235,7 +208,6 @@ void ScrollBarButtonDown(HWND hWnd, int nBar, int x, int y)
|
|||
}
|
||||
}
|
||||
else {
|
||||
x -= rect.left;
|
||||
height = rect.bottom - rect.top;
|
||||
if (x < (lphs->CurPix + height)) {
|
||||
if (x < height) {
|
||||
|
@ -289,11 +261,10 @@ void ScrollBarButtonUp(HWND hWnd, int nBar, int x, int y)
|
|||
{
|
||||
LPHEADSCROLL lphs;
|
||||
RECT rect, rect2;
|
||||
printf("ScrollBarButtonUp // x=%d y=%d\n", x, y);
|
||||
#ifdef DEBUG_SCROLL
|
||||
printf("ScrollBarButtonUp // x=%d y=%d\n", x, y);
|
||||
#endif
|
||||
lphs = GetScrollObjectHandle(hWnd, nBar);
|
||||
lphs = GetScrollObjectStruct(hWnd, nBar);
|
||||
lphs->ThumbActive = FALSE;
|
||||
if (lphs->ButtonDown != 0) {
|
||||
lphs->ButtonDown = 0;
|
||||
|
@ -314,7 +285,7 @@ void ScrollBarMouseMove(HWND hWnd, int nBar, WORD wParam, int x, int y)
|
|||
#ifdef DEBUG_SCROLL
|
||||
printf("ScrollBarButtonMove // w=%04X x=%d y=%d \n", wParam, x, y);
|
||||
#endif
|
||||
lphs = GetScrollObjectHandle(hWnd, nBar);
|
||||
lphs = GetScrollObjectStruct(hWnd, nBar);
|
||||
if (lphs->ThumbActive == 0) return;
|
||||
if (nBar == SB_CTL) {
|
||||
hWndParent = GetParent(hWnd);
|
||||
|
@ -399,6 +370,14 @@ void StdDrawScrollBar(HWND hWnd, HDC hDC, int nBar, LPRECT lprect, LPHEADSCROLL
|
|||
CopyRect(&rect, lprect);
|
||||
w = rect.right - rect.left;
|
||||
h = rect.bottom - rect.top;
|
||||
if (lphs->Direction == WM_VSCROLL)
|
||||
lphs->MaxPix = h - 3 * w;
|
||||
else
|
||||
lphs->MaxPix = w - 3 * h;
|
||||
if (lphs->MaxVal != lphs->MinVal)
|
||||
lphs->CurPix = lphs->MaxPix * (abs((short)lphs->CurVal) - abs(lphs->MinVal)) /
|
||||
(abs(lphs->MaxVal) - abs(lphs->MinVal));
|
||||
if (lphs->CurPix > lphs->MaxPix) lphs->CurPix = lphs->MaxPix;
|
||||
hMemDC = CreateCompatibleDC(hDC);
|
||||
if (lphs->Direction == WM_VSCROLL) {
|
||||
GetObject(hUpArrow, sizeof(BITMAP), (LPSTR)&bm);
|
||||
|
@ -473,39 +452,18 @@ int CreateScrollBarStruct(HWND hWnd)
|
|||
WND *wndPtr;
|
||||
LPHEADSCROLL lphs;
|
||||
wndPtr = WIN_FindWndPtr(hWnd);
|
||||
lphs = (LPHEADSCROLL)malloc(sizeof(HEADSCROLL));
|
||||
if (lphs == 0) {
|
||||
printf("Bad Memory Alloc on ScrollBar !\n");
|
||||
return 0;
|
||||
}
|
||||
width = wndPtr->rectClient.right - wndPtr->rectClient.left;
|
||||
height = wndPtr->rectClient.bottom - wndPtr->rectClient.top;
|
||||
if (width <= height)
|
||||
lphs = AllocScrollBar(WS_VSCROLL, width, height);
|
||||
else
|
||||
lphs = AllocScrollBar(WS_HSCROLL, width, height);
|
||||
#ifdef DEBUG_SCROLL
|
||||
printf("CreateScrollBarStruct %lX !\n", lphs);
|
||||
#endif
|
||||
*((LPHEADSCROLL *)&wndPtr->wExtra[1]) = lphs;
|
||||
lphs->hWndOwner = hWnd;
|
||||
lphs->ThumbActive = FALSE;
|
||||
lphs->TimerPending = FALSE;
|
||||
lphs->ButtonDown = 0;
|
||||
lphs->MinVal = 0;
|
||||
lphs->MaxVal = 100;
|
||||
lphs->CurVal = 0;
|
||||
lphs->CurPix = 0;
|
||||
width = wndPtr->rectClient.right - wndPtr->rectClient.left;
|
||||
height = wndPtr->rectClient.bottom - wndPtr->rectClient.top;
|
||||
CopyRect(&lphs->rect, &wndPtr->rectClient);
|
||||
if (width <= height)
|
||||
{
|
||||
lphs->MaxPix = height - 3 * width;
|
||||
lphs->Direction = WM_VSCROLL;
|
||||
}
|
||||
else
|
||||
{
|
||||
lphs->MaxPix = width - 3 * height;
|
||||
lphs->Direction = WM_HSCROLL;
|
||||
}
|
||||
if (lphs->MaxPix < 1) lphs->MaxPix = 1;
|
||||
if (wndPtr->hCursor == (HCURSOR)NULL)
|
||||
wndPtr->hCursor = LoadCursor((HINSTANCE)NULL, IDC_ARROW);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -514,6 +472,22 @@ int CreateScrollBarStruct(HWND hWnd)
|
|||
LPHEADSCROLL AllocScrollBar(DWORD dwStyle, int width, int height)
|
||||
{
|
||||
LPHEADSCROLL lphs;
|
||||
if (hUpArrow == (HBITMAP)NULL)
|
||||
hUpArrow = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_UPARROWI));
|
||||
if (hDnArrow == (HBITMAP)NULL)
|
||||
hDnArrow = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_DNARROWI));
|
||||
if (hLfArrow == (HBITMAP)NULL)
|
||||
hLfArrow = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_LFARROWI));
|
||||
if (hRgArrow == (HBITMAP)NULL)
|
||||
hRgArrow = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_RGARROWI));
|
||||
if (hUpArrowD == (HBITMAP)NULL)
|
||||
hUpArrowD = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_UPARROWD));
|
||||
if (hDnArrowD == (HBITMAP)NULL)
|
||||
hDnArrowD = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_DNARROWD));
|
||||
if (hLfArrowD == (HBITMAP)NULL)
|
||||
hLfArrowD = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_LFARROWD));
|
||||
if (hRgArrowD == (HBITMAP)NULL)
|
||||
hRgArrowD = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_RGARROWD));
|
||||
lphs = (LPHEADSCROLL)malloc(sizeof(HEADSCROLL));
|
||||
if (lphs == 0) {
|
||||
printf("Bad Memory Alloc on ScrollBar !\n");
|
||||
|
@ -570,9 +544,9 @@ void NC_CreateScrollBars(HWND hWnd)
|
|||
|
||||
|
||||
/*************************************************************************
|
||||
* GetScrollObjectHandle
|
||||
* GetScrollObjectStruct [internal]
|
||||
*/
|
||||
LPHEADSCROLL GetScrollObjectHandle(HWND hWnd, int nBar)
|
||||
LPHEADSCROLL GetScrollObjectStruct(HWND hWnd, int nBar)
|
||||
{
|
||||
WND *wndPtr;
|
||||
LPHEADSCROLL lphs;
|
||||
|
@ -593,7 +567,7 @@ int SetScrollPos(HWND hWnd, int nBar, int nPos, BOOL bRedraw)
|
|||
{
|
||||
int nRet;
|
||||
LPHEADSCROLL lphs;
|
||||
lphs = GetScrollObjectHandle(hWnd, nBar);
|
||||
lphs = GetScrollObjectStruct(hWnd, nBar);
|
||||
if (lphs == NULL) return 0;
|
||||
nRet = lphs->CurVal;
|
||||
lphs->CurVal = (short)nPos;
|
||||
|
@ -622,7 +596,7 @@ int SetScrollPos(HWND hWnd, int nBar, int nPos, BOOL bRedraw)
|
|||
int GetScrollPos(HWND hWnd, int nBar)
|
||||
{
|
||||
LPHEADSCROLL lphs;
|
||||
lphs = GetScrollObjectHandle(hWnd, nBar);
|
||||
lphs = GetScrollObjectStruct(hWnd, nBar);
|
||||
if (lphs == NULL) return 0;
|
||||
return lphs->CurVal;
|
||||
}
|
||||
|
@ -635,7 +609,7 @@ int GetScrollPos(HWND hWnd, int nBar)
|
|||
void SetScrollRange(HWND hWnd, int nBar, int MinPos, int MaxPos, BOOL bRedraw)
|
||||
{
|
||||
LPHEADSCROLL lphs;
|
||||
lphs = GetScrollObjectHandle(hWnd, nBar);
|
||||
lphs = GetScrollObjectStruct(hWnd, nBar);
|
||||
if (lphs == NULL) return;
|
||||
lphs->MinVal = (short)MinPos;
|
||||
lphs->MaxVal = (short)MaxPos;
|
||||
|
@ -661,7 +635,7 @@ void SetScrollRange(HWND hWnd, int nBar, int MinPos, int MaxPos, BOOL bRedraw)
|
|||
void GetScrollRange(HWND hWnd, int nBar, LPINT lpMin, LPINT lpMax)
|
||||
{
|
||||
LPHEADSCROLL lphs;
|
||||
lphs = GetScrollObjectHandle(hWnd, nBar);
|
||||
lphs = GetScrollObjectStruct(hWnd, nBar);
|
||||
if (lphs == NULL) return;
|
||||
*lpMin = lphs->MinVal;
|
||||
*lpMax = lphs->MaxVal;
|
||||
|
@ -686,22 +660,20 @@ void ShowScrollBar(HWND hWnd, WORD wBar, BOOL bFlag)
|
|||
return;
|
||||
}
|
||||
wndPtr = WIN_FindWndPtr(hWnd);
|
||||
if ((wBar == SB_VERT) || (wBar == SB_BOTH)) {
|
||||
/*
|
||||
if ((wBar == SB_VERT) || (wBar == SB_BOTH)) {
|
||||
if (bFlag)
|
||||
ShowWindow(wndPtr->hWndVScroll, SW_SHOW);
|
||||
wndPtr->dwStyle |= WS_VSCROLL;
|
||||
else
|
||||
ShowWindow(wndPtr->hWndVScroll, SW_HIDE);
|
||||
*/
|
||||
wndPtr->dwStyle &= 0xFFFFFFFFL ^ WS_VSCROLL;
|
||||
}
|
||||
if ((wBar == SB_HORZ) || (wBar == SB_BOTH)) {
|
||||
/*
|
||||
if (bFlag)
|
||||
ShowWindow(wndPtr->hWndHScroll, SW_SHOW);
|
||||
wndPtr->dwStyle |= WS_HSCROLL;
|
||||
else
|
||||
ShowWindow(wndPtr->hWndHScroll, SW_HIDE);
|
||||
*/
|
||||
wndPtr->dwStyle &= 0xFFFFFFFFL ^ WS_HSCROLL;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
|
||||
static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
||||
|
||||
#include "windows.h"
|
||||
#include "dialog.h"
|
||||
#include "win.h"
|
||||
|
||||
|
||||
LONG ButtonWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam );
|
||||
|
@ -16,6 +15,7 @@ LONG ScrollBarWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam );
|
|||
LONG ListBoxWndProc ( HWND hwnd, WORD message, WORD wParam, LONG lParam );
|
||||
LONG ComboBoxWndProc ( HWND hwnd, WORD message, WORD wParam, LONG lParam );
|
||||
LONG PopupMenuWndProc ( HWND hwnd, WORD message, WORD wParam, LONG lParam );
|
||||
LONG DesktopWndProc ( HWND hwnd, WORD message, WORD wParam, LONG lParam );
|
||||
|
||||
|
||||
static WNDCLASS WIDGETS_BuiltinClasses[] =
|
||||
|
@ -32,6 +32,8 @@ static WNDCLASS WIDGETS_BuiltinClasses[] =
|
|||
0, 0, 0, 0, NULL, "COMBOBOX" },
|
||||
{ CS_GLOBALCLASS, (LONG(*)())PopupMenuWndProc, 0, 8,
|
||||
0, 0, 0, 0, NULL, "POPUPMENU" },
|
||||
{ CS_GLOBALCLASS, (LONG(*)())DesktopWndProc, 0, 0,
|
||||
0, 0, 0, 0, NULL, DESKTOP_CLASS_NAME },
|
||||
{ CS_GLOBALCLASS, (LONG(*)())DefDlgProc, 0, DLGWINDOWEXTRA,
|
||||
0, 0, 0, 0, NULL, DIALOG_CLASS_NAME }
|
||||
};
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
|
||||
MODULE = debugger
|
||||
|
||||
DEFINES = -DUSE_READLINE
|
||||
|
||||
SUBDIRS = readline
|
||||
|
||||
/* Quick and dirt hack, since i386 is defined as 1. sigh */
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
CFLAGS=-g -I../include -DUSE_READLINE ${COPTS}
|
||||
LIBS= readline/libedit.a
|
||||
OBJS=dbg.tab.o hash.o lex.yy.o info.o i386-pinsn.o
|
||||
#YACC=bison -v -d
|
||||
YACC=yacc -b dbg -d
|
||||
#LEX=flex
|
||||
LEX=lex
|
||||
|
||||
debugger.o: ${OBJS} readline/libedit.a
|
||||
(cd readline; make)
|
||||
ld -r -o debugger.o ${OBJS} $(LIBS)
|
||||
|
||||
|
||||
readline/libedit.a:
|
||||
(cd readline; make)
|
||||
|
||||
dbg.tab.o: dbg.tab.c
|
||||
gcc $(CFLAGS) -DYYDEBUG=1 -c dbg.tab.c
|
||||
|
||||
lex.yy.o: lex.yy.c
|
||||
gcc $(CFLAGS) -I. -c lex.yy.c
|
||||
|
||||
|
||||
lex.yy.c: debug.l
|
||||
${LEX} -I debug.l
|
||||
|
||||
dbg.tab.c dbg.tab.h: dbg.y
|
||||
${YACC} dbg.y
|
||||
|
||||
dtest: dtest.o debugger.o
|
||||
gcc -o dtest dtest.o debugger.o
|
||||
|
||||
clean:
|
||||
rm -f *.o main dbg.tab.* lex.yy.* *.output *~ *# dtest
|
||||
(cd readline; make clean)
|
||||
|
||||
depend: dbg.tab.c dbg.tab.h lex.yy.c
|
||||
$(CC) $(CFLAGS) -M *.c > .depend
|
||||
|
|
@ -113,6 +113,10 @@ c { return 'c'; }
|
|||
|
||||
%%
|
||||
|
||||
#ifndef yywrap
|
||||
int yywrap(void) { return 1; }
|
||||
#endif
|
||||
|
||||
#ifdef USE_READLINE
|
||||
#ifndef whitespace
|
||||
#define whitespace(c) (((c) == ' ') || ((c) == '\t'))
|
||||
|
|
|
@ -1,66 +0,0 @@
|
|||
## $Revision: 1.3 $
|
||||
##
|
||||
## Unix makefile for editline library.
|
||||
##
|
||||
|
||||
## Set your options:
|
||||
## -DANSI_ARROWS ANSI arrows keys work like emacs.
|
||||
## -DHAVE_STDLIB Have <stdlib.h>.
|
||||
## -DHAVE_TCGETATTR Have tcgetattr(), tcsetattr().
|
||||
## -DHIDE Make static functions static (non debug).
|
||||
## -DHIST_SIZE=n History size.
|
||||
## -DNEED_STRDUP Don't have strdup().
|
||||
## -DUNIQUE_HISTORY Don't save command if same as last one.
|
||||
## -DUSE_DIRENT Use <dirent.h>, not <sys/dir.h>?
|
||||
## -DUSE_TERMCAP Use the termcap library for terminal size
|
||||
## see LDFLAGS, below, if you set this.
|
||||
## -DNEED_PERROR Don't have perror() (used in testit)
|
||||
DEFS = -DANSI_ARROWS -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT -DSYS_UNIX
|
||||
|
||||
## Set your C compiler:
|
||||
WARN = -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wwrite-strings \
|
||||
-Wunused -Wcomment -Wswitch
|
||||
CC = gcc -ansi $(WARN)
|
||||
#CC = cc
|
||||
CFLAGS = $(DEFS) -O -g
|
||||
|
||||
## If you have -DUSE_TERMCAP, set this as appropriate:
|
||||
#LDFLAGS = -ltermlib
|
||||
#LDFLAGS = -ltermcap
|
||||
|
||||
## Set ranlib as appropriate:
|
||||
RANLIB = ranlib
|
||||
#RANLIB = echo
|
||||
|
||||
## End of configuration.
|
||||
|
||||
SOURCES = editline.c complete.c sysunix.c
|
||||
OBJECTS = editline.o complete.o sysunix.o
|
||||
SHARFILES = README Makefile editline.3 editline.h unix.h editline.c \
|
||||
complete.c sysunix.c testit.c \
|
||||
Make.os9 os9.h sysos9.c
|
||||
|
||||
all: libedit.a
|
||||
|
||||
testit: testit.c libedit.a
|
||||
$(CC) $(CFLAGS) -o testit testit.c libedit.a $(LDFLAGS)
|
||||
|
||||
shar: $(SHARFILES)
|
||||
shar $(SHARFILES) >shar
|
||||
|
||||
clean:
|
||||
rm -f *.[oa] testit foo core tags lint lint.all a.out shar *# *~
|
||||
|
||||
lint: testit
|
||||
lint -a -b -u -x $(DEFS) $(SOURCES) testit.c >lint.all
|
||||
sed -e '/warning: function prototype not in scope/d' \
|
||||
-e '/warning: old style argument declaration/'d \
|
||||
-e '/mix of old and new style function declaration/'d \
|
||||
<lint.all >lint
|
||||
|
||||
libedit.a: $(OBJECTS)
|
||||
@rm -f $@
|
||||
ar r $@ $(OBJECTS)
|
||||
$(RANLIB) $@
|
||||
|
||||
$(OBJECTS): editline.h
|
358
etc/Makefile
358
etc/Makefile
|
@ -1,358 +0,0 @@
|
|||
# Makefile generated by imake - do not edit!
|
||||
# $XConsortium: imake.c,v 1.65 91/07/25 17:50:17 rws Exp $
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Makefile generated from "Imake.tmpl" and <Imakefile>
|
||||
# $XFree86: mit/config/Imake.tmpl,v 1.17 1993/06/03 15:26:36 dawes Exp $
|
||||
# $XConsortium: Imake.tmpl,v 1.139 91/09/16 08:52:48 rws Exp $
|
||||
#
|
||||
# Platform-specific parameters may be set in the appropriate <vendor>.cf
|
||||
# configuration files. Site-specific parameters should be set in the file
|
||||
# site.def. Full rebuilds are recommended if any parameters are changed.
|
||||
#
|
||||
# If your C preprocessor does not define any unique symbols, you will need
|
||||
# to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
|
||||
# "make World" the first time).
|
||||
#
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# site-specific configuration parameters that need to come before
|
||||
# the platform-specific parameters - edit site.def to change
|
||||
|
||||
# $XFree86: mit/config/site.def,v 1.65 1993/06/04 16:02:47 dawes Exp $
|
||||
# site: $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $
|
||||
|
||||
# obz: changes for making Linux distribution
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# platform-specific configuration parameters - edit x386.cf to change
|
||||
|
||||
# $XFree86: mit/config/x386.cf,v 1.90 1993/06/04 16:02:50 dawes Exp $
|
||||
# platform: $XConsortium: x386.cf,v 1.7 91/08/16 19:30:10 gildea Exp $
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# XFree86 version definition
|
||||
# $XFree86: mit/config/xf86_vers.def,v 1.5 1993/06/01 09:12:47 dawes Exp $
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# XFree86 version: 1300
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
# $XFree86: mit/config/lnuxLib.rules,v 1.2 1993/06/02 13:48:12 dawes Exp $
|
||||
|
||||
DLL_BINDIR = /usr/dll/bin
|
||||
|
||||
# operating system: Linux
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# site-specific configuration parameters that go after
|
||||
# the platform-specific parameters - edit site.def to change
|
||||
|
||||
# $XFree86: mit/config/site.def,v 1.65 1993/06/04 16:02:47 dawes Exp $
|
||||
# site: $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $
|
||||
|
||||
# obz: changes for making Linux distribution
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
TOP = ../.
|
||||
CURRENT_DIR = ./etc
|
||||
|
||||
AR = ar clq
|
||||
BOOTSTRAPCFLAGS =
|
||||
CC = gcc
|
||||
AS = as
|
||||
|
||||
LEX = flex
|
||||
|
||||
YACC = bison -y
|
||||
|
||||
COMPRESS = compress
|
||||
CPP = /lib/cpp $(STD_CPP_DEFINES)
|
||||
PREPROCESSCMD = /lib/cpp $(STD_CPP_DEFINES)
|
||||
INSTALL = install
|
||||
LD = ld
|
||||
LINT = lint
|
||||
LINTLIBFLAG = -C
|
||||
LINTOPTS = -axz
|
||||
LN = ln -s
|
||||
MAKE = make
|
||||
MV = mv
|
||||
CP = cp
|
||||
|
||||
RANLIB = ranlib
|
||||
RANLIBINSTFLAGS =
|
||||
|
||||
RM = rm -f
|
||||
TROFF = psroff
|
||||
MSMACROS = -ms
|
||||
TBL = tbl
|
||||
EQN = eqn
|
||||
STD_INCLUDES =
|
||||
STD_CPP_DEFINES = -traditional -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -Dlinux
|
||||
STD_DEFINES = -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -Dlinux
|
||||
EXTRA_LOAD_FLAGS =
|
||||
EXTRA_LIBRARIES =
|
||||
OS_LIBRARIES =
|
||||
TAGS = ctags
|
||||
|
||||
SHAREDCODEDEF =
|
||||
SHLIBDEF =
|
||||
|
||||
PROTO_DEFINES = -DFUNCPROTO=11 -DNARROWPROTO
|
||||
|
||||
INSTPGMFLAGS = -s
|
||||
|
||||
INSTBINFLAGS = -m 0755
|
||||
INSTUIDFLAGS = -s -m 4755
|
||||
INSTLIBFLAGS = -m 0644
|
||||
INSTINCFLAGS = -m 0444
|
||||
INSTMANFLAGS = -m 0444
|
||||
INSTDATFLAGS = -m 0444
|
||||
INSTKMEMFLAGS = -s -m 4755
|
||||
|
||||
PROJECTROOT = /usr/X386
|
||||
|
||||
TOP_INCLUDES = -I$(INCROOT)
|
||||
|
||||
CDEBUGFLAGS = -O2
|
||||
CCOPTIONS = -m486 -DNO_ASM -fwritable-strings
|
||||
ANSICCOPTIONS =
|
||||
|
||||
ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
|
||||
ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES)
|
||||
CFLAGS = $(ANSICCOPTIONS) $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
|
||||
LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)
|
||||
|
||||
LDLIBS = $(OS_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
|
||||
|
||||
LDOPTIONS = $(ANSICCOPTIONS) $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) -L$(USRLIBDIR)
|
||||
|
||||
LDCOMBINEFLAGS = -r
|
||||
DEPENDFLAGS =
|
||||
|
||||
MACROFILE = x386.cf
|
||||
RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
|
||||
|
||||
IMAKE_DEFINES =
|
||||
|
||||
IRULESRC = $(CONFIGDIR)
|
||||
IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
|
||||
|
||||
ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# X Window System Build Parameters
|
||||
# $XFree86: mit/config/Project.tmpl,v 1.13 1993/03/27 03:32:45 dawes Exp $
|
||||
# $XConsortium: Project.tmpl,v 1.138.1.1 92/11/11 09:49:19 rws Exp $
|
||||
|
||||
_percentC_ = %C
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# X Window System make variables; this need to be coordinated with rules
|
||||
|
||||
PATHSEP = /
|
||||
USRLIBDIR = /usr/X386/lib
|
||||
BINDIR = /usr/X386/bin
|
||||
INCROOT = /usr/X386/include
|
||||
BUILDINCROOT = $(TOP)
|
||||
BUILDINCDIR = $(BUILDINCROOT)/X11
|
||||
BUILDINCTOP = ..
|
||||
INCDIR = $(INCROOT)/X11
|
||||
ADMDIR = /usr/adm
|
||||
LIBDIR = $(USRLIBDIR)/X11
|
||||
CONFIGDIR = $(LIBDIR)/config
|
||||
LINTLIBDIR = $(USRLIBDIR)/lint
|
||||
|
||||
FONTDIR = $(LIBDIR)/fonts
|
||||
XINITDIR = $(LIBDIR)/xinit
|
||||
XDMDIR = $(LIBDIR)/xdm
|
||||
TWMDIR = $(LIBDIR)/twm
|
||||
MANPATH = /usr/X386/man
|
||||
MANSOURCEPATH = $(MANPATH)/man
|
||||
MANSUFFIX = 1x
|
||||
LIBMANSUFFIX = 3x
|
||||
MANDIR = $(MANSOURCEPATH)1
|
||||
LIBMANDIR = $(MANSOURCEPATH)3
|
||||
NLSDIR = $(LIBDIR)/nls
|
||||
PEXAPIDIR = $(LIBDIR)/PEX
|
||||
XAPPLOADDIR = $(LIBDIR)/app-defaults
|
||||
FONTCFLAGS = -t
|
||||
LINKKITDIR = $(USRLIBDIR)/Server
|
||||
|
||||
INSTAPPFLAGS = $(INSTDATFLAGS)
|
||||
|
||||
IMAKE = imake
|
||||
DEPEND = makedepend
|
||||
RGB = rgb
|
||||
|
||||
FONTC = bdftopcf
|
||||
|
||||
MKFONTDIR = mkfontdir
|
||||
MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier
|
||||
|
||||
CONFIGSRC = $(TOP)/config
|
||||
DOCUTILSRC = $(TOP)/doc/util
|
||||
CLIENTSRC = $(TOP)/clients
|
||||
DEMOSRC = $(TOP)/demos
|
||||
LIBSRC = $(TOP)/lib
|
||||
FONTSRC = $(TOP)/fonts
|
||||
INCLUDESRC = $(TOP)/X11
|
||||
SERVERSRC = $(TOP)/server
|
||||
UTILSRC = $(TOP)/util
|
||||
SCRIPTSRC = $(UTILSRC)/scripts
|
||||
EXAMPLESRC = $(TOP)/examples
|
||||
CONTRIBSRC = $(TOP)/../contrib
|
||||
DOCSRC = $(TOP)/doc
|
||||
RGBSRC = $(TOP)/rgb
|
||||
DEPENDSRC = $(UTILSRC)/makedepend
|
||||
IMAKESRC = $(CONFIGSRC)
|
||||
XAUTHSRC = $(LIBSRC)/Xau
|
||||
XLIBSRC = $(LIBSRC)/X
|
||||
XMUSRC = $(LIBSRC)/Xmu
|
||||
TOOLKITSRC = $(LIBSRC)/Xt
|
||||
AWIDGETSRC = $(LIBSRC)/Xaw
|
||||
OLDXLIBSRC = $(LIBSRC)/oldX
|
||||
XDMCPLIBSRC = $(LIBSRC)/Xdmcp
|
||||
BDFTOSNFSRC = $(FONTSRC)/bdftosnf
|
||||
BDFTOSNFSRC = $(FONTSRC)/clients/bdftosnf
|
||||
BDFTOPCFSRC = $(FONTSRC)/clients/bdftopcf
|
||||
MKFONTDIRSRC = $(FONTSRC)/clients/mkfontdir
|
||||
FSLIBSRC = $(FONTSRC)/lib/fs
|
||||
FONTSERVERSRC = $(FONTSRC)/server
|
||||
EXTENSIONSRC = $(TOP)/extensions
|
||||
XILIBSRC = $(EXTENSIONSRC)/lib/xinput
|
||||
PEXLIBSRC = $(EXTENSIONSRC)/lib/PEXlib
|
||||
PHIGSLIBSRC = $(EXTENSIONSRC)/lib/PEX
|
||||
|
||||
# $XFree86: mit/config/lnuxLib.tmpl,v 1.1 1993/04/16 14:06:06 dawes Exp $
|
||||
|
||||
SHLIBLDFLAGS =
|
||||
PICFLAGS = -B/usr/dll/jump/
|
||||
|
||||
DEPEXTENSIONLIB =
|
||||
EXTENSIONLIB = -lXext
|
||||
|
||||
DEPXLIB = $(DEPEXTENSIONLIB)
|
||||
XLIB = $(EXTENSIONLIB) -lX11
|
||||
|
||||
DEPXMULIB =
|
||||
XMULIB = -lXmu
|
||||
|
||||
DEPXTOOLLIB =
|
||||
XTOOLLIB = -lXt
|
||||
|
||||
DEPXAWLIB =
|
||||
XAWLIB = -lXaw
|
||||
|
||||
DEPXILIB =
|
||||
XILIB = -lXi
|
||||
|
||||
DEPXTESTLIB =
|
||||
XTESTLIB = -lXtst
|
||||
|
||||
DEPPEXLIB =
|
||||
PEXLIB = -lPEX5
|
||||
|
||||
SOXLIBREV = 3.0.1
|
||||
SOXTREV = 3.0.1
|
||||
SOXAWREV = 3.0.1
|
||||
SOOLDXREV = 3.0.1
|
||||
SOXMUREV = 3.0.1
|
||||
SOXEXTREV = 3.0.1
|
||||
SOXINPUTREV = 3.0.1
|
||||
SOPEXREV = 1.0.1
|
||||
|
||||
DEPXAUTHLIB = $(USRLIBDIR)/libXau.a
|
||||
XAUTHLIB = -lXau
|
||||
DEPXDMCPLIB = $(USRLIBDIR)/libXdmcp.a
|
||||
XDMCPLIB = -lXdmcp
|
||||
|
||||
DEPOLDXLIB = $(USRLIBDIR)/liboldX.a
|
||||
OLDXLIB = -loldX
|
||||
|
||||
DEPPHIGSLIB = $(USRLIBDIR)/libphigs.a
|
||||
PHIGSLIB = -lphigs
|
||||
|
||||
DEPXBSDLIB = $(USRLIBDIR)/libXbsd.a
|
||||
XBSDLIB = -lXbsd
|
||||
|
||||
LINTEXTENSIONLIB = $(LINTLIBDIR)/llib-lXext.ln
|
||||
LINTXLIB = $(LINTLIBDIR)/llib-lX11.ln
|
||||
LINTXMU = $(LINTLIBDIR)/llib-lXmu.ln
|
||||
LINTXTOOL = $(LINTLIBDIR)/llib-lXt.ln
|
||||
LINTXAW = $(LINTLIBDIR)/llib-lXaw.ln
|
||||
LINTXI = $(LINTLIBDIR)/llib-lXi.ln
|
||||
LINTPEX = $(LINTLIBDIR)/llib-lPEX5.ln
|
||||
LINTPHIGS = $(LINTLIBDIR)/llib-lphigs.ln
|
||||
|
||||
DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
|
||||
|
||||
DEPLIBS1 = $(DEPLIBS)
|
||||
DEPLIBS2 = $(DEPLIBS)
|
||||
DEPLIBS3 = $(DEPLIBS)
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Imake rules for building libraries, programs, scripts, and data files
|
||||
# $XFree86: mit/config/Imake.rules,v 1.9 1993/03/23 12:56:27 dawes Exp $
|
||||
# rules: $XConsortium: Imake.rules,v 1.123 91/09/16 20:12:16 rws Exp $
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# start of Imakefile
|
||||
|
||||
# $Id$
|
||||
|
||||
INCLUDES = -I$(TOP)/include
|
||||
|
||||
# Imake rules go here
|
||||
|
||||
# First, dll description to files etc
|
||||
|
||||
MODULE = etc
|
||||
|
||||
all::
|
||||
|
||||
depend::
|
||||
|
||||
clean::
|
||||
$(RM_CMD) "#"*
|
||||
|
||||
includes::
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# common rules for all Makefiles - do not edit
|
||||
|
||||
emptyrule::
|
||||
|
||||
clean::
|
||||
$(RM_CMD) "#"*
|
||||
|
||||
Makefile::
|
||||
-@if [ -f Makefile ]; then set -x; \
|
||||
$(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
|
||||
else exit 0; fi
|
||||
$(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
|
||||
|
||||
tags::
|
||||
$(TAGS) -w *.[ch]
|
||||
$(TAGS) -xw *.[ch] > TAGS
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# empty rules for directories that do not have SUBDIRS - do not edit
|
||||
|
||||
install::
|
||||
@echo "install in $(CURRENT_DIR) done"
|
||||
|
||||
install.man::
|
||||
@echo "install.man in $(CURRENT_DIR) done"
|
||||
|
||||
install.linkkit::
|
||||
@echo "install.linkkit in $(CURRENT_DIR) done"
|
||||
|
||||
Makefiles::
|
||||
|
||||
includes::
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# dependencies generated by makedepend
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
#include "../autoconf.h"
|
||||
#include "../Wine.tmpl"
|
||||
|
||||
MODULE = if1632
|
||||
|
@ -28,6 +29,7 @@ MakeDllFromSpec(sound,$(TOP)/$(MODULE))
|
|||
MakeDllFromSpec(unixlib,$(TOP)/$(MODULE))
|
||||
MakeDllFromSpec(user,$(TOP)/$(MODULE))
|
||||
MakeDllFromSpec(win87em,$(TOP)/$(MODULE))
|
||||
MakeDllFromSpec(winsock,$(TOP)/$(MODULE))
|
||||
|
||||
/*
|
||||
* Yes I know *.o is not very clever, but can you do it cleaner ?
|
||||
|
@ -37,7 +39,7 @@ WineRelocatableTarget($(TOP)/$(MODULE),*.o,)
|
|||
$(TOP)/$(MODULE).o: $(OBJS)
|
||||
|
||||
clean::
|
||||
$(RM) dll*
|
||||
$(RM) dll* dtb*
|
||||
|
||||
depend::
|
||||
|
||||
|
|
|
@ -1,58 +0,0 @@
|
|||
CFLAGS=$(COPTS) $(DEBUGOPTS) -I$(INCLUDE_DIR)
|
||||
|
||||
BUILDOBJS=dll_kernel.o dll_user.o dll_gdi.o dll_unixlib.o \
|
||||
dll_win87em.o dll_shell.o dll_sound.o dll_keyboard.o\
|
||||
dll_kernel_tab.o dll_user_tab.o dll_gdi_tab.o dll_unixlib_tab.o \
|
||||
dll_win87em_tab.o dll_shell_tab.o \
|
||||
dll_sound_tab.o dll_keyboard_tab.o
|
||||
|
||||
MUST_BE_LINKED_FIRST=call.o $(BUILDOBJS)
|
||||
|
||||
OBJS=$(MUST_BE_LINKED_FIRST) callback.o relay.o
|
||||
|
||||
# Uncomment the following 2 lines for use with FreeBSD
|
||||
# %.o: %.S
|
||||
# $(CC) $(ASFLAGS) $(CPPFLAGS) $(TARGET_MACH) $(COPTS) -c -o $@ $<
|
||||
|
||||
default: if1632.o
|
||||
|
||||
if1632.o: $(OBJS)
|
||||
$(LD) -r -o if1632.o $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -f *.o *~ *.s dll_* *.a *#
|
||||
|
||||
dll_kernel.S dll_kernel_tab.c: ../tools/build kernel.spec
|
||||
../tools/build kernel.spec
|
||||
|
||||
dll_user.S dll_user_tab.c: ../tools/build user.spec
|
||||
../tools/build user.spec
|
||||
|
||||
dll_gdi.S dll_gdi_tab.c: ../tools/build gdi.spec
|
||||
../tools/build gdi.spec
|
||||
|
||||
dll_unixlib.S dll_unixlib_tab.c: ../tools/build unixlib.spec
|
||||
../tools/build unixlib.spec
|
||||
|
||||
dll_win87em.S dll_win87em_tab.c: ../tools/build win87em.spec
|
||||
../tools/build win87em.spec
|
||||
|
||||
dll_shell.S dll_shell_tab.c: ../tools/build shell.spec
|
||||
../tools/build shell.spec
|
||||
|
||||
dll_sound.S dll_sound_tab.c: ../tools/build sound.spec
|
||||
../tools/build sound.spec
|
||||
|
||||
dll_keyboard.S dll_keyboard_tab.c: ../tools/build keyboard.spec
|
||||
../tools/build keyboard.spec
|
||||
|
||||
depend:
|
||||
$(CC) $(CFLAGS) -M *.c > .depend
|
||||
|
||||
ifeq (.depend,$(wildcard .depend))
|
||||
include .depend
|
||||
endif
|
||||
|
||||
|
||||
|
||||
|
|
@ -102,11 +102,11 @@ _CallToInit16:
|
|||
movw %ax,%ss
|
||||
movl %esp,%eax
|
||||
movl %eax,%ebp
|
||||
#if 1
|
||||
movw $UDATASEL,%ax
|
||||
movw %ax,%fs
|
||||
movw %ax,%gs
|
||||
#endif
|
||||
movw %ds,%ax
|
||||
|
||||
/*
|
||||
* Call entry point
|
||||
*/
|
||||
|
|
|
@ -33,9 +33,12 @@ length 490
|
|||
23 pascal Arc(word s_word s_word s_word s_word s_word s_word s_word s_word)
|
||||
Arc(1 2 3 4 5 6 7 8 9)
|
||||
24 pascal Ellipse(word s_word s_word s_word s_word) Ellipse(1 2 3 4 5)
|
||||
25 pascal FloodFill(word word word long) FloodFill(1 2 3 4)
|
||||
26 pascal Pie(word s_word s_word s_word s_word s_word s_word s_word s_word)
|
||||
Pie(1 2 3 4 5 6 7 8 9)
|
||||
27 pascal Rectangle(word s_word s_word s_word s_word) Rectangle(1 2 3 4 5)
|
||||
28 pascal RoundRect(word s_word s_word s_word s_word s_word s_word)
|
||||
RoundRect(1 2 3 4 5 6 7)
|
||||
29 pascal PatBlt(word s_word s_word s_word s_word long) PatBlt(1 2 3 4 5 6)
|
||||
30 pascal SaveDC(word) SaveDC(1)
|
||||
31 pascal SetPixel(word s_word s_word long) SetPixel(1 2 3 4)
|
||||
|
@ -135,6 +138,7 @@ length 490
|
|||
346 pascal SetTextAlign(word word) SetTextAlign(1 2)
|
||||
348 pascal Chord(word s_word s_word s_word s_word s_word s_word s_word s_word)
|
||||
Chord(1 2 3 4 5 6 7 8 9)
|
||||
349 pascal SetMapperFlags(word word) SetMapperFlags(1 2)
|
||||
350 pascal GetCharWidth(word word word ptr) GetCharWidth(1 2 3 4)
|
||||
360 pascal CreatePalette(ptr) CreatePalette(1)
|
||||
363 pascal GetPaletteEntries(word word word ptr) GetPaletteEntries(1 2 3 4)
|
||||
|
|
|
@ -4,7 +4,8 @@ name kernel
|
|||
id 1
|
||||
length 415
|
||||
|
||||
3 return GetVersion 0 0x301
|
||||
3 pascal GetVersion() GetVersion()
|
||||
#return GetVersion 0 0x301
|
||||
4 pascal LocalInit(word word word) LocalInit(1 2 3)
|
||||
5 pascal LocalAlloc(word word) LocalAlloc(1 2)
|
||||
6 pascal LocalReAlloc(word word word) LocalReAlloc(1 2 3)
|
||||
|
@ -30,7 +31,10 @@ length 415
|
|||
30 pascal WaitEvent(word) KERNEL_WaitEvent(1)
|
||||
34 pascal SetTaskQueue(word word) SetTaskQueue(1 2)
|
||||
35 pascal GetTaskQueue(word) GetTaskQueue(1)
|
||||
49 pascal GetModuleFileName(word ptr s_word) KERNEL_GetModuleFileName(1 2 3)
|
||||
36 pascal GetCurrentTask() GetCurrentTask()
|
||||
47 pascal GetModuleHandle(ptr) GetModuleHandle(1)
|
||||
48 pascal GetModuleUsage(word) GetModuleUsage(1)
|
||||
49 pascal GetModuleFileName(word ptr s_word) GetModuleFileName(1 2 3)
|
||||
50 pascal GetProcAddress(word ptr) GetProcAddress(1 2)
|
||||
51 pascal MakeProcInstance(ptr word) CALLBACK_MakeProcInstance(1 2)
|
||||
52 pascal FreeProcInstance(ptr) FreeProcInstance(1)
|
||||
|
@ -42,13 +46,13 @@ length 415
|
|||
62 pascal LockResource(word) LockResource(1)
|
||||
63 pascal FreeResource(word) FreeResource(1)
|
||||
64 pascal AccessResource(word word) AccessResource(1 2)
|
||||
74 pascal OpenFile(ptr ptr word) KERNEL_OpenFile(1 2 3)
|
||||
81 pascal _lclose(word) KERNEL__lclose(1)
|
||||
82 pascal _lread(word ptr word) KERNEL__lread(1 2 3)
|
||||
83 pascal _lcreate(ptr word) KERNEL__lcreate(1 2)
|
||||
84 pascal _llseek(word long word) KERNEL__llseek(1 2 3)
|
||||
85 pascal _lopen(ptr word) KERNEL__lopen(1 2)
|
||||
86 pascal _lwrite(word ptr word) KERNEL__lwrite(1 2 3)
|
||||
74 pascal OpenFile(ptr ptr word) OpenFile(1 2 3)
|
||||
81 pascal _lclose(word) _lclose(1)
|
||||
82 pascal _lread(word ptr word) _lread(1 2 3)
|
||||
83 pascal _lcreate(ptr word) _lcreate(1 2)
|
||||
84 pascal _llseek(word long word) _llseek(1 2 3)
|
||||
85 pascal _lopen(ptr word) _lopen(1 2)
|
||||
86 pascal _lwrite(word ptr word) _lwrite(1 2 3)
|
||||
88 pascal lstrcpy(ptr ptr) lstrcpy(1 2)
|
||||
89 pascal lstrcat(ptr ptr) lstrcat(1 2)
|
||||
90 pascal lstrlen(ptr) lstrlen(1)
|
||||
|
@ -58,10 +62,10 @@ length 415
|
|||
92 pascal GetTempDrive(byte) GetTempDrive(1)
|
||||
95 pascal LoadLibrary(ptr) LoadLibrary(1)
|
||||
96 pascal FreeLibrary(word) FreeLibrary(1)
|
||||
97 pascal GetTempFileName(byte ptr word ptr) GetTempDrive(1 2 3 4)
|
||||
97 pascal GetTempFileName(byte ptr word ptr) GetTempFileName(1 2 3 4)
|
||||
102 register DOS3Call(word word word word word
|
||||
word word word word word)
|
||||
KERNEL_DOS3Call()
|
||||
DOS3Call()
|
||||
107 pascal SetErrorMode(word) SetErrorMode(1)
|
||||
111 pascal GlobalWire(word) GlobalLock(1)
|
||||
112 pascal GlobalUnWire(word) GlobalUnlock(1)
|
||||
|
@ -74,10 +78,12 @@ length 415
|
|||
129 pascal WritePrivateProfileString(ptr ptr ptr ptr)
|
||||
WritePrivateProfileString(1 2 3 4)
|
||||
131 pascal GetDOSEnvironment() GetDOSEnvironment()
|
||||
132 return GetWinFlags 0 0x413
|
||||
132 pascal GetWinFlags() GetWinFlags()
|
||||
#132 return GetWinFlags 0 0x413
|
||||
134 pascal GetWindowsDirectory(ptr word) GetWindowsDirectory(1 2)
|
||||
135 pascal GetSystemDirectory(ptr word) GetSystemDirectory(1 2)
|
||||
136 pascal GetDriveType(byte) GetWindowsDirectory(1)
|
||||
137 pascal FatalAppExit(word ptr) FatalAppExit(1 2)
|
||||
152 return GetNumTasks 0 1
|
||||
154 return GlobalNotify 4 0
|
||||
163 pascal GlobalLRUOldest(word) ReturnArg(1)
|
||||
|
|
|
@ -18,10 +18,11 @@ static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
|||
#include "segmem.h"
|
||||
#include "prototypes.h"
|
||||
#include "dlls.h"
|
||||
#include "options.h"
|
||||
|
||||
/* #define DEBUG_RELAY /* */
|
||||
#define DEBUG_RELAY /* */
|
||||
|
||||
#define N_BUILTINS 8
|
||||
#define N_BUILTINS 9
|
||||
|
||||
struct dll_name_table_entry_s dll_builtin_table[N_BUILTINS] =
|
||||
{
|
||||
|
@ -33,6 +34,7 @@ struct dll_name_table_entry_s dll_builtin_table[N_BUILTINS] =
|
|||
{ "SHELL", SHELL_table, 256, 6 },
|
||||
{ "SOUND", SOUND_table, 20, 7 },
|
||||
{ "KEYBOARD",KEYBOARD_table,137, 8 },
|
||||
{ "WINSOCK", WINSOCK_table, 155, 9 },
|
||||
};
|
||||
|
||||
unsigned short *Stack16Frame;
|
||||
|
@ -87,6 +89,7 @@ DLLRelay(unsigned int func_num, unsigned int seg_off)
|
|||
dll_p = &dll_builtin_table[dll_id].dll_table[ordinal];
|
||||
|
||||
#ifdef DEBUG_RELAY
|
||||
if (Options.relay_debug)
|
||||
{
|
||||
unsigned int *ret_addr;
|
||||
unsigned short *stack_p;
|
||||
|
@ -185,10 +188,13 @@ DLLRelay(unsigned int func_num, unsigned int seg_off)
|
|||
arg_table[15]);
|
||||
|
||||
#ifdef DEBUG_RELAY
|
||||
printf("Returning %08.8x from %s (%s.%d)\n",
|
||||
ret_val,
|
||||
dll_p->export_name,
|
||||
dll_builtin_table[dll_id].dll_name, ordinal);
|
||||
if (Options.relay_debug)
|
||||
{
|
||||
printf("Returning %08.8x from %s (%s.%d)\n",
|
||||
ret_val,
|
||||
dll_p->export_name,
|
||||
dll_builtin_table[dll_id].dll_name, ordinal);
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret_val;
|
||||
|
|
|
@ -11,7 +11,7 @@ length 540
|
|||
11 pascal SetSystemTimer(word word word ptr) SetSystemTimer(1 2 3 4)
|
||||
12 pascal KillTimer(word word) KillTimer(1 2)
|
||||
13 pascal GetTickCount() GetTickCount()
|
||||
14 return GetTimerResolution 0 1000
|
||||
14 pascal GetTimerResolution() GetTimerResolution()
|
||||
15 pascal GetCurrentTime() GetTickCount()
|
||||
16 pascal ClipCursor(ptr) ClipCursor(1)
|
||||
17 pascal GetCursorPos(ptr) GetCursorPos(1)
|
||||
|
@ -121,9 +121,23 @@ length 540
|
|||
134 pascal SetWindowWord(word s_word word) SetWindowWord(1 2 3)
|
||||
135 pascal GetWindowLong(word s_word) GetWindowLong(1 2)
|
||||
136 pascal SetWindowLong(word s_word long) SetWindowLong(1 2 3)
|
||||
137 pascal OpenClipboard(word) OpenClipboard(1)
|
||||
138 pascal CloseClipboard() CloseClipboard()
|
||||
139 pascal EmptyClipboard() EmptyClipboard()
|
||||
140 pascal GetClipboardOwner() GetClipboardOwner()
|
||||
141 pascal SetClipboardData(word word) SetClipboardData(1 2)
|
||||
142 pascal GetClipboardData(word) GetClipboardData(1)
|
||||
143 pascal CountClipboardFormats() CountClipboardFormats()
|
||||
144 pascal EnumClipboardFormats(word) EnumClipboardFormats(1)
|
||||
145 pascal RegisterClipboardFormat(ptr) RegisterClipboardFormat(1)
|
||||
146 pascal GetClipboardFormatName(word ptr s_word) GetClipboardFormatName(1 2 3)
|
||||
147 pascal SetClipboardViewer(word) SetClipboardViewer(1)
|
||||
148 pascal GetClipboardViewer() GetClipboardViewer()
|
||||
149 pascal ChangeClipboardChain(word ptr) ChangeClipboardChain(1 2)
|
||||
150 pascal LoadMenu(word ptr) LoadMenu(1 2)
|
||||
151 pascal CreateMenu() CreateMenu()
|
||||
152 pascal DestroyMenu(word) DestroyMenu(1)
|
||||
153 pascal ChangeMenu(word word ptr word word) ChangeMenu(1 2 3 4 5)
|
||||
154 pascal CheckMenuItem(word word word) CheckMenuItem(1 2 3)
|
||||
155 pascal EnableMenuItem(word word word) EnableMenuItem(1 2 3)
|
||||
156 pascal GetSystemMenu(word word) GetSystemMenu(1 2)
|
||||
|
@ -136,7 +150,7 @@ length 540
|
|||
165 pascal SetCaretPos(word word) SetCaretPos(1 2)
|
||||
166 pascal HideCaret(word) HideCaret(1)
|
||||
167 pascal ShowCaret(word) ShowCaret(1)
|
||||
166 pascal SetCaretBlinkTime(word) SetCaretBlinkTime(1)
|
||||
168 pascal SetCaretBlinkTime(word) SetCaretBlinkTime(1)
|
||||
169 pascal GetCaretBlinkTime() GetCaretBlinkTime()
|
||||
171 pascal WinHelp(word word long) WinHelp(1 2 3)
|
||||
173 pascal LoadCursor(word ptr) LoadCursor(1 2)
|
||||
|
@ -152,6 +166,7 @@ length 540
|
|||
183 pascal GetCaretPos(ptr) GetCaretPos(1)
|
||||
190 pascal GetUpdateRect(word ptr word) GetUpdateRect(1 2 3)
|
||||
191 pascal ChildWindowFromPoint(word long) ChildWindowFromPoint(1 2)
|
||||
193 pascal IsClipboardFormatAvailable(word) IsClipboardFormatAvailable(1)
|
||||
200 pascal OpenComm(ptr word word) OpenComm(1 2 3)
|
||||
201 pascal SetCommState(ptr) SetCommState(1)
|
||||
202 pascal GetCommState(word ptr) GetCommState(1 2)
|
||||
|
@ -171,6 +186,7 @@ length 540
|
|||
218 pascal DialogBoxIndirect(word word word ptr) DialogBoxIndirect(1 2 3 4)
|
||||
219 pascal CreateDialogIndirect(word ptr word ptr)
|
||||
CreateDialogIndirect(1 2 3 4)
|
||||
220 pascal LoadMenuIndirect(ptr) LoadMenuIndirect(1)
|
||||
221 pascal ScrollDC(word s_word s_word ptr ptr word ptr)
|
||||
ScrollDC(1 2 3 4 5 6 7)
|
||||
227 pascal GetNextDlgGroupItem(word word word) GetNextDlgGroupItem(1 2 3)
|
||||
|
@ -181,6 +197,7 @@ length 540
|
|||
SetWindowPos(1 2 3 4 5 6 7)
|
||||
236 pascal GetCapture() GetCapture()
|
||||
237 pascal GetUpdateRgn(word word word) GetUpdateRgn(1 2 3)
|
||||
238 pascal ExcludeUpdateRgn(word word) ExcludeUpdateRgn(1 2)
|
||||
239 pascal DialogBoxParam(word ptr word ptr long) DialogBoxParam(1 2 3 4 5)
|
||||
240 pascal DialogBoxIndirectParam(word word word ptr long)
|
||||
DialogBoxIndirectParam(1 2 3 4 5)
|
||||
|
@ -189,6 +206,7 @@ length 540
|
|||
242 pascal CreateDialogIndirectParam(word ptr word ptr long)
|
||||
CreateDialogIndirectParam(1 2 3 4 5)
|
||||
244 pascal EqualRect(ptr ptr) EqualRect(1 2)
|
||||
248 pascal GetOpenClipboardWindow() GetOpenClipboardWindow()
|
||||
258 pascal MapWindowPoints(word word ptr word) MapWindowPoints(1 2 3 4)
|
||||
262 pascal GetWindow(word word) GetWindow(1 2)
|
||||
266 pascal SetMessageQueue(word) SetMessageQueue(1)
|
||||
|
@ -199,6 +217,8 @@ length 540
|
|||
283 pascal RealizePalette(word) RealizePalette(1)
|
||||
286 pascal GetDesktopWindow() GetDesktopWindow()
|
||||
288 pascal GetMessageExtraInfo() GetMessageExtraInfo()
|
||||
290 pascal RedrawWindow(word ptr word word) RedrawWindow(1 2 3 4)
|
||||
308 pascal DefDlgProc(word word word long) DefDlgProc(1 2 3 4)
|
||||
319 pascal ScrollWindowEx(word s_word s_word ptr ptr word ptr word)
|
||||
ScrollWindowEx(1 2 3 4 5 6 7 8)
|
||||
324 pascal FillWindow(word word word word) FillWindow(1 2 3 4)
|
||||
|
@ -209,6 +229,8 @@ length 540
|
|||
370 pascal GetWindowPlacement(word ptr) GetWindowPlacement(1 2)
|
||||
371 pascal SetWindowPlacement(word ptr) SetWindowPlacement(1 2)
|
||||
373 pascal SubtractRect(ptr ptr ptr) SubtractRect(1 2 3)
|
||||
402 pascal GetPriorityClipboardFormat(word ptr s_word)
|
||||
GetPriorityClipboardFormat(1 2 3)
|
||||
403 pascal UnregisterClass(ptr word) UnregisterClass(1 2)
|
||||
404 pascal GetClassInfo(word ptr ptr) GetClassInfo(1 2 3)
|
||||
406 pascal CreateCursor(word word word word word ptr ptr)
|
||||
|
@ -221,6 +243,7 @@ length 540
|
|||
415 pascal CreatePopupMenu() CreatePopupMenu()
|
||||
416 pascal TrackPopupMenu(word word word word word word ptr)
|
||||
TrackPopupMenu(1 2 3 4 5 6 7)
|
||||
417 pascal GetMenuCheckMarkDimensions() GetMenuCheckMarkDimensions()
|
||||
418 pascal SetMenuItemBitmaps(word word word word word)
|
||||
SetMenuItemBitmaps(1 2 3 4 5)
|
||||
420 pascal wsprintf(ptr ptr) wsprintf(1 2)
|
||||
|
@ -246,3 +269,4 @@ length 540
|
|||
471 pascal lstrcmpi(ptr ptr) lstrcmpi(1 2)
|
||||
472 pascal AnsiNext(ptr) AnsiNext(1 )
|
||||
473 pascal AnsiPrev(ptr ptr) AnsiPrev(1 2)
|
||||
483 pascal SystemParametersInfo(word word ptr word) SystemParametersInfo(1 2 3 4)
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
#
|
||||
# File: winsock.def
|
||||
# System: MS-Windows 3.x
|
||||
# Summary: Module definition file for Windows Sockets DLL.
|
||||
#
|
||||
name winsock
|
||||
id 9
|
||||
length 155
|
||||
|
||||
1 pascal accept(long ptr ptr) Winsock_accept(1 2 3)
|
||||
2 pascal bind(long ptr word) Winsock_bind(1 2 3)
|
||||
3 pascal closesocket(long) Winsock_closesocket(1)
|
||||
4 pascal connect(long ptr word) Winsock_connect(1 2 3)
|
||||
5 pascal getpeername(long ptr ptr) Winsock_getpeername(1 2 3)
|
||||
6 pascal getsockname(long ptr ptr) Winsock_getsockname(1 2 3)
|
||||
7 pascal getsockopt(long word word ptr ptr)
|
||||
Winsock_getsockopt(1 2 3 4 5)
|
||||
8 pascal htonl(long) Winsock_htonl(1)
|
||||
9 pascal htons(word) Winsock_htons(1)
|
||||
10 pascal inet_addr(ptr) Winsock_inet_addr(1)
|
||||
11 pascal inet_ntoa(long) Winsock_inet_ntoa(1)
|
||||
12 pascal ioctlsocket(long long ptr) Winsock_ioctlsocket(1 2 3)
|
||||
13 pascal listen(long word) Winsock_listen(1 2)
|
||||
14 pascal ntohl(long) Winsock_ntohl(1)
|
||||
15 pascal ntohs(word) Winsock_ntohs(1)
|
||||
16 pascal recv(long ptr word word) Winsock_recv(1 2 3 4)
|
||||
17 pascal recvfrom(long ptr word word ptr ptr)
|
||||
Winsock_recvfrom(1 2 3 4 5 6)
|
||||
18 pascal select(word ptr ptr ptr ptr word)
|
||||
Winsock_select(1 2 3 4 5 6)
|
||||
19 pascal send(long ptr word word) Winsock_send(1 2 3 4)
|
||||
20 pascal sendto(long ptr word word ptr ptr)
|
||||
Winsock_sendto(1 2 3 4 5 6)
|
||||
21 pascal setsockopt(long word word ptr word)
|
||||
Winsock_setsockopt(1 2 3 4 5)
|
||||
22 pascal shutdown(long word) Winsock_shutdown(1 2)
|
||||
23 pascal socket(word word word) Winsock_socket(1 2 3)
|
||||
|
||||
51 pascal gethostbyaddr(ptr word word) Winsock_gethostbyaddr(1 2 3)
|
||||
52 pascal gethostbyname(ptr) Winsock_gethostbyname(1)
|
||||
53 pascal getprotobyname(ptr) Winsock_getprotobyname(1)
|
||||
54 pascal getprotobynumber(word) Winsock_getprotobynumber(1)
|
||||
55 pascal getservbyname(ptr) Winsock_getservbyname(1)
|
||||
56 pascal getservbyport(word ptr) Winsock_getservbyport(1 2)
|
||||
57 pascal gethostname(ptr word) Winsock_gethostname(1 2)
|
||||
|
||||
101 pascal WSAAsyncSelect(long word word long)
|
||||
WSAAsyncSelect(1 2 3 4)
|
||||
102 pascal WSAAsyncGetHostByAddr(word word ptr word word ptr word)
|
||||
WSAAsyncGetHostByAddr(1 2 3 4 5 6 7)
|
||||
103 pascal WSAAsyncGetHostByName(word word ptr ptr word)
|
||||
WSAAsyncGetHostByName(1 2 3 4 5)
|
||||
104 pascal WSAAsyncGetProtoByNumber(word word word ptr word)
|
||||
WSAAsyncGetProtoByNumber(1 2 3 4 5)
|
||||
105 pascal WSAAsyncGetProtoByName(word word ptr ptr word)
|
||||
WSAAsyncGetProtoByName(1 2 3 4 5)
|
||||
106 pascal WSAAsyncGetServByPort(word word word ptr ptr word)
|
||||
WSAAsyncGetServByPort(1 2 3 4 5 6)
|
||||
107 pascal WSAAsyncGetServByName(word word ptr ptr ptr word)
|
||||
WSAAsyncGetServByName(1 2 3 4 5 6)
|
||||
108 pascal WSACancelAsyncRequest(word) WSACancelAsyncRequest(1)
|
||||
109 pascal WSASetBlockingHook() WSASetBlockingHook()
|
||||
110 pascal WSAUnhookBlockingHook() WSAUnhookBlockingHook()
|
||||
111 pascal WSAGetLastError() WSAGetLastError()
|
||||
112 pascal WSASetLastError(word) WSASetLastError(1)
|
||||
113 pascal WSACancelBlockingCall() WSACancelBlockingCall()
|
||||
114 pascal WSAIsBlocking() WSAIsBlocking()
|
||||
115 pascal WSAStartup(word ptr) WSAStartup(1 2)
|
||||
116 pascal WSACleanup() WSACleanup()
|
||||
|
||||
151 pascal __WSAFDIsSet(long ptr) WSAFDIsSet(1 2)
|
360
include/Makefile
360
include/Makefile
|
@ -1,360 +0,0 @@
|
|||
# Makefile generated by imake - do not edit!
|
||||
# $XConsortium: imake.c,v 1.65 91/07/25 17:50:17 rws Exp $
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Makefile generated from "Imake.tmpl" and <Imakefile>
|
||||
# $XFree86: mit/config/Imake.tmpl,v 1.17 1993/06/03 15:26:36 dawes Exp $
|
||||
# $XConsortium: Imake.tmpl,v 1.139 91/09/16 08:52:48 rws Exp $
|
||||
#
|
||||
# Platform-specific parameters may be set in the appropriate <vendor>.cf
|
||||
# configuration files. Site-specific parameters should be set in the file
|
||||
# site.def. Full rebuilds are recommended if any parameters are changed.
|
||||
#
|
||||
# If your C preprocessor does not define any unique symbols, you will need
|
||||
# to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
|
||||
# "make World" the first time).
|
||||
#
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# site-specific configuration parameters that need to come before
|
||||
# the platform-specific parameters - edit site.def to change
|
||||
|
||||
# $XFree86: mit/config/site.def,v 1.65 1993/06/04 16:02:47 dawes Exp $
|
||||
# site: $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $
|
||||
|
||||
# obz: changes for making Linux distribution
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# platform-specific configuration parameters - edit x386.cf to change
|
||||
|
||||
# $XFree86: mit/config/x386.cf,v 1.90 1993/06/04 16:02:50 dawes Exp $
|
||||
# platform: $XConsortium: x386.cf,v 1.7 91/08/16 19:30:10 gildea Exp $
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# XFree86 version definition
|
||||
# $XFree86: mit/config/xf86_vers.def,v 1.5 1993/06/01 09:12:47 dawes Exp $
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# XFree86 version: 1300
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
# $XFree86: mit/config/lnuxLib.rules,v 1.2 1993/06/02 13:48:12 dawes Exp $
|
||||
|
||||
DLL_BINDIR = /usr/dll/bin
|
||||
|
||||
# operating system: Linux
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# site-specific configuration parameters that go after
|
||||
# the platform-specific parameters - edit site.def to change
|
||||
|
||||
# $XFree86: mit/config/site.def,v 1.65 1993/06/04 16:02:47 dawes Exp $
|
||||
# site: $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $
|
||||
|
||||
# obz: changes for making Linux distribution
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
TOP = ../.
|
||||
CURRENT_DIR = ./include
|
||||
|
||||
AR = ar clq
|
||||
BOOTSTRAPCFLAGS =
|
||||
CC = gcc
|
||||
AS = as
|
||||
|
||||
LEX = flex
|
||||
|
||||
YACC = bison -y
|
||||
|
||||
COMPRESS = compress
|
||||
CPP = /lib/cpp $(STD_CPP_DEFINES)
|
||||
PREPROCESSCMD = /lib/cpp $(STD_CPP_DEFINES)
|
||||
INSTALL = install
|
||||
LD = ld
|
||||
LINT = lint
|
||||
LINTLIBFLAG = -C
|
||||
LINTOPTS = -axz
|
||||
LN = ln -s
|
||||
MAKE = make
|
||||
MV = mv
|
||||
CP = cp
|
||||
|
||||
RANLIB = ranlib
|
||||
RANLIBINSTFLAGS =
|
||||
|
||||
RM = rm -f
|
||||
TROFF = psroff
|
||||
MSMACROS = -ms
|
||||
TBL = tbl
|
||||
EQN = eqn
|
||||
STD_INCLUDES =
|
||||
STD_CPP_DEFINES = -traditional -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -Dlinux
|
||||
STD_DEFINES = -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -Dlinux
|
||||
EXTRA_LOAD_FLAGS =
|
||||
EXTRA_LIBRARIES =
|
||||
OS_LIBRARIES =
|
||||
TAGS = ctags
|
||||
|
||||
SHAREDCODEDEF =
|
||||
SHLIBDEF =
|
||||
|
||||
PROTO_DEFINES = -DFUNCPROTO=11 -DNARROWPROTO
|
||||
|
||||
INSTPGMFLAGS = -s
|
||||
|
||||
INSTBINFLAGS = -m 0755
|
||||
INSTUIDFLAGS = -s -m 4755
|
||||
INSTLIBFLAGS = -m 0644
|
||||
INSTINCFLAGS = -m 0444
|
||||
INSTMANFLAGS = -m 0444
|
||||
INSTDATFLAGS = -m 0444
|
||||
INSTKMEMFLAGS = -s -m 4755
|
||||
|
||||
PROJECTROOT = /usr/X386
|
||||
|
||||
TOP_INCLUDES = -I$(INCROOT)
|
||||
|
||||
CDEBUGFLAGS = -O2
|
||||
CCOPTIONS = -m486 -DNO_ASM -fwritable-strings
|
||||
ANSICCOPTIONS =
|
||||
|
||||
ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
|
||||
ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES)
|
||||
CFLAGS = $(ANSICCOPTIONS) $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
|
||||
LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)
|
||||
|
||||
LDLIBS = $(OS_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
|
||||
|
||||
LDOPTIONS = $(ANSICCOPTIONS) $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) -L$(USRLIBDIR)
|
||||
|
||||
LDCOMBINEFLAGS = -r
|
||||
DEPENDFLAGS =
|
||||
|
||||
MACROFILE = x386.cf
|
||||
RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
|
||||
|
||||
IMAKE_DEFINES =
|
||||
|
||||
IRULESRC = $(CONFIGDIR)
|
||||
IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
|
||||
|
||||
ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# X Window System Build Parameters
|
||||
# $XFree86: mit/config/Project.tmpl,v 1.13 1993/03/27 03:32:45 dawes Exp $
|
||||
# $XConsortium: Project.tmpl,v 1.138.1.1 92/11/11 09:49:19 rws Exp $
|
||||
|
||||
_percentC_ = %C
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# X Window System make variables; this need to be coordinated with rules
|
||||
|
||||
PATHSEP = /
|
||||
USRLIBDIR = /usr/X386/lib
|
||||
BINDIR = /usr/X386/bin
|
||||
INCROOT = /usr/X386/include
|
||||
BUILDINCROOT = $(TOP)
|
||||
BUILDINCDIR = $(BUILDINCROOT)/X11
|
||||
BUILDINCTOP = ..
|
||||
INCDIR = $(INCROOT)/X11
|
||||
ADMDIR = /usr/adm
|
||||
LIBDIR = $(USRLIBDIR)/X11
|
||||
CONFIGDIR = $(LIBDIR)/config
|
||||
LINTLIBDIR = $(USRLIBDIR)/lint
|
||||
|
||||
FONTDIR = $(LIBDIR)/fonts
|
||||
XINITDIR = $(LIBDIR)/xinit
|
||||
XDMDIR = $(LIBDIR)/xdm
|
||||
TWMDIR = $(LIBDIR)/twm
|
||||
MANPATH = /usr/X386/man
|
||||
MANSOURCEPATH = $(MANPATH)/man
|
||||
MANSUFFIX = 1x
|
||||
LIBMANSUFFIX = 3x
|
||||
MANDIR = $(MANSOURCEPATH)1
|
||||
LIBMANDIR = $(MANSOURCEPATH)3
|
||||
NLSDIR = $(LIBDIR)/nls
|
||||
PEXAPIDIR = $(LIBDIR)/PEX
|
||||
XAPPLOADDIR = $(LIBDIR)/app-defaults
|
||||
FONTCFLAGS = -t
|
||||
LINKKITDIR = $(USRLIBDIR)/Server
|
||||
|
||||
INSTAPPFLAGS = $(INSTDATFLAGS)
|
||||
|
||||
IMAKE = imake
|
||||
DEPEND = makedepend
|
||||
RGB = rgb
|
||||
|
||||
FONTC = bdftopcf
|
||||
|
||||
MKFONTDIR = mkfontdir
|
||||
MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier
|
||||
|
||||
CONFIGSRC = $(TOP)/config
|
||||
DOCUTILSRC = $(TOP)/doc/util
|
||||
CLIENTSRC = $(TOP)/clients
|
||||
DEMOSRC = $(TOP)/demos
|
||||
LIBSRC = $(TOP)/lib
|
||||
FONTSRC = $(TOP)/fonts
|
||||
INCLUDESRC = $(TOP)/X11
|
||||
SERVERSRC = $(TOP)/server
|
||||
UTILSRC = $(TOP)/util
|
||||
SCRIPTSRC = $(UTILSRC)/scripts
|
||||
EXAMPLESRC = $(TOP)/examples
|
||||
CONTRIBSRC = $(TOP)/../contrib
|
||||
DOCSRC = $(TOP)/doc
|
||||
RGBSRC = $(TOP)/rgb
|
||||
DEPENDSRC = $(UTILSRC)/makedepend
|
||||
IMAKESRC = $(CONFIGSRC)
|
||||
XAUTHSRC = $(LIBSRC)/Xau
|
||||
XLIBSRC = $(LIBSRC)/X
|
||||
XMUSRC = $(LIBSRC)/Xmu
|
||||
TOOLKITSRC = $(LIBSRC)/Xt
|
||||
AWIDGETSRC = $(LIBSRC)/Xaw
|
||||
OLDXLIBSRC = $(LIBSRC)/oldX
|
||||
XDMCPLIBSRC = $(LIBSRC)/Xdmcp
|
||||
BDFTOSNFSRC = $(FONTSRC)/bdftosnf
|
||||
BDFTOSNFSRC = $(FONTSRC)/clients/bdftosnf
|
||||
BDFTOPCFSRC = $(FONTSRC)/clients/bdftopcf
|
||||
MKFONTDIRSRC = $(FONTSRC)/clients/mkfontdir
|
||||
FSLIBSRC = $(FONTSRC)/lib/fs
|
||||
FONTSERVERSRC = $(FONTSRC)/server
|
||||
EXTENSIONSRC = $(TOP)/extensions
|
||||
XILIBSRC = $(EXTENSIONSRC)/lib/xinput
|
||||
PEXLIBSRC = $(EXTENSIONSRC)/lib/PEXlib
|
||||
PHIGSLIBSRC = $(EXTENSIONSRC)/lib/PEX
|
||||
|
||||
# $XFree86: mit/config/lnuxLib.tmpl,v 1.1 1993/04/16 14:06:06 dawes Exp $
|
||||
|
||||
SHLIBLDFLAGS =
|
||||
PICFLAGS = -B/usr/dll/jump/
|
||||
|
||||
DEPEXTENSIONLIB =
|
||||
EXTENSIONLIB = -lXext
|
||||
|
||||
DEPXLIB = $(DEPEXTENSIONLIB)
|
||||
XLIB = $(EXTENSIONLIB) -lX11
|
||||
|
||||
DEPXMULIB =
|
||||
XMULIB = -lXmu
|
||||
|
||||
DEPXTOOLLIB =
|
||||
XTOOLLIB = -lXt
|
||||
|
||||
DEPXAWLIB =
|
||||
XAWLIB = -lXaw
|
||||
|
||||
DEPXILIB =
|
||||
XILIB = -lXi
|
||||
|
||||
DEPXTESTLIB =
|
||||
XTESTLIB = -lXtst
|
||||
|
||||
DEPPEXLIB =
|
||||
PEXLIB = -lPEX5
|
||||
|
||||
SOXLIBREV = 3.0.1
|
||||
SOXTREV = 3.0.1
|
||||
SOXAWREV = 3.0.1
|
||||
SOOLDXREV = 3.0.1
|
||||
SOXMUREV = 3.0.1
|
||||
SOXEXTREV = 3.0.1
|
||||
SOXINPUTREV = 3.0.1
|
||||
SOPEXREV = 1.0.1
|
||||
|
||||
DEPXAUTHLIB = $(USRLIBDIR)/libXau.a
|
||||
XAUTHLIB = -lXau
|
||||
DEPXDMCPLIB = $(USRLIBDIR)/libXdmcp.a
|
||||
XDMCPLIB = -lXdmcp
|
||||
|
||||
DEPOLDXLIB = $(USRLIBDIR)/liboldX.a
|
||||
OLDXLIB = -loldX
|
||||
|
||||
DEPPHIGSLIB = $(USRLIBDIR)/libphigs.a
|
||||
PHIGSLIB = -lphigs
|
||||
|
||||
DEPXBSDLIB = $(USRLIBDIR)/libXbsd.a
|
||||
XBSDLIB = -lXbsd
|
||||
|
||||
LINTEXTENSIONLIB = $(LINTLIBDIR)/llib-lXext.ln
|
||||
LINTXLIB = $(LINTLIBDIR)/llib-lX11.ln
|
||||
LINTXMU = $(LINTLIBDIR)/llib-lXmu.ln
|
||||
LINTXTOOL = $(LINTLIBDIR)/llib-lXt.ln
|
||||
LINTXAW = $(LINTLIBDIR)/llib-lXaw.ln
|
||||
LINTXI = $(LINTLIBDIR)/llib-lXi.ln
|
||||
LINTPEX = $(LINTLIBDIR)/llib-lPEX5.ln
|
||||
LINTPHIGS = $(LINTLIBDIR)/llib-lphigs.ln
|
||||
|
||||
DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
|
||||
|
||||
DEPLIBS1 = $(DEPLIBS)
|
||||
DEPLIBS2 = $(DEPLIBS)
|
||||
DEPLIBS3 = $(DEPLIBS)
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Imake rules for building libraries, programs, scripts, and data files
|
||||
# $XFree86: mit/config/Imake.rules,v 1.9 1993/03/23 12:56:27 dawes Exp $
|
||||
# rules: $XConsortium: Imake.rules,v 1.123 91/09/16 20:12:16 rws Exp $
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# start of Imakefile
|
||||
|
||||
# $Id$
|
||||
|
||||
INCLUDES = -I$(TOP)/include
|
||||
|
||||
# Imake rules go here
|
||||
|
||||
# First, dll description to files etc
|
||||
|
||||
MODULE = include
|
||||
|
||||
HEADERS = atom.h callback.h class.h combo.h cursor.h dce.h dialog.h dlls.h files.h gdi.h heap.h icon.h int21.h listbox.h menu.h message.h neexe.h prototypes.h regfunc.h scroll.h segmem.h user.h win.h windows.h wine.h
|
||||
|
||||
all::
|
||||
|
||||
depend::
|
||||
|
||||
clean::
|
||||
$(RM_CMD) "#"*
|
||||
|
||||
includes::
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# common rules for all Makefiles - do not edit
|
||||
|
||||
emptyrule::
|
||||
|
||||
clean::
|
||||
$(RM_CMD) "#"*
|
||||
|
||||
Makefile::
|
||||
-@if [ -f Makefile ]; then set -x; \
|
||||
$(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
|
||||
else exit 0; fi
|
||||
$(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
|
||||
|
||||
tags::
|
||||
$(TAGS) -w *.[ch]
|
||||
$(TAGS) -xw *.[ch] > TAGS
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# empty rules for directories that do not have SUBDIRS - do not edit
|
||||
|
||||
install::
|
||||
@echo "install in $(CURRENT_DIR) done"
|
||||
|
||||
install.man::
|
||||
@echo "install.man in $(CURRENT_DIR) done"
|
||||
|
||||
install.linkkit::
|
||||
@echo "install.linkkit in $(CURRENT_DIR) done"
|
||||
|
||||
Makefiles::
|
||||
|
||||
includes::
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# dependencies generated by makedepend
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* Machine dependent integer conversions
|
||||
*
|
||||
* Copyright Miguel de Icaza, 1994
|
||||
*/
|
||||
|
||||
#if defined (mc68000) || defined (sparc)
|
||||
#define CONV_LONG(a) (((a)&0xFF) << 24) | (((a) & 0xFF00) << 8) | (((a) & 0xFF0000) >> 8) | ((a)&0xFF000000 >> 24)
|
||||
#define CONV_SHORT(a) (((a) & 0xFF) << 8) | (((a) & 0xFF00) >> 8)
|
||||
#define CONV_CHAR_TO_LONG(x) ((x) >> 24)
|
||||
#define CONV_SHORT_TO_LONG(x) ((x) >> 16)
|
||||
#else
|
||||
#define CONV_LONG(a) (a)
|
||||
#define CONV_SHORT(a) (a)
|
||||
#define CONV_CHAR_TO_LONG(a) (a)
|
||||
#define CONV_SHORT_TO_LONG(a) (a)
|
||||
#endif
|
|
@ -24,4 +24,10 @@ typedef struct
|
|||
HANDLE entries[1];
|
||||
} ATOMTABLE;
|
||||
|
||||
#ifdef WINELIB
|
||||
#define LocalAlign(flags,bytes) LocalAlloc (flags|LMEM_WINE_ALIGN,bytes)
|
||||
#else
|
||||
#define LocalAlign(flags,bytes) LocalAlloc (flags,bytes)
|
||||
#endif
|
||||
|
||||
#endif /* ATOM_H */
|
||||
|
|
|
@ -19,7 +19,7 @@ typedef struct tagCLASS
|
|||
ATOM atomName; /* Name of the class */
|
||||
HANDLE hdce; /* Class DCE (if CS_CLASSDC) */
|
||||
WORD cWindows; /* Count of existing windows of this class */
|
||||
WNDCLASS wc __attribute__ ((packed)); /* Class information */
|
||||
WNDCLASS wc WINE_PACKED; /* Class information */
|
||||
WORD wExtra[1]; /* Class extra bytes */
|
||||
} CLASS;
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
typedef struct tagHEADCOMBO {
|
||||
DWORD dwStyle;
|
||||
DWORD dwState;
|
||||
HWND hWndDrop;
|
||||
HWND hWndEdit;
|
||||
HWND hWndLBox;
|
||||
} HEADCOMBO;
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
|
||||
#include "windows.h"
|
||||
|
||||
#define DIALOG_CLASS_NAME "#32770" /* Integer atom */
|
||||
|
||||
|
||||
/* Dialog info structure.
|
||||
* This structure is stored into the window extra bytes (cbWndExtra).
|
||||
|
@ -34,11 +32,11 @@ typedef struct
|
|||
typedef struct
|
||||
{
|
||||
DWORD style;
|
||||
BYTE nbItems __attribute__ ((packed));
|
||||
WORD x __attribute__ ((packed));
|
||||
WORD y __attribute__ ((packed));
|
||||
WORD cx __attribute__ ((packed));
|
||||
WORD cy __attribute__ ((packed));
|
||||
BYTE nbItems WINE_PACKED;
|
||||
WORD x WINE_PACKED;
|
||||
WORD y WINE_PACKED;
|
||||
WORD cx WINE_PACKED;
|
||||
WORD cy WINE_PACKED;
|
||||
} DLGTEMPLATEHEADER;
|
||||
|
||||
|
||||
|
@ -50,7 +48,7 @@ typedef struct
|
|||
WORD cx;
|
||||
WORD cy;
|
||||
WORD id;
|
||||
DWORD style __attribute__ ((packed));
|
||||
DWORD style WINE_PACKED;
|
||||
} DLGCONTROLHEADER;
|
||||
|
||||
|
||||
|
|
|
@ -13,6 +13,9 @@ typedef struct dll_arg_relocation_s
|
|||
unsigned char src_type; /* Argument type */
|
||||
} DLL_ARG;
|
||||
|
||||
#define DLL 0
|
||||
#define EXE 1
|
||||
|
||||
#define DLL_ARGTYPE_SIGNEDWORD 0
|
||||
#define DLL_ARGTYPE_WORD 1
|
||||
#define DLL_ARGTYPE_LONG 2
|
||||
|
@ -59,5 +62,6 @@ extern struct dll_table_entry_s WIN87EM_table[];
|
|||
extern struct dll_table_entry_s SHELL_table[];
|
||||
extern struct dll_table_entry_s SOUND_table[];
|
||||
extern struct dll_table_entry_s KEYBOARD_table[];
|
||||
extern struct dll_table_entry_s WINSOCK_table[];
|
||||
|
||||
#endif /* DLLS_H */
|
||||
|
|
|
@ -45,25 +45,25 @@ typedef struct tagGDIOBJHDR
|
|||
typedef struct tagBRUSHOBJ
|
||||
{
|
||||
GDIOBJHDR header;
|
||||
LOGBRUSH logbrush __attribute__ ((packed));
|
||||
LOGBRUSH logbrush WINE_PACKED;
|
||||
} BRUSHOBJ;
|
||||
|
||||
typedef struct tagPENOBJ
|
||||
{
|
||||
GDIOBJHDR header;
|
||||
LOGPEN logpen __attribute__ ((packed));
|
||||
LOGPEN logpen WINE_PACKED;
|
||||
} PENOBJ;
|
||||
|
||||
typedef struct tagPALETTEOBJ
|
||||
{
|
||||
GDIOBJHDR header;
|
||||
LOGPALETTE logpalette __attribute__ ((packed));
|
||||
LOGPALETTE logpalette WINE_PACKED;
|
||||
} PALETTEOBJ;
|
||||
|
||||
typedef struct tagFONTOBJ
|
||||
{
|
||||
GDIOBJHDR header;
|
||||
LOGFONT logfont __attribute__ ((packed));
|
||||
LOGFONT logfont WINE_PACKED;
|
||||
} FONTOBJ;
|
||||
|
||||
typedef struct tagBITMAPOBJ
|
||||
|
@ -271,12 +271,21 @@ typedef struct tagDC
|
|||
|
||||
/* GDI local heap */
|
||||
|
||||
#ifdef WINELIB
|
||||
|
||||
#define GDI_HEAP_ALLOC(f,size) LocalAlloc (f,size)
|
||||
#define GDI_HEAP_ADDR(handle) LocalLock (handle)
|
||||
#define GDI_HEAP_FREE(handle) LocalFree (handle)
|
||||
|
||||
#else
|
||||
|
||||
extern MDESC *GDI_Heap;
|
||||
|
||||
#define GDI_HEAP_ALLOC(f,size) ((int)HEAP_Alloc(&GDI_Heap,f,size) & 0xffff)
|
||||
#define GDI_HEAP_ADDR(handle) ((void *)(handle | ((int)GDI_Heap & 0xffff0000)))
|
||||
#define GDI_HEAP_FREE(handle) (HEAP_Free(&GDI_Heap,GDI_HEAP_ADDR(handle)))
|
||||
|
||||
#endif
|
||||
|
||||
extern HANDLE GDI_AllocObject( WORD, WORD );
|
||||
extern BOOL GDI_FreeObject( HANDLE );
|
||||
|
|
|
@ -7,6 +7,7 @@ struct dosdirent {
|
|||
DIR *ds;
|
||||
char unixpath[256];
|
||||
char filename[256];
|
||||
char filemask[12];
|
||||
char attribute;
|
||||
long filesize;
|
||||
long filetime;
|
||||
|
@ -35,17 +36,21 @@ struct diskinfo {
|
|||
#define CX (context->sc_ecx & 0x0000ffffL)
|
||||
#define DX (context->sc_edx & 0x0000ffffL)
|
||||
|
||||
#define ES context->sc_es
|
||||
#define CS context->sc_cs
|
||||
#define DS context->sc_ds
|
||||
#define ES context->sc_es
|
||||
|
||||
#define DI context->sc_edi
|
||||
#define SI context->sc_esi
|
||||
|
||||
#define EFL context->sc_efl
|
||||
|
||||
#define pointer(a,b) (((unsigned int) a << 16) | b)
|
||||
#define segment(a) (a >> 16)
|
||||
#define offset(a) (a & 0xffff)
|
||||
|
||||
#define SetCflag (context->sc_efl |= 0x00000001L)
|
||||
#define ResetCflag (context->sc_efl &= 0xfffffffeL)
|
||||
#define SetCflag (EFL |= 0x00000001L)
|
||||
#define ResetCflag (EFL &= 0xfffffffeL)
|
||||
|
||||
/* extended error codes */
|
||||
|
||||
|
|
|
@ -6,12 +6,6 @@
|
|||
#ifndef MENU_H
|
||||
#define MENU_H
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <X11/StringDefs.h>
|
||||
#include <X11/Core.h>
|
||||
#include <X11/Xaw/Form.h>
|
||||
#include <X11/Xaw/Command.h>
|
||||
#include <X11/Xaw/Box.h>
|
||||
|
||||
|
||||
typedef struct tagMENUITEM
|
||||
|
@ -25,24 +19,12 @@ typedef struct tagMENUITEM
|
|||
WORD sel_key;
|
||||
char *shortcut;
|
||||
char *item_text;
|
||||
Widget w;
|
||||
Widget menu_w;
|
||||
char menu_name[10];
|
||||
RECT rect;
|
||||
HBITMAP hCheckBit;
|
||||
HBITMAP hUnCheckBit;
|
||||
} MENUITEM, *LPMENUITEM;
|
||||
|
||||
typedef struct tagMENUBAR
|
||||
{
|
||||
struct tagMENUBAR *next;
|
||||
HANDLE menuDescription; /* Memory containing menu desc. */
|
||||
HWND ownerWnd; /* Owner window */
|
||||
int nItems; /* Number of items on menu */
|
||||
Widget parentWidget; /* Parent of menu widget */
|
||||
Widget menuBarWidget; /* Widget to contain menu options */
|
||||
MENUITEM *firstItem;
|
||||
} MENUBAR, *LPMENUBAR;
|
||||
|
||||
typedef struct tagPOPUPMENU
|
||||
{
|
||||
|
@ -57,6 +39,9 @@ typedef struct tagPOPUPMENU
|
|||
BOOL SysFlag;
|
||||
WORD Width;
|
||||
WORD Height;
|
||||
WORD CheckWidth;
|
||||
WORD PopWidth;
|
||||
RECT rect;
|
||||
} POPUPMENU, *LPPOPUPMENU;
|
||||
|
||||
typedef struct
|
||||
|
@ -76,11 +61,12 @@ typedef struct
|
|||
WORD item_flags; /* See windows.h */
|
||||
WORD item_id; /* Control Id for menu item */
|
||||
char item_text[1]; /* Text for menu item */
|
||||
} MENU_NORMALITEM;
|
||||
} MENUITEMTEMPLATE;
|
||||
|
||||
extern LPMENUBAR MENU_CreateMenuBar(Widget parent, HANDLE instance,
|
||||
HWND wnd, char *menu_name, int width);
|
||||
extern LPMENUBAR MENU_UseMenu(Widget parent, HANDLE instance,
|
||||
HWND wnd, HMENU hmenu, int width);
|
||||
void StdDrawMenuBar(HDC hDC, LPRECT lprect, LPPOPUPMENU lppop);
|
||||
void MenuButtonDown(HWND hWnd, LPPOPUPMENU lppop, int x, int y);
|
||||
void MenuButtonUp(HWND hWnd, LPPOPUPMENU lppop, int x, int y);
|
||||
void MenuMouseMove(HWND hWnd, LPPOPUPMENU lppop, WORD wParam, int x, int y);
|
||||
extern void NC_TrackSysMenu(HWND hwnd);
|
||||
|
||||
#endif /* MENU_H */
|
||||
|
|
|
@ -27,9 +27,9 @@ struct ne_header_s
|
|||
u_char linker_version; /* Linker version number */
|
||||
u_char linker_revision; /* Linker revision number */
|
||||
u_short entry_tab_offset; /* Offset to entry table relative to NE */
|
||||
u_short entry_tab_length; /* Length of etnry table in bytes */
|
||||
u_short entry_tab_length; /* Length of entry table in bytes */
|
||||
u_long reserved1; /* Reserved by Microsoft */
|
||||
u_short format_flags; /* Flags that segments in this file */
|
||||
u_short format_flags; /* Flags about segments in this file */
|
||||
u_short auto_data_seg; /* Automatic data segment number */
|
||||
u_short local_heap_length; /* Initial size of local heap */
|
||||
u_short stack_length; /* Initial size of stack */
|
||||
|
|
|
@ -13,6 +13,7 @@ struct options
|
|||
int usePrivateMap;
|
||||
int synchronous;
|
||||
short cmdShow;
|
||||
int relay_debug;
|
||||
};
|
||||
|
||||
extern struct options Options;
|
||||
|
|
|
@ -7,11 +7,13 @@
|
|||
#define PROTOTYPES_H
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "neexe.h"
|
||||
#include "segmem.h"
|
||||
#include "wine.h"
|
||||
#include "int21.h"
|
||||
|
||||
#ifndef WINELIB
|
||||
extern struct segment_descriptor_s *
|
||||
CreateSelectors(struct w_files *);
|
||||
|
||||
|
@ -49,4 +51,6 @@ extern struct dosdirent *DOS_opendir(char *dosdirname);
|
|||
extern struct dosdirent *DOS_readdir(struct dosdirent *de);
|
||||
extern void DOS_closedir(struct dosdirent *de);
|
||||
|
||||
#endif /* WINELIB */
|
||||
|
||||
#endif /* PROTOTYPES_H */
|
||||
|
|
|
@ -12,6 +12,15 @@
|
|||
#include <sys/shm.h>
|
||||
#endif
|
||||
|
||||
#if defined(__NetBSD__) || defined(__FreeBSD__)
|
||||
#define HAVE_IPC
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
#define SHMSEG 32 /* XXX SEMMNI /usr/src/sys/conf/param.h */
|
||||
#define SHM_RANGE_START 0x40000000
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Array to track selector allocation.
|
||||
*/
|
||||
|
|
|
@ -10,7 +10,15 @@
|
|||
#include "segmem.h"
|
||||
#include "heap.h"
|
||||
|
||||
/* USER local heap */
|
||||
/* USER local heap */
|
||||
|
||||
#ifdef WINELIB
|
||||
|
||||
#define USER_HEAP_ALLOC(f,size) LocalAlloc (f, size)
|
||||
#define USER_HEAP_REALLOC(handle,size,f) LocalReAlloc (handle,size,f)
|
||||
#define USER_HEAP_ADDR(handle) LocalLock (handle)
|
||||
#define USER_HEAP_FREE(handle) LocalFree (handle)
|
||||
#else
|
||||
|
||||
extern MDESC *USER_Heap;
|
||||
|
||||
|
@ -20,4 +28,6 @@ extern MDESC *USER_Heap;
|
|||
#define USER_HEAP_ADDR(handle) ((void *)(handle|((int)USER_Heap & 0xffff0000)))
|
||||
#define USER_HEAP_FREE(handle) (HEAP_Free(&USER_Heap,USER_HEAP_ADDR(handle)))
|
||||
|
||||
#endif /* WINELIB */
|
||||
|
||||
#endif /* USER_H */
|
||||
|
|
|
@ -10,10 +10,15 @@
|
|||
#include <X11/Xlib.h>
|
||||
|
||||
#include "windows.h"
|
||||
#include "menu.h"
|
||||
|
||||
#define WND_MAGIC 0x444e4957 /* 'WIND' */
|
||||
|
||||
/* Built-in class names (see _Undocumented_Windows_ p.418) */
|
||||
#define POPUPMENU_CLASS_NAME "#32768" /* PopupMenu */
|
||||
#define DESKTOP_CLASS_NAME "#32769" /* Desktop */
|
||||
#define DIALOG_CLASS_NAME "#32770" /* Dialog */
|
||||
#define WINSWITCH_CLASS_NAME "#32771" /* WinSwitch */
|
||||
#define ICONTITLE_CLASS_NAME "#32772" /* IconTitle */
|
||||
|
||||
typedef struct tagWND
|
||||
{
|
||||
|
@ -37,16 +42,13 @@ typedef struct tagWND
|
|||
DWORD dwExStyle; /* Extended style (from CreateWindowEx) */
|
||||
HANDLE hdce; /* Window DCE (if CS_OWNDC or CS_CLASSDC) */
|
||||
HMENU hmenuSystem; /* System menu */
|
||||
HCURSOR hCursor; /* Window Current Cursor */
|
||||
void *VScroll; /* Vertical ScrollBar Struct Pointer */
|
||||
void *HScroll; /* Horizontal ScrollBar Struct Pointer */
|
||||
WORD wIDmenu; /* ID or hmenu (from CreateWindow) */
|
||||
HANDLE hText; /* Handle of window text */
|
||||
WORD flags; /* Misc. flags */
|
||||
WORD flags; /* Misc. flags (see below) */
|
||||
Window window; /* X window */
|
||||
LPMENUBAR menuBarPtr; /* Menu bar */
|
||||
HMENU hSysMenu; /* window's copy of System Menu */
|
||||
HWND hWndMenuBar; /* Menu bar */
|
||||
WORD wExtra[1]; /* Window extra bytes */
|
||||
} WND;
|
||||
|
||||
|
@ -58,9 +60,7 @@ typedef struct tagWND
|
|||
#define WIN_CLASS_DC 0x10 /* Win class has style CS_CLASSDC */
|
||||
#define WIN_DOUBLE_CLICKS 0x20 /* Win class has style CS_DBLCLKS */
|
||||
#define WIN_RESTORE_MAX 0x40 /* Maximize when restoring */
|
||||
|
||||
/* First top-level window */
|
||||
extern HWND firstWindow;
|
||||
#define WIN_INTERNAL_PAINT 0x80 /* Internal WM_PAINT message pending */
|
||||
|
||||
/* Window functions */
|
||||
WND *WIN_FindWndPtr( HWND hwnd );
|
||||
|
@ -68,5 +68,7 @@ BOOL WIN_UnlinkWindow( HWND hwnd );
|
|||
BOOL WIN_LinkWindow( HWND hwnd, HWND hwndInsertAfter );
|
||||
HWND WIN_FindWinToRepaint( HWND hwnd );
|
||||
|
||||
extern Display * display;
|
||||
extern Screen * screen;
|
||||
|
||||
#endif /* WIN_H */
|
||||
|
|
|
@ -42,6 +42,7 @@ typedef char *NPSTR;
|
|||
typedef short *LPINT;
|
||||
typedef void *LPVOID;
|
||||
typedef long (*FARPROC)();
|
||||
typedef FARPROC DLGPROC;
|
||||
typedef int CATCHBUF[9];
|
||||
typedef int *LPCATCHBUF;
|
||||
|
||||
|
@ -144,22 +145,36 @@ typedef PAINTSTRUCT *PPAINTSTRUCT;
|
|||
typedef PAINTSTRUCT *NPPAINTSTRUCT;
|
||||
typedef PAINTSTRUCT *LPPAINTSTRUCT;
|
||||
|
||||
#ifdef WINELIB
|
||||
#define WINE_PACKED
|
||||
#else
|
||||
#define WINE_PACKED __attribute__ ((packed))
|
||||
#endif
|
||||
|
||||
/* Window classes */
|
||||
|
||||
#ifdef WINELIB
|
||||
typedef LONG (*WNDPROC)(HWND, UINT, WPARAM, LPARAM);
|
||||
#else
|
||||
typedef LONG (* WNDPROC)() WINE_PACKED;
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
WORD style;
|
||||
LONG (*lpfnWndProc)() __attribute__ ((packed));
|
||||
#ifdef WINELIB
|
||||
WNDPROC lpfnWndProc;
|
||||
#else
|
||||
LONG (*lpfnWndProc)() WINE_PACKED;
|
||||
#endif
|
||||
short cbClsExtra, cbWndExtra;
|
||||
HANDLE hInstance;
|
||||
HICON hIcon;
|
||||
HCURSOR hCursor;
|
||||
HBRUSH hbrBackground;
|
||||
LPSTR lpszMenuName __attribute__ ((packed));
|
||||
LPSTR lpszClassName __attribute__ ((packed));
|
||||
LPSTR lpszMenuName WINE_PACKED;
|
||||
LPSTR lpszClassName WINE_PACKED;
|
||||
} WNDCLASS, *LPWNDCLASS;
|
||||
|
||||
typedef LONG (* WNDPROC)() __attribute__ ((packed));
|
||||
|
||||
#define CS_VREDRAW 0x0001
|
||||
#define CS_HREDRAW 0x0002
|
||||
#define CS_KEYCVTWINDOW 0x0004
|
||||
|
@ -197,10 +212,10 @@ typedef struct {
|
|||
short cx;
|
||||
short y;
|
||||
short x;
|
||||
LONG style __attribute__ ((packed));
|
||||
char * lpszName __attribute__ ((packed));
|
||||
char * lpszClass __attribute__ ((packed));
|
||||
DWORD dwExStyle __attribute__ ((packed));
|
||||
LONG style WINE_PACKED;
|
||||
char * lpszName WINE_PACKED;
|
||||
char * lpszClass WINE_PACKED;
|
||||
DWORD dwExStyle WINE_PACKED;
|
||||
} CREATESTRUCT, *LPCREATESTRUCT;
|
||||
|
||||
/* Offsets for GetWindowLong() and GetWindowWord() */
|
||||
|
@ -232,6 +247,19 @@ typedef struct
|
|||
POINT ptMaxTrackSize;
|
||||
} MINMAXINFO;
|
||||
|
||||
/* RedrawWindow() flags */
|
||||
#define RDW_INVALIDATE 0x0001
|
||||
#define RDW_INTERNALPAINT 0x0002
|
||||
#define RDW_ERASE 0x0004
|
||||
#define RDW_VALIDATE 0x0008
|
||||
#define RDW_NOINTERNALPAINT 0x0010
|
||||
#define RDW_NOERASE 0x0020
|
||||
#define RDW_NOCHILDREN 0x0040
|
||||
#define RDW_ALLCHILDREN 0x0080
|
||||
#define RDW_UPDATENOW 0x0100
|
||||
#define RDW_ERASENOW 0x0200
|
||||
#define RDW_FRAME 0x0400
|
||||
#define RDW_NOFRAME 0x0800
|
||||
|
||||
/* WM_WINDOWPOSCHANGING/CHANGED struct */
|
||||
typedef struct
|
||||
|
@ -251,9 +279,9 @@ typedef struct
|
|||
UINT length;
|
||||
UINT flags;
|
||||
UINT showCmd;
|
||||
POINT ptMinPosition __attribute__ ((packed));
|
||||
POINT ptMaxPosition __attribute__ ((packed));
|
||||
RECT rcNormalPosition __attribute__ ((packed));
|
||||
POINT ptMinPosition WINE_PACKED;
|
||||
POINT ptMaxPosition WINE_PACKED;
|
||||
RECT rcNormalPosition WINE_PACKED;
|
||||
} WINDOWPLACEMENT, *LPWINDOWPLACEMENT;
|
||||
|
||||
/* WINDOWPLACEMENT flags */
|
||||
|
@ -379,9 +407,9 @@ typedef struct tagMSG
|
|||
HWND hwnd;
|
||||
WORD message;
|
||||
WORD wParam;
|
||||
DWORD lParam __attribute__ ((packed));
|
||||
DWORD time __attribute__ ((packed));
|
||||
POINT pt __attribute__ ((packed));
|
||||
DWORD lParam WINE_PACKED;
|
||||
DWORD time WINE_PACKED;
|
||||
POINT pt WINE_PACKED;
|
||||
} MSG, *LPMSG;
|
||||
|
||||
typedef WORD ATOM;
|
||||
|
@ -485,7 +513,7 @@ typedef struct tagBITMAP
|
|||
short bmWidthBytes;
|
||||
BYTE bmPlanes;
|
||||
BYTE bmBitsPixel;
|
||||
void * bmBits __attribute__ ((packed));
|
||||
void * bmBits WINE_PACKED;
|
||||
} BITMAP;
|
||||
|
||||
typedef BITMAP *PBITMAP;
|
||||
|
@ -497,7 +525,7 @@ typedef BITMAP *LPBITMAP;
|
|||
typedef struct tagLOGBRUSH
|
||||
{
|
||||
WORD lbStyle;
|
||||
COLORREF lbColor __attribute__ ((packed));
|
||||
COLORREF lbColor WINE_PACKED;
|
||||
short lbHatch;
|
||||
} LOGBRUSH, *PLOGBRUSH, *NPLOGBRUSH, *LPLOGBRUSH;
|
||||
|
||||
|
@ -526,7 +554,7 @@ typedef struct tagLOGFONT
|
|||
short lfHeight, lfWidth, lfEscapement, lfOrientation, lfWeight;
|
||||
BYTE lfItalic, lfUnderline, lfStrikeOut, lfCharSet;
|
||||
BYTE lfOutPrecision, lfClipPrecision, lfQuality, lfPitchAndFamily;
|
||||
BYTE lfFaceName[LF_FACESIZE] __attribute__ ((packed));
|
||||
BYTE lfFaceName[LF_FACESIZE] WINE_PACKED;
|
||||
} LOGFONT, *PLOGFONT, *NPLOGFONT, *LPLOGFONT;
|
||||
|
||||
/* lfWeight values */
|
||||
|
@ -638,7 +666,7 @@ typedef struct tagLOGPALETTE
|
|||
{
|
||||
WORD palVersion;
|
||||
WORD palNumEntries;
|
||||
PALETTEENTRY palPalEntry[1] __attribute__ ((packed));
|
||||
PALETTEENTRY palPalEntry[1] WINE_PACKED;
|
||||
} LOGPALETTE, *PLOGPALETTE, *NPLOGPALETTE, *LPLOGPALETTE;
|
||||
|
||||
|
||||
|
@ -647,8 +675,8 @@ typedef struct tagLOGPALETTE
|
|||
typedef struct tagLOGPEN
|
||||
{
|
||||
WORD lopnStyle;
|
||||
POINT lopnWidth __attribute__ ((packed));
|
||||
COLORREF lopnColor __attribute__ ((packed));
|
||||
POINT lopnWidth WINE_PACKED;
|
||||
COLORREF lopnColor WINE_PACKED;
|
||||
} LOGPEN, *PLOGPEN, *NPLOGPEN, *LPLOGPEN;
|
||||
|
||||
#define PS_SOLID 0
|
||||
|
@ -1112,7 +1140,64 @@ typedef struct tagCOMSTAT
|
|||
#define CSTF_EOF 0x20
|
||||
#define CSTF_TXIM 0x40
|
||||
|
||||
/* */
|
||||
/* SystemParametersInfo */
|
||||
|
||||
#define SPI_GETBEEP 1
|
||||
#define SPI_SETBEEP 2
|
||||
#define SPI_GETMOUSE 3
|
||||
#define SPI_SETMOUSE 4
|
||||
#define SPI_GETBORDER 5
|
||||
#define SPI_SETBORDER 6
|
||||
#define SPI_GETKEYBOARDSPEED 10
|
||||
#define SPI_SETKEYBOARDSPEED 11
|
||||
#define SPI_LANGDRIVER 12
|
||||
#define SPI_ICONHORIZONTALSPACING 13
|
||||
#define SPI_GETSCREENSAVETIMEOUT 14
|
||||
#define SPI_SETSCREENSAVETIMEOUT 15
|
||||
#define SPI_GETSCREENSAVEACTIVE 16
|
||||
#define SPI_SETSCREENSAVEACTIVE 17
|
||||
#define SPI_GETGRIDGRANULARITY 18
|
||||
#define SPI_SETGRIDGRANULARITY 19
|
||||
#define SPI_SETDESKWALLPAPER 20
|
||||
#define SPI_SETDESKPATTERN 21
|
||||
#define SPI_GETKEYBOARDDELAY 22
|
||||
#define SPI_SETKEYBOARDDELAY 23
|
||||
#define SPI_ICONVERTICALSPACING 24
|
||||
#define SPI_GETICONTITLEWRAP 25
|
||||
#define SPI_SETICONTITLEWRAP 26
|
||||
#define SPI_GETMENUDROPALIGNMENT 27
|
||||
#define SPI_SETMENUDROPALIGNMENT 28
|
||||
#define SPI_SETDOUBLECLKWIDTH 29
|
||||
#define SPI_SETDOUBLECLKHEIGHT 30
|
||||
#define SPI_GETICONTITLELOGFONT 31
|
||||
#define SPI_SETDOUBLECLICKTIME 32
|
||||
#define SPI_SETMOUSEBUTTONSWAP 33
|
||||
#define SPI_SETICONTITLELOGFONT 34
|
||||
#define SPI_GETFASTTASKSWITCH 35
|
||||
#define SPI_SETFASTTASKSWITCH 36
|
||||
|
||||
/* SystemParametersInfo flags */
|
||||
|
||||
#define SPIF_UPDATEINIFILE 1
|
||||
#define SPIF_SENDWININICHANGE 2
|
||||
|
||||
/* GetWinFlags */
|
||||
|
||||
#define WF_PMODE 0x0001
|
||||
#define WF_CPU286 0x0002
|
||||
#define WF_CPU386 0x0004
|
||||
#define WF_CPU486 0x0008
|
||||
#define WF_STANDARD 0x0010
|
||||
#define WF_WIN286 0x0010
|
||||
#define WF_ENHANCED 0x0020
|
||||
#define WF_WIN386 0x0020
|
||||
#define WF_CPU086 0x0040
|
||||
#define WF_CPU186 0x0080
|
||||
#define WF_LARGEFRAME 0x0100
|
||||
#define WF_SMALLFRAME 0x0200
|
||||
#define WF_80x87 0x0400
|
||||
#define WF_PAGING 0x0800
|
||||
#define WF_WLO 0x8000
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -1937,7 +2022,11 @@ typedef COMPAREITEMSTRUCT FAR* LPCOMPAREITEMSTRUCT;
|
|||
#define VK_SCROLL 0x91
|
||||
|
||||
|
||||
#define LMEM_MOVEABLE 0x0002
|
||||
#define LMEM_FIXED 0
|
||||
#define LMEM_MOVEABLE 0x0002
|
||||
#define LMEM_ZEROINIT 0x0040
|
||||
#define LMEM_DISCARDABLE 0x0F00
|
||||
#define LMEM_WINE_ALIGN 0x1000
|
||||
|
||||
#define GMEM_FIXED 0x0000
|
||||
#define GMEM_MOVEABLE 0x0002
|
||||
|
@ -1956,6 +2045,55 @@ typedef COMPAREITEMSTRUCT FAR* LPCOMPAREITEMSTRUCT;
|
|||
#define GPTR (GMEM_FIXED | GMEM_ZEROINIT)
|
||||
|
||||
|
||||
/* Predefined Clipboard Formats */
|
||||
#define CF_TEXT 1
|
||||
#define CF_BITMAP 2
|
||||
#define CF_METAFILEPICT 3
|
||||
#define CF_SYLK 4
|
||||
#define CF_DIF 5
|
||||
#define CF_TIFF 6
|
||||
#define CF_OEMTEXT 7
|
||||
#define CF_DIB 8
|
||||
#define CF_PALETTE 9
|
||||
#define CF_PENDATA 10
|
||||
#define CF_RIFF 11
|
||||
#define CF_WAVE 12
|
||||
|
||||
#define CF_OWNERDISPLAY 0x0080
|
||||
#define CF_DSPTEXT 0x0081
|
||||
#define CF_DSPBITMAP 0x0082
|
||||
#define CF_DSPMETAFILEPICT 0x0083
|
||||
|
||||
/* "Private" formats don't get GlobalFree()'d */
|
||||
#define CF_PRIVATEFIRST 0x0200
|
||||
#define CF_PRIVATELAST 0x02FF
|
||||
|
||||
/* "GDIOBJ" formats do get DeleteObject()'d */
|
||||
#define CF_GDIOBJFIRST 0x0300
|
||||
#define CF_GDIOBJLAST 0x03FF
|
||||
|
||||
/* Clipboard command messages */
|
||||
#define WM_CUT 0x0300
|
||||
#define WM_COPY 0x0301
|
||||
#define WM_PASTE 0x0302
|
||||
#define WM_CLEAR 0x0303
|
||||
#define WM_UNDO 0x0304
|
||||
|
||||
/* Clipboard owner messages */
|
||||
#define WM_RENDERFORMAT 0x0305
|
||||
#define WM_RENDERALLFORMATS 0x0306
|
||||
#define WM_DESTROYCLIPBOARD 0x0307
|
||||
|
||||
/* Clipboard viewer messages */
|
||||
#define WM_DRAWCLIPBOARD 0x0308
|
||||
#define WM_PAINTCLIPBOARD 0x0309
|
||||
#define WM_SIZECLIPBOARD 0x030B
|
||||
#define WM_VSCROLLCLIPBOARD 0x030A
|
||||
#define WM_HSCROLLCLIPBOARD 0x030E
|
||||
#define WM_ASKCBFORMATNAME 0x030C
|
||||
#define WM_CHANGECBCHAIN 0x030D
|
||||
|
||||
|
||||
#define F(ret,name) ret name(void);
|
||||
#define Fa(ret,name,t1,a1) ret name(t1 a1);
|
||||
#define Fb(ret,name,t1,a1,t2,a2) ret name(t1 a1,t2 a2);
|
||||
|
@ -1995,12 +2133,13 @@ F(HMENU,CreatePopupMenu)
|
|||
F(HWND,GetActiveWindow)
|
||||
F(HWND,GetCapture)
|
||||
F(HWND,GetClipboardOwner)
|
||||
F(HWND,GetOpenClipboardWindow)
|
||||
F(HWND,GetClipboardViewer)
|
||||
F(HWND,GetDesktopHwnd)
|
||||
F(HWND,GetDesktopWindow)
|
||||
F(HWND,GetFocus)
|
||||
F(HWND,GetSysModalWindow)
|
||||
F(LONG,GetMenuCheckMarkDimensions)
|
||||
F(DWORD,GetMenuCheckMarkDimensions)
|
||||
F(LONG,GetWinFlags)
|
||||
F(LPINT,GetThresholdEvent)
|
||||
F(LPSTR,ValidateFreeSpaces)
|
||||
|
@ -2009,7 +2148,7 @@ F(WORD,GetCaretBlinkTime)
|
|||
F(WORD,GetCurrentPDB)
|
||||
F(WORD,GetDoubleClickTime)
|
||||
F(WORD,GetNumTasks)
|
||||
F(WORD,GetVersion)
|
||||
F(LONG,GetVersion)
|
||||
F(int,CountClipboardFormats)
|
||||
F(int,GetKBCodePage)
|
||||
F(int,GetThresholdStatus)
|
||||
|
@ -2342,7 +2481,7 @@ Fb(int,GetClipBox,HDC,a,LPRECT,b)
|
|||
Fb(int,GetCommError,int,a,COMSTAT*,b)
|
||||
Fb(int,GetCommState,int,a,DCB*,b)
|
||||
Fb(int,GetDeviceCaps,HDC,a,WORD,b)
|
||||
Fb(int,GetPriorityClipboardFormat,WORD FAR*,a,int,b)
|
||||
Fb(int,GetPriorityClipboardFormat,WORD FAR*,a,short,b)
|
||||
Fb(int,GetRgnBox,HRGN,a,LPRECT,b)
|
||||
Fb(int,GetScrollPos,HWND,a,int,b)
|
||||
Fb(int,ReleaseDC,HWND,a,HDC,b)
|
||||
|
@ -2436,11 +2575,11 @@ Fc(WORD,SetClassWord,HWND,a,short,b,WORD,c)
|
|||
Fc(WORD,SetWindowWord,HWND,a,short,b,WORD,c)
|
||||
Fc(int,FrameRect,HDC,a,LPRECT,b,HBRUSH,c)
|
||||
Fc(int,GetClassName,HWND,a,LPSTR,b,short,c)
|
||||
Fc(int,GetClipboardFormatName,WORD,a,LPSTR,b,int,c)
|
||||
Fc(int,GetClipboardFormatName,WORD,a,LPSTR,b,short,c)
|
||||
Fc(int,GetEnvironment,LPSTR,a,LPSTR,b,WORD,c)
|
||||
Fc(int,GetInstanceData,HANDLE,a,NPSTR,b,int,c)
|
||||
Fc(int,GetKeyNameText,LONG,a,LPSTR,b,int,c)
|
||||
Fc(int,GetModuleFileName,HANDLE,a,LPSTR,b,int,c)
|
||||
Fc(int,GetModuleFileName,HANDLE,a,LPSTR,b,short,c)
|
||||
Fc(int,GetObject,HANDLE,a,int,b,LPSTR,c)
|
||||
Fc(int,GetTextFace,HDC,a,int,b,LPSTR,c)
|
||||
Fc(int,GetUpdateRgn,HWND,a,HRGN,b,BOOL,c)
|
||||
|
@ -2477,12 +2616,13 @@ Fd(BOOL,GetMessage,LPMSG,msg,HWND,b,WORD,c,WORD,d)
|
|||
Fd(BOOL,GetTextExtentPoint,HDC,a,LPSTR,b,short,c,LPSIZE,d)
|
||||
Fd(BOOL,DrawIcon,HDC,a,short,b,short,c,HICON,d)
|
||||
Fd(BOOL,EnumMetaFile,HDC,a,LOCALHANDLE,b,FARPROC,c,BYTE FAR*,d)
|
||||
Fd(BOOL,FloodFill,HDC,a,int,b,int,c,DWORD,d)
|
||||
Fd(BOOL,FloodFill,HDC,a,short,b,short,c,DWORD,d)
|
||||
Fd(BOOL,GetCharWidth,HDC,a,WORD,b,WORD,c,LPINT,d)
|
||||
Fd(BOOL,HiliteMenuItem,HWND,a,HMENU,b,WORD,c,WORD,d)
|
||||
Fd(BOOL,MoveToEx,HDC,a,short,b,short,c,LPPOINT,d)
|
||||
Fd(BOOL,PolyPolygon,HDC,a,LPPOINT,b,LPINT,c,int,d)
|
||||
Fd(BOOL,PostAppMessage,HANDLE,a,WORD,b,WORD,c,LONG,d)
|
||||
Fd(BOOL,RedrawWindow,HWND,a,LPRECT,b,HRGN,c,UINT,d)
|
||||
Fd(BOOL,SetBitmapDimensionEx,HBITMAP,a,short,b,short,c,LPSIZE,d)
|
||||
Fd(BOOL,WinHelp,HWND,hwndMain,LPSTR,lpszHelp,WORD,usCommand,DWORD,ulData)
|
||||
Fd(BOOL,WritePrivateProfileString,LPSTR,a,LPSTR,b,LPSTR,c,LPSTR,d)
|
||||
|
|
|
@ -63,4 +63,9 @@ struct sigcontext_struct {
|
|||
#define HZ 100
|
||||
#endif
|
||||
|
||||
void load_mz_header (int, struct mz_header_s *);
|
||||
void load_ne_header (int, struct ne_header_s *);
|
||||
int load_typeinfo (int, struct resource_typeinfo_s *);
|
||||
int load_nameinfo (int, struct resource_nameinfo_s *);
|
||||
|
||||
#endif /* WINE_H */
|
||||
|
|
|
@ -0,0 +1,367 @@
|
|||
/* WINSOCK.H--definitions to be used with the WINSOCK.DLL
|
||||
*
|
||||
* This header file corresponds to version 1.1 of the Windows Sockets
|
||||
* specification.
|
||||
*/
|
||||
|
||||
#ifndef _WINSOCKAPI_
|
||||
#define _WINSOCKAPI_
|
||||
|
||||
#include <windows.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <fcntl.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
/*
|
||||
* The new type to be used in all
|
||||
* instances which refer to sockets.
|
||||
*/
|
||||
typedef u_int SOCKET;
|
||||
|
||||
extern int PASCAL FAR __WSAFDIsSet(SOCKET, fd_set FAR *);
|
||||
|
||||
/*
|
||||
* Internet address (old style... should be updated)
|
||||
*/
|
||||
#define s_addr S_un.S_addr /* can be used for most tcp & ip code */
|
||||
#define s_host S_un.S_un_b.s_b2 /* host on imp */
|
||||
#define s_net S_un.S_un_b.s_b1 /* network */
|
||||
#define s_imp S_un.S_un_w.s_w2 /* imp */
|
||||
#define s_impno S_un.S_un_b.s_b4 /* imp # */
|
||||
#define s_lh S_un.S_un_b.s_b3 /* logical host */
|
||||
|
||||
#define WSADESCRIPTION_LEN 256
|
||||
#define WSASYS_STATUS_LEN 128
|
||||
|
||||
typedef struct WSAData {
|
||||
WORD wVersion;
|
||||
WORD wHighVersion;
|
||||
char szDescription[WSADESCRIPTION_LEN+1];
|
||||
char szSystemStatus[WSASYS_STATUS_LEN+1];
|
||||
unsigned short iMaxSockets;
|
||||
unsigned short iMaxUdpDg;
|
||||
char FAR * lpVendorInfo;
|
||||
} WSADATA;
|
||||
|
||||
typedef WSADATA FAR *LPWSADATA;
|
||||
|
||||
/*
|
||||
* This is used instead of -1, since the
|
||||
* SOCKET type is unsigned.
|
||||
*/
|
||||
#define INVALID_SOCKET (SOCKET)(~0)
|
||||
#define SOCKET_ERROR (-1)
|
||||
|
||||
/*
|
||||
* Option flags per-socket.
|
||||
*/
|
||||
#ifndef SO_DONTLINGER
|
||||
#define SO_DONTLINGER (u_int)(~SO_LINGER)
|
||||
#endif
|
||||
|
||||
#ifndef _SYS_SOCKET_H_
|
||||
/*
|
||||
* Structure used by kernel to pass protocol
|
||||
* information in raw sockets.
|
||||
*/
|
||||
struct sockproto {
|
||||
u_short sp_family; /* address family */
|
||||
u_short sp_protocol; /* protocol */
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Maximum queue length specifiable by listen.
|
||||
*/
|
||||
#define SOMAXCONN 5
|
||||
#define MSG_DONTROUTE 0x4 /* send without using routing tables */
|
||||
#define MSG_MAXIOVLEN 16
|
||||
|
||||
/*
|
||||
* Define constant based on rfc883, used by gethostbyxxxx() calls.
|
||||
*/
|
||||
#define MAXGETHOSTSTRUCT 1024
|
||||
|
||||
/*
|
||||
* Define flags to be used with the WSAAsyncSelect() call.
|
||||
*/
|
||||
#define FD_READ 0x01
|
||||
#define FD_WRITE 0x02
|
||||
#define FD_OOB 0x04
|
||||
#define FD_ACCEPT 0x08
|
||||
#define FD_CONNECT 0x10
|
||||
#define FD_CLOSE 0x20
|
||||
|
||||
/*
|
||||
* All Windows Sockets error constants are biased by WSABASEERR from
|
||||
* the "normal"
|
||||
*/
|
||||
#define WSABASEERR 10000
|
||||
/*
|
||||
* Windows Sockets definitions of regular Microsoft C error constants
|
||||
*/
|
||||
#define WSAEINTR (WSABASEERR+4)
|
||||
#define WSAEBADF (WSABASEERR+9)
|
||||
#define WSAEACCES (WSABASEERR+13)
|
||||
#define WSAEFAULT (WSABASEERR+14)
|
||||
#define WSAEINVAL (WSABASEERR+22)
|
||||
#define WSAEMFILE (WSABASEERR+24)
|
||||
|
||||
/*
|
||||
* Windows Sockets definitions of regular Berkeley error constants
|
||||
*/
|
||||
#define WSAEWOULDBLOCK (WSABASEERR+35)
|
||||
#define WSAEINPROGRESS (WSABASEERR+36)
|
||||
#define WSAEALREADY (WSABASEERR+37)
|
||||
#define WSAENOTSOCK (WSABASEERR+38)
|
||||
#define WSAEDESTADDRREQ (WSABASEERR+39)
|
||||
#define WSAEMSGSIZE (WSABASEERR+40)
|
||||
#define WSAEPROTOTYPE (WSABASEERR+41)
|
||||
#define WSAENOPROTOOPT (WSABASEERR+42)
|
||||
#define WSAEPROTONOSUPPORT (WSABASEERR+43)
|
||||
#define WSAESOCKTNOSUPPORT (WSABASEERR+44)
|
||||
#define WSAEOPNOTSUPP (WSABASEERR+45)
|
||||
#define WSAEPFNOSUPPORT (WSABASEERR+46)
|
||||
#define WSAEAFNOSUPPORT (WSABASEERR+47)
|
||||
#define WSAEADDRINUSE (WSABASEERR+48)
|
||||
#define WSAEADDRNOTAVAIL (WSABASEERR+49)
|
||||
#define WSAENETDOWN (WSABASEERR+50)
|
||||
#define WSAENETUNREACH (WSABASEERR+51)
|
||||
#define WSAENETRESET (WSABASEERR+52)
|
||||
#define WSAECONNABORTED (WSABASEERR+53)
|
||||
#define WSAECONNRESET (WSABASEERR+54)
|
||||
#define WSAENOBUFS (WSABASEERR+55)
|
||||
#define WSAEISCONN (WSABASEERR+56)
|
||||
#define WSAENOTCONN (WSABASEERR+57)
|
||||
#define WSAESHUTDOWN (WSABASEERR+58)
|
||||
#define WSAETOOMANYREFS (WSABASEERR+59)
|
||||
#define WSAETIMEDOUT (WSABASEERR+60)
|
||||
#define WSAECONNREFUSED (WSABASEERR+61)
|
||||
#define WSAELOOP (WSABASEERR+62)
|
||||
#define WSAENAMETOOLONG (WSABASEERR+63)
|
||||
#define WSAEHOSTDOWN (WSABASEERR+64)
|
||||
#define WSAEHOSTUNREACH (WSABASEERR+65)
|
||||
#define WSAENOTEMPTY (WSABASEERR+66)
|
||||
#define WSAEPROCLIM (WSABASEERR+67)
|
||||
#define WSAEUSERS (WSABASEERR+68)
|
||||
#define WSAEDQUOT (WSABASEERR+69)
|
||||
#define WSAESTALE (WSABASEERR+70)
|
||||
#define WSAEREMOTE (WSABASEERR+71)
|
||||
|
||||
/*
|
||||
* Extended Windows Sockets error constant definitions
|
||||
*/
|
||||
#define WSASYSNOTREADY (WSABASEERR+91)
|
||||
#define WSAVERNOTSUPPORTED (WSABASEERR+92)
|
||||
#define WSANOTINITIALISED (WSABASEERR+93)
|
||||
|
||||
/*
|
||||
* Error return codes from gethostbyname() and gethostbyaddr()
|
||||
* (when using the resolver). Note that these errors are
|
||||
* retrieved via WSAGetLastError() and must therefore follow
|
||||
* the rules for avoiding clashes with error numbers from
|
||||
* specific implementations or language run-time systems.
|
||||
* For this reason the codes are based at WSABASEERR+1001.
|
||||
* Note also that [WSA]NO_ADDRESS is defined only for
|
||||
* compatibility purposes.
|
||||
*/
|
||||
|
||||
#define h_errno WSAGetLastError()
|
||||
|
||||
/* Authoritative Answer: Host not found */
|
||||
#define WSAHOST_NOT_FOUND (WSABASEERR+1001)
|
||||
|
||||
/* Non-Authoritative: Host not found, or SERVERFAIL */
|
||||
#define WSATRY_AGAIN (WSABASEERR+1002)
|
||||
|
||||
/* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
|
||||
#define WSANO_RECOVERY (WSABASEERR+1003)
|
||||
|
||||
/* Valid name, no data record of requested type */
|
||||
#define WSANO_DATA (WSABASEERR+1004)
|
||||
|
||||
/* no address, look for MX record */
|
||||
#define WSANO_ADDRESS WSANO_DATA
|
||||
|
||||
/*
|
||||
* Windows Sockets errors redefined as regular Berkeley error constants
|
||||
|
||||
* AAARGH! *
|
||||
|
||||
#define EWOULDBLOCK WSAEWOULDBLOCK
|
||||
#define EINPROGRESS WSAEINPROGRESS
|
||||
#define EALREADY WSAEALREADY
|
||||
#define ENOTSOCK WSAENOTSOCK
|
||||
#define EDESTADDRREQ WSAEDESTADDRREQ
|
||||
#define EMSGSIZE WSAEMSGSIZE
|
||||
#define EPROTOTYPE WSAEPROTOTYPE
|
||||
#define ENOPROTOOPT WSAENOPROTOOPT
|
||||
#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
|
||||
#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
|
||||
#define EOPNOTSUPP WSAEOPNOTSUPP
|
||||
#define EPFNOSUPPORT WSAEPFNOSUPPORT
|
||||
#define EAFNOSUPPORT WSAEAFNOSUPPORT
|
||||
#define EADDRINUSE WSAEADDRINUSE
|
||||
#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
|
||||
#define ENETDOWN WSAENETDOWN
|
||||
#define ENETUNREACH WSAENETUNREACH
|
||||
#define ENETRESET WSAENETRESET
|
||||
#define ECONNABORTED WSAECONNABORTED
|
||||
#define ECONNRESET WSAECONNRESET
|
||||
#define ENOBUFS WSAENOBUFS
|
||||
#define EISCONN WSAEISCONN
|
||||
#define ENOTCONN WSAENOTCONN
|
||||
#define ESHUTDOWN WSAESHUTDOWN
|
||||
#define ETOOMANYREFS WSAETOOMANYREFS
|
||||
#define ETIMEDOUT WSAETIMEDOUT
|
||||
#define ECONNREFUSED WSAECONNREFUSED
|
||||
#define ELOOP WSAELOOP
|
||||
#define ENAMETOOLONG WSAENAMETOOLONG
|
||||
#define EHOSTDOWN WSAEHOSTDOWN
|
||||
#define EHOSTUNREACH WSAEHOSTUNREACH
|
||||
#define ENOTEMPTY WSAENOTEMPTY
|
||||
#define EPROCLIM WSAEPROCLIM
|
||||
#define EUSERS WSAEUSERS
|
||||
#define EDQUOT WSAEDQUOT
|
||||
#define ESTALE WSAESTALE
|
||||
#define EREMOTE WSAEREMOTE
|
||||
|
||||
*/
|
||||
|
||||
/* Socket function prototypes */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Microsoft Windows Extension function prototypes */
|
||||
|
||||
int PASCAL FAR WSAStartup(WORD wVersionRequired, LPWSADATA lpWSAData);
|
||||
|
||||
int PASCAL FAR WSACleanup(void);
|
||||
|
||||
void PASCAL FAR WSASetLastError(int iError);
|
||||
|
||||
int PASCAL FAR WSAGetLastError(void);
|
||||
|
||||
BOOL PASCAL FAR WSAIsBlocking(void);
|
||||
|
||||
int PASCAL FAR WSAUnhookBlockingHook(void);
|
||||
|
||||
FARPROC PASCAL FAR WSASetBlockingHook(FARPROC lpBlockFunc);
|
||||
|
||||
int PASCAL FAR WSACancelBlockingCall(void);
|
||||
|
||||
HANDLE PASCAL FAR WSAAsyncGetServByName(HWND hWnd, u_int wMsg,
|
||||
const char FAR * name,
|
||||
const char FAR * proto,
|
||||
char FAR * buf, int buflen);
|
||||
|
||||
HANDLE PASCAL FAR WSAAsyncGetServByPort(HWND hWnd, u_int wMsg, int port,
|
||||
const char FAR * proto, char FAR * buf,
|
||||
int buflen);
|
||||
|
||||
HANDLE PASCAL FAR WSAAsyncGetProtoByName(HWND hWnd, u_int wMsg,
|
||||
const char FAR * name, char FAR * buf,
|
||||
int buflen);
|
||||
|
||||
HANDLE PASCAL FAR WSAAsyncGetProtoByNumber(HWND hWnd, u_int wMsg,
|
||||
int number, char FAR * buf,
|
||||
int buflen);
|
||||
|
||||
HANDLE PASCAL FAR WSAAsyncGetHostByName(HWND hWnd, u_int wMsg,
|
||||
const char FAR * name, char FAR * buf,
|
||||
int buflen);
|
||||
|
||||
HANDLE PASCAL FAR WSAAsyncGetHostByAddr(HWND hWnd, u_int wMsg,
|
||||
const char FAR * addr, int len, int type,
|
||||
const char FAR * buf, int buflen);
|
||||
|
||||
int PASCAL FAR WSACancelAsyncRequest(HANDLE hAsyncTaskHandle);
|
||||
|
||||
int PASCAL FAR WSAAsyncSelect(SOCKET s, HWND hWnd, u_int wMsg,
|
||||
long lEvent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Microsoft Windows Extended data types */
|
||||
typedef struct sockaddr SOCKADDR;
|
||||
typedef struct sockaddr *PSOCKADDR;
|
||||
typedef struct sockaddr FAR *LPSOCKADDR;
|
||||
|
||||
typedef struct sockaddr_in SOCKADDR_IN;
|
||||
typedef struct sockaddr_in *PSOCKADDR_IN;
|
||||
typedef struct sockaddr_in FAR *LPSOCKADDR_IN;
|
||||
|
||||
typedef struct linger LINGER;
|
||||
typedef struct linger *PLINGER;
|
||||
typedef struct linger FAR *LPLINGER;
|
||||
|
||||
typedef struct in_addr IN_ADDR;
|
||||
typedef struct in_addr *PIN_ADDR;
|
||||
typedef struct in_addr FAR *LPIN_ADDR;
|
||||
|
||||
typedef struct fd_set FD_SET;
|
||||
typedef struct fd_set *PFD_SET;
|
||||
typedef struct fd_set FAR *LPFD_SET;
|
||||
|
||||
typedef struct hostent HOSTENT;
|
||||
typedef struct hostent *PHOSTENT;
|
||||
typedef struct hostent FAR *LPHOSTENT;
|
||||
|
||||
typedef struct servent SERVENT;
|
||||
typedef struct servent *PSERVENT;
|
||||
typedef struct servent FAR *LPSERVENT;
|
||||
|
||||
typedef struct protoent PROTOENT;
|
||||
typedef struct protoent *PPROTOENT;
|
||||
typedef struct protoent FAR *LPPROTOENT;
|
||||
|
||||
typedef struct timeval TIMEVAL;
|
||||
typedef struct timeval *PTIMEVAL;
|
||||
typedef struct timeval FAR *LPTIMEVAL;
|
||||
|
||||
/*
|
||||
* Windows message parameter composition and decomposition
|
||||
* macros.
|
||||
*
|
||||
* WSAMAKEASYNCREPLY is intended for use by the Windows Sockets implementation
|
||||
* when constructing the response to a WSAAsyncGetXByY() routine.
|
||||
*/
|
||||
#define WSAMAKEASYNCREPLY(buflen,error) MAKELONG(buflen,error)
|
||||
/*
|
||||
* WSAMAKESELECTREPLY is intended for use by the Windows Sockets implementation
|
||||
* when constructing the response to WSAAsyncSelect().
|
||||
*/
|
||||
#define WSAMAKESELECTREPLY(event,error) MAKELONG(event,error)
|
||||
/*
|
||||
* WSAGETASYNCBUFLEN is intended for use by the Windows Sockets application
|
||||
* to extract the buffer length from the lParam in the response
|
||||
* to a WSAGetXByY().
|
||||
*/
|
||||
#define WSAGETASYNCBUFLEN(lParam) LOWORD(lParam)
|
||||
/*
|
||||
* WSAGETASYNCERROR is intended for use by the Windows Sockets application
|
||||
* to extract the error code from the lParam in the response
|
||||
* to a WSAGetXByY().
|
||||
*/
|
||||
#define WSAGETASYNCERROR(lParam) HIWORD(lParam)
|
||||
/*
|
||||
* WSAGETSELECTEVENT is intended for use by the Windows Sockets application
|
||||
* to extract the event code from the lParam in the response
|
||||
* to a WSAAsyncSelect().
|
||||
*/
|
||||
#define WSAGETSELECTEVENT(lParam) LOWORD(lParam)
|
||||
/*
|
||||
* WSAGETSELECTERROR is intended for use by the Windows Sockets application
|
||||
* to extract the error code from the lParam in the response
|
||||
* to a WSAAsyncSelect().
|
||||
*/
|
||||
#define WSAGETSELECTERROR(lParam) HIWORD(lParam)
|
||||
|
||||
#endif /* _WINSOCKAPI_ */
|
|
@ -3,32 +3,15 @@
|
|||
MODULE = loader
|
||||
|
||||
SRCS = \
|
||||
int1a.c \
|
||||
int21.c \
|
||||
dump.c \
|
||||
files.c \
|
||||
ldt.c \
|
||||
ldtlib.c \
|
||||
resource.c \
|
||||
selector.c \
|
||||
signal.c \
|
||||
library.c \
|
||||
wine.c \
|
||||
cursor.c
|
||||
wine.c
|
||||
|
||||
OBJS = \
|
||||
int1a.o \
|
||||
int21.o \
|
||||
dump.o \
|
||||
files.o \
|
||||
ldt.o \
|
||||
ldtlib.o \
|
||||
resource.o \
|
||||
selector.o \
|
||||
signal.o \
|
||||
library.o \
|
||||
wine.o \
|
||||
cursor.o
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
|
||||
WineRelocatableTarget($(TOP)/$(MODULE),,$(OBJS))
|
||||
DependTarget()
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
CFLAGS=$(COPTS) $(DEBUGOPTS) -I../include
|
||||
|
||||
OBJS=dump.o ldt.o ldtlib.o resource.o selector.o signal.o library.o \
|
||||
wine.o cursor.o
|
||||
|
||||
default: loader.o
|
||||
|
||||
loader.o: $(OBJS)
|
||||
$(LD) -r -o loader.o $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -f *.o *~ *.s dll_* *.a *#
|
||||
|
||||
depend:
|
||||
$(CC) $(CFLAGS) -M *.c > .depend
|
||||
|
||||
ifeq (.depend,$(wildcard .depend))
|
||||
include .depend
|
||||
endif
|
|
@ -79,8 +79,12 @@ set_ldt_entry(int entry, unsigned long base, unsigned int limit,
|
|||
|
||||
sd = make_sd(base, limit, contents, read_only_flag, seg_32bit_flag, limit_in_pages_flag);
|
||||
ret = i386_set_ldt(entry, (union descriptor *)sd, 1);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
perror("i386_set_ldt");
|
||||
fprintf(stderr,
|
||||
"Did you reconfigure the kernel with \"options USER_LDT\"?\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
|
@ -7,10 +6,72 @@
|
|||
#include <unistd.h>
|
||||
#include "prototypes.h"
|
||||
#include "windows.h"
|
||||
#include "win.h"
|
||||
#include "gdi.h"
|
||||
#include "wine.h"
|
||||
#include "dlls.h"
|
||||
|
||||
extern struct w_files * wine_files;
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* GetCurrentTask [KERNEL.36]
|
||||
*/
|
||||
HTASK GetCurrentTask()
|
||||
{
|
||||
int pid = getpid();
|
||||
printf("GetCurrentTask() returned %d !\n", pid);
|
||||
return pid;
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* GetModuleHandle [KERNEL.47]
|
||||
*/
|
||||
HANDLE GetModuleHandle(LPSTR lpModuleName)
|
||||
{
|
||||
register struct w_files *w = wine_files;
|
||||
printf("GetModuleHandle('%s');\n", lpModuleName);
|
||||
while (w) {
|
||||
printf("GetModuleHandle // '%s' \n", w->name);
|
||||
if (strcmp(w->name, lpModuleName) == 0) {
|
||||
printf("GetModuleHandle('%s') return %04X \n",
|
||||
lpModuleName, w->hinstance);
|
||||
return w->hinstance;
|
||||
}
|
||||
w = w->next;
|
||||
}
|
||||
printf("GetModuleHandle('%s') not found !\n", lpModuleName);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* GetModuleUsage [KERNEL.48]
|
||||
*/
|
||||
int GetModuleUsage(HANDLE hModule)
|
||||
{
|
||||
struct w_files *w;
|
||||
printf("GetModuleUsage(%04X);\n", hModule);
|
||||
w = GetFileInfo(hModule);
|
||||
/* return w->Usage; */
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* GetModuleFilename [KERNEL.49]
|
||||
*/
|
||||
int GetModuleFileName(HANDLE hModule, LPSTR lpFileName, short nSize)
|
||||
{
|
||||
struct w_files *w;
|
||||
printf("GetModuleFileName(%04X, %08X, %d);\n", hModule, lpFileName, nSize);
|
||||
if (lpFileName == NULL) return 0;
|
||||
w = GetFileInfo(hModule);
|
||||
if (w == NULL) return 0;
|
||||
if (nSize > strlen(w->name)) nSize = strlen(w->name) + 1;
|
||||
strncpy(lpFileName, w->name, nSize);
|
||||
printf("GetModuleFileName copied '%s' return %d \n", lpFileName, nSize);
|
||||
return nSize - 1;
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
|
@ -20,7 +81,7 @@ HANDLE LoadLibrary(LPSTR libname)
|
|||
{
|
||||
HANDLE hRet;
|
||||
printf("LoadLibrary '%s'\n", libname);
|
||||
hRet = LoadImage(libname);
|
||||
hRet = LoadImage(libname, DLL);
|
||||
printf("after LoadLibrary hRet=%04X\n", hRet);
|
||||
return hRet;
|
||||
}
|
||||
|
@ -35,3 +96,4 @@ void FreeLibrary(HANDLE hLib)
|
|||
if (hLib != (HANDLE)NULL) GlobalFree(hLib);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -585,7 +585,7 @@ unsigned int GetEntryDLLName(char * dll_name, char * function, int * sel,
|
|||
j = GetEntryPointFromOrdinal(wpnt, ordinal);
|
||||
*addr = j & 0xffff;
|
||||
j = j >> 16;
|
||||
*sel = wpnt->selector_table[j].selector;
|
||||
*sel = j;
|
||||
return 0;
|
||||
};
|
||||
return 1;
|
||||
|
@ -615,12 +615,7 @@ unsigned int GetEntryDLLOrdinal(char * dll_name, int ordinal, int * sel,
|
|||
j = GetEntryPointFromOrdinal(wpnt, ordinal);
|
||||
*addr = j & 0xffff;
|
||||
j = j >> 16;
|
||||
#if 0
|
||||
/* This seems like it would never work */
|
||||
*sel = wpnt->selector_table[j].selector;
|
||||
#else
|
||||
*sel = j; /* Is there any reason this will ever fail?? */
|
||||
#endif
|
||||
*sel = j;
|
||||
return 0;
|
||||
};
|
||||
return 1;
|
||||
|
|
209
loader/wine.c
209
loader/wine.c
|
@ -22,6 +22,7 @@ static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
|||
#include "wine.h"
|
||||
#include "windows.h"
|
||||
#include "wineopts.h"
|
||||
#include "arch.h"
|
||||
|
||||
/* #define DEBUG_FIXUP */
|
||||
|
||||
|
@ -46,21 +47,12 @@ struct ne_header_s *CurrentNEHeader;
|
|||
int CurrentNEFile;
|
||||
HINSTANCE hSysRes;
|
||||
|
||||
static char *Extensions[] = { "dll", "exe", NULL };
|
||||
static char *DLL_Extensions[] = { "dll", "exe", NULL };
|
||||
static char *EXE_Extensions[] = { "exe", NULL };
|
||||
static char *WinePath = NULL;
|
||||
|
||||
FILE *SpyFp = NULL;
|
||||
|
||||
/**********************************************************************
|
||||
* DebugPrintString
|
||||
*/
|
||||
int
|
||||
DebugPrintString(char *str)
|
||||
{
|
||||
printf("%s", str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* myerror
|
||||
*/
|
||||
|
@ -103,11 +95,35 @@ GetFileInfo(unsigned short instance)
|
|||
return w;
|
||||
}
|
||||
|
||||
#ifndef WINELIB
|
||||
/**********************************************************************
|
||||
*
|
||||
* Load MZ Header
|
||||
*/
|
||||
void load_mz_header(int fd, struct mz_header_s *mz_header)
|
||||
{
|
||||
if (read(fd, mz_header, sizeof(struct mz_header_s)) !=
|
||||
sizeof(struct mz_header_s))
|
||||
{
|
||||
myerror("Unable to read MZ header from file");
|
||||
}
|
||||
}
|
||||
|
||||
void load_ne_header (int fd, struct ne_header_s *ne_header)
|
||||
{
|
||||
if (read(fd, ne_header, sizeof(struct ne_header_s))
|
||||
!= sizeof(struct ne_header_s))
|
||||
{
|
||||
myerror("Unable to read NE header from file");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/**********************************************************************
|
||||
* LoadImage
|
||||
* Load one NE format executable into memory
|
||||
*/
|
||||
HINSTANCE LoadImage(char *modulename)
|
||||
HINSTANCE LoadImage(char *modulename, int filetype)
|
||||
{
|
||||
unsigned int read_size;
|
||||
int i;
|
||||
|
@ -118,11 +134,9 @@ HINSTANCE LoadImage(char *modulename)
|
|||
/*
|
||||
* search file
|
||||
*/
|
||||
if (FindFile(buffer, sizeof(buffer), modulename, Extensions, WindowsPath)
|
||||
==NULL)
|
||||
if (FindFile(buffer, sizeof(buffer), modulename, (filetype == EXE ?
|
||||
EXE_Extensions : DLL_Extensions), WindowsPath) ==NULL)
|
||||
{
|
||||
|
||||
|
||||
fprintf(stderr,"LoadImage: I can't find %s !\n",modulename);
|
||||
return (HINSTANCE) NULL;
|
||||
}
|
||||
|
@ -159,21 +173,13 @@ HINSTANCE LoadImage(char *modulename)
|
|||
|
||||
wpnt->mz_header = (struct mz_header_s *) malloc(sizeof(struct mz_header_s));;
|
||||
status = lseek(wpnt->fd, 0, SEEK_SET);
|
||||
if (read(wpnt->fd, wpnt->mz_header, sizeof(struct mz_header_s)) !=
|
||||
sizeof(struct mz_header_s))
|
||||
{
|
||||
myerror("Unable to read MZ header from file");
|
||||
}
|
||||
load_mz_header (wpnt->fd, wpnt->mz_header);
|
||||
if (wpnt->mz_header->must_be_0x40 != 0x40)
|
||||
myerror("This is not a Windows program");
|
||||
|
||||
wpnt->ne_header = (struct ne_header_s *) malloc(sizeof(struct ne_header_s));
|
||||
status = lseek(wpnt->fd, wpnt->mz_header->ne_offset, SEEK_SET);
|
||||
if (read(wpnt->fd, wpnt->ne_header, sizeof(struct ne_header_s))
|
||||
!= sizeof(struct ne_header_s))
|
||||
{
|
||||
myerror("Unable to read NE header from file");
|
||||
}
|
||||
load_ne_header (wpnt->fd, wpnt->ne_header);
|
||||
if (wpnt->ne_header->header_type[0] != 'N' ||
|
||||
wpnt->ne_header->header_type[1] != 'E')
|
||||
myerror("This is not a Windows program");
|
||||
|
@ -190,6 +196,7 @@ HINSTANCE LoadImage(char *modulename)
|
|||
/*
|
||||
* Create segment selectors.
|
||||
*/
|
||||
#ifndef WINELIB
|
||||
status = lseek(wpnt->fd, wpnt->mz_header->ne_offset +
|
||||
wpnt->ne_header->segment_tab_offset,
|
||||
SEEK_SET);
|
||||
|
@ -235,7 +242,7 @@ HINSTANCE LoadImage(char *modulename)
|
|||
wpnt->name = (char*) malloc(*wpnt->rname_table + 1);
|
||||
memcpy(wpnt->name, wpnt->rname_table+1, *wpnt->rname_table);
|
||||
wpnt->name[*wpnt->rname_table] = 0;
|
||||
|
||||
#endif
|
||||
/*
|
||||
* Now load any DLLs that this module refers to.
|
||||
*/
|
||||
|
@ -245,9 +252,11 @@ HINSTANCE LoadImage(char *modulename)
|
|||
int fd, j;
|
||||
GetModuleName(wpnt, i + 1, buff);
|
||||
|
||||
#ifndef WINELIB
|
||||
if(FindDLLTable(buff)) continue; /* This module already loaded */
|
||||
#endif
|
||||
|
||||
LoadImage(buff);
|
||||
LoadImage(buff, DLL);
|
||||
/*
|
||||
fprintf(stderr,"Unable to load:%s\n", buff);
|
||||
*/
|
||||
|
@ -255,31 +264,6 @@ HINSTANCE LoadImage(char *modulename)
|
|||
return(wpnt->hinstance);
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* ParseArgs
|
||||
*/
|
||||
void
|
||||
ParseArgs(int argc, char **argv)
|
||||
{
|
||||
if (argc < 2)
|
||||
{
|
||||
fprintf(stderr, "usage: %s [-spy FILENAME] FILENAME\n", argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
Argc = argc - 1;
|
||||
|
||||
for (Argv = argv + 1; **Argv == '-' && Argc > 0; Argv++)
|
||||
{
|
||||
if (strcmp(*Argv, "-spy") == 0)
|
||||
{
|
||||
if (strcmp(*(++Argv), "-") == 0)
|
||||
SpyFp = stdout;
|
||||
else
|
||||
SpyFp = fopen(*Argv, "a");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* main
|
||||
|
@ -300,22 +284,29 @@ _WinMain(int argc, char **argv)
|
|||
int i;
|
||||
int rv;
|
||||
|
||||
ParseArgs(argc, argv);
|
||||
Argc = argc - 1;
|
||||
Argv = argv + 1;
|
||||
|
||||
p = getenv("WINEPATH");
|
||||
WinePath = malloc(256 + strlen(p));
|
||||
getcwd(WinePath, 256);
|
||||
strcat(WinePath, ";");
|
||||
strcat(WinePath, p);
|
||||
WinePath = malloc(1024);
|
||||
|
||||
LoadImage(Argv[0]);
|
||||
getcwd(WinePath, 512);
|
||||
|
||||
if ((p = getenv("WINEPATH")) != NULL) {
|
||||
strcat(WinePath, ";");
|
||||
strcat(WinePath, p);
|
||||
}
|
||||
|
||||
if (LoadImage(Argv[0], EXE) == (HINSTANCE) NULL ) {
|
||||
fprintf(stderr, "wine: can't find %s!.\n", Argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
GetPrivateProfileString("wine", "SystemResources", "sysres.dll",
|
||||
filename, sizeof(filename),
|
||||
WINE_INI);
|
||||
hSysRes = LoadImage(filename);
|
||||
filename, sizeof(filename), WINE_INI);
|
||||
|
||||
hSysRes = LoadImage(filename, DLL);
|
||||
if (hSysRes == (HINSTANCE)NULL)
|
||||
printf("Error Loading System Resources !!!\n");
|
||||
fprintf(stderr, "wine: can't find %s!.\n", filename);
|
||||
else
|
||||
printf("System Resources Loaded // hSysRes='%04X'\n", hSysRes);
|
||||
|
||||
|
@ -324,22 +315,15 @@ _WinMain(int argc, char **argv)
|
|||
*/
|
||||
wpnt = wine_files;
|
||||
for(wpnt = wine_files; wpnt; wpnt = wpnt->next)
|
||||
for (segment = 0; segment < wpnt->ne_header->n_segment_tab; segment++)
|
||||
{
|
||||
for (segment = 0; segment < wpnt->ne_header->n_segment_tab; segment++)
|
||||
{
|
||||
if (FixupSegment(wpnt, segment) < 0)
|
||||
if (FixupSegment(wpnt, segment) < 0)
|
||||
{
|
||||
myerror("fixup failed.");
|
||||
myerror("fixup failed.");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Fixup stack and jump to start.
|
||||
*/
|
||||
ds_reg = wine_files->selector_table[wine_files->ne_header->auto_data_seg-1].selector;
|
||||
cs_reg = wine_files->selector_table[wine_files->ne_header->cs-1].selector;
|
||||
ip_reg = wine_files->ne_header->ip;
|
||||
ss_reg = wine_files->selector_table[wine_files->ne_header->ss-1].selector;
|
||||
sp_reg = wine_files->ne_header->sp;
|
||||
}
|
||||
|
||||
#ifdef WINESTAT
|
||||
cp = strrchr(argv[0], '/');
|
||||
|
@ -351,27 +335,65 @@ _WinMain(int argc, char **argv)
|
|||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Initialize signal handling.
|
||||
*/
|
||||
init_wine_signals();
|
||||
|
||||
if (WineForceFail)
|
||||
{
|
||||
p = (char *) ((cs_reg << 16) | ip_reg);
|
||||
|
||||
*p++ = 0xcd;
|
||||
*p++ = 0x20;
|
||||
}
|
||||
|
||||
if (ss_reg == 0)
|
||||
{
|
||||
fprintf(stderr, "SS is 0\n");
|
||||
}
|
||||
|
||||
LinearTest();
|
||||
/*
|
||||
* Fixup stack and jump to start.
|
||||
*/
|
||||
ds_reg = (wine_files->
|
||||
selector_table[wine_files->ne_header->auto_data_seg-1].selector);
|
||||
cs_reg = wine_files->selector_table[wine_files->ne_header->cs-1].selector;
|
||||
ip_reg = wine_files->ne_header->ip;
|
||||
ss_reg = wine_files->selector_table[wine_files->ne_header->ss-1].selector;
|
||||
sp_reg = wine_files->ne_header->sp;
|
||||
|
||||
rv = CallToInit16(cs_reg << 16 | ip_reg, ss_reg << 16 | sp_reg, ds_reg);
|
||||
printf ("rv = %x\n", rv);
|
||||
}
|
||||
|
||||
void InitializeLoadedDLLs()
|
||||
{
|
||||
struct w_files * wpnt;
|
||||
int cs_reg, ds_reg, ip_reg;
|
||||
int rv;
|
||||
|
||||
fprintf(stderr, "Initializing DLLs\n");
|
||||
|
||||
/*
|
||||
* Initialize libraries
|
||||
*/
|
||||
wpnt = wine_files;
|
||||
for(wpnt = wine_files; wpnt; wpnt = wpnt->next)
|
||||
{
|
||||
/*
|
||||
* Is this a library?
|
||||
*/
|
||||
if (wpnt->ne_header->format_flags & 0x8000)
|
||||
{
|
||||
if (!(wpnt->ne_header->format_flags & 0x0001))
|
||||
{
|
||||
/* Not SINGLEDATA */
|
||||
fprintf(stderr, "Library is not marked SINGLEDATA\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
ds_reg = wpnt->selector_table[wpnt->
|
||||
ne_header->auto_data_seg-1].selector;
|
||||
cs_reg = wpnt->selector_table[wpnt->ne_header->cs-1].selector;
|
||||
ip_reg = wpnt->ne_header->ip;
|
||||
|
||||
fprintf(stderr, "Initializing %s, cs:ip %04x:%04x, ds %04x\n",
|
||||
wpnt->name, cs_reg, ip_reg, ds_reg);
|
||||
|
||||
rv = CallTo16(cs_reg << 16 | ip_reg, ds_reg);
|
||||
printf ("rv = %x\n", rv);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* GetImportedName
|
||||
|
@ -389,6 +411,7 @@ GetImportedName(int fd, struct mz_header_s *mz_header,
|
|||
name_offset, SEEK_SET);
|
||||
length = 0;
|
||||
read(fd, &length, 1); /* Get the length byte */
|
||||
length = CONV_CHAR_TO_LONG (length);
|
||||
read(fd, buffer, length);
|
||||
buffer[length] = 0;
|
||||
return buffer;
|
||||
|
@ -405,17 +428,19 @@ GetModuleName(struct w_files * wpnt, int index, char *buffer)
|
|||
struct ne_header_s *ne_header = wpnt->ne_header;
|
||||
char *p;
|
||||
int length;
|
||||
int name_offset, status;
|
||||
WORD name_offset, status;
|
||||
int i;
|
||||
|
||||
status = lseek(fd, mz_header->ne_offset + ne_header->moduleref_tab_offset +
|
||||
2*(index - 1), SEEK_SET);
|
||||
name_offset = 0;
|
||||
read(fd, &name_offset, 2);
|
||||
name_offset = CONV_SHORT (name_offset);
|
||||
status = lseek(fd, mz_header->ne_offset + ne_header->iname_tab_offset +
|
||||
name_offset, SEEK_SET);
|
||||
length = 0;
|
||||
read(fd, &length, 1); /* Get the length byte */
|
||||
length = CONV_CHAR_TO_LONG (length);
|
||||
read(fd, buffer, length);
|
||||
buffer[length] = 0;
|
||||
|
||||
|
@ -427,6 +452,7 @@ GetModuleName(struct w_files * wpnt, int index, char *buffer)
|
|||
}
|
||||
|
||||
|
||||
#ifndef WINELIB
|
||||
/**********************************************************************
|
||||
* FixupSegment
|
||||
*/
|
||||
|
@ -700,3 +726,4 @@ FARPROC GetProcAddress(HINSTANCE hinstance, char *proc_name)
|
|||
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -5,12 +5,9 @@ MODULE = memory
|
|||
SRCS = \
|
||||
global.c \
|
||||
heap.c \
|
||||
atom.c
|
||||
linear.c
|
||||
|
||||
OBJS = \
|
||||
global.o \
|
||||
heap.o \
|
||||
atom.o
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
|
||||
WineRelocatableTarget($(TOP)/$(MODULE),,$(OBJS))
|
||||
DependTarget()
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
CFLAGS=$(COPTS) $(DEBUGOPTS) -I$(INCLUDE_DIR)
|
||||
|
||||
OBJS=global.o heap.o atom.o linear.o
|
||||
|
||||
default: memory.o
|
||||
|
||||
memory.o: $(OBJS)
|
||||
$(LD) -r -o memory.o $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -f *.o *~ *.s dll_* *.a *#
|
||||
|
||||
depend:
|
||||
$(CC) $(CFLAGS) -M *.c > .depend
|
||||
|
||||
ifeq (.depend,$(wildcard .depend))
|
||||
include .depend
|
||||
endif
|
|
@ -138,8 +138,8 @@ HEAP_ReAlloc(MDESC **free_list, void *old_block,
|
|||
if (new_size > m->length)
|
||||
{
|
||||
m_free = m + 1 + m->length / sizeof(MDESC);
|
||||
if (m_free->next != m_free ||
|
||||
m_free->prev != m_free ||
|
||||
if (m_free->next == m_free ||
|
||||
m_free->prev == m_free ||
|
||||
m_free->length + sizeof(MDESC) < new_size)
|
||||
{
|
||||
void *new_p = HEAP_Alloc(free_list, flags, new_size);
|
||||
|
@ -284,7 +284,7 @@ HEAP_Free(MDESC **free_list, void *block)
|
|||
/**********************************************************************
|
||||
* HEAP_LocalFindHeap
|
||||
*/
|
||||
MDESC **
|
||||
LHEAP *
|
||||
HEAP_LocalFindHeap(unsigned short owner)
|
||||
{
|
||||
LHEAP *lh;
|
||||
|
@ -296,13 +296,13 @@ HEAP_LocalFindHeap(unsigned short owner)
|
|||
for (lh = LocalHeaps; lh != NULL; lh = lh->next)
|
||||
{
|
||||
if (lh->selector == owner)
|
||||
return &lh->free_list;
|
||||
return lh;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#define LOCALHEAP() HEAP_LocalFindHeap(Segments[Stack16Frame[11] >> 3].owner)
|
||||
#define LOCALHEAP() (&HEAP_LocalFindHeap(Segments[Stack16Frame[11] >> 3].owner)->free_list)
|
||||
|
||||
/**********************************************************************
|
||||
* HEAP_LocalInit
|
||||
|
@ -402,8 +402,25 @@ LocalFree(unsigned int handle)
|
|||
unsigned int
|
||||
LocalInit(unsigned int segment, unsigned int start, unsigned int end)
|
||||
{
|
||||
HEAP_Init(LOCALHEAP(),
|
||||
(void *) ((segment << 16) | start), end - start + 1);
|
||||
unsigned short owner = Segments[Stack16Frame[11] >> 3].owner;
|
||||
LHEAP *lh = HEAP_LocalFindHeap(owner);
|
||||
|
||||
if (segment == 0)
|
||||
{
|
||||
/* Get current DS */
|
||||
segment = Stack16Frame[6];
|
||||
}
|
||||
|
||||
if (lh == NULL)
|
||||
{
|
||||
HEAP_LocalInit(owner,
|
||||
(void *) ((segment << 16) | start), end - start + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
HEAP_Init(&lh->free_list,
|
||||
(void *) ((segment << 16) | start), end - start + 1);
|
||||
}
|
||||
|
||||
return segment;
|
||||
}
|
||||
|
|
|
@ -3,46 +3,26 @@
|
|||
MODULE = misc
|
||||
|
||||
SRCS = \
|
||||
atom.c \
|
||||
clipboard.c \
|
||||
comm.c \
|
||||
dos.c \
|
||||
cursor.c \
|
||||
dos_fs.c \
|
||||
emulate.c \
|
||||
exec.c \
|
||||
file.c \
|
||||
int1a.c \
|
||||
int21.c \
|
||||
kernel.c \
|
||||
keyboard.c \
|
||||
lstr.c \
|
||||
main.c \
|
||||
message.c \
|
||||
profile.c \
|
||||
rect.c \
|
||||
resource.c \
|
||||
sound.c \
|
||||
spy.c \
|
||||
user.c \
|
||||
xt.c
|
||||
winsocket.c
|
||||
|
||||
OBJS = \
|
||||
comm.o \
|
||||
dos.o \
|
||||
dos_fs.o \
|
||||
emulate.o \
|
||||
exec.o \
|
||||
file.o \
|
||||
int1a.o \
|
||||
int21.o \
|
||||
kernel.o \
|
||||
keyboard.o \
|
||||
lstr.o \
|
||||
main.o \
|
||||
message.o \
|
||||
profile.o \
|
||||
rect.o \
|
||||
sound.o \
|
||||
spy.o \
|
||||
user.o \
|
||||
xt.o
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
|
||||
WineRelocatableTarget($(TOP)/$(MODULE),,$(OBJS))
|
||||
DependTarget()
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
CFLAGS=$(COPTS) $(DEBUGOPTS) -I../include
|
||||
|
||||
OBJS=main.o kernel.o user.o rect.o file.o sound.o emulate.o \
|
||||
keyboard.o profile.o lstr.o exec.o message.o int1a.o int21.o \
|
||||
dos_fs.o comm.o spy.o
|
||||
|
||||
default: misc.o
|
||||
|
||||
misc.o: $(OBJS)
|
||||
$(LD) -r -o misc.o $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -f *.o *~ *.s dll_* *.a *#
|
||||
|
||||
depend:
|
||||
$(CC) $(CFLAGS) -M *.c > .depend
|
||||
|
||||
ifeq (.depend,$(wildcard .depend))
|
||||
include .depend
|
||||
endif
|
|
@ -22,12 +22,19 @@
|
|||
* because they can't generally be differentiated from string constants
|
||||
* located below 0x10000 in the emulation library. If you need
|
||||
* integer atoms, use the "#1234" form.
|
||||
*
|
||||
* 13/Feb, miguel
|
||||
* Changed the calls to LocalAlloc to LocalAlign. When compiling WINELIB
|
||||
* you call a special version of LocalAlloc that would do the alignement.
|
||||
* When compiling the emulator we depend on LocalAlloc returning the
|
||||
* aligned block. Needed to test the Library.
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "user.h"
|
||||
#include "atom.h"
|
||||
|
||||
|
||||
|
@ -50,7 +57,7 @@ static BOOL ATOM_InitTable( ATOMTABLE ** table, WORD entries )
|
|||
int i;
|
||||
HANDLE handle;
|
||||
|
||||
handle = LocalAlloc( LMEM_MOVEABLE, sizeof(ATOMTABLE) +
|
||||
handle = LocalAlign ( LMEM_MOVEABLE, sizeof(ATOMTABLE) +
|
||||
(entries-1) * sizeof(HANDLE) );
|
||||
if (!handle) return FALSE;
|
||||
*table = (ATOMTABLE *) LocalLock( handle );
|
||||
|
@ -126,7 +133,7 @@ static ATOM ATOM_AddAtom( ATOMTABLE * table, LPCSTR str )
|
|||
entry = entryPtr->next;
|
||||
}
|
||||
|
||||
entry = (int)LocalAlloc( LMEM_MOVEABLE, sizeof(ATOMENTRY)+len-1 ) & 0xffff;
|
||||
entry = (int)LocalAlign( LMEM_MOVEABLE, sizeof(ATOMENTRY)+len-1 ) & 0xffff;
|
||||
if (!entry) return 0;
|
||||
entryPtr = ATOM_MakePtr( table, entry );
|
||||
entryPtr->next = table->entries[hash];
|
||||
|
@ -166,7 +173,7 @@ static ATOM ATOM_DeleteAtom( ATOMTABLE * table, ATOM atom )
|
|||
if (--entryPtr->refCount == 0)
|
||||
{
|
||||
*prevEntry = entryPtr->next;
|
||||
LocalFree( entry );
|
||||
USER_HEAP_FREE( entry );
|
||||
}
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,350 @@
|
|||
/*
|
||||
* 'Wine' Clipboard function handling
|
||||
*
|
||||
* Copyright 1994 Martin Ayotte
|
||||
*/
|
||||
|
||||
static char Copyright[] = "Copyright Martin Ayotte, 1994";
|
||||
|
||||
/*
|
||||
#define DEBUG_CLIPBOARD
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include "prototypes.h"
|
||||
#include "heap.h"
|
||||
#include "win.h"
|
||||
|
||||
typedef struct tagCLIPFORMAT {
|
||||
WORD wFormatID;
|
||||
WORD wRefCount;
|
||||
LPSTR Name;
|
||||
HANDLE hData;
|
||||
DWORD BufSize;
|
||||
void *PrevFormat;
|
||||
void *NextFormat;
|
||||
} CLIPFORMAT;
|
||||
typedef CLIPFORMAT FAR* LPCLIPFORMAT;
|
||||
|
||||
static HWND hWndClipboardOwner = 0;
|
||||
static HWND hWndViewer = 0;
|
||||
static WORD LastRegFormat = 0xC000;
|
||||
|
||||
CLIPFORMAT ClipFormats[12] = {
|
||||
{ CF_TEXT, 1, "Text", (HANDLE)NULL, 0, NULL, &ClipFormats[1] },
|
||||
{ CF_BITMAP, 1, "Bitmap", (HANDLE)NULL, 0, &ClipFormats[0], &ClipFormats[2] },
|
||||
{ CF_METAFILEPICT, 1, "MetaFile Picture", (HANDLE)NULL, 0, &ClipFormats[1], &ClipFormats[3] },
|
||||
{ CF_SYLK, 1, "Sylk", (HANDLE)NULL, 0, &ClipFormats[2], &ClipFormats[4] },
|
||||
{ CF_DIF, 1, "DIF", (HANDLE)NULL, 0, &ClipFormats[3], &ClipFormats[5] },
|
||||
{ CF_TIFF, 1, "TIFF", (HANDLE)NULL, 0, &ClipFormats[4], &ClipFormats[6] },
|
||||
{ CF_OEMTEXT, 1, "OEM Text", (HANDLE)NULL, 0, &ClipFormats[5], &ClipFormats[7] },
|
||||
{ CF_DIB, 1, "DIB", (HANDLE)NULL, 0, &ClipFormats[6], &ClipFormats[8] },
|
||||
{ CF_PALETTE, 1, "Palette", (HANDLE)NULL, 0, &ClipFormats[7], &ClipFormats[9] },
|
||||
{ CF_PENDATA, 1, "PenData", (HANDLE)NULL, 0, &ClipFormats[8], &ClipFormats[10] },
|
||||
{ CF_RIFF, 1, "RIFF", (HANDLE)NULL, 0, &ClipFormats[9], &ClipFormats[11] },
|
||||
{ CF_WAVE, 1, "Wave", (HANDLE)NULL, 0, &ClipFormats[10], NULL }
|
||||
};
|
||||
|
||||
/**************************************************************************
|
||||
* OpenClipboard [USER.137]
|
||||
*/
|
||||
BOOL OpenClipboard(HWND hWnd)
|
||||
{
|
||||
if (hWndClipboardOwner != 0) return FALSE;
|
||||
hWndClipboardOwner = hWnd;
|
||||
#ifdef DEBUG_CLIPBOARD
|
||||
printf("OpenClipboard(%04X); !\n", hWnd);
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* CloseClipboard [USER.138]
|
||||
*/
|
||||
BOOL CloseClipboard()
|
||||
{
|
||||
if (hWndClipboardOwner == 0) return FALSE;
|
||||
hWndClipboardOwner = 0;
|
||||
#ifdef DEBUG_CLIPBOARD
|
||||
printf("CloseClipboard(); !\n");
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* EmptyClipboard [USER.139]
|
||||
*/
|
||||
BOOL EmptyClipboard()
|
||||
{
|
||||
LPCLIPFORMAT lpFormat = ClipFormats;
|
||||
if (hWndClipboardOwner == 0) return FALSE;
|
||||
#ifdef DEBUG_CLIPBOARD
|
||||
printf("EmptyClipboard(); !\n");
|
||||
#endif
|
||||
while(TRUE) {
|
||||
if (lpFormat == NULL) break;
|
||||
if (lpFormat->hData != 0) {
|
||||
GlobalFree(lpFormat->hData);
|
||||
lpFormat->hData = 0;
|
||||
}
|
||||
lpFormat = lpFormat->NextFormat;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* GetClipboardOwner [USER.140]
|
||||
*/
|
||||
HWND GetClipboardOwner()
|
||||
{
|
||||
#ifdef DEBUG_CLIPBOARD
|
||||
printf("GetClipboardOwner() = %04X !\n", hWndClipboardOwner);
|
||||
#endif
|
||||
return hWndClipboardOwner;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* SetClipboardData [USER.141]
|
||||
*/
|
||||
HANDLE SetClipboardData(WORD wFormat, HANDLE hData)
|
||||
{
|
||||
LPCLIPFORMAT lpFormat = ClipFormats;
|
||||
#ifdef DEBUG_CLIPBOARD
|
||||
printf("SetClipboardDate(%04X, %04X) !\n", wFormat, hData);
|
||||
#endif
|
||||
while(TRUE) {
|
||||
if (lpFormat == NULL) return 0;
|
||||
if (lpFormat->wFormatID == wFormat) break;
|
||||
lpFormat = lpFormat->NextFormat;
|
||||
}
|
||||
if (lpFormat->hData != 0) GlobalFree(lpFormat->hData);
|
||||
lpFormat->hData = hData;
|
||||
return lpFormat->hData;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* GetClipboardData [USER.142]
|
||||
*/
|
||||
HANDLE GetClipboardData(WORD wFormat)
|
||||
{
|
||||
LPCLIPFORMAT lpFormat = ClipFormats;
|
||||
#ifdef DEBUG_CLIPBOARD
|
||||
printf("GetClipboardData(%04X) !\n", wFormat);
|
||||
#endif
|
||||
while(TRUE) {
|
||||
if (lpFormat == NULL) return 0;
|
||||
if (lpFormat->wFormatID == wFormat) break;
|
||||
lpFormat = lpFormat->NextFormat;
|
||||
}
|
||||
return lpFormat->hData;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* CountClipboardFormats [USER.143]
|
||||
*/
|
||||
int CountClipboardFormats()
|
||||
{
|
||||
int FormatCount = 0;
|
||||
LPCLIPFORMAT lpFormat = ClipFormats;
|
||||
while(TRUE) {
|
||||
if (lpFormat == NULL) break;
|
||||
if (lpFormat->hData != 0) {
|
||||
#ifdef DEBUG_CLIPBOARD
|
||||
printf("CountClipboardFormats // Find Not Empty (%04X) !\n",
|
||||
lpFormat->hData);
|
||||
#endif
|
||||
FormatCount++;
|
||||
}
|
||||
lpFormat = lpFormat->NextFormat;
|
||||
}
|
||||
#ifdef DEBUG_CLIPBOARD
|
||||
printf("CountClipboardFormats() = %d !\n", FormatCount);
|
||||
#endif
|
||||
return FormatCount;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* EnumClipboardFormats [USER.144]
|
||||
*/
|
||||
WORD EnumClipboardFormats(WORD wFormat)
|
||||
{
|
||||
LPCLIPFORMAT lpFormat = ClipFormats;
|
||||
#ifdef DEBUG_CLIPBOARD
|
||||
printf("EnumClipboardFormats(%04X) !\n", wFormat);
|
||||
#endif
|
||||
if (wFormat == 0) {
|
||||
if (lpFormat->hData != 0)
|
||||
return lpFormat->wFormatID;
|
||||
else
|
||||
wFormat = lpFormat->wFormatID;
|
||||
}
|
||||
while(TRUE) {
|
||||
if (lpFormat == NULL) return 0;
|
||||
if (lpFormat->wFormatID == wFormat) break;
|
||||
lpFormat = lpFormat->NextFormat;
|
||||
}
|
||||
#ifdef DEBUG_CLIPBOARD
|
||||
printf("EnumClipboardFormats // Find Last (%04X) !\n",
|
||||
lpFormat->wFormatID);
|
||||
#endif
|
||||
lpFormat = lpFormat->NextFormat;
|
||||
while(TRUE) {
|
||||
if (lpFormat == NULL) return 0;
|
||||
if (lpFormat->hData != 0) break;
|
||||
lpFormat = lpFormat->NextFormat;
|
||||
}
|
||||
#ifdef DEBUG_CLIPBOARD
|
||||
printf("EnumClipboardFormats // Find Not Empty Id=%04X hData=%04X !\n",
|
||||
lpFormat->wFormatID, lpFormat->hData);
|
||||
#endif
|
||||
return lpFormat->wFormatID;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* RegisterClipboardFormat [USER.145]
|
||||
*/
|
||||
WORD RegisterClipboardFormat(LPCSTR FormatName)
|
||||
{
|
||||
LPCLIPFORMAT lpNewFormat;
|
||||
LPCLIPFORMAT lpFormat = ClipFormats;
|
||||
if (FormatName == NULL) return 0;
|
||||
while(TRUE) {
|
||||
if (lpFormat->NextFormat == NULL) break;
|
||||
lpFormat = lpFormat->NextFormat;
|
||||
}
|
||||
lpNewFormat = (LPCLIPFORMAT)malloc(sizeof(CLIPFORMAT));
|
||||
if (lpNewFormat == NULL) return 0;
|
||||
lpFormat->NextFormat = lpNewFormat;
|
||||
#ifdef DEBUG_CLIPBOARD
|
||||
printf("RegisterClipboardFormat('%s') !\n", FormatName);
|
||||
#endif
|
||||
lpNewFormat->wFormatID = LastRegFormat;
|
||||
lpNewFormat->wRefCount = 1;
|
||||
lpNewFormat->Name = (LPSTR)malloc(strlen(FormatName) + 1);
|
||||
if (lpNewFormat->Name == NULL) {
|
||||
free(lpNewFormat);
|
||||
return 0;
|
||||
}
|
||||
strcpy(lpNewFormat->Name, FormatName);
|
||||
lpNewFormat->hData = 0;
|
||||
lpNewFormat->BufSize = 0;
|
||||
lpNewFormat->PrevFormat = lpFormat;
|
||||
lpNewFormat->NextFormat = NULL;
|
||||
return LastRegFormat++;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* GetClipboardFormatName [USER.146]
|
||||
*/
|
||||
int GetClipboardFormatName(WORD wFormat, LPSTR retStr, short maxlen)
|
||||
{
|
||||
LPCLIPFORMAT lpFormat = ClipFormats;
|
||||
#ifdef DEBUG_CLIPBOARD
|
||||
printf("GetClipboardFormat(%04X, %08X, %d) !\n", wFormat, retStr, maxlen);
|
||||
#endif
|
||||
while(TRUE) {
|
||||
if (lpFormat == NULL) return 0;
|
||||
if (lpFormat->wFormatID == wFormat) break;
|
||||
lpFormat = lpFormat->NextFormat;
|
||||
}
|
||||
if (lpFormat->Name == NULL) return 0;
|
||||
#ifdef DEBUG_CLIPBOARD
|
||||
printf("GetClipboardFormat // Name='%s' !\n", lpFormat->Name);
|
||||
#endif
|
||||
maxlen = min(maxlen - 1, strlen(lpFormat->Name));
|
||||
printf("GetClipboardFormat // maxlen=%d !\n", maxlen);
|
||||
memcpy(retStr, lpFormat->Name, maxlen);
|
||||
retStr[maxlen] = 0;
|
||||
return maxlen;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* SetClipboardViewer [USER.147]
|
||||
*/
|
||||
HWND SetClipboardViewer(HWND hWnd)
|
||||
{
|
||||
#ifdef DEBUG_CLIPBOARD
|
||||
printf("SetClipboardFormat(%04X) !\n", hWnd);
|
||||
#endif
|
||||
hWndViewer = hWnd;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* GetClipboardViewer [USER.148]
|
||||
*/
|
||||
HWND GetClipboardViewer()
|
||||
{
|
||||
#ifdef DEBUG_CLIPBOARD
|
||||
printf("GetClipboardFormat() = %04X !\n", hWndViewer);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* ChangeClipboardChain [USER.149]
|
||||
*/
|
||||
BOOL ChangeClipboardChain(HWND hWnd, HWND hWndNext)
|
||||
{
|
||||
#ifdef DEBUG_CLIPBOARD
|
||||
printf("ChangeClipboardChain(%04X, %04X) !\n", hWnd, hWndNext);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* IsClipboardFormatAvailable [USER.193]
|
||||
*/
|
||||
BOOL IsClipboardFormatAvailable(WORD wFormat)
|
||||
{
|
||||
LPCLIPFORMAT lpFormat = ClipFormats;
|
||||
#ifdef DEBUG_CLIPBOARD
|
||||
printf("IsClipboardFormatAvailable(%04X) !\n", wFormat);
|
||||
#endif
|
||||
while(TRUE) {
|
||||
if (lpFormat == NULL) return FALSE;
|
||||
if (lpFormat->wFormatID == wFormat) break;
|
||||
lpFormat = lpFormat->NextFormat;
|
||||
}
|
||||
return (lpFormat->hData != 0);
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* GetOpenClipboardWindow [USER.248]
|
||||
*/
|
||||
HWND GetOpenClipboardWindow()
|
||||
{
|
||||
#ifdef DEBUG_CLIPBOARD
|
||||
printf("GetOpenClipboardWindow() = %04X !\n", hWndClipboardOwner);
|
||||
#endif
|
||||
return hWndClipboardOwner;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* GetPriorityClipboardFormat [USER.402]
|
||||
*/
|
||||
int GetPriorityClipboardFormat(WORD FAR *lpPriorityList, short nCount)
|
||||
{
|
||||
#ifdef DEBUG_CLIPBOARD
|
||||
printf("GetPriorityClipboardFormat(%08X, %d) !\n", lpPriorityList, nCount);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
42
misc/comm.c
42
misc/comm.c
|
@ -7,6 +7,7 @@
|
|||
#include <termios.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
#if defined(__NetBSD__) || defined(__FreeBSD__)
|
||||
#include <errno.h>
|
||||
|
@ -53,12 +54,12 @@ void Comm_Init(void)
|
|||
if (!S_ISCHR(st.st_mode))
|
||||
fprintf(stderr,"comm: can 't use `%s' as COM%d !\n", temp, x);
|
||||
else
|
||||
if ((ptr = malloc(strlen(temp)+1)) == NULL)
|
||||
if ((COM[serial].devicename = malloc(strlen(temp)+1)) == NULL)
|
||||
fprintf(stderr,"comm: can't malloc for device info!\n");
|
||||
else {
|
||||
COM[serial].fd = 0;
|
||||
COM[serial].devicename = ptr;
|
||||
strcpy(COM[serial++].devicename, temp);
|
||||
strcpy(COM[serial].devicename, temp);
|
||||
serial++;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -74,17 +75,16 @@ void Comm_Init(void)
|
|||
if (!S_ISCHR(st.st_mode))
|
||||
fprintf(stderr,"comm: can 't use `%s' as LPT%d !\n", temp, x);
|
||||
else
|
||||
if ((ptr = malloc(strlen(temp)+1)) == NULL)
|
||||
if ((LPT[parallel].devicename = malloc(strlen(temp)+1)) == NULL)
|
||||
fprintf(stderr,"comm: can't malloc for device info!\n");
|
||||
else {
|
||||
LPT[serial].fd = 0;
|
||||
LPT[serial].devicename = ptr;
|
||||
strcpy(LPT[serial++].devicename, temp);
|
||||
LPT[parallel].fd = 0;
|
||||
strcpy(LPT[parallel].devicename, temp);
|
||||
parallel++;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
atexit(Comm_DeInit);
|
||||
}
|
||||
|
||||
void Comm_DeInit(void)
|
||||
|
@ -155,6 +155,12 @@ fprintf(stderr,"BuildCommDCB: (%s), ptr %d\n", device, lpdcb);
|
|||
if (!strncmp(device,"COM",3)) {
|
||||
port = device[3] - '0';
|
||||
|
||||
|
||||
if (port-- == 0) {
|
||||
fprintf(stderr, "comm: BUG ! COM0 can't exists!.\n");
|
||||
commerror = IE_BADID;
|
||||
}
|
||||
|
||||
if (!ValidCOMPort(port)) {
|
||||
commerror = IE_BADID;
|
||||
return -1;
|
||||
|
@ -240,6 +246,11 @@ fprintf(stderr,"OpenComm: %s, %d, %d\n", device, cbInQueue, cbOutQueue);
|
|||
if (!strncmp(device,"COM",3)) {
|
||||
port = device[3] - '0';
|
||||
|
||||
if (port-- == 0) {
|
||||
fprintf(stderr, "comm: BUG ! COM0 doesn't exists!.\n");
|
||||
commerror = IE_BADID;
|
||||
}
|
||||
|
||||
if (!ValidCOMPort(port)) {
|
||||
commerror = IE_BADID;
|
||||
return -1;
|
||||
|
@ -473,9 +484,20 @@ fprintf(stderr,"SetCommState: fd %d, ptr %d\n", lpdcb->Id, lpdcb);
|
|||
commerror = WinError();
|
||||
return -1;
|
||||
}
|
||||
cfmakeraw(&port);
|
||||
|
||||
port.c_cc[VMIN] = 0;
|
||||
port.c_cc[VTIME] = 0;
|
||||
port.c_cc[VTIME] = 1;
|
||||
|
||||
port.c_iflag &= ~(ISTRIP|BRKINT|IGNCR|ICRNL|INLCR|IMAXBEL);
|
||||
port.c_iflag |= (IGNBRK);
|
||||
|
||||
port.c_oflag &= ~(OPOST);
|
||||
|
||||
port.c_cflag &= ~(HUPCL);
|
||||
port.c_cflag |= CLOCAL | CREAD;
|
||||
|
||||
port.c_lflag &= ~(ICANON|ECHO|ISIG);
|
||||
port.c_lflag |= NOFLSH;
|
||||
|
||||
fprintf(stderr,"SetCommState: baudrate %d\n",lpdcb->BaudRate);
|
||||
#ifdef CBAUD
|
||||
|
|
|
@ -7,7 +7,6 @@ static char Copyright[] = "Copyright Martin Ayotte, 1993";
|
|||
#define DEBUG_CURSOR
|
||||
*/
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <X11/cursorfont.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <stdio.h>
|
||||
|
@ -292,6 +291,30 @@ BOOL DestroyCursor(HCURSOR hCursor)
|
|||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* CURSOR_SetWinCursor
|
||||
*
|
||||
* Set the cursor for a given window. To be used instead of SetCursor()
|
||||
* wherever possible.
|
||||
*/
|
||||
HCURSOR CURSOR_SetWinCursor( HWND hwnd, HCURSOR hCursor )
|
||||
{
|
||||
CURSORALLOC *lpcur;
|
||||
HCURSOR hOldCursor;
|
||||
WND * wndPtr = WIN_FindWndPtr( hwnd );
|
||||
|
||||
if (!wndPtr || !hCursor) return 0;
|
||||
lpcur = (CURSORALLOC *)GlobalLock(hCursor);
|
||||
hOldCursor = hActiveCursor;
|
||||
if (hActiveCursor != hCursor) ShowCursCount = 0;
|
||||
if (ShowCursCount >= 0)
|
||||
XDefineCursor( display, wndPtr->window, lpcur->xcursor );
|
||||
GlobalUnlock(hCursor);
|
||||
hActiveCursor = hCursor;
|
||||
return hOldCursor;
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* SetCursor [USER.69]
|
||||
*/
|
113
misc/dos_fs.c
113
misc/dos_fs.c
|
@ -10,7 +10,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) || defined(sun)
|
||||
#include <sys/vfs.h>
|
||||
#endif
|
||||
#if defined(__NetBSD__) || defined(__FreeBSD__)
|
||||
|
@ -73,15 +73,6 @@ void DOS_InitFS(void)
|
|||
ToDos(TempDirectory);
|
||||
ToDos(WindowsPath);
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr,"wine.ini = %s\n",WINE_INI);
|
||||
fprintf(stderr,"win.ini = %s\n",WIN_INI);
|
||||
fprintf(stderr,"windir = %s\n",WindowsDirectory);
|
||||
fprintf(stderr,"sysdir = %s\n",SystemDirectory);
|
||||
fprintf(stderr,"tempdir = %s\n",TempDirectory);
|
||||
fprintf(stderr,"path = %s\n",WindowsPath);
|
||||
#endif
|
||||
|
||||
for (x=0; x!=MAX_DOS_DRIVES; x++) {
|
||||
DosDrives[x].serialnumber = (0xEB0500L | x);
|
||||
|
||||
|
@ -104,14 +95,11 @@ void DOS_InitFS(void)
|
|||
temp[strlen(temp)] = '\0';
|
||||
DosDrives[x].rootdir = ptr;
|
||||
strcpy(DosDrives[x].rootdir, temp);
|
||||
strcpy(DosDrives[x].cwd, "/windows/");
|
||||
strcpy(DosDrives[x].cwd, "/");
|
||||
strcpy(DosDrives[x].label, "DRIVE-");
|
||||
strcat(DosDrives[x].label, drive);
|
||||
DosDrives[x].disabled = 0;
|
||||
}
|
||||
|
||||
atexit(DOS_DeInitFS);
|
||||
|
||||
DOS_SetDefaultDrive(2);
|
||||
|
||||
for (x=0; x!=MAX_DOS_DRIVES; x++) {
|
||||
|
@ -132,6 +120,14 @@ void DOS_InitFS(void)
|
|||
for (x=0; x!=MAX_OPEN_DIRS ; x++)
|
||||
DosDirs[x].inuse = 0;
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr,"wine.ini = %s\n",WINE_INI);
|
||||
fprintf(stderr,"win.ini = %s\n",WIN_INI);
|
||||
fprintf(stderr,"windir = %s\n",WindowsDirectory);
|
||||
fprintf(stderr,"sysdir = %s\n",SystemDirectory);
|
||||
fprintf(stderr,"tempdir = %s\n",TempDirectory);
|
||||
fprintf(stderr,"path = %s\n",WindowsPath);
|
||||
#endif
|
||||
}
|
||||
|
||||
void DOS_DeInitFS(void)
|
||||
|
@ -187,7 +183,7 @@ WORD DOS_GetEquipment(void)
|
|||
if (diskdrives)
|
||||
diskdrives--;
|
||||
|
||||
equipment = diskdrives << 6;
|
||||
equipment = (diskdrives << 6) || 0x02;
|
||||
|
||||
return (equipment);
|
||||
}
|
||||
|
@ -633,17 +629,23 @@ fprintf(stderr,"FindFile: looking for %s\n",rootname);
|
|||
*/
|
||||
char *WineIniFileName(void)
|
||||
{
|
||||
static char *IniName = NULL;
|
||||
static char *IniName = NULL, *env;
|
||||
|
||||
char inipath[256];
|
||||
|
||||
if (IniName)
|
||||
return IniName;
|
||||
|
||||
getcwd(inipath, 256);
|
||||
strcat(inipath, ";");
|
||||
strcat(inipath, getenv("HOME"));
|
||||
strcat(inipath, ";");
|
||||
strcat(inipath, getenv("WINEPATH"));
|
||||
|
||||
if ((env = getenv("HOME")) !=NULL) {
|
||||
strcat(inipath, ";");
|
||||
strcat(inipath, env);
|
||||
}
|
||||
if ((env = getenv("WINEPATH")) !=NULL) {
|
||||
strcat(inipath, ";");
|
||||
strcat(inipath, env);
|
||||
}
|
||||
|
||||
IniName = malloc(1024);
|
||||
if (FindFile(IniName, 1024, "wine.ini", NULL, inipath) == NULL)
|
||||
|
@ -672,6 +674,43 @@ char *WinIniFileName()
|
|||
return name;
|
||||
}
|
||||
|
||||
int match(char *filename, char *filemask)
|
||||
{
|
||||
int x, masklength = strlen(filemask);
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "match: %s, %s\n", filename, filemask);
|
||||
#endif
|
||||
|
||||
for (x = 0; x != masklength ; x++) {
|
||||
#ifdef DEBUG
|
||||
printf("(%c%c) ", *filename, filemask[x]);
|
||||
#endif
|
||||
|
||||
if (!*filename)
|
||||
/* stop if EOFname */
|
||||
return 1;
|
||||
|
||||
if (filemask[x] == '?') {
|
||||
/* skip the next char */
|
||||
filename++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (filemask[x] == '*') {
|
||||
/* skip each char until '.' or EOFname */
|
||||
while (*filename && *filename !='.')
|
||||
filename++;
|
||||
continue;
|
||||
}
|
||||
if (filemask[x] != *filename)
|
||||
return 0;
|
||||
|
||||
filename++;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
struct dosdirent *DOS_opendir(char *dosdirname)
|
||||
{
|
||||
int x,y;
|
||||
|
@ -687,21 +726,24 @@ struct dosdirent *DOS_opendir(char *dosdirname)
|
|||
if ((unixdirname = GetDirectUnixFileName(dosdirname)) == NULL)
|
||||
return NULL;
|
||||
|
||||
strcpy(temp,unixdirname);
|
||||
strcpy(temp, unixdirname);
|
||||
|
||||
|
||||
y = strlen(temp);
|
||||
|
||||
while (y--)
|
||||
{
|
||||
if (temp[y] == '/')
|
||||
{
|
||||
temp[y] = '\0';
|
||||
temp[y++] = '\0';
|
||||
strcpy(DosDirs[x].filemask, temp +y);
|
||||
ToDos(DosDirs[x].filemask);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(stderr,"%s -> %s\n",unixdirname,temp);
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr,"DOS_opendir: %s -> %s\n", unixdirname, temp);
|
||||
#endif
|
||||
|
||||
DosDirs[x].inuse = 1;
|
||||
strcpy(DosDirs[x].unixpath, temp);
|
||||
|
@ -722,17 +764,20 @@ struct dosdirent *DOS_readdir(struct dosdirent *de)
|
|||
if (!de->inuse)
|
||||
return NULL;
|
||||
|
||||
if ((d = readdir(de->ds)) == NULL)
|
||||
{
|
||||
closedir(de->ds);
|
||||
de->inuse = 0;
|
||||
return de;
|
||||
}
|
||||
do {
|
||||
if ((d = readdir(de->ds)) == NULL)
|
||||
{
|
||||
closedir(de->ds);
|
||||
de->inuse = 0;
|
||||
return de;
|
||||
}
|
||||
|
||||
strcpy(de->filename, d->d_name);
|
||||
if (d->d_reclen > 12)
|
||||
de->filename[12] = '\0';
|
||||
ToDos (de->filename);
|
||||
strcpy(de->filename, d->d_name);
|
||||
if (d->d_reclen > 12)
|
||||
de->filename[12] = '\0';
|
||||
|
||||
ToDos(de->filename);
|
||||
} while ( !match(de->filename, de->filemask) );
|
||||
|
||||
de->attribute = 0x0;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "win.h"
|
||||
#include "windows.h"
|
||||
|
||||
#define HELP_CONTEXT 0x0001
|
||||
#define HELP_QUIT 0x0002
|
||||
|
@ -25,7 +25,7 @@ WORD WinExec(LPSTR lpCmdLine, WORD nCmdShow)
|
|||
{
|
||||
int X, X2, C;
|
||||
char *ArgV[20];
|
||||
printf("WinExec(%s, %u)\n", lpCmdLine, nCmdShow);
|
||||
printf("WinExec('%s', %04X)\n", lpCmdLine, nCmdShow);
|
||||
for (X = X2 = C = 0; X < strlen(lpCmdLine) + 1; X++) {
|
||||
if ((lpCmdLine[X] == ' ') || (lpCmdLine[X] == '\0')) {
|
||||
ArgV[C] = (char *)malloc(X - X2 + 1);
|
||||
|
|
21
misc/file.c
21
misc/file.c
|
@ -23,6 +23,7 @@
|
|||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
#include <unistd.h>
|
||||
#include "prototypes.h"
|
||||
|
||||
char WindowsDirectory[256], SystemDirectory[256], TempDirectory[256];
|
||||
|
@ -33,7 +34,7 @@ char WindowsDirectory[256], SystemDirectory[256], TempDirectory[256];
|
|||
|
||||
Emulate the _lopen windows call
|
||||
***************************************************************************/
|
||||
WORD KERNEL__lopen (LPSTR lpPathName, WORD iReadWrite)
|
||||
int _lopen (LPSTR lpPathName, int iReadWrite)
|
||||
{
|
||||
int handle;
|
||||
char *UnixFileName;
|
||||
|
@ -60,7 +61,7 @@ WORD KERNEL__lopen (LPSTR lpPathName, WORD iReadWrite)
|
|||
/***************************************************************************
|
||||
_lread
|
||||
***************************************************************************/
|
||||
WORD KERNEL__lread (WORD hFile, LPSTR lpBuffer, WORD wBytes)
|
||||
WORD _lread (int hFile, LPSTR lpBuffer, int wBytes)
|
||||
{
|
||||
int result;
|
||||
|
||||
|
@ -80,7 +81,7 @@ WORD KERNEL__lread (WORD hFile, LPSTR lpBuffer, WORD wBytes)
|
|||
/****************************************************************************
|
||||
_lwrite
|
||||
****************************************************************************/
|
||||
WORD KERNEL__lwrite (WORD hFile, LPSTR lpBuffer, WORD wBytes)
|
||||
WORD _lwrite (int hFile, LPSTR lpBuffer, int wBytes)
|
||||
{
|
||||
int result;
|
||||
|
||||
|
@ -99,7 +100,7 @@ WORD KERNEL__lwrite (WORD hFile, LPSTR lpBuffer, WORD wBytes)
|
|||
/***************************************************************************
|
||||
_lclose
|
||||
***************************************************************************/
|
||||
WORD KERNEL__lclose (WORD hFile)
|
||||
int _lclose (int hFile)
|
||||
{
|
||||
#ifdef DEBUG_FILE
|
||||
fprintf(stderr, "_lclose: handle %d\n", hFile);
|
||||
|
@ -114,7 +115,7 @@ WORD KERNEL__lclose (WORD hFile)
|
|||
Warning: This is nearly totally untested. It compiles, that's it...
|
||||
-SL 9/13/93
|
||||
**************************************************************************/
|
||||
WORD KERNEL_OpenFile (LPSTR lpFileName, LPOFSTRUCT ofs, WORD wStyle)
|
||||
int OpenFile (LPSTR lpFileName, LPOFSTRUCT ofs, WORD wStyle)
|
||||
{
|
||||
int base,flags;
|
||||
|
||||
|
@ -141,7 +142,7 @@ WORD KERNEL_OpenFile (LPSTR lpFileName, LPOFSTRUCT ofs, WORD wStyle)
|
|||
}
|
||||
else
|
||||
{
|
||||
return KERNEL__lopen (lpFileName, wStyle);
|
||||
return _lopen (lpFileName, wStyle);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -152,6 +153,10 @@ WORD KERNEL_OpenFile (LPSTR lpFileName, LPOFSTRUCT ofs, WORD wStyle)
|
|||
Linux isn't limited to 20 files, this one's easy. - SL
|
||||
**************************************************************************/
|
||||
|
||||
#if !defined (OPEN_MAX)
|
||||
/* This one is for the Sun */
|
||||
#define OPEN_MAX _POSIX_OPEN_MAX
|
||||
#endif
|
||||
WORD SetHandleCount (WORD wNumber)
|
||||
{
|
||||
printf("SetHandleCount(%d)\n",wNumber);
|
||||
|
@ -161,7 +166,7 @@ WORD SetHandleCount (WORD wNumber)
|
|||
/***************************************************************************
|
||||
_llseek
|
||||
***************************************************************************/
|
||||
LONG KERNEL__llseek (WORD hFile, LONG lOffset, int nOrigin)
|
||||
LONG _llseek (int hFile, LONG lOffset, int nOrigin)
|
||||
{
|
||||
int origin;
|
||||
|
||||
|
@ -184,7 +189,7 @@ LONG KERNEL__llseek (WORD hFile, LONG lOffset, int nOrigin)
|
|||
/***************************************************************************
|
||||
_lcreate
|
||||
***************************************************************************/
|
||||
LONG KERNEL__lcreate (LPSTR lpszFilename, int fnAttribute)
|
||||
LONG _lcreate (LPSTR lpszFilename, int fnAttribute)
|
||||
{
|
||||
int handle;
|
||||
char *UnixFileName;
|
||||
|
|
178
misc/main.c
178
misc/main.c
|
@ -20,13 +20,15 @@ Screen * XT_screen; /* To be removed */
|
|||
Display * display;
|
||||
Screen * screen;
|
||||
|
||||
char *ProgramName; /* Used by resource.c with WINELIB */
|
||||
|
||||
struct options Options =
|
||||
{ /* default options */
|
||||
NULL, /* spyFilename */
|
||||
FALSE, /* usePrivateMap */
|
||||
FALSE, /* synchronous */
|
||||
SW_SHOWNORMAL /* cmdShow */
|
||||
SW_SHOWNORMAL, /* cmdShow */
|
||||
FALSE
|
||||
};
|
||||
|
||||
|
||||
|
@ -36,7 +38,8 @@ static XrmOptionDescRec optionsTable[] =
|
|||
{ "-iconic", ".iconic", XrmoptionNoArg, (caddr_t)"on" },
|
||||
{ "-privatemap", ".privatemap", XrmoptionNoArg, (caddr_t)"on" },
|
||||
{ "-synchronous", ".synchronous", XrmoptionNoArg, (caddr_t)"on" },
|
||||
{ "-spy", ".spy", XrmoptionSepArg, (caddr_t)NULL }
|
||||
{ "-spy", ".spy", XrmoptionSepArg, (caddr_t)NULL },
|
||||
{ "-relaydbg", ".relaydbg", XrmoptionNoArg, (caddr_t)"on" }
|
||||
};
|
||||
|
||||
#define NB_OPTIONS (sizeof(optionsTable) / sizeof(optionsTable[0]))
|
||||
|
@ -66,8 +69,11 @@ static void MAIN_ParseOptions( int *argc, char *argv[] )
|
|||
XrmDatabase db = NULL;
|
||||
|
||||
XrmParseCommand( &db, optionsTable, NB_OPTIONS, "wine", argc, argv );
|
||||
#ifdef WINELIB
|
||||
/* Need to assemble command line and pass it to WinMain */
|
||||
#else
|
||||
if (*argc < 2) MAIN_Usage( argv[0] );
|
||||
|
||||
#endif
|
||||
if (XrmGetResource( db, "wine.display", "Wine.display", &dummy, &value ))
|
||||
display_name = value.addr;
|
||||
else display_name = NULL;
|
||||
|
@ -85,6 +91,8 @@ static void MAIN_ParseOptions( int *argc, char *argv[] )
|
|||
Options.usePrivateMap = TRUE;
|
||||
if (XrmGetResource(db,"wine.synchronous","Wine.synchronous",&dummy,&value))
|
||||
Options.synchronous = TRUE;
|
||||
if (XrmGetResource(db,"wine.relaydbg","Wine.relaydbg",&dummy,&value))
|
||||
Options.relay_debug = TRUE;
|
||||
if (XrmGetResource(db,"wine.spy","Wine.spy",&dummy,&value))
|
||||
Options.spyFilename = value.addr;
|
||||
}
|
||||
|
@ -95,6 +103,9 @@ static void MAIN_ParseOptions( int *argc, char *argv[] )
|
|||
*/
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
int ret_val;
|
||||
XKeyboardState keyboard_state;
|
||||
XKeyboardControl keyboard_value;
|
||||
|
||||
XrmInitialize();
|
||||
|
||||
|
@ -105,16 +116,171 @@ int main( int argc, char *argv[] )
|
|||
XT_screen = screen;
|
||||
if (Options.synchronous) XSynchronize( display, True );
|
||||
|
||||
XGetKeyboardControl(display, &keyboard_state);
|
||||
|
||||
ProgramName = argv [0];
|
||||
DOS_InitFS();
|
||||
Comm_Init();
|
||||
return _WinMain( argc, argv );
|
||||
}
|
||||
|
||||
ret_val = _WinMain( argc, argv );
|
||||
|
||||
Comm_DeInit ();
|
||||
DOS_DeInitFS ();
|
||||
sync_profiles ();
|
||||
|
||||
/* restore sounds/keyboard settings */
|
||||
|
||||
keyboard_value.key_click_percent = keyboard_state.key_click_percent;
|
||||
keyboard_value.bell_percent = keyboard_state.bell_percent;
|
||||
keyboard_value.bell_pitch = keyboard_state.bell_pitch;
|
||||
keyboard_value.bell_duration = keyboard_state.bell_duration;
|
||||
keyboard_value.auto_repeat_mode = keyboard_state.global_auto_repeat;
|
||||
|
||||
XChangeKeyboardControl(display, KBKeyClickPercent | KBBellPercent |
|
||||
KBBellPitch | KBBellDuration | KBAutoRepeatMode, &keyboard_value);
|
||||
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* MessageBeep (USER.104)
|
||||
*/
|
||||
void MessageBeep( WORD i )
|
||||
{
|
||||
XBell( display, 100 );
|
||||
XBell(display, 100);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetVersion (KERNEL.3)
|
||||
*/
|
||||
LONG GetVersion(void)
|
||||
{
|
||||
return (0x04001003); /* dos version 4.00, win ver 3.1 */
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetWinFlags (KERNEL.132)
|
||||
*/
|
||||
LONG GetWinFlags(void)
|
||||
{
|
||||
return (WF_STANDARD | WF_CPU286 | WF_PMODE | WF_80x87);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetTimerResolution (USER.14)
|
||||
*/
|
||||
LONG GetTimerResolution(void)
|
||||
{
|
||||
return (1000);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* SystemParametersInfo (USER.483)
|
||||
*/
|
||||
BOOL SystemParametersInfo (UINT uAction, UINT uParam, void FAR *lpvParam, UINT fuWinIni)
|
||||
{
|
||||
XKeyboardState keyboard_state;
|
||||
XKeyboardControl keyboard_value;
|
||||
|
||||
fprintf(stderr, "SystemParametersInfo: action %d, param %x, flag %x\n",
|
||||
uAction, uParam, fuWinIni);
|
||||
|
||||
switch (uAction) {
|
||||
case SPI_GETBEEP:
|
||||
XGetKeyboardControl(display, &keyboard_state);
|
||||
if (keyboard_state.bell_percent == 0)
|
||||
*(BOOL *) lpvParam = FALSE;
|
||||
else
|
||||
*(BOOL *) lpvParam = TRUE;
|
||||
break;
|
||||
|
||||
case SPI_GETBORDER:
|
||||
*(int *) lpvParam = 1;
|
||||
break;
|
||||
|
||||
case SPI_GETFASTTASKSWITCH:
|
||||
*(BOOL *) lpvParam = FALSE;
|
||||
break;
|
||||
|
||||
case SPI_GETGRIDGRANULARITY:
|
||||
*(int *) lpvParam = 1;
|
||||
break;
|
||||
|
||||
case SPI_GETICONTITLEWRAP:
|
||||
*(BOOL *) lpvParam = FALSE;
|
||||
break;
|
||||
|
||||
case SPI_GETKEYBOARDDELAY:
|
||||
*(int *) lpvParam = 1;
|
||||
break;
|
||||
|
||||
case SPI_GETKEYBOARDSPEED:
|
||||
*(WORD *) lpvParam = 30;
|
||||
break;
|
||||
|
||||
case SPI_GETMENUDROPALIGNMENT:
|
||||
*(BOOL *) lpvParam = FALSE;
|
||||
break;
|
||||
|
||||
case SPI_GETSCREENSAVEACTIVE:
|
||||
*(WORD *) lpvParam = FALSE;
|
||||
break;
|
||||
|
||||
case SPI_GETSCREENSAVETIMEOUT:
|
||||
*(int *) lpvParam = 0;
|
||||
break;
|
||||
|
||||
case SPI_ICONHORIZONTALSPACING:
|
||||
if (lpvParam == NULL)
|
||||
fprintf(stderr, "SystemParametersInfo: Horizontal icon spacing set to %d\n.", uParam);
|
||||
else
|
||||
*(int *) lpvParam = 50;
|
||||
break;
|
||||
|
||||
case SPI_ICONVERTICALSPACING:
|
||||
if (lpvParam == NULL)
|
||||
fprintf(stderr, "SystemParametersInfo: Vertical icon spacing set to %d\n.", uParam);
|
||||
else
|
||||
*(int *) lpvParam = 50;
|
||||
break;
|
||||
|
||||
case SPI_SETBEEP:
|
||||
if (uParam == TRUE)
|
||||
keyboard_value.bell_percent = -1;
|
||||
else
|
||||
keyboard_value.bell_percent = 0;
|
||||
XChangeKeyboardControl(display, KBBellPercent,
|
||||
&keyboard_value);
|
||||
break;
|
||||
|
||||
case SPI_SETSCREENSAVEACTIVE:
|
||||
if (uParam == TRUE)
|
||||
XActivateScreenSaver(display);
|
||||
else
|
||||
XResetScreenSaver(display);
|
||||
break;
|
||||
|
||||
case SPI_SETSCREENSAVETIMEOUT:
|
||||
XSetScreenSaver(display, uParam, 60, DefaultBlanking,
|
||||
DefaultExposures);
|
||||
break;
|
||||
|
||||
case SPI_LANGDRIVER:
|
||||
case SPI_SETBORDER:
|
||||
case SPI_SETDESKPATTERN:
|
||||
case SPI_SETDESKWALLPAPER:
|
||||
case SPI_SETDOUBLECLKHEIGHT:
|
||||
case SPI_SETDOUBLECLICKTIME:
|
||||
case SPI_SETDOUBLECLKWIDTH:
|
||||
case SPI_SETFASTTASKSWITCH:
|
||||
case SPI_SETKEYBOARDDELAY:
|
||||
case SPI_SETKEYBOARDSPEED:
|
||||
fprintf(stderr, "SystemParametersInfo: option %d ignored.\n", uParam);
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr, "SystemParametersInfo: unknown option %d.\n", uParam);
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -17,6 +17,8 @@ static char Copyright[] = "Copyright Martin Ayotte, 1993";
|
|||
#include "heap.h"
|
||||
#include "win.h"
|
||||
|
||||
extern HINSTANCE hSysRes;
|
||||
extern HBITMAP hUpArrow;
|
||||
|
||||
typedef struct tagMSGBOX {
|
||||
LPSTR Title;
|
||||
|
@ -39,7 +41,7 @@ LONG SystemMessageBoxProc(HWND hwnd, WORD message, WORD wParam, LONG lParam);
|
|||
* MessageBox [USER.1]
|
||||
*/
|
||||
|
||||
int MessageBox( HWND hWnd, LPSTR str, LPSTR title, WORD type )
|
||||
int MessageBox(HWND hWnd, LPSTR str, LPSTR title, WORD type)
|
||||
{
|
||||
HWND hDlg;
|
||||
WND *wndPtr;
|
||||
|
@ -47,15 +49,20 @@ int MessageBox( HWND hWnd, LPSTR str, LPSTR title, WORD type )
|
|||
MSG msg;
|
||||
MSGBOX mb;
|
||||
DWORD dwStyle;
|
||||
HINSTANCE hInst;
|
||||
wndPtr = WIN_FindWndPtr(hWnd);
|
||||
#ifdef DEBUG_MSGBOX
|
||||
printf( "MessageBox: '%s'\n", str );
|
||||
#endif
|
||||
if (wndPtr == NULL)
|
||||
hInst = hSysRes;
|
||||
else
|
||||
hInst = wndPtr->hInstance;
|
||||
wndClass.style = CS_HREDRAW | CS_VREDRAW ;
|
||||
wndClass.lpfnWndProc = (WNDPROC)SystemMessageBoxProc;
|
||||
wndClass.cbClsExtra = 0;
|
||||
wndClass.cbWndExtra = 0;
|
||||
wndClass.hInstance = wndPtr->hInstance;
|
||||
wndClass.hInstance = hInst;
|
||||
wndClass.hIcon = (HICON)NULL;
|
||||
wndClass.hCursor = LoadCursor((HANDLE)NULL, IDC_ARROW);
|
||||
wndClass.hbrBackground = GetStockObject(WHITE_BRUSH);
|
||||
|
@ -70,7 +77,7 @@ int MessageBox( HWND hWnd, LPSTR str, LPSTR title, WORD type )
|
|||
dwStyle = WS_POPUP | WS_DLGFRAME | WS_VISIBLE;
|
||||
if ((type & (MB_SYSTEMMODAL | MB_TASKMODAL)) == 0) dwStyle |= WS_CAPTION;
|
||||
hDlg = CreateWindow("MESSAGEBOX", title, dwStyle, 100, 150, 400, 120,
|
||||
(HWND)NULL, (HMENU)NULL, wndPtr->hInstance, (LPSTR)&mb);
|
||||
(HWND)NULL, (HMENU)NULL, hInst, (LPSTR)&mb);
|
||||
if (hDlg == 0) return 0;
|
||||
while(TRUE) {
|
||||
if (!mb.ActiveFlg) break;
|
||||
|
@ -78,15 +85,13 @@ int MessageBox( HWND hWnd, LPSTR str, LPSTR title, WORD type )
|
|||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
if (!UnregisterClass("MESSAGEBOX", wndPtr->hInstance)) return 0;
|
||||
if (!UnregisterClass("MESSAGEBOX", hInst)) return 0;
|
||||
#ifdef DEBUG_MSGBOX
|
||||
printf( "MessageBox return %04X !\n", mb.wRetVal);
|
||||
#endif
|
||||
return(mb.wRetVal);
|
||||
}
|
||||
|
||||
|
||||
|
||||
LPMSGBOX MsgBoxGetStorageHeader(HWND hwnd)
|
||||
{
|
||||
WND *wndPtr;
|
||||
|
@ -286,17 +291,13 @@ BOOL FAR PASCAL AboutWine_Proc(HWND hDlg, WORD msg, WORD wParam, LONG lParam)
|
|||
CreditMode = FALSE;
|
||||
strcpy(str, "WINELOGO");
|
||||
hBitMap = LoadBitmap((HINSTANCE)NULL, (LPSTR)str);
|
||||
/* getcwd(str, 256);
|
||||
strcat(str, ";");
|
||||
strcat(str, getenv("HOME"));
|
||||
strcat(str, ";");
|
||||
strcat(str, getenv("WINEPATH")); */
|
||||
|
||||
strcpy(str, "PROPOSED_LICENSE");
|
||||
printf("str = '%s'\n", str);
|
||||
hFile = KERNEL_OpenFile((LPSTR)str, &ofstruct, OF_READ);
|
||||
hFile = OpenFile((LPSTR)str, &ofstruct, OF_READ);
|
||||
ptr = (LPSTR)malloc(2048);
|
||||
lseek(hFile, 0L, SEEK_SET);
|
||||
KERNEL__lread(hFile, ptr, 2000L);
|
||||
_lread(hFile, ptr, 2000L);
|
||||
close(hFile);
|
||||
return TRUE;
|
||||
case WM_PAINT:
|
||||
|
@ -353,3 +354,12 @@ return FALSE;
|
|||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* FatalAppExit [USER.137]
|
||||
*/
|
||||
|
||||
void FatalAppExit(WORD wAction, LPSTR str)
|
||||
{
|
||||
MessageBox((HWND)NULL, str, NULL, MB_SYSTEMMODAL | MB_OK);
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -90,7 +90,8 @@ void InflateRect( LPRECT rect, short x, short y )
|
|||
*/
|
||||
BOOL IntersectRect( LPRECT dest, LPRECT src1, LPRECT src2 )
|
||||
{
|
||||
if ((src1->left >= src2->right) || (src2->left >= src1->right) ||
|
||||
if (IsRectEmpty(src1) || IsRectEmpty(src2) ||
|
||||
(src1->left >= src2->right) || (src2->left >= src1->right) ||
|
||||
(src1->top >= src2->bottom) || (src2->top >= src1->bottom))
|
||||
{
|
||||
SetRectEmpty( dest );
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
#ifndef WINELIB
|
||||
static char RCSId[] = "$Id: resource.c,v 1.4 1993/07/04 04:04:21 root Exp root $";
|
||||
static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||
#endif
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include "arch.h"
|
||||
#include "prototypes.h"
|
||||
#include "windows.h"
|
||||
#include "win.h"
|
||||
#include "gdi.h"
|
||||
#include "wine.h"
|
||||
#include "icon.h"
|
||||
|
@ -35,6 +36,16 @@ extern HINSTANCE hSysRes;
|
|||
|
||||
HANDLE RSC_LoadResource(int instance, char *rsc_name, int type, int *image_size_ret);
|
||||
|
||||
extern char *ProgramName;
|
||||
|
||||
/*****************************************************************************
|
||||
* Super Patch, I promise to arrange things as soon as I can.
|
||||
*
|
||||
******************************************************************************/
|
||||
#ifdef WINELIB
|
||||
#include "../loader/wine.c"
|
||||
#endif
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* OpenResourceFile
|
||||
|
@ -43,6 +54,7 @@ int
|
|||
OpenResourceFile(HANDLE instance)
|
||||
{
|
||||
struct w_files *w;
|
||||
char *res_file;
|
||||
|
||||
if (ResourceInst == instance)
|
||||
return ResourceFd;
|
||||
|
@ -50,14 +62,20 @@ OpenResourceFile(HANDLE instance)
|
|||
w = GetFileInfo(instance);
|
||||
if (w == NULL)
|
||||
return -1;
|
||||
ResourceFileInfo = w;
|
||||
res_file = w->filename;
|
||||
|
||||
if (ResourceFd >= 0)
|
||||
close(ResourceFd);
|
||||
|
||||
ResourceInst = instance;
|
||||
ResourceFileInfo = w;
|
||||
ResourceFd = open(w->filename, O_RDONLY);
|
||||
|
||||
ResourceFd = open (res_file, O_RDONLY);
|
||||
|
||||
#ifdef DEBUG_RESOURCE
|
||||
printf("OpenResourceFile(%04X) // file='%s' hFile=%04X !\n",
|
||||
instance, w->filename, ResourceFd);
|
||||
#endif
|
||||
return ResourceFd;
|
||||
}
|
||||
|
||||
|
@ -128,6 +146,12 @@ ConvertInfoBitmap( HDC hdc, BITMAPINFO * image )
|
|||
bits, image, DIB_RGB_COLORS );
|
||||
}
|
||||
|
||||
#ifndef WINELIB
|
||||
load_typeinfo (int fd, struct resource_typeinfo_s *typeinfo)
|
||||
{
|
||||
return read (fd, typeinfo, sizeof (*typeinfo)) == sizeof (*typeinfo);
|
||||
}
|
||||
#endif
|
||||
/**********************************************************************
|
||||
* FindResourceByNumber
|
||||
*/
|
||||
|
@ -157,26 +181,30 @@ FindResourceByNumber(struct resource_nameinfo_s *result_p,
|
|||
printf("FindResourceByNumber (%s) bad block size !\n", resource_id);
|
||||
return -1;
|
||||
}
|
||||
|
||||
size_shift = CONV_SHORT(size_shift);
|
||||
/*
|
||||
* Find resource.
|
||||
*/
|
||||
typeinfo.type_id = 0xffff;
|
||||
while (typeinfo.type_id != 0) {
|
||||
if (read(ResourceFd, &typeinfo, sizeof(typeinfo)) !=
|
||||
sizeof(typeinfo)) {
|
||||
if (!load_typeinfo (ResourceFd, &typeinfo)){
|
||||
printf("FindResourceByNumber (%X) bad typeinfo size !\n", resource_id);
|
||||
return -1;
|
||||
}
|
||||
#ifdef DEBUG_RESOURCE
|
||||
printf("FindResourceByNumber type=%X count=%d\n",
|
||||
typeinfo.type_id, typeinfo.count);
|
||||
printf("FindResourceByNumber type=%X count=%d searched=%d \n",
|
||||
typeinfo.type_id, typeinfo.count, type_id);
|
||||
#endif
|
||||
if (typeinfo.type_id == 0) break;
|
||||
if (typeinfo.type_id == type_id || type_id == -1) {
|
||||
for (i = 0; i < typeinfo.count; i++) {
|
||||
#ifndef WINELIB
|
||||
if (read(ResourceFd, &nameinfo, sizeof(nameinfo)) !=
|
||||
sizeof(nameinfo)) {
|
||||
sizeof(nameinfo))
|
||||
#else
|
||||
if (!load_nameinfo (ResourceFd, &nameinfo))
|
||||
#endif
|
||||
{
|
||||
printf("FindResourceByNumber (%X) bad nameinfo size !\n", resource_id);
|
||||
return -1;
|
||||
}
|
||||
|
@ -229,6 +257,7 @@ FindResourceByName(struct resource_nameinfo_s *result_p,
|
|||
printf("FindResourceByName (%s) bad block size !\n", resource_name);
|
||||
return -1;
|
||||
}
|
||||
size_shift = CONV_SHORT (size_shift);
|
||||
|
||||
/*
|
||||
* Find resource.
|
||||
|
@ -236,43 +265,55 @@ FindResourceByName(struct resource_nameinfo_s *result_p,
|
|||
typeinfo.type_id = 0xffff;
|
||||
while (typeinfo.type_id != 0)
|
||||
{
|
||||
if (read(ResourceFd, &typeinfo, sizeof(typeinfo)) !=
|
||||
sizeof(typeinfo))
|
||||
if (!load_typeinfo (ResourceFd, &typeinfo))
|
||||
{
|
||||
printf("FindResourceByName (%s) bad typeinfo size !\n", resource_name);
|
||||
return -1;
|
||||
}
|
||||
#ifdef DEBUG_RESOURCE
|
||||
printf("FindResourceByName typeinfo.type_id=%X type_id=%X\n",
|
||||
typeinfo.type_id, type_id);
|
||||
printf("FindResourceByName typeinfo.type_id=%X count=%d type_id=%X\n",
|
||||
typeinfo.type_id, typeinfo.count, type_id);
|
||||
#endif
|
||||
if (typeinfo.type_id == 0) break;
|
||||
if (typeinfo.type_id == type_id || type_id == -1)
|
||||
{
|
||||
for (i = 0; i < typeinfo.count; i++)
|
||||
{
|
||||
#ifndef WINELIB
|
||||
if (read(ResourceFd, &nameinfo, sizeof(nameinfo)) !=
|
||||
sizeof(nameinfo))
|
||||
#else
|
||||
if (!load_nameinfo (ResourceFd, &nameinfo))
|
||||
#endif
|
||||
{
|
||||
printf("FindResourceByName (%s) bad nameinfo size !\n", resource_name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (nameinfo.id & 0x8000)
|
||||
continue;
|
||||
|
||||
/*
|
||||
if ((nameinfo.id & 0x8000) != 0) continue;
|
||||
*/
|
||||
#ifdef DEBUG_RESOURCE
|
||||
printf("FindResourceByName // nameinfo.id=%04X !\n", nameinfo.id);
|
||||
#endif
|
||||
old_pos = lseek(ResourceFd, 0, SEEK_CUR);
|
||||
new_pos = rtoff + nameinfo.id;
|
||||
lseek(ResourceFd, new_pos, SEEK_SET);
|
||||
read(ResourceFd, &nbytes, 1);
|
||||
#ifdef DEBUG_RESOURCE
|
||||
printf("FindResourceByName // namesize=%d !\n", nbytes);
|
||||
#endif
|
||||
nbytes = CONV_CHAR_TO_LONG (nbytes);
|
||||
read(ResourceFd, name, nbytes);
|
||||
lseek(ResourceFd, old_pos, SEEK_SET);
|
||||
name[nbytes] = '\0';
|
||||
#ifdef DEBUG_RESOURCE
|
||||
printf("FindResourceByName type_id=%X name='%s' resource_name='%s'\n",
|
||||
typeinfo.type_id, name, resource_name);
|
||||
printf("FindResourceByName type_id=%X (%d of %d) name='%s' resource_name='%s'\n",
|
||||
typeinfo.type_id, i + 1, typeinfo.count,
|
||||
name, resource_name);
|
||||
#endif
|
||||
if (strcasecmp(name, resource_name) == 0)
|
||||
/* if (strcasecmp(name, resource_name) == 0) */
|
||||
if (strcasecmp(name, resource_name) == 0 ||
|
||||
(nameinfo.id == 0x8001 && type_id == NE_RSCTYPE_MENU))
|
||||
{
|
||||
memcpy(result_p, &nameinfo, sizeof(nameinfo));
|
||||
return size_shift;
|
||||
|
@ -333,7 +374,6 @@ HICON LoadIcon(HANDLE instance, LPSTR icon_name)
|
|||
ReleaseDC(GetDesktopWindow(), hdc);
|
||||
return 0;
|
||||
}
|
||||
printf("LoadIcon Alloc hIcon=%X\n", hIcon);
|
||||
lpico = (ICONALLOC *)GlobalLock(hIcon);
|
||||
lpico->descriptor = *lpicodesc;
|
||||
width = lpicodesc->Width;
|
||||
|
@ -390,6 +430,9 @@ HICON LoadIcon(HANDLE instance, LPSTR icon_name)
|
|||
DeleteDC(hMemDC2);
|
||||
ReleaseDC(GetDesktopWindow(), hdc);
|
||||
GlobalUnlock(hIcon);
|
||||
#ifdef DEBUG_RESOURCE
|
||||
printf("LoadIcon Alloc hIcon=%X\n", hIcon);
|
||||
#endif
|
||||
return hIcon;
|
||||
}
|
||||
|
||||
|
@ -679,7 +722,10 @@ RSC_LoadResource(int instance, char *rsc_name, int type, int *image_size_ret)
|
|||
size_shift = FindResourceByName(&nameinfo, type, rsc_name);
|
||||
}
|
||||
if (size_shift == -1) {
|
||||
printf("RSC_LoadResource / Resource '%X' not Found !\n", rsc_name);
|
||||
if ((LONG)rsc_name >= 0x00010000L)
|
||||
printf("RSC_LoadResource / Resource '%s' not Found !\n", rsc_name);
|
||||
else
|
||||
printf("RSC_LoadResource / Resource '%X' not Found !\n", rsc_name);
|
||||
return 0;
|
||||
}
|
||||
/*
|
10
misc/user.c
10
misc/user.c
|
@ -18,6 +18,7 @@ extern BOOL ATOM_Init();
|
|||
extern BOOL GDI_Init();
|
||||
extern void SYSMETRICS_Init();
|
||||
|
||||
#ifndef WINELIB
|
||||
/***********************************************************************
|
||||
* USER_HeapInit
|
||||
*/
|
||||
|
@ -29,7 +30,7 @@ static BOOL USER_HeapInit()
|
|||
HEAP_Init( &USER_Heap, s->base_addr, USER_HEAP_SIZE );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/**********************************************************************
|
||||
* USER_InitApp
|
||||
|
@ -53,8 +54,10 @@ USER_InitApp(int hInstance)
|
|||
SYSMETRICS_Init();
|
||||
SYSCOLOR_Init();
|
||||
|
||||
#ifndef WINELIB
|
||||
/* Create USER heap */
|
||||
if (!USER_HeapInit()) return 0;
|
||||
#endif
|
||||
|
||||
/* Create the DCEs */
|
||||
DCE_Init();
|
||||
|
@ -73,5 +76,10 @@ USER_InitApp(int hInstance)
|
|||
queueSize = GetProfileInt( "windows", "DefaultQueueSize", 8 );
|
||||
if (!SetMessageQueue( queueSize )) return 0;
|
||||
|
||||
#ifndef WINELIB
|
||||
/* Initialize DLLs */
|
||||
InitializeLoadedDLLs();
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,470 @@
|
|||
/*
|
||||
* based on Windows Sockets 1.1 specs
|
||||
* (ftp.microsoft.com:/Advsys/winsock/spec11/WINSOCK.TXT)
|
||||
*/
|
||||
|
||||
#include <netdb.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#if defined(__FreeBSD__)
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#include <arpa/inet.h>
|
||||
#include <errno.h>
|
||||
#include <netdb.h>
|
||||
#include "winsock.h"
|
||||
|
||||
#define DEBUG_WINSOCK
|
||||
|
||||
/* XXX per task */
|
||||
WORD wsa_errno;
|
||||
int wsa_initted;
|
||||
|
||||
WORD errno_to_wsaerrno(int errno)
|
||||
{
|
||||
switch(errno) {
|
||||
case ENETDOWN:
|
||||
return WSAENETDOWN;
|
||||
case EAFNOSUPPORT:
|
||||
return WSAEAFNOSUPPORT;
|
||||
case EMFILE:
|
||||
return WSAEMFILE;
|
||||
case ENOBUFS:
|
||||
return WSAENOBUFS;
|
||||
case EPROTONOSUPPORT:
|
||||
return EPROTONOSUPPORT;
|
||||
case EPROTOTYPE:
|
||||
return WSAEPROTOTYPE;
|
||||
case EBADF:
|
||||
case ENOTSOCK:
|
||||
return WSAENOTSOCK;
|
||||
|
||||
default:
|
||||
#ifndef sun
|
||||
#if defined(__FreeBSD__)
|
||||
fprintf(stderr, "winsock: errno_to_wsaerrno translation failure.\n\t: %s (%d)\n",
|
||||
sys_errlist[errno], errno);
|
||||
#else
|
||||
fprintf(stderr, "winsock: errno_to_wsaerrno translation failure.\n\t: %s (%d)\n",
|
||||
strerror [errno], errno);
|
||||
#endif
|
||||
#else
|
||||
fprintf (stderr, "winsock: errno_to_wsaerrno translation failure.\n");
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
SOCKET Winsock_accept(SOCKET s, struct sockaddr FAR *addr, int FAR *addrlen)
|
||||
{
|
||||
int sock;
|
||||
|
||||
if ((sock = accept(s, addr, addrlen)) < 0) {
|
||||
wsa_errno = errno_to_wsaerrno(errno);
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
return sock;
|
||||
}
|
||||
|
||||
int Winsock_bind(SOCKET s, struct sockaddr FAR *name, int namelen)
|
||||
{
|
||||
if (bind(s, name, namelen) < 0) {
|
||||
wsa_errno = errno_to_wsaerrno(errno);
|
||||
return SOCKET_ERROR;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Winsock_closesocket(SOCKET s)
|
||||
{
|
||||
if (close(s) < 0) {
|
||||
wsa_errno = errno_to_wsaerrno(errno);
|
||||
return SOCKET_ERROR;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Winsock_connect(SOCKET s, struct sockaddr FAR *name, int namelen)
|
||||
{
|
||||
if (connect(s, name, namelen) < 0) {
|
||||
wsa_errno = errno_to_wsaerrno(errno);
|
||||
return SOCKET_ERROR;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Winsock_getpeername(SOCKET s, struct sockaddr FAR *name, int FAR *namelen)
|
||||
{
|
||||
if (getpeername(s, name, namelen) < 0) {
|
||||
wsa_errno = errno_to_wsaerrno(errno);
|
||||
return SOCKET_ERROR;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Winsock_getsockname(SOCKET s, struct sockaddr FAR *name, int FAR *namelen)
|
||||
{
|
||||
if (getsockname(s, name, namelen) < 0) {
|
||||
wsa_errno = errno_to_wsaerrno(errno);
|
||||
return SOCKET_ERROR;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Winsock_getsockopt(SOCKET s, int loptname, char FAR *optval, int FAR *optlen)
|
||||
{
|
||||
if (getsockopt(s, 0, loptname, optval, optlen) < 0) {
|
||||
wsa_errno = errno_to_wsaerrno(errno);
|
||||
return SOCKET_ERROR;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
u_long Winsock_htonl(u_long hostlong)
|
||||
{
|
||||
return( htonl(hostlong) );
|
||||
}
|
||||
|
||||
u_short Winsock_htons(u_short hostshort)
|
||||
{
|
||||
return( htons(hostshort) );
|
||||
}
|
||||
|
||||
u_long Winsock_inet_addr(char FAR *cp)
|
||||
{
|
||||
return( inet_addr(cp) );
|
||||
}
|
||||
|
||||
char *Winsock_inet_ntoa(struct in_addr in)
|
||||
{
|
||||
char *s;
|
||||
|
||||
if ((s = inet_ntoa(in)) == NULL) {
|
||||
wsa_errno = errno_to_wsaerrno(errno);
|
||||
return NULL;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
int Winsock_ioctlsocket(SOCKET s, long cmd, u_long FAR *argp)
|
||||
{
|
||||
if (ioctl(s, cmd, argp) < 0) {
|
||||
wsa_errno = errno_to_wsaerrno(errno);
|
||||
return SOCKET_ERROR;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Winsock_listen(SOCKET s, int backlog)
|
||||
{
|
||||
if (listen(s, backlog) < 0) {
|
||||
wsa_errno = errno_to_wsaerrno(errno);
|
||||
return SOCKET_ERROR;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
u_long Winsock_ntohl(u_long netlong)
|
||||
{
|
||||
return( ntohl(netlong) );
|
||||
}
|
||||
|
||||
u_short Winsock_ntohs(u_short netshort)
|
||||
{
|
||||
return( ntohs(netshort) );
|
||||
}
|
||||
|
||||
int Winsock_recv(SOCKET s, char FAR *buf, int len, int flags)
|
||||
{
|
||||
int length;
|
||||
|
||||
if ((length = recv(s, buf, len, flags)) < 0) {
|
||||
wsa_errno = errno_to_wsaerrno(errno);
|
||||
return SOCKET_ERROR;
|
||||
}
|
||||
return length;
|
||||
}
|
||||
|
||||
int Winsock_recvfrom(SOCKET s, char FAR *buf, int len, int flags,
|
||||
struct sockaddr FAR *from, int FAR *fromlen)
|
||||
{
|
||||
int length;
|
||||
|
||||
if ((length = recvfrom(s, buf, len, flags, from, fromlen)) < 0) {
|
||||
wsa_errno = errno_to_wsaerrno(errno);
|
||||
return SOCKET_ERROR;
|
||||
}
|
||||
return length;
|
||||
}
|
||||
|
||||
int Winsock_select(int nfds, fd_set FAR *readfds, fd_set FAR *writefds,
|
||||
fd_set FAR *exceptfds, struct timeval FAR *timeout)
|
||||
{
|
||||
return(select(nfds, readfds, writefds, exceptfds, timeout));
|
||||
}
|
||||
|
||||
int Winsock_send(SOCKET s, char FAR *buf, int len, int flags)
|
||||
{
|
||||
int length;
|
||||
|
||||
if ((length = send(s, buf, len, flags)) < 0) {
|
||||
wsa_errno = errno_to_wsaerrno(errno);
|
||||
return SOCKET_ERROR;
|
||||
}
|
||||
return length;
|
||||
}
|
||||
|
||||
int Winsock_sendto(SOCKET s, char FAR *buf, int len, int flags,
|
||||
struct sockaddr FAR *to, int tolen)
|
||||
{
|
||||
int length;
|
||||
|
||||
if ((length = sendto(s, buf, len, flags, to, tolen)) < 0) {
|
||||
wsa_errno = errno_to_wsaerrno(errno);
|
||||
return SOCKET_ERROR;
|
||||
}
|
||||
return length;
|
||||
}
|
||||
|
||||
int Winsock_setsockopt(SOCKET s, int level, int optname, const char FAR *optval,
|
||||
int optlen)
|
||||
{
|
||||
if (setsockopt(s, level, optname, optval, optlen) < 0) {
|
||||
wsa_errno = errno_to_wsaerrno(errno);
|
||||
return SOCKET_ERROR;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Winsock_shutdown(SOCKET s, int how)
|
||||
{
|
||||
if (shutdown(s, how) < 0) {
|
||||
wsa_errno = errno_to_wsaerrno(errno);
|
||||
return SOCKET_ERROR;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
SOCKET Winsock_socket(WORD af, WORD type, WORD protocol)
|
||||
{
|
||||
int sock;
|
||||
|
||||
#ifdef DEBUG_WINSOCK
|
||||
printf("Winsock_socket: af=%d type=%d protocol=%d\n", af, type, protocol);
|
||||
#endif
|
||||
|
||||
/* let the kernel do the dirty work..
|
||||
|
||||
if (!wsa_initted) {
|
||||
wsa_errno = WSANOTINITIALISED;
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
*/
|
||||
if ((sock = socket(af, type, protocol)) < 0) {
|
||||
wsa_errno = errno_to_wsaerrno(errno);
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
return sock;
|
||||
}
|
||||
|
||||
struct hostent *Winsock_gethostbyaddr(const char FAR *addr, int len, int type)
|
||||
{
|
||||
struct hostent *host;
|
||||
|
||||
if ((host = gethostbyaddr(addr, len, type)) == NULL) {
|
||||
wsa_errno = errno_to_wsaerrno(errno);
|
||||
return NULL;
|
||||
}
|
||||
return host;
|
||||
}
|
||||
|
||||
struct hostent *Winsock_gethostbyname(const char FAR *name)
|
||||
{
|
||||
struct hostent *host;
|
||||
|
||||
if ((host = gethostbyname(name)) == NULL) {
|
||||
wsa_errno = errno_to_wsaerrno(errno);
|
||||
return NULL;
|
||||
}
|
||||
return host;
|
||||
}
|
||||
|
||||
int Winsock_gethostname(char FAR *name, int namelen)
|
||||
{
|
||||
if (gethostname(name, namelen) < 0) {
|
||||
wsa_errno = errno_to_wsaerrno(errno);
|
||||
return SOCKET_ERROR;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct protoent *Winsock_getprotobyname(char FAR *name)
|
||||
{
|
||||
struct protoent *proto;
|
||||
|
||||
if ((proto = getprotobyname(name)) == NULL) {
|
||||
wsa_errno = errno_to_wsaerrno(errno);
|
||||
return NULL;
|
||||
}
|
||||
return proto;
|
||||
}
|
||||
|
||||
struct protoent *Winsock_getprotobynumber(int number)
|
||||
{
|
||||
struct protoent *proto;
|
||||
|
||||
if ((proto = getprotobynumber(number)) == NULL) {
|
||||
wsa_errno = errno_to_wsaerrno(errno);
|
||||
return NULL;
|
||||
}
|
||||
return proto;
|
||||
}
|
||||
|
||||
struct servent *Winsock_getservbyname(const char FAR *name, const char FAR *proto)
|
||||
{
|
||||
struct servent *service;
|
||||
|
||||
if ((service = getservbyname(name, proto)) == NULL) {
|
||||
wsa_errno = errno_to_wsaerrno(errno);
|
||||
return NULL;
|
||||
}
|
||||
return service;
|
||||
}
|
||||
|
||||
struct servent *Winsock_getservbyport(int port, const char FAR *proto)
|
||||
{
|
||||
struct servent *service;
|
||||
|
||||
if ((service = getservbyport(port, proto)) == NULL) {
|
||||
wsa_errno = errno_to_wsaerrno(errno);
|
||||
return NULL;
|
||||
}
|
||||
return service;
|
||||
}
|
||||
|
||||
HANDLE WSAAsyncGetHostByAddr(HWND hWnd, u_int wMsg, const char FAR *addr,
|
||||
int len, int type, const char FAR *buf, int buflen)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
HANDLE WSAAsyncGetHostByName(HWND hWnd, u_int wMsg, const char FAR *name,
|
||||
char FAR *buf, int buflen)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
HANDLE WSAAsyncGetProtoByName(HWND hWnd, u_int wMsg, const char FAR *name,
|
||||
char FAR *buf, int buflen)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
HANDLE WSAAsyncGetProtoByNumber(HWND hWnd, u_int wMsg, int number,
|
||||
char FAR *buf, int buflen)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
HANDLE WSAAsyncGetServByName(HWND hWnd, u_int wMsg, const char FAR *name,
|
||||
const char FAR *proto, char FAR *buf, int buflen)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
HANDLE WSAAsyncGetServByPort(HWND hWnd, u_int wMsg, int port, const char FAR
|
||||
*proto, char FAR *buf, int buflen)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int WSAAsyncSelect(SOCKET s, HWND hWnd, u_int wMsg, long lEvent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int WSAFDIsSet(int fd, fd_set *set)
|
||||
{
|
||||
return( FD_ISSET(fd, set) );
|
||||
}
|
||||
|
||||
WSACancelAsyncRequest(HANDLE hAsyncTaskHandle)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
WSACancelBlockingCall ( void )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int WSAGetLastError(void)
|
||||
{
|
||||
return wsa_errno;
|
||||
}
|
||||
|
||||
void WSASetLastError(int iError)
|
||||
{
|
||||
wsa_errno = iError;
|
||||
}
|
||||
|
||||
BOOL WSAIsBlocking (void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
FARPROC WSASetBlockingHook(FARPROC lpBlockFunc)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int WSAUnhookBlockingHook(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
WSADATA Winsock_data = {
|
||||
0x0101,
|
||||
0x0101,
|
||||
"WINE Sockets",
|
||||
#ifdef linux
|
||||
"LINUX/i386",
|
||||
#endif
|
||||
#ifdef __NetBSD__
|
||||
"NetBSD/i386",
|
||||
#endif
|
||||
#ifdef sunos
|
||||
"SunOS",
|
||||
#endif
|
||||
128,
|
||||
1024,
|
||||
NULL
|
||||
};
|
||||
|
||||
int WSAStartup(WORD wVersionRequested, LPWSADATA lpWSAData)
|
||||
{
|
||||
#ifdef DEBUG_WINSOCK
|
||||
fprintf(stderr, "WSAStartup: verReq=%x\n", wVersionRequested);
|
||||
#endif
|
||||
|
||||
if (LOBYTE(wVersionRequested) < 1 ||
|
||||
(LOBYTE(wVersionRequested) == 1 &&
|
||||
HIBYTE(wVersionRequested) < 1))
|
||||
return WSAVERNOTSUPPORTED;
|
||||
|
||||
if (!lpWSAData)
|
||||
return WSAEINVAL;
|
||||
|
||||
bcopy(&Winsock_data, lpWSAData, sizeof(Winsock_data));
|
||||
|
||||
wsa_initted = 1;
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
int WSACleanup(void)
|
||||
{
|
||||
wsa_initted = 0;
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
#include "../Wine.tmpl"
|
||||
|
||||
MODULE = miscemu
|
||||
|
||||
SRCS = \
|
||||
emulate.c \
|
||||
int1a.c \
|
||||
int21.c \
|
||||
kernel.c
|
||||
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
|
||||
WineRelocatableTarget($(TOP)/$(MODULE),,$(OBJS))
|
||||
DependTarget()
|
||||
CleanTarget()
|
||||
|
||||
includes::
|
||||
|
||||
install::
|
|
@ -22,7 +22,7 @@ static char Copyright[] = "copyright Erik Bos, 1993";
|
|||
WORD ExtendedError, CodePage = 437;
|
||||
BYTE ErrorClass, Action, ErrorLocus;
|
||||
|
||||
extern char *TempDirectory;
|
||||
extern char TempDirectory[];
|
||||
|
||||
void Error(int e, int class, int el)
|
||||
{
|
||||
|
@ -749,11 +749,12 @@ void SetDiskSerialNumber(struct sigcontext_struct *context)
|
|||
|
||||
/************************************************************************/
|
||||
|
||||
int do_int21(struct sigcontext_struct * context){
|
||||
int do_int21(struct sigcontext_struct * context)
|
||||
{
|
||||
int ah;
|
||||
|
||||
fprintf(stderr,"int21: doing AX=%04x BX=%04x CX=%04x DX=%04x\n",
|
||||
EAX & 0xffffL,EBX & 0xffffL,ECX & 0xffffL,EDX & 0xffffL);
|
||||
fprintf(stderr, "int21: 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);
|
||||
|
||||
ah = (EAX >> 8) & 0xffL;
|
||||
|
||||
|
@ -1159,71 +1160,42 @@ int do_int21(struct sigcontext_struct * context){
|
|||
return 1;
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
|
||||
static void
|
||||
GetTimeDate(int time_flag)
|
||||
{
|
||||
struct tm *now;
|
||||
time_t ltime;
|
||||
|
||||
ltime = time(NULL);
|
||||
now = localtime(<ime);
|
||||
if (time_flag)
|
||||
{
|
||||
_CX = (now->tm_hour << 8) | now->tm_min;
|
||||
_DX = now->tm_sec << 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
_CX = now->tm_year + 1900;
|
||||
_DX = ((now->tm_mon + 1) << 8) | now->tm_mday;
|
||||
_AX &= 0xff00;
|
||||
_AX |= now->tm_wday;
|
||||
}
|
||||
#ifdef DEBUG_DOS
|
||||
printf("GetTimeDate: AX = %04x, CX = %04x, DX = %04x\n", _AX, _CX, _DX);
|
||||
#endif
|
||||
|
||||
ReturnFromRegisterFunc();
|
||||
/* Function does not return */
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* KERNEL_DOS3Call
|
||||
* DOS3Call
|
||||
*/
|
||||
int KERNEL_DOS3Call()
|
||||
int DOS3Call()
|
||||
{
|
||||
switch ((_AX >> 8) & 0xff)
|
||||
{
|
||||
case 0x30:
|
||||
_AX = 0x0303;
|
||||
ReturnFromRegisterFunc();
|
||||
/* Function does not return */
|
||||
static struct sigcontext_struct *context = NULL;
|
||||
|
||||
case 0x25:
|
||||
case 0x35:
|
||||
if (!context)
|
||||
context = malloc(sizeof(struct sigcontext_struct));
|
||||
|
||||
/* fprintf(stderr, "DOS3: 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);
|
||||
*/
|
||||
EAX = _AX;
|
||||
EBX = _BX;
|
||||
ECX = _CX;
|
||||
EDX = _DX;
|
||||
DS = _DS;
|
||||
ES = _ES;
|
||||
DI = _DI;
|
||||
SI = _SI;
|
||||
/* EFL = _FL;
|
||||
*/
|
||||
do_int21(context);
|
||||
|
||||
_AX = AX;
|
||||
_BX = BX;
|
||||
_CX = CX;
|
||||
_DX = DX;
|
||||
|
||||
_DS = DS;
|
||||
_ES = ES;
|
||||
|
||||
_DI = DI;
|
||||
_SI = SI;
|
||||
/* _FL = EFL;
|
||||
*/
|
||||
return 0;
|
||||
|
||||
case 0x2a:
|
||||
GetTimeDate(0);
|
||||
/* Function does not return */
|
||||
|
||||
case 0x2c:
|
||||
GetTimeDate(1);
|
||||
/* Function does not return */
|
||||
|
||||
case 0x4c:
|
||||
exit(_AX & 0xff);
|
||||
|
||||
default:
|
||||
fprintf(stderr, "DOS: AX %04x, BX %04x, CX %04x, DX %04x\n",
|
||||
_AX, _BX, _CX, _DX);
|
||||
fprintf(stderr, " SP %04x, BP %04x, SI %04x, DI %04x\n",
|
||||
_SP, _BP, _SI, _DI);
|
||||
fprintf(stderr, " DS %04x, ES %04x\n",
|
||||
_DS, _ES);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -66,18 +66,3 @@ KERNEL_WaitEvent(int task)
|
|||
#endif
|
||||
return 0;
|
||||
}
|
||||
/**********************************************************************
|
||||
* KERNEL_GetModuleFileName
|
||||
*/
|
||||
int
|
||||
KERNEL_GetModuleFileName(int module, char *filename, int bytes)
|
||||
{
|
||||
#ifdef DEBUG_RELAY
|
||||
printf("GetModuleFileName: module %d, filename %x, bytes %d\n",
|
||||
module, filename, bytes);
|
||||
#endif
|
||||
|
||||
strcpy(filename, "TEST.EXE");
|
||||
|
||||
return strlen(filename);
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
CFLAGS=$(COPTS) $(DEBUGOPTS) -I$(INCLUDE_DIR)
|
||||
|
||||
OBJS=bitmap.o brush.o font.o gdiobj.o palette.o pen.o dib.o region.o \
|
||||
text.o dcvalues.o clipping.o bitblt.o linedda.o color.o
|
||||
|
||||
default: objects.o
|
||||
|
||||
objects.o: $(OBJS)
|
||||
$(LD) -r -o objects.o $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -f *.o *~ *.s dll_* *.a *#
|
||||
|
||||
depend:
|
||||
$(CC) $(CFLAGS) -M *.c > .depend
|
||||
|
||||
ifeq (.depend,$(wildcard .depend))
|
||||
include .depend
|
||||
endif
|
249
objects/bitblt.c
249
objects/bitblt.c
|
@ -9,6 +9,7 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Intrinsic.h>
|
||||
|
||||
#include "gdi.h"
|
||||
|
||||
|
@ -112,8 +113,148 @@ BOOL BitBlt( HDC hdcDest, short xDest, short yDest, short width, short height,
|
|||
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* black on white stretch -- favors color pixels over white
|
||||
*
|
||||
*/
|
||||
static void bonw_stretch(XImage *sxi, XImage *dxi,
|
||||
short widthSrc, short heightSrc, short widthDest, short heightDest)
|
||||
{
|
||||
float deltax, deltay, sourcex, sourcey, oldsourcex, oldsourcey;
|
||||
register int x, y;
|
||||
Pixel whitep;
|
||||
int totalx, totaly, xavgwhite, yavgwhite;
|
||||
register int i;
|
||||
int endx, endy;
|
||||
|
||||
deltax = (float)widthSrc/widthDest;
|
||||
deltay = (float)heightSrc/heightDest;
|
||||
whitep = WhitePixel(display, DefaultScreen(display));
|
||||
|
||||
oldsourcex = 0;
|
||||
for (x=0, sourcex=0.0; x<widthDest;
|
||||
x++, oldsourcex=sourcex, sourcex+=deltax) {
|
||||
xavgwhite = 0;
|
||||
if (deltax > 1.0) {
|
||||
totalx = 0;
|
||||
endx = (int)sourcex;
|
||||
for (i=(int)oldsourcex; i<=endx; i++)
|
||||
if (XGetPixel(sxi, i, (int)sourcey) == whitep)
|
||||
totalx++;
|
||||
xavgwhite = (totalx > (int)(deltax / 2.0));
|
||||
} else {
|
||||
xavgwhite = 0;
|
||||
}
|
||||
|
||||
oldsourcey = 0;
|
||||
for (y=0, sourcey=0.0; y<heightDest;
|
||||
y++, oldsourcey=sourcey, sourcey+=deltay) {
|
||||
yavgwhite = 0;
|
||||
if (deltay > 1.0) {
|
||||
totaly = 0;
|
||||
endy = (int)sourcey;
|
||||
for (i=(int)oldsourcey; i<=endy; i++)
|
||||
if (XGetPixel(sxi, (int)sourcex, i) == whitep)
|
||||
totaly++;
|
||||
yavgwhite = (totaly > ((int)deltay / 2));
|
||||
} else {
|
||||
yavgwhite = 0;
|
||||
}
|
||||
if (xavgwhite && yavgwhite)
|
||||
XPutPixel(dxi, x, y, whitep);
|
||||
else
|
||||
XPutPixel(dxi, x, y, XGetPixel(sxi, (int)sourcex, (int)sourcey));
|
||||
|
||||
} /* for all y in dest */
|
||||
} /* for all x in dest */
|
||||
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* white on black stretch -- favors color pixels over black
|
||||
*
|
||||
*/
|
||||
static void wonb_stretch(XImage *sxi, XImage *dxi,
|
||||
short widthSrc, short heightSrc, short widthDest, short heightDest)
|
||||
{
|
||||
float deltax, deltay, sourcex, sourcey, oldsourcex, oldsourcey;
|
||||
register int x, y;
|
||||
Pixel blackp;
|
||||
int totalx, totaly, xavgblack, yavgblack;
|
||||
register int i;
|
||||
int endx, endy;
|
||||
|
||||
deltax = (float)widthSrc/widthDest;
|
||||
deltay = (float)heightSrc/heightDest;
|
||||
blackp = WhitePixel(display, DefaultScreen(display));
|
||||
|
||||
oldsourcex = 0;
|
||||
for (x=0, sourcex=0.0; x<widthDest;
|
||||
x++, oldsourcex=sourcex, sourcex+=deltax) {
|
||||
xavgblack = 0;
|
||||
if (deltax > 1.0) {
|
||||
totalx = 0;
|
||||
endx = (int)sourcex;
|
||||
for (i=(int)oldsourcex; i<=endx; i++)
|
||||
if (XGetPixel(sxi, i, (int)sourcey) == blackp)
|
||||
totalx++;
|
||||
xavgblack = (totalx > (int)(deltax / 2.0));
|
||||
} else {
|
||||
xavgblack = 0;
|
||||
}
|
||||
|
||||
oldsourcey = 0;
|
||||
for (y=0, sourcey=0.0; y<heightDest;
|
||||
y++, oldsourcey=sourcey, sourcey+=deltay) {
|
||||
yavgblack = 0;
|
||||
if (deltay > 1.0) {
|
||||
totaly = 0;
|
||||
endy = (int)sourcey;
|
||||
for (i=(int)oldsourcey; i<=endy; i++)
|
||||
if (XGetPixel(sxi, (int)sourcex, i) == blackp)
|
||||
totaly++;
|
||||
yavgblack = (totaly > ((int)deltay / 2));
|
||||
} else {
|
||||
yavgblack = 0;
|
||||
}
|
||||
if (xavgblack && yavgblack)
|
||||
XPutPixel(dxi, x, y, blackp);
|
||||
else
|
||||
XPutPixel(dxi, x, y, XGetPixel(sxi, (int)sourcex, (int)sourcey));
|
||||
|
||||
} /* for all y in dest */
|
||||
} /* for all x in dest */
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* color stretch -- deletes unused pixels
|
||||
*
|
||||
*/
|
||||
static void color_stretch(XImage *sxi, XImage *dxi,
|
||||
short widthSrc, short heightSrc, short widthDest, short heightDest)
|
||||
{
|
||||
float deltax, deltay, sourcex, sourcey;
|
||||
register int x, y;
|
||||
|
||||
deltax = (float)widthSrc/widthDest;
|
||||
deltay = (float)heightSrc/heightDest;
|
||||
|
||||
for (x=0, sourcex=0.0; x<widthDest; x++, sourcex+=deltax)
|
||||
for (y=0, sourcey=0.0; y<heightDest; y++, sourcey+=deltay)
|
||||
XPutPixel(dxi, x, y, XGetPixel(sxi, (int)sourcex, (int)sourcey));
|
||||
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* StretchBlt (GDI.35)
|
||||
*
|
||||
* o StretchBlt is CPU intensive so we only call it if we have
|
||||
* to. Checks are made to see if we can call BitBlt instead.
|
||||
*
|
||||
* o the stretching is slowish, some integer interpolation would
|
||||
* speed it up.
|
||||
*
|
||||
* o only black on white and color copy have been tested
|
||||
*/
|
||||
BOOL StretchBlt( HDC hdcDest, short xDest, short yDest, short widthDest, short heightDest,
|
||||
HDC hdcSrc, short xSrc, short ySrc, short widthSrc, short heightSrc, DWORD rop )
|
||||
|
@ -121,66 +262,100 @@ BOOL StretchBlt( HDC hdcDest, short xDest, short yDest, short widthDest, short h
|
|||
int xs1, xs2, ys1, ys2;
|
||||
int xd1, xd2, yd1, yd2;
|
||||
DC *dcDest, *dcSrc;
|
||||
XImage *sxi, *dxi;
|
||||
WORD stretchmode;
|
||||
|
||||
/*#ifdef DEBUG_GDI */
|
||||
|
||||
#ifdef DEBUG_GDI
|
||||
printf( "StretchBlt: %d %d,%d %dx%d %d %d,%d %dx%d %08x\n",
|
||||
hdcDest, xDest, yDest, widthDest, heightDest, hdcSrc, xSrc,
|
||||
ySrc, widthSrc, heightSrc, rop );
|
||||
/*#endif */
|
||||
|
||||
|
||||
printf("StretchMode is %x\n",
|
||||
((DC *)GDI_GetObjPtr(hdcDest, DC_MAGIC))->w.stretchBltMode);
|
||||
#endif
|
||||
|
||||
if ((rop & 0xcc0000) == ((rop & 0x330000) << 2))
|
||||
return PatBlt( hdcDest, xDest, yDest, widthDest, heightDest, rop );
|
||||
|
||||
printf("here\n");
|
||||
/* don't stretch the bitmap unless we have to; if we don't,
|
||||
* call BitBlt for a performance boost
|
||||
*/
|
||||
|
||||
if (widthSrc == widthDest && heightSrc == heightDest) {
|
||||
return BitBlt(hdcDest, xDest, yDest, widthSrc, heightSrc,
|
||||
hdcSrc, xSrc, ySrc, rop);
|
||||
}
|
||||
|
||||
rop >>= 16;
|
||||
if ((rop & 0x0f) != (rop >> 4))
|
||||
{
|
||||
printf( "BitBlt: Unimplemented ROP %02x\n", rop );
|
||||
printf( "StretchBlt: Unimplemented ROP %02x\n", rop );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
printf("here2\n");
|
||||
|
||||
dcDest = (DC *) GDI_GetObjPtr( hdcDest, DC_MAGIC );
|
||||
if (!dcDest) return FALSE;
|
||||
dcSrc = (DC *) GDI_GetObjPtr( hdcSrc, DC_MAGIC );
|
||||
if (!dcSrc) return FALSE;
|
||||
|
||||
xs1 = XLPTODP( dcSrc, xSrc );
|
||||
xs2 = XLPTODP( dcSrc, xSrc + widthSrc );
|
||||
ys1 = YLPTODP( dcSrc, ySrc );
|
||||
ys2 = YLPTODP( dcSrc, ySrc + heightSrc );
|
||||
xd1 = XLPTODP( dcDest, xDest );
|
||||
xd2 = XLPTODP( dcDest, xDest + widthDest );
|
||||
yd1 = YLPTODP( dcDest, yDest );
|
||||
yd2 = YLPTODP( dcDest, yDest + heightDest );
|
||||
xs1 = dcSrc->w.DCOrgX + XLPTODP( dcSrc, xSrc );
|
||||
xs2 = dcSrc->w.DCOrgX + XLPTODP( dcSrc, xSrc + widthSrc );
|
||||
ys1 = dcSrc->w.DCOrgY + YLPTODP( dcSrc, ySrc );
|
||||
ys2 = dcSrc->w.DCOrgY + YLPTODP( dcSrc, ySrc + heightSrc );
|
||||
xd1 = dcDest->w.DCOrgX + XLPTODP( dcDest, xDest );
|
||||
xd2 = dcDest->w.DCOrgX + XLPTODP( dcDest, xDest + widthDest );
|
||||
yd1 = dcDest->w.DCOrgY + YLPTODP( dcDest, yDest );
|
||||
yd2 = dcDest->w.DCOrgY + YLPTODP( dcDest, yDest + heightDest );
|
||||
|
||||
DC_SetupGCForText( dcDest );
|
||||
XSetFunction( XT_display, dcDest->u.x.gc, DC_XROPfunction[rop & 0x0f] );
|
||||
|
||||
if (dcSrc->w.bitsPerPixel == dcDest->w.bitsPerPixel)
|
||||
{
|
||||
printf("XCopyArea\n");
|
||||
XCopyArea( XT_display, dcSrc->u.x.drawable,
|
||||
dcDest->u.x.drawable, dcDest->u.x.gc,
|
||||
MIN(xs1,xs2), MIN(ys1,ys2), abs(xd2-xd1), abs(yd2-yd1),
|
||||
MIN(xd1,xd2), MIN(yd1,yd2) );
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("XCopyPlane\n");
|
||||
if (dcSrc->w.bitsPerPixel != 1) return FALSE;
|
||||
XCopyPlane( XT_display, dcSrc->u.x.drawable,
|
||||
dcDest->u.x.drawable, dcDest->u.x.gc,
|
||||
MIN(xs1,xs2), MIN(ys1,ys2), abs(xd2-xd1), abs(yd2-yd1),
|
||||
MIN(xd1,xd2), MIN(yd1,yd2), 1 );
|
||||
/* get a source and destination image so we can manipulate
|
||||
* the pixels
|
||||
*/
|
||||
|
||||
sxi = XGetImage(display, dcSrc->u.x.drawable, xs1, ys1,
|
||||
widthSrc, heightSrc, AllPlanes, ZPixmap);
|
||||
dxi = XCreateImage(display, DefaultVisualOfScreen(screen),
|
||||
DefaultDepthOfScreen(screen), ZPixmap,
|
||||
0, NULL, widthDest, heightDest,
|
||||
32, 0);
|
||||
dxi->data = malloc(dxi->bytes_per_line * heightDest);
|
||||
|
||||
stretchmode = ((DC *)GDI_GetObjPtr(hdcDest, DC_MAGIC))->w.stretchBltMode;
|
||||
|
||||
/* the actual stretching is done here, we'll try to use
|
||||
* some interolation to get some speed out of it in
|
||||
* the future
|
||||
*/
|
||||
|
||||
switch (stretchmode) {
|
||||
case BLACKONWHITE:
|
||||
bonw_stretch(sxi, dxi, widthSrc, heightSrc,
|
||||
widthDest, heightDest);
|
||||
break;
|
||||
case WHITEONBLACK:
|
||||
wonb_stretch(sxi, dxi, widthSrc, heightSrc,
|
||||
widthDest, heightDest);
|
||||
break;
|
||||
case COLORONCOLOR:
|
||||
color_stretch(sxi, dxi, widthSrc, heightSrc,
|
||||
widthDest, heightDest);
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "StretchBlt: unknown stretchmode '%d'\n",
|
||||
stretchmode);
|
||||
break;
|
||||
}
|
||||
|
||||
DC_SetupGCForText(dcDest);
|
||||
XSetFunction(display, dcDest->u.x.gc, DC_XROPfunction[rop & 0x0f]);
|
||||
XPutImage(display, dcDest->u.x.drawable, dcDest->u.x.gc,
|
||||
dxi, 0, 0, MIN(xd1,xd2), MIN(yd1,yd2),
|
||||
widthDest, heightDest);
|
||||
|
||||
/* now free the images we created */
|
||||
|
||||
XDestroyImage(sxi);
|
||||
XDestroyImage(dxi);
|
||||
|
||||
return TRUE;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -358,6 +358,16 @@ BOOL GetTextMetrics( HDC hdc, LPTEXTMETRIC metrics )
|
|||
CI_GET_CHAR_INFO(fs, fs->default_char, NULL, cs)
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* SetMapperFlags (GDI.349)
|
||||
*/
|
||||
DWORD SetMapperFlags(HDC hDC, DWORD dwFlag)
|
||||
{
|
||||
printf("SetmapperFlags(%04X, %08X) // Empty Stub !\n", hDC, dwFlag);
|
||||
return 0L;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetCharWidth (GDI.350)
|
||||
*/
|
||||
|
|
|
@ -146,11 +146,13 @@ BOOL GDI_Init()
|
|||
{
|
||||
struct segment_descriptor_s * s;
|
||||
|
||||
/* Create GDI heap */
|
||||
#ifndef WINELIB
|
||||
/* Create GDI heap */
|
||||
|
||||
s = (struct segment_descriptor_s *)GetNextSegment( 0, 0x10000 );
|
||||
if (s == NULL) return FALSE;
|
||||
HEAP_Init( &GDI_Heap, s->base_addr, GDI_HEAP_SIZE );
|
||||
#endif
|
||||
|
||||
/* Create default palette */
|
||||
|
||||
|
|
|
@ -10,10 +10,11 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
|||
#ifdef linux
|
||||
#include <values.h>
|
||||
#endif
|
||||
#if defined(__NetBSD__) || defined(__FreeBSD__)
|
||||
#if !defined (MAXINT)
|
||||
#include <limits.h>
|
||||
#define MAXINT INT_MAX
|
||||
#endif
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#include "gdi.h"
|
||||
|
|
347
test/Makefile
347
test/Makefile
|
@ -1,347 +0,0 @@
|
|||
# Makefile generated by imake - do not edit!
|
||||
# $XConsortium: imake.c,v 1.65 91/07/25 17:50:17 rws Exp $
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Makefile generated from "Imake.tmpl" and <Imakefile>
|
||||
# $XFree86: mit/config/Imake.tmpl,v 1.17 1993/06/03 15:26:36 dawes Exp $
|
||||
# $XConsortium: Imake.tmpl,v 1.139 91/09/16 08:52:48 rws Exp $
|
||||
#
|
||||
# Platform-specific parameters may be set in the appropriate <vendor>.cf
|
||||
# configuration files. Site-specific parameters should be set in the file
|
||||
# site.def. Full rebuilds are recommended if any parameters are changed.
|
||||
#
|
||||
# If your C preprocessor does not define any unique symbols, you will need
|
||||
# to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
|
||||
# "make World" the first time).
|
||||
#
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# site-specific configuration parameters that need to come before
|
||||
# the platform-specific parameters - edit site.def to change
|
||||
|
||||
# $XFree86: mit/config/site.def,v 1.65 1993/06/04 16:02:47 dawes Exp $
|
||||
# site: $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $
|
||||
|
||||
# obz: changes for making Linux distribution
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# platform-specific configuration parameters - edit x386.cf to change
|
||||
|
||||
# $XFree86: mit/config/x386.cf,v 1.90 1993/06/04 16:02:50 dawes Exp $
|
||||
# platform: $XConsortium: x386.cf,v 1.7 91/08/16 19:30:10 gildea Exp $
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# XFree86 version definition
|
||||
# $XFree86: mit/config/xf86_vers.def,v 1.5 1993/06/01 09:12:47 dawes Exp $
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# XFree86 version: 1300
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
# $XFree86: mit/config/lnuxLib.rules,v 1.2 1993/06/02 13:48:12 dawes Exp $
|
||||
|
||||
DLL_BINDIR = /usr/dll/bin
|
||||
|
||||
# operating system: Linux
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# site-specific configuration parameters that go after
|
||||
# the platform-specific parameters - edit site.def to change
|
||||
|
||||
# $XFree86: mit/config/site.def,v 1.65 1993/06/04 16:02:47 dawes Exp $
|
||||
# site: $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $
|
||||
|
||||
# obz: changes for making Linux distribution
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
TOP = ../.
|
||||
CURRENT_DIR = ./test
|
||||
|
||||
AR = ar clq
|
||||
BOOTSTRAPCFLAGS =
|
||||
CC = gcc
|
||||
AS = as
|
||||
|
||||
LEX = flex
|
||||
|
||||
YACC = bison -y
|
||||
|
||||
COMPRESS = compress
|
||||
CPP = /lib/cpp $(STD_CPP_DEFINES)
|
||||
PREPROCESSCMD = /lib/cpp $(STD_CPP_DEFINES)
|
||||
INSTALL = install
|
||||
LD = ld
|
||||
LINT = lint
|
||||
LINTLIBFLAG = -C
|
||||
LINTOPTS = -axz
|
||||
LN = ln -s
|
||||
MAKE = make
|
||||
MV = mv
|
||||
CP = cp
|
||||
|
||||
RANLIB = ranlib
|
||||
RANLIBINSTFLAGS =
|
||||
|
||||
RM = rm -f
|
||||
TROFF = psroff
|
||||
MSMACROS = -ms
|
||||
TBL = tbl
|
||||
EQN = eqn
|
||||
STD_INCLUDES =
|
||||
STD_CPP_DEFINES = -traditional -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -Dlinux
|
||||
STD_DEFINES = -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -Dlinux
|
||||
EXTRA_LOAD_FLAGS =
|
||||
EXTRA_LIBRARIES =
|
||||
OS_LIBRARIES =
|
||||
TAGS = ctags
|
||||
|
||||
SHAREDCODEDEF =
|
||||
SHLIBDEF =
|
||||
|
||||
PROTO_DEFINES = -DFUNCPROTO=11 -DNARROWPROTO
|
||||
|
||||
INSTPGMFLAGS = -s
|
||||
|
||||
INSTBINFLAGS = -m 0755
|
||||
INSTUIDFLAGS = -s -m 4755
|
||||
INSTLIBFLAGS = -m 0644
|
||||
INSTINCFLAGS = -m 0444
|
||||
INSTMANFLAGS = -m 0444
|
||||
INSTDATFLAGS = -m 0444
|
||||
INSTKMEMFLAGS = -s -m 4755
|
||||
|
||||
PROJECTROOT = /usr/X386
|
||||
|
||||
TOP_INCLUDES = -I$(INCROOT)
|
||||
|
||||
CDEBUGFLAGS = -O2
|
||||
CCOPTIONS = -m486 -DNO_ASM -fwritable-strings
|
||||
ANSICCOPTIONS =
|
||||
|
||||
ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
|
||||
ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES)
|
||||
CFLAGS = $(ANSICCOPTIONS) $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
|
||||
LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)
|
||||
|
||||
LDLIBS = $(OS_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
|
||||
|
||||
LDOPTIONS = $(ANSICCOPTIONS) $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) -L$(USRLIBDIR)
|
||||
|
||||
LDCOMBINEFLAGS = -r
|
||||
DEPENDFLAGS =
|
||||
|
||||
MACROFILE = x386.cf
|
||||
RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
|
||||
|
||||
IMAKE_DEFINES =
|
||||
|
||||
IRULESRC = $(CONFIGDIR)
|
||||
IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
|
||||
|
||||
ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# X Window System Build Parameters
|
||||
# $XFree86: mit/config/Project.tmpl,v 1.13 1993/03/27 03:32:45 dawes Exp $
|
||||
# $XConsortium: Project.tmpl,v 1.138.1.1 92/11/11 09:49:19 rws Exp $
|
||||
|
||||
_percentC_ = %C
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# X Window System make variables; this need to be coordinated with rules
|
||||
|
||||
PATHSEP = /
|
||||
USRLIBDIR = /usr/X386/lib
|
||||
BINDIR = /usr/X386/bin
|
||||
INCROOT = /usr/X386/include
|
||||
BUILDINCROOT = $(TOP)
|
||||
BUILDINCDIR = $(BUILDINCROOT)/X11
|
||||
BUILDINCTOP = ..
|
||||
INCDIR = $(INCROOT)/X11
|
||||
ADMDIR = /usr/adm
|
||||
LIBDIR = $(USRLIBDIR)/X11
|
||||
CONFIGDIR = $(LIBDIR)/config
|
||||
LINTLIBDIR = $(USRLIBDIR)/lint
|
||||
|
||||
FONTDIR = $(LIBDIR)/fonts
|
||||
XINITDIR = $(LIBDIR)/xinit
|
||||
XDMDIR = $(LIBDIR)/xdm
|
||||
TWMDIR = $(LIBDIR)/twm
|
||||
MANPATH = /usr/X386/man
|
||||
MANSOURCEPATH = $(MANPATH)/man
|
||||
MANSUFFIX = 1x
|
||||
LIBMANSUFFIX = 3x
|
||||
MANDIR = $(MANSOURCEPATH)1
|
||||
LIBMANDIR = $(MANSOURCEPATH)3
|
||||
NLSDIR = $(LIBDIR)/nls
|
||||
PEXAPIDIR = $(LIBDIR)/PEX
|
||||
XAPPLOADDIR = $(LIBDIR)/app-defaults
|
||||
FONTCFLAGS = -t
|
||||
LINKKITDIR = $(USRLIBDIR)/Server
|
||||
|
||||
INSTAPPFLAGS = $(INSTDATFLAGS)
|
||||
|
||||
IMAKE = imake
|
||||
DEPEND = makedepend
|
||||
RGB = rgb
|
||||
|
||||
FONTC = bdftopcf
|
||||
|
||||
MKFONTDIR = mkfontdir
|
||||
MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier
|
||||
|
||||
CONFIGSRC = $(TOP)/config
|
||||
DOCUTILSRC = $(TOP)/doc/util
|
||||
CLIENTSRC = $(TOP)/clients
|
||||
DEMOSRC = $(TOP)/demos
|
||||
LIBSRC = $(TOP)/lib
|
||||
FONTSRC = $(TOP)/fonts
|
||||
INCLUDESRC = $(TOP)/X11
|
||||
SERVERSRC = $(TOP)/server
|
||||
UTILSRC = $(TOP)/util
|
||||
SCRIPTSRC = $(UTILSRC)/scripts
|
||||
EXAMPLESRC = $(TOP)/examples
|
||||
CONTRIBSRC = $(TOP)/../contrib
|
||||
DOCSRC = $(TOP)/doc
|
||||
RGBSRC = $(TOP)/rgb
|
||||
DEPENDSRC = $(UTILSRC)/makedepend
|
||||
IMAKESRC = $(CONFIGSRC)
|
||||
XAUTHSRC = $(LIBSRC)/Xau
|
||||
XLIBSRC = $(LIBSRC)/X
|
||||
XMUSRC = $(LIBSRC)/Xmu
|
||||
TOOLKITSRC = $(LIBSRC)/Xt
|
||||
AWIDGETSRC = $(LIBSRC)/Xaw
|
||||
OLDXLIBSRC = $(LIBSRC)/oldX
|
||||
XDMCPLIBSRC = $(LIBSRC)/Xdmcp
|
||||
BDFTOSNFSRC = $(FONTSRC)/bdftosnf
|
||||
BDFTOSNFSRC = $(FONTSRC)/clients/bdftosnf
|
||||
BDFTOPCFSRC = $(FONTSRC)/clients/bdftopcf
|
||||
MKFONTDIRSRC = $(FONTSRC)/clients/mkfontdir
|
||||
FSLIBSRC = $(FONTSRC)/lib/fs
|
||||
FONTSERVERSRC = $(FONTSRC)/server
|
||||
EXTENSIONSRC = $(TOP)/extensions
|
||||
XILIBSRC = $(EXTENSIONSRC)/lib/xinput
|
||||
PEXLIBSRC = $(EXTENSIONSRC)/lib/PEXlib
|
||||
PHIGSLIBSRC = $(EXTENSIONSRC)/lib/PEX
|
||||
|
||||
# $XFree86: mit/config/lnuxLib.tmpl,v 1.1 1993/04/16 14:06:06 dawes Exp $
|
||||
|
||||
SHLIBLDFLAGS =
|
||||
PICFLAGS = -B/usr/dll/jump/
|
||||
|
||||
DEPEXTENSIONLIB =
|
||||
EXTENSIONLIB = -lXext
|
||||
|
||||
DEPXLIB = $(DEPEXTENSIONLIB)
|
||||
XLIB = $(EXTENSIONLIB) -lX11
|
||||
|
||||
DEPXMULIB =
|
||||
XMULIB = -lXmu
|
||||
|
||||
DEPXTOOLLIB =
|
||||
XTOOLLIB = -lXt
|
||||
|
||||
DEPXAWLIB =
|
||||
XAWLIB = -lXaw
|
||||
|
||||
DEPXILIB =
|
||||
XILIB = -lXi
|
||||
|
||||
DEPXTESTLIB =
|
||||
XTESTLIB = -lXtst
|
||||
|
||||
DEPPEXLIB =
|
||||
PEXLIB = -lPEX5
|
||||
|
||||
SOXLIBREV = 3.0.1
|
||||
SOXTREV = 3.0.1
|
||||
SOXAWREV = 3.0.1
|
||||
SOOLDXREV = 3.0.1
|
||||
SOXMUREV = 3.0.1
|
||||
SOXEXTREV = 3.0.1
|
||||
SOXINPUTREV = 3.0.1
|
||||
SOPEXREV = 1.0.1
|
||||
|
||||
DEPXAUTHLIB = $(USRLIBDIR)/libXau.a
|
||||
XAUTHLIB = -lXau
|
||||
DEPXDMCPLIB = $(USRLIBDIR)/libXdmcp.a
|
||||
XDMCPLIB = -lXdmcp
|
||||
|
||||
DEPOLDXLIB = $(USRLIBDIR)/liboldX.a
|
||||
OLDXLIB = -loldX
|
||||
|
||||
DEPPHIGSLIB = $(USRLIBDIR)/libphigs.a
|
||||
PHIGSLIB = -lphigs
|
||||
|
||||
DEPXBSDLIB = $(USRLIBDIR)/libXbsd.a
|
||||
XBSDLIB = -lXbsd
|
||||
|
||||
LINTEXTENSIONLIB = $(LINTLIBDIR)/llib-lXext.ln
|
||||
LINTXLIB = $(LINTLIBDIR)/llib-lX11.ln
|
||||
LINTXMU = $(LINTLIBDIR)/llib-lXmu.ln
|
||||
LINTXTOOL = $(LINTLIBDIR)/llib-lXt.ln
|
||||
LINTXAW = $(LINTLIBDIR)/llib-lXaw.ln
|
||||
LINTXI = $(LINTLIBDIR)/llib-lXi.ln
|
||||
LINTPEX = $(LINTLIBDIR)/llib-lPEX5.ln
|
||||
LINTPHIGS = $(LINTLIBDIR)/llib-lphigs.ln
|
||||
|
||||
DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
|
||||
|
||||
DEPLIBS1 = $(DEPLIBS)
|
||||
DEPLIBS2 = $(DEPLIBS)
|
||||
DEPLIBS3 = $(DEPLIBS)
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Imake rules for building libraries, programs, scripts, and data files
|
||||
# $XFree86: mit/config/Imake.rules,v 1.9 1993/03/23 12:56:27 dawes Exp $
|
||||
# rules: $XConsortium: Imake.rules,v 1.123 91/09/16 20:12:16 rws Exp $
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# start of Imakefile
|
||||
|
||||
all::
|
||||
|
||||
depend::
|
||||
|
||||
clean::
|
||||
|
||||
includes::
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# common rules for all Makefiles - do not edit
|
||||
|
||||
emptyrule::
|
||||
|
||||
clean::
|
||||
$(RM_CMD) "#"*
|
||||
|
||||
Makefile::
|
||||
-@if [ -f Makefile ]; then set -x; \
|
||||
$(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
|
||||
else exit 0; fi
|
||||
$(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
|
||||
|
||||
tags::
|
||||
$(TAGS) -w *.[ch]
|
||||
$(TAGS) -xw *.[ch] > TAGS
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# empty rules for directories that do not have SUBDIRS - do not edit
|
||||
|
||||
install::
|
||||
@echo "install in $(CURRENT_DIR) done"
|
||||
|
||||
install.man::
|
||||
@echo "install.man in $(CURRENT_DIR) done"
|
||||
|
||||
install.linkkit::
|
||||
@echo "install.linkkit in $(CURRENT_DIR) done"
|
||||
|
||||
Makefiles::
|
||||
|
||||
includes::
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# dependencies generated by makedepend
|
||||
|
Binary file not shown.
BIN
test/widget.exe
BIN
test/widget.exe
Binary file not shown.
|
@ -0,0 +1,18 @@
|
|||
#include "../Wine.tmpl"
|
||||
|
||||
MODULE = toolkit
|
||||
|
||||
SRCS = \
|
||||
heap.c \
|
||||
sup.c \
|
||||
winmain.c
|
||||
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
|
||||
WineRelocatableTarget($(TOP)/$(MODULE),,$(OBJS))
|
||||
DependTarget()
|
||||
CleanTarget()
|
||||
|
||||
includes::
|
||||
|
||||
install::
|
|
@ -0,0 +1,202 @@
|
|||
/*
|
||||
* Memory alllocation for the Wine Library toolkit
|
||||
*
|
||||
* Copyright (C) 1994 Miguel de Icaza
|
||||
*
|
||||
* All the memory management is being done by the libc malloc and friends.
|
||||
*/
|
||||
|
||||
#ifndef __STDC__
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#include "windows.h"
|
||||
|
||||
/* Controls the blocks per handle table */
|
||||
#define MAXBLOCKS 512
|
||||
|
||||
static char Copyright [] = "Copyright (C) 1994 Miguel de Icaza";
|
||||
|
||||
typedef struct handle_table {
|
||||
struct handle_table *next;
|
||||
void *blocks [MAXBLOCKS];
|
||||
} handle_table_t;
|
||||
|
||||
static handle_table_t handle_table;
|
||||
|
||||
static void **HEAP_GetFreeSlot (HANDLE *hNum)
|
||||
{
|
||||
handle_table_t *table, *last;
|
||||
int i, j;
|
||||
|
||||
for (table = &handle_table, j = 0; table; table = table->next, j++){
|
||||
for (i = 0; i < MAXBLOCKS; i++)
|
||||
if (!table->blocks [i])
|
||||
goto AssignBlock;
|
||||
last = table;
|
||||
}
|
||||
|
||||
/* No free slots */
|
||||
last->next = malloc (sizeof (handle_table_t));
|
||||
table = last->next;
|
||||
memset (table, 0, sizeof (handle_table_t));
|
||||
i = 0;
|
||||
|
||||
AssignBlock:
|
||||
*hNum = j*MAXBLOCKS+i;
|
||||
return &table->blocks [i];
|
||||
}
|
||||
|
||||
static void HEAP_Handle_is_Zero ()
|
||||
{
|
||||
printf ("Warning: Handle is Zero, segmentation fault comming\n");
|
||||
}
|
||||
|
||||
static void **HEAP_FindSlot (HANDLE hNum)
|
||||
{
|
||||
handle_table_t *table = &handle_table;
|
||||
int i, j;
|
||||
|
||||
if (!hNum)
|
||||
HEAP_Handle_is_Zero ();
|
||||
|
||||
hNum--;
|
||||
for (j = hNum; j > MAXBLOCKS; j -= MAXBLOCKS){
|
||||
table = table->next;
|
||||
if (!table) return 0;
|
||||
}
|
||||
return &table->blocks [hNum%MAXBLOCKS];
|
||||
}
|
||||
|
||||
HANDLE LocalAlloc (WORD flags, WORD bytes)
|
||||
{
|
||||
void *m;
|
||||
void **slot;
|
||||
HANDLE hMem;
|
||||
|
||||
slot = HEAP_GetFreeSlot (&hMem);
|
||||
if (flags & LMEM_WINE_ALIGN)
|
||||
m = memalign (4, bytes);
|
||||
else
|
||||
m = malloc (bytes);
|
||||
if (m){
|
||||
*slot = m;
|
||||
if (flags & LMEM_ZEROINIT)
|
||||
bzero (m, bytes);
|
||||
|
||||
#ifdef DEBUG_HEAP
|
||||
printf ("Handle %d [%d] = %p\n", hMem+1, bytes, m);
|
||||
#endif
|
||||
return hMem+1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
WORD LocalCompact (WORD min_free)
|
||||
{
|
||||
return min_free;
|
||||
}
|
||||
|
||||
WORD LocalFlags (HANDLE hMem)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
HANDLE LocalFree (HANDLE hMem)
|
||||
{
|
||||
void **m = HEAP_FindSlot (hMem);
|
||||
|
||||
free (*m);
|
||||
*m = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL LocalInit (WORD segment, WORD start, WORD end)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
char *LocalLock (HANDLE hMem)
|
||||
{
|
||||
void **m = HEAP_FindSlot (hMem);
|
||||
#ifdef DEBUG_HEAP
|
||||
printf (">%d->%p\n", hMem, *m);
|
||||
#endif
|
||||
return *m;
|
||||
}
|
||||
|
||||
HANDLE LocalReAlloc (HANDLE hMem, WORD flags, WORD bytes)
|
||||
{
|
||||
void **m = HEAP_FindSlot (hMem);
|
||||
|
||||
realloc (*m, bytes);
|
||||
}
|
||||
|
||||
WORD LocalSize (HANDLE hMem)
|
||||
{
|
||||
/* Not implemented yet */
|
||||
}
|
||||
|
||||
|
||||
BOOL LocalUnLock (HANDLE hMem)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
HANDLE GlobalAlloc (WORD flags, DWORD size)
|
||||
{
|
||||
return LocalAlloc (flags, size);
|
||||
}
|
||||
|
||||
HANDLE GlobalFree (HANDLE hMem)
|
||||
{
|
||||
return LocalFree (hMem);
|
||||
}
|
||||
|
||||
char *GlobalLock (HANDLE hMem)
|
||||
{
|
||||
return LocalLock (hMem);
|
||||
}
|
||||
|
||||
BOOL GlobalUnlock (HANDLE hMem)
|
||||
{
|
||||
return LocalUnLock (hMem);
|
||||
}
|
||||
|
||||
WORD GlobalFlags (HANDLE hMem)
|
||||
{
|
||||
return LocalFlags (hMem);
|
||||
}
|
||||
|
||||
DWORD GlobalSize (HANDLE hMem)
|
||||
{
|
||||
return LocalSize (hMem);
|
||||
}
|
||||
|
||||
DWORD GlobalCompact(DWORD desired)
|
||||
{
|
||||
if (desired)
|
||||
return desired;
|
||||
else
|
||||
return 0x01000000; /* Should check the available core. */
|
||||
}
|
||||
|
||||
HANDLE GlobalReAlloc(HANDLE hMem, DWORD new_size, WORD flags)
|
||||
{
|
||||
if (!(flags & GMEM_MODIFY))
|
||||
return LocalReAlloc (hMem, new_size, flags);
|
||||
}
|
||||
|
||||
#ifdef UNIMPLEMENTED
|
||||
void *GlobalQuickAlloc(int size)
|
||||
{
|
||||
}
|
||||
|
||||
DWORD int GlobalHandle(WORD selector)
|
||||
{
|
||||
}
|
||||
|
||||
unsigned int GlobalHandleFromPointer(void *block)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
|
@ -0,0 +1,102 @@
|
|||
#include <stdio.h>
|
||||
#include "prototypes.h"
|
||||
#include "windows.h"
|
||||
#include "callback.h"
|
||||
#include "wine.h"
|
||||
#include "arch.h"
|
||||
|
||||
/* HANDLE hSysRes = 1; */
|
||||
|
||||
LONG CallWindowProc (FARPROC func, HWND hwnd, WORD message,
|
||||
WORD wParam, LONG lParam)
|
||||
{
|
||||
(*func)(hwnd, message, wParam, lParam);
|
||||
}
|
||||
|
||||
CallLineDDAProc (FARPROC back, int x, int y, long lParam)
|
||||
{
|
||||
(*back)(x, y, lParam);
|
||||
}
|
||||
|
||||
/*
|
||||
* Header loading routines for WineLib.
|
||||
*/
|
||||
|
||||
/* LOADSHORT Calls LOAD and swaps the high and the low bytes */
|
||||
|
||||
#define LOAD(x) read (fd, &TAB->x, sizeof (TAB->x))
|
||||
#define LOADSHORT(x) LOAD(x); TAB->x = CONV_SHORT (TAB->x);
|
||||
#define LOADLONG(x) LOAD(x); TAB->x = CONV_LONG (TAB->x);
|
||||
|
||||
void load_mz_header (int fd, struct mz_header_s *mz_header)
|
||||
{
|
||||
#define TAB mz_header
|
||||
LOAD (dont_care1);
|
||||
LOAD (must_be_0x40);
|
||||
LOAD (dont_care2);
|
||||
LOADSHORT (ne_offset);
|
||||
}
|
||||
|
||||
void load_ne_header (int fd, struct ne_header_s *ne_header)
|
||||
{
|
||||
#undef TAB
|
||||
#define TAB ne_header
|
||||
LOAD (header_type);
|
||||
LOADSHORT (linker_version);
|
||||
LOADSHORT (linker_revision);
|
||||
LOADSHORT (entry_tab_offset);
|
||||
LOADSHORT (entry_tab_length);
|
||||
LOAD (reserved1);
|
||||
LOADSHORT (format_flags);
|
||||
LOADSHORT (auto_data_seg);
|
||||
LOADSHORT (local_heap_length);
|
||||
LOADSHORT (stack_length);
|
||||
LOADSHORT (ip);
|
||||
LOADSHORT (cs);
|
||||
LOADSHORT (sp);
|
||||
LOADSHORT (ss);
|
||||
LOADSHORT (n_segment_tab);
|
||||
LOADSHORT (n_mod_ref_tab);
|
||||
LOADSHORT (nrname_tab_length);
|
||||
LOADSHORT (segment_tab_offset);
|
||||
LOADSHORT (resource_tab_offset);
|
||||
LOADSHORT (rname_tab_offset);
|
||||
LOADSHORT (moduleref_tab_offset);
|
||||
LOADSHORT (iname_tab_offset);
|
||||
LOADLONG (nrname_tab_offset);
|
||||
LOADSHORT (n_mov_entry_points);
|
||||
LOADSHORT (align_shift_count);
|
||||
LOADSHORT (n_resource_seg);
|
||||
LOAD (operating_system);
|
||||
LOAD (additional_flags);
|
||||
LOADSHORT (fastload_offset);
|
||||
LOADSHORT (fastload_length);
|
||||
LOADSHORT (reserved2);
|
||||
LOADSHORT (expect_version);
|
||||
}
|
||||
|
||||
/*
|
||||
* Typeinfo loading routines for non PC-architectures.
|
||||
*/
|
||||
|
||||
int load_typeinfo (int fd, struct resource_typeinfo_s *typeinfo)
|
||||
{
|
||||
#undef TAB
|
||||
#define TAB typeinfo
|
||||
LOADSHORT (type_id);
|
||||
LOADSHORT (count);
|
||||
LOADLONG (reserved);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int load_nameinfo (int fd, struct resource_nameinfo_s *nameinfo)
|
||||
{
|
||||
#undef TAB
|
||||
#define TAB nameinfo
|
||||
LOADSHORT (offset);
|
||||
LOADSHORT (length);
|
||||
LOADSHORT (flags);
|
||||
LOADSHORT (id);
|
||||
LOADSHORT (handle);
|
||||
LOADSHORT (usage);
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
#include <stdio.h>
|
||||
#include "windows.h"
|
||||
#include "wine.h"
|
||||
|
||||
extern HINSTANCE hSysRes;
|
||||
|
||||
_WinMain (int argc, char *argv [])
|
||||
{
|
||||
int ret_val;
|
||||
char filename [4096];
|
||||
|
||||
GetPrivateProfileString("wine", "SystemResources", "sysres.dll",
|
||||
filename, sizeof(filename), WINE_INI);
|
||||
hSysRes = LoadImage(filename);
|
||||
if (hSysRes == (HINSTANCE)NULL)
|
||||
printf("Error Loading System Resources !!!\n");
|
||||
else
|
||||
printf("System Resources Loaded // hSysRes='%04X'\n", hSysRes);
|
||||
|
||||
USER_InitApp (hSysRes);
|
||||
ret_val = WinMain (1, /* hInstance */
|
||||
0, /* hPrevInstance */
|
||||
"", /* lpszCmdParam */
|
||||
SW_NORMAL); /* nCmdShow */
|
||||
return ret_val;
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
CFLAGS=$(COPTS) $(DEBUGOPTS) -I$(INCLUDE_DIR)
|
||||
|
||||
build: build.c
|
||||
cc $(CFLAGS) -o build build.c
|
||||
|
||||
clean:
|
||||
rm -f *.o *~ build *#
|
||||
|
||||
depend:
|
||||
$(CC) $(CFLAGS) -M *.c > .depend
|
||||
|
||||
dummy:
|
||||
|
||||
#
|
||||
# Dependency lists
|
||||
#
|
||||
ifeq (.depend,$(wildcard .depend))
|
||||
include .depend
|
||||
endif
|
|
@ -744,7 +744,11 @@ main(int argc, char **argv)
|
|||
|
||||
fclose(fp);
|
||||
|
||||
#ifndef SHORTNAMES
|
||||
sprintf(filename, "dll_%s_tab.c", LowerDLLName);
|
||||
#else
|
||||
sprintf(filename, "dtb_%s.c", LowerDLLName);
|
||||
#endif
|
||||
fp = fopen(filename, "w");
|
||||
|
||||
fprintf(fp, "#include <stdio.h>\n");
|
||||
|
|
|
@ -5,7 +5,6 @@ MODULE = windows
|
|||
SRCS = \
|
||||
caret.c \
|
||||
class.c \
|
||||
clipping.c \
|
||||
dc.c \
|
||||
dce.c \
|
||||
defdlg.c \
|
||||
|
@ -27,30 +26,7 @@ SRCS = \
|
|||
win.c \
|
||||
winpos.c
|
||||
|
||||
OBJS = \
|
||||
caret.o \
|
||||
class.o \
|
||||
clipping.o \
|
||||
dc.o \
|
||||
dce.o \
|
||||
defdlg.o \
|
||||
defwnd.o \
|
||||
dialog.o \
|
||||
event.o \
|
||||
focus.o \
|
||||
graphics.o \
|
||||
keyboard.o \
|
||||
mapping.o \
|
||||
message.o \
|
||||
nonclient.o \
|
||||
painting.o \
|
||||
scroll.o \
|
||||
syscolor.o \
|
||||
sysmetrics.o \
|
||||
timer.o \
|
||||
utility.o \
|
||||
win.o \
|
||||
winpos.o
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
|
||||
WineRelocatableTarget($(TOP)/$(MODULE),,$(OBJS))
|
||||
DependTarget()
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
CFLAGS=$(COPTS) $(DEBUGOPTS) -I$(INCLUDE_DIR)
|
||||
|
||||
OBJS=class.o dc.o dce.o event.o message.o win.o timer.o graphics.o \
|
||||
clipping.o mapping.o painting.o keyboard.o utility.o syscolor.o \
|
||||
defwnd.o defdlg.o dialog.o focus.o scroll.o caret.o winpos.o \
|
||||
sysmetrics.o nonclient.o
|
||||
|
||||
default: windows.o
|
||||
|
||||
windows.o: $(OBJS)
|
||||
$(LD) -r -o windows.o $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -f *.o *~ *.s dll_* *.a *#
|
||||
|
||||
depend:
|
||||
$(CC) $(CFLAGS) -M *.c > .depend
|
||||
|
||||
ifeq (.depend,$(wildcard .depend))
|
||||
include .depend
|
||||
endif
|
|
@ -18,6 +18,7 @@ typedef struct
|
|||
short width;
|
||||
short height;
|
||||
COLORREF color;
|
||||
HBITMAP bitmap;
|
||||
WORD timeout;
|
||||
WORD timerid;
|
||||
} CARET;
|
||||
|
@ -47,7 +48,10 @@ static WORD CARET_Callback(HWND hwnd, WORD msg, WORD timerid, LONG ctime)
|
|||
{
|
||||
Caret.on = (Caret.on ? FALSE : TRUE);
|
||||
hdc = GetDC(Caret.hwnd);
|
||||
hBrush = CreateSolidBrush(Caret.color);
|
||||
if (Caret.bitmap == 0 || Caret.bitmap == 1)
|
||||
hBrush = CreateSolidBrush(Caret.color);
|
||||
else
|
||||
hBrush = CreatePatternBrush(Caret.bitmap);
|
||||
SelectObject(hdc, (HANDLE)hBrush);
|
||||
SetROP2(hdc, R2_XORPEN);
|
||||
rgn = CreateRectRgn(Caret.x, Caret.y,
|
||||
|
@ -74,7 +78,10 @@ static void CARET_HideCaret()
|
|||
|
||||
Caret.on = FALSE;
|
||||
hdc = GetDC(Caret.hwnd);
|
||||
hBrush = CreateSolidBrush(Caret.color);
|
||||
if (Caret.bitmap == 0 || Caret.bitmap == 1)
|
||||
hBrush = CreateSolidBrush(Caret.color);
|
||||
else
|
||||
hBrush = CreatePatternBrush(Caret.bitmap);
|
||||
SelectObject(hdc, (HANDLE)hBrush);
|
||||
SetROP2(hdc, R2_XORPEN);
|
||||
rgn = CreateRectRgn(Caret.x, Caret.y,
|
||||
|
@ -100,28 +107,28 @@ void CreateCaret(HWND hwnd, HBITMAP bitmap, short width, short height)
|
|||
/* if (Caret.hwnd)
|
||||
DestroyCaret();
|
||||
*/
|
||||
if (bitmap)
|
||||
{
|
||||
printf("CreateCaret: Bitmaps are currently not supported\n");
|
||||
return;
|
||||
}
|
||||
if (bitmap && bitmap != 1)
|
||||
Caret.bitmap = bitmap;
|
||||
|
||||
if (width)
|
||||
Caret.width = width;
|
||||
else
|
||||
Caret.width = 3; /* should be SM_CXBORDER */
|
||||
Caret.width = GetSystemMetrics(SM_CXBORDER);
|
||||
|
||||
if (height)
|
||||
Caret.height = height;
|
||||
else
|
||||
Caret.height = 3; /* should be SM_CYBORDER */
|
||||
Caret.height = GetSystemMetrics(SM_CYBORDER);
|
||||
|
||||
Caret.hwnd = hwnd;
|
||||
Caret.hidden = 1;
|
||||
Caret.on = FALSE;
|
||||
Caret.x = 0;
|
||||
Caret.y = 0;
|
||||
Caret.color = GetSysColor(COLOR_WINDOWTEXT);
|
||||
if (bitmap == 1)
|
||||
Caret.color = GetSysColor(COLOR_GRAYTEXT);
|
||||
else
|
||||
Caret.color = GetSysColor(COLOR_WINDOWTEXT);
|
||||
Caret.timeout = 750;
|
||||
LockCaret = FALSE;
|
||||
|
||||
|
|
|
@ -1,175 +0,0 @@
|
|||
/*
|
||||
* Window clipping functions
|
||||
*
|
||||
* Copyright 1993 Alexandre Julliard
|
||||
*/
|
||||
|
||||
static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "windows.h"
|
||||
#include "win.h"
|
||||
#include "message.h"
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* InvalidateRgn (USER.126)
|
||||
*/
|
||||
void InvalidateRgn( HWND hwnd, HRGN hrgn, BOOL erase )
|
||||
{
|
||||
HRGN newRgn;
|
||||
WND * wndPtr = WIN_FindWndPtr( hwnd );
|
||||
if (!wndPtr) return;
|
||||
|
||||
if (!hrgn)
|
||||
{
|
||||
newRgn = CreateRectRgn(0, 0,
|
||||
wndPtr->rectClient.right-wndPtr->rectClient.left,
|
||||
wndPtr->rectClient.bottom-wndPtr->rectClient.top );
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(newRgn = CreateRectRgn( 0, 0, 0, 0 ))) return;
|
||||
if (!wndPtr->hrgnUpdate) CombineRgn( newRgn, hrgn, 0, RGN_COPY );
|
||||
else CombineRgn( newRgn, wndPtr->hrgnUpdate, hrgn, RGN_OR );
|
||||
}
|
||||
if (wndPtr->hrgnUpdate) DeleteObject( wndPtr->hrgnUpdate );
|
||||
else MSG_IncPaintCount( wndPtr->hmemTaskQ );
|
||||
wndPtr->hrgnUpdate = newRgn;
|
||||
if (erase) wndPtr->flags |= WIN_ERASE_UPDATERGN;
|
||||
|
||||
/* Invalidate the children overlapping the region */
|
||||
|
||||
if (wndPtr->dwStyle & WS_CLIPCHILDREN) return;
|
||||
for (hwnd = wndPtr->hwndChild; (hwnd); hwnd = wndPtr->hwndNext)
|
||||
{
|
||||
if (!(wndPtr = WIN_FindWndPtr( hwnd ))) break;
|
||||
if (hrgn && !RectInRegion( hrgn, &wndPtr->rectWindow )) continue;
|
||||
InvalidateRgn( hwnd, hrgn, erase );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* InvalidateRect (USER.125)
|
||||
*/
|
||||
void InvalidateRect( HWND hwnd, LPRECT rect, BOOL erase )
|
||||
{
|
||||
HRGN hrgn = 0;
|
||||
|
||||
WND * wndPtr = WIN_FindWndPtr( hwnd );
|
||||
if (!wndPtr) return;
|
||||
|
||||
#ifdef DEBUG_WIN
|
||||
if (rect) printf( "InvalidateRect: %d %d,%d-%d,%d\n", hwnd,
|
||||
rect->left, rect->top, rect->right, rect->bottom );
|
||||
else printf( "InvalidateRect: %d NULL\n", hwnd );
|
||||
#endif
|
||||
if (rect) hrgn = CreateRectRgnIndirect( rect );
|
||||
InvalidateRgn( hwnd, hrgn, erase );
|
||||
if (hrgn) DeleteObject( hrgn );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* ValidateRgn (USER.128)
|
||||
*/
|
||||
void ValidateRgn( HWND hwnd, HRGN hrgn )
|
||||
{
|
||||
HRGN newRgn;
|
||||
WND * wndPtr = WIN_FindWndPtr( hwnd );
|
||||
if (!wndPtr) return;
|
||||
|
||||
if (!wndPtr->hrgnUpdate) return;
|
||||
if (!hrgn) newRgn = 0;
|
||||
else
|
||||
{
|
||||
if (!(newRgn = CreateRectRgn( 0, 0, 0, 0 ))) return;
|
||||
if (CombineRgn( newRgn, wndPtr->hrgnUpdate, hrgn, RGN_DIFF ) == NULLREGION)
|
||||
{
|
||||
DeleteObject( newRgn );
|
||||
newRgn = 0;
|
||||
}
|
||||
}
|
||||
DeleteObject( wndPtr->hrgnUpdate );
|
||||
wndPtr->hrgnUpdate = newRgn;
|
||||
if (!wndPtr->hrgnUpdate) wndPtr->flags &= ~WIN_ERASE_UPDATERGN;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* ValidateRect (USER.127)
|
||||
*/
|
||||
void ValidateRect( HWND hwnd, LPRECT rect )
|
||||
{
|
||||
HRGN hrgn = 0;
|
||||
|
||||
WND * wndPtr = WIN_FindWndPtr( hwnd );
|
||||
if (!wndPtr) return;
|
||||
|
||||
if (rect) hrgn = CreateRectRgnIndirect( rect );
|
||||
ValidateRgn( hwnd, hrgn );
|
||||
if (hrgn) DeleteObject( hrgn );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetUpdateRect (USER.190)
|
||||
*/
|
||||
BOOL GetUpdateRect( HWND hwnd, LPRECT rect, BOOL erase )
|
||||
{
|
||||
WND * wndPtr = WIN_FindWndPtr( hwnd );
|
||||
if (!wndPtr) return FALSE;
|
||||
|
||||
if (rect)
|
||||
{
|
||||
if (wndPtr->hrgnUpdate)
|
||||
{
|
||||
HRGN hrgn = CreateRectRgn( 0, 0, 0, 0 );
|
||||
if (GetUpdateRgn( hwnd, hrgn, erase ) == ERROR) return FALSE;
|
||||
GetRgnBox( hrgn, rect );
|
||||
DeleteObject( hrgn );
|
||||
}
|
||||
else SetRectEmpty( rect );
|
||||
}
|
||||
return (wndPtr->hrgnUpdate != 0);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetUpdateRgn (USER.237)
|
||||
*/
|
||||
int GetUpdateRgn( HWND hwnd, HRGN hrgn, BOOL erase )
|
||||
{
|
||||
HRGN hrgnClip;
|
||||
int retval;
|
||||
WND * wndPtr = WIN_FindWndPtr( hwnd );
|
||||
if (!wndPtr) return ERROR;
|
||||
|
||||
if (!wndPtr->hrgnUpdate)
|
||||
{
|
||||
if (!(hrgnClip = CreateRectRgn( 0, 0, 0, 0 ))) return ERROR;
|
||||
retval = CombineRgn( hrgn, hrgnClip, 0, RGN_COPY );
|
||||
}
|
||||
else
|
||||
{
|
||||
hrgnClip = CreateRectRgn( 0, 0,
|
||||
wndPtr->rectClient.right-wndPtr->rectClient.left,
|
||||
wndPtr->rectClient.bottom-wndPtr->rectClient.top );
|
||||
if (!hrgnClip) return ERROR;
|
||||
retval = CombineRgn( hrgn, wndPtr->hrgnUpdate, hrgnClip, RGN_AND );
|
||||
if (erase)
|
||||
{
|
||||
HDC hdc = GetDCEx( hwnd, wndPtr->hrgnUpdate,
|
||||
DCX_INTERSECTRGN | DCX_USESTYLE );
|
||||
if (hdc)
|
||||
{
|
||||
SendMessage( hwnd, WM_ERASEBKGND, hdc, 0 );
|
||||
ReleaseDC( hwnd, hdc );
|
||||
}
|
||||
}
|
||||
}
|
||||
DeleteObject( hrgnClip );
|
||||
return retval;
|
||||
}
|
|
@ -86,6 +86,37 @@ void DCE_Init()
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DCE_GetVisRect
|
||||
*
|
||||
* Return the visible rectangle of a window, i.e. the client or
|
||||
* window area clipped by the client area of all ancestors.
|
||||
*/
|
||||
static void DCE_GetVisRect( WND *wndPtr, BOOL clientArea, RECT *lprect )
|
||||
{
|
||||
int xoffset, yoffset;
|
||||
|
||||
*lprect = clientArea ? wndPtr->rectClient : wndPtr->rectWindow;
|
||||
xoffset = lprect->left;
|
||||
yoffset = lprect->top;
|
||||
|
||||
while (wndPtr->dwStyle & WS_CHILD)
|
||||
{
|
||||
WND *parentPtr = WIN_FindWndPtr( wndPtr->hwndParent );
|
||||
xoffset += parentPtr->rectClient.left;
|
||||
yoffset += parentPtr->rectClient.top;
|
||||
OffsetRect( lprect, parentPtr->rectClient.left,
|
||||
parentPtr->rectClient.top );
|
||||
|
||||
/* Warning!! we assume that IntersectRect() handles the case */
|
||||
/* where the destination is the same as one of the sources. */
|
||||
IntersectRect( lprect, lprect, &parentPtr->rectClient );
|
||||
wndPtr = parentPtr;
|
||||
}
|
||||
OffsetRect( lprect, -xoffset, -yoffset );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetDCEx (USER.359)
|
||||
*/
|
||||
|
@ -94,6 +125,7 @@ void DCE_Init()
|
|||
HDC GetDCEx( HWND hwnd, HRGN hrgnClip, DWORD flags )
|
||||
{
|
||||
HANDLE hdce;
|
||||
RECT clipRect;
|
||||
HDC hdc = 0;
|
||||
DCE * dce;
|
||||
DC * dc;
|
||||
|
@ -155,8 +187,11 @@ HDC GetDCEx( HWND hwnd, HRGN hrgnClip, DWORD flags )
|
|||
dc->w.DCOrgY = wndPtr->rectClient.top - wndPtr->rectWindow.top;
|
||||
dc->w.DCSizeX = wndPtr->rectClient.right - wndPtr->rectClient.left;
|
||||
dc->w.DCSizeY = wndPtr->rectClient.bottom - wndPtr->rectClient.top;
|
||||
IntersectVisRect( hdc, 0, 0, dc->w.DCSizeX, dc->w.DCSizeY );
|
||||
}
|
||||
|
||||
DCE_GetVisRect( wndPtr, !(flags & DCX_WINDOW), &clipRect );
|
||||
IntersectVisRect( hdc, clipRect.left, clipRect.top,
|
||||
clipRect.right, clipRect.bottom );
|
||||
}
|
||||
else dc->u.x.drawable = DefaultRootWindow( display );
|
||||
|
||||
|
|
|
@ -64,6 +64,8 @@ LONG DefWindowProc( HWND hwnd, WORD msg, WORD wParam, LONG lParam )
|
|||
CREATESTRUCT * createStruct = (CREATESTRUCT *)lParam;
|
||||
if (createStruct->lpszName)
|
||||
DEFWND_SetText( hwnd, createStruct->lpszName );
|
||||
if ((createStruct->style & WS_VSCROLL) ||
|
||||
(createStruct->style & WS_HSCROLL)) NC_CreateScrollBars(hwnd);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -86,11 +88,11 @@ LONG DefWindowProc( HWND hwnd, WORD msg, WORD wParam, LONG lParam )
|
|||
return NC_HandleNCActivate( hwnd, wParam );
|
||||
|
||||
case WM_NCDESTROY:
|
||||
{
|
||||
if (wndPtr->hText) USER_HEAP_FREE(wndPtr->hText);
|
||||
wndPtr->hText = 0;
|
||||
return 0;
|
||||
}
|
||||
if (wndPtr->hText) USER_HEAP_FREE(wndPtr->hText);
|
||||
wndPtr->hText = 0;
|
||||
if (wndPtr->VScroll) free(wndPtr->VScroll);
|
||||
if (wndPtr->HScroll) free(wndPtr->HScroll);
|
||||
return 0;
|
||||
|
||||
case WM_PAINT:
|
||||
{
|
||||
|
|
|
@ -7,12 +7,17 @@
|
|||
static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xresource.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
#include "windows.h"
|
||||
#include "win.h"
|
||||
#include "class.h"
|
||||
#include "message.h"
|
||||
|
||||
#ifndef FamilyAmoeba
|
||||
typedef char *XPointer;
|
||||
#endif
|
||||
|
||||
#define NB_BUTTONS 3 /* Windows can handle 3 buttons */
|
||||
|
||||
|
@ -229,7 +234,8 @@ static void EVENT_Expose( HWND hwnd, XExposeEvent *event )
|
|||
rect.bottom = rect.top + event->height;
|
||||
winHasCursor = event->window;
|
||||
|
||||
InvalidateRect( hwnd, &rect, TRUE );
|
||||
RedrawWindow( hwnd, &rect, 0,
|
||||
RDW_INVALIDATE | RDW_ERASE | RDW_FRAME | RDW_NOCHILDREN );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -6,10 +6,7 @@
|
|||
|
||||
static char Copyright[] = "Copyright David Metcalfe, 1993";
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <X11/StringDefs.h>
|
||||
#include "win.h"
|
||||
#include "gdi.h"
|
||||
|
||||
HWND hWndFocus = 0;
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue