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.
This commit is contained in:
parent
33072e1f2c
commit
d37eb3656c
42
ANNOUNCE
42
ANNOUNCE
|
@ -1,13 +1,13 @@
|
|||
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
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
@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.
|
2
BUGS
2
BUGS
|
@ -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
|
||||
|
|
126
ChangeLog
126
ChangeLog
|
@ -1,3 +1,129 @@
|
|||
----------------------------------------------------------------------
|
||||
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>
|
||||
|
||||
|
|
19
LICENSE
19
LICENSE
|
@ -1,3 +1,11 @@
|
|||
@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)
|
||||
|
|
13
Makefile.in
13
Makefile.in
|
@ -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
|
||||
|
|
1
README
1
README
|
@ -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.
|
||||
|
||||
|
|
7
WARRANTY
7
WARRANTY
|
@ -1,3 +1,10 @@
|
|||
@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);
|
||||
}
|
||||
|
||||
|
|
155
controls/menu.c
155
controls/menu.c
|
@ -33,8 +33,19 @@
|
|||
#include "graphics.h"
|
||||
#include "resource.h"
|
||||
#include "stddebug.h"
|
||||
#include "tweak.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
UINT32 MENU_BarItemTopNudge;
|
||||
UINT32 MENU_BarItemLeftNudge;
|
||||
UINT32 MENU_ItemTopNudge;
|
||||
UINT32 MENU_ItemLeftNudge;
|
||||
UINT32 MENU_HighlightTopNudge;
|
||||
UINT32 MENU_HighlightLeftNudge;
|
||||
UINT32 MENU_HighlightBottomNudge;
|
||||
UINT32 MENU_HighlightRightNudge;
|
||||
|
||||
/* internal popup menu window messages */
|
||||
|
||||
#define MM_SETMENUHANDLE (WM_USER + 0)
|
||||
|
@ -101,13 +112,13 @@ typedef struct
|
|||
#define POPUP_YSHADE 4
|
||||
|
||||
/* Space between 2 menu bar items */
|
||||
#define MENU_BAR_ITEMS_SPACE 16
|
||||
int MENU_BAR_ITEMS_SPACE = 12;
|
||||
|
||||
/* Minimum width of a tab character */
|
||||
#define MENU_TAB_SPACE 8
|
||||
int MENU_TAB_SPACE = 8;
|
||||
|
||||
/* Height of a separator item */
|
||||
#define SEPARATOR_HEIGHT 5
|
||||
int SEPARATOR_HEIGHT = 5;
|
||||
|
||||
/* (other menu->FocusedItem values give the position of the focused item) */
|
||||
#define NO_SELECTED_ITEM 0xffff
|
||||
|
@ -147,14 +158,18 @@ static HMENU32 MENU_CopySysPopup(void)
|
|||
{
|
||||
HMENU32 hMenu = LoadMenuIndirect32A(SYSRES_GetResPtr(SYSRES_MENU_SYSMENU));
|
||||
|
||||
if( hMenu )
|
||||
{
|
||||
if( hMenu ) {
|
||||
POPUPMENU* menu = (POPUPMENU *) USER_HEAP_LIN_ADDR(hMenu);
|
||||
menu->wFlags |= MF_SYSMENU | MF_POPUP;
|
||||
return hMenu;
|
||||
}
|
||||
else fprintf( stderr, "Unable to load default system menu\n" );
|
||||
return FALSE;
|
||||
else {
|
||||
hMenu = 0;
|
||||
fprintf( stderr, "Unable to load default system menu\n" );
|
||||
}
|
||||
|
||||
dprintf_menu( stddeb, "MENU_CopySysPopup: returning %ld.\n", hMenu );
|
||||
|
||||
return hMenu;
|
||||
}
|
||||
|
||||
|
||||
|
@ -409,6 +424,10 @@ static void MENU_CalcItemSize( HDC32 hdc, MENUITEM *lpitem, HWND32 hwndOwner,
|
|||
DWORD dwSize;
|
||||
char *p;
|
||||
|
||||
dprintf_menu( stddeb, "MENU_CalcItemSize: HDC 0x%lx, item '%s', at "
|
||||
"(%d, %d) %s\n", hdc, lpitem->text, orgX, orgY,
|
||||
menuBar ? "(MenuBar)" : "" );
|
||||
|
||||
SetRect32( &lpitem->rect, orgX, orgY, orgX, orgY );
|
||||
|
||||
if (lpitem->item_flags & MF_OWNERDRAW)
|
||||
|
@ -509,6 +528,13 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop, HWND32 hwndOwner )
|
|||
{
|
||||
if ((i != start) &&
|
||||
(lpitem->item_flags & (MF_MENUBREAK | MF_MENUBARBREAK))) break;
|
||||
|
||||
dprintf_menu( stddeb, "MENU_PopupMenuCalcSize: calling "
|
||||
"MENU_CalcItemSize on '%s', org=(%d, %d)\n",
|
||||
lpitem->text, orgX, orgY );
|
||||
if(TWEAK_Win95Look)
|
||||
++orgY;
|
||||
|
||||
MENU_CalcItemSize( hdc, lpitem, hwndOwner, orgX, orgY, FALSE );
|
||||
if (lpitem->item_flags & MF_MENUBARBREAK) orgX++;
|
||||
maxX = MAX( maxX, lpitem->rect.right );
|
||||
|
@ -572,6 +598,11 @@ static void MENU_MenuBarCalcSize( HDC32 hdc, LPRECT32 lprect,
|
|||
if ((helpPos == -1) && (lpitem->item_flags & MF_HELP)) helpPos = i;
|
||||
if ((i != start) &&
|
||||
(lpitem->item_flags & (MF_MENUBREAK | MF_MENUBARBREAK))) break;
|
||||
|
||||
|
||||
dprintf_menu( stddeb, "MENU_MenuBarCalcSize: calling "
|
||||
"MENU_CalcItemSize on item '%s', org=(%d, %d)\n",
|
||||
lpitem->text, orgX, orgY );
|
||||
MENU_CalcItemSize( hdc, lpitem, hwndOwner, orgX, orgY, TRUE );
|
||||
if (lpitem->rect.right > lprect->right)
|
||||
{
|
||||
|
@ -619,8 +650,17 @@ static void MENU_DrawMenuItem( HWND32 hwnd, HDC32 hdc, MENUITEM *lpitem,
|
|||
|
||||
if (lpitem->item_flags & MF_SYSMENU)
|
||||
{
|
||||
if( !IsIconic32(hwnd) ) NC_DrawSysButton( hwnd, hdc,
|
||||
lpitem->item_flags & (MF_HILITE | MF_MOUSESELECT));
|
||||
if( !IsIconic32(hwnd) ) {
|
||||
if(TWEAK_Win95Look)
|
||||
NC_DrawSysButton95( hwnd, hdc,
|
||||
lpitem->item_flags &
|
||||
(MF_HILITE | MF_MOUSESELECT) );
|
||||
else
|
||||
NC_DrawSysButton( hwnd, hdc,
|
||||
lpitem->item_flags &
|
||||
(MF_HILITE | MF_MOUSESELECT) );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -648,10 +688,32 @@ static void MENU_DrawMenuItem( HWND32 hwnd, HDC32 hdc, MENUITEM *lpitem,
|
|||
rect = lpitem->rect;
|
||||
|
||||
/* Draw the background */
|
||||
if(TWEAK_Win95Look) {
|
||||
if(menuBar) {
|
||||
--rect.left;
|
||||
++rect.bottom;
|
||||
--rect.top;
|
||||
}
|
||||
InflateRect32( &rect, -1, -1 );
|
||||
}
|
||||
|
||||
if (lpitem->item_flags & MF_HILITE) {
|
||||
RECT32 r = rect;
|
||||
r.top += MENU_HighlightTopNudge;
|
||||
r.bottom += MENU_HighlightBottomNudge;
|
||||
r.left += MENU_HighlightLeftNudge;
|
||||
r.right += MENU_HighlightRightNudge;
|
||||
FillRect32( hdc, &r, sysColorObjects.hbrushHighlight );
|
||||
}
|
||||
else {
|
||||
RECT32 r = rect;
|
||||
r.top += MENU_HighlightTopNudge;
|
||||
r.bottom += MENU_HighlightBottomNudge;
|
||||
r.left += MENU_HighlightLeftNudge;
|
||||
r.right += MENU_HighlightRightNudge;
|
||||
FillRect32( hdc, &r, sysColorObjects.hbrushMenu );
|
||||
}
|
||||
|
||||
if (lpitem->item_flags & MF_HILITE)
|
||||
FillRect32( hdc, &rect, sysColorObjects.hbrushHighlight );
|
||||
else FillRect32( hdc, &rect, sysColorObjects.hbrushMenu );
|
||||
SetBkMode32( hdc, TRANSPARENT );
|
||||
|
||||
/* Draw the separator bar (if any) */
|
||||
|
@ -664,9 +726,16 @@ static void MENU_DrawMenuItem( HWND32 hwnd, HDC32 hdc, MENUITEM *lpitem,
|
|||
}
|
||||
if (lpitem->item_flags & MF_SEPARATOR)
|
||||
{
|
||||
if(TWEAK_Win95Look)
|
||||
TWEAK_DrawMenuSeparator95(hdc, rect.left + 1,
|
||||
rect.top + SEPARATOR_HEIGHT / 2 + 1,
|
||||
rect.right - 1);
|
||||
else {
|
||||
SelectObject32( hdc, sysColorObjects.hpenWindowFrame );
|
||||
MoveTo( hdc, rect.left, rect.top + SEPARATOR_HEIGHT/2 );
|
||||
LineTo32( hdc, rect.right, rect.top + SEPARATOR_HEIGHT/2 );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -742,16 +811,40 @@ static void MENU_DrawMenuItem( HWND32 hwnd, HDC32 hdc, MENUITEM *lpitem,
|
|||
rect.left += MENU_BAR_ITEMS_SPACE / 2;
|
||||
rect.right -= MENU_BAR_ITEMS_SPACE / 2;
|
||||
i = strlen( lpitem->text );
|
||||
|
||||
rect.top += MENU_BarItemTopNudge;
|
||||
rect.left += MENU_BarItemLeftNudge;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; lpitem->text[i]; i++)
|
||||
if ((lpitem->text[i] == '\t') || (lpitem->text[i] == '\b'))
|
||||
break;
|
||||
|
||||
rect.top += MENU_ItemTopNudge;
|
||||
rect.left += MENU_ItemLeftNudge;
|
||||
}
|
||||
|
||||
if(!TWEAK_Win95Look || !(lpitem->item_flags & MF_GRAYED)) {
|
||||
DrawText32A( hdc, lpitem->text, i, &rect,
|
||||
DT_LEFT | DT_VCENTER | DT_SINGLELINE );
|
||||
}
|
||||
else {
|
||||
++rect.left;
|
||||
++rect.top;
|
||||
++rect.right;
|
||||
++rect.bottom;
|
||||
SetTextColor32(hdc, RGB(0xff, 0xff, 0xff));
|
||||
DrawText32A( hdc, lpitem->text, i, &rect,
|
||||
DT_LEFT | DT_VCENTER | DT_SINGLELINE );
|
||||
--rect.left;
|
||||
--rect.top;
|
||||
--rect.right;
|
||||
--rect.bottom;
|
||||
SetTextColor32(hdc, RGB(0x80, 0x80, 0x80));
|
||||
DrawText32A( hdc, lpitem->text, i, &rect,
|
||||
DT_LEFT | DT_VCENTER | DT_SINGLELINE );
|
||||
}
|
||||
|
||||
if (lpitem->text[i]) /* There's a tab or flush-right char */
|
||||
{
|
||||
|
@ -787,6 +880,7 @@ static void MENU_DrawPopupMenu( HWND32 hwnd, HDC32 hdc, HMENU32 hmenu )
|
|||
HPEN32 hPrevPen;
|
||||
|
||||
Rectangle32( hdc, rect.left, rect.top, rect.right, rect.bottom );
|
||||
|
||||
hPrevPen = SelectObject32( hdc, GetStockObject32( NULL_PEN ) );
|
||||
if( hPrevPen )
|
||||
{
|
||||
|
@ -794,20 +888,26 @@ static void MENU_DrawPopupMenu( HWND32 hwnd, HDC32 hdc, HMENU32 hmenu )
|
|||
POPUPMENU *menu;
|
||||
|
||||
/* draw 3-d shade */
|
||||
|
||||
if(!TWEAK_Win95Look) {
|
||||
SelectObject32( hdc, hShadeBrush );
|
||||
SetBkMode32( hdc, TRANSPARENT );
|
||||
ropPrev = SetROP232( hdc, R2_MASKPEN );
|
||||
|
||||
i = rect.right; /* why SetBrushOrg() doesn't? */
|
||||
PatBlt32( hdc, i & 0xfffffffe, rect.top + POPUP_YSHADE*SYSMETRICS_CYBORDER,
|
||||
i%2 + POPUP_XSHADE*SYSMETRICS_CXBORDER, rect.bottom - rect.top, 0x00a000c9 );
|
||||
PatBlt32( hdc, i & 0xfffffffe,
|
||||
rect.top + POPUP_YSHADE*SYSMETRICS_CYBORDER,
|
||||
i%2 + POPUP_XSHADE*SYSMETRICS_CXBORDER,
|
||||
rect.bottom - rect.top, 0x00a000c9 );
|
||||
i = rect.bottom;
|
||||
PatBlt32( hdc, rect.left + POPUP_XSHADE*SYSMETRICS_CXBORDER, i & 0xfffffffe,
|
||||
rect.right - rect.left, i%2 + POPUP_YSHADE*SYSMETRICS_CYBORDER, 0x00a000c9 );
|
||||
PatBlt32( hdc, rect.left + POPUP_XSHADE*SYSMETRICS_CXBORDER,
|
||||
i & 0xfffffffe,rect.right - rect.left,
|
||||
i%2 + POPUP_YSHADE*SYSMETRICS_CYBORDER, 0x00a000c9 );
|
||||
SelectObject32( hdc, hPrevPen );
|
||||
SelectObject32( hdc, hPrevBrush );
|
||||
SetROP232( hdc, ropPrev );
|
||||
}
|
||||
else
|
||||
TWEAK_DrawReliefRect95(hdc, &rect);
|
||||
|
||||
/* draw menu items */
|
||||
|
||||
|
@ -846,10 +946,16 @@ UINT32 MENU_DrawMenuBar( HDC32 hDC, LPRECT32 lprect, HWND32 hwnd,
|
|||
lprect->bottom = lprect->top + lppop->Height;
|
||||
if (suppress_draw) return lppop->Height;
|
||||
|
||||
if(TWEAK_Win95Look)
|
||||
++lprect->bottom;
|
||||
|
||||
FillRect32(hDC, lprect, sysColorObjects.hbrushMenu );
|
||||
|
||||
if(!TWEAK_Win95Look) {
|
||||
SelectObject32( hDC, sysColorObjects.hpenWindowFrame );
|
||||
MoveTo( hDC, lprect->left, lprect->bottom );
|
||||
LineTo32( hDC, lprect->right, lprect->bottom );
|
||||
}
|
||||
|
||||
if (lppop->nItems == 0) return SYSMETRICS_CYMENU;
|
||||
for (i = 0; i < lppop->nItems; i++)
|
||||
|
@ -1116,8 +1222,8 @@ static BOOL32 MENU_SetItemData( MENUITEM *item, UINT32 flags, UINT32 id,
|
|||
LPSTR prevText = IS_STRING_ITEM(item->item_flags) ? item->text : NULL;
|
||||
|
||||
dprintf_menu(stddeb,"SetItemData: %04x [%08x] '%s' -> %04x [%08x] '%s'\n",
|
||||
item->item_flags, item->item_id, item->text ? item->text : "",
|
||||
flags, id, str ? str : "" );
|
||||
item->item_flags, item->item_id, prevText ? prevText : "",
|
||||
flags, id, (IS_STRING_ITEM(flags) && str) ? str : "" );
|
||||
|
||||
if (IS_STRING_ITEM(flags))
|
||||
{
|
||||
|
@ -2241,6 +2347,9 @@ UINT32 MENU_GetMenuBarHeight( HWND32 hwnd, UINT32 menubarWidth,
|
|||
WND *wndPtr;
|
||||
LPPOPUPMENU lppop;
|
||||
|
||||
dprintf_menu( stddeb, "MENU_GetMenuBarHeight: HWND 0x%lx, width %d, "
|
||||
"at (%d, %d).\n", hwnd, menubarWidth, orgX, orgY );
|
||||
|
||||
if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return 0;
|
||||
if (!(lppop = (LPPOPUPMENU)USER_HEAP_LIN_ADDR((HMENU16)wndPtr->wIDmenu)))
|
||||
return 0;
|
||||
|
@ -2578,9 +2687,11 @@ BOOL32 InsertMenu32A( HMENU32 hMenu, UINT32 pos, UINT32 flags,
|
|||
MENUITEM *item;
|
||||
|
||||
if (IS_STRING_ITEM(flags) && str)
|
||||
dprintf_menu( stddeb, "InsertMenu: %04x %d %04x %04x '%s'\n",
|
||||
dprintf_menu( stddeb, "InsertMenu: hMenu %04x, pos %d, flags %04x, "
|
||||
"id %04x, str '%s'\n",
|
||||
hMenu, pos, flags, id, str );
|
||||
else dprintf_menu( stddeb, "InsertMenu: %04x %d %04x %04x %08lx\n",
|
||||
else dprintf_menu( stddeb, "InsertMenu: hMenu %04x, pos %d, flags %04x, "
|
||||
"id %04x, str %08lx (not a string)\n",
|
||||
hMenu, pos, flags, id, (DWORD)str );
|
||||
|
||||
if (!(item = MENU_InsertItem( hMenu, pos, flags ))) return FALSE;
|
||||
|
|
|
@ -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 );
|
||||
|
@ -64,10 +65,37 @@ 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,24 +105,16 @@ 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);
|
||||
CREATESTRUCT32A *cs = (CREATESTRUCT32A *)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 );
|
||||
}
|
||||
STATIC_SetIcon( wndPtr,
|
||||
STATIC_LoadIcon( wndPtr, cs->lpszName ));
|
||||
return 1;
|
||||
}
|
||||
return DefWindowProc16(hWnd, uMsg, wParam, lParam);
|
||||
return DefWindowProc32A( hWnd, uMsg, wParam, lParam );
|
||||
|
||||
case WM_CREATE:
|
||||
if (style < 0L || style > LAST_STATIC_TYPE)
|
||||
|
@ -113,19 +133,23 @@ LRESULT StaticWndProc( HWND16 hWnd, UINT16 uMsg, WPARAM16 wParam,
|
|||
if (style == SS_ICON)
|
||||
DestroyIcon32( STATIC_SetIcon( wndPtr, 0 ) );
|
||||
else
|
||||
lResult = DefWindowProc16(hWnd, uMsg, wParam, lParam);
|
||||
lResult = DefWindowProc32A( hWnd, uMsg, wParam, lParam );
|
||||
break;
|
||||
|
||||
case WM_PAINT:
|
||||
{
|
||||
PAINTSTRUCT16 ps;
|
||||
BeginPaint16( hWnd, &ps );
|
||||
PAINTSTRUCT32 ps;
|
||||
BeginPaint32( hWnd, &ps );
|
||||
if (staticPaintFunc[style])
|
||||
(staticPaintFunc[style])( wndPtr, ps.hdc );
|
||||
EndPaint16( hWnd, &ps );
|
||||
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);
|
||||
|
@ -136,10 +160,9 @@ LRESULT StaticWndProc( HWND16 hWnd, UINT16 uMsg, WPARAM16 wParam,
|
|||
case WM_SETTEXT:
|
||||
if (style == SS_ICON)
|
||||
/* FIXME : should we also return the previous hIcon here ??? */
|
||||
STATIC_SetIcon( wndPtr, LoadIcon16( wndPtr->hInstance,
|
||||
(SEGPTR)lParam ));
|
||||
STATIC_SetIcon( wndPtr, STATIC_LoadIcon( wndPtr, (LPCSTR)lParam ));
|
||||
else
|
||||
DEFWND_SetText( wndPtr, (LPSTR)PTR_SEG_TO_LIN(lParam) );
|
||||
DEFWND_SetText( wndPtr, (LPCSTR)lParam );
|
||||
InvalidateRect32( hWnd, NULL, FALSE );
|
||||
UpdateWindow32( hWnd );
|
||||
break;
|
||||
|
@ -173,7 +196,7 @@ LRESULT StaticWndProc( HWND16 hWnd, UINT16 uMsg, WPARAM16 wParam,
|
|||
break;
|
||||
|
||||
default:
|
||||
lResult = DefWindowProc16(hWnd, uMsg, wParam, lParam);
|
||||
lResult = DefWindowProc32A(hWnd, uMsg, wParam, lParam);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -183,14 +206,14 @@ LRESULT StaticWndProc( HWND16 hWnd, UINT16 uMsg, WPARAM16 wParam,
|
|||
|
||||
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"},
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
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:
|
|
@ -0,0 +1,50 @@
|
|||
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
|
|
@ -0,0 +1,780 @@
|
|||
\input texinfo @c -*-texinfo-*-
|
||||
@c %**start of header
|
||||
@setfilename wine.info
|
||||
@settitle Wine Reference Manual
|
||||
@iftex
|
||||
@afourpaper
|
||||
@end iftex
|
||||
@c %**end of header
|
||||
|
||||
@ifinfo
|
||||
@format
|
||||
START-INFO-DIR-ENTRY
|
||||
* wine: (wine.info). The Windows Emulator.
|
||||
END-INFO-DIR-ENTRY
|
||||
@end format
|
||||
@end ifinfo
|
||||
|
||||
@iftex
|
||||
@c @finalout
|
||||
@end iftex
|
||||
|
||||
@ifinfo
|
||||
This file documents Wine, the Windows Emulator.
|
||||
|
||||
@c
|
||||
Copyright @copyright{} 1997 The Wine authors. @*
|
||||
@xref{Authors}, for a list of the copyright holders.
|
||||
|
||||
Permission is granted to make and distribute verbatim
|
||||
copies of this manual provided the copyright notice and
|
||||
this permission notice are preserved on all copies.
|
||||
|
||||
@ignore
|
||||
Permission is granted to process this file through TeX
|
||||
and print the results, provided the printed document
|
||||
carries a copying permission notice identical to this
|
||||
one except for the removal of this paragraph (this
|
||||
paragraph not being relevant to the printed manual).
|
||||
|
||||
@end ignore
|
||||
Permission is granted to copy and distribute modified
|
||||
versions of this manual under the conditions stated in
|
||||
the section entitled ``License, Warranty, and Authors of Wine''.
|
||||
|
||||
@sp 4
|
||||
FIXME: UNIX and POSIX trademarks. @*
|
||||
MS-Windows, Windows-NT, Windows 95 are registered trademarks of
|
||||
Microsoft Corp. Postscript is a registered trademark of Adobe Systems
|
||||
Inc. All other product names mentioned herein are the trademarks of
|
||||
their respective owners.
|
||||
@end ifinfo
|
||||
|
||||
@c begin chapters on right pages
|
||||
@setchapternewpage odd
|
||||
|
||||
@titlepage
|
||||
@sp 10
|
||||
|
||||
@center @titlefont{The Wine Reference Manual}
|
||||
@center Edition 0.0.1, 6 July 1997
|
||||
|
||||
|
||||
@c The following two commands start the copyright page.
|
||||
@page
|
||||
@vskip 0pt plus 1filll
|
||||
|
||||
Copyright @copyright{} 1997 The Wine authors. @*
|
||||
@xref{Authors}, for a list of the copyright holders.
|
||||
|
||||
Permission is granted to make and distribute verbatim
|
||||
copies of this manual provided the copyright notice and
|
||||
this permission notice are preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified
|
||||
versions of this manual under the conditions stated in
|
||||
the section entitled ``License, Warranty, and Authors of Wine''.
|
||||
|
||||
@sp 4
|
||||
FIXME: UNIX and POSIX trademarks. @*
|
||||
MS-Windows, Windows-NT, Windows 95 are registered trademarks of
|
||||
Microsoft Corp. Postscript is a registered trademark of Adobe Systems
|
||||
Inc. All other product names mentioned herein are the trademarks of
|
||||
their respective owners.
|
||||
@end titlepage
|
||||
|
||||
|
||||
|
||||
@c
|
||||
@c SETTINGS, DEFINES, MACROS
|
||||
@c
|
||||
|
||||
@c Edit this macro manually in the above parts of the document
|
||||
@macro winemanualversion
|
||||
0.0.1
|
||||
@end macro
|
||||
|
||||
@c Edit this macro manually in the above parts of the document
|
||||
@macro winemanualdate
|
||||
6 July 1997
|
||||
@end macro
|
||||
|
||||
@c Edit this macro manually into the TeX titlepage
|
||||
@macro winemanualtitle {}
|
||||
The Wine Reference Manual
|
||||
@end macro
|
||||
|
||||
@c
|
||||
@c MICROSOFT
|
||||
@c
|
||||
|
||||
@c FIXME: automatical trademark reference
|
||||
@macro mswindows
|
||||
MS-Windows
|
||||
@end macro
|
||||
|
||||
@c FIXME: automatical trademark reference
|
||||
@c spell it always the same
|
||||
@macro WIN32
|
||||
WIN32
|
||||
@end macro
|
||||
|
||||
@c FIXME: automatical trademark reference
|
||||
@macro WINNT
|
||||
Windows NT
|
||||
@end macro
|
||||
|
||||
@c FIXME: automatical trademark reference
|
||||
@macro WIN95
|
||||
Windows 95
|
||||
@end macro
|
||||
|
||||
|
||||
@c
|
||||
@c THE OTHERS
|
||||
@c
|
||||
@c FIXME: automatical trademark reference
|
||||
@macro unix
|
||||
UNIX
|
||||
@end macro
|
||||
|
||||
@c FIXME: automatical trademark reference
|
||||
@macro posix
|
||||
POSIX
|
||||
@end macro
|
||||
@c
|
||||
@c THIS MANUAL
|
||||
@c
|
||||
|
||||
@c flag out differences to MS-Windows
|
||||
@macro windiff
|
||||
@emph{Differences to @mswindows{}:} @*
|
||||
@end macro
|
||||
|
||||
@macro windiffnone
|
||||
@windiff{}
|
||||
No differences known.
|
||||
@end macro
|
||||
|
||||
@c tell whether function is present in Windows 95 and/or NT
|
||||
@macro winconf
|
||||
@emph{Conformance to @mswindows{}:} @*
|
||||
@end macro
|
||||
|
||||
@macro winconfall
|
||||
@winconf{}
|
||||
Present in @WIN95{} and @WINNT{}.
|
||||
@end macro
|
||||
|
||||
@c give information about completion
|
||||
@macro completion
|
||||
@emph{Completion status:} @*
|
||||
@end macro
|
||||
|
||||
@macro completionnone
|
||||
@completion{}
|
||||
Not yet implemented.
|
||||
@end macro
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@c
|
||||
@c TOP NODE
|
||||
@c
|
||||
@ifinfo
|
||||
@node Top, Copying, (dir), (dir)
|
||||
@top Wine
|
||||
|
||||
This is edition @winemanualversion{}, last updated @winemanualdate{},
|
||||
of @winemanualtitle{}.
|
||||
|
||||
Wine (Wine Is Not an Emulator, or the WINdows Emulator)
|
||||
is both an emulator that runs @mswindows{} executables and a library
|
||||
that can be used to compile @mswindows{} source code.
|
||||
|
||||
Wine is free software. Wine is still in development-only state.
|
||||
@end ifinfo
|
||||
|
||||
@menu
|
||||
* Copying:: License, Warranty, and Authors of Wine.
|
||||
* Introduction:: A short overview.
|
||||
* Reference Manual:: The Wine reference manual.
|
||||
* Installation:: Installing Wine.
|
||||
* The Wine Project:: How to contribute to Wine.
|
||||
* Concept Index:: Index of concepts and names.
|
||||
* Type Index:: Index of types and type qualifiers.
|
||||
* Function Index:: Index of functions and function-like
|
||||
macros.
|
||||
* Variable Index:: Index of variables and variable-like
|
||||
macros.
|
||||
* File Index:: Index of programs and files.
|
||||
@end menu
|
||||
|
||||
@node Copying, Introduction, Top, Top
|
||||
|
||||
@unnumbered License, Warranty, and Authors of Wine.
|
||||
@cindex copying conditions for Wine
|
||||
@cindex conditions for copying Wine
|
||||
@cindex Wine copying conditions
|
||||
|
||||
The Wine license, warranty, and list of authors together form the
|
||||
copyright for Wine. Read these sections carefully.
|
||||
|
||||
@menu
|
||||
* License:: The Wine license.
|
||||
* Warranty:: Wine comes with no warranty.
|
||||
* Authors:: The persons that contributed to Wine.
|
||||
@end menu
|
||||
|
||||
@node License, Warranty, , Copying
|
||||
@cindex Wine license
|
||||
@cindex license of Wine
|
||||
|
||||
@unnumberedsec The Wine License
|
||||
Wine is distributed under the following copyright.
|
||||
|
||||
@quotation
|
||||
@include LICENSE
|
||||
@end quotation
|
||||
|
||||
@node Warranty, Authors, License, Copying
|
||||
@cindex Wine warranty
|
||||
@cindex warranty of Wine
|
||||
|
||||
@unnumberedsec The Wine Warranty
|
||||
|
||||
@quotation
|
||||
@include WARRANTY
|
||||
@end quotation
|
||||
|
||||
@node Authors, , Warranty, Copying
|
||||
@cindex Wine authors
|
||||
@cindex authors of Wine
|
||||
@cindex copyright holders of Wine
|
||||
@cindex Wine copyright holders
|
||||
|
||||
@unnumberedsec The Wine Authors
|
||||
|
||||
@quotation
|
||||
@include AUTHORS
|
||||
@end quotation
|
||||
|
||||
These persons also hold the copyright on Wine.
|
||||
|
||||
The overall coordination is done by @*
|
||||
Alexandre Julliard @*
|
||||
@email{julliard@@lrc.epfl.ch}
|
||||
|
||||
|
||||
|
||||
@node Introduction, Reference Manual, Copying, Top
|
||||
@chapter Introduction
|
||||
|
||||
FIXME: Somebody should say some solemn words.
|
||||
|
||||
@xref{The Wine Project}, if you consider contributing some work.
|
||||
|
||||
|
||||
@node Reference Manual, Installation, Introduction, Top
|
||||
|
||||
@menu
|
||||
* @WIN32{} Reference Manual:: The @WIN32{} function calls and data types.
|
||||
* Resources and INI files:: How to determine the appearance and
|
||||
behaviour of Wine programs.
|
||||
* Metafiles--Icons--Bitmaps:: FIXME missing.
|
||||
* Debugging:: Debugging Wine.
|
||||
* Programs:: Programs written to run in/with Wine.
|
||||
* Tools:: Programs to support Wine.
|
||||
@end menu
|
||||
|
||||
@node @WIN32{} Reference Manual, Resources and INI files, , Reference Manual
|
||||
@chapter The @WIN32{} Reference Manual
|
||||
|
||||
@menu
|
||||
* Kernel Objects:: How the Wine kernel keeps information.
|
||||
* Processes and Threads:: Job control and management in Wine.
|
||||
* Users and Groups:: Security in Wine.
|
||||
* Date and Time:: Functions for getting the date and time
|
||||
and for conversion between formats.
|
||||
* System Information:: Getting information about the hardware
|
||||
and software the system runs on.
|
||||
* Memory Management:: How your programs get memory from
|
||||
Wine.
|
||||
* I/O Facilities:: Input/Output in Wine.
|
||||
.everything except communication and windows
|
||||
* Communication:: How processes can communicate.
|
||||
* Windows and Graphics:: GUI functions of @WIN32{}.
|
||||
* Errors and Exceptions:: How your program can report errors.
|
||||
. messaging
|
||||
* Resources:: Functions for dealing with resources.
|
||||
* The Registry:: FIXME missing.
|
||||
* Dynamic Link Libraries:: Functions for dealing with DLL's.
|
||||
@end menu
|
||||
|
||||
@node Kernel Objects, Processes and Threads, , @WIN32{} Reference Manual
|
||||
@section Kernel Objects
|
||||
|
||||
|
||||
@node Processes and Threads, Users and Groups, Kernel Objects, @WIN32{} Reference Manual
|
||||
@section Processes and Threads
|
||||
|
||||
@node Users and Groups, Date and Time, Processes and Threads, @WIN32{} Reference Manual
|
||||
@section Users and Groups
|
||||
|
||||
@node Date and Time, System Information, Users and Groups, @WIN32{} Reference Manual
|
||||
@section Date and Time
|
||||
|
||||
This section describes functions for manipulating dates and times. This
|
||||
includes the current time, the creation or manipulation times of files
|
||||
and other objects, and conversion between different time
|
||||
representations.
|
||||
|
||||
@menu
|
||||
* File Times:: Creation and manipulation times of files.
|
||||
@end menu
|
||||
|
||||
@node File Times, , , Date and Time
|
||||
@subsection File Times
|
||||
|
||||
@menu
|
||||
* Type FILETIME:: The data structure used for specifying
|
||||
file times.
|
||||
* Compare File Times:: Compare two file times.
|
||||
* Get File Times:: Get the time attributes of a file.
|
||||
@end menu
|
||||
|
||||
@c
|
||||
@c *** struct FILETIME ***
|
||||
@c
|
||||
@node Type FILETIME, Compare File Times, , File Times
|
||||
|
||||
@noindent
|
||||
File times in Wine are specified by the data type @code{FILETIME},
|
||||
defined in @file{windows.h}.
|
||||
|
||||
@deftp {Data type} FILETIME
|
||||
This is the data type for specifying file times. The file times are
|
||||
stored with 64 bit precision. The actual data type is a structure with
|
||||
two 32 bit values which are interpreted as the low and high parts of a
|
||||
64-bit value. This value gives a time measured in a granularity of 100
|
||||
nanoseconds, so 1.5 seconds are specified by a value of 15,000,000. In
|
||||
Wine, this 64-bit value is signed, with the sign taken from the high
|
||||
part. The lower part is used as unsigned.
|
||||
|
||||
The definition of @code{FILETIME} reads:
|
||||
@example
|
||||
typedef struct _FILETIME
|
||||
@{
|
||||
INT32 dwLowDateTime;
|
||||
INT32 dwHighDateTime;
|
||||
@} FILETIME;
|
||||
@end example
|
||||
|
||||
@cindex epoch in file time
|
||||
The @code{FILETIME} structure may be used to hold absolute or relative
|
||||
times. Absolute times are given as the number of 100 nanoseconds
|
||||
intervals elapsed since 1 January 1601, 00:00:00 UTC (Coordinated
|
||||
Universal Time, which is GMT, Greenwich Mean Time). This might be
|
||||
called the @dfn{epoch} for file times. With a signed 64-bit value, this
|
||||
representation covers absolute times of 29247 years around the epoch.
|
||||
|
||||
@windiff{}
|
||||
In @mswindows{}, the elements of the structure are apparently of type
|
||||
@code{DWORD}. Whether the full 64 bit value is interpreted as signed or
|
||||
unsigned I do not know.
|
||||
@end deftp
|
||||
|
||||
@c
|
||||
@c *** CompareFileTime ***
|
||||
@c
|
||||
@node Compare File Times, Get File Times, Type FILETIME, File Times
|
||||
|
||||
@noindent
|
||||
The Wine function @code{CompareFileTime} compares two file times, and
|
||||
returns whether the first time is less than, equal to, or greater than
|
||||
the second file time. It is defined in @file{windows.h}.
|
||||
|
||||
@deftypefn {WIN32 function} LONG CompareFileTime (@w{CONST FILETIME* @var{time_1},} @w{CONST FILETIME* @var{time_2})}
|
||||
This function returns @code{1}, if @var{time_1} is greater than
|
||||
@var{time_2}, @code{-1} if it is less, and @code{0} if both times are
|
||||
equal.
|
||||
|
||||
@winconfall{}
|
||||
|
||||
@windiffnone{}
|
||||
|
||||
@completionnone{}
|
||||
@end deftypefn
|
||||
|
||||
@c
|
||||
@c ***GetFileTime ***
|
||||
@c
|
||||
@node Get File Times, , Compare File Times, File Times
|
||||
@noindent
|
||||
FIXME: move this function to the file IO section. @*
|
||||
The Wine function @code{GetFileTime} returns the creation time and
|
||||
the times of last the read and modification access to a file. It is
|
||||
defined in @file{windows.h}.
|
||||
|
||||
@deftypefn {WIN32 function} BOOL GetFileTime (@w{HANDLE @var{file},} @w{LPFILETIME @var{ctime},} @w{LPFILETIME @var{atime},} @w{LPFILETIME @var{mtime})}
|
||||
This function obtains for the specified @var{file} the creation time
|
||||
@var{ctime}, the time of the last access to the file @var{atime}, and
|
||||
the time of the last modification (write) to the file, @var{mtime}.
|
||||
The @var{file} handle must have been obtained by opening the file with
|
||||
@code{GENERIC_READ} access. The file time arguments of this function are
|
||||
pointers to @code{FILETIME} variables, which are filled with a value that
|
||||
indicates an absolute time in UTC. To convert these values to local
|
||||
times, use the function @code{FileTimeToLocalFileTime}. If you do not
|
||||
need some of the times, you can pass a @code{NULL} pointer.
|
||||
The function returns @code{TRUE} on success, @code{FALSE} on failure.
|
||||
|
||||
@winconfall{}
|
||||
|
||||
@windiffnone{}
|
||||
@end deftypefn
|
||||
|
||||
|
||||
@node System Information, Memory Management, Date and Time, @WIN32{} Reference Manual
|
||||
@section System Information
|
||||
|
||||
@node Memory Management, I/O Facilities, System Information, @WIN32{} Reference Manual
|
||||
@section Memory Management
|
||||
|
||||
@node I/O Facilities, Communication, Memory Management, @WIN32{} Reference Manual
|
||||
@section I/O Facilities
|
||||
|
||||
@node Communication, Windows and Graphics, I/O Facilities, @WIN32{} Reference Manual
|
||||
@section Communication
|
||||
|
||||
@node Windows and Graphics, Errors and Exceptions, Communication, @WIN32{} Reference Manual
|
||||
@section Windows and Graphics
|
||||
|
||||
@node Errors and Exceptions, Resources, Windows and Graphics, @WIN32{} Reference Manual
|
||||
@section Errors and Exceptions
|
||||
|
||||
@node Resources, The Registry, Errors and Exceptions, @WIN32{} Reference Manual
|
||||
@section Resources
|
||||
|
||||
@node The Registry, Dynamic Link Libraries, Resources, @WIN32{} Reference Manual
|
||||
@section The Registry
|
||||
|
||||
@node Dynamic Link Libraries, , The Registry, @WIN32{} Reference Manual
|
||||
@section Dynamic Link Libraries (DLL's)
|
||||
|
||||
|
||||
|
||||
|
||||
@node Resources and INI files, Metafiles--Icons--Bitmaps, @WIN32{} Reference Manual, Reference Manual
|
||||
@chapter Resources and @file{INI} Files
|
||||
|
||||
@node Metafiles--Icons--Bitmaps, Debugging, Resources and INI files, Reference Manual
|
||||
@chapter Metafiles --- Icons --- Bitmaps
|
||||
|
||||
@node Debugging, Programs, Metafiles--Icons--Bitmaps, Reference Manual
|
||||
@chapter Debugging
|
||||
|
||||
@node Programs, Tools, Debugging, Reference Manual
|
||||
@chapter Programs
|
||||
|
||||
@node Tools, , Programs, Reference Manual
|
||||
@chapter Tools
|
||||
|
||||
@node Installation, The Wine Project, Reference Manual, Top
|
||||
@chapter Wine Installation
|
||||
FIXME: write installation guide
|
||||
|
||||
@menu
|
||||
* Applying patches:: How to update Wine to a newer version.
|
||||
@end menu
|
||||
|
||||
@node Applying patches, , , Installation
|
||||
@section Applying patches
|
||||
@xref{Creating patches}, for instructions on creating patches.
|
||||
|
||||
FIXME: write patch instructions
|
||||
|
||||
|
||||
@node The Wine Project, , Installation, Top
|
||||
@chapter The Wine project
|
||||
@cindex Wine project contributions
|
||||
@cindex project contributions to Wine
|
||||
|
||||
If you are new to Wine and want to support this project, here are
|
||||
some suggestions.
|
||||
|
||||
@menu
|
||||
* Creating patches:: How to create patches for Wine.
|
||||
* Adding Documentation:: Templates for the documentation.
|
||||
@end menu
|
||||
|
||||
@xref{Debugging}, for advice on how to debug Wine.
|
||||
@xref{Applying patches}, for instructions on applying patches.
|
||||
|
||||
FIXME: what is most urgently needed
|
||||
|
||||
@node Creating patches, Adding Documentation, , The Wine Project
|
||||
@section Creating patches
|
||||
@xref{Applying patches}, for instructions on applying patches.
|
||||
|
||||
FIXME: how to create patches
|
||||
|
||||
@node Adding Documentation, , Creating patches, The Wine Project
|
||||
@section Adding Documentation
|
||||
|
||||
@ifinfo
|
||||
Here are some templates which should help you collaborate on this
|
||||
documentation. Read the text below before examining them.
|
||||
@end ifinfo
|
||||
|
||||
FIXME they are not here in dvi
|
||||
|
||||
@menu
|
||||
* Type Template:: How to document data types in Wine's
|
||||
include files.
|
||||
* Function Template:: How to document an (API) function of
|
||||
Wine.
|
||||
@end menu
|
||||
|
||||
|
||||
These are my tips for adding documentation.
|
||||
|
||||
Do not simply copy documentation from @mswindows{} related
|
||||
material. Except from risking copyright violations, which you would not
|
||||
want to do, there is another aspect to that:
|
||||
As Wine is a product to run on @unix{} and @unix{}-like workstations,
|
||||
it seems a good idea to me to organize this documentation primarily for
|
||||
the well-trained @unix{} reader. Please keep that in mind when you add
|
||||
some documentation.
|
||||
|
||||
Finally, read the info pages for @code{texinfo}.
|
||||
|
||||
@subsection Template introduction
|
||||
@iftex
|
||||
On the following pages you will find some @code{texinfo} templates, which
|
||||
should help you collaborate on this documentation.
|
||||
@end iftex
|
||||
|
||||
These templates give hints on how to document data types, functions,
|
||||
variables, constants etc. in Wine.
|
||||
As documentation evolves, you will find common features of data types
|
||||
that should be described in a unified fashion. In such a case, please
|
||||
add a corresponding style guide-line here, in this very place, to help
|
||||
keeping documentation of data types unified.
|
||||
|
||||
|
||||
Start out the type or function with a new node. Write a comment before
|
||||
the node, listing all data types (and functions) described in the node,
|
||||
like this:
|
||||
@example
|
||||
@@c
|
||||
@@c *** struct FILETIME ***
|
||||
@@c
|
||||
@@node Type FILETIME, NextNodeName, PreviousNodeName, ParentNodeName
|
||||
@end example
|
||||
|
||||
The node command describes the node name and the names of the next node,
|
||||
the previous node, and the parent node. The parent node should contain
|
||||
a menu entry for this node. The previous node is the node that appears
|
||||
before this node in the parent node menu. The next node is the node
|
||||
succeeding this one in the parent node menu. If there is no previous or
|
||||
next node, omit the name (putting just a single space between the two
|
||||
commata).
|
||||
|
||||
The node name must be a unique sequence of words. Case is important, so
|
||||
@emph{Type} and @emph{type} are distinct. The node name must not contain
|
||||
special characters like @samp{@@, @{, @}} or the comma. If you need to
|
||||
give a node the same name as a function, data type, etc., use the words
|
||||
@samp{Type}, @samp{Function}, etc. before the identifier.
|
||||
|
||||
Always put the names of the node and its links on the same line, even if
|
||||
it gets rather long.
|
||||
|
||||
If there are two or more data types or functions described in the node,
|
||||
adapt the comment like this:
|
||||
@example
|
||||
@@c
|
||||
@@c *** int X ***
|
||||
@@c *** long Y() ***
|
||||
@@c
|
||||
@@node Ints and Longs, NextNodeName, PreviousNodeName, ParentNodeName
|
||||
@end example
|
||||
|
||||
Start the description of the type(s) or function(s) with a single
|
||||
non-indented paragraph that gives a one-line description of the type(s)
|
||||
or function(s) and states the include files that are required.
|
||||
@example
|
||||
@@noindent
|
||||
File times in Wine are specified by the data type @@code@{FILETIME@},
|
||||
defined in @@file@{windows.h@}.
|
||||
@end example
|
||||
If several types or functions are closely connected, use one paragraph
|
||||
as a common description. If more paragraphs are required for a proper
|
||||
description, indent all but the first of them.
|
||||
|
||||
Then start the definition of the data type or function. Use the proper
|
||||
macro and specify a category and the formal definition on the same
|
||||
line. For proper categories, take a look at the specialized templates.
|
||||
Again, put everything that belongs to the header into a single line.
|
||||
@example
|
||||
@@deftp @{Data type@} FILETIME
|
||||
@end example
|
||||
|
||||
In the definition, give a verbal explanation of the data type or
|
||||
function. The explanation should be rather complete, exact, and
|
||||
comprehensible, than well-structured. This is the point where you can
|
||||
tell everything you want. Do not be afraid of wasting space.
|
||||
Do not describe the @mswindows{} situation but only say what Wine
|
||||
does. That is important. (Sometimes they might even do the same.)
|
||||
@example
|
||||
This is the data type for specifying file times. The file times are
|
||||
stored with 64 bit precision. The actual data type is a structure with
|
||||
two 32 bit values which are interpreted as the low and high parts of a
|
||||
64-bit value. This value gives a time measured in a granularity of 100
|
||||
nanoseconds, so 1.5 seconds are specified by a value of 15,000,000. In
|
||||
Wine, this 64-bit value is signed, with the sign taken from the high
|
||||
part. The lower part is used as unsigned.
|
||||
@end example
|
||||
|
||||
For data types, it is recommended to quote the definition from the
|
||||
header file. For a function, you might give a short example of its
|
||||
usage. You may also put one example in the end of a node that explains
|
||||
several of the functions in the node. Remember that cut-and-paste from a
|
||||
well prepared example will help the readers write their code.
|
||||
@example
|
||||
The definition of @@code@{FILETIME@} reads:
|
||||
@@example
|
||||
typedef struct _FILETIME
|
||||
@@@{
|
||||
INT32 dwLowDateTime;
|
||||
INT32 dwHighDateTime;
|
||||
@@@} FILETIME;
|
||||
@@end example
|
||||
@end example
|
||||
|
||||
You could also use the @code{cindex} command which creates an entry in
|
||||
the concept index. The @code{texinfo} manual recommends to keep concept
|
||||
entries distinct, so that a single concept index entry puts to one
|
||||
well-defined place in the document. Use lower case letters for index
|
||||
entries, unless they are proper names or quotes from actual code.
|
||||
@example
|
||||
@@cindex epoch in file time
|
||||
The @@code@{FILETIME@} structure may be used to hold absolute or relative
|
||||
times. Absolute times are given as the number of 100 nanoseconds
|
||||
intervals elapsed since 1 January 1601, 00:00:00 UTC (Coordinated
|
||||
Universal Time, which is GMT, Greenwich Mean Time). This might be
|
||||
called the @@dfn@{epoch@} for file times. With a signed 64-bit value, this
|
||||
representation covers absolute times of 29247 years around the epoch.
|
||||
@end example
|
||||
|
||||
After the verbal documentation, you can add some special fields
|
||||
describing bugs, implementation dependencies etc. Two of these are
|
||||
recommended to attach to all descriptions. One describes the
|
||||
conformance of the data type or function to @mswindows{} products,
|
||||
i.e. whether the item is also present in @WINNT{} and @WIN95{}. The
|
||||
other one describes known differences of the Wine item to its
|
||||
@mswindows{} counterpart. Both will greatly help in porting software
|
||||
from @mswindows{} to Wine and vice versa.
|
||||
@example
|
||||
@@winconfall@{@}
|
||||
|
||||
@@windiff@{@}
|
||||
In @@mswindows@{@}, the elements of the structure are apparently of type
|
||||
@@code@{DWORD@}. Whether the full 64 bit value is interpreted as signed or
|
||||
unsigned I do not know.
|
||||
@end example
|
||||
|
||||
If you find that more of these property attributes are necessary, feel
|
||||
free to create your own ones. But keep in mind that they should be
|
||||
applicable more or less to all described items. Very special properties
|
||||
will better be put into the verbal text.
|
||||
|
||||
Finally end the definition of the data type or function:
|
||||
@example
|
||||
@@end deftp
|
||||
@end example
|
||||
|
||||
Do not forget to enter the node in the menu of its top node, and do
|
||||
properly link the node to its successor and predecessor.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@node Type Template, Function Template, , Adding Documentation
|
||||
@subsection Data type template
|
||||
|
||||
Category: Data type
|
||||
|
||||
@node Function Template, , Type Template, Adding Documentation
|
||||
@subsection API function template
|
||||
|
||||
Functions should be given category names, to indicate which API they
|
||||
belong to. Please add items to the list of categories possible.
|
||||
|
||||
Category: WIN32 function
|
||||
|
||||
@example
|
||||
@@c
|
||||
@@c ***GetFileTime() ***
|
||||
@@c
|
||||
@@node Get File Times, , Compare File Times, File Times
|
||||
@@noindent
|
||||
The Wine function @@code@{GetFileTime@} returns the creation time and
|
||||
the times of last the read and modification access to a file. It is
|
||||
defined in @@file@{windows.h@}.
|
||||
|
||||
@@deftypefn @{WIN32 function@} BOOL GetFileTime (@@w@{HANDLE @@var@{file@},@} @@w@{LPFILETIME @@var@{ctime@},@} @@w@{LPFILETIME @@var@{atime@},@} @@w@{LPFILETIME @@var@{mtime@})@}
|
||||
This function obtains for the specified @@var@{file@} the creation time
|
||||
@@var@{ctime@}, the time of the last access to the file @@var@{atime@}, and
|
||||
the time of the last modification (write) to the file, @@var@{mtime@}.
|
||||
The @@var@{file@} handle must have been obtained by opening the file with
|
||||
@@code@{GENERIC_READ@} access. The file time arguments of this function are
|
||||
pointers to @@code@{FILETIME@} variables, which are filled with a value that
|
||||
indicates an absolute time in UTC. To convert these values to local
|
||||
times, use the function @@code@{FileTimeToLocalFileTime@}. If you do not
|
||||
need some of the times, you can pass a @@code@{NULL@} pointer.
|
||||
The function returns @@code@{TRUE@} on success, @@code@{FALSE@} on failure.
|
||||
|
||||
@@winconfall@{@}
|
||||
|
||||
@@windiffnone@{@}
|
||||
@@end deftypefn
|
||||
@end example
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@node Concept Index, , , Top
|
||||
@comment node-name, next, previous, up
|
||||
@unnumbered Concept Index
|
||||
@printindex cp
|
||||
|
||||
@node Type Index, , , Top
|
||||
@comment node-name, next, previous, up
|
||||
@unnumbered Type Index
|
||||
@printindex tp
|
||||
|
||||
@node Function Index, , , Top
|
||||
@comment node-name, next, previous, up
|
||||
@unnumbered Function Index
|
||||
@printindex fn
|
||||
|
||||
@node Variable Index, , , Top
|
||||
@comment node-name, next, previous, up
|
||||
@unnumbered Variable Index
|
||||
@printindex vr
|
||||
|
||||
@node File Index, , , Top
|
||||
@comment node-name, next, previous, up
|
||||
@unnumbered File and Program Index
|
||||
@printindex pg
|
||||
|
||||
|
||||
@contents
|
||||
@bye
|
207
files/dos_fs.c
207
files/dos_fs.c
|
@ -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>
|
||||
|
|
338
files/file.c
338
files/file.c
|
@ -38,6 +38,19 @@
|
|||
#define MAP_ANON MAP_ANONYMOUS
|
||||
#endif
|
||||
|
||||
struct DOS_FILE_LOCK {
|
||||
struct DOS_FILE_LOCK * next;
|
||||
DWORD base;
|
||||
DWORD len;
|
||||
DWORD processId;
|
||||
FILE_OBJECT * dos_file;
|
||||
char * unix_name;
|
||||
};
|
||||
|
||||
typedef struct DOS_FILE_LOCK DOS_FILE_LOCK;
|
||||
|
||||
static DOS_FILE_LOCK *locks = NULL;
|
||||
static void DOS_RemoveFileLocks(FILE_OBJECT *file);
|
||||
|
||||
/***********************************************************************
|
||||
* FILE_Alloc
|
||||
|
@ -75,6 +88,8 @@ void FILE_Destroy( K32OBJ *ptr )
|
|||
FILE_OBJECT *file = (FILE_OBJECT *)ptr;
|
||||
assert( ptr->type == K32OBJ_FILE );
|
||||
|
||||
DOS_RemoveFileLocks(file);
|
||||
|
||||
if (file->unix_handle != -1) close( file->unix_handle );
|
||||
if (file->unix_name) HeapFree( SystemHeap, 0, file->unix_name );
|
||||
ptr->type = K32OBJ_UNKNOWN;
|
||||
|
@ -621,16 +636,19 @@ static HFILE32 FILE_DoOpenFile( LPCSTR name, OFSTRUCT *ofs, UINT32 mode,
|
|||
char *p;
|
||||
int unixMode;
|
||||
|
||||
if (!name || !ofs) return HFILE_ERROR32;
|
||||
if (!ofs) return HFILE_ERROR32;
|
||||
|
||||
|
||||
ofs->cBytes = sizeof(OFSTRUCT);
|
||||
ofs->nErrCode = 0;
|
||||
if (mode & OF_REOPEN) name = ofs->szPathName;
|
||||
|
||||
if (!name) {
|
||||
fprintf(stderr, "ERROR: FILE_DoOpenFile() called with `name' set to NULL ! Please debug.\n");
|
||||
|
||||
return HFILE_ERROR32;
|
||||
}
|
||||
ofs->cBytes = sizeof(OFSTRUCT);
|
||||
ofs->nErrCode = 0;
|
||||
if (mode & OF_REOPEN) name = ofs->szPathName;
|
||||
|
||||
dprintf_file( stddeb, "OpenFile: %s %04x\n", name, mode );
|
||||
|
||||
/* the watcom 10.6 IDE relies on a valid path returned in ofs->szPathName
|
||||
|
@ -1201,8 +1219,12 @@ LPVOID FILE_mmap( FILE_OBJECT *file, LPVOID start,
|
|||
if (!file)
|
||||
{
|
||||
/* Linux EINVAL's on us if we don't pass MAP_PRIVATE to an anon mmap */
|
||||
#ifdef MAP_SHARED
|
||||
flags &= ~MAP_SHARED;
|
||||
#endif
|
||||
#ifdef MAP_PRIVATE
|
||||
flags |= MAP_PRIVATE;
|
||||
#endif
|
||||
#ifdef MAP_ANON
|
||||
flags |= MAP_ANON;
|
||||
#else
|
||||
|
@ -1238,24 +1260,148 @@ DWORD GetFileType( HFILE32 hFile )
|
|||
|
||||
|
||||
/**************************************************************************
|
||||
* MoveFile32A (KERNEL32.387)
|
||||
* MoveFileEx32A (KERNEL32.???)
|
||||
*
|
||||
*
|
||||
*/
|
||||
BOOL32 MoveFile32A( LPCSTR fn1, LPCSTR fn2 )
|
||||
BOOL32 MoveFileEx32A( LPCSTR fn1, LPCSTR fn2, DWORD flag )
|
||||
{
|
||||
DOS_FULL_NAME full_name1, full_name2;
|
||||
int mode=0; /* mode == 1: use copy */
|
||||
|
||||
dprintf_file( stddeb, "MoveFile32A(%s,%s)\n", fn1, fn2 );
|
||||
dprintf_file( stddeb, "MoveFileEx32A(%s,%s,%04lx)\n", fn1, fn2, flag);
|
||||
|
||||
if (!DOSFS_GetFullName( fn1, TRUE, &full_name1 )) return FALSE;
|
||||
if (fn2) { /* !fn2 means delete fn1 */
|
||||
if (!DOSFS_GetFullName( fn2, FALSE, &full_name2 )) return FALSE;
|
||||
/* FIXME: should not replace an existing file */
|
||||
/* FIXME: should handle renaming across devices */
|
||||
/* Source name and target path are valid */
|
||||
if ( full_name1.drive != full_name2.drive)
|
||||
/* use copy, if allowed */
|
||||
if (!(flag & MOVEFILE_COPY_ALLOWED)) {
|
||||
/* FIXME: Use right error code */
|
||||
DOS_ERROR( ER_FileExists, EC_Exists, SA_Abort, EL_Disk );
|
||||
return FALSE;
|
||||
}
|
||||
else mode =1;
|
||||
if (DOSFS_GetFullName( fn2, TRUE, &full_name2 ))
|
||||
/* target exists, check if we may overwrite */
|
||||
if (!(flag & MOVEFILE_REPLACE_EXISTING)) {
|
||||
/* FIXME: Use right error code */
|
||||
DOS_ERROR( ER_AccessDenied, EC_AccessDenied, SA_Abort, EL_Disk );
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
else /* fn2 == NULL means delete source */
|
||||
if (flag & MOVEFILE_DELAY_UNTIL_REBOOT) {
|
||||
if (flag & MOVEFILE_COPY_ALLOWED) {
|
||||
fprintf( stderr,
|
||||
"MoveFileEx32A: Illegal flag\n");
|
||||
DOS_ERROR( ER_GeneralFailure, EC_SystemFailure, SA_Abort,
|
||||
EL_Unknown );
|
||||
return FALSE;
|
||||
}
|
||||
/* FIXME: (bon@elektron.ikp.physik.th-darmstadt.de 970706)
|
||||
Perhaps we should queue these command and execute it
|
||||
when exiting... What about using on_exit(2)
|
||||
*/
|
||||
fprintf( stderr,"MoveFileEx32A: Please delete file %s\n",
|
||||
full_name1.long_name);
|
||||
fprintf( stderr," when Wine has finished\n");
|
||||
fprintf( stderr," like \"rm %s\"\n",
|
||||
full_name1.long_name);
|
||||
return TRUE;
|
||||
}
|
||||
else if (unlink( full_name1.long_name ) == -1)
|
||||
{
|
||||
FILE_SetDosError();
|
||||
return FALSE;
|
||||
}
|
||||
else return TRUE; /* successfully deleted */
|
||||
|
||||
if (flag & MOVEFILE_DELAY_UNTIL_REBOOT) {
|
||||
/* FIXME: (bon@elektron.ikp.physik.th-darmstadt.de 970706)
|
||||
Perhaps we should queue these command and execute it
|
||||
when exiting... What about using on_exit(2)
|
||||
*/
|
||||
fprintf( stderr,"MoveFileEx32A: Please move existing file %s\n"
|
||||
,full_name1.long_name);
|
||||
fprintf( stderr," to file %s\n"
|
||||
,full_name2.long_name);
|
||||
fprintf( stderr," when Wine has finished\n");
|
||||
fprintf( stderr," like \" mv %s %s\"\n",
|
||||
full_name1.long_name,full_name2.long_name);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (!mode) /* move the file */
|
||||
if (rename( full_name1.long_name, full_name2.long_name ) == -1)
|
||||
{
|
||||
FILE_SetDosError();
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
else return TRUE;
|
||||
else /* copy File */
|
||||
return CopyFile32A(fn1, fn2, (!(flag & MOVEFILE_REPLACE_EXISTING)));
|
||||
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* MoveFileEx32W (KERNEL32.???)
|
||||
*/
|
||||
BOOL32 MoveFileEx32W( LPCWSTR fn1, LPCWSTR fn2, DWORD flag )
|
||||
{
|
||||
LPSTR afn1 = HEAP_strdupWtoA( GetProcessHeap(), 0, fn1 );
|
||||
LPSTR afn2 = HEAP_strdupWtoA( GetProcessHeap(), 0, fn2 );
|
||||
BOOL32 res = MoveFileEx32A( afn1, afn2, flag );
|
||||
HeapFree( GetProcessHeap(), 0, afn1 );
|
||||
HeapFree( GetProcessHeap(), 0, afn2 );
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* MoveFile32A (KERNEL32.387)
|
||||
*
|
||||
* Move file or directory
|
||||
*/
|
||||
BOOL32 MoveFile32A( LPCSTR fn1, LPCSTR fn2 )
|
||||
{
|
||||
DOS_FULL_NAME full_name1, full_name2;
|
||||
struct stat fstat;
|
||||
|
||||
dprintf_file( stddeb, "MoveFile32A(%s,%s)\n", fn1, fn2 );
|
||||
|
||||
if (!DOSFS_GetFullName( fn1, TRUE, &full_name1 )) return FALSE;
|
||||
if (DOSFS_GetFullName( fn2, TRUE, &full_name2 ))
|
||||
/* The new name must not already exist */
|
||||
return FALSE;
|
||||
if (!DOSFS_GetFullName( fn2, FALSE, &full_name2 )) return FALSE;
|
||||
|
||||
if (full_name1.drive == full_name2.drive) /* move */
|
||||
if (rename( full_name1.long_name, full_name2.long_name ) == -1)
|
||||
{
|
||||
FILE_SetDosError();
|
||||
return FALSE;
|
||||
}
|
||||
else return TRUE;
|
||||
else /*copy */ {
|
||||
if (stat( full_name1.long_name, &fstat ))
|
||||
{
|
||||
dprintf_file( stddeb, "Invalid source file %s\n",
|
||||
full_name1.long_name);
|
||||
FILE_SetDosError();
|
||||
return FALSE;
|
||||
}
|
||||
if (S_ISDIR(fstat.st_mode)) {
|
||||
/* No Move for directories across file systems */
|
||||
/* FIXME: Use right error code */
|
||||
DOS_ERROR( ER_GeneralFailure, EC_SystemFailure, SA_Abort,
|
||||
EL_Unknown );
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
return CopyFile32A(fn1, fn2, TRUE); /*fail, if exist */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1365,3 +1511,175 @@ BOOL32 SetFileTime( HFILE32 hFile,
|
|||
FILE_ReleaseFile( file );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Locks need to be mirrored because unix file locking is based
|
||||
* on the pid. Inside of wine there can be multiple WINE processes
|
||||
* that share the same unix pid.
|
||||
* Read's and writes should check these locks also - not sure
|
||||
* how critical that is at this point (FIXME).
|
||||
*/
|
||||
|
||||
static BOOL32 DOS_AddLock(FILE_OBJECT *file, struct flock *f)
|
||||
{
|
||||
DOS_FILE_LOCK *curr;
|
||||
DWORD processId;
|
||||
|
||||
processId = GetCurrentProcessId();
|
||||
|
||||
/* check if lock overlaps a current lock for the same file */
|
||||
for (curr = locks; curr; curr = curr->next) {
|
||||
if (strcmp(curr->unix_name, file->unix_name) == 0) {
|
||||
if ((f->l_start < (curr->base + curr->len)) &&
|
||||
((f->l_start + f->l_len) > curr->base)) {
|
||||
/* region overlaps */
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
curr = HeapAlloc( SystemHeap, 0, sizeof(DOS_FILE_LOCK) );
|
||||
curr->processId = GetCurrentProcessId();
|
||||
curr->base = f->l_start;
|
||||
curr->len = f->l_len;
|
||||
curr->unix_name = HEAP_strdupA( SystemHeap, 0, file->unix_name);
|
||||
curr->next = locks;
|
||||
curr->dos_file = file;
|
||||
locks = curr;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void DOS_RemoveFileLocks(FILE_OBJECT *file)
|
||||
{
|
||||
DWORD processId;
|
||||
DOS_FILE_LOCK **curr;
|
||||
DOS_FILE_LOCK *rem;
|
||||
|
||||
processId = GetCurrentProcessId();
|
||||
curr = &locks;
|
||||
while (*curr) {
|
||||
if ((*curr)->dos_file == file) {
|
||||
rem = *curr;
|
||||
*curr = (*curr)->next;
|
||||
HeapFree( SystemHeap, 0, rem->unix_name );
|
||||
HeapFree( SystemHeap, 0, rem );
|
||||
}
|
||||
else
|
||||
curr = &(*curr)->next;
|
||||
}
|
||||
}
|
||||
|
||||
static BOOL32 DOS_RemoveLock(FILE_OBJECT *file, struct flock *f)
|
||||
{
|
||||
DWORD processId;
|
||||
DOS_FILE_LOCK **curr;
|
||||
DOS_FILE_LOCK *rem;
|
||||
|
||||
processId = GetCurrentProcessId();
|
||||
for (curr = &locks; *curr; curr = &(*curr)->next) {
|
||||
if ((*curr)->processId == processId &&
|
||||
(*curr)->dos_file == file &&
|
||||
(*curr)->base == f->l_start &&
|
||||
(*curr)->len == f->l_len) {
|
||||
/* this is the same lock */
|
||||
rem = *curr;
|
||||
*curr = (*curr)->next;
|
||||
HeapFree( SystemHeap, 0, rem->unix_name );
|
||||
HeapFree( SystemHeap, 0, rem );
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
/* no matching lock found */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* LockFile (KERNEL32.511)
|
||||
*/
|
||||
BOOL32 LockFile(
|
||||
HFILE32 hFile,DWORD dwFileOffsetLow,DWORD dwFileOffsetHigh,
|
||||
DWORD nNumberOfBytesToLockLow,DWORD nNumberOfBytesToLockHigh )
|
||||
{
|
||||
struct flock f;
|
||||
FILE_OBJECT *file;
|
||||
|
||||
dprintf_file(stddeb, "LockFile32: handle %d offsetlow=%ld offsethigh=%ld nbyteslow=%ld nbyteshigh=%ld\n",
|
||||
hFile, dwFileOffsetLow, dwFileOffsetHigh,
|
||||
nNumberOfBytesToLockLow, nNumberOfBytesToLockHigh);
|
||||
|
||||
if (dwFileOffsetHigh || nNumberOfBytesToLockHigh) {
|
||||
dprintf_file(stddeb, "LockFile32: Unimplemented bytes > 32bits\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
f.l_start = dwFileOffsetLow;
|
||||
f.l_len = nNumberOfBytesToLockLow;
|
||||
f.l_whence = SEEK_SET;
|
||||
f.l_pid = 0;
|
||||
f.l_type = F_WRLCK;
|
||||
|
||||
if (!(file = FILE_GetFile(hFile))) return FALSE;
|
||||
|
||||
/* shadow locks internally */
|
||||
if (!DOS_AddLock(file, &f)) {
|
||||
DOS_ERROR( ER_LockViolation, EC_AccessDenied, SA_Ignore, EL_Disk );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* FIXME: Unix locking commented out for now, doesn't work with Excel */
|
||||
#ifdef USE_UNIX_LOCKS
|
||||
if (fcntl(file->unix_handle, F_SETLK, &f) == -1) {
|
||||
if (errno == EACCES || errno == EAGAIN) {
|
||||
DOS_ERROR( ER_LockViolation, EC_AccessDenied, SA_Ignore, EL_Disk );
|
||||
}
|
||||
else {
|
||||
FILE_SetDosError();
|
||||
}
|
||||
/* remove our internal copy of the lock */
|
||||
DOS_RemoveLock(file, &f);
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* UnlockFile (KERNEL32.703)
|
||||
*/
|
||||
BOOL32 UnlockFile(
|
||||
HFILE32 hFile,DWORD dwFileOffsetLow,DWORD dwFileOffsetHigh,
|
||||
DWORD nNumberOfBytesToUnlockLow,DWORD nNumberOfBytesToUnlockHigh )
|
||||
{
|
||||
FILE_OBJECT *file;
|
||||
struct flock f;
|
||||
|
||||
dprintf_file(stddeb, "UnlockFile32: handle %d offsetlow=%ld offsethigh=%ld nbyteslow=%ld nbyteshigh=%ld\n",
|
||||
hFile, dwFileOffsetLow, dwFileOffsetHigh,
|
||||
nNumberOfBytesToUnlockLow, nNumberOfBytesToUnlockHigh);
|
||||
|
||||
if (dwFileOffsetHigh || nNumberOfBytesToUnlockHigh) {
|
||||
dprintf_file(stddeb, "UnlockFile32: Unimplemented bytes > 32bits\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
f.l_start = dwFileOffsetLow;
|
||||
f.l_len = nNumberOfBytesToUnlockLow;
|
||||
f.l_whence = SEEK_SET;
|
||||
f.l_pid = 0;
|
||||
f.l_type = F_UNLCK;
|
||||
|
||||
if (!(file = FILE_GetFile(hFile))) return FALSE;
|
||||
|
||||
DOS_RemoveLock(file, &f); /* ok if fails - may be another wine */
|
||||
|
||||
/* FIXME: Unix locking commented out for now, doesn't work with Excel */
|
||||
#ifdef USE_UNIX_LOCKS
|
||||
if (fcntl(file->unix_handle, F_SETLK, &f) == -1) {
|
||||
FILE_SetDosError();
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
112
files/profile.c
112
files/profile.c
|
@ -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;
|
||||
if (HIWORD(*(int *)args16))
|
||||
printf( "0x%08x \"%s\"", *(int *)args16,
|
||||
(char *)PTR_SEG_TO_LIN(*(int *)args16) );
|
||||
else
|
||||
printf( "0x%08x", *(int *)args16 );
|
||||
if (HIWORD(*(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,11 +368,11 @@ 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->saved_ss_sp = MAKELONG( lpbuf[3], lpbuf[4] );
|
||||
pFrame->ds = lpbuf[5];
|
||||
pFrame->bp = lpbuf[6];
|
||||
pFrame->ip = lpbuf[7];
|
||||
|
@ -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]
|
||||
#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]
|
||||
/* 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 */
|
||||
|
||||
#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 */
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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,6 +100,12 @@ 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;
|
||||
|
||||
|
@ -150,6 +158,9 @@ int MAIN_Init(void)
|
|||
/* Initialize message spying */
|
||||
if (!SPY_Init()) return 0;
|
||||
|
||||
/* 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,8 +804,7 @@ void TASK_Reschedule(void)
|
|||
|
||||
if (pOldTask)
|
||||
{
|
||||
pOldTask->ss = IF1632_Saved16_ss;
|
||||
pOldTask->sp = IF1632_Saved16_sp;
|
||||
pOldTask->ss_sp = IF1632_Saved16_ss_sp;
|
||||
pOldTask->esp = IF1632_Saved32_esp;
|
||||
}
|
||||
else IF1632_Original32_esp = IF1632_Saved32_esp;
|
||||
|
@ -828,8 +821,7 @@ void TASK_Reschedule(void)
|
|||
hCurrentTask = hTask;
|
||||
pCurrentThread = pNewTask->thdb;
|
||||
pCurrentProcess = pCurrentThread->process;
|
||||
IF1632_Saved16_ss = pNewTask->ss;
|
||||
IF1632_Saved16_sp = pNewTask->sp;
|
||||
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,28 +1184,27 @@ 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->saved_ss_sp = oldFrame->saved_ss_sp;
|
||||
newFrame->entry_ip = oldFrame->entry_ip;
|
||||
newFrame->entry_cs = oldFrame->entry_cs;
|
||||
newFrame->bp = oldFrame->bp;
|
||||
|
@ -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;
|
||||
|
|
10
memory/ldt.c
10
memory/ldt.c
|
@ -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>
|
||||
|
|
130
misc/main.c
130
misc/main.c
|
@ -932,7 +932,117 @@ LONG GetTimerResolution(void)
|
|||
BOOL32 SystemParametersInfo32A( UINT32 uAction, UINT32 uParam,
|
||||
LPVOID lpvParam, UINT32 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);
|
||||
|
|
214
misc/ole2nls.c
214
misc/ole2nls.c
|
@ -12,6 +12,8 @@
|
|||
#include "ole.h"
|
||||
#include "options.h"
|
||||
#include "winnls.h"
|
||||
#include "winreg.h"
|
||||
#include "winerror.h"
|
||||
#include "stddebug.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
@ -126,6 +128,58 @@ static struct tagLOCALE_NAME2ID {
|
|||
{NULL,0},
|
||||
};
|
||||
|
||||
const struct map_lcid2str {
|
||||
LCID langid;
|
||||
const char *langname;
|
||||
} languages[]={
|
||||
{0x0401,"Arabisch"},
|
||||
{0x0402,"Bulgarisch"},
|
||||
{0x0403,"Katalanisch"},
|
||||
{0x0404,"Traditionales Chinesisch"},
|
||||
{0x0405,"Tschecisch"},
|
||||
{0x0406,"Ddnisch"},
|
||||
{0x0407,"Deutsch"},
|
||||
{0x0408,"Griechisch"},
|
||||
{0x0409,"Amerikanisches Englisch"},
|
||||
{0x040A,"Kastilisches Spanisch"},
|
||||
{0x040B,"Finnisch"},
|
||||
{0x040C,"Franzvsisch"},
|
||||
{0x040D,"Hebrdisch"},
|
||||
{0x040E,"Ungarisch"},
|
||||
{0x040F,"Isldndisch"},
|
||||
{0x0410,"Italienisch"},
|
||||
{0x0411,"Japanisch"},
|
||||
{0x0412,"Koreanisch"},
|
||||
{0x0413,"Niederldndisch"},
|
||||
{0x0414,"Norwegisch-Bokmal"},
|
||||
{0x0415,"Polnisch"},
|
||||
{0x0416,"Brasilianisches Portugiesisch"},
|
||||
{0x0417,"Rdtoromanisch"},
|
||||
{0x0418,"Rumdnisch"},
|
||||
{0x0419,"Russisch"},
|
||||
{0x041A,"Kroatoserbisch (lateinisch)"},
|
||||
{0x041B,"Slowenisch"},
|
||||
{0x041C,"Albanisch"},
|
||||
{0x041D,"Schwedisch"},
|
||||
{0x041E,"Thai"},
|
||||
{0x041F,"T|rkisch"},
|
||||
{0x0420,"Urdu"},
|
||||
{0x0421,"Bahasa"},
|
||||
{0x0804,"Vereinfachtes Chinesisch"},
|
||||
{0x0807,"Schweizerdeutsch"},
|
||||
{0x0809,"Britisches Englisch"},
|
||||
{0x080A,"Mexikanisches Spanisch"},
|
||||
{0x080C,"Belgisches Franzvsisch"},
|
||||
{0x0810,"Schweizerisches Italienisch"},
|
||||
{0x0813,"Belgisches Niederldndisch"},
|
||||
{0x0814,"Norgwegisch-Nynorsk"},
|
||||
{0x0816,"Portugiesisch"},
|
||||
{0x081A,"Serbokratisch (kyrillisch)"},
|
||||
{0x0C1C,"Kanadisches Franzvsisch"},
|
||||
{0x100C,"Schweizerisches Franzvsisch"},
|
||||
{0x0000,"Unbekannt"},
|
||||
};
|
||||
|
||||
/***********************************************************************
|
||||
* GetUserDefaultLCID (OLE2NLS.1)
|
||||
*/
|
||||
|
@ -195,12 +249,17 @@ WORD GetSystemDefaultLangID()
|
|||
* GetLocaleInfoA (OLE2NLS.5)
|
||||
* Is the last parameter really WORD for Win16?
|
||||
*/
|
||||
int GetLocaleInfoA(DWORD lcid,DWORD LCType,LPSTR buf,WORD len)
|
||||
INT16 GetLocaleInfo16(LCID lcid,LCTYPE LCType,LPSTR buf,INT16 len)
|
||||
{
|
||||
return GetLocaleInfo32A(lcid,LCType,buf,len);
|
||||
}
|
||||
|
||||
INT32 GetLocaleInfo32A(LCID lcid,LCTYPE LCType,LPSTR buf,INT32 len)
|
||||
{
|
||||
char *retString;
|
||||
int found,i;
|
||||
|
||||
dprintf_ole(stddeb,"GetLocaleInfoA(%8lX,%8lX,%p,%4X)\n",
|
||||
dprintf_ole(stddeb,"GetLocaleInfo32A(%8lX,%8lX,%p,%4X)\n",
|
||||
lcid,LCType,buf,len);
|
||||
/* As an option, we could obtain the value from win.ini.
|
||||
This would not match the Wine compile-time option.
|
||||
|
@ -358,7 +417,7 @@ LOCVAL(LOCALE_INEGSEPBYSPACE)
|
|||
|
||||
case LANG_Da:
|
||||
switch (LCType) {
|
||||
/* LOCVAL(LOCALE_ILANGUAGE,"9") */
|
||||
LOCVAL(LOCALE_ILANGUAGE,"6")
|
||||
LOCVAL(LOCALE_SLANGUAGE,"Dansk")
|
||||
LOCVAL(LOCALE_SENGLANGUAGE,"Danish")
|
||||
LOCVAL(LOCALE_SABBREVLANGNAME,"dan")
|
||||
|
@ -366,9 +425,9 @@ LOCVAL(LOCALE_SNATIVELANGNAME,"Dansk")
|
|||
LOCVAL(LOCALE_ICOUNTRY,"45")
|
||||
LOCVAL(LOCALE_SCOUNTRY,"Danmark")
|
||||
LOCVAL(LOCALE_SENGCOUNTRY,"Denmark")
|
||||
LOCVAL(LOCALE_SABBREVCTRYNAME,"Da")
|
||||
LOCVAL(LOCALE_SABBREVCTRYNAME,"DK")
|
||||
LOCVAL(LOCALE_SNATIVECTRYNAME,"Danmark")
|
||||
/* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"9") */
|
||||
LOCVAL(LOCALE_IDEFAULTLANGUAGE,"6")
|
||||
LOCVAL(LOCALE_IDEFAULTCOUNTRY,"45")
|
||||
/* LOCVAL(LOCALE_IDEFAULTCODEPAGE) */
|
||||
/* LOCVAL(LOCALE_IDEFAULTANSICODEPAGE) */
|
||||
|
@ -403,8 +462,8 @@ LOCVAL(LOCALE_ITIME,"1")
|
|||
LOCVAL(LOCALE_ITLZERO,"1")
|
||||
/* LOCVAL(LOCALE_IDAYLZERO) */
|
||||
/* LOCVAL(LOCALE_IMONLZERO) */
|
||||
/* LOCVAL(LOCALE_S1159) */
|
||||
/* LOCVAL(LOCALE_S2359) */
|
||||
LOCVAL(LOCALE_S1159, "")
|
||||
LOCVAL(LOCALE_S2359, "")
|
||||
/* LOCVAL(LOCALE_ICALENDARTYPE) */
|
||||
/* LOCVAL(LOCALE_IOPTIONALCALENDAR) */
|
||||
/* LOCVAL(LOCALE_IFIRSTDAYOFWEEK) */
|
||||
|
@ -449,14 +508,14 @@ LOCVAL(LOCALE_SABBREVMONTHNAME10,"Okt")
|
|||
LOCVAL(LOCALE_SABBREVMONTHNAME11,"Nov")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME12,"Dec")
|
||||
LOCVAL(LOCALE_SABBREVMONTHNAME13,"")
|
||||
/* LOCVAL(LOCALE_SPOSITIVESIGN) */
|
||||
/* LOCVAL(LOCALE_SNEGATIVESIGN) */
|
||||
/* LOCVAL(LOCALE_IPOSSIGNPOSN) */
|
||||
/* LOCVAL(LOCALE_INEGSIGNPOSN) */
|
||||
/* LOCVAL(LOCALE_IPOSSYMPRECEDES) */
|
||||
/* LOCVAL(LOCALE_IPOSSEPBYSPACE) */
|
||||
/* LOCVAL(LOCALE_INEGSYMPRECEDES) */
|
||||
/* LOCVAL(LOCALE_INEGSEPBYSPACE) */
|
||||
LOCVAL(LOCALE_SPOSITIVESIGN, "")
|
||||
LOCVAL(LOCALE_SNEGATIVESIGN, "-")
|
||||
LOCVAL(LOCALE_IPOSSIGNPOSN, "3")
|
||||
LOCVAL(LOCALE_INEGSIGNPOSN, "3")
|
||||
LOCVAL(LOCALE_IPOSSYMPRECEDES, "1")
|
||||
LOCVAL(LOCALE_IPOSSEPBYSPACE, "0")
|
||||
LOCVAL(LOCALE_INEGSYMPRECEDES, "1")
|
||||
LOCVAL(LOCALE_INEGSEPBYSPACE, "0")
|
||||
default: found=0;break;
|
||||
}
|
||||
break; /* LANG(Da) */
|
||||
|
@ -1639,12 +1698,12 @@ LOCVAL(LOCALE_INEGSEPBYSPACE, "0")
|
|||
*/
|
||||
INT32 GetLocaleInfo32W(LCID lcid,LCTYPE LCType,LPWSTR wbuf,INT32 len)
|
||||
{
|
||||
int i;
|
||||
LPSTR abuf = (LPSTR) wbuf;
|
||||
INT32 n = GetLocaleInfoA(lcid, LCType, abuf, len);
|
||||
LPSTR abuf = (LPSTR)HeapAlloc(GetProcessHeap(),0,len);
|
||||
|
||||
INT32 n = GetLocaleInfo32A(lcid, LCType, abuf, len);
|
||||
if (wbuf)
|
||||
for (i = n; i > 0; --i)
|
||||
wbuf[i] = abuf[i];
|
||||
lstrcpynAtoW(wbuf,abuf,len);
|
||||
HeapFree(GetProcessHeap(),0,abuf);
|
||||
return n;
|
||||
}
|
||||
|
||||
|
@ -1728,14 +1787,9 @@ BOOL16 SetLocaleInfoA(DWORD lcid, DWORD lctype, LPCSTR data)
|
|||
/***********************************************************************
|
||||
* IsValidLocale (KERNEL32.361)
|
||||
*/
|
||||
BOOL32 IsValidLocale(DWORD lcid,DWORD flags) {
|
||||
int i;
|
||||
|
||||
i=0;
|
||||
while (locale_name2id[i].name!=NULL)
|
||||
if (locale_name2id[i].id == lcid)
|
||||
BOOL32 IsValidLocale(LCID lcid,DWORD flags) {
|
||||
/* we support ANY language. Well, at least say that...*/
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -1745,14 +1799,34 @@ BOOL32 EnumSystemLocales32W( LOCALE_ENUMPROC32W lpfnLocaleEnum, DWORD flags )
|
|||
{
|
||||
int i;
|
||||
BOOL32 ret;
|
||||
WCHAR buffer[200];
|
||||
HKEY xhkey;
|
||||
|
||||
dprintf_win32(stddeb,"EnumSystemLocales32W(%p,%08lx)\n",
|
||||
lpfnLocaleEnum,flags );
|
||||
/* see if we can reuse the Win95 registry entries.... */
|
||||
if (ERROR_SUCCESS==RegOpenKey32A(HKEY_LOCAL_MACHINE,"\\System\\CurrentControlSet\\control\\Nls\\Locale\\",&xhkey)) {
|
||||
i=0;
|
||||
while (locale_name2id[i].name!=NULL)
|
||||
while (1) {
|
||||
if (ERROR_SUCCESS!=RegEnumKey32W(xhkey,i,buffer,sizeof(buffer)))
|
||||
break;
|
||||
if (!lpfnLocaleEnum(buffer))
|
||||
break;
|
||||
i++;
|
||||
}
|
||||
RegCloseKey(xhkey);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
i=0;
|
||||
while (languages[i].langname!=NULL)
|
||||
{
|
||||
LPWSTR cp = HEAP_strdupAtoW( GetProcessHeap(), 0,
|
||||
locale_name2id[i].name );
|
||||
LPWSTR cp;
|
||||
char xbuffer[10];
|
||||
|
||||
sprintf(xbuffer,"%08lx",(DWORD)languages[i].langid);
|
||||
|
||||
cp = HEAP_strdupAtoW( GetProcessHeap(), 0, xbuffer );
|
||||
ret = lpfnLocaleEnum(cp);
|
||||
HeapFree( GetProcessHeap(), 0, cp );
|
||||
if (!ret) break;
|
||||
|
@ -1767,13 +1841,28 @@ BOOL32 EnumSystemLocales32W( LOCALE_ENUMPROC32W lpfnLocaleEnum, DWORD flags )
|
|||
BOOL32
|
||||
EnumSystemLocales32A(LOCALE_ENUMPROC32A lpfnLocaleEnum,DWORD flags) {
|
||||
int i;
|
||||
CHAR buffer[200];
|
||||
HKEY xhkey;
|
||||
|
||||
dprintf_win32(stddeb,"EnumSystemLocales32A(%p,%08lx)\n",
|
||||
lpfnLocaleEnum,flags
|
||||
);
|
||||
if (ERROR_SUCCESS==RegOpenKey32A(HKEY_LOCAL_MACHINE,"\\System\\CurrentControlSet\\control\\Nls\\Locale\\",&xhkey)) {
|
||||
i=0;
|
||||
while (locale_name2id[i].name!=NULL) {
|
||||
if (!lpfnLocaleEnum(locale_name2id[i].name))
|
||||
while (1) {
|
||||
if (ERROR_SUCCESS!=RegEnumKey32A(xhkey,i,buffer,sizeof(buffer)))
|
||||
break;
|
||||
if (!lpfnLocaleEnum(buffer))
|
||||
break;
|
||||
i++;
|
||||
}
|
||||
RegCloseKey(xhkey);
|
||||
return TRUE;
|
||||
}
|
||||
i=0;
|
||||
while (languages[i].langname!=NULL) {
|
||||
sprintf(buffer,"%08lx",(DWORD)languages[i].langid);
|
||||
if (!lpfnLocaleEnum(buffer))
|
||||
break;
|
||||
i++;
|
||||
}
|
||||
|
@ -1821,7 +1910,9 @@ GetStringTypeEx32A(LCID locale,DWORD dwInfoType,LPCSTR src,INT32 cchSrc,LPWORD c
|
|||
if (isspace(src[i])) chartype[i]|=C1_SPACE;
|
||||
if (ispunct(src[i])) chartype[i]|=C1_PUNCT;
|
||||
if (iscntrl(src[i])) chartype[i]|=C1_CNTRL;
|
||||
if (isblank(src[i])) chartype[i]|=C1_BLANK;
|
||||
/* FIXME: isblank() is a GNU extension */
|
||||
/* if (isblank(src[i])) chartype[i]|=C1_BLANK; */
|
||||
if ((src[i] == ' ') || (src[i] == '\t')) chartype[i]|=C1_BLANK;
|
||||
/* C1_XDIGIT */
|
||||
}
|
||||
return TRUE;
|
||||
|
@ -1869,3 +1960,60 @@ GetStringTypeEx32W(LCID locale,DWORD dwInfoType,LPCWSTR src,INT32 cchSrc,LPWORD
|
|||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* 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); */
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,456 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* tweak.c
|
||||
*
|
||||
* Windows 95 style interface tweaks.
|
||||
* Copyright (c) 1997 Dave Cuthbert.
|
||||
*
|
||||
* FIXME: This file is, unfortunately, aptly named: the method of
|
||||
* displaying Win95 style windows is a tweak. Lots of stuff does not yet
|
||||
* work -- and probably never will unless some of this code is
|
||||
* incorporated into the mainstream Wine code.
|
||||
*
|
||||
* DEVELOPERS, PLEASE NOTE: Before delving into the mainstream code and
|
||||
* altering it, consider how your changes will affect the Win3.1 interface
|
||||
* (which has taken a major effort to create!). After you make any sort of
|
||||
* non-trivial change, *test* the Wine code running in Win3.1 mode! The
|
||||
* object here is to make it so that the person who tests the latest version
|
||||
* of Wine without adding the tweaks into wine.conf notices nothing out of
|
||||
* the ordinary.
|
||||
*
|
||||
* Revision history
|
||||
* 03-Jul-1997 Dave Cuthbert (dacut@ece.cmu.edu)
|
||||
* Original implementation.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <malloc.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <string.h>
|
||||
#include "dc.h"
|
||||
#include "debug.h"
|
||||
#include "graphics.h"
|
||||
#include "options.h"
|
||||
#include "stackframe.h"
|
||||
#include "syscolor.h"
|
||||
#include "tweak.h"
|
||||
#include "windows.h"
|
||||
|
||||
/* Parameters for windows/nonclient.c */
|
||||
extern int NC_CaptionLeftNudge;
|
||||
extern int NC_CaptionTopNudge;
|
||||
extern int NC_SysControlNudge;
|
||||
extern int NC_MaxControlNudge;
|
||||
extern int NC_MinControlNudge;
|
||||
extern UINT32 NC_CaptionTextFlags;
|
||||
extern HBRUSH32 NC_WinHighlight95;
|
||||
extern HBRUSH32 NC_WinShadow95;
|
||||
|
||||
/* Parameters for controls/menu.c */
|
||||
extern UINT32 MENU_BarItemTopNudge;
|
||||
extern UINT32 MENU_BarItemLeftNudge;
|
||||
extern UINT32 MENU_ItemTopNudge;
|
||||
extern UINT32 MENU_ItemLeftNudge;
|
||||
extern UINT32 MENU_HighlightTopNudge;
|
||||
extern UINT32 MENU_HighlightLeftNudge;
|
||||
extern UINT32 MENU_HighlightBottomNudge;
|
||||
extern UINT32 MENU_HighlightRightNudge;
|
||||
|
||||
/* General options */
|
||||
HPEN32 TWEAK_PenFF95;
|
||||
HPEN32 TWEAK_PenE095;
|
||||
HPEN32 TWEAK_PenC095;
|
||||
HPEN32 TWEAK_Pen8095;
|
||||
HPEN32 TWEAK_Pen0095;
|
||||
|
||||
#if defined(WIN_95_LOOK)
|
||||
int TWEAK_Win95Look = 1;
|
||||
#else
|
||||
int TWEAK_Win95Look = 0;
|
||||
#endif
|
||||
|
||||
int TWEAK_WineInitialized = 0;
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* int TWEAK_MenuInit()
|
||||
*
|
||||
* Initializes the Win95 tweaks to the menu code. See controls/menu.c.
|
||||
* Return value indicates success (non-zero) or failure.
|
||||
*
|
||||
* Revision history
|
||||
* 06-Jul-1997 Dave Cuthbert (dacut@ece.cmu.edu)
|
||||
* Original implementation.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
static int TWEAK_MenuInit()
|
||||
{
|
||||
MENU_BarItemTopNudge =
|
||||
PROFILE_GetWineIniInt("Tweak.Layout", "MenuBarItemTopNudge", 0);
|
||||
MENU_BarItemLeftNudge =
|
||||
PROFILE_GetWineIniInt("Tweak.Layout", "MenuBarItemLeftNudge", 0);
|
||||
MENU_ItemTopNudge =
|
||||
PROFILE_GetWineIniInt("Tweak.Layout", "MenuItemTopNudge", 0);
|
||||
MENU_ItemLeftNudge =
|
||||
PROFILE_GetWineIniInt("Tweak.Layout", "MenuItemLeftNudge", 0);
|
||||
MENU_HighlightTopNudge =
|
||||
PROFILE_GetWineIniInt("Tweak.Layout", "MenuHighlightTopNudge", 0);
|
||||
MENU_HighlightLeftNudge =
|
||||
PROFILE_GetWineIniInt("Tweak.Layout", "MenuHighlightLeftNudge", 0);
|
||||
MENU_HighlightBottomNudge =
|
||||
PROFILE_GetWineIniInt("Tweak.Layout", "MenuHighlightBottomNudge", 0);
|
||||
MENU_HighlightRightNudge =
|
||||
PROFILE_GetWineIniInt("Tweak.Layout", "MenuHighlightRightNudge", 0);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* int TWEAK_NonClientInit()
|
||||
*
|
||||
* Initializes the Win95 tweaks to the non-client drawing functions. See
|
||||
* windows/nonclient.c. Return value indicates success (non-zero) or
|
||||
* failure.
|
||||
*
|
||||
* Revision history
|
||||
* 05-Jul-1997 Dave Cuthbert (dacut@ece.cmu.edu)
|
||||
* Original implementation.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
static int TWEAK_NonClientInit()
|
||||
{
|
||||
char key_value[2];
|
||||
|
||||
NC_CaptionLeftNudge =
|
||||
PROFILE_GetWineIniInt("Tweak.Layout", "CaptionLeftNudge", 0);
|
||||
NC_CaptionTopNudge =
|
||||
PROFILE_GetWineIniInt("Tweak.Layout", "CaptionTopNudge", 0);
|
||||
NC_SysControlNudge =
|
||||
PROFILE_GetWineIniInt("Tweak.Layout", "SysControlNudge", 0);
|
||||
NC_MaxControlNudge =
|
||||
PROFILE_GetWineIniInt("Tweak.Layout", "MaxControlNudge", 0);
|
||||
NC_MinControlNudge =
|
||||
PROFILE_GetWineIniInt("Tweak.Layout", "MinControlNudge", 0);
|
||||
|
||||
NC_WinHighlight95 = CreateSolidBrush32(RGB(0xc0, 0xc0, 0xc0));
|
||||
NC_WinShadow95 = CreateSolidBrush32(RGB(0x00, 0x00, 0x00));
|
||||
|
||||
NC_CaptionTextFlags = DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX;
|
||||
|
||||
PROFILE_GetWineIniString("Tweak.Layout", "CaptionAlignment",
|
||||
TWEAK_Win95Look ? "l" : "c", key_value, 2);
|
||||
|
||||
switch(key_value[0]) {
|
||||
case 'l':
|
||||
case 'L':
|
||||
NC_CaptionTextFlags |= DT_LEFT;
|
||||
break;
|
||||
|
||||
case 'r':
|
||||
case 'R':
|
||||
NC_CaptionTextFlags |= DT_RIGHT;
|
||||
break;
|
||||
|
||||
default:
|
||||
NC_CaptionTextFlags |= DT_CENTER;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* int TWEAK_VarInit()
|
||||
*
|
||||
* Initializes the miscellaneous variables which are used in the tweak
|
||||
* routines. Return value is non-zero on success.
|
||||
*
|
||||
* Revision history
|
||||
* 07-Jul-1997 Dave Cuthbert (dacut@ece.cmu.edu)
|
||||
* Original implementation.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
static int TWEAK_VarInit()
|
||||
{
|
||||
TWEAK_Win95Look = PROFILE_GetWineIniBool("Tweak.Layout", "Win95Look", 0);
|
||||
|
||||
/* FIXME: Each color should really occupy a single entry in the wine.conf
|
||||
file, but I couldn't settle on a good (intuitive!) format. */
|
||||
|
||||
TWEAK_PenFF95 = CreatePen32(
|
||||
PS_SOLID, 1,
|
||||
RGB(PROFILE_GetWineIniInt("Tweak.Colors", "PenFF95.Red", 0xff),
|
||||
PROFILE_GetWineIniInt("Tweak.Colors", "PenFF95.Grn", 0xff),
|
||||
PROFILE_GetWineIniInt("Tweak.Colors", "PenFF95.Blu", 0xff)));
|
||||
TWEAK_PenE095 = CreatePen32(
|
||||
PS_SOLID, 1,
|
||||
RGB(PROFILE_GetWineIniInt("Tweak.Colors", "PenE095.Red", 0xe0),
|
||||
PROFILE_GetWineIniInt("Tweak.Colors", "PenE095.Grn", 0xe0),
|
||||
PROFILE_GetWineIniInt("Tweak.Colors", "PenE095.Blu", 0xe0)));
|
||||
TWEAK_PenC095 = CreatePen32(
|
||||
PS_SOLID, 1,
|
||||
RGB(PROFILE_GetWineIniInt("Tweak.Colors", "PenC095.Red", 0xc0),
|
||||
PROFILE_GetWineIniInt("Tweak.Colors", "PenC095.Grn", 0xc0),
|
||||
PROFILE_GetWineIniInt("Tweak.Colors", "PenC095.Blu", 0xc0)));
|
||||
TWEAK_Pen8095 = CreatePen32(
|
||||
PS_SOLID, 1,
|
||||
RGB(PROFILE_GetWineIniInt("Tweak.Colors", "Pen8095.Red", 0x80),
|
||||
PROFILE_GetWineIniInt("Tweak.Colors", "Pen8095.Grn", 0x80),
|
||||
PROFILE_GetWineIniInt("Tweak.Colors", "Pen8095.Blu", 0x80)));
|
||||
TWEAK_Pen0095 = CreatePen32(
|
||||
PS_SOLID, 1,
|
||||
RGB(PROFILE_GetWineIniInt("Tweak.Colors", "Pen0095.Red", 0x00),
|
||||
PROFILE_GetWineIniInt("Tweak.Colors", "Pen0095.Grn", 0x00),
|
||||
PROFILE_GetWineIniInt("Tweak.Colors", "Pen0095.Blu", 0x00)));
|
||||
|
||||
dprintf_tweak(stddeb, "TWEAK_VarInit: Using %s look and feel.\n",
|
||||
TWEAK_Win95Look ? "Win95" : "Win3.1");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* int TWEAK_Init()
|
||||
*
|
||||
* Does the full initialization of the Win95 tweak subsystem. Return value
|
||||
* indicates success. Called by loader/main.c's MAIN_Init().
|
||||
*
|
||||
* Revision history
|
||||
* 05-Jul-1997 Dave Cuthbert (dacut@ece.cmu.edu)
|
||||
* Original implementation.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
int TWEAK_Init()
|
||||
{
|
||||
TWEAK_VarInit();
|
||||
TWEAK_NonClientInit();
|
||||
TWEAK_MenuInit();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* int TWEAK_CheckOldFonts()
|
||||
*
|
||||
* Examines wine.conf for old/invalid font entries and recommend changes to
|
||||
* the user.
|
||||
*
|
||||
* Revision history
|
||||
* 05-Jul-1997 Dave Cuthbert (dacut@ece.cmu.edu)
|
||||
* Original implementation.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
static void TWEAK_CheckOldFontsCallback(char const *, char const *, void *);
|
||||
|
||||
static char const *fontmsgprologue =
|
||||
"Wine warning:\n"
|
||||
" The following entries in the [fonts] section of the wine.conf file are\n"
|
||||
" obsolete or invalid:\n";
|
||||
|
||||
static char const *fontmsgepilogue =
|
||||
" These entries should be eliminated or updated.\n"
|
||||
" See the documentation/fonts file for more information.\n";
|
||||
|
||||
static int TWEAK_CheckOldFonts()
|
||||
{
|
||||
int found = 0;
|
||||
|
||||
PROFILE_EnumerateWineIniSection("Fonts", &TWEAK_CheckOldFontsCallback,
|
||||
(void *)&found);
|
||||
if(found)
|
||||
fprintf(stderr, fontmsgepilogue);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void TWEAK_CheckOldFontsCallback(
|
||||
char const *key,
|
||||
char const *value,
|
||||
void *found)
|
||||
{
|
||||
/* Ignore any keys that start with potential comment characters "'", '#',
|
||||
or ';'. */
|
||||
if(key[0] == '\'' || key[0] == '#' || key[0] == ';' || key[0] == '\0')
|
||||
return;
|
||||
|
||||
/* Make sure this is a valid key */
|
||||
if(strncasecmp(key, "Alias", 5) == 0 ||
|
||||
strcasecmp(key, "Default") == 0) {
|
||||
|
||||
/* Valid key; make sure the value doesn't contain a wildcard */
|
||||
if(strchr(value, '*')) {
|
||||
if(*(int *)found == 0) {
|
||||
fprintf(stderr, fontmsgprologue);
|
||||
++*(int *)found;
|
||||
}
|
||||
|
||||
fprintf(stderr, " %s=%s [no wildcards allowed]\n", key, value);
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* Not a valid key */
|
||||
if(*(int *)found == 0) {
|
||||
fprintf(stderr, fontmsgprologue);
|
||||
++*(int *)found;
|
||||
}
|
||||
|
||||
fprintf(stderr, " %s=%s [obsolete]\n", key, value);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* int TWEAK_CheckConfiguration()
|
||||
*
|
||||
* Examines wine.conf for old/bad entries and recommends changes to the user.
|
||||
*
|
||||
* Revision history
|
||||
* 05-Jul-1997 Dave Cuthbert (dacut@ece.cmu.edu)
|
||||
* Original implementation.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
int TWEAK_CheckConfiguration()
|
||||
{
|
||||
TWEAK_CheckOldFonts();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Tweak graphic subsystem.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* void TWEAK_DrawReliefRect95(
|
||||
* HDC32 hdc, // Device context on which to draw
|
||||
* RECT32 const *rect ) // Rectangle to use
|
||||
*
|
||||
* Draws the double-bordered Win95-style relief rectangle.
|
||||
*
|
||||
* Bugs
|
||||
* There are some checks missing from this function. Perhaps the
|
||||
* SelectObject32 calls should be examined? Hasn't failed on me (yet).
|
||||
*
|
||||
* Should I really be calling X functions directly from here? It is
|
||||
* an optimization, but should I be optimizing alpha code? Probably
|
||||
* not.
|
||||
*
|
||||
* Revision history
|
||||
* 08-Jul-1997 Dave Cuthbert (dacut@ece.cmu.edu)
|
||||
* Original implementation.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
void TWEAK_DrawReliefRect95(
|
||||
HDC32 hdc,
|
||||
RECT32 const *rect )
|
||||
{
|
||||
DC *dc;
|
||||
HPEN32 prevpen;
|
||||
|
||||
if((dc = (DC *)GDI_GetObjPtr(hdc, DC_MAGIC))) {
|
||||
|
||||
/* Draw the top/left lines first */
|
||||
prevpen = SelectObject32(hdc, TWEAK_PenE095);
|
||||
DC_SetupGCForPen(dc);
|
||||
XDrawLine(display, dc->u.x.drawable, dc->u.x.gc, rect->left, rect->top,
|
||||
rect->right - 1, rect->top);
|
||||
XDrawLine(display, dc->u.x.drawable, dc->u.x.gc, rect->left, rect->top,
|
||||
rect->left, rect->bottom - 1);
|
||||
|
||||
SelectObject32(hdc, TWEAK_PenFF95);
|
||||
DC_SetupGCForPen(dc);
|
||||
XDrawLine(display, dc->u.x.drawable, dc->u.x.gc, rect->left + 1,
|
||||
rect->top + 1, rect->right - 2, rect->top + 1);
|
||||
XDrawLine(display, dc->u.x.drawable, dc->u.x.gc, rect->left + 1,
|
||||
rect->top + 1, rect->left + 1, rect->bottom - 2);
|
||||
|
||||
|
||||
/* Now the bottom/right lines */
|
||||
SelectObject32(hdc, TWEAK_Pen0095);
|
||||
DC_SetupGCForPen(dc);
|
||||
XDrawLine(display, dc->u.x.drawable, dc->u.x.gc, rect->left,
|
||||
rect->bottom - 1, rect->right - 1, rect->bottom - 1);
|
||||
XDrawLine(display, dc->u.x.drawable, dc->u.x.gc, rect->right - 1,
|
||||
rect->top, rect->right - 1, rect->bottom - 1);
|
||||
|
||||
SelectObject32(hdc, TWEAK_Pen8095);
|
||||
DC_SetupGCForPen(dc);
|
||||
XDrawLine(display, dc->u.x.drawable, dc->u.x.gc, rect->left + 1,
|
||||
rect->bottom - 2, rect->right - 2, rect->bottom - 2);
|
||||
XDrawLine(display, dc->u.x.drawable, dc->u.x.gc, rect->right - 2,
|
||||
rect->top + 1, rect->right - 2, rect->bottom - 2);
|
||||
|
||||
SelectObject32(hdc, prevpen);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* void TWEAK_DrawMenuSeparator95(
|
||||
* HDC32 hdc, // Device context on which to draw
|
||||
* UINT32 xc1, // Left x-coordinate
|
||||
* UINT32 yc, // Y-coordinate of the LOWER line
|
||||
* UINT32 xc2 ) // Right x-coordinate
|
||||
*
|
||||
* Draws the menu separator bar Win 95 style.
|
||||
*
|
||||
* Bugs
|
||||
* Same as those for DrawReliefRect95.
|
||||
*
|
||||
* Revision history
|
||||
* 08-Jul-1997 Dave Cuthbert (dacut@ece.cmu.edu)
|
||||
* Original implementation.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
void TWEAK_DrawMenuSeparator95(
|
||||
HDC32 hdc,
|
||||
UINT32 xc1,
|
||||
UINT32 yc,
|
||||
UINT32 xc2 )
|
||||
{
|
||||
DC *dc;
|
||||
HPEN32 prevpen;
|
||||
|
||||
if((dc = (DC *)GDI_GetObjPtr(hdc, DC_MAGIC))) {
|
||||
|
||||
/* Draw the top line */
|
||||
prevpen = SelectObject32(hdc, TWEAK_Pen8095);
|
||||
DC_SetupGCForPen(dc);
|
||||
XDrawLine(display, dc->u.x.drawable, dc->u.x.gc, xc1, yc - 1, xc2,
|
||||
yc - 1);
|
||||
|
||||
/* And the bottom line */
|
||||
SelectObject32(hdc, TWEAK_PenFF95);
|
||||
DC_SetupGCForPen(dc);
|
||||
XDrawLine(display, dc->u.x.drawable, dc->u.x.gc, xc1, yc, xc2, yc);
|
||||
|
||||
SelectObject32(hdc, prevpen);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
127
misc/ver.c
127
misc/ver.c
|
@ -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,"Dänisch"},
|
||||
{0x0407,"Deutsch"},
|
||||
{0x0408,"Griechisch"},
|
||||
{0x0409,"Amerikanisches Englisch"},
|
||||
{0x040A,"Kastilisches Spanisch"},
|
||||
{0x040B,"Finnisch"},
|
||||
{0x040C,"Französisch"},
|
||||
{0x040D,"Hebräisch"},
|
||||
{0x040E,"Ungarisch"},
|
||||
{0x040F,"Isländisch"},
|
||||
{0x0410,"Italienisch"},
|
||||
{0x0411,"Japanisch"},
|
||||
{0x0412,"Koreanisch"},
|
||||
{0x0413,"Niederländisch"},
|
||||
{0x0414,"Norwegisch-Bokmal"},
|
||||
{0x0415,"Polnisch"},
|
||||
{0x0416,"Brasilianisches Portugiesisch"},
|
||||
{0x0417,"Rätoromanisch"},
|
||||
{0x0418,"Rumänisch"},
|
||||
{0x0419,"Russisch"},
|
||||
{0x041A,"Kroatoserbisch (lateinisch)"},
|
||||
{0x041B,"Slowenisch"},
|
||||
{0x041C,"Albanisch"},
|
||||
{0x041D,"Schwedisch"},
|
||||
{0x041E,"Thai"},
|
||||
{0x041F,"Türkisch"},
|
||||
{0x0420,"Urdu"},
|
||||
{0x0421,"Bahasa"},
|
||||
{0x0804,"Vereinfachtes Chinesisch"},
|
||||
{0x0807,"Schweizerdeutsch"},
|
||||
{0x0809,"Britisches Englisch"},
|
||||
{0x080A,"Mexikanisches Spanisch"},
|
||||
{0x080C,"Belgisches Französisch"},
|
||||
{0x0810,"Schweizerisches Italienisch"},
|
||||
{0x0813,"Belgisches Niederländisch"},
|
||||
{0x0814,"Norgwegisch-Nynorsk"},
|
||||
{0x0816,"Portugiesisch"},
|
||||
{0x081A,"Serbokratisch (kyrillisch)"},
|
||||
{0x0C1C,"Kanadisches Französisch"},
|
||||
{0x100C,"Schweizerisches Französisch"},
|
||||
{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,6 +822,7 @@ INT32 GetDIBits32( HDC32 hdc, HBITMAP32 hbitmap, UINT32 startscan,
|
|||
|
||||
/* Transfer color info */
|
||||
|
||||
if (info->bmiHeader.biBitCount<=8) {
|
||||
palEntry = palette->logpalette.palPalEntry;
|
||||
for (i = 0; i < info->bmiHeader.biClrUsed; i++, palEntry++)
|
||||
{
|
||||
|
@ -834,6 +835,7 @@ INT32 GetDIBits32( HDC32 hdc, HBITMAP32 hbitmap, UINT32 startscan,
|
|||
}
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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)
|
||||
|
|
|
@ -0,0 +1,128 @@
|
|||
/*
|
||||
* 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 "&Kør..."
|
||||
#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 "&Hjælp"
|
||||
#define MENU_HELP_CONTENTS "&Indhold"
|
||||
#define MENU_HELP_SEARCH "&Søg efter hjælp om..."
|
||||
#define MENU_HELP_HELP_ON_HELP "&Brug af Hjælp"
|
||||
#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 "Kør &minimeret"
|
||||
#define DIALOG_PROGRAM_OTHER_SYMBOL "Skift &ikon..."
|
||||
|
||||
#define DIALOG_SYMBOL_CAPTION "Skift ikon"
|
||||
#define DIALOG_SYMBOL_FILE "&Filnavn:"
|
||||
#define DIALOG_SYMBOL_CURRENT "&Nuværende ikon:"
|
||||
|
||||
#define DIALOG_EXECUTE_CAPTION "Kør"
|
||||
#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 læse 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 prøve at indlæse den?"
|
||||
|
||||
#define STRING_OUT_OF_MEMORY "\
|
||||
Der er ikke nok hukommelse til at udføre denne operation.\n\
|
||||
Afslut et eller flere aktive programmer for at frigøre hukommelse, \
|
||||
og prøv så igen."
|
||||
|
||||
#define STRING_WINHELP_ERROR "\
|
||||
Kan ikke vise information fra Hjælp."
|
||||
|
||||
#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
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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)
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* 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 "Sæt &ind", WM_PASTE
|
||||
MENUITEM "&Slet", WM_CLEAR
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Select &All", EM_SETSEL32
|
||||
MENUITEM "Vælg &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 "&Størrelse:",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 "&Hjælp" , 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 "&Grundlæggende 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 "&Farvemætning:", 1092, 150, 146, 40, 9
|
||||
LTEXT "&Lysstyrke:", 1093, 150, 166, 40, 9
|
||||
LTEXT "&Rød:", 1094, 150, 126, 40, 9
|
||||
LTEXT "&Grøn:", 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 "&Tilføj 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 "&Grundlæggende farver:", 1088, 4, 4, 140, 10
|
||||
LTEXT "&Selvvalgte farver:", 1089, 4, 106, 140, 10
|
||||
LTEXT "&Ensfarvet", 1090, 150, 151, 48, 10
|
||||
LTEXT "&Rød:", 726 /*1094*/,249,126,24,10
|
||||
EDITTEXT 706, 275,124,18,12, WS_BORDER | WS_GROUP | WS_TABSTOP
|
||||
LTEXT "&Grøn:",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 "&Farvemætning:" ,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 "Hjælp", 1038,100,166, 44, 14
|
||||
PUSHBUTTON "&Tilføj 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 */
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
|
23
win32/file.c
23
win32/file.c
|
@ -249,26 +249,3 @@ BOOL32 AreFileApisANSI()
|
|||
}
|
||||
|
||||
|
||||
BOOL32
|
||||
LockFile(
|
||||
HFILE32 hFile,DWORD dwFileOffsetLow,DWORD dwFileOffsetHigh,
|
||||
DWORD nNumberOfBytesToLockLow,DWORD nNumberOfBytesToLockHigh )
|
||||
{
|
||||
fprintf(stdnimp,"LockFile(%d,0x%08lx%08lx,0x%08lx%08lx),stub!\n",
|
||||
hFile,dwFileOffsetHigh,dwFileOffsetLow,
|
||||
nNumberOfBytesToLockHigh,nNumberOfBytesToLockLow
|
||||
);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL32
|
||||
UnlockFile(
|
||||
HFILE32 hFile,DWORD dwFileOffsetLow,DWORD dwFileOffsetHigh,
|
||||
DWORD nNumberOfBytesToUnlockLow,DWORD nNumberOfBytesToUnlockHigh )
|
||||
{
|
||||
fprintf(stdnimp,"UnlockFile(%d,0x%08lx%08lx,0x%08lx%08lx),stub!\n",
|
||||
hFile,dwFileOffsetHigh,dwFileOffsetLow,
|
||||
nNumberOfBytesToUnlockHigh,nNumberOfBytesToUnlockLow
|
||||
);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@ HWND32 WindowFromDC32( HDC32 hDC )
|
|||
* It is called from SetWindowPos - we have to invalidate all busy
|
||||
* DCE's for windows whose client rect intersects with update rectangle
|
||||
*/
|
||||
BOOL32 DCE_InvalidateDCE(WND* wndScope, RECT16* pRectUpdate)
|
||||
BOOL32 DCE_InvalidateDCE(WND* wndScope, RECT32* pRectUpdate)
|
||||
{
|
||||
BOOL32 bRet = FALSE;
|
||||
DCE *dce;
|
||||
|
@ -147,13 +147,14 @@ BOOL32 DCE_InvalidateDCE(WND* wndScope, RECT16* pRectUpdate)
|
|||
for( ; wnd ; wnd = wnd->parent )
|
||||
if( wnd == wndScope )
|
||||
{
|
||||
RECT16 wndRect = wndCurrent->rectWindow;
|
||||
RECT32 wndRect = wndCurrent->rectWindow;
|
||||
|
||||
dprintf_dc(stddeb,"\tgot hwnd %04x\n", wndCurrent->hwndSelf);
|
||||
|
||||
MapWindowPoints16(wndCurrent->parent->hwndSelf, wndScope->hwndSelf,
|
||||
(LPPOINT16)&wndRect, 2);
|
||||
if( IntersectRect16(&wndRect,&wndRect,pRectUpdate) )
|
||||
MapWindowPoints32( wndCurrent->parent->hwndSelf,
|
||||
wndScope->hwndSelf,
|
||||
(LPPOINT32)&wndRect, 2 );
|
||||
if (IntersectRect32( &wndRect, &wndRect, pRectUpdate ))
|
||||
{
|
||||
SetHookFlags(dce->hDC, DCHF_INVALIDATEVISRGN);
|
||||
bRet = TRUE;
|
||||
|
@ -188,7 +189,7 @@ void DCE_Init()
|
|||
* window area clipped by the client area of all ancestors.
|
||||
* Return FALSE if the visible region is empty.
|
||||
*/
|
||||
static BOOL32 DCE_GetVisRect( WND *wndPtr, BOOL32 clientArea, RECT16 *lprect )
|
||||
static BOOL32 DCE_GetVisRect( WND *wndPtr, BOOL32 clientArea, RECT32 *lprect )
|
||||
{
|
||||
int xoffset, yoffset;
|
||||
|
||||
|
@ -198,7 +199,7 @@ static BOOL32 DCE_GetVisRect( WND *wndPtr, BOOL32 clientArea, RECT16 *lprect )
|
|||
|
||||
if (!(wndPtr->dwStyle & WS_VISIBLE) || (wndPtr->flags & WIN_NO_REDRAW))
|
||||
{
|
||||
SetRectEmpty16( lprect ); /* Clip everything */
|
||||
SetRectEmpty32( lprect ); /* Clip everything */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -209,20 +210,20 @@ static BOOL32 DCE_GetVisRect( WND *wndPtr, BOOL32 clientArea, RECT16 *lprect )
|
|||
(wndPtr->flags & WIN_NO_REDRAW) ||
|
||||
(wndPtr->dwStyle & WS_ICONIC))
|
||||
{
|
||||
SetRectEmpty16( lprect ); /* Clip everything */
|
||||
SetRectEmpty32( lprect ); /* Clip everything */
|
||||
return FALSE;
|
||||
}
|
||||
xoffset += wndPtr->rectClient.left;
|
||||
yoffset += wndPtr->rectClient.top;
|
||||
OffsetRect16( lprect, wndPtr->rectClient.left,
|
||||
OffsetRect32( lprect, wndPtr->rectClient.left,
|
||||
wndPtr->rectClient.top );
|
||||
|
||||
/* Warning!! we assume that IntersectRect() handles the case */
|
||||
/* where the destination is the same as one of the sources. */
|
||||
if (!IntersectRect16( lprect, lprect, &wndPtr->rectClient ))
|
||||
if (!IntersectRect32( lprect, lprect, &wndPtr->rectClient ))
|
||||
return FALSE; /* Visible rectangle is empty */
|
||||
}
|
||||
OffsetRect16( lprect, -xoffset, -yoffset );
|
||||
OffsetRect32( lprect, -xoffset, -yoffset );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -277,7 +278,7 @@ static HRGN32 DCE_ClipWindows( WND *pWndStart, WND *pWndEnd,
|
|||
*/
|
||||
HRGN32 DCE_GetVisRgn( HWND32 hwnd, WORD flags )
|
||||
{
|
||||
RECT16 rect;
|
||||
RECT32 rect;
|
||||
HRGN32 hrgn;
|
||||
int xoffset, yoffset;
|
||||
WND *wndPtr = WIN_FindWndPtr( hwnd );
|
||||
|
@ -289,7 +290,7 @@ HRGN32 DCE_GetVisRgn( HWND32 hwnd, WORD flags )
|
|||
{
|
||||
return CreateRectRgn32( 0, 0, 0, 0 ); /* Visible region is empty */
|
||||
}
|
||||
if (!(hrgn = CreateRectRgnIndirect16( &rect ))) return 0;
|
||||
if (!(hrgn = CreateRectRgnIndirect32( &rect ))) return 0;
|
||||
|
||||
/* Clip all children from the visible region */
|
||||
|
||||
|
@ -545,12 +546,12 @@ HDC32 GetDCEx32( HWND32 hwnd, HRGN32 hrgnClip, DWORD flags )
|
|||
if( wndPtr->parent && wndPtr->window )
|
||||
{
|
||||
WND* wnd = wndPtr->parent->child;
|
||||
RECT16 rect;
|
||||
RECT32 rect;
|
||||
|
||||
for( ; wnd != wndPtr; wnd = wnd->next )
|
||||
if( wnd->class->style & CS_SAVEBITS &&
|
||||
wnd->dwStyle & WS_VISIBLE &&
|
||||
IntersectRect16(&rect, &wndPtr->rectClient, &wnd->rectClient) )
|
||||
IntersectRect32(&rect, &wndPtr->rectClient, &wnd->rectClient) )
|
||||
wnd->flags |= WIN_SAVEUNDER_OVERRIDE;
|
||||
}
|
||||
|
||||
|
|
|
@ -380,7 +380,12 @@ LRESULT DefWindowProc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam,
|
|||
break;
|
||||
|
||||
case WM_NCCALCSIZE:
|
||||
result = NC_HandleNCCalcSize(wndPtr, (RECT16 *)PTR_SEG_TO_LIN(lParam));
|
||||
{
|
||||
RECT32 rect32;
|
||||
CONV_RECT16TO32( (RECT16 *)PTR_SEG_TO_LIN(lParam), &rect32 );
|
||||
result = NC_HandleNCCalcSize( wndPtr, &rect32 );
|
||||
CONV_RECT32TO16( &rect32, (RECT16 *)PTR_SEG_TO_LIN(lParam) );
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_WINDOWPOSCHANGING:
|
||||
|
@ -441,12 +446,7 @@ LRESULT DefWindowProc32A( HWND32 hwnd, UINT32 msg, WPARAM32 wParam,
|
|||
break;
|
||||
|
||||
case WM_NCCALCSIZE:
|
||||
{
|
||||
RECT16 rect16;
|
||||
CONV_RECT32TO16( (RECT32 *)lParam, &rect16 );
|
||||
result = NC_HandleNCCalcSize( wndPtr, &rect16 );
|
||||
CONV_RECT16TO32( &rect16, (RECT32 *)lParam );
|
||||
}
|
||||
result = NC_HandleNCCalcSize( wndPtr, (RECT32 *)lParam );
|
||||
break;
|
||||
|
||||
case WM_WINDOWPOSCHANGING:
|
||||
|
|
|
@ -697,32 +697,31 @@ static void EVENT_ConfigureNotify( HWND32 hwnd, XConfigureEvent *event )
|
|||
else
|
||||
{
|
||||
WND *wndPtr = WIN_FindWndPtr( hwnd );
|
||||
WINDOWPOS16 *winpos;
|
||||
RECT16 newWindowRect, newClientRect;
|
||||
WINDOWPOS32 winpos;
|
||||
RECT32 newWindowRect, newClientRect;
|
||||
HRGN32 hrgnOldPos, hrgnNewPos;
|
||||
Window above = event->above;
|
||||
|
||||
if (!wndPtr || !(wndPtr->flags & WIN_MANAGED) ||
|
||||
!(winpos = SEGPTR_NEW(WINDOWPOS16))) return;
|
||||
if (!wndPtr || !(wndPtr->flags & WIN_MANAGED)) return;
|
||||
|
||||
/* Fill WINDOWPOS struct */
|
||||
winpos->flags = SWP_NOACTIVATE | SWP_NOZORDER;
|
||||
winpos->hwnd = hwnd;
|
||||
winpos->x = event->x;
|
||||
winpos->y = event->y;
|
||||
winpos->cx = event->width;
|
||||
winpos->cy = event->height;
|
||||
winpos.flags = SWP_NOACTIVATE | SWP_NOZORDER;
|
||||
winpos.hwnd = hwnd;
|
||||
winpos.x = event->x;
|
||||
winpos.y = event->y;
|
||||
winpos.cx = event->width;
|
||||
winpos.cy = event->height;
|
||||
|
||||
/* Check for unchanged attributes */
|
||||
if(winpos->x == wndPtr->rectWindow.left &&
|
||||
winpos->y == wndPtr->rectWindow.top)
|
||||
winpos->flags |= SWP_NOMOVE;
|
||||
if(winpos->cx == wndPtr->rectWindow.right - wndPtr->rectWindow.left &&
|
||||
winpos->cy == wndPtr->rectWindow.bottom - wndPtr->rectWindow.top)
|
||||
winpos->flags |= SWP_NOSIZE;
|
||||
if(winpos.x == wndPtr->rectWindow.left &&
|
||||
winpos.y == wndPtr->rectWindow.top)
|
||||
winpos.flags |= SWP_NOMOVE;
|
||||
if(winpos.cx == wndPtr->rectWindow.right - wndPtr->rectWindow.left &&
|
||||
winpos.cy == wndPtr->rectWindow.bottom - wndPtr->rectWindow.top)
|
||||
winpos.flags |= SWP_NOSIZE;
|
||||
|
||||
/* Send WM_WINDOWPOSCHANGING */
|
||||
SendMessage16(hwnd, WM_WINDOWPOSCHANGING, 0, (LPARAM)SEGPTR_GET(winpos));
|
||||
SendMessage32A( hwnd, WM_WINDOWPOSCHANGING, 0, (LPARAM)&winpos );
|
||||
|
||||
/* Calculate new position and size */
|
||||
newWindowRect.left = event->x;
|
||||
|
@ -730,20 +729,18 @@ static void EVENT_ConfigureNotify( HWND32 hwnd, XConfigureEvent *event )
|
|||
newWindowRect.top = event->y;
|
||||
newWindowRect.bottom = event->y + event->height;
|
||||
|
||||
WINPOS_SendNCCalcSize( winpos->hwnd, TRUE, &newWindowRect,
|
||||
WINPOS_SendNCCalcSize( winpos.hwnd, TRUE, &newWindowRect,
|
||||
&wndPtr->rectWindow, &wndPtr->rectClient,
|
||||
SEGPTR_GET(winpos), &newClientRect );
|
||||
&winpos, &newClientRect );
|
||||
|
||||
hrgnOldPos = CreateRectRgnIndirect16( &wndPtr->rectWindow );
|
||||
hrgnNewPos = CreateRectRgnIndirect16( &newWindowRect );
|
||||
hrgnOldPos = CreateRectRgnIndirect32( &wndPtr->rectWindow );
|
||||
hrgnNewPos = CreateRectRgnIndirect32( &newWindowRect );
|
||||
CombineRgn32( hrgnOldPos, hrgnOldPos, hrgnNewPos, RGN_DIFF );
|
||||
|
||||
/* Set new size and position */
|
||||
wndPtr->rectWindow = newWindowRect;
|
||||
wndPtr->rectClient = newClientRect;
|
||||
SendMessage16( hwnd, WM_WINDOWPOSCHANGED, 0, (LPARAM)SEGPTR_GET(winpos));
|
||||
|
||||
SEGPTR_FREE(winpos);
|
||||
SendMessage32A( hwnd, WM_WINDOWPOSCHANGED, 0, (LPARAM)&winpos );
|
||||
|
||||
if( IsWindow32( hwnd ) )
|
||||
if( above == None ) /* absolute bottom */
|
||||
|
|
|
@ -121,6 +121,33 @@ BOOL32 GRAPH_DrawBitmap( HDC32 hdc, HBITMAP32 hbitmap,
|
|||
*/
|
||||
void GRAPH_DrawReliefRect( HDC32 hdc, const RECT32 *rect, INT32 highlight_size,
|
||||
INT32 shadow_size, BOOL32 pressed )
|
||||
{
|
||||
if(pressed)
|
||||
GRAPH_DrawGenericReliefRect(hdc, rect, highlight_size, shadow_size,
|
||||
sysColorObjects.hbrushBtnShadow,
|
||||
sysColorObjects.hbrushBtnHighlight);
|
||||
else
|
||||
GRAPH_DrawGenericReliefRect(hdc, rect, highlight_size, shadow_size,
|
||||
sysColorObjects.hbrushBtnHighlight,
|
||||
sysColorObjects.hbrushBtnShadow);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* GRAPH_DrawGenericReliefRect
|
||||
*
|
||||
* Creates a rectangle with the specified highlight and shadow colors.
|
||||
* Adapted from DrawReliefRect (which is somewhat misnamed).
|
||||
*/
|
||||
void GRAPH_DrawGenericReliefRect(
|
||||
HDC32 hdc,
|
||||
const RECT32 *rect,
|
||||
INT32 highlight_size,
|
||||
INT32 shadow_size,
|
||||
HBRUSH32 highlight,
|
||||
HBRUSH32 shadow )
|
||||
{
|
||||
DC* dc;
|
||||
HBRUSH32 hPrevBrush;
|
||||
|
@ -132,8 +159,8 @@ void GRAPH_DrawReliefRect( HDC32 hdc, const RECT32 *rect, INT32 highlight_size,
|
|||
OffsetRect32( &r, dc->w.DCOrgX, dc->w.DCOrgY);
|
||||
h = rect->bottom - rect->top; w = rect->right - rect->left;
|
||||
|
||||
hPrevBrush = SelectObject32(hdc, pressed ? sysColorObjects.hbrushBtnShadow :
|
||||
sysColorObjects.hbrushBtnHighlight );
|
||||
hPrevBrush = SelectObject32(hdc, highlight);
|
||||
|
||||
if ( DC_SetupGCForBrush( dc ) )
|
||||
{
|
||||
INT32 i;
|
||||
|
@ -148,8 +175,7 @@ void GRAPH_DrawReliefRect( HDC32 hdc, const RECT32 *rect, INT32 highlight_size,
|
|||
}
|
||||
}
|
||||
|
||||
SelectObject32( hdc, pressed ? sysColorObjects.hbrushBtnHighlight :
|
||||
sysColorObjects.hbrushBtnShadow );
|
||||
SelectObject32( hdc, shadow );
|
||||
if ( DC_SetupGCForBrush( dc ) )
|
||||
{
|
||||
INT32 i;
|
||||
|
@ -167,6 +193,8 @@ void GRAPH_DrawReliefRect( HDC32 hdc, const RECT32 *rect, INT32 highlight_size,
|
|||
SelectObject32( hdc, hPrevBrush );
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* GRAPH_DrawRectangle
|
||||
*/
|
||||
|
|
|
@ -979,7 +979,7 @@ static LRESULT HOOK_CallHook( HANDLE16 hook, INT32 fromtype, INT32 code,
|
|||
|
||||
/* Set DS = SS to call hook procedure */
|
||||
old_ds = CURRENT_DS;
|
||||
CURRENT_DS = IF1632_Saved16_ss;
|
||||
CURRENT_DS = SELECTOROF(IF1632_Saved16_ss_sp);
|
||||
ret = data->proc(code, wParam, lParam);
|
||||
CURRENT_DS = old_ds;
|
||||
|
||||
|
|
|
@ -197,7 +197,7 @@ static HWND16 MDI_GetWindow(WND *clientWnd, HWND16 hWnd, WORD wTo )
|
|||
static void MDI_CalcDefaultChildPos( WND* w, WORD n, LPPOINT16 lpPos,
|
||||
INT32 delta)
|
||||
{
|
||||
RECT16 rect = w->rectClient;
|
||||
RECT32 rect = w->rectClient;
|
||||
INT32 spacing = GetSystemMetrics32(SM_CYCAPTION) +
|
||||
GetSystemMetrics32(SM_CYFRAME) - 1;
|
||||
INT32 nstagger;
|
||||
|
@ -398,11 +398,12 @@ static void MDI_ChildGetMinMaxInfo( WND* clientWnd, HWND16 hwnd,
|
|||
MINMAXINFO16* lpMinMax )
|
||||
{
|
||||
WND* childWnd = WIN_FindWndPtr(hwnd);
|
||||
RECT16 rect = clientWnd->rectClient;
|
||||
RECT32 rect = clientWnd->rectClient;
|
||||
|
||||
MapWindowPoints16(clientWnd->parent->hwndSelf,
|
||||
((MDICLIENTINFO*)clientWnd->wExtra)->self, (LPPOINT16)&rect, 2);
|
||||
AdjustWindowRectEx16( &rect, childWnd->dwStyle, 0, childWnd->dwExStyle );
|
||||
MapWindowPoints32(clientWnd->parent->hwndSelf,
|
||||
((MDICLIENTINFO*)clientWnd->wExtra)->self,
|
||||
(LPPOINT32)&rect, 2);
|
||||
AdjustWindowRectEx32( &rect, childWnd->dwStyle, 0, childWnd->dwExStyle );
|
||||
|
||||
lpMinMax->ptMaxSize.x = rect.right -= rect.left;
|
||||
lpMinMax->ptMaxSize.y = rect.bottom -= rect.top;
|
||||
|
@ -701,7 +702,7 @@ static LONG MDITile(WND* wndClient, MDICLIENTINFO *ci,WORD wParam)
|
|||
|
||||
if( total )
|
||||
{
|
||||
RECT16 rect;
|
||||
RECT32 rect;
|
||||
int x, y, xsize, ysize;
|
||||
int rows, columns, r, c, i;
|
||||
|
||||
|
@ -900,7 +901,7 @@ LRESULT MDIClientWndProc(HWND16 hwnd, UINT16 message, WPARAM16 wParam, LPARAM lP
|
|||
{
|
||||
LPCREATESTRUCT16 cs;
|
||||
MDICLIENTINFO *ci;
|
||||
RECT16 rect;
|
||||
RECT32 rect;
|
||||
WND *w = WIN_FindWndPtr(hwnd);
|
||||
WND *frameWnd = w->parent;
|
||||
INT32 nItems;
|
||||
|
@ -948,7 +949,7 @@ LRESULT MDIClientWndProc(HWND16 hwnd, UINT16 message, WPARAM16 wParam, LPARAM lP
|
|||
|
||||
AppendMenu32A( ci->hWindowMenu, MF_SEPARATOR, 0, NULL );
|
||||
|
||||
GetClientRect16(frameWnd->hwndSelf, &rect);
|
||||
GetClientRect32(frameWnd->hwndSelf, &rect);
|
||||
NC_HandleNCCalcSize( w, &rect );
|
||||
w->rectClient = rect;
|
||||
|
||||
|
@ -1571,22 +1572,22 @@ BOOL16 TranslateMDISysAccel16( HWND16 hwndClient, LPMSG16 msg )
|
|||
*/
|
||||
void CalcChildScroll( HWND16 hwnd, WORD scroll )
|
||||
{
|
||||
RECT16 childRect, clientRect;
|
||||
RECT32 childRect, clientRect;
|
||||
INT32 vmin, vmax, hmin, hmax, vpos, hpos;
|
||||
BOOL32 noscroll = FALSE;
|
||||
WND *pWnd, *Wnd;
|
||||
|
||||
if (!(Wnd = pWnd = WIN_FindWndPtr( hwnd ))) return;
|
||||
GetClientRect16( hwnd, &clientRect );
|
||||
SetRectEmpty16( &childRect );
|
||||
GetClientRect32( hwnd, &clientRect );
|
||||
SetRectEmpty32( &childRect );
|
||||
|
||||
for ( pWnd = pWnd->child; pWnd; pWnd = pWnd->next )
|
||||
{
|
||||
UnionRect16( &childRect, &pWnd->rectWindow, &childRect );
|
||||
UnionRect32( &childRect, &pWnd->rectWindow, &childRect );
|
||||
if( pWnd->dwStyle & WS_MAXIMIZE )
|
||||
noscroll = TRUE;
|
||||
}
|
||||
UnionRect16( &childRect, &clientRect, &childRect );
|
||||
UnionRect32( &childRect, &clientRect, &childRect );
|
||||
|
||||
/* jump through the hoops to prevent excessive flashing
|
||||
*/
|
||||
|
|
|
@ -550,7 +550,7 @@ UINT32 GetDoubleClickTime32(void)
|
|||
* Implementation of an inter-task SendMessage.
|
||||
*/
|
||||
static LRESULT MSG_SendMessage( HQUEUE16 hDestQueue, HWND16 hwnd, UINT16 msg,
|
||||
WPARAM16 wParam, LPARAM lParam )
|
||||
WPARAM32 wParam, LPARAM lParam, WORD flags )
|
||||
{
|
||||
INT32 prevSMRL = debugSMRL;
|
||||
QSMCTRL qCtrl = { 0, 1};
|
||||
|
@ -576,12 +576,14 @@ static LRESULT MSG_SendMessage( HQUEUE16 hDestQueue, HWND16 hwnd, UINT16 msg,
|
|||
|
||||
queue->hWnd = hwnd;
|
||||
queue->msg = msg;
|
||||
queue->wParam = wParam;
|
||||
queue->wParam = LOWORD(wParam);
|
||||
queue->wParamHigh = HIWORD(wParam);
|
||||
queue->lParam = lParam;
|
||||
queue->hPrevSendingTask = destQ->hSendingTask;
|
||||
destQ->hSendingTask = GetTaskQueue(0);
|
||||
|
||||
queue->wakeBits &= ~QS_SMPARAMSFREE;
|
||||
queue->flags = (queue->flags & ~(QUEUE_SM_WIN32|QUEUE_SM_UNICODE)) | flags;
|
||||
|
||||
dprintf_sendmsg(stddeb,"%*ssm: smResultInit = %08x\n", prevSMRL, "", (unsigned)&qCtrl);
|
||||
|
||||
|
@ -1058,12 +1060,16 @@ LRESULT SendMessage16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam, LPARAM lParam)
|
|||
}
|
||||
if (QUEUE_IsExitingQueue(wndPtr->hmemTaskQ))
|
||||
return 0; /* Don't send anything if the task is dying */
|
||||
if (wndPtr->hmemTaskQ != GetTaskQueue(0))
|
||||
return MSG_SendMessage( wndPtr->hmemTaskQ, hwnd, msg, wParam, lParam );
|
||||
|
||||
SPY_EnterMessage( SPY_SENDMESSAGE16, hwnd, msg, wParam, lParam );
|
||||
|
||||
if (wndPtr->hmemTaskQ != GetTaskQueue(0))
|
||||
ret = MSG_SendMessage( wndPtr->hmemTaskQ, hwnd, msg,
|
||||
wParam, lParam, 0 );
|
||||
else
|
||||
ret = CallWindowProc16( (WNDPROC16)wndPtr->winproc,
|
||||
hwnd, msg, wParam, lParam );
|
||||
|
||||
SPY_ExitMessage( SPY_RESULT_OK16, hwnd, msg, ret );
|
||||
return ret;
|
||||
}
|
||||
|
@ -1125,15 +1131,15 @@ LRESULT SendMessage32A(HWND32 hwnd, UINT32 msg, WPARAM32 wParam, LPARAM lParam)
|
|||
if (QUEUE_IsExitingQueue(wndPtr->hmemTaskQ))
|
||||
return 0; /* Don't send anything if the task is dying */
|
||||
|
||||
if (wndPtr->hmemTaskQ != GetTaskQueue(0))
|
||||
{
|
||||
fprintf( stderr, "SendMessage32A: intertask message [%04x] not supported\n", msg );
|
||||
return 0;
|
||||
}
|
||||
|
||||
SPY_EnterMessage( SPY_SENDMESSAGE32, hwnd, msg, wParam, lParam );
|
||||
|
||||
if (wndPtr->hmemTaskQ != GetTaskQueue(0))
|
||||
ret = MSG_SendMessage( wndPtr->hmemTaskQ, hwnd, msg, wParam, lParam,
|
||||
QUEUE_SM_WIN32 );
|
||||
else
|
||||
ret = CallWindowProc32A( (WNDPROC32)wndPtr->winproc,
|
||||
hwnd, msg, wParam, lParam );
|
||||
|
||||
SPY_ExitMessage( SPY_RESULT_OK32, hwnd, msg, ret );
|
||||
return ret;
|
||||
}
|
||||
|
@ -1173,15 +1179,16 @@ LRESULT SendMessage32W(HWND32 hwnd, UINT32 msg, WPARAM32 wParam, LPARAM lParam)
|
|||
}
|
||||
if (QUEUE_IsExitingQueue(wndPtr->hmemTaskQ))
|
||||
return 0; /* Don't send anything if the task is dying */
|
||||
if (wndPtr->hmemTaskQ != GetTaskQueue(0))
|
||||
{
|
||||
fprintf( stderr, "SendMessage32W: intertask message not supported\n" );
|
||||
return 0;
|
||||
}
|
||||
|
||||
SPY_EnterMessage( SPY_SENDMESSAGE32, hwnd, msg, wParam, lParam );
|
||||
|
||||
if (wndPtr->hmemTaskQ != GetTaskQueue(0))
|
||||
ret = MSG_SendMessage( wndPtr->hmemTaskQ, hwnd, msg, wParam, lParam,
|
||||
QUEUE_SM_WIN32 | QUEUE_SM_UNICODE );
|
||||
else
|
||||
ret = CallWindowProc32W( (WNDPROC32)wndPtr->winproc,
|
||||
hwnd, msg, wParam, lParam );
|
||||
|
||||
SPY_ExitMessage( SPY_RESULT_OK32, hwnd, msg, ret );
|
||||
return ret;
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue