Commit d37eb365 authored by Alexandre Julliard's avatar Alexandre Julliard

Release 970720

Sat Jul 19 13:03:01 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [tools/build.c] [include/stackframe.h] Save the complete %ebp register in CallFrom16; fixes a crash with LabView reported by Andreas Mohr. * [loader/main.c] Avoid executing a built-in DLL. * [controls/static.c] Converted static window procedure to Win32. * [windows/message.c] [windows/queue.c] [include/queue.h] Hacked SendMessage functions to support inter-task messages with SendMessage32A/W. Sun Jul 13 16:55:35 1997 Bernhard Rosenkraenzer <bero@bero-online.ml.org> * [ipc/bit_array.c] Don't use bitops.h in Linux 2.1.x (these versions do not return the previous state for clear_bit and set_bit) * [ipc/shm_main_blk.c] Adapt to GLIBC's ipc_perm structure. * [memory/ldt.c] Include <asm/unistd.h> on Linux/GLIBC systems (required for _syscall3). Wed Jul 9 23:53:19 1997 David A. Cuthbert <dacut@henry.ece.cmu.edu> * [include/options.h] [files/profile.c] Added PROFILE_GetWineIniBool and PROFILE_EnumerateWineIniSection. * [include/sysmetrics.h] [include/windows.h] [windows/sysmetrics.c] All sysmetrics moved to array (no more constant macros). Added MOUSEWHEELPRESENT metric. * [include/bitmap.h] [objects/oembitmap.c] Added OBM_Init() (see also loader/main.c) and more support for Win95 bitmaps; added size info to OEM bitmaps. * [include/graphics.h] [windows/graphics.h] Added GRAPH_DrawGenericReliefRect. * [loader/main.c] Added TWEAK_Init() and TWEAK_CheckConfiguration() calls (the latter checks for invalid entries in wine.conf). * [include/debug.h] [include/stddebug.h] [include/nonclient.h] [include/tweak.h] [controls/menu.c] [misc/tweak.c] [objects/gdiobj.c] [windows/syscolor.c] [windows/nonclient.c] [BUGS] [documentation/win95look] Added tweaks for Windows 95 interface support. See documentation/win95look for more information. * [controls/edit.c] Fixed EDIT_MoveHome bug. * [misc/ver.c] Changed name of dprintf_ver_string to ver_dstring to fix problem with tools/make_debug utility. Wed Jul 9 21:31:54 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [objects/dib.c] Don't use palettes with dibs with biBitCount > 8. * [misc/ole2nls.c][misc/ver.c] IsValidLocale, EnumSystemLocales fixed (winhlp32.exe works) Some VerLanguage coded moved to ole2nls.c, some cleanups. * [multimedia/mcistring.c] Fixed "capabilities <dev> device type" crash (cool.exe). * [misc/main.c] SystemParametersInfo*: added stub option 41 (GETNONCLIENTMETRICS), duplicated some stuff away from SPI16 that writes 32bit vars.(one COMCTL32.DLL crash, freecell.exe) Tue Jul 8 22:40:53 1997 Morten Welinder <terra@diku.dk> * [if1632/shell32.spec] Use Windows 95's ordinals. Help wanted, inquire within. Mon Jul 7 11:20:36 1997 Philippe De Muyter <phdm@info.ucl.ac.be> * [if1632/relay.c] [if1632/user.spec] [if1632/kernel.spec] [tools/build-spec.txt] [tools/build.c] Added type 'segstr' (segmented pointer to null-terminated string) to .spec files. * [windows/user.c] [if1632/user.spec] ExitWindowsExec stub function added. Mon Jul 7 01:18:25 1997 U. Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [files/file.c] [include/winbase.h] [if1632/kernel32.spec] Implement MoveFileEx32, some enhancement for Movefile32. Sat Jul 5 18:13:48 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu. * [files/file.c] [if1632/kernel32.spec] [include/winerror.h] [msdos/int21.c] [win32/file.c] Add LockFile/UnlockFile implementation. Add back in int21 func(0x5c) Record locking functions. * [files/file.c] Fixed bug with OF_REOPEN in FILE_DoOpenFile. Fri Jul 4 12:00:00 1997 Henrik Olsen <Henrik.Olsen@iaeste.dk> * [misc/ole2nls.c] [programs/progman/Da.rc] [programs/winhelp/Da.rc] [resources/sysres_Da.rc] Added/updated Danish language support. Thu Jul 3 13:04:20 1997 Claus Fischer <fischer@iue.tuwien.ac.at> * [files/dos_fs.c] Properly implemented DOSFS_UnixTimeToFileTime and DOSFS_FileTimeToUnixTime. * [documentation/wine.texinfo] First version of texinfo documentation.
parent 33072e1f
This is release 970629 of Wine, the MS Windows emulator. This is still a
This is release 970720 of Wine, the MS Windows emulator. This is still a
developer's only release. There are many bugs and many unimplemented API
features. Most applications still do not work correctly.
Patches should be submitted to "julliard@lrc.epfl.ch". Please don't
forget to include a ChangeLog entry.
WHAT'S NEW with Wine-970629: (see ChangeLog for details)
- Start of COMDLG32 implementation.
- Relay debugging knows about strings.
WHAT'S NEW with Wine-970720: (see ChangeLog for details)
- Preliminary Win95 look&feel implementation.
- Start of texinfo documentation.
- Lots of bug fixes.
See the README file in the distribution for installation instructions.
......@@ -16,10 +16,10 @@ Because of lags created by using mirror, this message may reach you before
the release is available at the ftp sites. The sources will be available
from the following locations:
ftp://sunsite.unc.edu/pub/Linux/ALPHA/wine/development/Wine-970629.tar.gz
ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-970629.tar.gz
ftp://ftp.infomagic.com/pub/mirrors/linux/wine/development/Wine-970629.tar.gz
ftp://ftp.progsoc.uts.edu.au/pub/Wine/development/Wine-970629.tar.gz
ftp://sunsite.unc.edu/pub/Linux/ALPHA/wine/development/Wine-970720.tar.gz
ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-970720.tar.gz
ftp://ftp.infomagic.com/pub/mirrors/linux/wine/development/Wine-970720.tar.gz
ftp://ftp.progsoc.uts.edu.au/pub/Wine/development/Wine-970720.tar.gz
It should also be available from any site that mirrors tsx-11 or sunsite.
......@@ -30,30 +30,8 @@ If you want to get the new releases faster, you can subscribe to the
wine-patches mailing list by sending a mail containing 'subscribe
wine-patches your_address' to majordomo@tiger.informatik.hu-berlin.de.
Wine is available thanks to the work of Bob Amstadt, Dag Asheim,
Martin Ayotte, Peter Bajusz, Ross Biro, Uwe Bonnes, Erik Bos, Fons Botman,
John Brezak, Andrew Bulhak, John Burton, Niels de Carpentier, Jimen Ching,
Huw D. M. Davies, Roman Dolejsi, Frans van Dorsselaer, Paul Falstad,
David Faure, Olaf Flebbe, Peter Galbavy, Ramon Garcia, Matthew Ghio,
Hans de Graaff, Charles M. Hannum, John Harvey, Cameron Heide,
Jochen Hoenicke, Onno Hovers, Jeffrey Hsu, Miguel de Icaza, Jukka Iivonen,
Lee Jaekil, Alexandre Julliard, Bang Jun-Young, Pavel Kankovsky,
Jochen Karrer, Andreas Kirschbaum, Albrecht Kleine, Jon Konrath,
Alex Korobka, Greg Kreider, Anand Kumria, Scott A. Laird, Andrew Lewycky,
Martin von Loewis, Kenneth MacDonald, Peter MacDonald, William Magro,
Juergen Marquardt, Ricardo Massaro, Marcus Meissner, Graham Menhennitt,
David Metcalfe, Bruce Milner, Steffen Moeller, Andreas Mohr,
Philippe De Muyter, Itai Nahshon, Michael Patra, Jim Peterson,
Robert Pouliot, Keith Reynolds, Slaven Rezic, John Richardson,
Johannes Ruscheinski, Thomas Sandford, Constantine Sapuntzakis,
Pablo Saratxaga, Daniel Schepler, Ulrich Schmid, Bernd Schmidt,
Yngvi Sigurjonsson, Stephen Simmons, Rick Sladkey, William Smith,
Dominik Strasser, Vadim Strizhevsky, Erik Svendsen, Tristan Tarrant,
Andrew Taylor, Duncan C Thomson, Goran Thyni, Jimmy Tirtawangsa, Jon Tombs,
Linus Torvalds, Gregory Trubetskoy, Petri Tuomola, Michael Veksler,
Sven Verdoolaege, Ronan Waide, Eric Warnke, Manfred Weichel,
Morten Welinder, Jan Willamowius, Carl Williams, Karl Guenter Wuensch,
Eric Youngdale, James Youngman, Mikolaj Zalewski, and John Zero.
Wine is available thanks to the work of many people. See the file
AUTHORS in the distribution for the complete list.
--
Alexandre Julliard
......
@c This file is processed by GNU's TeXinfo
@c If you modify it or move it to another location, make sure that
@c TeXinfo works (type `make' in directory documentation).
@c This is a list of the Wine authors and copyright holders.
Wine is available thanks to the work of Bob Amstadt, Dag Asheim,
Martin Ayotte, Peter Bajusz, Ross Biro, Uwe Bonnes, Erik Bos, Fons
Botman, John Brezak, Andrew Bulhak, John Burton, Niels de Carpentier,
Jimen Ching, Huw D. M. Davies, Roman Dolejsi, Frans van Dorsselaer,
Paul Falstad, David Faure, Claus Fischer, Olaf Flebbe, Peter Galbavy,
Ramon Garcia, Matthew Ghio, Hans de Graaff, Charles M. Hannum, John
Harvey, Cameron Heide, Jochen Hoenicke, Onno Hovers, Jeffrey Hsu,
Miguel de Icaza, Jukka Iivonen, Lee Jaekil, Alexandre Julliard, Bang
Jun-Young, Pavel Kankovsky, Jochen Karrer, Andreas Kirschbaum,
Albrecht Kleine, Jon Konrath, Alex Korobka, Greg Kreider, Anand
Kumria, Scott A. Laird, Andrew Lewycky, Martin von Loewis, Kenneth
MacDonald, Peter MacDonald, William Magro, Juergen Marquardt, Ricardo
Massaro, Marcus Meissner, Graham Menhennitt, David Metcalfe, Bruce
Milner, Steffen Moeller, Andreas Mohr, Philippe De Muyter, Itai
Nahshon, Michael Patra, Jim Peterson, Robert Pouliot, Keith Reynolds,
Slaven Rezic, John Richardson, Johannes Ruscheinski, Thomas Sandford,
Constantine Sapuntzakis, Pablo Saratxaga, Daniel Schepler, Ulrich
Schmid, Bernd Schmidt, Yngvi Sigurjonsson, Stephen Simmons, Rick
Sladkey, William Smith, Dominik Strasser, Vadim Strizhevsky, Erik
Svendsen, Tristan Tarrant, Andrew Taylor, Duncan C Thomson, Goran
Thyni, Jimmy Tirtawangsa, Jon Tombs, Linus Torvalds, Gregory
Trubetskoy, Petri Tuomola, Michael Veksler, Sven Verdoolaege, Ronan
Waide, Eric Warnke, Manfred Weichel, Morten Welinder, Jan Willamowius,
Carl Williams, Karl Guenter Wuensch, Eric Youngdale, James Youngman,
Mikolaj Zalewski, and John Zero.
......@@ -15,6 +15,8 @@ General:
* Very alpha printing code. [john@division.co.uk]
* Extremely alpha Win95 interface code.
* No OLE2 and OLE32 support (including OLE2 interfaces etc.).
* No MS Video support (perhaps interface with xanim, don't hold
......
----------------------------------------------------------------------
Sat Jul 19 13:03:01 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [tools/build.c] [include/stackframe.h]
Save the complete %ebp register in CallFrom16; fixes a crash with
LabView reported by Andreas Mohr.
* [loader/main.c]
Avoid executing a built-in DLL.
* [controls/static.c]
Converted static window procedure to Win32.
* [windows/message.c] [windows/queue.c] [include/queue.h]
Hacked SendMessage functions to support inter-task messages with
SendMessage32A/W.
Sun Jul 13 16:55:35 1997 Bernhard Rosenkraenzer <bero@bero-online.ml.org>
* [ipc/bit_array.c]
Don't use bitops.h in Linux 2.1.x (these versions do not return
the previous state for clear_bit and set_bit)
* [ipc/shm_main_blk.c]
Adapt to GLIBC's ipc_perm structure.
* [memory/ldt.c]
Include <asm/unistd.h> on Linux/GLIBC systems (required for
_syscall3).
Wed Jul 9 23:53:19 1997 David A. Cuthbert <dacut@henry.ece.cmu.edu>
* [include/options.h] [files/profile.c]
Added PROFILE_GetWineIniBool and PROFILE_EnumerateWineIniSection.
* [include/sysmetrics.h] [include/windows.h] [windows/sysmetrics.c]
All sysmetrics moved to array (no more constant macros). Added
MOUSEWHEELPRESENT metric.
* [include/bitmap.h] [objects/oembitmap.c]
Added OBM_Init() (see also loader/main.c) and more support for Win95
bitmaps; added size info to OEM bitmaps.
* [include/graphics.h] [windows/graphics.h]
Added GRAPH_DrawGenericReliefRect.
* [loader/main.c]
Added TWEAK_Init() and TWEAK_CheckConfiguration() calls (the
latter checks for invalid entries in wine.conf).
* [include/debug.h] [include/stddebug.h] [include/nonclient.h]
[include/tweak.h] [controls/menu.c] [misc/tweak.c]
[objects/gdiobj.c] [windows/syscolor.c] [windows/nonclient.c]
[BUGS] [documentation/win95look]
Added tweaks for Windows 95 interface support. See
documentation/win95look for more information.
* [controls/edit.c]
Fixed EDIT_MoveHome bug.
* [misc/ver.c]
Changed name of dprintf_ver_string to ver_dstring to fix
problem with tools/make_debug utility.
Wed Jul 9 21:31:54 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [objects/dib.c]
Don't use palettes with dibs with biBitCount > 8.
* [misc/ole2nls.c][misc/ver.c]
IsValidLocale, EnumSystemLocales fixed (winhlp32.exe works)
Some VerLanguage coded moved to ole2nls.c, some cleanups.
* [multimedia/mcistring.c]
Fixed "capabilities <dev> device type" crash (cool.exe).
* [misc/main.c]
SystemParametersInfo*: added stub option 41
(GETNONCLIENTMETRICS), duplicated some stuff away from SPI16
that writes 32bit vars.(one COMCTL32.DLL crash, freecell.exe)
Tue Jul 8 22:40:53 1997 Morten Welinder <terra@diku.dk>
* [if1632/shell32.spec]
Use Windows 95's ordinals. Help wanted, inquire within.
Mon Jul 7 11:20:36 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [if1632/relay.c] [if1632/user.spec] [if1632/kernel.spec]
[tools/build-spec.txt] [tools/build.c]
Added type 'segstr' (segmented pointer to null-terminated string)
to .spec files.
* [windows/user.c] [if1632/user.spec]
ExitWindowsExec stub function added.
Mon Jul 7 01:18:25 1997 U. Bonnes <bon@elektron.ikp.physik.th-darmstadt.de>
* [files/file.c] [include/winbase.h] [if1632/kernel32.spec]
Implement MoveFileEx32, some enhancement for Movefile32.
Sat Jul 5 18:13:48 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu.
* [files/file.c] [if1632/kernel32.spec] [include/winerror.h]
[msdos/int21.c] [win32/file.c]
Add LockFile/UnlockFile implementation.
Add back in int21 func(0x5c) Record locking functions.
* [files/file.c]
Fixed bug with OF_REOPEN in FILE_DoOpenFile.
Fri Jul 4 12:00:00 1997 Henrik Olsen <Henrik.Olsen@iaeste.dk>
* [misc/ole2nls.c] [programs/progman/Da.rc] [programs/winhelp/Da.rc]
[resources/sysres_Da.rc]
Added/updated Danish language support.
Thu Jul 3 13:04:20 1997 Claus Fischer <fischer@iue.tuwien.ac.at>
* [files/dos_fs.c]
Properly implemented DOSFS_UnixTimeToFileTime and
DOSFS_FileTimeToUnixTime.
* [documentation/wine.texinfo]
First version of texinfo documentation.
----------------------------------------------------------------------
Thu Jun 26 02:14:03 1997 Slaven Rezic <eserte@cs.tu-berlin.de>
* [Makefile.in]
......
@c This file is processed by GNU's TeXinfo
@c If you modify it or move it to another location, make sure that
@c TeXinfo works (type `make' in directory documentation).
@c This is the Wine copyright.
@c The Wine warranty is part of the license agreement.
@c READ THE FILE `WARRANTY' CAREFULLY FOR A STATEMENT ON THE WINE WARRANTY.
You may without charge, royalty or other payment, copy and
distribute copies of this work and derivative works of this work
in source or binary form provided that: (1)
......@@ -14,16 +22,9 @@ have been modified, (b) all source files of the derivative work
that contain any party of the original work, and (c) all source
files of the derivative work that are necessary to compile, link
and run the derivative work without unresolved external calls and
with the same functionality of the original work ("Necessary
Sources") carry a prominent notice explaining the nature and date
with the same functionality of the original work (``Necessary
Sources'') carry a prominent notice explaining the nature and date
of the modification and/or creation. You are encouraged to make
the Necessary Sources available under this license in order to
further the development and acceptance of the work.
EXCEPT AS OTHERWISE RESTRICTED BY LAW, THIS WORK IS PROVIDED
WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES OF ANY KIND, INCLUDING
BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF FITNESS FOR A
PARTICULAR PURPOSE, MERCHANTABILITY OR TITLE. EXCEPT AS
OTHERWISE PROVIDED BY LAW, NO AUTHOR, COPYRIGHT HOLDER OR
LICENSOR SHALL BE LIABLE TO YOU FOR DAMAGES OF ANY KIND, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
......@@ -5,7 +5,7 @@
# TOPOBJDIR : top-level object directory
# SRCDIR : source directory for this module
# MODULE : name of the module being built
# C_SRCS : C sources for the module
# C_SRCS : C sources for the module (optional)
# GEN_C_SRCS : generated C sources (optional)
# ASM_SRCS : assembly sources (optional)
# GEN_ASM_SRCS : generated assembly sources (optional)
......
......@@ -74,7 +74,14 @@ LIBSUBDIRS = library
PROGSUBDIRS = libtest programs
ALLSUBDIRS = $(COMMONSUBDIRS) $(EMUSUBDIRS) $(LIBSUBDIRS) $(PROGSUBDIRS)
DOCSUBDIRS = documentation
ALLSUBDIRS = \
$(COMMONSUBDIRS) \
$(EMUSUBDIRS) \
$(LIBSUBDIRS) \
$(PROGSUBDIRS) \
$(DOCSUBDIRS)
COMMONOBJS = \
controls/controls.o \
......@@ -140,7 +147,7 @@ install_programs: dummy
@cd programs; $(SUBMAKE) install
depend: dummy
for i in $(COMMONSUBDIRS) $(LIBSUBDIRS) $(EMUSUBDIRS); do \
for i in $(COMMONSUBDIRS) $(LIBSUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS); do \
(cd $$i; $(MAKE) depend) || exit 1; \
done
......@@ -149,7 +156,7 @@ etags:
clean:
for i in $(ALLSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
for i in . include documentation; do (cd $$i; $(RM) *.o \#*\# *~ *.bak *.orig *.rej *.flc); done
for i in . include; do (cd $$i; $(RM) *.o \#*\# *~ *.bak *.orig *.rej *.flc); done
$(RM) wine wine.sym libwine.a libwine.so.1.0 TAGS
distclean: clean
......
......@@ -16,6 +16,7 @@ You must have one of:
Linux version 0.99.13 or above
NetBSD-current
FreeBSD-current or FreeBSD 1.1
OpenBSD/i386 2.1 or later
You also need to have libXpm installed on your system. The sources for
it are probably available on the ftp site where you got Wine. They can
......
......@@ -9,4 +9,3 @@ the source, of course).
Look at the ChangeLog to see what files have been changed. Try to undo
the particular patch and go partially back to the previous version. If
you have any suspicions, report them to the author or to the newsgroup.
@c This file is processed by GNU's TeXinfo
@c If you modify it or move it to another location, make sure that
@c TeXinfo works (type `make' in directory documentation).
@c This warranty is part of the license agreement.
@c See the file LICENSE for the copying conditions.
EXCEPT AS OTHERWISE RESTRICTED BY LAW, THIS WORK IS PROVIDED
WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES OF ANY KIND, INCLUDING
BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF FITNESS FOR A
......
......@@ -2477,6 +2477,7 @@ Make.rules
Makefile
controls/Makefile
debugger/Makefile
documentation/Makefile
files/Makefile
graphics/Makefile
graphics/metafiledrv/Makefile
......@@ -2595,6 +2596,7 @@ CONFIG_FILES=\${CONFIG_FILES-"Make.rules
Makefile
controls/Makefile
debugger/Makefile
documentation/Makefile
files/Makefile
graphics/Makefile
graphics/metafiledrv/Makefile
......
......@@ -38,7 +38,7 @@ AC_PROG_YACC
AC_PROG_LEX
AC_PROG_RANLIB
AC_PROG_INSTALL
dnl Check for -li386 for NetBSD
dnl Check for -li386 for NetBSD and OpenBSD
AC_CHECK_LIB(i386,i386_set_ldt,LDLIBS="$LDLIBS -li386")
dnl **** Check for gcc strength-reduce bug ****
......@@ -119,6 +119,7 @@ Make.rules
Makefile
controls/Makefile
debugger/Makefile
documentation/Makefile
files/Makefile
graphics/Makefile
graphics/metafiledrv/Makefile
......
......@@ -1462,8 +1462,8 @@ static void EDIT_MoveHome(WND *wnd, EDITSTATE *es, BOOL32 extend)
e = EDIT_CharFromPos(wnd, es, 0x80000000,
HIWORD(EDIT_EM_PosFromChar(wnd, es, es->selection_end, es->flags & EF_AFTER_WRAP)), NULL);
else
e = lstrlen32A(es->text);
EDIT_EM_SetSel(wnd, es, extend ? es->selection_start : e, e, FALSE);
e = 0;
EDIT_EM_SetSel(wnd, es, e, extend ? es->selection_start : e, FALSE);
EDIT_EM_ScrollCaret(wnd, es);
}
......
......@@ -9,6 +9,7 @@
#include "windows.h"
#include "win.h"
#include "static.h"
#include "heap.h"
static void STATIC_PaintTextfn( WND *wndPtr, HDC32 hdc );
static void STATIC_PaintRectfn( WND *wndPtr, HDC32 hdc );
......@@ -65,9 +66,36 @@ static HICON16 STATIC_SetIcon( WND *wndPtr, HICON16 hicon )
/***********************************************************************
* STATIC_LoadIcon
*
* Load the icon for an SS_ICON control.
*/
static HICON16 STATIC_LoadIcon( WND *wndPtr, LPCSTR name )
{
HICON16 hicon;
if (wndPtr->flags & WIN_ISWIN32)
{
hicon = LoadIcon32A( wndPtr->hInstance, name );
if (!hicon) /* Try OEM icon (FIXME: is this right?) */
hicon = LoadIcon32A( 0, name );
}
else
{
LPSTR segname = SEGPTR_STRDUP(name);
hicon = LoadIcon16( wndPtr->hInstance, SEGPTR_GET(segname) );
if (!hicon) /* Try OEM icon (FIXME: is this right?) */
hicon = LoadIcon32A( 0, segname );
SEGPTR_FREE(segname);
}
return hicon;
}
/***********************************************************************
* StaticWndProc
*/
LRESULT StaticWndProc( HWND16 hWnd, UINT16 uMsg, WPARAM16 wParam,
LRESULT StaticWndProc( HWND32 hWnd, UINT32 uMsg, WPARAM32 wParam,
LPARAM lParam )
{
LRESULT lResult = 0;
......@@ -77,120 +105,115 @@ LRESULT StaticWndProc( HWND16 hWnd, UINT16 uMsg, WPARAM16 wParam,
switch (uMsg)
{
case WM_ENABLE:
InvalidateRect32( hWnd, NULL, FALSE );
break;
case WM_NCCREATE:
if (style == SS_ICON)
{
CREATESTRUCT16 *cs = (CREATESTRUCT16 *)PTR_SEG_TO_LIN(lParam);
if (cs->lpszName)
{
HICON16 hicon = LoadIcon16( cs->hInstance, cs->lpszName );
if (!hicon) /* Try OEM icon (FIXME: is this right?) */
hicon = LoadIcon16( 0, cs->lpszName );
STATIC_SetIcon( wndPtr, hicon );
}
return 1;
}
return DefWindowProc16(hWnd, uMsg, wParam, lParam);
case WM_CREATE:
if (style < 0L || style > LAST_STATIC_TYPE)
{
fprintf( stderr, "STATIC: Unknown style 0x%02lx\n", style );
lResult = -1L;
break;
}
/* initialise colours */
color_windowframe = GetSysColor32(COLOR_WINDOWFRAME);
color_background = GetSysColor32(COLOR_BACKGROUND);
color_window = GetSysColor32(COLOR_WINDOW);
break;
case WM_NCDESTROY:
if (style == SS_ICON)
DestroyIcon32( STATIC_SetIcon( wndPtr, 0 ) );
else
lResult = DefWindowProc16(hWnd, uMsg, wParam, lParam);
case WM_NCCREATE:
if (style == SS_ICON)
{
CREATESTRUCT32A *cs = (CREATESTRUCT32A *)lParam;
if (cs->lpszName)
STATIC_SetIcon( wndPtr,
STATIC_LoadIcon( wndPtr, cs->lpszName ));
return 1;
}
return DefWindowProc32A( hWnd, uMsg, wParam, lParam );
case WM_CREATE:
if (style < 0L || style > LAST_STATIC_TYPE)
{
fprintf( stderr, "STATIC: Unknown style 0x%02lx\n", style );
lResult = -1L;
break;
}
/* initialise colours */
color_windowframe = GetSysColor32(COLOR_WINDOWFRAME);
color_background = GetSysColor32(COLOR_BACKGROUND);
color_window = GetSysColor32(COLOR_WINDOW);
break;
case WM_NCDESTROY:
if (style == SS_ICON)
DestroyIcon32( STATIC_SetIcon( wndPtr, 0 ) );
else
lResult = DefWindowProc32A( hWnd, uMsg, wParam, lParam );
break;
case WM_PAINT:
{
PAINTSTRUCT32 ps;
BeginPaint32( hWnd, &ps );
if (staticPaintFunc[style])
(staticPaintFunc[style])( wndPtr, ps.hdc );
EndPaint32( hWnd, &ps );
}
break;
case WM_ENABLE:
InvalidateRect32( hWnd, NULL, FALSE );
break;
case WM_SYSCOLORCHANGE:
color_windowframe = GetSysColor32(COLOR_WINDOWFRAME);
color_background = GetSysColor32(COLOR_BACKGROUND);
color_window = GetSysColor32(COLOR_WINDOW);
InvalidateRect32( hWnd, NULL, TRUE );
break;
case WM_SETTEXT:
if (style == SS_ICON)
/* FIXME : should we also return the previous hIcon here ??? */
STATIC_SetIcon( wndPtr, STATIC_LoadIcon( wndPtr, (LPCSTR)lParam ));
else
DEFWND_SetText( wndPtr, (LPCSTR)lParam );
InvalidateRect32( hWnd, NULL, FALSE );
UpdateWindow32( hWnd );
break;
case WM_SETFONT:
if (style == SS_ICON) return 0;
infoPtr->hFont = (HFONT16)wParam;
if (LOWORD(lParam))
{
InvalidateRect32( hWnd, NULL, FALSE );
UpdateWindow32( hWnd );
}
break;
case WM_PAINT:
{
PAINTSTRUCT16 ps;
BeginPaint16( hWnd, &ps );
if (staticPaintFunc[style])
(staticPaintFunc[style])( wndPtr, ps.hdc );
EndPaint16( hWnd, &ps );
}
break;
case WM_SYSCOLORCHANGE:
color_windowframe = GetSysColor32(COLOR_WINDOWFRAME);
color_background = GetSysColor32(COLOR_BACKGROUND);
color_window = GetSysColor32(COLOR_WINDOW);
InvalidateRect32( hWnd, NULL, TRUE );
break;
case WM_SETTEXT:
if (style == SS_ICON)
/* FIXME : should we also return the previous hIcon here ??? */
STATIC_SetIcon( wndPtr, LoadIcon16( wndPtr->hInstance,
(SEGPTR)lParam ));
else
DEFWND_SetText( wndPtr, (LPSTR)PTR_SEG_TO_LIN(lParam) );
InvalidateRect32( hWnd, NULL, FALSE );
UpdateWindow32( hWnd );
break;
case WM_SETFONT:
if (style == SS_ICON) return 0;
infoPtr->hFont = (HFONT16)wParam;
if (LOWORD(lParam))
{
InvalidateRect32( hWnd, NULL, FALSE );
UpdateWindow32( hWnd );
}
break;
case WM_GETFONT:
return infoPtr->hFont;
case WM_NCHITTEST:
return HTTRANSPARENT;
case WM_GETFONT:
return infoPtr->hFont;
case WM_GETDLGCODE:
return DLGC_STATIC;
case WM_NCHITTEST:
return HTTRANSPARENT;
case STM_GETICON:
return infoPtr->hIcon;
case WM_GETDLGCODE:
return DLGC_STATIC;
case STM_SETICON:
lResult = STATIC_SetIcon( wndPtr, (HICON16)wParam );
InvalidateRect32( hWnd, NULL, FALSE );
UpdateWindow32( hWnd );
break;
case STM_GETICON:
return infoPtr->hIcon;
default:
lResult = DefWindowProc16(hWnd, uMsg, wParam, lParam);
break;
}
case STM_SETICON:
lResult = STATIC_SetIcon( wndPtr, (HICON16)wParam );
InvalidateRect32( hWnd, NULL, FALSE );
UpdateWindow32( hWnd );
break;
return lResult;
default:
lResult = DefWindowProc32A(hWnd, uMsg, wParam, lParam);
break;
}
return lResult;
}
static void STATIC_PaintTextfn( WND *wndPtr, HDC32 hdc )
{
RECT16 rc;
HBRUSH16 hBrush;
RECT32 rc;
HBRUSH32 hBrush;
WORD wFormat;
LONG style = wndPtr->dwStyle;
STATICINFO *infoPtr = (STATICINFO *)wndPtr->wExtra;
GetClientRect16( wndPtr->hwndSelf, &rc);
GetClientRect32( wndPtr->hwndSelf, &rc);
switch (style & 0x0000000F)
{
......@@ -225,42 +248,42 @@ static void STATIC_PaintTextfn( WND *wndPtr, HDC32 hdc )
hBrush = SendMessage32A( GetParent32(wndPtr->hwndSelf), WM_CTLCOLORSTATIC,
hdc, wndPtr->hwndSelf );
if (!hBrush) hBrush = GetStockObject32(WHITE_BRUSH);
FillRect16(hdc, &rc, hBrush);
if (wndPtr->text) DrawText16( hdc, wndPtr->text, -1, &rc, wFormat );
FillRect32( hdc, &rc, hBrush );
if (wndPtr->text) DrawText32A( hdc, wndPtr->text, -1, &rc, wFormat );
}
static void STATIC_PaintRectfn( WND *wndPtr, HDC32 hdc )
{
RECT16 rc;
RECT32 rc;
HBRUSH32 hBrush;
GetClientRect16( wndPtr->hwndSelf, &rc);
GetClientRect32( wndPtr->hwndSelf, &rc);
switch (wndPtr->dwStyle & 0x0f)
{
case SS_BLACKRECT:
hBrush = CreateSolidBrush32(color_windowframe);
FillRect16( hdc, &rc, hBrush );
FillRect32( hdc, &rc, hBrush );
break;
case SS_GRAYRECT:
hBrush = CreateSolidBrush32(color_background);
FillRect16( hdc, &rc, hBrush );
FillRect32( hdc, &rc, hBrush );
break;
case SS_WHITERECT:
hBrush = CreateSolidBrush32(color_window);
FillRect16( hdc, &rc, hBrush );
FillRect32( hdc, &rc, hBrush );
break;
case SS_BLACKFRAME:
hBrush = CreateSolidBrush32(color_windowframe);
FrameRect16( hdc, &rc, hBrush );
FrameRect32( hdc, &rc, hBrush );
break;
case SS_GRAYFRAME:
hBrush = CreateSolidBrush32(color_background);
FrameRect16( hdc, &rc, hBrush );
FrameRect32( hdc, &rc, hBrush );
break;
case SS_WHITEFRAME:
hBrush = CreateSolidBrush32(color_window);
FrameRect16( hdc, &rc, hBrush );
FrameRect32( hdc, &rc, hBrush );
break;
default:
return;
......
......@@ -48,8 +48,6 @@ typedef struct
static const BUILTIN_CLASS_INFO16 WIDGETS_BuiltinClasses16[] =
{
{ CS_GLOBALCLASS | CS_PARENTDC,
sizeof(STATICINFO), 0, "StaticWndProc", "Static" },
{ CS_GLOBALCLASS, sizeof(MDICLIENTINFO),
STOCK_LTGRAY_BRUSH, "MDIClientWndProc", "MDIClient" }
};
......@@ -77,8 +75,11 @@ static WNDCLASS32A WIDGETS_BuiltinClasses32[BIC32_NB_CLASSES] =
{ CS_GLOBALCLASS | CS_DBLCLKS | CS_SAVEBITS,
ComboLBWndProc, 0, sizeof(void *), 0, 0, IDC_ARROW, 0, 0, "ComboLBox" },
/* BIC32_POPUPMENU */
{ CS_GLOBALCLASS | CS_SAVEBITS, PopupMenuWndProc,
0, sizeof(HMENU32), 0, 0, IDC_ARROW, NULL_BRUSH, 0, POPUPMENU_CLASS_NAME },
{ CS_GLOBALCLASS | CS_SAVEBITS, PopupMenuWndProc, 0,
sizeof(HMENU32), 0, 0, IDC_ARROW, NULL_BRUSH, 0, POPUPMENU_CLASS_NAME },
/* BIC32_STATIC */
{ CS_GLOBALCLASS | CS_PARENTDC, StaticWndProc,
0, sizeof(STATICINFO), 0, 0, IDC_ARROW, 0, 0, "Static" },
/* BIC32_SCROLL */
{ CS_GLOBALCLASS | CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC,
ScrollBarWndProc, 0, sizeof(SCROLLBAR_INFO), 0, 0, IDC_ARROW, 0, 0, "ScrollBar"},
......
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = none
SOURCES = \
wine.texinfo \
$(TOPSRCDIR)/AUTHORS \
$(TOPSRCDIR)/LICENSE \
$(TOPSRCDIR)/WARRANTY
all: wine.info
@MAKE_RULES@
wine.info: $(SOURCES)
makeinfo -I$(TOPSRCDIR) $(SRCDIR)/wine.texinfo
wine.dvi: $(SOURCES)
texi2dvi $(SRCDIR)/wine.texinfo
clean::
$(RM) wine.aux wine.cp wine.cps wine.dvi wine.fn wine.fns wine.info \
wine.ky wine.log wine.pg wine.toc wine.tp wine.tps wine.vr
### Dependencies:
Win95 interface code is being introduced.
Instead of compiling Wine for Win3.1 vs. Win95 using #define switches,
the code now looks in a special [Tweaks.Layout] section of wine.conf
for a "Win95Look=true" entry.
A few new sections and a number of entries have been added to the
wine.conf file -- these are for debugging the Win95 tweaks only and may
be removed in a future release! These entries/sections are:
[Tweak.Fonts]
System.Height=<point size> # Sets the height of the system typeface
System.Bold=[true|false] # Whether the system font should be boldfaced
System.Italic=[true|false] # Whether the system font should be italicized
System.Underline=[true|false] # Whether the system font should be underlined
System.StrikeOut=[true|false] # Whether the system font should be struck out
OEMFixed.xxx # Same parameters for the OEM fixed typeface
AnsiFixed.xxx # Same parameters for the Ansi fixed typeface
AnsiVar.xxx # Same parameters for the Ansi variable typeface
SystemFixed.xxx # Same parameters for the System fixed typeface
[Tweak.Layout]
Win95Look=[true|false] # Enables/disables the Win95 look and feel
MenuHeight=<pixels> # Sets the height of the menu bar
MenuBarItemTopNudge=<pixels> # Nudges the menu bar items down/up
MenuBarItemLeftNudge=<pixels> # Nudges the menu bar items left/right
MenuItemTopNudge=<pixels> # Nudges the menu items down/up
MenuItemLeftNudge=<pixels> # Nudges the menu items left/right
MenuHighlightTopNudge=<pixels> # Nudges the top of the highlight bar
MenuHighlightLeftNudge=<pixels> # Nudges the left side of the highlight bar
MenuHighlightRightNudge=<pixels> # Nudges the right side of the highlight bar
MenuHighlightBottomNudge=<pixels> # Nudges the bottom of the highlight bar
CaptionHeight=<pixels> # Sets the height of window captions
CaptionLeftNudge=<pixels> # Nudges the caption text of windows down/up
CaptionTopNudge=<pixels> # Nudges the caption text of windows left/right
CaptionAlignment=[left|right|center] # Sets the alignment of caption text
SysControlNudge=<pixels> # Nudges the system menu left/right
MaxControlNudge=<pixels> # Nudges the maximize control left/right
MinControlNudge=<pixels> # Nudges the minimize control left/right
ScrollBarWidth=<pixels> # Sets scroll bar sizes
DialogFrameWidth=<pixels> # Sets the frame width of dialog boxes
[Tweak.Colors]
PenFF95.Red=<0-255> # Sets the red value of the Win95 white pen
PenFF95.Grn=<0-255> # Sets the green value of the Win95 white pen
PenFF95.Blu=<0-255> # Sets the blue value of the Win95 white pen
PenE095.xxx # Sets the RGB values of the Win95 grey-88 pen
PenC095.xxx # Sets the RGB values of the Win95 grey-75 pen
Pen8095.xxx # Sets the RGB values of the Win95 grey-50 pen
Pen0095.xxx # Sets the RGB values of the Win95 black pen
......@@ -1202,16 +1202,121 @@ BOOL32 FindClose32( HANDLE32 handle )
*
* Convert a Unix time to FILETIME format.
* The FILETIME structure is a 64-bit value representing the number of
* 100-nanosecond intervals since January 1, 1601.
* 'remainder' is the fraction of 100-ns intervals smaller than 1 second
* that couldn't be stored in the time_t value.
* 100-nanosecond intervals since January 1, 1601, 0:00.
* 'remainder' is the nonnegative number of 100-ns intervals
* corresponding to the time fraction smaller than 1 second that
* couldn't be stored in the time_t value.
*/
void DOSFS_UnixTimeToFileTime( time_t unix_time, FILETIME *filetime,
DWORD remainder )
{
/* FIXME :-) */
filetime->dwLowDateTime = unix_time;
filetime->dwHighDateTime = 0;
/* NOTES:
CONSTANTS:
The time difference between 1 January 1601, 00:00:00 and
1 January 1970, 00:00:00 is 369 years, plus the leap years
from 1604 to 1968, excluding 1700, 1800, 1900.
This makes (1968 - 1600) / 4 - 3 = 89 leap days, and a total
of 134774 days.
Any day in that period had 24 * 60 * 60 = 86400 seconds.
The time difference is 134774 * 86400 * 10000000, which can be written
116444736000000000
27111902 * 2^32 + 3577643008
413 * 2^48 + 45534 * 2^32 + 54590 * 2^16 + 32768
If you find that these constants are buggy, please change them in all
instances in both conversion functions.
VERSIONS:
There are two versions, one of them uses long long variables and
is presumably faster but not ISO C. The other one uses standard C
data types and operations but relies on the assumption that negative
numbers are stored as 2's complement (-1 is 0xffff....). If this
assumption is violated, dates before 1970 will not convert correctly.
This should however work on any reasonable architecture where WINE
will run.
DETAILS:
Take care not to remove the casts. I have tested these functions
(in both versions) for a lot of numbers. I would be interested in
results on other compilers than GCC.
The operations have been designed to account for the possibility
of 64-bit time_t in future UNICES. Even the versions without
internal long long numbers will work if time_t only is 64 bit.
A 32-bit shift, which was necessary for that operation, turned out
not to work correctly in GCC, besides giving the warning. So I
used a double 16-bit shift instead. Numbers are in the ISO version
represented by three limbs, the most significant with 32 bit, the
other two with 16 bit each.
As the modulo-operator % is not well-defined for negative numbers,
negative divisors have been avoided in DOSFS_FileTimeToUnixTime.
There might be quicker ways to do this in C. Certainly so in
assembler.
Claus Fischer, fischer@iue.tuwien.ac.at
*/
#if __GNUC__
# define USE_LONG_LONG 1
#else
# define USE_LONG_LONG 0
#endif
#if USE_LONG_LONG /* gcc supports long long type */
long long int t = unix_time;
t *= 10000000;
t += 116444736000000000LL;
t += remainder;
filetime->dwLowDateTime = (UINT32)t;
filetime->dwHighDateTime = (UINT32)(t >> 32);
#else /* ISO version */
UINT32 a0; /* 16 bit, low bits */
UINT32 a1; /* 16 bit, medium bits */
UINT32 a2; /* 32 bit, high bits */
/* Copy the unix time to a2/a1/a0 */
a0 = unix_time & 0xffff;
a1 = (unix_time >> 16) & 0xffff;
/* This is obsolete if unix_time is only 32 bits, but it does not hurt.
Do not replace this by >> 32, it gives a compiler warning and it does
not work. */
a2 = (unix_time >= 0 ? (unix_time >> 16) >> 16 :
~((~unix_time >> 16) >> 16));
/* Multiply a by 10000000 (a = a2/a1/a0)
Split the factor into 10000 * 1000 which are both less than 0xffff. */
a0 *= 10000;
a1 = a1 * 10000 + (a0 >> 16);
a2 = a2 * 10000 + (a1 >> 16);
a0 &= 0xffff;
a1 &= 0xffff;
a0 *= 1000;
a1 = a1 * 1000 + (a0 >> 16);
a2 = a2 * 1000 + (a1 >> 16);
a0 &= 0xffff;
a1 &= 0xffff;
/* Add the time difference and the remainder */
a0 += 32768 + (remainder & 0xffff);
a1 += 54590 + (remainder >> 16 ) + (a0 >> 16);
a2 += 27111902 + (a1 >> 16);
a0 &= 0xffff;
a1 &= 0xffff;
/* Set filetime */
filetime->dwLowDateTime = (a1 << 16) + a0;
filetime->dwHighDateTime = a2;
#endif
}
......@@ -1219,13 +1324,95 @@ void DOSFS_UnixTimeToFileTime( time_t unix_time, FILETIME *filetime,
* DOSFS_FileTimeToUnixTime
*
* Convert a FILETIME format to Unix time.
* If not NULL, 'remainder' contains the fractional part of the filetime.
* If not NULL, 'remainder' contains the fractional part of the filetime,
* in the range of [0..9999999] (even if time_t is negative).
*/
time_t DOSFS_FileTimeToUnixTime( const FILETIME *filetime, DWORD *remainder )
{
/* FIXME :-) */
if (remainder) *remainder = 0;
return filetime->dwLowDateTime;
/* Read the comment in the function DOSFS_UnixTimeToFileTime. */
#if USE_LONG_LONG
long long int t = filetime->dwHighDateTime;
t <<= 32;
t += (UINT32)filetime->dwLowDateTime;
t -= 116444736000000000LL;
if (t < 0)
{
if (remainder) *remainder = 9999999 - (-t - 1) % 10000000;
return -1 - ((-t - 1) / 10000000);
}
else
{
if (remainder) *remainder = t % 10000000;
return t / 10000000;
}
#else /* ISO version */
UINT32 a0; /* 16 bit, low bits */
UINT32 a1; /* 16 bit, medium bits */
UINT32 a2; /* 32 bit, high bits */
UINT32 r; /* remainder of division */
unsigned int carry; /* carry bit for subtraction */
int negative; /* whether a represents a negative value */
/* Copy the time values to a2/a1/a0 */
a2 = (UINT32)filetime->dwHighDateTime;
a1 = ((UINT32)filetime->dwLowDateTime ) >> 16;
a0 = ((UINT32)filetime->dwLowDateTime ) & 0xffff;
/* Subtract the time difference */
if (a0 >= 32768 ) a0 -= 32768 , carry = 0;
else a0 += (1 << 16) - 32768 , carry = 1;
if (a1 >= 54590 + carry) a1 -= 54590 + carry, carry = 0;
else a1 += (1 << 16) - 54590 - carry, carry = 1;
a2 -= 27111902 + carry;
/* If a is negative, replace a by (-1-a) */
negative = (a2 >= ((UINT32)1) << 31);
if (negative)
{
/* Set a to -a - 1 (a is a2/a1/a0) */
a0 = 0xffff - a0;
a1 = 0xffff - a1;
a2 = ~a2;
}
/* Divide a by 10000000 (a = a2/a1/a0), put the rest into r.
Split the divisor into 10000 * 1000 which are both less than 0xffff. */
a1 += (a2 % 10000) << 16;
a2 /= 10000;
a0 += (a1 % 10000) << 16;
a1 /= 10000;
r = a0 % 10000;
a0 /= 10000;
a1 += (a2 % 1000) << 16;
a2 /= 1000;
a0 += (a1 % 1000) << 16;
a1 /= 1000;
r += (a0 % 1000) * 10000;
a0 /= 1000;
/* If a was negative, replace a by (-1-a) and r by (9999999 - r) */
if (negative)
{
/* Set a to -a - 1 (a is a2/a1/a0) */
a0 = 0xffff - a0;
a1 = 0xffff - a1;
a2 = ~a2;
r = 9999999 - r;
}
if (remainder) *remainder = r;
/* Do not replace this by << 32, it gives a compiler warning and it does
not work. */
return ((((time_t)a2) << 16) << 16) + (a1 << 16) + a0;
#endif
}
......
......@@ -14,7 +14,7 @@
#if defined(__linux__) || defined(sun) || defined(hpux)
#include <sys/vfs.h>
#endif
#if defined(__NetBSD__) || defined(__FreeBSD__)
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
#include <sys/param.h>
#include <sys/mount.h>
#include <sys/errno.h>
......
......@@ -604,6 +604,118 @@ int PROFILE_GetWineIniInt( const char *section, const char *key_name, int def )
}
/******************************************************************************
*
* int PROFILE_EnumerateWineIniSection(
* char const *section, // Name of the section to enumerate
* void (*cbfn)(char const *key, char const *value, void *user),
// Address of the callback function
* void *user ) // User-specified pointer.
*
* For each entry in a section in the wine.conf file, this function will
* call the specified callback function, informing it of each key and
* value. An optional user pointer may be passed to it (if this is not
* needed, pass NULL through it and ignore the value in the callback
* function).
*
* The callback function must accept three parameters:
* The name of the key (char const *)
* The value of the key (char const *)
* A user-specified parameter (void *)
* Note that the first two are char CONST *'s, not char *'s! The callback
* MUST not modify these strings!
*
* The return value indicates the number of times the callback function
* was called.
*/
int PROFILE_EnumerateWineIniSection(
char const *section,
void (*cbfn)(char const *, char const *, void *),
void *userptr )
{
PROFILESECTION *scansect;
PROFILEKEY *scankey;
int calls = 0;
/* Search for the correct section */
for(scansect = WineProfile; scansect; scansect = scansect->next) {
if(scansect->name && !lstrcmpi32A(scansect->name, section)) {
/* Enumerate each key with the callback */
for(scankey = scansect->key; scankey; scankey = scankey->next) {
/* Ignore blank entries -- these shouldn't exist, but let's
be extra careful */
if(scankey->name[0]) {
cbfn(scankey->name, scankey->value, userptr);
++calls;
}
}
break;
}
}
return calls;
}
/******************************************************************************
*
* int PROFILE_GetWineIniBool(
* char const *section,
* char const *key_name,
* int def )
*
* Reads a boolean value from the wine.ini file. This function attempts to
* be user-friendly by accepting 'n', 'N' (no), 'f', 'F' (false), or '0'
* (zero) for false, 'y', 'Y' (yes), 't', 'T' (true), or '1' (one) for
* true. Anything else results in the return of the default value.
*
* This function uses 1 to indicate true, and 0 for false. You can check
* for existence by setting def to something other than 0 or 1 and
* examining the return value.
*/
int PROFILE_GetWineIniBool(
char const *section,
char const *key_name,
int def )
{
char key_value[2];
int retval;
PROFILE_GetWineIniString(section, key_name, "~", key_value, 2);
switch(key_value[0]) {
case 'n':
case 'N':
case 'f':
case 'F':
case '0':
retval = 0;
break;
case 'y':
case 'Y':
case 't':
case 'T':
case '1':
retval = 1;
break;
default:
retval = def;
}
dprintf_profile(stddeb, "PROFILE_GetWineIniBool(\"%s\", \"%s\", %s), "
"[%c], ret %s.\n", section, key_name,
def ? "TRUE" : "FALSE", key_value[0],
retval ? "TRUE" : "FALSE");
return retval;
}
/***********************************************************************
* PROFILE_LoadWineIni
*
......
......@@ -43,10 +43,10 @@ type win16
42 return DisableDos 0 0
45 pascal16 LoadModule(str ptr) LoadModule16
46 pascal16 FreeModule(word) FreeModule16
47 pascal16 GetModuleHandle(segptr) WIN16_GetModuleHandle
47 pascal16 GetModuleHandle(segstr) WIN16_GetModuleHandle
48 pascal16 GetModuleUsage(word) GetModuleUsage
49 pascal16 GetModuleFileName(word ptr s_word) GetModuleFileName16
50 pascal GetProcAddress(word segptr) GetProcAddress16
50 pascal GetProcAddress(word segstr) GetProcAddress16
51 pascal MakeProcInstance(segptr word) MakeProcInstance16
52 pascal16 FreeProcInstance(segptr) FreeProcInstance16
53 stub CallProcInstance
......@@ -56,17 +56,17 @@ type win16
57 pascal16 GetProfileInt(str str s_word) GetProfileInt16
58 pascal16 GetProfileString(str str str ptr word) GetProfileString16
59 pascal16 WriteProfileString(str str str) WriteProfileString16
60 pascal16 FindResource(word segptr segptr) FindResource16
60 pascal16 FindResource(word segstr segstr) FindResource16
61 pascal16 LoadResource(word word) LoadResource16
62 pascal LockResource(word) WIN16_LockResource16
63 pascal16 FreeResource(word) FreeResource16
64 pascal16 AccessResource(word word) AccessResource16
65 pascal SizeofResource(word word) SizeofResource16
66 pascal16 AllocResource(word word long) AllocResource16
67 pascal SetResourceHandler(word segptr ptr) SetResourceHandler
67 pascal SetResourceHandler(word segstr ptr) SetResourceHandler
68 pascal16 InitAtomTable(word) InitAtomTable16
69 pascal16 FindAtom(segptr) FindAtom16
70 pascal16 AddAtom(segptr) AddAtom16
69 pascal16 FindAtom(segstr) FindAtom16
70 pascal16 AddAtom(segstr) AddAtom16
71 pascal16 DeleteAtom(word) DeleteAtom16
72 pascal16 GetAtomName(word ptr word) GetAtomName16
73 pascal16 GetAtomHandle(word) GetAtomHandle
......@@ -85,7 +85,7 @@ type win16
86 pascal16 _lwrite(word ptr word) _lwrite16
87 pascal16 RESERVED5(str str) lstrcmp16
88 pascal lstrcpy(segptr str) lstrcpy16
89 pascal lstrcat(segptr str) lstrcat16
89 pascal lstrcat(segstr str) lstrcat16
90 pascal16 lstrlen(str) lstrlen16
91 register InitTask() InitTask
92 pascal GetTempDrive(byte) WIN16_GetTempDrive
......@@ -268,7 +268,7 @@ type win16
349 pascal _hread(word segptr long) WIN16_hread
350 pascal _hwrite(word ptr long) _hwrite16
#351 BUNNY_351
352 pascal lstrcatn(segptr str word) lstrcatn16
352 pascal lstrcatn(segstr str word) lstrcatn16
353 pascal lstrcpyn(segptr str word) lstrcpyn16
354 pascal GetAppCompatFlags(word) GetAppCompatFlags16
355 pascal16 GetWinDebugInfo(ptr word) GetWinDebugInfo
......
......@@ -325,7 +325,7 @@ base 1
338 stdcall GetLargestConsoleWindowSize(long) GetLargestConsoleWindowSize
339 stdcall GetLastError() GetLastError
340 stdcall GetLocalTime(ptr) GetLocalTime
341 stdcall GetLocaleInfoA(long long ptr long) GetLocaleInfoA
341 stdcall GetLocaleInfoA(long long ptr long) GetLocaleInfo32A
342 stdcall GetLocaleInfoW(long long ptr long) GetLocaleInfo32W
343 stdcall GetLogicalDriveStringsA(long ptr) GetLogicalDriveStrings32A
344 stdcall GetLogicalDriveStringsW(long ptr) GetLogicalDriveStrings32W
......@@ -513,8 +513,8 @@ base 1
526 stub Module32First
527 stub Module32Next
528 stdcall MoveFileA(ptr ptr) MoveFile32A
529 stub MoveFileExA
530 stub MoveFileExW
529 stdcall MoveFileExA(ptr ptr long) MoveFileEx32A
530 stdcall MoveFileExW(ptr ptr long) MoveFileEx32W
531 stdcall MoveFileW(ptr ptr) MoveFile32W
532 stdcall MulDiv(long long long) MulDiv32
533 stdcall MultiByteToWideChar(long long ptr long ptr long) MultiByteToWideChar
......
......@@ -5,8 +5,8 @@ type win16
#2 pascal Enable
#3 pascal Disable
4 pascal16 ToAscii(word word ptr ptr word) ToAscii16
5 pascal16 AnsiToOem(ptr ptr) AnsiToOem16
6 pascal16 OemToAnsi(ptr ptr) OemToAnsi16
5 pascal16 AnsiToOem(str ptr) AnsiToOem16
6 pascal16 OemToAnsi(str ptr) OemToAnsi16
7 return SetSpeed 2 65535
#100 pascal ScreenSwitchEnable
#126 pascal GetTableSeg
......
......@@ -95,7 +95,7 @@ type win16
606 pascal timeEndPeriod(word) timeEndPeriod
607 pascal timeGetTime() timeGetTime
701 pascal MCISENDCOMMAND(word word long long) mciSendCommand
702 pascal MCISENDSTRING(ptr ptr word word) mciSendString
702 pascal MCISENDSTRING(str ptr word word) mciSendString
703 pascal MCIGETDEVICEID(ptr) mciGetDeviceID
706 pascal MCIGETERRORSTRING(long ptr word) mciGetErrorString
#900 pascal MMTASKCREATE
......@@ -103,7 +103,7 @@ type win16
#903 pascal MMTASKSIGNAL
#904 pascal MMGETCURRENTTASK
#905 pascal MMTASKYIELD
1100 pascal DRVOPEN(ptr ptr long) DrvOpen
1100 pascal DRVOPEN(str str long) DrvOpen
1101 pascal DRVCLOSE(word long long) DrvClose
1102 pascal DRVSENDMESSAGE(word word long long) DrvSendMessage
1103 pascal DRVGETMODULEHANDLE(word) DrvGetModuleHandle
......
......@@ -5,7 +5,7 @@ type win16
2 pascal GetSystemDefaultLCID() GetSystemDefaultLCID
3 pascal GetUserDefaultLangID() GetUserDefaultLangID
4 pascal GetSystemDefaultLangID() GetSystemDefaultLangID
5 pascal GetLocaleInfoA(long long ptr word) GetLocaleInfoA
5 pascal GetLocaleInfoA(long long ptr word) GetLocaleInfo16
6 stub LCMAPSTRINGA
7 pascal16 GetStringTypeA(long long ptr word ptr) GetStringType16
8 pascal16 CompareStringA(long long ptr word ptr word) CompareString16
......
......@@ -4,6 +4,7 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include "windows.h"
#include "winnt.h"
#include "global.h"
......@@ -83,6 +84,7 @@ void RELAY_DebugCallFrom16( int func_type, char *args,
case 'l':
case 'p':
case 't':
case 'T':
args16 += 4;
break;
}
......@@ -103,16 +105,20 @@ void RELAY_DebugCallFrom16( int func_type, char *args,
break;
case 't':
args16 -= 4;
printf( "0x%08x", *(int *)args16 );
if (HIWORD(*(int *)args16))
printf( "0x%08x \"%s\"", *(int *)args16,
(char *)PTR_SEG_TO_LIN(*(int *)args16) );
else
printf( "0x%08x", *(int *)args16 );
printf( " \"%s\"", (char *)PTR_SEG_TO_LIN(*(int *)args16) );
break;
case 'p':
args16 -= 4;
printf( "%04x:%04x", *(WORD *)(args16+2), *(WORD *)args16 );
break;
case 'T':
args16 -= 4;
printf( "%04x:%04x", *(WORD *)(args16+2), *(WORD *)args16 );
if (HIWORD(*(int *)args16))
printf( " \"%s\"", (char *)PTR_SEG_TO_LIN(*(int *)args16) );
break;
}
args++;
if (*args) printf( "," );
......@@ -341,11 +347,11 @@ INT16 Catch( LPCATCHBUF lpbuf )
*/
/* FIXME: we need to save %si and %di */
lpbuf[0] = IF1632_Saved16_sp;
lpbuf[0] = OFFSETOF(IF1632_Saved16_ss_sp);
lpbuf[1] = LOWORD(IF1632_Saved32_esp);
lpbuf[2] = HIWORD(IF1632_Saved32_esp);
lpbuf[3] = pFrame->saved_ss;
lpbuf[4] = pFrame->saved_sp;
lpbuf[3] = LOWORD(pFrame->saved_ss_sp);
lpbuf[4] = HIWORD(pFrame->saved_ss_sp);
lpbuf[5] = pFrame->ds;
lpbuf[6] = pFrame->bp;
lpbuf[7] = pFrame->ip;
......@@ -362,16 +368,16 @@ INT16 Throw( LPCATCHBUF lpbuf, INT16 retval )
STACK16FRAME *pFrame;
WORD es = CURRENT_STACK16->es;
IF1632_Saved16_sp = lpbuf[0] - sizeof(WORD);
IF1632_Saved16_ss_sp = MAKELONG( lpbuf[0] - sizeof(WORD),
HIWORD(IF1632_Saved16_ss_sp) );
IF1632_Saved32_esp = MAKELONG( lpbuf[1], lpbuf[2] );
pFrame = CURRENT_STACK16;
pFrame->saved_ss = lpbuf[3];
pFrame->saved_sp = lpbuf[4];
pFrame->ds = lpbuf[5];
pFrame->bp = lpbuf[6];
pFrame->ip = lpbuf[7];
pFrame->cs = lpbuf[8];
pFrame->es = es;
pFrame->saved_ss_sp = MAKELONG( lpbuf[3], lpbuf[4] );
pFrame->ds = lpbuf[5];
pFrame->bp = lpbuf[6];
pFrame->ip = lpbuf[7];
pFrame->cs = lpbuf[8];
pFrame->es = es;
if (debugging_relay) /* Make sure we have a valid entry point address */
{
static FARPROC16 entryPoint = NULL;
......@@ -402,10 +408,10 @@ WIN16_CallProc32W() {
args = (DWORD*)xmalloc(sizeof(DWORD)*nrofargs);
for (i=nrofargs;i--;) {
if (argconvmask & (1<<i)) {
args[nrofargs-i] = (DWORD)PTR_SEG_TO_LIN(win_stack[3+i]);
args[nrofargs-i-1] = (DWORD)PTR_SEG_TO_LIN(win_stack[3+i]);
fprintf(stderr,"%08lx(%p),",win_stack[3+i],PTR_SEG_TO_LIN(win_stack[3+i]));
} else {
args[nrofargs-i] = win_stack[3+i];
args[nrofargs-i-1] = win_stack[3+i];
fprintf(stderr,"%ld,",win_stack[3+i]);
}
}
......@@ -436,7 +442,7 @@ WIN16_CallProc32W() {
* overwrite the top WORD on the return stack)
*/
memcpy(&stf16,CURRENT_STACK16,sizeof(stf16)-2);
IF1632_Saved16_sp += (3+nrofargs)*sizeof(DWORD);
IF1632_Saved16_ss_sp += (3+nrofargs)*sizeof(DWORD);
memcpy(CURRENT_STACK16,&stf16,sizeof(stf16)-2);
fprintf(stderr,"returns %08lx\n",ret);
......
......@@ -2,125 +2,132 @@ name shell32
type win32
base 1
0000 stub CheckEscapesA
0001 stub CheckEscapesW
0002 stdcall CommandLineToArgvW(ptr ptr) CommandLineToArgvW
0003 stub Control_FillCache_RunDLL
0004 stub Control_RunDLL
0005 stub DllGetClassObject
0006 stub DoEnvironmentSubstA
0007 stub DoEnvironmentSubstW
0008 stdcall DragAcceptFiles(long long) DragAcceptFiles
0009 stub DragFinish
0010 stub DragQueryFile
0011 stub DragQueryFileA
0012 stub DragQueryFileAorW
0013 stub DragQueryFileW
0014 stub DragQueryPoint
0015 stub DuplicateIcon
0016 stub ExtractAssociatedIconA
0017 stub ExtractAssociatedIconExA
0018 stub ExtractAssociatedIconExW
0019 stub ExtractAssociatedIconW
0020 stub ExtractIconA
0021 stub ExtractIconEx
0022 stub ExtractIconExA
0023 stub ExtractIconExW
0024 stub ExtractIconResInfoA
0025 stub ExtractIconResInfoW
0026 stub ExtractIconW
0027 stub ExtractVersionResource16W
0028 stub FindExeDlgProc
0029 stub FindExecutableA
0030 stub FindExecutableW
0031 return FreeIconList 4 0
0032 stub InternalExtractIconListA
0033 stub InternalExtractIconListW
0034 stub OpenAs_RunDLL
0035 stub PrintersGetCommand_RunDLL
0036 stub RealShellExecuteA
0037 stub RealShellExecuteExA
0038 stub RealShellExecuteExW
0039 stub RealShellExecuteW
0040 stub RegenerateUserEnvironment
0041 stub RegisterShellHook
0042 stub SHAddToRecentDocs
0043 stub SHAppBarMessage
0044 stub SHBrowseForFolder
0045 stub SHBrowseForFolderA
0046 stub SHBrowseForFolderW
0047 stub SHChangeNotify
0048 stub SHFileOperation
0049 stub SHFileOperationA
0050 stub SHFileOperationW
0051 stub SHFormatDrive
0052 stub SHFreeNameMappings
0053 stub SHGetDesktopFolder
0054 stdcall SHGetFileInfo(ptr long ptr long long) SHGetFileInfo32A
0055 stdcall SHGetFileInfoA(ptr long ptr long long) SHGetFileInfo32A
0056 stub SHGetFileInfoW
0057 stub SHGetInstanceExplorer
0058 stub SHGetMalloc
0059 stub SHGetPathFromIDList
0060 stub SHGetPathFromIDListA
0061 stub SHGetPathFromIDListW
0062 stub SHGetSpecialFolderLocation
0063 stub SHHelpShortcuts_RunDLL
0064 stub SHLoadInProc
0065 stub SheChangeDirA
0066 stub SheChangeDirExA
0067 stub SheChangeDirExW
0068 stub SheChangeDirW
0069 stub SheConvertPathW
0070 stub SheFullPathA
0071 stub SheFullPathW
0072 stub SheGetCurDrive
0073 stub SheGetDirA
0074 stub SheGetDirExW
0075 stub SheGetDirW
0076 stub SheGetPathOffsetW
0077 stub SheRemoveQuotesA
0078 stub SheRemoveQuotesW
0079 stub SheSetCurDrive
0080 stub SheShortenPathA
0081 stub SheShortenPathW
0082 stdcall ShellAboutA(long ptr ptr long) ShellAbout32A
0083 stdcall ShellAboutW(long ptr ptr long) ShellAbout32W
0084 stdcall ShellExecuteA(long ptr ptr ptr ptr long) ShellExecute32A
0085 stub ShellExecuteEx
0086 stub ShellExecuteExA
0087 stub ShellExecuteExW
0088 stub ShellExecuteW
0089 stub ShellHookProc
0090 stub Shell_NotifyIcon
0091 stub Shell_NotifyIconA
0092 stub Shell_NotifyIconW
0093 stub StrChrA
0094 stub StrChrIA
0095 stub StrChrIW
0096 stub StrChrW
0097 stub StrCmpNA
0098 stub StrCmpNIA
0099 stub StrCmpNIW
0100 stub StrCmpNW
0101 stub StrCpyNA
0102 stub StrCpyNW
0103 stub StrNCmpA
0104 stub StrNCmpIA
0105 stub StrNCmpIW
0106 stub StrNCmpW
0107 stub StrNCpyA
0108 stub StrNCpyW
0109 stub StrRChrA
0110 stub StrRChrIA
0111 stub StrRChrIW
0112 stub StrRChrW
0113 stub StrRStrA
0114 stub StrRStrIA
0115 stub StrRStrIW
0116 stub StrRStrW
0117 stub StrStrA
0118 stub StrStrIA
0119 stub StrStrIW
0120 stub StrStrW
0121 stub WOWShellExecute
# Functions exported by the Win95 shell32.dll
# (these need to have these exact ordinals, for some win95 dlls
# import shell32.dll by ordinal)
1 stub CheckEscapesA
4 stub CheckEscapesW
5 stdcall CommandLineToArgvW(ptr ptr) CommandLineToArgvW
6 stub Control_FillCache_RunDLL
10 stub Control_RunDLL
12 stub DllGetClassObject
20 stub DoEnvironmentSubstA
36 stub DoEnvironmentSubstW
39 stdcall DragAcceptFiles(long long) DragAcceptFiles
40 stub DragFinish
42 stub DragQueryFile
48 stub DragQueryFileA
51 stub DragQueryFileAorW
52 stub DragQueryFileW
74 stub DragQueryPoint
78 stub DuplicateIcon
80 stub ExtractAssociatedIconA
99 stub ExtractAssociatedIconExA
122 stub ExtractAssociatedIconExW
123 stub ExtractAssociatedIconW
131 stub ExtractIconA
133 stub ExtractIconEx
136 stub ExtractIconExA
146 stub ExtractIconResInfoA
148 stub ExtractIconResInfoW
178 stub ExtractIconW
180 stub ExtractVersionResource16W
184 stub FindExecutableA
185 stub FindExecutableW
186 return FreeIconList 4 0
187 stub InternalExtractIconListA
188 stub InternalExtractIconListW
189 stub OpenAs_RunDLL
190 stub PrintersGetCommand_RunDLL
191 stub RealShellExecuteA
192 stub RealShellExecuteExA
201 stub RealShellExecuteExW
202 stub RealShellExecuteW
203 stub RegenerateUserEnvironment
204 stub SHAddToRecentDocs
205 stub SHAppBarMessage
206 stub SHBrowseForFolder
207 stub SHBrowseForFolderA
208 stub SHChangeNotify
209 stub SHFileOperation
210 stub SHFileOperationA
211 stub SHFormatDrive
212 stub SHFreeNameMappings
213 stub SHGetDataFromIDListA
214 stub SHGetDesktopFolder
215 stdcall SHGetFileInfo(ptr long ptr long long) SHGetFileInfo32A
216 stdcall SHGetFileInfoA(ptr long ptr long long) SHGetFileInfo32A
217 stub SHGetInstanceExplorer
218 stub SHGetMalloc
219 stub SHGetPathFromIDList
220 stub SHGetPathFromIDListA
221 stub SHGetSpecialFolderLocation
222 stub SHHelpShortcuts_RunDLL
223 stub SHLoadInProc
224 stub SheChangeDirA
225 stub SheChangeDirExA
226 stub SheChangeDirExW
227 stub SheChangeDirW
228 stub SheConvertPathW
229 stub SheFullPathA
230 stub SheFullPathW
231 stub SheGetCurDrive
232 stub SheGetDirA
233 stub SheGetDirExW
234 stub SheGetDirW
235 stub SheGetPathOffsetW
236 stub SheRemoveQuotesA
237 stub SheRemoveQuotesW
238 stub SheSetCurDrive
239 stub SheShortenPathA
240 stub SheShortenPathW
241 stdcall ShellAboutA(long ptr ptr long) ShellAbout32A
242 stdcall ShellAboutW(long ptr ptr long) ShellAbout32W
243 stdcall ShellExecuteA(long ptr ptr ptr ptr long) ShellExecute32A
244 stub ShellExecuteEx
245 stub ShellExecuteExA
246 stub ShellExecuteW
247 stub Shell_NotifyIcon
248 stub Shell_NotifyIconA
249 stub Shl1632_ThunkData32
250 stub Shl3216_ThunkData32
1023 stub ExtractIconExW # proper ordinal unknown
1028 stub FindExeDlgProc # proper ordinal unknown
1041 stub RegisterShellHook # proper ordinal unknown
1046 stub SHBrowseForFolderW # proper ordinal unknown
1050 stub SHFileOperationW # proper ordinal unknown
1056 stub SHGetFileInfoW # proper ordinal unknown
1061 stub SHGetPathFromIDListW # proper ordinal unknown
1087 stub ShellExecuteExW # proper ordinal unknown
1089 stub ShellHookProc # proper ordinal unknown
1092 stub Shell_NotifyIconW # proper ordinal unknown
1093 stub StrChrA # proper ordinal unknown
1094 stub StrChrIA # proper ordinal unknown
1095 stub StrChrIW # proper ordinal unknown
1096 stub StrChrW # proper ordinal unknown
1097 stub StrCmpNA # proper ordinal unknown
1098 stub StrCmpNIA # proper ordinal unknown
1099 stub StrCmpNIW # proper ordinal unknown
1100 stub StrCmpNW # proper ordinal unknown
1101 stub StrCpyNA # proper ordinal unknown
1102 stub StrCpyNW # proper ordinal unknown
1103 stub StrNCmpA # proper ordinal unknown
1104 stub StrNCmpIA # proper ordinal unknown
1105 stub StrNCmpIW # proper ordinal unknown
1106 stub StrNCmpW # proper ordinal unknown
1107 stub StrNCpyA # proper ordinal unknown
1108 stub StrNCpyW # proper ordinal unknown
1109 stub StrRChrA # proper ordinal unknown
1110 stub StrRChrIA # proper ordinal unknown
1111 stub StrRChrIW # proper ordinal unknown
1112 stub StrRChrW # proper ordinal unknown
1113 stub StrRStrA # proper ordinal unknown
1114 stub StrRStrIA # proper ordinal unknown
1115 stub StrRStrIW # proper ordinal unknown
1116 stub StrRStrW # proper ordinal unknown
1117 stub StrStrA # proper ordinal unknown
1118 stub StrStrIA # proper ordinal unknown
1119 stub StrStrIW # proper ordinal unknown
1120 stub StrStrW # proper ordinal unknown
1121 stub WOWShellExecute # proper ordinal unknown
......@@ -125,8 +125,7 @@ static LRESULT THUNK_CallWndProc16( WNDPROC16 proc, HWND16 hwnd, UINT16 msg,
MAKELONG( cs->y, cs->x ), MAKELONG( cs->cy, cs->cx ),
MAKELONG( cs->hMenu, cs->hwndParent ), cs->hInstance,
(LONG)cs->lpCreateParams, hwnd, msg, wParam,
MAKELONG( IF1632_Saved16_sp-sizeof(CREATESTRUCT16),
IF1632_Saved16_ss ) );
IF1632_Saved16_ss_sp - sizeof(CREATESTRUCT16) );
}
return CallTo16_long_wwwl( (FARPROC16)proc, hwnd, msg, wParam, lParam );
}
......
......@@ -36,7 +36,7 @@ heap 65520
34 pascal16 EnableWindow(word word) EnableWindow16
35 pascal16 IsWindowEnabled(word) IsWindowEnabled16
36 pascal16 GetWindowText(word segptr word) GetWindowText16
37 pascal16 SetWindowText(word segptr) SetWindowText16
37 pascal16 SetWindowText(word segstr) SetWindowText16
38 pascal16 GetWindowTextLength(word) GetWindowTextLength16
39 pascal16 BeginPaint(word ptr) BeginPaint16
40 pascal16 EndPaint(word ptr) EndPaint16
......@@ -50,7 +50,7 @@ heap 65520
47 pascal16 IsWindow(word) IsWindow16
48 pascal16 IsChild(word word) IsChild16
49 pascal16 IsWindowVisible(word) IsWindowVisible16
50 pascal16 FindWindow(segptr str) FindWindow16
50 pascal16 FindWindow(segstr str) FindWindow16
#51 BEAR51
52 pascal16 AnyPopup() AnyPopup16
53 pascal16 DestroyWindow(word) DestroyWindow16
......@@ -86,12 +86,12 @@ heap 65520
83 pascal16 FrameRect(word ptr word) FrameRect16
84 pascal16 DrawIcon(word s_word s_word word) DrawIcon16
85 pascal16 DrawText(word ptr s_word ptr word) DrawText16
87 pascal16 DialogBox(word segptr word segptr) DialogBox16
87 pascal16 DialogBox(word segstr word segptr) DialogBox16
88 pascal16 EndDialog(word s_word) EndDialog16
89 pascal16 CreateDialog(word segptr word segptr) CreateDialog16
89 pascal16 CreateDialog(word segstr word segptr) CreateDialog16
90 pascal16 IsDialogMessage(word ptr) IsDialogMessage16
91 pascal16 GetDlgItem(word word) GetDlgItem16
92 pascal16 SetDlgItemText(word word segptr) SetDlgItemText16
92 pascal16 SetDlgItemText(word word segstr) SetDlgItemText16
93 pascal16 GetDlgItemText(word word segptr word) GetDlgItemText16
94 pascal16 SetDlgItemInt(word word word word) SetDlgItemInt16
95 pascal16 GetDlgItemInt(word s_word ptr word) GetDlgItemInt16
......@@ -116,7 +116,7 @@ heap 65520
114 pascal DispatchMessage(ptr) DispatchMessage16
115 pascal16 ReplyMessage(long) ReplyMessage16
116 pascal16 PostAppMessage(word word word long) PostAppMessage16
118 pascal16 RegisterWindowMessage(segptr) RegisterWindowMessage16
118 pascal16 RegisterWindowMessage(segstr) RegisterWindowMessage16
117 pascal16 WindowFromDC(word) WindowFromDC16
119 pascal GetMessagePos() GetMessagePos
120 pascal GetMessageTime() GetMessageTime
......@@ -149,10 +149,10 @@ heap 65520
147 pascal16 SetClipboardViewer(word) SetClipboardViewer16
148 pascal16 GetClipboardViewer() GetClipboardViewer16
149 pascal16 ChangeClipboardChain(word ptr) ChangeClipboardChain16
150 pascal16 LoadMenu(word segptr) LoadMenu16
150 pascal16 LoadMenu(word segstr) LoadMenu16
151 pascal16 CreateMenu() CreateMenu16
152 pascal16 DestroyMenu(word) DestroyMenu16
153 pascal16 ChangeMenu(word word segptr word word) ChangeMenu16
153 pascal16 ChangeMenu(word word segstr word word) ChangeMenu16
154 pascal16 CheckMenuItem(word word word) CheckMenuItem16
155 pascal16 EnableMenuItem(word word word) EnableMenuItem16
156 pascal16 GetSystemMenu(word word) GetSystemMenu16
......@@ -172,11 +172,11 @@ heap 65520
170 pascal16 ArrangeIconicWindows(word) ArrangeIconicWindows16
171 pascal16 WinHelp(word str word long) WinHelp16
172 pascal16 SwitchToThisWindow(word word) SwitchToThisWindow16
173 pascal16 LoadCursor(word segptr) LoadCursor16
174 pascal16 LoadIcon(word segptr) LoadIcon16
175 pascal16 LoadBitmap(word segptr) LoadBitmap16
173 pascal16 LoadCursor(word segstr) LoadCursor16
174 pascal16 LoadIcon(word segstr) LoadIcon16
175 pascal16 LoadBitmap(word segstr) LoadBitmap16
176 pascal16 LoadString(word word ptr s_word) LoadString16
177 pascal16 LoadAccelerators(word segptr) LoadAccelerators16
177 pascal16 LoadAccelerators(word segstr) LoadAccelerators16
178 pascal16 TranslateAccelerator(word word ptr) TranslateAccelerator16
179 pascal16 GetSystemMetrics(s_word) GetSystemMetrics16
180 pascal GetSysColor(word) GetSysColor16
......@@ -239,16 +239,16 @@ heap 65520
236 pascal16 GetCapture() GetCapture16
237 pascal16 GetUpdateRgn(word word word) GetUpdateRgn16
238 pascal16 ExcludeUpdateRgn(word word) ExcludeUpdateRgn16
239 pascal16 DialogBoxParam(word segptr word segptr long) DialogBoxParam16
239 pascal16 DialogBoxParam(word segstr word segptr long) DialogBoxParam16
240 pascal16 DialogBoxIndirectParam(word word word segptr long)
DialogBoxIndirectParam16
241 pascal16 CreateDialogParam(word segptr word segptr long) CreateDialogParam16
241 pascal16 CreateDialogParam(word segstr word segptr long) CreateDialogParam16
242 pascal16 CreateDialogIndirectParam(word ptr word segptr long)
CreateDialogIndirectParam16
243 pascal GetDialogBaseUnits() GetDialogBaseUnits
244 pascal16 EqualRect(ptr ptr) EqualRect16
245 stub EnableCommNotification
246 stub ExitWindowsExec
246 pascal16 ExitWindowsExec(str str) ExitWindowsExec16
247 pascal16 GetCursor() GetCursor16
248 pascal16 GetOpenClipboardWindow() GetOpenClipboardWindow16
249 pascal16 GetAsyncKeyState(word) GetAsyncKeyState16
......@@ -271,9 +271,9 @@ heap 65520
265 pascal16 ShowOwnedPopups(word word) ShowOwnedPopups16
266 pascal16 SetMessageQueue(word) SetMessageQueue16
267 pascal16 ShowScrollBar(word word word) ShowScrollBar16
268 pascal16 GlobalAddAtom(segptr) GlobalAddAtom16
268 pascal16 GlobalAddAtom(segstr) GlobalAddAtom16
269 pascal16 GlobalDeleteAtom(word) GlobalDeleteAtom
270 pascal16 GlobalFindAtom(segptr) GlobalFindAtom16
270 pascal16 GlobalFindAtom(segstr) GlobalFindAtom16
271 pascal16 GlobalGetAtomName(word ptr s_word) GlobalGetAtomName16
272 pascal16 IsZoomed(word) IsZoomed16
273 stub ControlPanelInfo
......@@ -350,12 +350,12 @@ heap 65520
394 stub DrawIconEx
395 stub GetIconInfo
397 pascal16 RegisterClassEx(ptr) RegisterClassEx16
398 pascal16 GetClassInfoEx(word segptr ptr) GetClassInfoEx16
398 pascal16 GetClassInfoEx(word segstr ptr) GetClassInfoEx16
399 stub ChildWindowFromPointEx
400 stub FinalUserInit
402 pascal16 GetPriorityClipboardFormat(word ptr s_word) GetPriorityClipboardFormat16
403 pascal16 UnregisterClass(segptr word) UnregisterClass16
404 pascal16 GetClassInfo(word segptr ptr) GetClassInfo16
403 pascal16 UnregisterClass(segstr word) UnregisterClass16
404 pascal16 GetClassInfo(word segstr ptr) GetClassInfo16
406 pascal16 CreateCursor(word word word word word ptr ptr) CreateCursor16
407 pascal16 CreateIcon(word word word word word ptr ptr) CreateIcon16
408 pascal16 CreateCursorIconIndirect(word ptr ptr ptr)
......@@ -374,18 +374,18 @@ heap 65520
421 pascal16 wvsprintf(ptr ptr ptr) wvsprintf16
422 pascal16 DlgDirSelectEx(word ptr word word) DlgDirSelectEx16
423 pascal16 DlgDirSelectComboBoxEx(word ptr word word) DlgDirSelectComboBoxEx16
427 pascal16 FindWindowEx(word word segptr ptr) FindWindowEx16
427 pascal16 FindWindowEx(word word segstr str) FindWindowEx16
428 stub TileWindows
429 stub CascadeWindows
430 pascal16 lstrcmp(str str) lstrcmp16
431 pascal AnsiUpper(segptr) AnsiUpper16
432 pascal AnsiLower(segptr) AnsiLower16
431 pascal AnsiUpper(segstr) AnsiUpper16
432 pascal AnsiLower(segstr) AnsiLower16
433 pascal16 IsCharAlpha(byte) IsCharAlpha16
434 pascal16 IsCharAlphanumeric(byte) IsCharAlphanumeric16
435 pascal16 IsCharUpper(byte) IsCharUpper16
436 pascal16 IsCharLower(byte) IsCharLower16
437 pascal16 AnsiUpperBuff(str word) AnsiUpperBuff16
438 pascal16 AnsiLowerBuff(str word) AnsiLowerBuff16
437 pascal16 AnsiUpperBuff(ptr word) AnsiUpperBuff16
438 pascal16 AnsiLowerBuff(ptr word) AnsiLowerBuff16
441 stub InsertMenuItem
443 stub GetMenuItemInfo
445 pascal DefFrameProc(word word word word long) DefFrameProc16
......
......@@ -103,7 +103,7 @@ base 1
0096 return DdeDisconnect 4 0
0097 stub DdeDisconnectList
0098 stub DdeEnableCallback
0099 stub DdeFreeDataHandle
0099 return DdeFreeDataHandle 4 1
0100 return DdeFreeStringHandle 8 0
0101 stub DdeGetData
0102 return DdeGetLastError 4 0
......
......@@ -2,8 +2,6 @@ name wprocs
type win16
1 pascal WINPROC_CallProc16To32A(word word word long long) WINPROC_CallProc16To32A
2 pascal StaticWndProc(word word word long) StaticWndProc
3 pascal ScrollBarWndProc(word word word long) ScrollBarWndProc
10 pascal MDIClientWndProc(word word word long) MDIClientWndProc
14 pascal FileOpenDlgProc(word word word long) FileOpenDlgProc
15 pascal FileSaveDlgProc(word word word long) FileSaveDlgProc
......
......@@ -2,12 +2,12 @@ name wsock32
type win32
base 0
001 stub accept
002 stub bind
003 stub closesocket
004 stub connect
001 stdcall accept(long ptr ptr) WINSOCK_accept
002 stdcall bind(long ptr long) WINSOCK_bind
003 stdcall closesocket(long) WINSOCK_closesocket
004 stdcall connect(long ptr long) WINSOCK_connect
005 stub getpeername
006 stub getsockname
006 stdcall getsockname(long ptr ptr) WINSOCK_getsockname
007 stub getsockopt
008 stdcall htonl(long) WINSOCK_htonl
009 stdcall htons(long) WINSOCK_htons
......@@ -25,7 +25,7 @@ base 0
021 stub setsockopt
022 stub shutdown
023 stdcall socket(long long long) WINSOCK_socket
051 stdcall gethostbyaddr(ptr long long) gethostbyaddr
051 stdcall gethostbyaddr(ptr long long) WINSOCK_gethostbyaddr
052 stdcall gethostbyname(ptr) gethostbyname
053 stub getprotobyname
054 stub getprotobynumber
......
......@@ -60,6 +60,7 @@ extern int DIB_GetXImageWidthBytes( int width, int depth );
extern int DIB_BitmapInfoSize( BITMAPINFO * info, WORD coloruse );
/* objects/oembitmap.c */
extern BOOL32 OBM_Init(void);
extern HBITMAP16 OBM_LoadBitmap( WORD id );
extern HGLOBAL16 OBM_LoadCursorIcon( WORD id, BOOL32 fCursor );
......
......@@ -49,5 +49,7 @@ extern void DCE_Init(void);
extern DCE* DCE_AllocDCE( HWND32 hWnd, DCE_TYPE type );
extern void DCE_FreeDCE( DCE *dce );
extern INT16 DCE_ExcludeRgn( HDC32, WND*, HRGN32 );
extern HRGN32 DCE_GetVisRgn( HWND32, WORD );
extern BOOL32 DCE_InvalidateDCE( WND*, RECT32* );
#endif /* __WINE_DCE_H */
......@@ -79,6 +79,7 @@
#undef DEBUG_TEXT
#undef DEBUG_TIMER
#undef DEBUG_TOOLHELP
#undef DEBUG_TWEAK
#undef DEBUG_VER
#undef DEBUG_VIRTUAL
#undef DEBUG_VXD
......@@ -162,6 +163,7 @@
#define DEBUG_TEXT
#define DEBUG_TIMER
#define DEBUG_TOOLHELP
#define DEBUG_TWEAK
#define DEBUG_VER
#define DEBUG_VIRTUAL
#define DEBUG_VXD
......@@ -539,6 +541,11 @@ short debug_msg_enabled[]={
#else
0,
#endif
#ifdef DEBUG_TWEAK
1,
#else
0,
#endif
#ifdef DEBUG_VER
1,
#else
......@@ -1531,8 +1538,21 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_ver if(!debug_msg_enabled[73]) ; else fprintf
#define debugging_ver debug_msg_enabled[73]
#define dprintf_tweak if(!debug_msg_enabled[73]) ; else fprintf
#define debugging_tweak debug_msg_enabled[73]
#else
#ifdef DEBUG_TWEAK
#define dprintf_tweak fprintf
#define debugging_tweak 1
#else
#define dprintf_tweak while(0) fprintf
#define debugging_tweak 0
#endif
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_ver if(!debug_msg_enabled[74]) ; else fprintf
#define debugging_ver debug_msg_enabled[74]
#else
#ifdef DEBUG_VER
#define dprintf_ver fprintf
......@@ -1544,8 +1564,8 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_virtual if(!debug_msg_enabled[74]) ; else fprintf
#define debugging_virtual debug_msg_enabled[74]
#define dprintf_virtual if(!debug_msg_enabled[75]) ; else fprintf
#define debugging_virtual debug_msg_enabled[75]
#else
#ifdef DEBUG_VIRTUAL
#define dprintf_virtual fprintf
......@@ -1557,8 +1577,8 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_vxd if(!debug_msg_enabled[75]) ; else fprintf
#define debugging_vxd debug_msg_enabled[75]
#define dprintf_vxd if(!debug_msg_enabled[76]) ; else fprintf
#define debugging_vxd debug_msg_enabled[76]
#else
#ifdef DEBUG_VXD
#define dprintf_vxd fprintf
......@@ -1570,8 +1590,8 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_win if(!debug_msg_enabled[76]) ; else fprintf
#define debugging_win debug_msg_enabled[76]
#define dprintf_win if(!debug_msg_enabled[77]) ; else fprintf
#define debugging_win debug_msg_enabled[77]
#else
#ifdef DEBUG_WIN
#define dprintf_win fprintf
......@@ -1583,8 +1603,8 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_win16drv if(!debug_msg_enabled[77]) ; else fprintf
#define debugging_win16drv debug_msg_enabled[77]
#define dprintf_win16drv if(!debug_msg_enabled[78]) ; else fprintf
#define debugging_win16drv debug_msg_enabled[78]
#else
#ifdef DEBUG_WIN16DRV
#define dprintf_win16drv fprintf
......@@ -1596,8 +1616,8 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_win32 if(!debug_msg_enabled[78]) ; else fprintf
#define debugging_win32 debug_msg_enabled[78]
#define dprintf_win32 if(!debug_msg_enabled[79]) ; else fprintf
#define debugging_win32 debug_msg_enabled[79]
#else
#ifdef DEBUG_WIN32
#define dprintf_win32 fprintf
......@@ -1609,8 +1629,8 @@ extern short debug_msg_enabled[];
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_winsock if(!debug_msg_enabled[79]) ; else fprintf
#define debugging_winsock debug_msg_enabled[79]
#define dprintf_winsock if(!debug_msg_enabled[80]) ; else fprintf
#define debugging_winsock debug_msg_enabled[80]
#else
#ifdef DEBUG_WINSOCK
#define dprintf_winsock fprintf
......@@ -1698,6 +1718,7 @@ static char *debug_msg_name[] = {
"text",
"timer",
"toolhelp",
"tweak",
"ver",
"virtual",
"vxd",
......
......@@ -13,6 +13,10 @@
extern void GRAPH_DrawReliefRect( HDC32 hdc, const RECT32 *rect,
INT32 highlight_size, INT32 shadow_size,
BOOL32 pressed );
extern void GRAPH_DrawGenericReliefRect( HDC32 hdc, const RECT32 *rect,
INT32 highlight_size,
INT32 shadow_size, HBRUSH32 highlight,
HBRUSH32 shadow );
extern BOOL32 GRAPH_DrawLines( HDC32 hdc, LPPOINT32 pXY, INT32 N, HPEN32 hPen);
extern void GRAPH_DrawRectangle( HDC32 hdc, INT32 x, INT32 y,
INT32 width, INT32 height, HPEN32 hPen);
......
......@@ -14,8 +14,7 @@
typedef struct
{
WORD null; /* Always 0 */
WORD old_sp; /* Stack pointer; used by SwitchTaskTo() */
WORD old_ss; /* Stack segment; used by SwitchTaskTo() */
DWORD old_ss_sp WINE_PACKED; /* Stack pointer; used by SwitchTaskTo() */
WORD heap; /* Pointer to the local heap information (if any) */
WORD atomtable; /* Pointer to the local atom table (if any) */
WORD stacktop; /* Top of the stack */
......
......@@ -11,7 +11,7 @@
extern LONG NC_HandleNCPaint( HWND32 hwnd , HRGN32 clip);
extern LONG NC_HandleNCActivate( WND *pwnd, WPARAM16 wParam );
extern LONG NC_HandleNCCalcSize( WND *pWnd, RECT16 *winRect );
extern LONG NC_HandleNCCalcSize( WND *pWnd, RECT32 *winRect );
extern LONG NC_HandleNCHitTest( HWND32 hwnd, POINT16 pt );
extern LONG NC_HandleNCLButtonDown( HWND32 hwnd, WPARAM16 wParam,
LPARAM lParam );
......@@ -19,6 +19,7 @@ extern LONG NC_HandleNCLButtonDblClk( WND *pWnd, WPARAM16 wParam, LPARAM lParam)
extern LONG NC_HandleSysCommand( HWND32 hwnd, WPARAM16 wParam, POINT16 pt );
extern LONG NC_HandleSetCursor( HWND32 hwnd, WPARAM16 wParam, LPARAM lParam );
extern void NC_DrawSysButton( HWND32 hwnd, HDC32 hdc, BOOL32 down );
extern void NC_DrawSysButton95( HWND32 hwnd, HDC32 hdc, BOOL32 down );
extern BOOL32 NC_GetSysPopupPos( WND* wndPtr, RECT32* rect );
#endif /* __WINE_NONCLIENT_H */
......@@ -72,6 +72,12 @@ extern int PROFILE_GetWineIniString( const char *section, const char *key_name,
const char *def, char *buffer, int len );
extern int PROFILE_GetWineIniInt( const char *section, const char *key_name,
int def );
extern int PROFILE_EnumerateWineIniSection(
char const *section,
void (*callback)(char const *key, char const *name, void *user),
void *userptr );
extern int PROFILE_GetWineIniBool( char const *section, char const *key_name,
int def );
extern char* PROFILE_GetStringItem( char* );
#endif /* __WINE_OPTIONS_H */
......@@ -37,7 +37,7 @@ typedef struct tagMESSAGEQUEUE
DWORD GetMessagePosVal WINE_PACKED; /* 12 Value for GetMessagePos */
HQUEUE16 self; /* 16 Handle to self (was: reserved) */
DWORD GetMessageExtraInfoVal; /* 18 Value for GetMessageExtraInfo */
WORD reserved2; /* 1c Unknown */
WORD wParamHigh; /* 1c High word of wParam (was: reserved)*/
LPARAM lParam WINE_PACKED; /* 1e Next 4 values set by SendMessage */
WPARAM16 wParam; /* 22 */
UINT16 msg; /* 24 */
......@@ -72,6 +72,8 @@ typedef struct tagMESSAGEQUEUE
/* Queue flags */
#define QUEUE_FLAG_XEVENT 0x0001
#define QUEUE_SM_WIN32 0x0002 /* Currently sent message is Win32 */
#define QUEUE_SM_UNICODE 0x0004 /* Currently sent message is Unicode */
extern void QUEUE_DumpQueue( HQUEUE16 hQueue );
extern void QUEUE_WalkQueues(void);
......
......@@ -21,7 +21,7 @@ extern void SELECTOR_FreeBlock( WORD sel, WORD count );
#if defined(linux)
# define WINE_DATA_SELECTOR 0x2b
# define WINE_CODE_SELECTOR 0x23
#elif defined(__NetBSD__)
#elif defined(__NetBSD__) || defined(__OpenBSD__)
# define WINE_DATA_SELECTOR 0x1f
# define WINE_CODE_SELECTOR 0x17
#elif defined(__FreeBSD__)
......
......@@ -91,7 +91,8 @@ typedef struct _CONTEXT /* Note 1 */
#endif /* __EMX__ */
#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__) \
|| defined(__OpenBSD__)
#define EAX_sig(context) ((context)->sc_eax)
#define EBX_sig(context) ((context)->sc_ebx)
......@@ -121,7 +122,7 @@ typedef struct _CONTEXT /* Note 1 */
#define EIP_sig(context) (*((unsigned long*)&(context)->sc_eip))
#define ESP_sig(context) (*((unsigned long*)&(context)->sc_esp))
#endif /* linux || __NetBSD__ || __FreeBSD__ */
#endif /* linux || __NetBSD__ || __FreeBSD__ || __OpenBSD__ */
#if defined(__svr4__) || defined(_SCO_DS)
......
......@@ -15,8 +15,8 @@
/* 16-bit stack layout after CallFrom16() */
typedef struct
{
WORD saved_ss; /* saved previous 16-bit stack */
WORD saved_sp;
DWORD saved_ss_sp; /* saved previous 16-bit stack */
DWORD ebp; /* full 32-bit content of ebp */
WORD entry_ip; /* ip of entry point */
WORD ds; /* ds */
WORD entry_cs; /* cs of entry point */
......@@ -46,8 +46,7 @@ typedef struct
#pragma pack(4)
/* Saved 16-bit stack for current process (Win16 only) */
extern WORD IF1632_Saved16_ss;
extern WORD IF1632_Saved16_sp;
extern DWORD IF1632_Saved16_ss_sp;
/* Saved 32-bit stack for current process (Win16 only) */
extern DWORD IF1632_Saved32_esp;
......@@ -55,8 +54,7 @@ extern DWORD IF1632_Saved32_esp;
/* Original Unix stack */
extern DWORD IF1632_Original32_esp;
#define CURRENT_STACK16 \
((STACK16FRAME *)PTR_SEG_OFF_TO_LIN(IF1632_Saved16_ss,IF1632_Saved16_sp))
#define CURRENT_STACK16 ((STACK16FRAME *)PTR_SEG_TO_LIN(IF1632_Saved16_ss_sp))
#define CURRENT_DS (CURRENT_STACK16->ds)
......
......@@ -17,7 +17,7 @@ typedef struct
HICON16 hIcon; /* Icon handle for SS_ICON controls */
} STATICINFO;
extern LRESULT StaticWndProc( HWND16 hWnd, UINT16 uMsg, WPARAM16 wParam,
extern LRESULT StaticWndProc( HWND32 hWnd, UINT32 uMsg, WPARAM32 wParam,
LPARAM lParam );
#endif /* __WINE_STATIC_H */
......@@ -149,6 +149,7 @@
#undef DEBUG_TEXT
#undef DEBUG_TIMER
#undef DEBUG_TOOLHELP
#undef DEBUG_TWEAK
#undef DEBUG_VER
#undef DEBUG_VIRTUAL
#undef DEBUG_VXD
......@@ -232,6 +233,7 @@
#define DEBUG_TEXT
#define DEBUG_TIMER
#define DEBUG_TOOLHELP
#define DEBUG_TWEAK
#define DEBUG_VER
#define DEBUG_VIRTUAL
#define DEBUG_VXD
......
......@@ -11,16 +11,7 @@
/* Constant system metrics */
#ifdef WIN_95_LOOK
#define SYSMETRICS_CXVSCROLL 14
#define SYSMETRICS_CYHSCROLL 14
#else
#define SYSMETRICS_CXVSCROLL 16
#define SYSMETRICS_CYHSCROLL 16
#endif
#define SYSMETRICS_CYCAPTION 20
#define SYSMETRICS_CXBORDER 1
#define SYSMETRICS_CYBORDER 1
#if 0
#ifdef WIN_95_LOOK
#define SYSMETRICS_CXDLGFRAME 2
#define SYSMETRICS_CYDLGFRAME 2
......@@ -36,7 +27,6 @@
#define SYSMETRICS_CYICON 32
#define SYSMETRICS_CXCURSOR 32
#define SYSMETRICS_CYCURSOR 32
#define SYSMETRICS_CYMENU 18
#ifdef WIN_95_LOOK
#define SYSMETRICS_CYVSCROLL 14
#define SYSMETRICS_CXHSCROLL 14
......@@ -48,8 +38,6 @@
#define SYSMETRICS_CXMIN 100
#define SYSMETRICS_CYMIN 28
#endif
#define SYSMETRICS_CXSIZE 18
#define SYSMETRICS_CYSIZE 18
#ifdef WIN_95_LOOK
#define SYSMETRICS_CXMINTRACK 112
#define SYSMETRICS_CYMINTRACK 27
......@@ -57,20 +45,89 @@
#define SYSMETRICS_CXMINTRACK 100
#define SYSMETRICS_CYMINTRACK 28
#endif
#endif 0
/* Some non-constant system metrics */
#define SYSMETRICS_CXSCREEN sysMetrics[SM_CXSCREEN] /* 0 */
#define SYSMETRICS_CYSCREEN sysMetrics[SM_CYSCREEN] /* 1 */
#define SYSMETRICS_CXVSCROLL sysMetrics[SM_CXVSCROLL] /* 2 */
#define SYSMETRICS_CYHSCROLL sysMetrics[SM_CYHSCROLL] /* 3 */
#define SYSMETRICS_CYCAPTION sysMetrics[SM_CYCAPTION] /* 4 */
#define SYSMETRICS_CXBORDER sysMetrics[SM_CXBORDER] /* 5 */
#define SYSMETRICS_CYBORDER sysMetrics[SM_CYBORDER] /* 6 */
#define SYSMETRICS_CXDLGFRAME sysMetrics[SM_CXDLGFRAME] /* 7 */
#define SYSMETRICS_CYDLGFRAME sysMetrics[SM_CYDLGFRAME] /* 8 */
#define SYSMETRICS_CYVTHUMB sysMetrics[SM_CYVTHUMB] /* 9 */
#define SYSMETRICS_CXHTHUMB sysMetrics[SM_CXHTHUMB] /* 10 */
#define SYSMETRICS_CXICON sysMetrics[SM_CXICON] /* 11 */
#define SYSMETRICS_CYICON sysMetrics[SM_CYICON] /* 12 */
#define SYSMETRICS_CXCURSOR sysMetrics[SM_CXCURSOR] /* 13 */
#define SYSMETRICS_CYCURSOR sysMetrics[SM_CYCURSOR] /* 14 */
#define SYSMETRICS_CYMENU sysMetrics[SM_CYMENU] /* 15 */
#define SYSMETRICS_CXFULLSCREEN sysMetrics[SM_CXFULLSCREEN] /* 16 */
#define SYSMETRICS_CYFULLSCREEN sysMetrics[SM_CYFULLSCREEN] /* 17 */
#define SYSMETRICS_CYKANJIWINDOW sysMetrics[SM_CYKANJIWINDOW] /* 18 */
#define SYSMETRICS_MOUSEPRESENT sysMetrics[SM_MOUSEPRESENT] /* 19 */
#define SYSMETRICS_CYVSCROLL sysMetrics[SM_CYVSCROLL] /* 20 */
#define SYSMETRICS_CXHSCROLL sysMetrics[SM_CXHSCROLL] /* 21 */
#define SYSMETRICS_DEBUG sysMetrics[SM_DEBUG] /* 22 */
#define SYSMETRICS_SWAPBUTTON sysMetrics[SM_SWAPBUTTON] /* 23 */
#define SYSMETRICS_RESERVED1 sysMetrics[SM_RESERVED1] /* 24 */
#define SYSMETRICS_RESERVED2 sysMetrics[SM_RESERVED2] /* 25 */
#define SYSMETRICS_RESERVED3 sysMetrics[SM_RESERVED3] /* 26 */
#define SYSMETRICS_RESERVED4 sysMetrics[SM_RESERVED4] /* 27 */
#define SYSMETRICS_CXMIN sysMetrics[SM_CXMIN] /* 28 */
#define SYSMETRICS_CYMIN sysMetrics[SM_CYMIN] /* 29 */
#define SYSMETRICS_CXSIZE sysMetrics[SM_CXSIZE] /* 30 */
#define SYSMETRICS_CYSIZE sysMetrics[SM_CYSIZE] /* 31 */
#define SYSMETRICS_CXFRAME sysMetrics[SM_CXFRAME] /* 32 */
#define SYSMETRICS_CYFRAME sysMetrics[SM_CYFRAME] /* 33 */
#define SYSMETRICS_CXMINTRACK sysMetrics[SM_CXMINTRACK] /* 34 */
#define SYSMETRICS_CYMINTRACK sysMetrics[SM_CYMINTRACK] /* 35 */
#define SYSMETRICS_CXDOUBLECLK sysMetrics[SM_CXDOUBLECLK] /* 36 */
#define SYSMETRICS_CYDOUBLECLK sysMetrics[SM_CYDOUBLECLK] /* 37 */
#define SYSMETRICS_CXICONSPACING sysMetrics[SM_CXICONSPACING] /* 38 */
#define SYSMETRICS_CYICONSPACING sysMetrics[SM_CYICONSPACING] /* 39 */
#define SYSMETRICS_MENUDROPALIGNMENT sysMetrics[SM_MENUDROPALIGNMENT] /* 40 */
#define SYSMETRICS_PENWINDOWS sysMetrics[SM_PENWINDOWS] /* 41 */
#define SYSMETRICS_DBCSENABLED sysMetrics[SM_DBCSENABLED] /* 42 */
#define SYSMETRICS_CMOUSEBUTTONS sysMetrics[SM_CMOUSEBUTTONS] /* 43 */
#define SYSMETRICS_CXFIXEDFRAME sysMetrics[SM_CXDLGFRAME] /* win40 name change */
#define SYSMETRICS_CYFIXEDFRAME sysMetrics[SM_CYDLGFRAME] /* win40 name change */
#define SYSMETRICS_CXSIZEFRAME sysMetrics[SM_CXFRAME] /* win40 name change */
#define SYSMETRICS_CYSIZEFRAME sysMetrics[SM_CYFRAME] /* win40 name change */
#define SYSMETRICS_SECURE sysMetrics[SM_SECURE] /* 44 */
#define SYSMETRICS_CXEDGE sysMetrics[SM_CXEDGE] /* 45 */
#define SYSMETRICS_CYEDGE sysMetrics[SM_CYEDGE] /* 46 */
#define SYSMETRICS_CXMINSPACING sysMetrics[SM_CXMINSPACING] /* 47 */
#define SYSMETRICS_CYMINSPACING sysMetrics[SM_CYMINSPACING] /* 48 */
#define SYSMETRICS_CXSMICON sysMetrics[SM_CXSMICON] /* 49 */
#define SYSMETRICS_CYSMICON sysMetrics[SM_CYSMICON] /* 50 */
#define SYSMETRICS_CYSMCAPTION sysMetrics[SM_CYSMCAPTION] /* 51 */
#define SYSMETRICS_CXSMSIZE sysMetrics[SM_CXSMSIZE] /* 52 */
#define SYSMETRICS_CYSMSIZE sysMetrics[SM_CYSMSIZE] /* 53 */
#define SYSMETRICS_CXMENUSIZE sysMetrics[SM_CXMENUSIZE] /* 54 */
#define SYSMETRICS_CYMENUSIZE sysMetrics[SM_CYMENUSIZE] /* 55 */
#define SYSMETRICS_ARRANGE sysMetrics[SM_ARRANGE] /* 56 */
#define SYSMETRICS_CXMINIMIZED sysMetrics[SM_CXMINIMIZED] /* 57 */
#define SYSMETRICS_CYMINIMIZED sysMetrics[SM_CYMINIMIZED] /* 58 */
#define SYSMETRICS_CXMAXTRACK sysMetrics[SM_CXMAXTRACK] /* 59 */
#define SYSMETRICS_CYMAXTRACK sysMetrics[SM_CYMAXTRACK] /* 60 */
#define SYSMETRICS_CXMAXIMIZED sysMetrics[SM_CXMAXIMIZED] /* 61 */
#define SYSMETRICS_CYMAXIMIZED sysMetrics[SM_CYMAXIMIZED] /* 62 */
#define SYSMETRICS_NETWORK sysMetrics[SM_NETWORK] /* 63 */
#define SYSMETRICS_CLEANBOOT sysMetrics[SM_CLEANBOOT] /* 67 */
#define SYSMETRICS_CXDRAG sysMetrics[SM_CXDRAG] /* 68 */
#define SYSMETRICS_CYDRAG sysMetrics[SM_CYDRAG] /* 69 */
#define SYSMETRICS_SHOWSOUNDS sysMetrics[SM_SHOWSOUNDS] /* 70 */
/* Use the following instead of sysMetrics[SM_CXMENUCHECK] GetMenuCheckMarkDimensions()! */
#define SYSMETRICS_CXMENUCHECK sysMetrics[SM_CXMENUCHECK] /* 71 */
/* Some non-constant system metrics */
#define SYSMETRICS_CXSCREEN sysMetrics[SM_CXSCREEN]
#define SYSMETRICS_CYSCREEN sysMetrics[SM_CYSCREEN]
#define SYSMETRICS_CXFULLSCREEN sysMetrics[SM_CXFULLSCREEN]
#define SYSMETRICS_CYFULLSCREEN sysMetrics[SM_CYFULLSCREEN]
#define SYSMETRICS_SWAPBUTTON sysMetrics[SM_SWAPBUTTON]
#define SYSMETRICS_CXFRAME sysMetrics[SM_CXFRAME]
#define SYSMETRICS_CYFRAME sysMetrics[SM_CYFRAME]
#define SYSMETRICS_CXDOUBLECLK sysMetrics[SM_CXDOUBLECLK]
#define SYSMETRICS_CYDOUBLECLK sysMetrics[SM_CYDOUBLECLK]
#define SYSMETRICS_MENUDROPALIGNMENT sysMetrics[SM_MENUDROPALIGNMENT]
#define SYSMETRICS_CXICONSPACING sysMetrics[SM_CXICONSPACING]
#define SYSMETRICS_CYICONSPACING sysMetrics[SM_CYICONSPACING]
#define SYSMETRICS_CYMENUCHECK sysMetrics[SM_CYMENUCHECK] /* 72 */
#define SYSMETRICS_SLOWMACHINE sysMetrics[SM_SLOWMACHINE] /* 73 */
#define SYSMETRICS_MIDEASTENABLED sysMetrics[SM_MIDEASTENABLED] /* 74 */
#define SYSMETRICS_MOUSEWHEELPRESENT sysMetrics[SM_MOUSEWHEELPRESENT] /* 75 */
extern void SYSMETRICS_Init(void);
extern short sysMetrics[SM_CMETRICS+1];
......
......@@ -54,8 +54,7 @@ struct _THDB;
typedef struct
{
HTASK16 hNext; /* 00 Selector of next TDB */
WORD sp; /* 02 Stack pointer of task */
WORD ss; /* 04 Stack segment of task */
DWORD ss_sp WINE_PACKED; /* 02 Stack pointer of task */
WORD nEvents; /* 06 Events for this task */
INT16 priority; /* 08 Task priority, -32..15 */
WORD unused1; /* 0a */
......
/******************************************************************************
*
* Wine Windows 95 interface tweaks
*
* Copyright (c) 1997 Dave Cuthbert (dacut@ece.cmu.edu)
*
*****************************************************************************/
#if !defined(__WINE_TWEAK_H)
#define __WINE_TWEAK_H
#include "wintypes.h"
int TWEAK_Init();
int TWEAK_CheckConfiguration();
INT32 TWEAK_PartyMessageBox(LPCSTR, LPCSTR, DWORD);
void TWEAK_DrawReliefRect95(HDC32, RECT32 const *);
void TWEAK_DrawMenuSeparator95(HDC32, UINT32, UINT32, UINT32);
extern int TWEAK_Win95Look;
extern int TWEAK_WineInitialized;
extern HPEN32 TWEAK_PenFF95;
extern HPEN32 TWEAK_PenE095;
extern HPEN32 TWEAK_PenC095;
extern HPEN32 TWEAK_Pen8095;
extern HPEN32 TWEAK_Pen0095;
#endif /* __WINE_TWEAK_H */
......@@ -37,6 +37,7 @@ typedef enum
BIC32_COMBO,
BIC32_COMBOLB,
BIC32_POPUPMENU,
BIC32_STATIC,
BIC32_SCROLL,
BIC32_DESKTOP,
BIC32_DIALOG,
......@@ -61,8 +62,8 @@ typedef struct tagWND
DWORD dwMagic; /* Magic number (must be WND_MAGIC) */
HWND32 hwndSelf; /* Handle of this window */
HINSTANCE16 hInstance; /* Window hInstance (from CreateWindow) */
RECT16 rectClient; /* Client area rel. to parent client area */
RECT16 rectWindow; /* Whole window rel. to parent client area */
RECT32 rectClient; /* Client area rel. to parent client area */
RECT32 rectWindow; /* Whole window rel. to parent client area */
LPSTR text; /* Window text */
void *pVScroll; /* Vertical scroll-bar info */
void *pHScroll; /* Horizontal scroll-bar info */
......
......@@ -49,6 +49,10 @@
#define FILE_MAP_READ 0x00000004
#define FILE_MAP_ALL_ACCESS 0x000f001f
#define MOVEFILE_REPLACE_EXISTING 0x00000001
#define MOVEFILE_COPY_ALLOWED 0x00000002
#define MOVEFILE_DELAY_UNTIL_REBOOT 0x00000004
#define FS_CASE_SENSITIVE FILE_CASE_SENSITIVE_SEARCH
#define FS_CASE_IS_PRESERVED FILE_CASE_PRESERVED_NAMES
#define FS_UNICODE_STORED_ON_DISK FILE_UNICODE_ON_DISK
......
......@@ -1802,8 +1802,9 @@ DECL_WINELIB_TYPE(LPLOGPEN);
#define SM_CYMENUCHECK 72
#define SM_SLOWMACHINE 73
#define SM_MIDEASTENABLED 74
#define SM_MOUSEWHEELPRESENT 75
#define SM_CMETRICS 75
#define SM_CMETRICS 76
/* Device-independent bitmaps */
......@@ -1959,9 +1960,6 @@ typedef struct
} SECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
/* 64 bit number of 100 nanoseconds intervals since January 1, 1601 */
/* FIXME: currently dwLowDateTime is equivalent to the UNIX time(),
* and dwHighDateTime 0
*/
typedef struct
{
INT32 dwLowDateTime;
......@@ -5002,6 +5000,63 @@ typedef struct {
DWORD dwOptDataSize;
} NETCONNECTINFOSTRUCT,*LPNETCONNECTINFOSTRUCT;
typedef struct {
UINT16 cbSize;
INT16 iBorderWidth;
INT16 iScrollWidth;
INT16 iScrollHeight;
INT16 iCaptionWidth;
INT16 iCaptionHeight;
LOGFONT16 lfCaptionFont;
INT16 iSmCaptionWidth;
INT16 iSmCaptionHeight;
LOGFONT16 lfSmCaptionFont;
INT16 iMenuWidth;
INT16 iMenuHeight;
LOGFONT16 lfMenuFont;
LOGFONT16 lfStatusFont;
LOGFONT16 lfMessageFont;
} NONCLIENTMETRICS16,*LPNONCLIENTMETRICS16;
typedef struct {
UINT32 cbSize;
INT32 iBorderWidth;
INT32 iScrollWidth;
INT32 iScrollHeight;
INT32 iCaptionWidth;
INT32 iCaptionHeight;
LOGFONT32A lfCaptionFont;
INT32 iSmCaptionWidth;
INT32 iSmCaptionHeight;
LOGFONT32A lfSmCaptionFont;
INT32 iMenuWidth;
INT32 iMenuHeight;
LOGFONT32A lfMenuFont;
LOGFONT32A lfStatusFont;
LOGFONT32A lfMessageFont;
} NONCLIENTMETRICS32A,*LPNONCLIENTMETRICS32A;
typedef struct {
UINT32 cbSize;
INT32 iBorderWidth;
INT32 iScrollWidth;
INT32 iScrollHeight;
INT32 iCaptionWidth;
INT32 iCaptionHeight;
LOGFONT32W lfCaptionFont;
INT32 iSmCaptionWidth;
INT32 iSmCaptionHeight;
LOGFONT32W lfSmCaptionFont;
INT32 iMenuWidth;
INT32 iMenuHeight;
LOGFONT32W lfMenuFont;
LOGFONT32W lfStatusFont;
LOGFONT32W lfMessageFont;
} NONCLIENTMETRICS32W,*LPNONCLIENTMETRICS32W;
DECL_WINELIB_TYPE_AW(NONCLIENTMETRICS);
DECL_WINELIB_TYPE_AW(LPNONCLIENTMETRICS);
#pragma pack(4)
/* Declarations for functions that exist only in Win16 */
......@@ -5259,6 +5314,7 @@ BOOL32 IsDBCSLeadByteEx(UINT32,BYTE);
BOOL32 IsWindowUnicode(HWND32);
BOOL32 IsValidLocale(DWORD,DWORD);
BOOL32 LocalFileTimeToFileTime(const FILETIME*,LPFILETIME);
BOOL32 LockFile(HFILE32,DWORD,DWORD,DWORD,DWORD);
SEGPTR MapLS(LPVOID);
LPVOID MapSL(SEGPTR);
LPVOID MapViewOfFile(HANDLE32,DWORD,DWORD,DWORD,DWORD);
......@@ -5339,6 +5395,7 @@ BOOL32 TlsFree(DWORD);
LPVOID TlsGetValue(DWORD);
BOOL32 TlsSetValue(DWORD,LPVOID);
VOID UnMapLS(SEGPTR);
BOOL32 UnlockFile(HFILE32,DWORD,DWORD,DWORD,DWORD);
BOOL32 UnmapViewOfFile(LPVOID);
LPVOID VirtualAlloc(LPVOID,DWORD,DWORD,DWORD);
BOOL32 VirtualFree(LPVOID,DWORD,DWORD);
......@@ -6206,6 +6263,10 @@ HWND32 GetLastActivePopup32(HWND32);
UINT32 GetLogicalDriveStrings32A(UINT32,LPSTR);
UINT32 GetLogicalDriveStrings32W(UINT32,LPWSTR);
#define GetLogicalDriveStrings WINELIB_NAME_AW(GetLogicalDriveStrings)
INT16 GetLocaleInfo16(LCID,LCTYPE,LPSTR,INT16);
INT32 GetLocaleInfo32A(LCID,LCTYPE,LPSTR,INT32);
INT32 GetLocaleInfo32W(LCID,LCTYPE,LPWSTR,INT32);
#define GetLocaleInfo WINELIB_NAME_AW(GetLocaleInfo)
INT16 GetMapMode16(HDC16);
INT32 GetMapMode32(HDC32);
#define GetMapMode WINELIB_NAME(GetMapMode)
......
......@@ -21,6 +21,7 @@ extern int WIN32_LastError;
#define ERROR_OUTOFMEMORY 14
#define ERROR_NO_MORE_FILES 18
#define ERROR_SHARING_VIOLATION 32
#define ERROR_LOCK_VIOLATION 33
#define ERROR_DUP_NAME 52
#define ERROR_FILE_EXISTS 80
#define ERROR_INVALID_PARAMETER 87
......
......@@ -27,16 +27,17 @@ typedef struct
extern BOOL32 WINPOS_RedrawIconTitle( HWND32 hWnd );
extern BOOL32 WINPOS_ShowIconTitle( WND* pWnd, BOOL32 bShow );
extern void WINPOS_GetMinMaxInfo( WND* pWnd, POINT16 *maxSize, POINT16 *maxPos,
POINT16 *minTrack, POINT16 *maxTrack );
extern void WINPOS_GetMinMaxInfo( WND* pWnd, POINT32 *maxSize,
POINT32 *maxPos, POINT32 *minTrack,
POINT32 *maxTrack );
extern UINT16 WINPOS_MinMaximize( WND* pWnd, UINT16 cmd, LPRECT16 lpPos);
extern BOOL32 WINPOS_SetActiveWindow( HWND32 hWnd, BOOL32 fMouse,
BOOL32 fChangeFocus );
extern BOOL32 WINPOS_ChangeActiveWindow( HWND32 hwnd, BOOL32 mouseMsg );
extern LONG WINPOS_SendNCCalcSize( HWND32 hwnd, BOOL32 calcValidRect,
RECT16 *newWindowRect, RECT16 *oldWindowRect,
RECT16 *oldClientRect, SEGPTR winpos,
RECT16 *newClientRect );
extern LONG WINPOS_SendNCCalcSize(HWND32 hwnd, BOOL32 calcValidRect,
RECT32 *newWindowRect, RECT32 *oldWindowRect,
RECT32 *oldClientRect, WINDOWPOS32 *winpos,
RECT32 *newClientRect );
extern LONG WINPOS_HandleWindowPosChanging16(WND *wndPtr, WINDOWPOS16 *winpos);
extern LONG WINPOS_HandleWindowPosChanging32(WND *wndPtr, WINDOWPOS32 *winpos);
extern INT16 WINPOS_WindowFromPoint( WND* scopeWnd, POINT16 pt, WND **ppWnd );
......
......@@ -23,8 +23,11 @@
/* #define NDEBUG */
#if defined(linux) && !defined(NO_ASM)
#include <linux/version.h>
#if LINUX_VERSION_CODE <= 131328 /* Linux 2.1.x doesn't return values with clear_bit and set_bit */
#define HAS_BITOPS
#endif
#endif
#include <stdio.h>
......
......@@ -9,7 +9,7 @@
*/
#ifdef CONFIG_IPC
#if defined(__FreeBSD__) || defined(__NetBSD__)
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#define msgbuf mymsg
#endif
......
......@@ -9,7 +9,7 @@
* without (with the argument is the server).
***************************************************************************
*/
#if defined(__NetBSD__) || defined(__FreeBSD__)
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
#include <sys/syscall.h>
#include <sys/param.h>
#else
......@@ -59,7 +59,7 @@ void init_signals()
(void (*)()) (((unsigned int)(cstack) + sizeof(cstack) - 4) & ~3);
wine_sigaction(SIGUSR2,&usr2_act,NULL);
#endif
#if defined(__NetBSD__) || defined(__FreeBSD__)
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
usr2_act.sa_hadnler = (void (*)) stop_wait;
usr2_act.sa_flags = SA_ONSTACK;
usr2_act.sa_mask = sig_mask;
......
......@@ -39,8 +39,10 @@ static void shm_main_refresh();
static void print_perm(struct ipc_perm *perm)
{
printf("Permission:\n");
/* FIXME: not portable
printf("\tKey=%d, mode=%03o, sequence #=%d\n",
(int)perm->key,perm->mode, perm->seq);
*/
printf("\towner: uid=%d, gid=%d ;" ,perm->uid, perm->gid);
printf(" creator: uid=%d, gid=%d\n",perm->cuid,perm->cgid);
}
......
......@@ -57,8 +57,6 @@ extern LRESULT MDIClientWndProc(HWND16,UINT16,WPARAM16,LPARAM);
extern LRESULT PrintDlgProc(HWND16,UINT16,WPARAM16,LPARAM);
extern LRESULT PrintSetupDlgProc(HWND16,UINT16,WPARAM16,LPARAM);
extern LRESULT ReplaceTextDlgProc(HWND16,UINT16,WPARAM16,LPARAM);
extern LRESULT ScrollBarWndProc(HWND16,UINT16,WPARAM16,LPARAM);
extern LRESULT StaticWndProc(HWND16,UINT16,WPARAM16,LPARAM);
extern LRESULT TASK_Reschedule(void);
/***********************************************************************
......@@ -77,8 +75,6 @@ FARPROC16 MODULE_GetWndProcEntry16( char *name )
MAP_STR_TO_PROC("PrintDlgProc",PrintDlgProc);
MAP_STR_TO_PROC("PrintSetupDlgProc",PrintSetupDlgProc);
MAP_STR_TO_PROC("ReplaceTextDlgProc",ReplaceTextDlgProc);
MAP_STR_TO_PROC("ScrollBarWndProc",ScrollBarWndProc);
MAP_STR_TO_PROC("StaticWndProc",StaticWndProc);
MAP_STR_TO_PROC("TASK_Reschedule",TASK_Reschedule);
fprintf(stderr,"warning: No mapping for %s(), add one in library/miscstubs.c\n",name);
return NULL;
......
......@@ -13,6 +13,7 @@ static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
#include "windows.h"
#include "module.h"
#include "selectors.h"
#include "bitmap.h"
#include "comm.h"
#include "win.h"
#include "menu.h"
......@@ -31,6 +32,7 @@ static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
#include "options.h"
#include "spy.h"
#include "task.h"
#include "tweak.h"
#include "user.h"
#include "dce.h"
#include "shell.h"
......@@ -98,35 +100,41 @@ int MAIN_Init(void)
if (!WIN16DRV_Init()) return 0;
#endif /* WINELIB */
/* Initialize Wine tweaks */
if (!TWEAK_Init()) return 0;
/* Initialize OEM Bitmaps */
if (!OBM_Init()) return 0;
/* Initialise DOS drives */
if (!DRIVE_Init()) return 0;
/* Initialise DOS directories */
if (!DIR_Init()) return 0;
/* Initialize tasks */
/* Initialize tasks */
if (!TASK_Init()) return 0;
/* Initialize communications */
/* Initialize communications */
COMM_Init();
/* Initialize IO-port permissions */
/* Initialize IO-port permissions */
IO_port_init();
/* registry initialisation */
/* registry initialisation */
SHELL_LoadRegistry();
/* Global atom table initialisation */
/* Global atom table initialisation */
if (!ATOM_Init()) return 0;
/* GDI initialisation */
/* GDI initialisation */
if (!GDI_Init()) return 0;
/* Initialize system colors and metrics*/
/* Initialize system colors and metrics*/
SYSMETRICS_Init();
SYSCOLOR_Init();
/* Create the DCEs */
/* Create the DCEs */
DCE_Init();
/* Initialize keyboard */
......@@ -138,10 +146,10 @@ int MAIN_Init(void)
/* Initialize built-in window classes */
if (!WIDGETS_Init()) return 0;
/* Initialize dialog manager */
/* Initialize dialog manager */
if (!DIALOG_Init()) return 0;
/* Initialize menus */
/* Initialize menus */
if (!MENU_Init()) return 0;
/* Create desktop window */
......@@ -150,7 +158,10 @@ int MAIN_Init(void)
/* Initialize message spying */
if (!SPY_Init()) return 0;
/* Create system message queue */
/* Check wine.conf for old/bad entries */
if (!TWEAK_CheckConfiguration()) return 0;
/* Create system message queue */
queueSize = GetProfileInt32A( "windows", "TypeAhead", 120 );
if (!QUEUE_CreateSysMsgQueue( queueSize )) return 0;
......@@ -206,6 +217,12 @@ int main(int argc, char *argv[] )
return 1;
}
if (!GetNumTasks())
{
fprintf( stderr, "wine: no executable file found.\n" );
return 0;
}
if (Options.debug) DEBUG_SetBreakpoints( TRUE ); /* Setup breakpoints */
Yield(); /* Start the first task */
......
......@@ -1143,7 +1143,8 @@ HINSTANCE16 MODULE_Load( LPCSTR name, LPVOID paramBlock, BOOL32 first )
SELFLOADHEADER *selfloadheader;
STACK16FRAME *stack16Top;
HMODULE16 hselfload = GetModuleHandle16("WPROCS");
WORD oldss, oldsp, saved_dgroup = pSegTable[pModule->dgroup - 1].selector;
DWORD oldstack;
WORD saved_dgroup = pSegTable[pModule->dgroup - 1].selector;
fprintf (stderr, "Warning: %*.*s is a self-loading module\n"
"Support for self-loading modules is very experimental\n",
*((BYTE*)pModule + pModule->name_table),
......@@ -1160,13 +1161,12 @@ HINSTANCE16 MODULE_Load( LPCSTR name, LPVOID paramBlock, BOOL32 first )
GLOBAL_Alloc (GMEM_ZEROINIT,
0xFF00, hModule, FALSE, FALSE, FALSE)
);
oldss = IF1632_Saved16_ss;
oldsp = IF1632_Saved16_sp;
IF1632_Saved16_ss = pModule->self_loading_sel;
IF1632_Saved16_sp = 0xFF00 - sizeof(*stack16Top);
oldstack = IF1632_Saved16_ss_sp;
IF1632_Saved16_ss_sp = MAKELONG( 0xFF00 - sizeof(*stack16Top),
pModule->self_loading_sel );
stack16Top = CURRENT_STACK16;
stack16Top->saved_ss = 0;
stack16Top->saved_sp = 0;
stack16Top->saved_ss_sp = 0;
stack16Top->ebp = 0;
stack16Top->ds = stack16Top->es = pModule->self_loading_sel;
stack16Top->entry_point = 0;
stack16Top->entry_ip = 0;
......@@ -1205,8 +1205,7 @@ HINSTANCE16 MODULE_Load( LPCSTR name, LPVOID paramBlock, BOOL32 first )
_lclose32(hf);
/* some BootApp procs overwrite the selector of dgroup */
pSegTable[pModule->dgroup - 1].selector = saved_dgroup;
IF1632_Saved16_ss = oldss;
IF1632_Saved16_sp = oldsp;
IF1632_Saved16_ss_sp = oldstack;
for (i = 2; i <= pModule->seg_count; i++) NE_LoadSegment( hModule, i );
if (hInitialStack32)
{
......
......@@ -69,19 +69,18 @@ BOOL32 NE_LoadSegment( HMODULE16 hModule, WORD segnum )
/* Implement self loading segments */
SELFLOADHEADER *selfloadheader;
STACK16FRAME *stack16Top;
WORD oldss, oldsp, oldselector, newselector;
DWORD oldstack;
WORD oldselector, newselector;
HFILE32 hf = FILE_DupUnixHandle( fd );
selfloadheader = (SELFLOADHEADER *)
PTR_SEG_OFF_TO_LIN(pSegTable->selector,0);
oldss = IF1632_Saved16_ss;
oldsp = IF1632_Saved16_sp;
oldstack = IF1632_Saved16_ss_sp;
oldselector = pSeg->selector;
IF1632_Saved16_ss = pModule->self_loading_sel;
IF1632_Saved16_sp = 0xFF00 - sizeof(*stack16Top);
IF1632_Saved16_ss_sp = MAKELONG( 0xFF00 - sizeof(*stack16Top),
pModule->self_loading_sel );
stack16Top = CURRENT_STACK16;
stack16Top->saved_ss = 0;
stack16Top->saved_sp = 0;
stack16Top->saved_ss_sp = 0;
stack16Top->ds = stack16Top->es = pModule->self_loading_sel;
stack16Top->entry_point = 0;
stack16Top->entry_ip = 0;
......@@ -110,8 +109,7 @@ BOOL32 NE_LoadSegment( HMODULE16 hModule, WORD segnum )
}
}
IF1632_Saved16_ss = oldss;
IF1632_Saved16_sp = oldsp;
IF1632_Saved16_ss_sp = oldstack;
}
else if (!(pSeg->flags & NE_SEGFLAGS_ITERATED))
read(fd, mem, size);
......@@ -501,7 +499,8 @@ static BOOL32 NE_InitDLL( HMODULE16 hModule )
CS_reg(&context) = pSegTable[pModule->cs-1].selector;
EIP_reg(&context) = pModule->ip;
EBP_reg(&context) = IF1632_Saved16_sp + (WORD)&((STACK16FRAME*)0)->bp;
EBP_reg(&context) = OFFSETOF(IF1632_Saved16_ss_sp)
+ (WORD)&((STACK16FRAME*)0)->bp;
EDI_reg(&context) = DS_reg(&context) ? DS_reg(&context) : hModule;
......
......@@ -359,7 +359,7 @@ static void do_relocations(struct pe_data *pe)
* PE_LoadImage
* Load one PE format executable into memory
*/
static void PE_LoadImage( struct pr_data **ret_pe, int fd, HMODULE16 hModule, WORD offset, OFSTRUCT *ofs )
static void PE_LoadImage( struct pe_data **ret_pe, int fd, HMODULE16 hModule, WORD offset, OFSTRUCT *ofs )
{
struct pe_data *pe;
int i, result;
......@@ -577,7 +577,7 @@ problem needs to be fixed properly at some stage */
else {
char *s;
modname = s = ofs->szPathName;
while (s=strchr(modname,'\\'))
while ((s=strchr(modname,'\\')))
modname = s+1;
if ((s=strchr(modname,'.')))
*s='\0';
......
......@@ -12,7 +12,7 @@
#include <sys/types.h>
#include <sys/wait.h>
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__svr4__) || defined(_SCO_DS) || defined(__EMX__)
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__svr4__) || defined(_SCO_DS) || defined(__EMX__)
#if !defined(_SCO_DS) && !defined(__EMX__)
#include <sys/syscall.h>
#endif
......@@ -184,7 +184,7 @@ static void SIGNAL_SetHandler( int sig, void (*func)(), int flags )
ret = wine_sigaction( sig, &sig_act, NULL );
#endif /* linux */
#if defined(__NetBSD__) || defined(__FreeBSD__)
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
struct sigaction sig_act;
sigset_t sig_mask;
sigemptyset(&sig_mask);
......@@ -192,7 +192,7 @@ static void SIGNAL_SetHandler( int sig, void (*func)(), int flags )
sig_act.sa_flags = SA_ONSTACK;
sig_act.sa_mask = sig_mask;
ret = sigaction( sig, &sig_act, NULL );
#endif /* __FreeBSD__ || __NetBSD__ */
#endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ */
#if defined (__svr4__) || defined(_SCO_DS)
struct sigaction sig_act;
......@@ -230,7 +230,7 @@ extern void WINSOCK_sigio(int a);
*/
BOOL32 SIGNAL_Init(void)
{
#if defined(__NetBSD__) || defined(__FreeBSD__)
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
struct sigaltstack ss;
if ((ss.ss_sp = malloc(MINSIGSTKSZ)) == NULL) {
......@@ -244,7 +244,7 @@ BOOL32 SIGNAL_Init(void)
perror("sigstack");
return FALSE;
}
#endif /* __FreeBSD__ || __NetBSD__ */
#endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ */
#if defined (__svr4__) || defined(_SCO_DS)
struct sigaltstack ss;
......
......@@ -44,8 +44,7 @@ extern void USER_AppExit( HTASK16, HINSTANCE16, HQUEUE16 );
extern void PE_InitTls( PE_MODULE *module );
/* Saved 16-bit stack for current process (Win16 only) */
WORD IF1632_Saved16_ss = 0;
WORD IF1632_Saved16_sp = 0;
DWORD IF1632_Saved16_ss_sp = 0;
/* Saved 32-bit stack for current process (Win16 only) */
DWORD IF1632_Saved32_esp = 0;
......@@ -360,9 +359,7 @@ static void TASK_CallToStart(void)
NE_MODULE *pModule = MODULE_GetPtr( pTask->hModule );
SEGTABLEENTRY *pSegTable = NE_SEG_TABLE( pModule );
IF1632_Saved16_ss = pTask->ss;
IF1632_Saved16_sp = pTask->sp;
IF1632_Saved16_ss_sp = pTask->ss_sp;
if (pModule->flags & NE_FFLAGS_WIN32)
{
/* FIXME: all this is an ugly hack */
......@@ -404,7 +401,8 @@ static void TASK_CallToStart(void)
dprintf_task( stddeb, "Starting main program: cs:ip=%04lx:%04x ds=%04lx ss:sp=%04x:%04x\n",
CS_reg(&context), IP_reg(&context), DS_reg(&context),
IF1632_Saved16_ss, IF1632_Saved16_sp );
SELECTOROF(IF1632_Saved16_ss_sp),
OFFSETOF(IF1632_Saved16_ss_sp) );
CallTo16_regs_( &context );
/* This should never return */
......@@ -580,13 +578,13 @@ HTASK16 TASK_CreateTask( HMODULE16 hModule, HINSTANCE16 hInstance,
/* Create the 16-bit stack frame */
pTask->ss = hInstance;
pTask->sp = ((pModule->sp != 0) ? pModule->sp :
pSegTable[pModule->ss-1].minsize + pModule->stack_size) & ~1;
stack16Top = (char *)PTR_SEG_OFF_TO_LIN( pTask->ss, pTask->sp );
pTask->ss_sp = MAKELONG( ((pModule->sp != 0) ? pModule->sp :
pSegTable[pModule->ss-1].minsize + pModule->stack_size) & ~1,
hInstance );
stack16Top = (char *)PTR_SEG_TO_LIN( pTask->ss_sp );
frame16 = (STACK16FRAME *)stack16Top - 1;
frame16->saved_ss = 0;
frame16->saved_sp = 0;
frame16->saved_ss_sp = 0;
frame16->ebp = 0;
frame16->ds = frame16->es = pTask->hInstance;
frame16->entry_point = 0;
frame16->entry_ip = OFFSETOF(TASK_RescheduleProc) + 14;
......@@ -596,17 +594,13 @@ HTASK16 TASK_CreateTask( HMODULE16 hModule, HINSTANCE16 hInstance,
frame16->ip = LOWORD( CALLTO16_RetAddr_word );
frame16->cs = HIWORD( CALLTO16_RetAddr_word );
#endif /* WINELIB */
pTask->sp -= sizeof(STACK16FRAME);
pTask->ss_sp -= sizeof(STACK16FRAME);
/* If there's no 16-bit stack yet, use a part of the new task stack */
/* This is only needed to have a stack to switch from on the first */
/* call to DirectedYield(). */
if (!IF1632_Saved16_ss)
{
IF1632_Saved16_ss = pTask->ss;
IF1632_Saved16_sp = pTask->sp;
}
if (!IF1632_Saved16_ss_sp) IF1632_Saved16_ss_sp = pTask->ss_sp;
/* Add a breakpoint at the start of the task */
......@@ -810,9 +804,8 @@ void TASK_Reschedule(void)
if (pOldTask)
{
pOldTask->ss = IF1632_Saved16_ss;
pOldTask->sp = IF1632_Saved16_sp;
pOldTask->esp = IF1632_Saved32_esp;
pOldTask->ss_sp = IF1632_Saved16_ss_sp;
pOldTask->esp = IF1632_Saved32_esp;
}
else IF1632_Original32_esp = IF1632_Saved32_esp;
......@@ -828,9 +821,8 @@ void TASK_Reschedule(void)
hCurrentTask = hTask;
pCurrentThread = pNewTask->thdb;
pCurrentProcess = pCurrentThread->process;
IF1632_Saved16_ss = pNewTask->ss;
IF1632_Saved16_sp = pNewTask->sp;
IF1632_Saved32_esp = pNewTask->esp;
IF1632_Saved16_ss_sp = pNewTask->ss_sp;
IF1632_Saved32_esp = pNewTask->esp;
}
......@@ -912,7 +904,7 @@ void InitTask( CONTEXT *context )
pinstance->stackbottom = stackhi; /* yup, that's right. Confused me too. */
pinstance->stacktop = stacklow;
#ifndef WINELIB
pinstance->stackmin = IF1632_Saved16_sp;
pinstance->stackmin = OFFSETOF(IF1632_Saved16_ss_sp);
#endif
}
......@@ -1154,26 +1146,26 @@ void SwitchStackTo( WORD seg, WORD ptr, WORD top )
if (!(pTask = (TDB *)GlobalLock16( hCurrentTask ))) return;
if (!(pData = (INSTANCEDATA *)GlobalLock16( seg ))) return;
dprintf_task( stddeb, "SwitchStackTo: old=%04x:%04x new=%04x:%04x\n",
IF1632_Saved16_ss, IF1632_Saved16_sp, seg, ptr );
SELECTOROF(IF1632_Saved16_ss_sp),
OFFSETOF(IF1632_Saved16_ss_sp), seg, ptr );
/* Save the old stack */
oldFrame = CURRENT_STACK16;
pData->old_sp = IF1632_Saved16_sp;
pData->old_ss = IF1632_Saved16_ss;
pData->old_ss_sp = IF1632_Saved16_ss_sp;
pData->stacktop = top;
pData->stackmin = ptr;
pData->stackbottom = ptr;
/* Switch to the new stack */
IF1632_Saved16_ss = pTask->ss = seg;
IF1632_Saved16_sp = pTask->sp = ptr - sizeof(STACK16FRAME);
IF1632_Saved16_ss_sp = pTask->ss_sp = MAKELONG( ptr - sizeof(STACK16FRAME),
seg );
newFrame = CURRENT_STACK16;
/* Copy the stack frame and the local variables to the new stack */
copySize = oldFrame->bp - pData->old_sp;
copySize = oldFrame->bp - OFFSETOF(pData->old_ss_sp);
memcpy( newFrame, oldFrame, MAX( copySize, sizeof(STACK16FRAME) ));
}
......@@ -1192,33 +1184,32 @@ void SwitchStackBack(void)
INSTANCEDATA *pData;
if (!(pTask = (TDB *)GlobalLock16( hCurrentTask ))) return;
if (!(pData = (INSTANCEDATA *)GlobalLock16( IF1632_Saved16_ss ))) return;
if (!pData->old_ss)
if (!(pData = (INSTANCEDATA *)GlobalLock16(SELECTOROF(IF1632_Saved16_ss_sp))))
return;
if (!pData->old_ss_sp)
{
fprintf( stderr, "SwitchStackBack: no previous SwitchStackTo\n" );
return;
}
dprintf_task( stddeb, "SwitchStackBack: restoring stack %04x:%04x\n",
pData->old_ss, pData->old_sp );
SELECTOROF(pData->old_ss_sp), OFFSETOF(pData->old_ss_sp) );
oldFrame = CURRENT_STACK16;
/* Switch back to the old stack */
IF1632_Saved16_ss = pTask->ss = pData->old_ss;
IF1632_Saved16_sp = pTask->sp = pData->old_sp;
pData->old_ss = pData->old_sp = 0;
IF1632_Saved16_ss_sp = pTask->ss_sp = pData->old_ss_sp;
pData->old_ss_sp = 0;
/* Build a stack frame for the return */
newFrame = CURRENT_STACK16;
newFrame->saved_ss = oldFrame->saved_ss;
newFrame->saved_sp = oldFrame->saved_sp;
newFrame->entry_ip = oldFrame->entry_ip;
newFrame->entry_cs = oldFrame->entry_cs;
newFrame->bp = oldFrame->bp;
newFrame->ip = oldFrame->ip;
newFrame->cs = oldFrame->cs;
newFrame->saved_ss_sp = oldFrame->saved_ss_sp;
newFrame->entry_ip = oldFrame->entry_ip;
newFrame->entry_cs = oldFrame->entry_cs;
newFrame->bp = oldFrame->bp;
newFrame->ip = oldFrame->ip;
newFrame->cs = oldFrame->cs;
}
......@@ -1491,8 +1482,8 @@ BOOL16 TaskNext( TASKENTRY *lpte )
lpte->hTaskParent = pTask->hParent;
lpte->hInst = pTask->hInstance;
lpte->hModule = pTask->hModule;
lpte->wSS = pTask->ss;
lpte->wSP = pTask->sp;
lpte->wSS = SELECTOROF( pTask->ss_sp );
lpte->wSP = OFFSETOF( pTask->ss_sp );
lpte->wStackTop = pInstData->stacktop;
lpte->wStackMinimum = pInstData->stackmin;
lpte->wStackBottom = pInstData->stackbottom;
......
......@@ -14,7 +14,7 @@
#include "debug.h"
#ifdef linux
#include <syscall.h>
#include <asm/unistd.h>
struct modify_ldt_s
{
......@@ -37,12 +37,12 @@ static __inline__ _syscall3(int, modify_ldt, int, func, void *, ptr,
#include <sys/seg.h>
#endif
#if defined(__NetBSD__) || defined(__FreeBSD__)
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
#include <machine/segments.h>
extern int i386_get_ldt(int, union descriptor *, int);
extern int i386_set_ldt(int, union descriptor *, int);
#endif /* __NetBSD__ || __FreeBSD__ */
#endif /* __NetBSD__ || __FreeBSD__ || __OpenBSD__ */
ldt_copy_entry ldt_copy[LDT_SIZE];
......@@ -173,7 +173,7 @@ int LDT_SetEntry( int entry, const ldt_entry *content )
}
#endif /* linux */
#if defined(__NetBSD__) || defined(__FreeBSD__)
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
if (!__winelib)
{
long d[2];
......@@ -188,7 +188,7 @@ int LDT_SetEntry( int entry, const ldt_entry *content )
exit(1);
}
}
#endif /* __NetBSD__ || __FreeBSD__ */
#endif /* __NetBSD__ || __FreeBSD__ || __OpenBSD__ */
#if defined(__svr4__) || defined(_SCO_DS)
if (!__winelib)
{
......
......@@ -151,7 +151,7 @@ void SELECTOR_FreeBlock( WORD sel, WORD count )
{
if ((frame->ds >= sel) && (frame->ds < nextsel)) frame->ds = 0;
if ((frame->es >= sel) && (frame->es < nextsel)) frame->es = 0;
frame = PTR_SEG_OFF_TO_LIN(frame->saved_ss, frame->saved_sp);
frame = PTR_SEG_TO_LIN( frame->saved_ss_sp );
}
}
......
......@@ -32,6 +32,7 @@ C_SRCS = \
stress.c \
system.c \
toolhelp.c \
tweak.c \
ver.c \
w32sys.c \
winsock.c \
......@@ -44,3 +45,4 @@ all: $(MODULE).o
@MAKE_RULES@
### Dependencies:
......@@ -21,7 +21,7 @@
#include <errno.h>
#include <ctype.h>
#include <sys/stat.h>
#if defined(__NetBSD__) || defined(__FreeBSD__)
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
#include <sys/filio.h>
#endif
#include <sys/ioctl.h>
......
......@@ -932,7 +932,117 @@ LONG GetTimerResolution(void)
BOOL32 SystemParametersInfo32A( UINT32 uAction, UINT32 uParam,
LPVOID lpvParam, UINT32 fuWinIni )
{
return SystemParametersInfo16(uAction,uParam,lpvParam,fuWinIni);
int timeout, temp;
XKeyboardState keyboard_state;
switch (uAction) {
case SPI_GETBEEP:
XGetKeyboardControl(display, &keyboard_state);
if (keyboard_state.bell_percent == 0)
*(BOOL32 *) lpvParam = FALSE;
else
*(BOOL32 *) lpvParam = TRUE;
break;
case SPI_GETBORDER:
*(INT32 *)lpvParam = GetSystemMetrics32( SM_CXFRAME );
break;
case SPI_GETFASTTASKSWITCH:
if ( GetProfileInt32A( "windows", "CoolSwitch", 1 ) == 1 )
*(BOOL32 *) lpvParam = TRUE;
else
*(BOOL32 *) lpvParam = FALSE;
break;
case SPI_GETGRIDGRANULARITY:
*(INT32*)lpvParam=GetProfileInt32A("desktop","GridGranularity",1);
break;
case SPI_GETICONTITLEWRAP:
*(BOOL32*)lpvParam=GetProfileInt32A("desktop","IconTitleWrap",TRUE);
break;
case SPI_GETKEYBOARDDELAY:
*(INT32*)lpvParam=GetProfileInt32A("keyboard","KeyboardDelay",1);
break;
case SPI_GETKEYBOARDSPEED:
*(DWORD*)lpvParam=GetProfileInt32A("keyboard","KeyboardSpeed",30);
break;
case SPI_GETMENUDROPALIGNMENT:
*(BOOL32*)lpvParam=GetSystemMetrics32(SM_MENUDROPALIGNMENT); /* XXX check this */
break;
case SPI_GETSCREENSAVEACTIVE:
if ( GetProfileInt32A( "windows", "ScreenSaveActive", 1 ) == 1 )
*(BOOL32*)lpvParam = TRUE;
else
*(BOOL32*)lpvParam = FALSE;
break;
case SPI_GETSCREENSAVETIMEOUT:
/* FIXME GetProfileInt( "windows", "ScreenSaveTimeout", 300 ); */
XGetScreenSaver(display, &timeout, &temp,&temp,&temp);
*(INT32 *) lpvParam = timeout * 1000;
break;
case SPI_ICONHORIZONTALSPACING:
/* FIXME Get/SetProfileInt */
if (lpvParam == NULL)
/*SetSystemMetrics( SM_CXICONSPACING, uParam )*/ ;
else
*(INT32*)lpvParam=GetSystemMetrics32(SM_CXICONSPACING);
break;
case SPI_ICONVERTICALSPACING:
/* FIXME Get/SetProfileInt */
if (lpvParam == NULL)
/*SetSystemMetrics( SM_CYICONSPACING, uParam )*/ ;
else
*(INT32*)lpvParam=GetSystemMetrics32(SM_CYICONSPACING);
break;
case SPI_GETICONTITLELOGFONT: {
LPLOGFONT32A lpLogFont = (LPLOGFONT32A)lpvParam;
GetProfileString32A("Desktop", "IconTitleFaceName", "Helvetica",
lpLogFont->lfFaceName, LF_FACESIZE );
lpLogFont->lfHeight = -GetProfileInt32A("Desktop","IconTitleSize", 8);
lpLogFont->lfWidth = 0;
lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
lpLogFont->lfWeight = FW_NORMAL;
lpLogFont->lfItalic = FALSE;
lpLogFont->lfStrikeOut = FALSE;
lpLogFont->lfUnderline = FALSE;
lpLogFont->lfCharSet = ANSI_CHARSET;
lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
break;
}
case SPI_GETWORKAREA:
SetRect32( (RECT32 *)lpvParam, 0, 0,
GetSystemMetrics32( SM_CXSCREEN ),
GetSystemMetrics32( SM_CYSCREEN )
);
break;
case SPI_GETNONCLIENTMETRICS: {
/* FIXME: implement correctly */
LPNONCLIENTMETRICS32A lpnm=(LPNONCLIENTMETRICS32A)lpvParam;
SystemParametersInfo32A(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfCaptionFont),0);
SystemParametersInfo32A(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfMenuFont),0);
SystemParametersInfo32A(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfStatusFont),0);
SystemParametersInfo32A(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfMessageFont),0);
break;
}
default:
return SystemParametersInfo16(uAction,uParam,lpvParam,fuWinIni);
}
return TRUE;
}
......@@ -1080,6 +1190,16 @@ BOOL16 SystemParametersInfo16( UINT16 uAction, UINT16 uParam,
lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
break;
}
case SPI_GETNONCLIENTMETRICS: {
/* FIXME: implement correctly */
LPNONCLIENTMETRICS16 lpnm=(LPNONCLIENTMETRICS16)lpvParam;
SystemParametersInfo16(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfCaptionFont),0);
SystemParametersInfo16(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfMenuFont),0);
SystemParametersInfo16(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfStatusFont),0);
SystemParametersInfo16(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfMessageFont),0);
break;
}
case SPI_LANGDRIVER:
case SPI_SETBORDER:
......@@ -1153,6 +1273,16 @@ BOOL32 SystemParametersInfo32W( UINT32 uAction, UINT32 uParam,
lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
}
break;
case SPI_GETNONCLIENTMETRICS: {
/* FIXME: implement correctly */
LPNONCLIENTMETRICS32W lpnm=(LPNONCLIENTMETRICS32W)lpvParam;
SystemParametersInfo32W(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfCaptionFont),0);
SystemParametersInfo32W(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfMenuFont),0);
SystemParametersInfo32W(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfStatusFont),0);
SystemParametersInfo32W(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfMessageFont),0);
break;
}
default:
return SystemParametersInfo32A(uAction,uParam,lpvParam,fuWinIni);
......
This diff is collapsed. Click to expand it.
......@@ -27,7 +27,7 @@
/******************************************************************************
*
* void dprintf_ver_string(
* void ver_dstring(
* char const * prologue,
* char const * teststring,
* char const * epilogue )
......@@ -39,11 +39,14 @@
*
* Revision history
* 30-May-1997 Dave Cuthbert (dacut@ece.cmu.edu)
* Original implementation
* Original implementation as dprintf[_]ver_string
* 05-Jul-1997 Dave Cuthbert (dacut@ece.cmu.edu)
* Fixed problem that caused bug with tools/make_debug -- renaming
* this function should fix the problem.
*
*****************************************************************************/
static void dprintf_ver_string(
static void ver_dstring(
char const * prologue,
char const * teststring,
char const * epilogue )
......@@ -557,9 +560,9 @@ DWORD VerFindFile16(
else
dprintf_ver(stddeb, "\n");
dprintf_ver_string("\tlpszFilename = ", lpszFilename, "\n");
dprintf_ver_string("\tlpszWinDir = ", lpszWinDir, "\n");
dprintf_ver_string("\tlpszAppDir = ", lpszAppDir, "\n");
ver_dstring("\tlpszFilename = ", lpszFilename, "\n");
ver_dstring("\tlpszWinDir = ", lpszWinDir, "\n");
ver_dstring("\tlpszAppDir = ", lpszAppDir, "\n");
dprintf_ver(stddeb, "\tlpszCurDir = %p\n", lpszCurDir);
if(lpuCurDirLen)
......@@ -674,14 +677,14 @@ DWORD VerFindFile16(
dprintf_ver(stddeb, ")");
}
dprintf_ver_string("\n\t(Exit) lpszCurDir = ", lpszCurDir, "\n");
ver_dstring("\n\t(Exit) lpszCurDir = ", lpszCurDir, "\n");
if(lpuCurDirLen)
dprintf_ver(stddeb, "\t(Exit) lpuCurDirLen = %p (%u)\n",
lpuCurDirLen, *lpuCurDirLen);
else
dprintf_ver(stddeb, "\t(Exit) lpuCurDirLen = (null)\n");
dprintf_ver_string("\t(Exit) lpszDestDir = ", lpszDestDir, "\n");
ver_dstring("\t(Exit) lpszDestDir = ", lpszDestDir, "\n");
if(lpuDestDirLen)
dprintf_ver(stddeb, "\t(Exit) lpuDestDirLen = %p (%u)\n",
lpuDestDirLen, *lpuDestDirLen);
......@@ -972,114 +975,6 @@ VerInstallFile32W(
return ret;
}
/* FIXME: This table should, of course, be language dependend */
static const struct map_id2str {
UINT16 langid;
const char *langname;
} languages[]={
{0x0401,"Arabisch"},
{0x0402,"Bulgarisch"},
{0x0403,"Katalanisch"},
{0x0404,"Traditionales Chinesisch"},
{0x0405,"Tschecisch"},
{0x0406,"Dnisch"},
{0x0407,"Deutsch"},
{0x0408,"Griechisch"},
{0x0409,"Amerikanisches Englisch"},
{0x040A,"Kastilisches Spanisch"},
{0x040B,"Finnisch"},
{0x040C,"Franzsisch"},
{0x040D,"Hebrisch"},
{0x040E,"Ungarisch"},
{0x040F,"Islndisch"},
{0x0410,"Italienisch"},
{0x0411,"Japanisch"},
{0x0412,"Koreanisch"},
{0x0413,"Niederlndisch"},
{0x0414,"Norwegisch-Bokmal"},
{0x0415,"Polnisch"},
{0x0416,"Brasilianisches Portugiesisch"},
{0x0417,"Rtoromanisch"},
{0x0418,"Rumnisch"},
{0x0419,"Russisch"},
{0x041A,"Kroatoserbisch (lateinisch)"},
{0x041B,"Slowenisch"},
{0x041C,"Albanisch"},
{0x041D,"Schwedisch"},
{0x041E,"Thai"},
{0x041F,"Trkisch"},
{0x0420,"Urdu"},
{0x0421,"Bahasa"},
{0x0804,"Vereinfachtes Chinesisch"},
{0x0807,"Schweizerdeutsch"},
{0x0809,"Britisches Englisch"},
{0x080A,"Mexikanisches Spanisch"},
{0x080C,"Belgisches Franzsisch"},
{0x0810,"Schweizerisches Italienisch"},
{0x0813,"Belgisches Niederlndisch"},
{0x0814,"Norgwegisch-Nynorsk"},
{0x0816,"Portugiesisch"},
{0x081A,"Serbokratisch (kyrillisch)"},
{0x0C1C,"Kanadisches Franzsisch"},
{0x100C,"Schweizerisches Franzsisch"},
{0x0000,"Unbekannt"},
};
/* VerLanguageName [VER.10] */
DWORD
VerLanguageName16(UINT16 langid,LPSTR langname,UINT16 langnamelen) {
int i;
char *buf;
dprintf_ver(stddeb,"VerLanguageName(%d,%p,%d)\n",langid,langname,langnamelen);
/* First, check \System\CurrentControlSet\control\Nls\Locale\<langid>
* from the registry.
*/
buf=(char*)malloc(strlen("\\System\\CurrentControlSet\\control\\Nls\\Locale\\")+9);
sprintf(buf,"\\System\\CurrentControlSet\\control\\Nls\\Locale\\%08x",langid);
if (ERROR_SUCCESS==RegQueryValue16(HKEY_LOCAL_MACHINE,buf,langname,(LPDWORD)&langnamelen)) {
langname[langnamelen-1]='\0';
return langnamelen;
}
/* if that fails, use the interal table */
for (i=0;languages[i].langid!=0;i++)
if (langid==languages[i].langid)
break;
strncpy(langname,languages[i].langname,langnamelen);
langname[langnamelen-1]='\0';
return strlen(languages[i].langname);
}
/* VerLanguageNameA [VERSION.9] */
DWORD
VerLanguageName32A(UINT32 langid,LPSTR langname,UINT32 langnamelen) {
return VerLanguageName16(langid,langname,langnamelen);
}
/* VerLanguageNameW [VERSION.10] */
DWORD
VerLanguageName32W(UINT32 langid,LPWSTR langname,UINT32 langnamelen) {
int i;
char buffer[80];
LPWSTR keyname;
/* First, check \System\CurrentControlSet\control\Nls\Locale\<langid>
* from the registry.
*/
sprintf(buffer,"\\System\\CurrentControlSet\\control\\Nls\\Locale\\%08x",langid);
keyname = HEAP_strdupAtoW( GetProcessHeap(), 0, buffer );
if (ERROR_SUCCESS==RegQueryValue32W(HKEY_LOCAL_MACHINE,keyname,langname,(LPDWORD)&langnamelen)) {
HeapFree( GetProcessHeap(), 0, keyname );
return langnamelen;
}
HeapFree( GetProcessHeap(), 0, keyname );
/* if that fails, use the interal table */
for (i=0;languages[i].langid!=0;i++)
if (langid==languages[i].langid)
break;
lstrcpyAtoW( langname, languages[i].langname );
return strlen(languages[i].langname); /* same as strlenW(langname); */
}
/* FIXME: UNICODE? */
struct db {
......
......@@ -267,6 +267,8 @@ INT16 WSAStartup(UINT16 wVersionRequested, LPWSADATA lpWSAData)
"SunOS",
#elif defined(__FreeBSD__)
"FreeBSD",
#elif defined(__OpenBSD__)
"OpenBSD/i386",
#else
"Unknown",
#endif
......
......@@ -843,52 +843,31 @@ static void RenameFileFCB( CONTEXT *context )
static void fLock( CONTEXT * context )
{
#if 0
struct flock f;
int result,retries=sharing_retries;
f.l_start = MAKELONG(DX_reg(context),CX_reg(context));
f.l_len = MAKELONG(DI_reg(context),SI_reg(context));
f.l_whence = 0;
f.l_pid = 0;
switch ( AX_reg(context) & 0xff )
{
case 0x00: /* LOCK */
f.l_type = F_WRLCK;
if (!LockFile(BX_reg(context),
MAKELONG(DX_reg(context),CX_reg(context)), 0,
MAKELONG(DI_reg(context),SI_reg(context)), 0)) {
AX_reg(context) = DOS_ExtendedError;
SET_CFLAG(context);
}
break;
case 0x01: /* UNLOCK */
f.l_type = F_UNLCK;
break;
if (!UnlockFile(BX_reg(context),
MAKELONG(DX_reg(context),CX_reg(context)), 0,
MAKELONG(DI_reg(context),SI_reg(context)), 0)) {
AX_reg(context) = DOS_ExtendedError;
SET_CFLAG(context);
}
return;
default:
AX_reg(context) = 0x0001;
SET_CFLAG(context);
return;
}
{
result = fcntl(BX_reg(context),F_SETLK,&f);
if ( retries && (!result) )
{
int i;
for(i=0;i<32768*((int)sharing_pause);i++)
result++; /* stop the optimizer */
for(i=0;i<32768*((int)sharing_pause);i++)
result--;
}
}
while( (!result) && (!(retries--)) );
if(result)
{
FILE_SetDosError();
AX_reg(context) = DOS_ExtendedError;
SET_CFLAG(context);
return;
}
#endif
}
......
......@@ -197,7 +197,7 @@ DWORD IO_inport( int port, int count )
#ifdef linux
if (do_direct_port_access) iopl(0);
#endif
dprintf_int(stddeb, "( 0x%x )\n", res );
dprintf_int(stddeb, "( 0x%lx )\n", res );
return res;
}
......
......@@ -2149,7 +2149,8 @@ DWORD mciSendString (LPCSTR lpstrCommand, LPSTR lpstrReturnString,
}
dwFlags = 0; /* default flags */
for (i=0;i<nrofkeywords;) {
if (!STRCMP(keywords[i],"type")) {
/* take care, there is also a "device type" capability */
if ((!STRCMP(keywords[i],"type")) && (i<nrofkeywords-1)) {
filename = dev;
dev = keywords[i+1];
memcpy(keywords+i,keywords+(i+2),(nrofkeywords-i-2)*sizeof(char *));
......
......@@ -822,17 +822,19 @@ INT32 GetDIBits32( HDC32 hdc, HBITMAP32 hbitmap, UINT32 startscan,
/* Transfer color info */
palEntry = palette->logpalette.palPalEntry;
for (i = 0; i < info->bmiHeader.biClrUsed; i++, palEntry++)
{
if (coloruse == DIB_RGB_COLORS)
if (info->bmiHeader.biBitCount<=8) {
palEntry = palette->logpalette.palPalEntry;
for (i = 0; i < info->bmiHeader.biClrUsed; i++, palEntry++)
{
info->bmiColors[i].rgbRed = palEntry->peRed;
info->bmiColors[i].rgbGreen = palEntry->peGreen;
info->bmiColors[i].rgbBlue = palEntry->peBlue;
info->bmiColors[i].rgbReserved = 0;
if (coloruse == DIB_RGB_COLORS)
{
info->bmiColors[i].rgbRed = palEntry->peRed;
info->bmiColors[i].rgbGreen = palEntry->peGreen;
info->bmiColors[i].rgbBlue = palEntry->peBlue;
info->bmiColors[i].rgbReserved = 0;
}
else ((WORD *)info->bmiColors)[i] = (WORD)i;
}
else ((WORD *)info->bmiColors)[i] = (WORD)i;
}
if (bits)
......
......@@ -12,6 +12,7 @@
#include "dc.h"
#include "font.h"
#include "heap.h"
#include "options.h"
#include "palette.h"
#include "pen.h"
#include "region.h"
......@@ -150,6 +151,60 @@ static GDIOBJHDR * StockObjects[NB_STOCK_OBJECTS] =
(GDIOBJHDR *) &SystemFixedFont
};
/******************************************************************************
*
* void ReadFontInformation(
* char const *fontName,
* FONTOBJ *font,
* int defHeight,
* int defBold,
* int defItalic,
* int defUnderline,
* int defStrikeOut )
*
* ReadFontInformation() checks the Wine configuration file's Tweak.Fonts
* section for entries containing fontName.Height, fontName.Bold, etc.,
* where fontName is the name specified in the call (e.g., "System"). It
* attempts to be user friendly by accepting 'n', 'N', 'f', 'F', or '0' as
* the first character in the boolean attributes (bold, italic, and
* underline).
*****************************************************************************/
static void ReadFontInformation(
char const *fontName,
FONTOBJ *font,
int defHeight,
int defBold,
int defItalic,
int defUnderline,
int defStrikeOut )
{
char key[256];
sprintf(key, "%s.Height", fontName);
font->logfont.lfHeight =
PROFILE_GetWineIniInt("Tweak.Fonts", key, defHeight);
sprintf(key, "%s.Bold", fontName);
font->logfont.lfWeight =
(PROFILE_GetWineIniBool("Tweak.Fonts", key, defBold)) ?
FW_BOLD : FW_NORMAL;
sprintf(key, "%s.Italic", fontName);
font->logfont.lfItalic =
PROFILE_GetWineIniBool("Tweak.Fonts", key, defItalic);
sprintf(key, "%s.Underline", fontName);
font->logfont.lfUnderline =
PROFILE_GetWineIniBool("Tweak.Fonts", key, defUnderline);
sprintf(key, "%s.StrikeOut", fontName);
font->logfont.lfStrikeOut =
PROFILE_GetWineIniBool("Tweak.Fonts", key, defStrikeOut);
return;
}
/***********************************************************************
* GDI_Init
......@@ -161,6 +216,13 @@ BOOL32 GDI_Init(void)
extern BOOL32 X11DRV_Init(void);
extern BOOL32 DIB_Init(void);
/* TWEAK: Initialize font hints */
ReadFontInformation("OEMFixed", &OEMFixedFont, 12, 0, 0, 0, 0);
ReadFontInformation("AnsiFixed", &AnsiFixedFont, 12, 0, 0, 0, 0);
ReadFontInformation("AnsiVar", &AnsiVarFont, 12, 0, 0, 0, 0);
ReadFontInformation("System", &SystemFont, 16, 1, 0, 0, 0);
ReadFontInformation("SystemFixed", &SystemFixedFont, 12, 1, 0, 0, 0);
/* Initialize drivers */
DIB_Init(); /* always before X11DRV_Init() */
......
......@@ -16,6 +16,7 @@
#include "color.h"
#include "cursoricon.h"
#include "stddebug.h"
#include "tweak.h"
#include "debug.h"
#include "xmalloc.h"
......@@ -56,25 +57,23 @@
#include "bitmaps/obm_old_close"
#include "bitmaps/obm_trtype"
#ifndef WIN_95_LOOK
#include "bitmaps/obm_zoomd"
#include "bitmaps/obm_reduced"
#include "bitmaps/obm_zoom"
#include "bitmaps/obm_reduce"
#include "bitmaps/obm_close"
#else
#include "bitmaps/obm_zoomd_95"
#include "bitmaps/obm_reduced_95"
#include "bitmaps/obm_zoom_95"
#include "bitmaps/obm_reduce_95"
#include "bitmaps/obm_close_95"
#include "bitmaps/obm_closed_95"
#endif /* WIN_95_LOOK */
#define OBM_FIRST OBM_TRTYPE /* First OEM bitmap */
#define OBM_LAST OBM_OLD_CLOSE /* Last OEM bitmap */
static const struct
static struct
{
char** data; /* Pointer to bitmap data */
BOOL32 color; /* Is it a color bitmap? */
......@@ -96,30 +95,16 @@ static const struct
{ obm_dnarrowd, TRUE }, /* OBM_DNARROWD */
{ obm_uparrowd, TRUE }, /* OBM_UPARROWD */
{ obm_restored, TRUE }, /* OBM_RESTORED */
#ifdef WIN_95_LOOK
{ obm_zoomd_95, TRUE }, /* OBM_ZOOMD */
{ obm_reduced_95, TRUE }, /* OBM_REDUCED */
#else
{ obm_zoomd, TRUE }, /* OBM_ZOOMD */
{ obm_reduced, TRUE }, /* OBM_REDUCED */
#endif
{ obm_restore, TRUE }, /* OBM_RESTORE */
#ifdef WIN_95_LOOK
{ obm_zoom_95, TRUE }, /* OBM_ZOOM */
{ obm_reduce_95, TRUE }, /* OBM_REDUCE */
#else
{ obm_zoom, TRUE }, /* OBM_ZOOM */
{ obm_reduce, TRUE }, /* OBM_REDUCE */
#endif
{ obm_lfarrow, TRUE }, /* OBM_LFARROW */
{ obm_rgarrow, TRUE }, /* OBM_RGARROW */
{ obm_dnarrow, TRUE }, /* OBM_DNARROW */
{ obm_uparrow, TRUE }, /* OBM_UPARROW */
#ifdef WIN_95_LOOK
{ obm_close_95, TRUE }, /* OBM_CLOSE */
#else
{ obm_close, TRUE }, /* OBM_CLOSE */
#endif
{ obm_old_restore, FALSE }, /* OBM_OLD_RESTORE */
{ obm_old_zoom, FALSE }, /* OBM_OLD_ZOOM */
{ obm_old_reduce, FALSE }, /* OBM_OLD_REDUCE */
......@@ -309,8 +294,8 @@ static HBITMAP16 OBM_MakeBitmap( WORD width, WORD height,
if (!hbitmap) return 0;
bmpObjPtr = (BITMAPOBJ *) GDI_HEAP_LIN_ADDR( hbitmap );
bmpObjPtr->size.cx = 0;
bmpObjPtr->size.cy = 0;
bmpObjPtr->size.cx = width;
bmpObjPtr->size.cy = height;
bmpObjPtr->pixmap = pixmap;
bmpObjPtr->bitmap.bmType = 0;
bmpObjPtr->bitmap.bmWidth = width;
......@@ -491,3 +476,29 @@ HGLOBAL16 OBM_LoadCursorIcon( WORD id, BOOL32 fCursor )
if (fCursor) OBM_Cursors[id] = handle;
return handle;
}
/***********************************************************************
* OBM_Init
*
* Initializes the OBM_Pixmaps_Data struct
*/
BOOL32 OBM_Init()
{
if(TWEAK_Win95Look) {
OBM_Pixmaps_Data[OBM_ZOOMD - OBM_FIRST].data = obm_zoomd_95;
OBM_Pixmaps_Data[OBM_REDUCED - OBM_FIRST].data = obm_reduced_95;
OBM_Pixmaps_Data[OBM_ZOOM - OBM_FIRST].data = obm_zoom_95;
OBM_Pixmaps_Data[OBM_REDUCE - OBM_FIRST].data = obm_reduce_95;
OBM_Pixmaps_Data[OBM_CLOSE - OBM_FIRST].data = obm_close_95;
}
else {
OBM_Pixmaps_Data[OBM_ZOOMD - OBM_FIRST].data = obm_zoomd;
OBM_Pixmaps_Data[OBM_REDUCED - OBM_FIRST].data = obm_reduced;
OBM_Pixmaps_Data[OBM_ZOOM - OBM_FIRST].data = obm_zoom;
OBM_Pixmaps_Data[OBM_REDUCE - OBM_FIRST].data = obm_reduce;
OBM_Pixmaps_Data[OBM_CLOSE - OBM_FIRST].data = obm_close;
}
return 1;
}
Fri Jul 4 12:00:00 1997 Henrik Olsen <Henrik.Olsen@iaeste.dk>
* [Da.rc] (new)
Added Danish language support.
Tue Jun 3 07:34:26 1997 Marcel Baur <mbaur@g26.ethz.ch>
* [Va.rc] (new)
......
/*
* Program Manager
*
* Copyright 1997 Henrik Olsen
*/
#define LANGUAGE_ID Da
#define LANGUAGE_NUMBER 6
#define LANGUAGE_MENU_ITEM "&Dansk"
/* Menu */
#define MENU_FILE "&Filer"
#define MENU_FILE_NEW "&Nyt programobjekt..."
#define MENU_FILE_OPEN "&bn\tEnter"
#define MENU_FILE_MOVE "&Flyt...\tF7"
#define MENU_FILE_COPY "K&opier...\tF8"
#define MENU_FILE_DELETE "&Slet\tDel"
#define MENU_FILE_ATTRIBUTES "&Programparametre...^IAlt+Enter"
#define MENU_FILE_EXECUTE "&Kr..."
#define MENU_FILE_EXIT "&Afslut Windows..."
#define MENU_OPTIONS "&Indstillinger"
#define MENU_OPTIONS_AUTO_ARRANGE "&Arranger automatisk"
#define MENU_OPTIONS_MIN_ON_RUN "&Minimer ved brug"
#define MENU_OPTIONS_SAVE_SETTINGS "&Gem indstillinger ved afslutning"
#define MENU_WINDOWS "&Vindue"
#define MENU_WINDOWS_OVERLAP "&Overlappet\tSkift+F5"
#define MENU_WINDOWS_SIDE_BY_SIDE "&Side om side\tSkift+F4"
#define MENU_WINDOWS_ARRANGE "&Arranger ikoner"
#define MENU_LANGUAGE "&Sprog"
#define MENU_HELP "&Hjlp"
#define MENU_HELP_CONTENTS "&Indhold"
#define MENU_HELP_SEARCH "&Sg efter hjlp om..."
#define MENU_HELP_HELP_ON_HELP "&Brug af Hjlp"
#define MENU_HELP_TUTORIAL "&Windows Selvstudium"
#define MENU_INFO "&Om Programstyring..."
#define MENU_INFO_LICENSE "&Licens"
#define MENU_INFO_NO_WARRANTY "&NO WARRANTY"
#define MENU_INFO_ABOUT_WINE "&Om WINE"
/* Dialogs */
#define DIALOG_OK "OK"
#define DIALOG_CANCEL "Annuller"
#define DIALOG_BROWSE "&Gennemse..."
#define DIALOG_HELP "&Help"
#define DIALOG_NEW_CAPTION "Nyt programobject"
#define DIALOG_NEW_NEW "Nyt"
#define DIALOG_NEW_GROUP "Program &gruppe"
#define DIALOG_NEW_PROGRAM "&Program"
#define DIALOG_MOVE_CAPTION "Flyt programelement"
#define DIALOG_MOVE_PROGRAM "Flyt elementet:"
#define DIALOG_MOVE_FROM_GROUP "Fra gruppen:"
#define DIALOG_MOVE_TO_GROUP "&Til gruppen:"
#define DIALOG_COPY_CAPTION "Kopier programelement"
#define DIALOG_COPY_PROGRAM "Kopier elementet:"
#define DIALOG_COPY_FROM_GROUP DIALOG_MOVE_FROM_GROUP
#define DIALOG_COPY_TO_GROUP DIALOG_MOVE_TO_GROUP
#define DIALOG_GROUP_CAPTION "Gruppeparametre"
#define DIALOG_GROUP_DESCRIPTION "&Beskrivelse:"
#define DIALOG_GROUP_FILE "&Gruppefil:"
#define DIALOG_PROGRAM_CAPTION "Programparametre"
#define DIALOG_PROGRAM_DESCRIPTION DIALOG_GROUP_DESCRIPTION
#define DIALOG_PROGRAM_COMMAND_LINE "&Kommandolinje:"
#define DIALOG_PROGRAM_DIRECTORY "&Arbejdsbibliotek:"
#define DIALOG_PROGRAM_HOT_KEY "Genvejs&tast:"
#define DIALOG_PROGRAM_SYMBOL "Kr &minimeret"
#define DIALOG_PROGRAM_OTHER_SYMBOL "Skift &ikon..."
#define DIALOG_SYMBOL_CAPTION "Skift ikon"
#define DIALOG_SYMBOL_FILE "&Filnavn:"
#define DIALOG_SYMBOL_CURRENT "&Nuvrende ikon:"
#define DIALOG_EXECUTE_CAPTION "Kr"
#define DIALOG_EXECUTE_COMMAND_LINE DIALOG_PROGRAM_COMMAND_LINE
#define DIALOG_EXECUTE_SYMBOL DIALOG_PROGRAM_SYMBOL
/* Strings */
#define STRING_PROGRAM_MANAGER "Programstyring"
#define STRING_ERROR "FEJL"
#define STRING_WARNING "ADVARSEL"
#define STRING_INFO "Information"
#define STRING_DELETE "Slet"
#define STRING_DELETE_GROUP_s "Slet gruppe `%s' ?"
#define STRING_DELETE_PROGRAM_s "Slet program `%s' ?"
#define STRING_NOT_IMPLEMENTED "Ikke implementeret."
#define STRING_FILE_READ_ERROR_s "Kan ikke lse filen `%s'"
#define STRING_FILE_WRITE_ERROR_s "Kan ikke skrive filen `%s'"
#define STRING_GRPFILE_READ_ERROR_s "\
Kan ikke bne gruppefilen '%s'.\n\
nsker du, at Programstyring i fremtiden stadig skal prve at indlse den?"
#define STRING_OUT_OF_MEMORY "\
Der er ikke nok hukommelse til at udfre denne operation.\n\
Afslut et eller flere aktive programmer for at frigre hukommelse, \
og prv s igen."
#define STRING_WINHELP_ERROR "\
Kan ikke vise information fra Hjlp."
#define STRING_UNKNOWN_FEATURE_s "Ukendt indhold i %s"
#define STRING_FILE_NOT_OVERWRITTEN_s "\
Filen `%s' findes. Ikke overskrevet."
#define STRING_SAVE_GROUP_AS_s "\
Gem gruppen som `%s' for at undg at overskrive originale filer"
#define STRING_NO_HOT_KEY "Ingen"
#define STRING_ALL_FILES "Alle filer (*.*)"
#define STRING_PROGRAMS "Programmer"
#define STRING_LIBRARIES_DLL "Biblioteksfiler (*.dll)"
#define STRING_SYMBOL_FILES "Ikonfiler"
#define STRING_SYMBOLS_ICO "Ikoner (*.ico)"
#include "Xx.rc"
......@@ -8,7 +8,7 @@ ALL_LIBS = $(WINELIB) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LDLIBS)
DEFS = -I$(SRCDIR)
RCFLAGS = -w32
LANGUAGES = En De Fr Fi Ko Hu It Va
LANGUAGES = En Da De Fr Fi Ko Hu It Va
LICENSELANG = En
# Installation infos
......
Fri Jul 4 12:00:00 1997 Henrik Olsen <Henrik.Olsen@iaeste.dk>
* [Da.rc] (new)
Added Danish language support.
Tue Jun 3 07:47:42 1997 Marcel Baur <mbaur@g26.ethz.ch
* [Va.rc] (new)
......
/*
* Help Viewer
*
* Copyright 1997 Henrik Olsen
*/
/* This file is not yet complete !! */
#define LANGUAGE_ID Da
#define LANGUAGE_NUMBER 6
/* Menu */
#define MENU_FILE "&Filer"
#define MENU_FILE_OPEN "Å&bn..."
#define MENU_FILE_PRINT "&Udskriv emne"
#define MENU_FILE_PRINTER_SETUP "&Indstil printer"
#define MENU_FILE_EXIT "&Afslut"
#define MENU_EDIT "&Rediger"
#define MENU_EDIT_COPY_DIALOG "K&opier..."
#define MENU_EDIT_ANNOTATE "&Anmærk..."
#define MENU_BOOKMARK "Bog&mærke"
#define MENU_BOOKMARK_DEFINE "&Definer..."
#define MENU_HELP "&Hjælp"
#define MENU_HELP_ON_HELP "&Brug af Hjælp"
#define MENU_HELP_ON_TOP "Altid &øverst"
#define MENU_HELP_INFO "&Info..."
#define MENU_HELP_ABOUT_WINE "Om &WINE"
/* Strings */
#define STRING_WINE_HELP "WINE Hjælp"
#define STRING_ERROR "FEJL"
#define STRING_WARNING "ADVARSEL"
#define STRING_INFO "Information"
#define STRING_NOT_IMPLEMENTED "Ikke implementeret"
#define STRING_HLPFILE_ERROR_s "Fejl ved læsning af filen `%s'"
#define STRING_CONTENTS "&Indhold"
#define STRING_SEARCH "&Søg"
#define STRING_BACK "&Tilbage"
#define STRING_HISTORY "&Oversigt"
#define STRING_ALL_FILES "Alle filer (*.*)"
#define STRING_HELP_FILES_HLP "Hjælpe filer (*.hlp)"
#include "Xx.rc"
......@@ -7,7 +7,7 @@ PROGRAMS = winhelp hlp2sgml
ALL_LIBS = $(WINELIB) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LDLIBS)
RCFLAGS = -w32
LANGUAGES = En De Fr Fi Ko Hu It Va
LANGUAGES = En Da De Fr Fi Ko Hu It Va
# Installation infos
......
......@@ -45,6 +45,7 @@ Today it works well for:
* Italian
* Korean
* Finnish
* Danish
...to be continued......
Thank you.
......@@ -65,6 +66,7 @@ and translate it to your language. It's okay for:
* Finnish
* Italian
* French
* Danish
.....
Thank you.
......@@ -83,6 +85,7 @@ version in all sysres_??.rc files, which needs translation in your language.
This has now been done for:
* English
* Danish
.....
Note: I picked the IDs of the menuitems "at random". When someone wants to
......
......@@ -17,14 +17,14 @@ EDITMENU MENU LOADONCALL MOVEABLE DISCARDABLE
{
POPUP ""
BEGIN
MENUITEM "&Undo", EM_UNDO32
MENUITEM "&Fortryd", EM_UNDO32
MENUITEM SEPARATOR
MENUITEM "Cu&t", WM_CUT
MENUITEM "&Copy", WM_COPY
MENUITEM "&Paste", WM_PASTE
MENUITEM "&Delete", WM_CLEAR
MENUITEM "&Klip", WM_CUT
MENUITEM "K&opier", WM_COPY
MENUITEM "St &ind", WM_PASTE
MENUITEM "&Slet", WM_CLEAR
MENUITEM SEPARATOR
MENUITEM "Select &All", EM_SETSEL32
MENUITEM "Vlg &Alt", EM_SETSEL32
END
}
......@@ -147,36 +147,66 @@ FONT 8, "Helv"
}
CHOOSE_FONT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 134
CHOOSE_FONT DIALOG DISCARDABLE 13, 54, 264, 147
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Skriftsnit"
CAPTION "Skrifttyper"
FONT 8, "Helv"
{
LTEXT "Skriftsnit:", 1088, 6, 6, 40, 9
LTEXT "", 1089, 60, 6, 150, 9
DEFPUSHBUTTON "Ok", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Annuller", 2, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP
LTEXT "Skrifttype&navn:", 1088, 6, 6, 40, 9
COMBOBOX 1136 ,6,13,94,54, CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | CBS_DISABLENOSCROLL |
CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP | CBS_SIMPLE
LTEXT "&Typografi:",1089 ,108,3,44,9
COMBOBOX 1137,108,13,64,54, CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | CBS_DISABLENOSCROLL |
WS_VSCROLL | WS_TABSTOP | CBS_SIMPLE
LTEXT "&Strrelse:",1090,179,3,30,9
COMBOBOX 1138,179,13,32,54, CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | CBS_DISABLENOSCROLL |
WS_VSCROLL | WS_TABSTOP | CBS_SIMPLE | CBS_SORT
DEFPUSHBUTTON "OK",IDOK,218,6,40,14,WS_GROUP
PUSHBUTTON "Annuller",IDCANCEL,218,23,40,14,WS_GROUP
PUSHBUTTON "&Anvend", 1026,218,40,40,14,WS_GROUP
PUSHBUTTON "&Hjlp" , 1038,218,57,40,14,WS_GROUP
GROUPBOX "Effekter",1072,6,72,84,34,WS_GROUP
CHECKBOX "&Gennemstreget", 1040, 10,82,50,10, BS_AUTOCHECKBOX | WS_TABSTOP
CHECKBOX "&Understreget", 1041, 10,94,50,10, BS_AUTOCHECKBOX
LTEXT "&Farve:", 1091 ,6,110,30,9
COMBOBOX 1139,6,120,84,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Eksempel",1073,98,72,160,49,WS_GROUP
CTEXT "AaBbYyZz",1093,104,81,149,37,SS_NOPREFIX | WS_VISIBLE
}
CHOOSE_COLOR DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 200
CHOOSE_COLOR DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 300, 200
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Farve"
FONT 8, "Helv"
{
LTEXT "&Grundlggende farver:", 1088, 6, 6, 40, 9
LTEXT "&Selvvalgte farver:", 1089, 6, 126, 40, 9
LTEXT "&Ensfarvet", 1090, 100, 146, 40, 9
LTEXT "&Intensitet:", 1091, 150, 126, 40, 9
LTEXT "&Farvemtning:", 1092, 150, 146, 40, 9
LTEXT "&Lysstyrke:", 1093, 150, 166, 40, 9
LTEXT "&Rd:", 1094, 150, 126, 40, 9
LTEXT "&Grn:", 1095, 150, 146, 40, 9
LTEXT "&Bl:", 1096, 150, 166, 40, 9
DEFPUSHBUTTON "Ok", 1, 6, 182, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Tilfj til selvvalgte farver", 1024, 120, 182, 100, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Slet selvvalgte farver", 1025, 6, 164, 56, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Annuller", 2, 76, 182, 56, 14, WS_GROUP | WS_TABSTOP
LTEXT "&Grundlggende farver:", 1088, 4, 4, 140, 10
LTEXT "&Selvvalgte farver:", 1089, 4, 106, 140, 10
LTEXT "&Ensfarvet", 1090, 150, 151, 48, 10
LTEXT "&Rd:", 726 /*1094*/,249,126,24,10
EDITTEXT 706, 275,124,18,12, WS_BORDER | WS_GROUP | WS_TABSTOP
LTEXT "&Grn:",727/*1095*/,249,140,24,10
EDITTEXT 707, 275,138,18,12, WS_BORDER | WS_GROUP | WS_TABSTOP
LTEXT "&Bl:",728 /*1096*/,249,154,24,10
EDITTEXT 708, 275,152,18,12, WS_BORDER | WS_GROUP | WS_TABSTOP
LTEXT "&Intensitet:" ,723 /*1091*/,202,126,22,10
EDITTEXT 703, 226,124,18,12, WS_BORDER | WS_GROUP | WS_TABSTOP
LTEXT "&Farvemtning:" ,724 /*1092*/,202,140,22,10
EDITTEXT 704, 226,138,18,12, WS_BORDER | WS_GROUP | WS_TABSTOP
LTEXT "&Lysstyrke:" ,725 /*1093*/,202,154,22,10
EDITTEXT 705, 226,152,18,12, WS_BORDER | WS_GROUP | WS_TABSTOP
CONTROL "" ,720,"STATIC",SS_SIMPLE|WS_TABSTOP|WS_GROUP,4,14,140,86
CONTROL "" ,721,"STATIC",SS_SIMPLE|WS_TABSTOP|WS_GROUP,4,116,140,28
CONTROL "" ,710,"STATIC",WS_BORDER|SS_SIMPLE|WS_TABSTOP|WS_GROUP, 152,4,118,116
CONTROL "" ,702,"STATIC",SS_SIMPLE|WS_TABSTOP|WS_GROUP, 278,4,8,116
CONTROL "" ,709,"STATIC",SS_SIMPLE|WS_TABSTOP|WS_GROUP, 152,124,40,26
DEFPUSHBUTTON "Ok", 1, 4, 166, 44, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Annuller", 2, 52, 166, 44, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Hjlp", 1038,100,166, 44, 14
PUSHBUTTON "&Tilfj til selvvalgte farver", 712/*1024*/, 152, 166, 142, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Definer selvvalgt farve >>", 719/*1025*/, 4, 150, 142, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "&i",713,300,200,4,14 /* just a dummy: 'i' is like &i in "sol&id" */
}
......
......@@ -62,11 +62,12 @@ by the ordinal number corresponding to the function.
- "word"
- "long"
- "ptr" (linear pointer)
- "str" (linear pointer to a string)
- "str" (linear pointer to a null-terminated string)
- "s_byte" (signed byte)
- "s_word" (signed word)
- "s_long" (signed long)
- "segptr" (segmented pointer).
- "segstr" (segmented pointer to a null-terminated string)
Only "ptr", "str" and "long" are valid for Win32 functions.
......
......@@ -372,6 +372,8 @@ static int ParseExportFunction( ORDDEF *odp )
odp->u.func.arg_types[i] = 'p';
else if (!strcmp(token, "str"))
odp->u.func.arg_types[i] = 't';
else if (!strcmp(token, "segstr"))
odp->u.func.arg_types[i] = 'T';
else
{
fprintf(stderr, "%d: Unknown variable type '%s'\n", Line, token);
......@@ -1437,14 +1439,15 @@ static int TransferArgs16To32( FILE *outfile, char *args )
pos16 += 2;
break;
case 'l': /* long */
case 'l': /* long or segmented pointer */
case 'T': /* segmented pointer to null-terminated string */
fprintf( outfile, "\tmovl %d(%%ebp),%%eax\n", pos16 );
fprintf( outfile, "\tmovl %%eax,%d(%%ebx)\n", pos32 );
pos16 += 4;
break;
case 'p': /* ptr */
case 't': /* string */
case 'p': /* linear pointer */
case 't': /* linear pointer to null-terminated string */
/* Get the selector */
fprintf( outfile, "\tmovw %d(%%ebp),%%ax\n", pos16 + 2 );
/* Get the selector base */
......@@ -1509,7 +1512,7 @@ static void BuildContext16( FILE *outfile )
fprintf( outfile, "\tpushfl\n" );
fprintf( outfile, "\tpopl %d(%%ebx)\n",
CONTEXTOFFSET(EFlags) - sizeof(CONTEXT) );
fprintf( outfile, "\tmovzwl 0(%%ebp),%%eax\n" ); /* Get %bp from stack */
fprintf( outfile, "\tmovl -16(%%ebp),%%eax\n" ); /* Get %ebp from stack */
fprintf( outfile, "\tmovl %%eax,%d(%%ebx)\n",
CONTEXTOFFSET(Ebp) - sizeof(CONTEXT) );
fprintf( outfile, "\tmovzwl 2(%%ebp),%%eax\n" ); /* Get %ip from stack */
......@@ -1545,6 +1548,10 @@ static void RestoreContext16( FILE *outfile )
fprintf( outfile, "\tmovl " PREFIX "IF1632_Saved32_esp,%%ebx\n" );
/* Remove everything up to the return address from the 16-bit stack */
fprintf( outfile, "\taddl $18,%%esp\n" );
/* Restore the registers */
fprintf( outfile, "\tmovl %d(%%ebx),%%ecx\n",
......@@ -1555,8 +1562,8 @@ static void RestoreContext16( FILE *outfile )
CONTEXTOFFSET(Esi) - sizeof(CONTEXT) );
fprintf( outfile, "\tmovl %d(%%ebx),%%edi\n",
CONTEXTOFFSET(Edi) - sizeof(CONTEXT) );
fprintf( outfile, "\tpopl %%eax\n" ); /* Remove old ds and ip from stack */
fprintf( outfile, "\tpopl %%eax\n" ); /* Remove old cs and es from stack */
fprintf( outfile, "\tmovl %d(%%ebx),%%ebp\n",
CONTEXTOFFSET(Ebp) - sizeof(CONTEXT) );
fprintf( outfile, "\tpushw %d(%%ebx)\n", /* Push new ds */
CONTEXTOFFSET(SegDs) - sizeof(CONTEXT) );
fprintf( outfile, "\tpushw %d(%%ebx)\n", /* Push new es */
......@@ -1568,6 +1575,8 @@ static void RestoreContext16( FILE *outfile )
CONTEXTOFFSET(Eax) - sizeof(CONTEXT) );
fprintf( outfile, "\tmovl %d(%%ebx),%%ebx\n",
CONTEXTOFFSET(Ebx) - sizeof(CONTEXT) );
fprintf( outfile, "\tpopw %%es\n" ); /* Set es */
fprintf( outfile, "\tpopw %%ds\n" ); /* Set ds */
}
......@@ -1577,7 +1586,8 @@ static void RestoreContext16( FILE *outfile )
* Build a 16-bit-to-Wine callback function. The syntax of the function
* profile is: type_xxxxx, where 'type' is one of 'regs', 'word' or
* 'long' and each 'x' is an argument ('w'=word, 's'=signed word,
* 'l'=long, 'p'=pointer, 't'=string).
* 'l'=long, 'p'=linear pointer, 't'=linear pointer to null-terminated string,
* 'T'=segmented pointer to null-terminated string).
* For register functions, the arguments are ignored, but they are still
* removed from the stack upon return.
*
......@@ -1587,12 +1597,16 @@ static void RestoreContext16( FILE *outfile )
* (sp+16) word cs
* (sp+14) word ip
* (sp+12) word bp
* (sp+8) long 32-bit entry point
* (sp+8) long 32-bit entry point (used to store edx)
* (sp+6) word high word of cs (always 0, used to store es)
* (sp+4) word low word of cs of 16-bit entry point
* (sp+2) word high word of ip (always 0, used to store ds)
* (sp) word low word of ip of 16-bit entry point
*
* Added on the stack:
* (sp-4) long ebp
* (sp-6) word saved previous sp
* (sp-8) word saved previous ss
*/
static void BuildCallFrom16Func( FILE *outfile, char *profile )
{
......@@ -1623,8 +1637,9 @@ static void BuildCallFrom16Func( FILE *outfile, char *profile )
/* Setup bp to point to its copy on the stack */
fprintf( outfile, "\tpushl %%ebp\n" ); /* Save the full 32-bit ebp */
fprintf( outfile, "\tmovzwl %%sp,%%ebp\n" );
fprintf( outfile, "\taddw $12,%%bp\n" );
fprintf( outfile, "\taddw $16,%%bp\n" );
/* Save 16-bit ds and es */
......@@ -1644,13 +1659,12 @@ static void BuildCallFrom16Func( FILE *outfile, char *profile )
/* Save the 16-bit stack */
fprintf( outfile, "\tpushw " PREFIX "IF1632_Saved16_sp\n" );
fprintf( outfile, "\tpushw " PREFIX "IF1632_Saved16_ss\n" );
fprintf( outfile, "\tpushl " PREFIX "IF1632_Saved16_ss_sp\n" );
#ifdef __svr4__
fprintf( outfile,"\tdata16\n");
#endif
fprintf( outfile, "\tmovw %%ss," PREFIX "IF1632_Saved16_ss\n" );
fprintf( outfile, "\tmovw %%sp," PREFIX "IF1632_Saved16_sp\n" );
fprintf( outfile, "\tmovw %%ss," PREFIX "IF1632_Saved16_ss_sp+2\n" );
fprintf( outfile, "\tmovw %%sp," PREFIX "IF1632_Saved16_ss_sp\n" );
/* Transfer the arguments */
......@@ -1713,22 +1727,12 @@ static void BuildCallFrom16Func( FILE *outfile, char *profile )
#ifdef __svr4__
fprintf( outfile, "\tdata16\n");
#endif
fprintf( outfile, "\tmovw " PREFIX "IF1632_Saved16_ss,%%ss\n" );
fprintf( outfile, "\tmovw " PREFIX "IF1632_Saved16_sp,%%sp\n" );
#ifdef __svr4__
fprintf( outfile, "\tdata16\n");
#endif
fprintf( outfile, "\tpopw " PREFIX "IF1632_Saved16_ss\n" );
#ifdef __svr4__
fprintf( outfile, "\tdata16\n");
#endif
fprintf( outfile, "\tpopw " PREFIX "IF1632_Saved16_sp\n" );
fprintf( outfile, "\tmovw " PREFIX "IF1632_Saved16_ss_sp+2,%%ss\n" );
fprintf( outfile, "\tmovw " PREFIX "IF1632_Saved16_ss_sp,%%sp\n" );
fprintf( outfile, "\tpopl " PREFIX "IF1632_Saved16_ss_sp\n" );
if (reg_func)
{
/* Restore registers from the context structure */
RestoreContext16( outfile );
/* Calc the arguments size */
while (*args)
{
......@@ -1741,6 +1745,7 @@ static void BuildCallFrom16Func( FILE *outfile, char *profile )
case 'p':
case 't':
case 'l':
case 'T':
argsize += 4;
break;
default:
......@@ -1749,37 +1754,34 @@ static void BuildCallFrom16Func( FILE *outfile, char *profile )
args++;
}
/* Restore ds and es */
fprintf( outfile, "\tpopw %%es\n" );
fprintf( outfile, "\tpopw %%ds\n" );
/* Remove the entry point from the stack */
/* (we don't use add to avoid modifying the carry flag) */
fprintf( outfile, "\tpopl %%ebp\n" );
/* Restore registers from the context structure */
RestoreContext16( outfile );
}
else
{
/* Restore high 16 bits of ebp */
fprintf( outfile, "\tpopl %%ebp\n" );
/* Restore ds and es */
fprintf( outfile, "\tpopw %%bp\n" ); /* Remove ip */
fprintf( outfile, "\tpopl %%ebp\n" ); /* Remove ds and cs */
fprintf( outfile, "\tmovw %%bp,%%ds\n" ); /* Restore ds */
fprintf( outfile, "\tincl %%esp\n" ); /* Remove ip */
fprintf( outfile, "\tincl %%esp\n" );
fprintf( outfile, "\tpopl %%edx\n" ); /* Remove cs and ds */
fprintf( outfile, "\tmovw %%dx,%%ds\n" ); /* and restore ds */
fprintf( outfile, "\tpopw %%es\n" ); /* Restore es */
if (short_ret) fprintf( outfile, "\tpopl %%edx\n" ); /* Restore edx */
else
{
/* Get the return value into dx:ax */
fprintf( outfile, "\tpushl %%eax\n" );
fprintf( outfile, "\tpopw %%ax\n" );
fprintf( outfile, "\tpopw %%dx\n" );
fprintf( outfile, "\tmovl %%eax,%%edx\n" );
fprintf( outfile, "\tshrl $16,%%edx\n" );
/* Remove API entry point */
fprintf( outfile, "\taddl $4,%%esp\n" );
}
}
/* Restore bp */
fprintf( outfile, "\tpopw %%bp\n" );
/* Restore low 16 bits of ebp */
fprintf( outfile, "\tpopw %%bp\n" );
}
/* Remove the arguments and return */
......@@ -1882,8 +1884,8 @@ static void BuildCallTo16Func( FILE *outfile, char *profile )
#ifdef __svr4__
fprintf( outfile,"\tdata16\n");
#endif
fprintf( outfile, "\tmovw " PREFIX "IF1632_Saved16_ss,%%ss\n" );
fprintf( outfile, "\tmovw " PREFIX "IF1632_Saved16_sp,%%sp\n" );
fprintf( outfile, "\tmovw " PREFIX "IF1632_Saved16_ss_sp+2,%%ss\n" );
fprintf( outfile, "\tmovw " PREFIX "IF1632_Saved16_ss_sp,%%sp\n" );
/* Transfer the arguments */
......@@ -1906,7 +1908,7 @@ static void BuildCallTo16Func( FILE *outfile, char *profile )
/* Make %bp point to the previous stackframe (built by CallFrom16) */
fprintf( outfile, "\tmovzwl %%sp,%%ebp\n" );
fprintf( outfile, "\taddw $16,%%bp\n" );
fprintf( outfile, "\taddw $20,%%bp\n" );
while (*args)
{
......@@ -1918,6 +1920,9 @@ static void BuildCallTo16Func( FILE *outfile, char *profile )
case 'l': /* long */
fprintf( outfile, "\tpushl %d(%%ebx)\n", pos );
break;
default:
fprintf( stderr, "Unexpected case '%c' in BuildCallTo16Func\n",
args[-1] );
}
pos += 4;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment