Release 951226
Sat Dec 23 18:15:59 1995 Alexandre Julliard <julliard@sunsite.unc.edu> * [configure.in] [Makefile.in] [tools/install-sh] New 'install' target installs Wine binary, library and man page. Library is now more logically named libwine.a. Split toolkit/ directory into library (for library code) and libtest (for test programs). * [controls/edit.c] Quick hack to partially support EM_PASSWORD style (avoids displaying your passwords on the screen when testing programs...) * [configure.in] [controls/menu.c] [include/resource.h] [misc/commdlg.c] [misc/ole2nls.c] [misc/shell.c] [windows/msgbox.c] Language is now a run-time option (wine -language xx). * [debugger/dbg.y] Dump some more debugging info on crash. * [misc/profile.c] Only consider ';' as a comment if it's the first non-blank character on the line. * [miscemu/dpmi.c] More debugging info for real-mode callback. * [objects/gdiobj.c] Rewrote EnumObjects() to do the Right Thing. * [resources/sysres*] New directory containing system resources. Fri Dec 22 11:24:39 GMT 1995 John Harvey <john@division.co.uk> * [win32/file.c] [win32/memory.c] Unixware doesn't have MAP_ANON ifdefed out for now. * [misc/dos_fs.c] DOS_GetDosFileName didn't truncate paths starting ./ properly. * [tools/build.c] Produces assembly code that works with the unixware assembler. Wed Dec 20 22:22:29 +0100 1995 Morten Welinder <terra@diku.dk> * [miscemu/instr.c] INSTR_GetOperandAddr: 16-bit addresses should be masked to 16 bits. * [misc/dos_fs.c] DOS_readdir should always return directories, even if they don't match the file name mask. Tue Dec 19 18:00:00 1995 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [misc/exec.c] Give arguments to winhelp. * [miscemu/int21.c] Implemented Interrupt 21 AX=6C00 EXTENDED OPEN/CREATE. Created function ExtendedOpenCreateFile. Give for some Windows95 interrupts the return value 'not implemented'. Sun Dec 17 16:51:56 EST 1995 Jim Peterson <jspeter@birch.ee.vt.edu> * [include/kernel32.h] [include/windows.h] Moved the typedefs for SYSTEMTIME and LPSYSTEMTIME from include/kernel32.h to include/windows.h and declared the new Win32 API functions Sleep(), GetLocalTime(), and GetSystemTime(). Redefined INFINITE as 0xFFFFFFFF if WINELIB32. * [rc/rc (new file)] Created the shell script 'rc', which should simplify resource compilation. * [win32/environment.c] Kludged around an undefined reference to wine_files. This change should be fixed some time. * [win32/time.c] [if1632/kernel32.spec] Added the functions GetSystemTime(), and Sleep(). * [miscemu/int21.c] Renamed static function GetSystemTime to INT21_GetSystemTime to avoid conflicts with the API function of the same name. * [include/wintypes.h] Added the SPFMT definition for printf statements. * [misc/shell.c] [include/shell.h] Changed ERROR_* defines to SHELL_ERROR_*, as they were conflicting with the ones in include/winerror.h. They should probably use the versions in winerror.h, but I'm not certain, and that can be done later. * [windows/mdi.c] Translated WM_MDIACTIVATE(?,(LOhwnd,HIhwnd)) messages to WM_MDIACTIVATE(HIhwnd,LOhwnd) for WINELIB32. The ? parameter (boolean) was discarded with this translation. Translated handler of WM_MDISETMENU(ref,(loHMENU,hiHMENU)) to handle WM_MDISETMENU(loHMENU, hiHMENU) messages in WINELIB32 (ref assumed false, call DrawMenuBar() if desired). * [*/*] General explicit casts and more rigid typing to remove warnings. * [include/winpos.h] [windows/winpos.c] Changed return type of WINPOS_ChangeActiveWindow to BOOL. * [include/commdlg.h] [misc/commdlg.c] Added prototypes for ChooseColor(), CommDlgExtendedError(), FindText() GetFileTitle(), GetOpenFileName(), GetSaveFileName(), PrintDlg, and ReplaceText(). Renamed the CommDlgExtendError() function to CommDlgExtendedError(). Made GetFileTitle return a short, as per the API definition. * [Makefile.in] Added line to clean and distclean that removes temporaries from the include directory. Sat Dec 16 19:39:14 MET 1995 Steffen Moeller <smoe0024@rz.uni-hildesheim.de> * [controls/edit.c] Almost rewrote EDIT_GetLineMsg. Sat Dec 16 13:51:48 MST 1995 Andrew Taylor <andrew@riscan.com> * [windows/mdi.c] Fixed MDITile() bug that occurs when 0 windows are present or all windows are minimized. Wed Dec 12 23:30:00 1995 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> * [misc/profile.c] Try harder to find files, especially in the working directory. Look in $HOME/.wine too and create it there if it isn't found.
This commit is contained in:
parent
d471965c9e
commit
d7d4fdf898
16
ANNOUNCE
16
ANNOUNCE
|
@ -1,13 +1,13 @@
|
||||||
This is release 951212 of Wine the MS Windows emulator. This is still a
|
This is release 951226 of Wine the MS Windows emulator. This is still a
|
||||||
developer's only release. There are many bugs and many unimplemented API
|
developer's only release. There are many bugs and many unimplemented API
|
||||||
features. Most applications still do not work.
|
features. Most applications still do not work.
|
||||||
|
|
||||||
Patches should be submitted to "wine-new@amscons.com". Please don't forget
|
Patches should be submitted to "wine-new@amscons.com". Please don't forget
|
||||||
to include a ChangeLog entry. I'll make a new release every other week.
|
to include a ChangeLog entry. I'll make a new release every other week.
|
||||||
|
|
||||||
WHAT'S NEW with Wine-951212: (see ChangeLog for details)
|
WHAT'S NEW with Wine-951226: (see ChangeLog for details)
|
||||||
- Many more Winelib and Win32 fixes.
|
- Many more Winelib fixes.
|
||||||
- Window management and MDI improvements.
|
- Language is now a run-time option.
|
||||||
- Lots of bug fixes.
|
- Lots of bug fixes.
|
||||||
|
|
||||||
See the README file in the distribution for installation instructions.
|
See the README file in the distribution for installation instructions.
|
||||||
|
@ -16,10 +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
|
the release is available at the ftp sites. The sources will be available
|
||||||
from the following locations:
|
from the following locations:
|
||||||
|
|
||||||
sunsite.unc.edu:/pub/Linux/ALPHA/wine/Wine-951212.tar.gz
|
sunsite.unc.edu:/pub/Linux/ALPHA/wine/Wine-951226.tar.gz
|
||||||
tsx-11.mit.edu:/pub/linux/ALPHA/Wine/development/Wine-951212.tar.gz
|
tsx-11.mit.edu:/pub/linux/ALPHA/Wine/development/Wine-951226.tar.gz
|
||||||
ftp.infomagic.com:/pub/mirrors/linux/wine/development/Wine-951212.tar.gz
|
ftp.infomagic.com:/pub/mirrors/linux/wine/development/Wine-951226.tar.gz
|
||||||
aris.com:/pub/linux/ALPHA/Wine/development/Wine-951212.tar.gz
|
aris.com:/pub/linux/ALPHA/Wine/development/Wine-951226.tar.gz
|
||||||
|
|
||||||
It should also be available from any site that mirrors tsx-11 or sunsite.
|
It should also be available from any site that mirrors tsx-11 or sunsite.
|
||||||
|
|
||||||
|
|
138
ChangeLog
138
ChangeLog
|
@ -1,3 +1,141 @@
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
Sat Dec 23 18:15:59 1995 Alexandre Julliard <julliard@sunsite.unc.edu>
|
||||||
|
|
||||||
|
* [configure.in] [Makefile.in] [tools/install-sh]
|
||||||
|
New 'install' target installs Wine binary, library and man page.
|
||||||
|
Library is now more logically named libwine.a.
|
||||||
|
Split toolkit/ directory into library (for library code) and
|
||||||
|
libtest (for test programs).
|
||||||
|
|
||||||
|
* [controls/edit.c]
|
||||||
|
Quick hack to partially support EM_PASSWORD style (avoids
|
||||||
|
displaying your passwords on the screen when testing programs...)
|
||||||
|
|
||||||
|
* [configure.in] [controls/menu.c] [include/resource.h]
|
||||||
|
[misc/commdlg.c] [misc/ole2nls.c] [misc/shell.c] [windows/msgbox.c]
|
||||||
|
Language is now a run-time option (wine -language xx).
|
||||||
|
|
||||||
|
* [debugger/dbg.y]
|
||||||
|
Dump some more debugging info on crash.
|
||||||
|
|
||||||
|
* [misc/profile.c]
|
||||||
|
Only consider ';' as a comment if it's the first non-blank
|
||||||
|
character on the line.
|
||||||
|
|
||||||
|
* [miscemu/dpmi.c]
|
||||||
|
More debugging info for real-mode callback.
|
||||||
|
|
||||||
|
* [objects/gdiobj.c]
|
||||||
|
Rewrote EnumObjects() to do the Right Thing.
|
||||||
|
|
||||||
|
* [resources/sysres*]
|
||||||
|
New directory containing system resources.
|
||||||
|
|
||||||
|
Fri Dec 22 11:24:39 GMT 1995 John Harvey <john@division.co.uk>
|
||||||
|
|
||||||
|
* [win32/file.c] [win32/memory.c]
|
||||||
|
Unixware doesn't have MAP_ANON ifdefed out for now.
|
||||||
|
|
||||||
|
* [misc/dos_fs.c]
|
||||||
|
DOS_GetDosFileName didn't truncate paths starting ./ properly.
|
||||||
|
|
||||||
|
* [tools/build.c]
|
||||||
|
Produces assembly code that works with the unixware assembler.
|
||||||
|
|
||||||
|
Wed Dec 20 22:22:29 +0100 1995 Morten Welinder <terra@diku.dk>
|
||||||
|
|
||||||
|
* [miscemu/instr.c]
|
||||||
|
INSTR_GetOperandAddr: 16-bit addresses should be masked to 16 bits.
|
||||||
|
|
||||||
|
* [misc/dos_fs.c]
|
||||||
|
DOS_readdir should always return directories, even if they don't
|
||||||
|
match the file name mask.
|
||||||
|
|
||||||
|
Tue Dec 19 18:00:00 1995 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de>
|
||||||
|
|
||||||
|
* [misc/exec.c]
|
||||||
|
Give arguments to winhelp.
|
||||||
|
|
||||||
|
* [miscemu/int21.c]
|
||||||
|
Implemented Interrupt 21 AX=6C00 EXTENDED OPEN/CREATE.
|
||||||
|
Created function ExtendedOpenCreateFile.
|
||||||
|
Give for some Windows95 interrupts the return value 'not
|
||||||
|
implemented'.
|
||||||
|
|
||||||
|
Sun Dec 17 16:51:56 EST 1995 Jim Peterson <jspeter@birch.ee.vt.edu>
|
||||||
|
|
||||||
|
* [include/kernel32.h] [include/windows.h]
|
||||||
|
Moved the typedefs for SYSTEMTIME and LPSYSTEMTIME from
|
||||||
|
include/kernel32.h to include/windows.h and declared the new Win32
|
||||||
|
API functions Sleep(), GetLocalTime(), and GetSystemTime().
|
||||||
|
Redefined INFINITE as 0xFFFFFFFF if WINELIB32.
|
||||||
|
|
||||||
|
* [rc/rc (new file)]
|
||||||
|
Created the shell script 'rc', which should simplify resource
|
||||||
|
compilation.
|
||||||
|
|
||||||
|
* [win32/environment.c]
|
||||||
|
Kludged around an undefined reference to wine_files. This change
|
||||||
|
should be fixed some time.
|
||||||
|
|
||||||
|
* [win32/time.c] [if1632/kernel32.spec]
|
||||||
|
Added the functions GetSystemTime(), and Sleep().
|
||||||
|
|
||||||
|
* [miscemu/int21.c]
|
||||||
|
Renamed static function GetSystemTime to INT21_GetSystemTime to
|
||||||
|
avoid conflicts with the API function of the same name.
|
||||||
|
|
||||||
|
* [include/wintypes.h]
|
||||||
|
Added the SPFMT definition for printf statements.
|
||||||
|
|
||||||
|
* [misc/shell.c] [include/shell.h]
|
||||||
|
Changed ERROR_* defines to SHELL_ERROR_*, as they were conflicting
|
||||||
|
with the ones in include/winerror.h. They should probably use the
|
||||||
|
versions in winerror.h, but I'm not certain, and that can be done
|
||||||
|
later.
|
||||||
|
|
||||||
|
* [windows/mdi.c]
|
||||||
|
Translated WM_MDIACTIVATE(?,(LOhwnd,HIhwnd)) messages to
|
||||||
|
WM_MDIACTIVATE(HIhwnd,LOhwnd) for WINELIB32. The ? parameter
|
||||||
|
(boolean) was discarded with this translation. Translated handler
|
||||||
|
of WM_MDISETMENU(ref,(loHMENU,hiHMENU)) to handle
|
||||||
|
WM_MDISETMENU(loHMENU, hiHMENU) messages in WINELIB32 (ref assumed
|
||||||
|
false, call DrawMenuBar() if desired).
|
||||||
|
|
||||||
|
* [*/*]
|
||||||
|
General explicit casts and more rigid typing to remove warnings.
|
||||||
|
|
||||||
|
* [include/winpos.h] [windows/winpos.c]
|
||||||
|
Changed return type of WINPOS_ChangeActiveWindow to BOOL.
|
||||||
|
|
||||||
|
* [include/commdlg.h] [misc/commdlg.c]
|
||||||
|
Added prototypes for ChooseColor(), CommDlgExtendedError(),
|
||||||
|
FindText() GetFileTitle(), GetOpenFileName(), GetSaveFileName(),
|
||||||
|
PrintDlg, and ReplaceText().
|
||||||
|
Renamed the CommDlgExtendError() function to CommDlgExtendedError().
|
||||||
|
Made GetFileTitle return a short, as per the API definition.
|
||||||
|
|
||||||
|
* [Makefile.in]
|
||||||
|
Added line to clean and distclean that removes temporaries from
|
||||||
|
the include directory.
|
||||||
|
|
||||||
|
Sat Dec 16 19:39:14 MET 1995 Steffen Moeller <smoe0024@rz.uni-hildesheim.de>
|
||||||
|
|
||||||
|
* [controls/edit.c]
|
||||||
|
Almost rewrote EDIT_GetLineMsg.
|
||||||
|
|
||||||
|
Sat Dec 16 13:51:48 MST 1995 Andrew Taylor <andrew@riscan.com>
|
||||||
|
|
||||||
|
* [windows/mdi.c]
|
||||||
|
Fixed MDITile() bug that occurs when 0 windows are present or all
|
||||||
|
windows are minimized.
|
||||||
|
|
||||||
|
Wed Dec 12 23:30:00 1995 Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de>
|
||||||
|
|
||||||
|
* [misc/profile.c]
|
||||||
|
Try harder to find files, especially in the working directory.
|
||||||
|
Look in $HOME/.wine too and create it there if it isn't found.
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
Mon Dec 11 19:08:55 1995 Alexandre Julliard <julliard@sunsite.unc.edu>
|
Mon Dec 11 19:08:55 1995 Alexandre Julliard <julliard@sunsite.unc.edu>
|
||||||
|
|
||||||
|
|
|
@ -1,21 +1,36 @@
|
||||||
# Global rules shared by all makefiles
|
# Global rules shared by all makefiles
|
||||||
# The makefile must define at least TOPSRC and MODULE
|
# The makefile must define at least TOPSRC and MODULE
|
||||||
|
|
||||||
|
# First some useful definitions
|
||||||
|
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
|
CPP = @CPP@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
DEFS = @DEFS@
|
DEFS = @DEFS@
|
||||||
LANG = @LANG@
|
|
||||||
X_CFLAGS = @X_CFLAGS@
|
X_CFLAGS = @X_CFLAGS@
|
||||||
|
X_LIBS = @X_LIBS@
|
||||||
|
XPM_LIB = -lXpm
|
||||||
|
XLIB = @X_PRE_LIBS@ -lXext -lX11 @X_EXTRA_LIBS@
|
||||||
|
LDLIBS = @LDLIBS@
|
||||||
YACC = @YACC@
|
YACC = @YACC@
|
||||||
LEX = @LEX@
|
LEX = @LEX@
|
||||||
LEXLIB = @LEXLIB@
|
LEXLIB = @LEXLIB@
|
||||||
DIVINCL = -I$(TOPSRC)/include
|
DIVINCL = -I$(TOPSRC)/include
|
||||||
ALLCFLAGS = $(CFLAGS) $(DEFS) -ALANG\($(LANG)\) $(X_CFLAGS) $(DIVINCL) $(EXTRA_DEFS)
|
ALLCFLAGS = $(CFLAGS) $(DEFS) $(X_CFLAGS) $(DIVINCL) $(EXTRA_DEFS)
|
||||||
LDCOMBINE = ld -r
|
LDCOMBINE = ld -r
|
||||||
RM = rm -f
|
RM = rm -f
|
||||||
|
BUILD = $(TOPSRC)/tools/build
|
||||||
|
WINERC = $(TOPSRC)/rc/winerc
|
||||||
|
WINELIB = $(TOPSRC)/libwine.a
|
||||||
|
SUBMAKE = $(MAKE) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'DEFS=$(DEFS)'
|
||||||
@SET_MAKE@
|
@SET_MAKE@
|
||||||
|
|
||||||
OBJS = $(C_SRCS:.c=.o) $(ASM_SRCS:.S=.o)
|
OBJS = $(C_SRCS:.c=.o) $(ASM_SRCS:.S=.o) $(EXTRA_OBJS)
|
||||||
|
|
||||||
|
|
||||||
|
# Implicit rules
|
||||||
|
|
||||||
|
.SUFFIXES: .rc
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(ALLCFLAGS) -o $*.o $<
|
$(CC) -c $(ALLCFLAGS) -o $*.o $<
|
||||||
|
@ -23,20 +38,46 @@ OBJS = $(C_SRCS:.c=.o) $(ASM_SRCS:.S=.o)
|
||||||
.S.o:
|
.S.o:
|
||||||
$(CC) -c -o $*.o $<
|
$(CC) -c -o $*.o $<
|
||||||
|
|
||||||
|
.rc.c:
|
||||||
|
echo "#include \"windows.h\"" >winerctmp.c
|
||||||
|
echo WINDOWS_H_ENDS_HERE >>winerctmp.c
|
||||||
|
cat $< >>winerctmp.c
|
||||||
|
$(CPP) $(DEFS) $(DIVINCL) -P winerctmp.c | sed -e '1,/^WINDOWS_H_ENDS_HERE/d' | $(WINERC) -c -o $* -p $*
|
||||||
|
$(RM) winerctmp.c
|
||||||
|
|
||||||
|
.rc.h:
|
||||||
|
echo "#include \"windows.h\"" >winerctmp.c
|
||||||
|
echo WINDOWS_H_ENDS_HERE >>winerctmp.c
|
||||||
|
cat $< >>winerctmp.c
|
||||||
|
$(CPP) $(DEFS) $(DIVINCL) -P winerctmp.c | sed -e '1,/^WINDOWS_H_ENDS_HERE/d' | $(WINERC) -c -o $* -p $*
|
||||||
|
$(RM) winerctmp.c
|
||||||
|
|
||||||
|
|
||||||
|
# Rule to rebuild resource compiler
|
||||||
|
|
||||||
|
$(WINERC) check_winerc:
|
||||||
|
cd $(TOPSRC)/rc; $(SUBMAKE) winerc
|
||||||
|
|
||||||
|
|
||||||
|
# Rule for main module
|
||||||
|
|
||||||
$(MODULE).o: $(OBJS)
|
$(MODULE).o: $(OBJS)
|
||||||
$(LDCOMBINE) $(OBJS) -o $(MODULE).o
|
$(LDCOMBINE) $(OBJS) -o $(MODULE).o
|
||||||
|
|
||||||
|
|
||||||
|
# Misc. rules
|
||||||
|
|
||||||
depend:: $(C_SRCS)
|
depend:: $(C_SRCS)
|
||||||
sed '/\#\#\# Dependencies/q' < Makefile > tmp_make
|
sed '/\#\#\# Dependencies/q' < Makefile > tmp_make
|
||||||
$(CC) $(ALLCFLAGS) -MM $(C_SRCS) >> tmp_make
|
$(CC) $(ALLCFLAGS) -MM $(C_SRCS) >> tmp_make
|
||||||
mv tmp_make Makefile
|
mv tmp_make Makefile
|
||||||
|
|
||||||
clean::
|
clean::
|
||||||
$(RM) *.o \#*\# *~ *.bak *.flc tmp_make
|
$(RM) *.o \#*\# *~ *.bak *.flc tmp_make winerctmp.c
|
||||||
|
|
||||||
distclean:: clean
|
distclean:: clean
|
||||||
$(RM) Makefile
|
$(RM) Makefile
|
||||||
|
|
||||||
langclean::
|
|
||||||
|
|
||||||
dummy:
|
dummy:
|
||||||
|
|
||||||
|
# End of global rules
|
||||||
|
|
76
Makefile.in
76
Makefile.in
|
@ -3,18 +3,18 @@
|
||||||
# all (default): build wine
|
# all (default): build wine
|
||||||
# clean: remove all intermediate files
|
# clean: remove all intermediate files
|
||||||
# distclean: also remove all files created by configure
|
# distclean: also remove all files created by configure
|
||||||
# langclean: remove all files which have to be remade if
|
|
||||||
# a different LANGuage is selected
|
|
||||||
# depend: create the dependencies
|
# depend: create the dependencies
|
||||||
# etags: Create a TAGS file for Emacs.
|
# etags: Create a TAGS file for Emacs.
|
||||||
#
|
#
|
||||||
# Author: Michael Patra <micky@marie.physik.tu-berlin.de>
|
# Author: Michael Patra <micky@marie.physik.tu-berlin.de>
|
||||||
# <patra@itp1.physik.tu-berlin.de>
|
# <patra@itp1.physik.tu-berlin.de>
|
||||||
|
|
||||||
|
# First some useful definitions
|
||||||
|
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
|
CPP = @CPP@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
DEFS = @DEFS@
|
DEFS = @DEFS@ -DWINE_INI_GLOBAL=\"$(WINE_INI_GLOBAL)\"
|
||||||
LANG = @LANG@
|
|
||||||
X_CFLAGS = @X_CFLAGS@
|
X_CFLAGS = @X_CFLAGS@
|
||||||
X_LIBS = @X_LIBS@
|
X_LIBS = @X_LIBS@
|
||||||
TOPSRC = @top_srcdir@
|
TOPSRC = @top_srcdir@
|
||||||
|
@ -25,17 +25,50 @@ LDLIBS = @LDLIBS@
|
||||||
AR = ar rc
|
AR = ar rc
|
||||||
RANLIB = @RANLIB@
|
RANLIB = @RANLIB@
|
||||||
RM = rm -f
|
RM = rm -f
|
||||||
|
SUBMAKE = $(MAKE) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'DEFS=$(DEFS)'
|
||||||
@SET_MAKE@
|
@SET_MAKE@
|
||||||
|
|
||||||
|
# Installation infos
|
||||||
|
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
bindir = @bindir@
|
||||||
|
libdir = @libdir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
mandir = @mandir@/man1
|
||||||
|
manext = .1
|
||||||
|
WINE_INI_GLOBAL = $(sysconfdir)/wine.conf
|
||||||
|
|
||||||
|
# Main target to build
|
||||||
|
|
||||||
MAIN_TARGET = @MAIN_TARGET@
|
MAIN_TARGET = @MAIN_TARGET@
|
||||||
|
|
||||||
COMMONSUBDIRS = rc controls ipc loader misc multimedia objects win32 windows
|
COMMONSUBDIRS = \
|
||||||
|
rc \
|
||||||
|
controls \
|
||||||
|
ipc \
|
||||||
|
loader \
|
||||||
|
misc \
|
||||||
|
multimedia \
|
||||||
|
objects \
|
||||||
|
resources \
|
||||||
|
win32 \
|
||||||
|
windows
|
||||||
|
|
||||||
EMUSUBDIRS = tools debugger debugger/readline if1632 memory miscemu
|
EMUSUBDIRS = \
|
||||||
|
tools \
|
||||||
|
debugger \
|
||||||
|
debugger/readline \
|
||||||
|
if1632 \
|
||||||
|
memory \
|
||||||
|
miscemu
|
||||||
|
|
||||||
LIBSUBDIRS = toolkit
|
LIBSUBDIRS = library
|
||||||
|
|
||||||
ALLSUBDIRS = $(COMMONSUBDIRS) $(EMUSUBDIRS) $(LIBSUBDIRS)
|
ALLSUBDIRS = $(COMMONSUBDIRS) $(EMUSUBDIRS) $(LIBSUBDIRS) libtest
|
||||||
|
|
||||||
COMMONOBJS = \
|
COMMONOBJS = \
|
||||||
controls/controls.o \
|
controls/controls.o \
|
||||||
|
@ -44,7 +77,7 @@ COMMONOBJS = \
|
||||||
misc/misc.o \
|
misc/misc.o \
|
||||||
multimedia/multimedia.o \
|
multimedia/multimedia.o \
|
||||||
objects/objects.o \
|
objects/objects.o \
|
||||||
rc/rc.o \
|
resources/resources.o \
|
||||||
win32/win32.o \
|
win32/win32.o \
|
||||||
windows/windows.o
|
windows/windows.o
|
||||||
|
|
||||||
|
@ -55,22 +88,31 @@ EMUOBJS = \
|
||||||
memory/memory.o \
|
memory/memory.o \
|
||||||
miscemu/miscemu.o
|
miscemu/miscemu.o
|
||||||
|
|
||||||
LIBOBJS = toolkit/toolkit.o
|
LIBOBJS = library/library.o
|
||||||
|
|
||||||
|
|
||||||
all: $(MAIN_TARGET)
|
all: $(MAIN_TARGET)
|
||||||
|
|
||||||
|
install: install_$(MAIN_TARGET)
|
||||||
|
|
||||||
wine wine.sym: $(COMMONSUBDIRS) $(EMUSUBDIRS) dummy
|
wine wine.sym: $(COMMONSUBDIRS) $(EMUSUBDIRS) dummy
|
||||||
$(CC) -o wine $(COMMONOBJS) $(EMUOBJS) $(LDOPTIONS) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LDLIBS)
|
$(CC) -o wine $(COMMONOBJS) $(EMUOBJS) $(LDOPTIONS) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LDLIBS)
|
||||||
nm -n wine | grep -v _compiled >wine.sym
|
nm -n wine | grep -v _compiled >wine.sym
|
||||||
|
|
||||||
winelib.a: $(COMMONSUBDIRS) $(LIBSUBDIRS) dummy
|
install_wine: dummy
|
||||||
|
$(INSTALL_PROGRAM) wine $(bindir)/wine
|
||||||
|
$(INSTALL_DATA) wine.man $(mandir)/wine$(manext)
|
||||||
|
|
||||||
|
libwine.a: $(COMMONSUBDIRS) $(LIBSUBDIRS) dummy
|
||||||
$(RM) $@
|
$(RM) $@
|
||||||
$(AR) $@ $(COMMONOBJS) $(LIBOBJS)
|
$(AR) $@ $(COMMONOBJS) $(LIBOBJS)
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
|
|
||||||
|
install_libwine.a: dummy
|
||||||
|
$(INSTALL_DATA) libwine.a $(libdir)
|
||||||
|
|
||||||
$(ALLSUBDIRS): dummy
|
$(ALLSUBDIRS): dummy
|
||||||
@cd $@; $(MAKE) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'DEFS=$(DEFS)' 'LANG=$(LANG)'
|
@cd $@; $(SUBMAKE)
|
||||||
|
|
||||||
depend:
|
depend:
|
||||||
for i in $(ALLSUBDIRS); do (cd $$i; $(MAKE) depend); done
|
for i in $(ALLSUBDIRS); do (cd $$i; $(MAKE) depend); done
|
||||||
|
@ -80,15 +122,13 @@ etags:
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
for i in $(ALLSUBDIRS); do (cd $$i; $(MAKE) clean); done
|
for i in $(ALLSUBDIRS); do (cd $$i; $(MAKE) clean); done
|
||||||
$(RM) *.o \#*\# *~ *.bak *.flc wine wine.sym winelib.a TAGS
|
$(RM) *.o \#*\# *~ *.bak *.flc wine wine.sym libwine.a TAGS
|
||||||
|
$(RM) include/\#*\# include/*~ include/*.bak include/*.flc
|
||||||
|
|
||||||
distclean:
|
distclean:
|
||||||
for i in $(ALLSUBDIRS); do (cd $$i; $(MAKE) distclean); done
|
for i in $(ALLSUBDIRS); do (cd $$i; $(MAKE) distclean); done
|
||||||
$(RM) *.o \#*\# *~ *.bak wine wine.sym winelib.a TAGS
|
$(RM) *.o \#*\# *~ *.bak wine wine.sym libwine.a TAGS
|
||||||
|
$(RM) include/\#*\# include/*~ include/*.bak include/*.flc
|
||||||
$(RM) config.* include/config.h Make.rules Makefile
|
$(RM) config.* include/config.h Make.rules Makefile
|
||||||
|
|
||||||
langclean:
|
|
||||||
for i in $(ALLSUBDIRS); do (cd $$i; $(MAKE) langclean); done
|
|
||||||
$(RM) wine wine.sym winelib.a
|
|
||||||
|
|
||||||
dummy:
|
dummy:
|
||||||
|
|
17
Wine.tmpl
17
Wine.tmpl
|
@ -1,17 +0,0 @@
|
||||||
INCLUDES = -I$(TOP)/include -I$(TOP)
|
|
||||||
|
|
||||||
XCOMM Imake rules go here
|
|
||||||
|
|
||||||
/*
|
|
||||||
* WineRelocatableTarget - generate rules to produce a relocatable object
|
|
||||||
* file instead of a library.
|
|
||||||
*/
|
|
||||||
#ifndef WineRelocatableTarget
|
|
||||||
#define WineRelocatableTarget(objname,objlist,depobj) @@\
|
|
||||||
AllTarget(objname.o) @@\
|
|
||||||
@@\
|
|
||||||
objname.o: depobj @@\
|
|
||||||
$(RM) $@ @@\
|
|
||||||
$(LD) $(LDCOMBINEFLAGS) objlist depobj -o $@
|
|
||||||
#endif /* WineRelocatableTarget */
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# From configure.in configure.in 1.00
|
# From configure.in configure.in 1.00
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated automatically using autoconf version 2.4
|
# Generated automatically using autoconf version 2.7
|
||||||
# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
|
# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This configure script is free software; the Free Software Foundation
|
# This configure script is free software; the Free Software Foundation
|
||||||
|
@ -14,8 +14,6 @@ ac_default_prefix=/usr/local
|
||||||
# Any additions from configure.in:
|
# Any additions from configure.in:
|
||||||
ac_help="$ac_help
|
ac_help="$ac_help
|
||||||
--with-library build Wine as a library instead of an emulator"
|
--with-library build Wine as a library instead of an emulator"
|
||||||
ac_help="$ac_help
|
|
||||||
--with-language=LANG change the language (LANG=En/De/Fr/Es/No/Fi/Da)"
|
|
||||||
ac_help="$ac_help
|
ac_help="$ac_help
|
||||||
--with-ipc use inter-process communication for DDE"
|
--with-ipc use inter-process communication for DDE"
|
||||||
ac_help="$ac_help
|
ac_help="$ac_help
|
||||||
|
@ -44,9 +42,22 @@ target=NONE
|
||||||
verbose=
|
verbose=
|
||||||
x_includes=NONE
|
x_includes=NONE
|
||||||
x_libraries=NONE
|
x_libraries=NONE
|
||||||
|
bindir='${exec_prefix}/bin'
|
||||||
|
sbindir='${exec_prefix}/sbin'
|
||||||
|
libexecdir='${exec_prefix}/libexec'
|
||||||
|
datadir='${prefix}/share'
|
||||||
|
sysconfdir='${prefix}/etc'
|
||||||
|
sharedstatedir='${prefix}/com'
|
||||||
|
localstatedir='${prefix}/var'
|
||||||
|
libdir='${exec_prefix}/lib'
|
||||||
|
includedir='${prefix}/include'
|
||||||
|
oldincludedir='/usr/include'
|
||||||
|
infodir='${prefix}/info'
|
||||||
|
mandir='${prefix}/man'
|
||||||
|
|
||||||
# Initialize some other variables.
|
# Initialize some other variables.
|
||||||
subdirs=
|
subdirs=
|
||||||
|
MFLAGS= MAKEFLAGS=
|
||||||
|
|
||||||
ac_prev=
|
ac_prev=
|
||||||
for ac_option
|
for ac_option
|
||||||
|
@ -68,9 +79,14 @@ do
|
||||||
|
|
||||||
case "$ac_option" in
|
case "$ac_option" in
|
||||||
|
|
||||||
-build | --build | --buil | --bui | --bu | --b)
|
-bindir | --bindir | --bindi | --bind | --bin | --bi)
|
||||||
|
ac_prev=bindir ;;
|
||||||
|
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
|
||||||
|
bindir="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-build | --build | --buil | --bui | --bu)
|
||||||
ac_prev=build ;;
|
ac_prev=build ;;
|
||||||
-build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
|
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
|
||||||
build="$ac_optarg" ;;
|
build="$ac_optarg" ;;
|
||||||
|
|
||||||
-cache-file | --cache-file | --cache-fil | --cache-fi \
|
-cache-file | --cache-file | --cache-fil | --cache-fi \
|
||||||
|
@ -80,6 +96,12 @@ do
|
||||||
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
|
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
|
||||||
cache_file="$ac_optarg" ;;
|
cache_file="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
|
||||||
|
ac_prev=datadir ;;
|
||||||
|
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
|
||||||
|
| --da=*)
|
||||||
|
datadir="$ac_optarg" ;;
|
||||||
|
|
||||||
-disable-* | --disable-*)
|
-disable-* | --disable-*)
|
||||||
ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
|
ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
|
||||||
# Reject names that are not valid shell variable names.
|
# Reject names that are not valid shell variable names.
|
||||||
|
@ -130,12 +152,29 @@ Configuration:
|
||||||
Directory and file names:
|
Directory and file names:
|
||||||
--prefix=PREFIX install architecture-independent files in PREFIX
|
--prefix=PREFIX install architecture-independent files in PREFIX
|
||||||
[$ac_default_prefix]
|
[$ac_default_prefix]
|
||||||
--exec-prefix=PREFIX install architecture-dependent files in PREFIX
|
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
|
||||||
[same as prefix]
|
[same as prefix]
|
||||||
|
--bindir=DIR user executables in DIR [EPREFIX/bin]
|
||||||
|
--sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
|
||||||
|
--libexecdir=DIR program executables in DIR [EPREFIX/libexec]
|
||||||
|
--datadir=DIR read-only architecture-independent data in DIR
|
||||||
|
[PREFIX/share]
|
||||||
|
--sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
|
||||||
|
--sharedstatedir=DIR modifiable architecture-independent data in DIR
|
||||||
|
[PREFIX/com]
|
||||||
|
--localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
|
||||||
|
--libdir=DIR object code libraries in DIR [EPREFIX/lib]
|
||||||
|
--includedir=DIR C header files in DIR [PREFIX/include]
|
||||||
|
--oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
|
||||||
|
--infodir=DIR info documentation in DIR [PREFIX/info]
|
||||||
|
--mandir=DIR man documentation in DIR [PREFIX/man]
|
||||||
--srcdir=DIR find the sources in DIR [configure dir or ..]
|
--srcdir=DIR find the sources in DIR [configure dir or ..]
|
||||||
--program-prefix=PREFIX prepend PREFIX to installed program names
|
--program-prefix=PREFIX prepend PREFIX to installed program names
|
||||||
--program-suffix=SUFFIX append SUFFIX to installed program names
|
--program-suffix=SUFFIX append SUFFIX to installed program names
|
||||||
--program-transform-name=PROGRAM run sed PROGRAM on installed program names
|
--program-transform-name=PROGRAM
|
||||||
|
run sed PROGRAM on installed program names
|
||||||
|
EOF
|
||||||
|
cat << EOF
|
||||||
Host type:
|
Host type:
|
||||||
--build=BUILD configure for building on BUILD [BUILD=HOST]
|
--build=BUILD configure for building on BUILD [BUILD=HOST]
|
||||||
--host=HOST configure for HOST [guessed]
|
--host=HOST configure for HOST [guessed]
|
||||||
|
@ -147,8 +186,10 @@ Features and packages:
|
||||||
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
||||||
--x-includes=DIR X include files are in DIR
|
--x-includes=DIR X include files are in DIR
|
||||||
--x-libraries=DIR X library files are in DIR
|
--x-libraries=DIR X library files are in DIR
|
||||||
--enable and --with options recognized:$ac_help
|
|
||||||
EOF
|
EOF
|
||||||
|
if test -n "$ac_help"; then
|
||||||
|
echo "--enable and --with options recognized:$ac_help"
|
||||||
|
fi
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
|
||||||
-host | --host | --hos | --ho)
|
-host | --host | --hos | --ho)
|
||||||
|
@ -156,6 +197,44 @@ EOF
|
||||||
-host=* | --host=* | --hos=* | --ho=*)
|
-host=* | --host=* | --hos=* | --ho=*)
|
||||||
host="$ac_optarg" ;;
|
host="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-includedir | --includedir | --includedi | --included | --include \
|
||||||
|
| --includ | --inclu | --incl | --inc)
|
||||||
|
ac_prev=includedir ;;
|
||||||
|
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
|
||||||
|
| --includ=* | --inclu=* | --incl=* | --inc=*)
|
||||||
|
includedir="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-infodir | --infodir | --infodi | --infod | --info | --inf)
|
||||||
|
ac_prev=infodir ;;
|
||||||
|
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
|
||||||
|
infodir="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-libdir | --libdir | --libdi | --libd)
|
||||||
|
ac_prev=libdir ;;
|
||||||
|
-libdir=* | --libdir=* | --libdi=* | --libd=*)
|
||||||
|
libdir="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
|
||||||
|
| --libexe | --libex | --libe)
|
||||||
|
ac_prev=libexecdir ;;
|
||||||
|
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
|
||||||
|
| --libexe=* | --libex=* | --libe=*)
|
||||||
|
libexecdir="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-localstatedir | --localstatedir | --localstatedi | --localstated \
|
||||||
|
| --localstate | --localstat | --localsta | --localst \
|
||||||
|
| --locals | --local | --loca | --loc | --lo)
|
||||||
|
ac_prev=localstatedir ;;
|
||||||
|
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
|
||||||
|
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
|
||||||
|
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
|
||||||
|
localstatedir="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
|
||||||
|
ac_prev=mandir ;;
|
||||||
|
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
|
||||||
|
mandir="$ac_optarg" ;;
|
||||||
|
|
||||||
-nfp | --nfp | --nf)
|
-nfp | --nfp | --nf)
|
||||||
# Obsolete; use --without-fp.
|
# Obsolete; use --without-fp.
|
||||||
with_fp=no ;;
|
with_fp=no ;;
|
||||||
|
@ -168,6 +247,15 @@ EOF
|
||||||
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
|
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
|
||||||
no_recursion=yes ;;
|
no_recursion=yes ;;
|
||||||
|
|
||||||
|
-oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
|
||||||
|
| --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
|
||||||
|
| --oldin | --oldi | --old | --ol | --o)
|
||||||
|
ac_prev=oldincludedir ;;
|
||||||
|
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
|
||||||
|
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
|
||||||
|
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
|
||||||
|
oldincludedir="$ac_optarg" ;;
|
||||||
|
|
||||||
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
|
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
|
||||||
ac_prev=prefix ;;
|
ac_prev=prefix ;;
|
||||||
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
|
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
|
||||||
|
@ -208,6 +296,23 @@ EOF
|
||||||
| -silent | --silent | --silen | --sile | --sil)
|
| -silent | --silent | --silen | --sile | --sil)
|
||||||
silent=yes ;;
|
silent=yes ;;
|
||||||
|
|
||||||
|
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
||||||
|
ac_prev=sbindir ;;
|
||||||
|
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
||||||
|
| --sbi=* | --sb=*)
|
||||||
|
sbindir="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-sharedstatedir | --sharedstatedir | --sharedstatedi \
|
||||||
|
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
|
||||||
|
| --sharedst | --shareds | --shared | --share | --shar \
|
||||||
|
| --sha | --sh)
|
||||||
|
ac_prev=sharedstatedir ;;
|
||||||
|
-sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
|
||||||
|
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
|
||||||
|
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
|
||||||
|
| --sha=* | --sh=*)
|
||||||
|
sharedstatedir="$ac_optarg" ;;
|
||||||
|
|
||||||
-site | --site | --sit)
|
-site | --site | --sit)
|
||||||
ac_prev=site ;;
|
ac_prev=site ;;
|
||||||
-site=* | --site=* | --sit=*)
|
-site=* | --site=* | --sit=*)
|
||||||
|
@ -218,6 +323,13 @@ EOF
|
||||||
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
|
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
|
||||||
srcdir="$ac_optarg" ;;
|
srcdir="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
|
||||||
|
| --syscon | --sysco | --sysc | --sys | --sy)
|
||||||
|
ac_prev=sysconfdir ;;
|
||||||
|
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
|
||||||
|
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
|
||||||
|
sysconfdir="$ac_optarg" ;;
|
||||||
|
|
||||||
-target | --target | --targe | --targ | --tar | --ta | --t)
|
-target | --target | --targe | --targ | --tar | --ta | --t)
|
||||||
ac_prev=target ;;
|
ac_prev=target ;;
|
||||||
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
|
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
|
||||||
|
@ -227,7 +339,7 @@ EOF
|
||||||
verbose=yes ;;
|
verbose=yes ;;
|
||||||
|
|
||||||
-version | --version | --versio | --versi | --vers)
|
-version | --version | --versio | --versi | --vers)
|
||||||
echo "configure generated by autoconf version 2.4"
|
echo "configure generated by autoconf version 2.7"
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
|
||||||
-with-* | --with-*)
|
-with-* | --with-*)
|
||||||
|
@ -273,7 +385,7 @@ EOF
|
||||||
-*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
|
-*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
|
if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
|
||||||
echo "configure: warning: $ac_option: invalid host type" 1>&2
|
echo "configure: warning: $ac_option: invalid host type" 1>&2
|
||||||
fi
|
fi
|
||||||
|
@ -392,9 +504,12 @@ fi
|
||||||
|
|
||||||
ac_ext=c
|
ac_ext=c
|
||||||
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
||||||
ac_cpp='$CPP $CPPFLAGS'
|
ac_cpp='echo $CPP $CPPFLAGS 1>&5;
|
||||||
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
|
$CPP $CPPFLAGS'
|
||||||
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
|
ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5;
|
||||||
|
${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
|
||||||
|
ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5;
|
||||||
|
${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
|
||||||
|
|
||||||
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
|
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
|
||||||
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
|
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
|
||||||
|
@ -409,39 +524,48 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
ac_aux_dir=
|
||||||
|
for ac_dir in tools $srcdir/tools; do
|
||||||
|
if test -f $ac_dir/install-sh; then
|
||||||
|
ac_aux_dir=$ac_dir
|
||||||
|
ac_install_sh="$ac_aux_dir/install-sh -c"
|
||||||
|
break
|
||||||
|
elif test -f $ac_dir/install.sh; then
|
||||||
|
ac_aux_dir=$ac_dir
|
||||||
|
ac_install_sh="$ac_aux_dir/install.sh -c"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if test -z "$ac_aux_dir"; then
|
||||||
|
{ echo "configure: error: can not find install-sh or install.sh in tools $srcdir/tools" 1>&2; exit 1; }
|
||||||
|
fi
|
||||||
|
ac_config_guess=$ac_aux_dir/config.guess
|
||||||
|
ac_config_sub=$ac_aux_dir/config.sub
|
||||||
|
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
|
||||||
|
|
||||||
|
|
||||||
# We want these before the checks, so the checks can modify their values.
|
# We want these before the checks, so the checks can modify their values.
|
||||||
test -z "$CFLAGS" && CFLAGS="-g -O2 -Wall"
|
test -z "$CFLAGS" && CFLAGS="-g -O2"
|
||||||
test -z "$LDFLAGS" && LDFLAGS=-g
|
test -z "$LDFLAGS" && LDFLAGS=-g
|
||||||
test -z "$LDLIBS" && LDLIBS=-lm
|
test -z "$LDLIBS" && LDLIBS=-lm
|
||||||
|
|
||||||
|
|
||||||
# Check whether --with-library or --without-library was given.
|
# Check whether --with-library or --without-library was given.
|
||||||
withval="$with_library"
|
if test "${with_library+set}" = set; then
|
||||||
if test -n "$withval"; then
|
withval="$with_library"
|
||||||
cat >> confdefs.h <<\EOF
|
cat >> confdefs.h <<\EOF
|
||||||
#define WINELIB 1
|
#define WINELIB 1
|
||||||
EOF
|
EOF
|
||||||
MAIN_TARGET="winelib.a"
|
MAIN_TARGET="libwine.a"
|
||||||
else
|
else
|
||||||
MAIN_TARGET="wine"
|
MAIN_TARGET="wine"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Check whether --with-language or --without-language was given.
|
|
||||||
withval="$with_language"
|
|
||||||
if test -n "$withval"; then
|
|
||||||
LANG="$withval"
|
|
||||||
else
|
|
||||||
LANG=En
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Check whether --with-ipc or --without-ipc was given.
|
# Check whether --with-ipc or --without-ipc was given.
|
||||||
withval="$with_ipc"
|
if test "${with_ipc+set}" = set; then
|
||||||
if test -n "$withval"; then
|
withval="$with_ipc"
|
||||||
cat >> confdefs.h <<\EOF
|
cat >> confdefs.h <<\EOF
|
||||||
#define CONFIG_IPC 1
|
#define CONFIG_IPC 1
|
||||||
EOF
|
EOF
|
||||||
|
@ -450,8 +574,8 @@ fi
|
||||||
|
|
||||||
|
|
||||||
# Check whether --with-malloc-debug or --without-malloc-debug was given.
|
# Check whether --with-malloc-debug or --without-malloc-debug was given.
|
||||||
withval="$with_malloc_debug"
|
if test "${with_malloc_debug+set}" = set; then
|
||||||
if test -n "$withval"; then
|
withval="$with_malloc_debug"
|
||||||
cat >> confdefs.h <<\EOF
|
cat >> confdefs.h <<\EOF
|
||||||
#define MALLOC_DEBUGGING 1
|
#define MALLOC_DEBUGGING 1
|
||||||
EOF
|
EOF
|
||||||
|
@ -530,6 +654,7 @@ else
|
||||||
ac_cv_prog_gcc=no
|
ac_cv_prog_gcc=no
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$ac_t""$ac_cv_prog_gcc" 1>&6
|
echo "$ac_t""$ac_cv_prog_gcc" 1>&6
|
||||||
if test $ac_cv_prog_gcc = yes; then
|
if test $ac_cv_prog_gcc = yes; then
|
||||||
GCC=yes
|
GCC=yes
|
||||||
|
@ -547,7 +672,8 @@ fi
|
||||||
rm -f conftest*
|
rm -f conftest*
|
||||||
|
|
||||||
fi
|
fi
|
||||||
echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
|
|
||||||
|
echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
|
||||||
if test $ac_cv_prog_gcc_g = yes; then
|
if test $ac_cv_prog_gcc_g = yes; then
|
||||||
CFLAGS="-g -O"
|
CFLAGS="-g -O"
|
||||||
else
|
else
|
||||||
|
@ -559,6 +685,7 @@ else
|
||||||
test "${CFLAGS+set}" = set || CFLAGS="-g"
|
test "${CFLAGS+set}" = set || CFLAGS="-g"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
test "x${GCC}" = "xyes" && CFLAGS="$CFLAGS -Wall -fno-strength-reduce"
|
||||||
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
|
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
|
||||||
# On Suns, sometimes $CPP names a directory.
|
# On Suns, sometimes $CPP names a directory.
|
||||||
if test -n "$CPP" && test -d "$CPP"; then
|
if test -n "$CPP" && test -d "$CPP"; then
|
||||||
|
@ -574,7 +701,7 @@ else
|
||||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||||
# not just through cpp.
|
# not just through cpp.
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 578 "configure"
|
#line 705 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
Syntax Error
|
Syntax Error
|
||||||
|
@ -588,7 +715,7 @@ else
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
CPP="${CC-cc} -E -traditional-cpp"
|
CPP="${CC-cc} -E -traditional-cpp"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 592 "configure"
|
#line 719 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
Syntax Error
|
Syntax Error
|
||||||
|
@ -640,8 +767,8 @@ fi
|
||||||
echo $ac_n "checking for X""... $ac_c" 1>&6
|
echo $ac_n "checking for X""... $ac_c" 1>&6
|
||||||
|
|
||||||
# Check whether --with-x or --without-x was given.
|
# Check whether --with-x or --without-x was given.
|
||||||
withval="$with_x"
|
if test "${with_x+set}" = set; then
|
||||||
if test -n "$withval"; then
|
withval="$with_x"
|
||||||
:
|
:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -667,7 +794,7 @@ EOF
|
||||||
if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
|
if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
|
||||||
no_x=
|
no_x=
|
||||||
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
|
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
|
||||||
eval `make acfindx 2>/dev/null | grep -v make`
|
eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
|
||||||
# Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
|
# Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
|
||||||
for ac_extension in a so sl; do
|
for ac_extension in a so sl; do
|
||||||
if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
|
if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
|
||||||
|
@ -694,7 +821,7 @@ test -z "$x_direct_test_library" && x_direct_test_library=Xt
|
||||||
test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
|
test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
|
||||||
test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
|
test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 698 "configure"
|
#line 825 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <$x_direct_test_include>
|
#include <$x_direct_test_include>
|
||||||
EOF
|
EOF
|
||||||
|
@ -757,7 +884,7 @@ rm -f conftest*
|
||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-l$x_direct_test_library $LIBS"
|
LIBS="-l$x_direct_test_library $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 761 "configure"
|
#line 888 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
int main() { return 0; }
|
int main() { return 0; }
|
||||||
|
@ -854,7 +981,7 @@ else
|
||||||
X_LIBS="$X_LIBS -L$x_libraries"
|
X_LIBS="$X_LIBS -L$x_libraries"
|
||||||
if test "`(uname) 2>/dev/null`" = SunOS &&
|
if test "`(uname) 2>/dev/null`" = SunOS &&
|
||||||
uname -r | grep '^5' >/dev/null; then
|
uname -r | grep '^5' >/dev/null; then
|
||||||
X_LIBS="$X_LIBS -R$x_libraries"
|
X_LIBS="$X_LIBS -R $x_libraries"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -869,13 +996,14 @@ else
|
||||||
# libraries we check for below, so use a different variable.
|
# libraries we check for below, so use a different variable.
|
||||||
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
|
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
|
||||||
echo $ac_n "checking for -lICE""... $ac_c" 1>&6
|
echo $ac_n "checking for -lICE""... $ac_c" 1>&6
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_ICE'+set}'`\" = set"; then
|
ac_lib_var=`echo ICE | tr '.-/+' '___p'`
|
||||||
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-lICE $LIBS"
|
LIBS="-lICE $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 879 "configure"
|
#line 1007 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
int main() { return 0; }
|
int main() { return 0; }
|
||||||
|
@ -885,16 +1013,16 @@ IceConnectionNumber()
|
||||||
EOF
|
EOF
|
||||||
if eval $ac_link; then
|
if eval $ac_link; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_ICE=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_ICE=no"
|
eval "ac_cv_lib_$ac_lib_var=no"
|
||||||
fi
|
fi
|
||||||
rm -f conftest*
|
rm -f conftest*
|
||||||
LIBS="$ac_save_LIBS"
|
LIBS="$ac_save_LIBS"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
if eval "test \"`echo '$ac_cv_lib_'ICE`\" = yes"; then
|
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
||||||
echo "$ac_t""yes" 1>&6
|
echo "$ac_t""yes" 1>&6
|
||||||
X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
|
X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
|
||||||
else
|
else
|
||||||
|
@ -912,13 +1040,14 @@ fi
|
||||||
# libraries were built with DECnet support. And karl@cs.umb.edu says
|
# libraries were built with DECnet support. And karl@cs.umb.edu says
|
||||||
# the Alpha needs dnet_stub (dnet does not exist).
|
# the Alpha needs dnet_stub (dnet does not exist).
|
||||||
echo $ac_n "checking for -ldnet""... $ac_c" 1>&6
|
echo $ac_n "checking for -ldnet""... $ac_c" 1>&6
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_dnet'+set}'`\" = set"; then
|
ac_lib_var=`echo dnet | tr '.-/+' '___p'`
|
||||||
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-ldnet $LIBS"
|
LIBS="-ldnet $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 922 "configure"
|
#line 1051 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
int main() { return 0; }
|
int main() { return 0; }
|
||||||
|
@ -928,16 +1057,16 @@ dnet_ntoa()
|
||||||
EOF
|
EOF
|
||||||
if eval $ac_link; then
|
if eval $ac_link; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_dnet=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_dnet=no"
|
eval "ac_cv_lib_$ac_lib_var=no"
|
||||||
fi
|
fi
|
||||||
rm -f conftest*
|
rm -f conftest*
|
||||||
LIBS="$ac_save_LIBS"
|
LIBS="$ac_save_LIBS"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
if eval "test \"`echo '$ac_cv_lib_'dnet`\" = yes"; then
|
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
||||||
echo "$ac_t""yes" 1>&6
|
echo "$ac_t""yes" 1>&6
|
||||||
X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
|
X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
|
||||||
else
|
else
|
||||||
|
@ -946,13 +1075,14 @@ fi
|
||||||
|
|
||||||
if test $ac_cv_lib_dnet = no; then
|
if test $ac_cv_lib_dnet = no; then
|
||||||
echo $ac_n "checking for -ldnet_stub""... $ac_c" 1>&6
|
echo $ac_n "checking for -ldnet_stub""... $ac_c" 1>&6
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_dnet_stub'+set}'`\" = set"; then
|
ac_lib_var=`echo dnet_stub | tr '.-/+' '___p'`
|
||||||
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-ldnet_stub $LIBS"
|
LIBS="-ldnet_stub $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 956 "configure"
|
#line 1086 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
int main() { return 0; }
|
int main() { return 0; }
|
||||||
|
@ -962,16 +1092,16 @@ dnet_ntoa()
|
||||||
EOF
|
EOF
|
||||||
if eval $ac_link; then
|
if eval $ac_link; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_dnet_stub=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_dnet_stub=no"
|
eval "ac_cv_lib_$ac_lib_var=no"
|
||||||
fi
|
fi
|
||||||
rm -f conftest*
|
rm -f conftest*
|
||||||
LIBS="$ac_save_LIBS"
|
LIBS="$ac_save_LIBS"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
if eval "test \"`echo '$ac_cv_lib_'dnet_stub`\" = yes"; then
|
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
||||||
echo "$ac_t""yes" 1>&6
|
echo "$ac_t""yes" 1>&6
|
||||||
X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
|
X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
|
||||||
else
|
else
|
||||||
|
@ -985,13 +1115,14 @@ fi
|
||||||
# Not sure which flavor of 386 UNIX this is, but it seems harmless to
|
# Not sure which flavor of 386 UNIX this is, but it seems harmless to
|
||||||
# check for it.
|
# check for it.
|
||||||
echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
|
echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_nsl'+set}'`\" = set"; then
|
ac_lib_var=`echo nsl | tr '.-/+' '___p'`
|
||||||
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-lnsl $LIBS"
|
LIBS="-lnsl $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 995 "configure"
|
#line 1126 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
int main() { return 0; }
|
int main() { return 0; }
|
||||||
|
@ -1001,16 +1132,16 @@ t_accept()
|
||||||
EOF
|
EOF
|
||||||
if eval $ac_link; then
|
if eval $ac_link; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_nsl=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_nsl=no"
|
eval "ac_cv_lib_$ac_lib_var=no"
|
||||||
fi
|
fi
|
||||||
rm -f conftest*
|
rm -f conftest*
|
||||||
LIBS="$ac_save_LIBS"
|
LIBS="$ac_save_LIBS"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
if eval "test \"`echo '$ac_cv_lib_'nsl`\" = yes"; then
|
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
||||||
echo "$ac_t""yes" 1>&6
|
echo "$ac_t""yes" 1>&6
|
||||||
X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
|
X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
|
||||||
else
|
else
|
||||||
|
@ -1023,13 +1154,14 @@ fi
|
||||||
# But -lsocket is broken on IRIX, according to simon@lia.di.epfl.ch.
|
# But -lsocket is broken on IRIX, according to simon@lia.di.epfl.ch.
|
||||||
if test "`(uname) 2>/dev/null`" != IRIX; then
|
if test "`(uname) 2>/dev/null`" != IRIX; then
|
||||||
echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
|
echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_socket'+set}'`\" = set"; then
|
ac_lib_var=`echo socket | tr '.-/+' '___p'`
|
||||||
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-lsocket $LIBS"
|
LIBS="-lsocket $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1033 "configure"
|
#line 1165 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
int main() { return 0; }
|
int main() { return 0; }
|
||||||
|
@ -1039,16 +1171,16 @@ socket()
|
||||||
EOF
|
EOF
|
||||||
if eval $ac_link; then
|
if eval $ac_link; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_socket=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_socket=no"
|
eval "ac_cv_lib_$ac_lib_var=no"
|
||||||
fi
|
fi
|
||||||
rm -f conftest*
|
rm -f conftest*
|
||||||
LIBS="$ac_save_LIBS"
|
LIBS="$ac_save_LIBS"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
if eval "test \"`echo '$ac_cv_lib_'socket`\" = yes"; then
|
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
||||||
echo "$ac_t""yes" 1>&6
|
echo "$ac_t""yes" 1>&6
|
||||||
X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket"
|
X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket"
|
||||||
else
|
else
|
||||||
|
@ -1127,13 +1259,14 @@ then
|
||||||
*) ac_lib=l ;;
|
*) ac_lib=l ;;
|
||||||
esac
|
esac
|
||||||
echo $ac_n "checking for -l$ac_lib""... $ac_c" 1>&6
|
echo $ac_n "checking for -l$ac_lib""... $ac_c" 1>&6
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib'+set}'`\" = set"; then
|
ac_lib_var=`echo $ac_lib | tr '.-/+' '___p'`
|
||||||
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-l$ac_lib $LIBS"
|
LIBS="-l$ac_lib $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1137 "configure"
|
#line 1270 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
int main() { return 0; }
|
int main() { return 0; }
|
||||||
|
@ -1143,16 +1276,16 @@ yywrap()
|
||||||
EOF
|
EOF
|
||||||
if eval $ac_link; then
|
if eval $ac_link; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib=no"
|
eval "ac_cv_lib_$ac_lib_var=no"
|
||||||
fi
|
fi
|
||||||
rm -f conftest*
|
rm -f conftest*
|
||||||
LIBS="$ac_save_LIBS"
|
LIBS="$ac_save_LIBS"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
if eval "test \"`echo '$ac_cv_lib_'$ac_lib`\" = yes"; then
|
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
||||||
echo "$ac_t""yes" 1>&6
|
echo "$ac_t""yes" 1>&6
|
||||||
LEXLIB="-l$ac_lib"
|
LEXLIB="-l$ac_lib"
|
||||||
else
|
else
|
||||||
|
@ -1189,14 +1322,74 @@ else
|
||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Find a good install program. We prefer a C program (faster),
|
||||||
|
# so one script is as good as another. But avoid the broken or
|
||||||
|
# incompatible versions:
|
||||||
|
# SysV /etc/install, /usr/sbin/install
|
||||||
|
# SunOS /usr/etc/install
|
||||||
|
# IRIX /sbin/install
|
||||||
|
# AIX /bin/install
|
||||||
|
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
|
||||||
|
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
|
||||||
|
# ./install, which can be erroneously created by make from ./install.sh.
|
||||||
|
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
|
||||||
|
if test -z "$INSTALL"; then
|
||||||
|
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
|
||||||
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
|
else
|
||||||
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||||
|
for ac_dir in $PATH; do
|
||||||
|
# Account for people who put trailing slashes in PATH elements.
|
||||||
|
case "$ac_dir/" in
|
||||||
|
/|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
|
||||||
|
*)
|
||||||
|
# OSF1 and SCO ODT 3.0 have their own names for install.
|
||||||
|
for ac_prog in ginstall installbsd scoinst install; do
|
||||||
|
if test -f $ac_dir/$ac_prog; then
|
||||||
|
if test $ac_prog = install &&
|
||||||
|
grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
|
||||||
|
# AIX install. It has an incompatible calling convention.
|
||||||
|
# OSF/1 installbsd also uses dspmsg, but is usable.
|
||||||
|
:
|
||||||
|
else
|
||||||
|
ac_cv_path_install="$ac_dir/$ac_prog -c"
|
||||||
|
break 2
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
IFS="$ac_save_ifs"
|
||||||
|
|
||||||
|
fi
|
||||||
|
if test "${ac_cv_path_install+set}" = set; then
|
||||||
|
INSTALL="$ac_cv_path_install"
|
||||||
|
else
|
||||||
|
# As a last resort, use the slow shell script. We don't cache a
|
||||||
|
# path for INSTALL within a source directory, because that will
|
||||||
|
# break other packages using the cache if that directory is
|
||||||
|
# removed, or if the path is relative.
|
||||||
|
INSTALL="$ac_install_sh"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo "$ac_t""$INSTALL" 1>&6
|
||||||
|
|
||||||
|
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
|
||||||
|
# It thinks the first close brace ends the variable substitution.
|
||||||
|
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
|
||||||
|
|
||||||
|
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
|
||||||
|
|
||||||
echo $ac_n "checking for -li386""... $ac_c" 1>&6
|
echo $ac_n "checking for -li386""... $ac_c" 1>&6
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_i386'+set}'`\" = set"; then
|
ac_lib_var=`echo i386 | tr '.-/+' '___p'`
|
||||||
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-li386 $LIBS"
|
LIBS="-li386 $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1200 "configure"
|
#line 1393 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
int main() { return 0; }
|
int main() { return 0; }
|
||||||
|
@ -1206,16 +1399,16 @@ i386_set_ldt()
|
||||||
EOF
|
EOF
|
||||||
if eval $ac_link; then
|
if eval $ac_link; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_i386=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_i386=no"
|
eval "ac_cv_lib_$ac_lib_var=no"
|
||||||
fi
|
fi
|
||||||
rm -f conftest*
|
rm -f conftest*
|
||||||
LIBS="$ac_save_LIBS"
|
LIBS="$ac_save_LIBS"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
if eval "test \"`echo '$ac_cv_lib_'i386`\" = yes"; then
|
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
||||||
echo "$ac_t""yes" 1>&6
|
echo "$ac_t""yes" 1>&6
|
||||||
LDLIBS="$LDLIBS -li386"
|
LDLIBS="$LDLIBS -li386"
|
||||||
else
|
else
|
||||||
|
@ -1231,13 +1424,13 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1235 "configure"
|
#line 1428 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* System header to define __stub macros and hopefully few prototypes,
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
which can conflict with char $ac_func(); below. */
|
which can conflict with char $ac_func(); below. */
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
char $ac_func();
|
char $ac_func();
|
||||||
|
|
||||||
int main() { return 0; }
|
int main() { return 0; }
|
||||||
int t() {
|
int t() {
|
||||||
|
@ -1265,7 +1458,7 @@ rm -f conftest*
|
||||||
fi
|
fi
|
||||||
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
|
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
|
||||||
echo "$ac_t""yes" 1>&6
|
echo "$ac_t""yes" 1>&6
|
||||||
ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
|
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
|
||||||
cat >> confdefs.h <<EOF
|
cat >> confdefs.h <<EOF
|
||||||
#define $ac_tr_func 1
|
#define $ac_tr_func 1
|
||||||
EOF
|
EOF
|
||||||
|
@ -1283,7 +1476,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1287 "configure"
|
#line 1480 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <$ac_hdr>
|
#include <$ac_hdr>
|
||||||
EOF
|
EOF
|
||||||
|
@ -1301,7 +1494,7 @@ rm -f conftest*
|
||||||
fi
|
fi
|
||||||
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
||||||
echo "$ac_t""yes" 1>&6
|
echo "$ac_t""yes" 1>&6
|
||||||
ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
|
ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
|
||||||
cat >> confdefs.h <<EOF
|
cat >> confdefs.h <<EOF
|
||||||
#define $ac_tr_hdr 1
|
#define $ac_tr_hdr 1
|
||||||
EOF
|
EOF
|
||||||
|
@ -1316,7 +1509,7 @@ if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1320 "configure"
|
#line 1513 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
@ -1357,6 +1550,7 @@ fi
|
||||||
rm -f conftest*
|
rm -f conftest*
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
|
echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
|
||||||
if test $ac_cv_header_stat_broken = yes; then
|
if test $ac_cv_header_stat_broken = yes; then
|
||||||
cat >> confdefs.h <<\EOF
|
cat >> confdefs.h <<\EOF
|
||||||
|
@ -1370,7 +1564,7 @@ if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1374 "configure"
|
#line 1568 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
int main() { return 0; }
|
int main() { return 0; }
|
||||||
|
@ -1383,7 +1577,7 @@ char const *const *ccp;
|
||||||
char **p;
|
char **p;
|
||||||
/* NEC SVR4.0.2 mips cc rejects this. */
|
/* NEC SVR4.0.2 mips cc rejects this. */
|
||||||
struct point {int x, y;};
|
struct point {int x, y;};
|
||||||
static struct point const zero;
|
static struct point const zero = {0,0};
|
||||||
/* AIX XL C 1.02.0.0 rejects this.
|
/* AIX XL C 1.02.0.0 rejects this.
|
||||||
It does not let you subtract one const X* pointer from another in an arm
|
It does not let you subtract one const X* pointer from another in an arm
|
||||||
of an if-expression whose if-part is not a constant expression */
|
of an if-expression whose if-part is not a constant expression */
|
||||||
|
@ -1430,6 +1624,7 @@ fi
|
||||||
rm -f conftest*
|
rm -f conftest*
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$ac_t""$ac_cv_c_const" 1>&6
|
echo "$ac_t""$ac_cv_c_const" 1>&6
|
||||||
if test $ac_cv_c_const = no; then
|
if test $ac_cv_c_const = no; then
|
||||||
cat >> confdefs.h <<\EOF
|
cat >> confdefs.h <<\EOF
|
||||||
|
@ -1447,7 +1642,7 @@ else
|
||||||
ac_cv_c_cross=yes
|
ac_cv_c_cross=yes
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1451 "configure"
|
#line 1646 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
main(){return(0);}
|
main(){return(0);}
|
||||||
EOF
|
EOF
|
||||||
|
@ -1460,15 +1655,16 @@ fi
|
||||||
fi
|
fi
|
||||||
rm -fr conftest*
|
rm -fr conftest*
|
||||||
fi
|
fi
|
||||||
cross_compiling=$ac_cv_c_cross
|
|
||||||
echo "$ac_t""$ac_cv_c_cross" 1>&6
|
echo "$ac_t""$ac_cv_c_cross" 1>&6
|
||||||
|
cross_compiling=$ac_cv_c_cross
|
||||||
|
|
||||||
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
|
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
|
||||||
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1472 "configure"
|
#line 1668 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
@ -1490,7 +1686,7 @@ rm -f conftest*
|
||||||
if test $ac_cv_header_stdc = yes; then
|
if test $ac_cv_header_stdc = yes; then
|
||||||
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
|
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1494 "configure"
|
#line 1690 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
EOF
|
EOF
|
||||||
|
@ -1508,7 +1704,7 @@ fi
|
||||||
if test $ac_cv_header_stdc = yes; then
|
if test $ac_cv_header_stdc = yes; then
|
||||||
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
|
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1512 "configure"
|
#line 1708 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
EOF
|
EOF
|
||||||
|
@ -1526,10 +1722,10 @@ fi
|
||||||
if test $ac_cv_header_stdc = yes; then
|
if test $ac_cv_header_stdc = yes; then
|
||||||
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
|
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
|
||||||
if test "$cross_compiling" = yes; then
|
if test "$cross_compiling" = yes; then
|
||||||
ac_cv_header_stdc=no
|
:
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1533 "configure"
|
#line 1729 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
|
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
|
||||||
|
@ -1550,6 +1746,7 @@ fi
|
||||||
rm -fr conftest*
|
rm -fr conftest*
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$ac_t""$ac_cv_header_stdc" 1>&6
|
echo "$ac_t""$ac_cv_header_stdc" 1>&6
|
||||||
if test $ac_cv_header_stdc = yes; then
|
if test $ac_cv_header_stdc = yes; then
|
||||||
cat >> confdefs.h <<\EOF
|
cat >> confdefs.h <<\EOF
|
||||||
|
@ -1563,7 +1760,7 @@ if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1567 "configure"
|
#line 1764 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#if STDC_HEADERS
|
#if STDC_HEADERS
|
||||||
|
@ -1590,27 +1787,8 @@ EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if test -z "${top_srcdir}"; then
|
|
||||||
TOP_SRCDIR=`pwd`
|
|
||||||
else
|
|
||||||
TOP_SRCDIR="${top_srcdir}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo $ac_n "checking for /usr/local/etc/wine.conf""... $ac_c" 1>&6
|
MAKE_RULES=Make.rules
|
||||||
if test -f /usr/local/etc/wine.conf; then
|
|
||||||
echo "$ac_t""yes" 1>&6
|
|
||||||
WINE_INI_GLOBAL='"/usr/local/etc/wine.conf"'
|
|
||||||
else
|
|
||||||
echo "$ac_t""no" 1>&6
|
|
||||||
WINE_INI_GLOBAL="\"${TOP_SRCDIR}/wine.ini\""
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >> confdefs.h <<EOF
|
|
||||||
#define WINE_INI_GLOBAL $WINE_INI_GLOBAL
|
|
||||||
EOF
|
|
||||||
|
|
||||||
|
|
||||||
MAKE_RULES=$TOP_SRCDIR/Make.rules
|
|
||||||
|
|
||||||
|
|
||||||
trap '' 1 2 15
|
trap '' 1 2 15
|
||||||
|
@ -1701,7 +1879,7 @@ do
|
||||||
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
|
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
|
||||||
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
|
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
|
||||||
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
|
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
|
||||||
echo "$CONFIG_STATUS generated by autoconf version 2.4"
|
echo "$CONFIG_STATUS generated by autoconf version 2.7"
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
-help | --help | --hel | --he | --h)
|
-help | --help | --hel | --he | --h)
|
||||||
echo "\$ac_cs_usage"; exit 0 ;;
|
echo "\$ac_cs_usage"; exit 0 ;;
|
||||||
|
@ -1710,12 +1888,35 @@ do
|
||||||
done
|
done
|
||||||
|
|
||||||
ac_given_srcdir=$srcdir
|
ac_given_srcdir=$srcdir
|
||||||
|
ac_given_INSTALL="$INSTALL"
|
||||||
|
|
||||||
trap 'rm -fr `echo "Make.rules controls/Makefile ipc/Makefile loader/Makefile memory/Makefile misc/Makefile miscemu/Makefile multimedia/Makefile objects/Makefile win32/Makefile windows/Makefile rc/Makefile debugger/Makefile debugger/readline/Makefile tools/Makefile if1632/Makefile toolkit/Makefile Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
trap 'rm -fr `echo "
|
||||||
|
Make.rules
|
||||||
|
Makefile
|
||||||
|
controls/Makefile
|
||||||
|
debugger/Makefile
|
||||||
|
debugger/readline/Makefile
|
||||||
|
if1632/Makefile
|
||||||
|
ipc/Makefile
|
||||||
|
library/Makefile
|
||||||
|
libtest/Makefile
|
||||||
|
loader/Makefile
|
||||||
|
memory/Makefile
|
||||||
|
misc/Makefile
|
||||||
|
miscemu/Makefile
|
||||||
|
multimedia/Makefile
|
||||||
|
objects/Makefile
|
||||||
|
rc/Makefile
|
||||||
|
resources/Makefile
|
||||||
|
tools/Makefile
|
||||||
|
win32/Makefile
|
||||||
|
windows/Makefile " | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
||||||
|
EOF
|
||||||
|
cat >> $CONFIG_STATUS <<EOF
|
||||||
|
|
||||||
# Protect against being on the right side of a sed subst in config.status.
|
# Protect against being on the right side of a sed subst in config.status.
|
||||||
sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
|
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
|
||||||
s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
|
s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
|
||||||
$ac_vpsub
|
$ac_vpsub
|
||||||
$extrasub
|
$extrasub
|
||||||
s%@CFLAGS@%$CFLAGS%g
|
s%@CFLAGS@%$CFLAGS%g
|
||||||
|
@ -1727,9 +1928,20 @@ s%@LIBS@%$LIBS%g
|
||||||
s%@exec_prefix@%$exec_prefix%g
|
s%@exec_prefix@%$exec_prefix%g
|
||||||
s%@prefix@%$prefix%g
|
s%@prefix@%$prefix%g
|
||||||
s%@program_transform_name@%$program_transform_name%g
|
s%@program_transform_name@%$program_transform_name%g
|
||||||
|
s%@bindir@%$bindir%g
|
||||||
|
s%@sbindir@%$sbindir%g
|
||||||
|
s%@libexecdir@%$libexecdir%g
|
||||||
|
s%@datadir@%$datadir%g
|
||||||
|
s%@sysconfdir@%$sysconfdir%g
|
||||||
|
s%@sharedstatedir@%$sharedstatedir%g
|
||||||
|
s%@localstatedir@%$localstatedir%g
|
||||||
|
s%@libdir@%$libdir%g
|
||||||
|
s%@includedir@%$includedir%g
|
||||||
|
s%@oldincludedir@%$oldincludedir%g
|
||||||
|
s%@infodir@%$infodir%g
|
||||||
|
s%@mandir@%$mandir%g
|
||||||
s%@LDLIBS@%$LDLIBS%g
|
s%@LDLIBS@%$LDLIBS%g
|
||||||
s%@MAIN_TARGET@%$MAIN_TARGET%g
|
s%@MAIN_TARGET@%$MAIN_TARGET%g
|
||||||
s%@LANG@%$LANG%g
|
|
||||||
s%@SET_MAKE@%$SET_MAKE%g
|
s%@SET_MAKE@%$SET_MAKE%g
|
||||||
s%@CC@%$CC%g
|
s%@CC@%$CC%g
|
||||||
s%@CPP@%$CPP%g
|
s%@CPP@%$CPP%g
|
||||||
|
@ -1741,7 +1953,8 @@ s%@YACC@%$YACC%g
|
||||||
s%@LEX@%$LEX%g
|
s%@LEX@%$LEX%g
|
||||||
s%@LEXLIB@%$LEXLIB%g
|
s%@LEXLIB@%$LEXLIB%g
|
||||||
s%@RANLIB@%$RANLIB%g
|
s%@RANLIB@%$RANLIB%g
|
||||||
s%@WINE_INI_GLOBAL@%$WINE_INI_GLOBAL%g
|
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
|
||||||
|
s%@INSTALL_DATA@%$INSTALL_DATA%g
|
||||||
/@MAKE_RULES@/r $MAKE_RULES
|
/@MAKE_RULES@/r $MAKE_RULES
|
||||||
s%@MAKE_RULES@%%g
|
s%@MAKE_RULES@%%g
|
||||||
|
|
||||||
|
@ -1749,7 +1962,26 @@ CEOF
|
||||||
EOF
|
EOF
|
||||||
cat >> $CONFIG_STATUS <<EOF
|
cat >> $CONFIG_STATUS <<EOF
|
||||||
|
|
||||||
CONFIG_FILES=\${CONFIG_FILES-"Make.rules controls/Makefile ipc/Makefile loader/Makefile memory/Makefile misc/Makefile miscemu/Makefile multimedia/Makefile objects/Makefile win32/Makefile windows/Makefile rc/Makefile debugger/Makefile debugger/readline/Makefile tools/Makefile if1632/Makefile toolkit/Makefile Makefile"}
|
CONFIG_FILES=\${CONFIG_FILES-"Make.rules
|
||||||
|
Makefile
|
||||||
|
controls/Makefile
|
||||||
|
debugger/Makefile
|
||||||
|
debugger/readline/Makefile
|
||||||
|
if1632/Makefile
|
||||||
|
ipc/Makefile
|
||||||
|
library/Makefile
|
||||||
|
libtest/Makefile
|
||||||
|
loader/Makefile
|
||||||
|
memory/Makefile
|
||||||
|
misc/Makefile
|
||||||
|
miscemu/Makefile
|
||||||
|
multimedia/Makefile
|
||||||
|
objects/Makefile
|
||||||
|
rc/Makefile
|
||||||
|
resources/Makefile
|
||||||
|
tools/Makefile
|
||||||
|
win32/Makefile
|
||||||
|
windows/Makefile "}
|
||||||
EOF
|
EOF
|
||||||
cat >> $CONFIG_STATUS <<\EOF
|
cat >> $CONFIG_STATUS <<\EOF
|
||||||
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
|
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
|
||||||
|
@ -1784,6 +2016,10 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
|
||||||
top_srcdir="$ac_dots$ac_given_srcdir" ;;
|
top_srcdir="$ac_dots$ac_given_srcdir" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
case "$ac_given_INSTALL" in
|
||||||
|
[/$]*) INSTALL="$ac_given_INSTALL" ;;
|
||||||
|
*) INSTALL="$ac_dots$ac_given_INSTALL" ;;
|
||||||
|
esac
|
||||||
echo creating "$ac_file"
|
echo creating "$ac_file"
|
||||||
rm -f "$ac_file"
|
rm -f "$ac_file"
|
||||||
configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
|
configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
|
||||||
|
@ -1796,6 +2032,7 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
|
||||||
s%@configure_input@%$configure_input%g
|
s%@configure_input@%$configure_input%g
|
||||||
s%@srcdir@%$srcdir%g
|
s%@srcdir@%$srcdir%g
|
||||||
s%@top_srcdir@%$top_srcdir%g
|
s%@top_srcdir@%$top_srcdir%g
|
||||||
|
s%@INSTALL@%$INSTALL%g
|
||||||
" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
|
" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
|
||||||
fi; done
|
fi; done
|
||||||
rm -f conftest.subs
|
rm -f conftest.subs
|
||||||
|
|
58
configure.in
58
configure.in
|
@ -3,9 +3,10 @@ dnl Author: Michael Patra <micky@marie.physik.tu-berlin.de>
|
||||||
dnl <patra@itp1.physik.tu-berlin.de>
|
dnl <patra@itp1.physik.tu-berlin.de>
|
||||||
AC_REVISION([configure.in 1.00])
|
AC_REVISION([configure.in 1.00])
|
||||||
AC_INIT(controls/edit.c)
|
AC_INIT(controls/edit.c)
|
||||||
|
AC_CONFIG_AUX_DIR(tools)
|
||||||
|
|
||||||
# We want these before the checks, so the checks can modify their values.
|
# We want these before the checks, so the checks can modify their values.
|
||||||
test -z "$CFLAGS" && CFLAGS="-g -O2 -Wall" AC_SUBST(CFLAGS)
|
test -z "$CFLAGS" && CFLAGS="-g -O2" AC_SUBST(CFLAGS)
|
||||||
test -z "$LDFLAGS" && LDFLAGS=-g AC_SUBST(LDFLAGS)
|
test -z "$LDFLAGS" && LDFLAGS=-g AC_SUBST(LDFLAGS)
|
||||||
test -z "$LDLIBS" && LDLIBS=-lm AC_SUBST(LDLIBS)
|
test -z "$LDLIBS" && LDLIBS=-lm AC_SUBST(LDLIBS)
|
||||||
|
|
||||||
|
@ -13,15 +14,9 @@ dnl **** Command-line arguments ****
|
||||||
|
|
||||||
AC_ARG_WITH(library,
|
AC_ARG_WITH(library,
|
||||||
[ --with-library build Wine as a library instead of an emulator],
|
[ --with-library build Wine as a library instead of an emulator],
|
||||||
[AC_DEFINE(WINELIB) MAIN_TARGET="winelib.a"],[MAIN_TARGET="wine"])
|
[AC_DEFINE(WINELIB) MAIN_TARGET="libwine.a"],[MAIN_TARGET="wine"])
|
||||||
AC_SUBST(MAIN_TARGET)
|
AC_SUBST(MAIN_TARGET)
|
||||||
|
|
||||||
AC_ARG_WITH(language,
|
|
||||||
[ --with-language=LANG change the language (LANG=En/De/Fr/Es/No/Fi/Da)],
|
|
||||||
[LANG="$withval"],
|
|
||||||
[LANG=En],)
|
|
||||||
AC_SUBST(LANG)
|
|
||||||
|
|
||||||
AC_ARG_WITH(ipc,
|
AC_ARG_WITH(ipc,
|
||||||
[ --with-ipc use inter-process communication for DDE],
|
[ --with-ipc use inter-process communication for DDE],
|
||||||
[AC_DEFINE(CONFIG_IPC)])
|
[AC_DEFINE(CONFIG_IPC)])
|
||||||
|
@ -34,10 +29,14 @@ dnl **** Check for some programs and libraries ****
|
||||||
|
|
||||||
AC_PROG_MAKE_SET
|
AC_PROG_MAKE_SET
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
|
dnl Add some options for gcc
|
||||||
|
test "x${GCC}" = "xyes" && CFLAGS="$CFLAGS -Wall -fno-strength-reduce"
|
||||||
|
AC_PROG_CPP
|
||||||
AC_PATH_XTRA
|
AC_PATH_XTRA
|
||||||
AC_PROG_YACC
|
AC_PROG_YACC
|
||||||
AC_PROG_LEX
|
AC_PROG_LEX
|
||||||
AC_PROG_RANLIB
|
AC_PROG_RANLIB
|
||||||
|
AC_PROG_INSTALL
|
||||||
dnl Check for -li386 for NetBSD
|
dnl Check for -li386 for NetBSD
|
||||||
AC_CHECK_LIB(i386,i386_set_ldt,LDLIBS="$LDLIBS -li386")
|
AC_CHECK_LIB(i386,i386_set_ldt,LDLIBS="$LDLIBS -li386")
|
||||||
|
|
||||||
|
@ -49,27 +48,32 @@ AC_HEADER_STAT()
|
||||||
AC_C_CONST()
|
AC_C_CONST()
|
||||||
AC_TYPE_SIZE_T()
|
AC_TYPE_SIZE_T()
|
||||||
|
|
||||||
if test -z "${top_srcdir}"; then
|
dnl **** Generate output files ****
|
||||||
TOP_SRCDIR=`pwd`
|
|
||||||
else
|
|
||||||
TOP_SRCDIR="${top_srcdir}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_MSG_CHECKING(for /usr/local/etc/wine.conf)
|
MAKE_RULES=Make.rules
|
||||||
if test -f /usr/local/etc/wine.conf; then
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
WINE_INI_GLOBAL='"/usr/local/etc/wine.conf"'
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
WINE_INI_GLOBAL="\"${TOP_SRCDIR}/wine.ini\""
|
|
||||||
fi
|
|
||||||
AC_SUBST(WINE_INI_GLOBAL)
|
|
||||||
AC_DEFINE_UNQUOTED(WINE_INI_GLOBAL,$WINE_INI_GLOBAL)
|
|
||||||
|
|
||||||
MAKE_RULES=$TOP_SRCDIR/Make.rules
|
|
||||||
AC_SUBST_FILE(MAKE_RULES)
|
AC_SUBST_FILE(MAKE_RULES)
|
||||||
|
|
||||||
AC_OUTPUT(Make.rules controls/Makefile ipc/Makefile loader/Makefile memory/Makefile misc/Makefile miscemu/Makefile multimedia/Makefile objects/Makefile win32/Makefile windows/Makefile rc/Makefile debugger/Makefile debugger/readline/Makefile tools/Makefile if1632/Makefile toolkit/Makefile Makefile)
|
AC_OUTPUT([
|
||||||
|
Make.rules
|
||||||
|
Makefile
|
||||||
|
controls/Makefile
|
||||||
|
debugger/Makefile
|
||||||
|
debugger/readline/Makefile
|
||||||
|
if1632/Makefile
|
||||||
|
ipc/Makefile
|
||||||
|
library/Makefile
|
||||||
|
libtest/Makefile
|
||||||
|
loader/Makefile
|
||||||
|
memory/Makefile
|
||||||
|
misc/Makefile
|
||||||
|
miscemu/Makefile
|
||||||
|
multimedia/Makefile
|
||||||
|
objects/Makefile
|
||||||
|
rc/Makefile
|
||||||
|
resources/Makefile
|
||||||
|
tools/Makefile
|
||||||
|
win32/Makefile
|
||||||
|
windows/Makefile ])
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Configure finished. Do 'make depend; make' to compile Wine."
|
echo "Configure finished. Do 'make depend; make' to compile Wine."
|
||||||
|
@ -79,5 +83,5 @@ dnl Local Variables:
|
||||||
dnl comment-start: "dnl "
|
dnl comment-start: "dnl "
|
||||||
dnl comment-end: ""
|
dnl comment-end: ""
|
||||||
dnl comment-start-skip: "\\bdnl\\b\\s *"
|
dnl comment-start-skip: "\\bdnl\\b\\s *"
|
||||||
dnl compile-command: "make configure config.h.in"
|
dnl compile-command: "autoconf"
|
||||||
dnl End:
|
dnl End:
|
||||||
|
|
|
@ -434,7 +434,7 @@ static LRESULT CBSelectString(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
LPHEADLIST lphl = ComboGetListHeader(hwnd);
|
LPHEADLIST lphl = ComboGetListHeader(hwnd);
|
||||||
WORD wRet;
|
WORD wRet;
|
||||||
|
|
||||||
wRet = ListBoxFindString(lphl, wParam, lParam);
|
wRet = ListBoxFindString(lphl, wParam, (SEGPTR)lParam);
|
||||||
|
|
||||||
/* XXX add functionality here */
|
/* XXX add functionality here */
|
||||||
|
|
||||||
|
@ -447,7 +447,7 @@ static LRESULT CBSelectString(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
static LRESULT CBFindString(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
static LRESULT CBFindString(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
LPHEADLIST lphl = ComboGetListHeader(hwnd);
|
LPHEADLIST lphl = ComboGetListHeader(hwnd);
|
||||||
return ListBoxFindString(lphl, wParam, lParam);
|
return ListBoxFindString(lphl, wParam, (SEGPTR)lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
|
|
@ -63,7 +63,7 @@ typedef struct
|
||||||
int SelEndLine; /* ending line of selection */
|
int SelEndLine; /* ending line of selection */
|
||||||
int SelEndCol; /* ending column of selection */
|
int SelEndCol; /* ending column of selection */
|
||||||
HFONT hFont; /* handle of current font (if not default) */
|
HFONT hFont; /* handle of current font (if not default) */
|
||||||
HANDLE hDeletedText; /* handle to deleted txet buffer for undo */
|
HANDLE hDeletedText; /* handle to deleted text buffer for undo */
|
||||||
int DeletedLength; /* length of deleted text */
|
int DeletedLength; /* length of deleted text */
|
||||||
int DeletedCurrLine; /* starting line from which text was deleted */
|
int DeletedCurrLine; /* starting line from which text was deleted */
|
||||||
int DeletedCurrCol; /* starting col from which text was deleted */
|
int DeletedCurrCol; /* starting col from which text was deleted */
|
||||||
|
@ -509,7 +509,15 @@ static void EDIT_WriteText(HWND hwnd, char *lp, int off, int len, int row,
|
||||||
es->BlankLine[(es->ClientWidth / es->CharWidths[32]) + 1] = 0;
|
es->BlankLine[(es->ClientWidth / es->CharWidths[32]) + 1] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(cp = strchr(str, VK_TAB)))
|
if ((GetWindowLong( hwnd, GWL_STYLE ) & ES_PASSWORD))
|
||||||
|
{
|
||||||
|
int len = strlen(str);
|
||||||
|
char *buff = xmalloc( len+1 );
|
||||||
|
memset( buff, '*', len );
|
||||||
|
buff[len] = '\0';
|
||||||
|
TextOut( hdc, col - diff, row * es->txtht, buff, len );
|
||||||
|
}
|
||||||
|
else if (!(cp = strchr(str, VK_TAB)))
|
||||||
TextOut(hdc, col - diff, row * es->txtht, str, strlen(str));
|
TextOut(hdc, col - diff, row * es->txtht, str, strlen(str));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1920,15 +1928,35 @@ static LONG EDIT_SetTabStopsMsg(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
*/
|
*/
|
||||||
static LONG EDIT_GetLineMsg(HWND hwnd, WORD wParam, LONG lParam)
|
static LONG EDIT_GetLineMsg(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
{
|
{
|
||||||
char *cp, *cp1;
|
char *cp;
|
||||||
int len;
|
int len = 0;
|
||||||
unsigned char *buffer = (char *)lParam;
|
unsigned char *buffer = (char *)PTR_SEG_TO_LIN(lParam);
|
||||||
|
|
||||||
|
/* the line wanted */
|
||||||
|
cp = EDIT_TextLine (hwnd, wParam);
|
||||||
|
len = EDIT_LineLength(hwnd, wParam);
|
||||||
|
|
||||||
|
/* if cp==NULL nothing will be copied - I hope */
|
||||||
|
if ((char *) NULL == cp && 0 != len) {
|
||||||
|
fprintf(stdnimp,"edit: EDIT_GetLineMsg cp == NULL && len != 0");
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (0>len)
|
||||||
|
fprintf(stdnimp,"edit: EDIT_GetLineMsg len < 0");
|
||||||
|
|
||||||
|
/* suggested reason for the following line:
|
||||||
|
never copy more than the buffer's size ?
|
||||||
|
I thought that this would make sense only if
|
||||||
|
the lstrcpyn fun was used instead of the gnu strncpy.
|
||||||
|
*/
|
||||||
|
len = MIN(len, (WORD)(*buffer));
|
||||||
|
|
||||||
|
if (0>len)
|
||||||
|
fprintf(stdnimp,"edit: EDIT_GetLineMsg len < 0 after MIN");
|
||||||
|
|
||||||
cp = EDIT_TextLine(hwnd, wParam);
|
|
||||||
cp1 = EDIT_TextLine(hwnd, wParam + 1);
|
|
||||||
len = MIN((int)(cp1 - cp), (WORD)(*buffer));
|
|
||||||
dprintf_edit( stddeb, "EDIT_GetLineMsg: %d %d, len %d\n", (int)(WORD)(*buffer), (int)(WORD)(*(char *)buffer), len);
|
dprintf_edit( stddeb, "EDIT_GetLineMsg: %d %d, len %d\n", (int)(WORD)(*buffer), (int)(WORD)(*(char *)buffer), len);
|
||||||
strncpy(buffer, cp, len);
|
lstrcpyn(buffer, cp, len);
|
||||||
|
|
||||||
return (LONG)len;
|
return (LONG)len;
|
||||||
}
|
}
|
||||||
|
|
|
@ -759,7 +759,7 @@ static LONG LBCreate(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
|
|
||||||
CreateListBoxStruct(hwnd, ODT_LISTBOX, dwStyle, GetParent(hwnd));
|
CreateListBoxStruct(hwnd, ODT_LISTBOX, dwStyle, GetParent(hwnd));
|
||||||
lphl = ListBoxGetStorageHeader(hwnd);
|
lphl = ListBoxGetStorageHeader(hwnd);
|
||||||
dprintf_listbox(stddeb,"ListBox created: lphl = %p dwStyle = "NPFMT":"NPFMT"\n",
|
dprintf_listbox(stddeb,"ListBox created: lphl = %p dwStyle = %04x:%04x\n",
|
||||||
lphl, HIWORD(dwStyle), LOWORD(dwStyle));
|
lphl, HIWORD(dwStyle), LOWORD(dwStyle));
|
||||||
|
|
||||||
GetClientRect(hwnd,&rect);
|
GetClientRect(hwnd,&rect);
|
||||||
|
@ -1431,7 +1431,7 @@ static LONG LBDeleteString(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
static LONG LBFindString(HWND hwnd, WORD wParam, LONG lParam)
|
static LONG LBFindString(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
{
|
{
|
||||||
LPHEADLIST lphl = ListBoxGetStorageHeader(hwnd);
|
LPHEADLIST lphl = ListBoxGetStorageHeader(hwnd);
|
||||||
return ListBoxFindString(lphl, wParam, lParam);
|
return ListBoxFindString(lphl, wParam, (SEGPTR)lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -1600,7 +1600,7 @@ static LONG LBSelectString(HWND hwnd, WORD wParam, LONG lParam)
|
||||||
LPHEADLIST lphl = ListBoxGetStorageHeader(hwnd);
|
LPHEADLIST lphl = ListBoxGetStorageHeader(hwnd);
|
||||||
WORD wRet;
|
WORD wRet;
|
||||||
|
|
||||||
wRet = ListBoxFindString(lphl, wParam, lParam);
|
wRet = ListBoxFindString(lphl, wParam, (SEGPTR)lParam);
|
||||||
|
|
||||||
/* XXX add functionality here */
|
/* XXX add functionality here */
|
||||||
|
|
||||||
|
|
|
@ -23,14 +23,10 @@
|
||||||
#include "win.h"
|
#include "win.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "graphics.h"
|
#include "graphics.h"
|
||||||
|
#include "resource.h"
|
||||||
#include "stddebug.h"
|
#include "stddebug.h"
|
||||||
/* #define DEBUG_MENU */
|
|
||||||
/* #define DEBUG_MENUCALC */
|
|
||||||
/* #define DEBUG_MENUSHORTCUT */
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
#include "../rc/sysres.h"
|
|
||||||
|
|
||||||
/* Dimension of the menu bitmaps */
|
/* Dimension of the menu bitmaps */
|
||||||
static WORD check_bitmap_width = 0, check_bitmap_height = 0;
|
static WORD check_bitmap_width = 0, check_bitmap_height = 0;
|
||||||
static WORD arrow_bitmap_width = 0, arrow_bitmap_height = 0;
|
static WORD arrow_bitmap_width = 0, arrow_bitmap_height = 0;
|
||||||
|
@ -265,7 +261,7 @@ static void MENU_CalcItemSize( HDC hdc, LPMENUITEM lpitem, HWND hwndOwner,
|
||||||
mistruct->itemData = (long int)lpitem->item_text;
|
mistruct->itemData = (long int)lpitem->item_text;
|
||||||
mistruct->itemHeight = 16;
|
mistruct->itemHeight = 16;
|
||||||
mistruct->itemWidth = 30;
|
mistruct->itemWidth = 30;
|
||||||
SendMessage(hwndOwner,WM_MEASUREITEM,0,mistrsegp);
|
SendMessage(hwndOwner,WM_MEASUREITEM,0,(LPARAM)mistrsegp);
|
||||||
lpitem->rect.bottom += mistruct->itemHeight;
|
lpitem->rect.bottom += mistruct->itemHeight;
|
||||||
lpitem->rect.right += mistruct->itemWidth;
|
lpitem->rect.right += mistruct->itemWidth;
|
||||||
dprintf_menu(stddeb,"DrawMenuItem: MeasureItem %04x %d:%d!\n",
|
dprintf_menu(stddeb,"DrawMenuItem: MeasureItem %04x %d:%d!\n",
|
||||||
|
@ -475,7 +471,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HDC hdc, LPMENUITEM lpitem,
|
||||||
distruct->hwndItem = hwnd;
|
distruct->hwndItem = hwnd;
|
||||||
distruct->hDC = hdc;
|
distruct->hDC = hdc;
|
||||||
distruct->rcItem = lpitem->rect;
|
distruct->rcItem = lpitem->rect;
|
||||||
SendMessage(hwnd,WM_DRAWITEM,0,distrsegp);
|
SendMessage(hwnd,WM_DRAWITEM,0,(LPARAM)distrsegp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (menuBar && (lpitem->item_flags & MF_SEPARATOR)) return;
|
if (menuBar && (lpitem->item_flags & MF_SEPARATOR)) return;
|
||||||
|
@ -633,7 +629,7 @@ UINT MENU_DrawMenuBar(HDC hDC, LPRECT lprect, HWND hwnd, BOOL suppress_draw)
|
||||||
int i;
|
int i;
|
||||||
WND *wndPtr = WIN_FindWndPtr( hwnd );
|
WND *wndPtr = WIN_FindWndPtr( hwnd );
|
||||||
|
|
||||||
lppop = (LPPOPUPMENU) USER_HEAP_LIN_ADDR( wndPtr->wIDmenu );
|
lppop = (LPPOPUPMENU) USER_HEAP_LIN_ADDR( (HMENU)wndPtr->wIDmenu );
|
||||||
if (lppop == NULL || lprect == NULL) return SYSMETRICS_CYMENU;
|
if (lppop == NULL || lprect == NULL) return SYSMETRICS_CYMENU;
|
||||||
dprintf_menu(stddeb,"MENU_DrawMenuBar("NPFMT", %p, %p); !\n",
|
dprintf_menu(stddeb,"MENU_DrawMenuBar("NPFMT", %p, %p); !\n",
|
||||||
hDC, lprect, lppop);
|
hDC, lprect, lppop);
|
||||||
|
@ -1454,7 +1450,7 @@ void MENU_TrackKbdMenuBar( HWND hwnd, UINT wParam )
|
||||||
SendMessage( hwnd, WM_ENTERMENULOOP, 0, 0 );
|
SendMessage( hwnd, WM_ENTERMENULOOP, 0, 0 );
|
||||||
SendMessage( hwnd, WM_INITMENU, wndPtr->wIDmenu, 0 );
|
SendMessage( hwnd, WM_INITMENU, wndPtr->wIDmenu, 0 );
|
||||||
/* Select first selectable item */
|
/* Select first selectable item */
|
||||||
MENU_SelectItem( hwnd, wndPtr->wIDmenu, NO_SELECTED_ITEM );
|
MENU_SelectItem( hwnd, (HMENU)wndPtr->wIDmenu, NO_SELECTED_ITEM );
|
||||||
MENU_SelectNextItem( hwnd, (HMENU)wndPtr->wIDmenu );
|
MENU_SelectNextItem( hwnd, (HMENU)wndPtr->wIDmenu );
|
||||||
MENU_TrackMenu( (HMENU)wndPtr->wIDmenu, TPM_LEFTALIGN | TPM_LEFTBUTTON,
|
MENU_TrackMenu( (HMENU)wndPtr->wIDmenu, TPM_LEFTALIGN | TPM_LEFTBUTTON,
|
||||||
0, 0, hwnd, NULL );
|
0, 0, hwnd, NULL );
|
||||||
|
@ -1672,7 +1668,7 @@ UINT GetMenuState(HMENU hMenu, UINT wItemID, UINT wFlags)
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* GetMenuItemCount [USER.263]
|
* GetMenuItemCount [USER.263]
|
||||||
*/
|
*/
|
||||||
WORD GetMenuItemCount(HMENU hMenu)
|
INT GetMenuItemCount(HMENU hMenu)
|
||||||
{
|
{
|
||||||
LPPOPUPMENU menu;
|
LPPOPUPMENU menu;
|
||||||
dprintf_menu(stddeb,"GetMenuItemCount("NPFMT");\n", hMenu);
|
dprintf_menu(stddeb,"GetMenuItemCount("NPFMT");\n", hMenu);
|
||||||
|
@ -1724,7 +1720,7 @@ BOOL InsertMenu(HMENU hMenu, UINT nPos, UINT wFlags, UINT wItemID, LPSTR lpNewIt
|
||||||
/* Find where to insert new item */
|
/* Find where to insert new item */
|
||||||
|
|
||||||
if ((wFlags & MF_BYPOSITION) &&
|
if ((wFlags & MF_BYPOSITION) &&
|
||||||
((nPos == (UINT)-1) || (nPos == GetMenuItemCount(hMenu))))
|
((nPos == (UINT)-1) || (nPos == (UINT)GetMenuItemCount(hMenu))))
|
||||||
{
|
{
|
||||||
/* Special case: append to menu
|
/* Special case: append to menu
|
||||||
Some programs specify the menu length to do that */
|
Some programs specify the menu length to do that */
|
||||||
|
@ -1857,7 +1853,7 @@ BOOL DeleteMenu(HMENU hMenu, UINT nPos, UINT wFlags)
|
||||||
{
|
{
|
||||||
MENUITEM *item = MENU_FindItem( &hMenu, &nPos, wFlags );
|
MENUITEM *item = MENU_FindItem( &hMenu, &nPos, wFlags );
|
||||||
if (!item) return FALSE;
|
if (!item) return FALSE;
|
||||||
if (item->item_flags & MF_POPUP) DestroyMenu( item->item_id );
|
if (item->item_flags & MF_POPUP) DestroyMenu( (HMENU)item->item_id );
|
||||||
/* nPos is now the position of the item */
|
/* nPos is now the position of the item */
|
||||||
RemoveMenu( hMenu, nPos, wFlags | MF_BYPOSITION );
|
RemoveMenu( hMenu, nPos, wFlags | MF_BYPOSITION );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -2093,7 +2089,7 @@ HMENU GetSubMenu(HMENU hMenu, short nPos)
|
||||||
if ((UINT)nPos >= lppop->nItems) return 0;
|
if ((UINT)nPos >= lppop->nItems) return 0;
|
||||||
lpitem = (MENUITEM *) USER_HEAP_LIN_ADDR( lppop->hItems );
|
lpitem = (MENUITEM *) USER_HEAP_LIN_ADDR( lppop->hItems );
|
||||||
if (!(lpitem[nPos].item_flags & MF_POPUP)) return 0;
|
if (!(lpitem[nPos].item_flags & MF_POPUP)) return 0;
|
||||||
return lpitem[nPos].item_id;
|
return (HMENU)lpitem[nPos].item_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2190,9 +2186,12 @@ HMENU LoadMenuIndirect(LPSTR menu_template)
|
||||||
HMENU CopySysMenu()
|
HMENU CopySysMenu()
|
||||||
{
|
{
|
||||||
HMENU hMenu;
|
HMENU hMenu;
|
||||||
|
HGLOBAL handle;
|
||||||
LPPOPUPMENU menu;
|
LPPOPUPMENU menu;
|
||||||
|
|
||||||
hMenu = LoadMenuIndirect( sysres_MENU_SYSMENU.bytes );
|
if (!(handle = SYSRES_LoadResource( SYSRES_MENU_SYSMENU ))) return 0;
|
||||||
|
hMenu = LoadMenuIndirect( GlobalLock( handle ) );
|
||||||
|
SYSRES_FreeResource( handle );
|
||||||
if(!hMenu)
|
if(!hMenu)
|
||||||
{
|
{
|
||||||
dprintf_menu(stddeb,"No SYSMENU\n");
|
dprintf_menu(stddeb,"No SYSMENU\n");
|
||||||
|
@ -2230,17 +2229,18 @@ WORD * ParseMenuResource(WORD *first_item, int level, HMENU hMenu)
|
||||||
AppendMenu(hMenu, popup_item->item_flags,
|
AppendMenu(hMenu, popup_item->item_flags,
|
||||||
(UINT)hSubMenu, popup_item->item_text);
|
(UINT)hSubMenu, popup_item->item_text);
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
MENUITEMTEMPLATE *normal_item = (MENUITEMTEMPLATE *) item;
|
{
|
||||||
next_item = (WORD *) (normal_item->item_text +
|
MENUITEMTEMPLATE *normal_item = (MENUITEMTEMPLATE *) item;
|
||||||
strlen(normal_item->item_text) + 1);
|
WORD flags = normal_item->item_flags;
|
||||||
if (strlen(normal_item->item_text) == 0 && normal_item->item_id == 0)
|
next_item = (WORD *) (normal_item->item_text +
|
||||||
normal_item->item_flags |= MF_SEPARATOR;
|
strlen(normal_item->item_text) + 1);
|
||||||
AppendMenu(hMenu, normal_item->item_flags,
|
if (!normal_item->item_text[0] && !normal_item->item_id)
|
||||||
normal_item->item_id, normal_item->item_text);
|
flags |= MF_SEPARATOR; /* FIXME: do this in InsertMenu? */
|
||||||
}
|
AppendMenu( hMenu, flags, normal_item->item_id,
|
||||||
}
|
normal_item->item_text );
|
||||||
while (!(*item & MF_END));
|
}
|
||||||
|
} while (!(*item & MF_END));
|
||||||
return next_item;
|
return next_item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,6 @@ lex.yy.c: debug.l
|
||||||
$(LEX) -8 -I debug.l
|
$(LEX) -8 -I debug.l
|
||||||
|
|
||||||
clean::
|
clean::
|
||||||
rm -f y.tab.c y.tab.h lex.yy.c
|
$(RM) y.tab.c y.tab.h lex.yy.c
|
||||||
|
|
||||||
### Dependencies:
|
### Dependencies:
|
||||||
|
|
|
@ -235,6 +235,19 @@ void wine_debug( int signal, struct sigcontext_struct *regs )
|
||||||
if (newmode != dbg_mode)
|
if (newmode != dbg_mode)
|
||||||
fprintf(stderr,"In %d bit mode.\n", dbg_mode = newmode);
|
fprintf(stderr,"In %d bit mode.\n", dbg_mode = newmode);
|
||||||
|
|
||||||
|
if (signal != SIGTRAP) /* This is a real crash, dump some info */
|
||||||
|
{
|
||||||
|
DEBUG_InfoRegisters();
|
||||||
|
DEBUG_InfoStack();
|
||||||
|
if (dbg_mode == 16)
|
||||||
|
{
|
||||||
|
LDT_Print( SELECTOR_TO_ENTRY(DS_reg(DEBUG_context)), 1 );
|
||||||
|
if (ES_reg(DEBUG_context) != DS_reg(DEBUG_context))
|
||||||
|
LDT_Print( SELECTOR_TO_ENTRY(ES_reg(DEBUG_context)), 1 );
|
||||||
|
}
|
||||||
|
DEBUG_BackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
/* Show where we crashed */
|
/* Show where we crashed */
|
||||||
DEBUG_PrintAddress( &addr, dbg_mode );
|
DEBUG_PrintAddress( &addr, dbg_mode );
|
||||||
fprintf(stderr,": ");
|
fprintf(stderr,": ");
|
||||||
|
|
|
@ -40,13 +40,13 @@ void DEBUG_InfoStack(void)
|
||||||
{ /* 32-bit mode */
|
{ /* 32-bit mode */
|
||||||
addr.seg = 0;
|
addr.seg = 0;
|
||||||
addr.off = ESP_reg(DEBUG_context);
|
addr.off = ESP_reg(DEBUG_context);
|
||||||
DEBUG_ExamineMemory( &addr, 10, 'x' );
|
DEBUG_ExamineMemory( &addr, 24, 'x' );
|
||||||
}
|
}
|
||||||
else /* 16-bit mode */
|
else /* 16-bit mode */
|
||||||
{
|
{
|
||||||
addr.seg = SS_reg(DEBUG_context);
|
addr.seg = SS_reg(DEBUG_context);
|
||||||
addr.off = SP_reg(DEBUG_context);
|
addr.off = SP_reg(DEBUG_context);
|
||||||
DEBUG_ExamineMemory( &addr, 10, 'w' );
|
DEBUG_ExamineMemory( &addr, 24, 'w' );
|
||||||
}
|
}
|
||||||
fprintf(stderr,"\n");
|
fprintf(stderr,"\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
TOPSRC = @top_srcdir@
|
TOPSRC = @top_srcdir@
|
||||||
BUILD = $(TOPSRC)/tools/build
|
|
||||||
|
|
||||||
MODULE = if1632
|
MODULE = if1632
|
||||||
|
|
||||||
|
@ -41,7 +40,7 @@ all: checkbuild $(MODULE).o
|
||||||
$(SPEC16_FILES) $(SPEC32_FILES): $(BUILD)
|
$(SPEC16_FILES) $(SPEC32_FILES): $(BUILD)
|
||||||
|
|
||||||
$(BUILD) checkbuild:
|
$(BUILD) checkbuild:
|
||||||
cd $(TOPSRC)/tools; $(MAKE) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'DEFS=$(DEFS)' 'LANG=$(LANG)' build
|
cd $(TOPSRC)/tools; $(SUBMAKE) build
|
||||||
|
|
||||||
call16.S: $(TOPSRC)/include/callback.h $(BUILD)
|
call16.S: $(TOPSRC)/include/callback.h $(BUILD)
|
||||||
$(BUILD) -call16 `cat $(TOPSRC)/include/callback.h | grep "extern.*CallTo16_" | sed 's/.*CallTo16_\(.*\)(.*/\1/' | sort | uniq` > call16.S
|
$(BUILD) -call16 `cat $(TOPSRC)/include/callback.h | grep "extern.*CallTo16_" | sed 's/.*CallTo16_\(.*\)(.*/\1/' | sort | uniq` > call16.S
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
name commdlg
|
name commdlg
|
||||||
id 14
|
id 14
|
||||||
|
|
||||||
1 pascal GETOPENFILENAME(ptr) GetOpenFileName
|
1 pascal16 GetOpenFileName(ptr) GetOpenFileName
|
||||||
2 pascal GETSAVEFILENAME(ptr) GetSaveFileName
|
2 pascal16 GetSaveFileName(ptr) GetSaveFileName
|
||||||
5 pascal CHOOSECOLOR(ptr) ChooseColor
|
5 pascal16 ChooseColor(ptr) ChooseColor
|
||||||
6 pascal FILEOPENDLGPROC(word word word long) FileOpenDlgProc
|
6 pascal FileOpenDlgProc(word word word long) FileOpenDlgProc
|
||||||
7 pascal FILESAVEDLGPROC(word word word long) FileSaveDlgProc
|
7 pascal FileSaveDlgProc(word word word long) FileSaveDlgProc
|
||||||
8 pascal COLORDLGPROC(word word word long) ColorDlgProc
|
8 pascal ColorDlgProc(word word word long) ColorDlgProc
|
||||||
# 9 pascal LOADALTERBITMAP exported, shared data
|
#9 pascal LOADALTERBITMAP exported, shared data
|
||||||
11 pascal FINDTEXT(ptr) FindText
|
11 pascal16 FindText(ptr) FindText
|
||||||
12 pascal REPLACETEXT(ptr) ReplaceText
|
12 pascal16 ReplaceText(ptr) ReplaceText
|
||||||
13 pascal FINDTEXTDLGPROC(word word word long) FindTextDlgProc
|
13 pascal FindTextDlgProc(word word word long) FindTextDlgProc
|
||||||
14 pascal REPLACETEXTDLGPROC(word word word long) ReplaceTextDlgProc
|
14 pascal ReplaceTextDlgProc(word word word long) ReplaceTextDlgProc
|
||||||
15 stub ChooseFont
|
15 stub ChooseFont
|
||||||
# 16 pascal FORMATCHARDLGPROC exported, shared data
|
#16 pascal FORMATCHARDLGPROC exported, shared data
|
||||||
# 18 pascal FONTSTYLEENUMPROC exported, shared data
|
#18 pascal FONTSTYLEENUMPROC exported, shared data
|
||||||
# 19 pascal FONTFAMILYENUMPROC exported, shared data
|
#19 pascal FONTFAMILYENUMPROC exported, shared data
|
||||||
20 pascal PRINTDLG(ptr) PrintDlg
|
20 pascal16 PrintDlg(ptr) PrintDlg
|
||||||
21 pascal PRINTDLGPROC(word word word long) PrintDlgProc
|
21 pascal PrintDlgProc(word word word long) PrintDlgProc
|
||||||
22 pascal PRINTSETUPDLGPROC(word word word long) PrintSetupDlgProc
|
22 pascal PrintSetupDlgProc(word word word long) PrintSetupDlgProc
|
||||||
# 23 pascal EDITINTEGERONLY exported, shared data
|
#23 pascal EDITINTEGERONLY exported, shared data
|
||||||
# 25 pascal WANTARROWS exported, shared data
|
#25 pascal WANTARROWS exported, shared data
|
||||||
26 pascal COMMDLGEXTENDEDERROR() CommDlgExtendError
|
26 pascal CommDlgExtendedError() CommDlgExtendedError
|
||||||
27 pascal GETFILETITLE(ptr ptr word) GetFileTitle
|
27 pascal16 GetFileTitle(ptr ptr word) GetFileTitle
|
||||||
# 28 pascal WEP exported, shared data
|
#28 pascal WEP exported, shared data
|
||||||
# 29 pascal DWLBSUBCLASS exported, shared data
|
#29 pascal DWLBSUBCLASS exported, shared data
|
||||||
# 30 pascal DWUPARROWHACK exported, shared data
|
#30 pascal DWUPARROWHACK exported, shared data
|
||||||
# 31 pascal DWOKSUBCLASS exported, shared data
|
#31 pascal DWOKSUBCLASS exported, shared data
|
||||||
|
|
|
@ -286,7 +286,7 @@ base 1
|
||||||
0282 stub GetSystemDirectoryA
|
0282 stub GetSystemDirectoryA
|
||||||
0283 stub GetSystemDirectoryW
|
0283 stub GetSystemDirectoryW
|
||||||
0284 stub GetSystemInfo
|
0284 stub GetSystemInfo
|
||||||
0285 stub GetSystemTime
|
0285 stdcall GetSystemTime(ptr) GetSystemTime
|
||||||
0286 stub GetSystemTimeAdjustment
|
0286 stub GetSystemTimeAdjustment
|
||||||
0287 stub GetTapeParameters
|
0287 stub GetTapeParameters
|
||||||
0288 stub GetTapePosition
|
0288 stub GetTapePosition
|
||||||
|
@ -525,7 +525,7 @@ base 1
|
||||||
0520 stub SetupComm
|
0520 stub SetupComm
|
||||||
0521 stub ShowConsoleCursor
|
0521 stub ShowConsoleCursor
|
||||||
0522 stub SizeofResource
|
0522 stub SizeofResource
|
||||||
0523 stub Sleep
|
0523 stdcall Sleep(long) Sleep
|
||||||
0524 stub SleepEx
|
0524 stub SleepEx
|
||||||
0525 stub SuspendThread
|
0525 stub SuspendThread
|
||||||
0526 stub SystemTimeToFileTime
|
0526 stub SystemTimeToFileTime
|
||||||
|
|
|
@ -173,8 +173,10 @@ void RELAY_DebugReturn( int func_type, int ret_val, int args32 )
|
||||||
struct dll_table_s *table;
|
struct dll_table_s *table;
|
||||||
char *name;
|
char *name;
|
||||||
|
|
||||||
if (*(DWORD *)PTR_SEG_TO_LIN(IF1632_Stack32_base) != 0xDEADBEEF) {
|
if (*(DWORD *)PTR_SEG_TO_LIN(IF1632_Stack32_base) != 0xDEADBEEF)
|
||||||
|
{
|
||||||
fprintf(stderr, "Wine wrote past the end of the 32 bit stack. Please report this.\n");
|
fprintf(stderr, "Wine wrote past the end of the 32 bit stack. Please report this.\n");
|
||||||
|
exit(1); /* There's probably no point in going on */
|
||||||
}
|
}
|
||||||
if (!debugging_relay) return;
|
if (!debugging_relay) return;
|
||||||
|
|
||||||
|
@ -186,13 +188,16 @@ void RELAY_DebugReturn( int func_type, int ret_val, int args32 )
|
||||||
switch(func_type)
|
switch(func_type)
|
||||||
{
|
{
|
||||||
case 0: /* long */
|
case 0: /* long */
|
||||||
printf( "retval=0x%08x ds=%04x\n", ret_val, frame->ds );
|
printf( "retval=0x%08x ret=%04x:%04x ds=%04x\n",
|
||||||
|
ret_val, frame->cs, frame->ip, frame->ds );
|
||||||
break;
|
break;
|
||||||
case 1: /* word */
|
case 1: /* word */
|
||||||
printf( "retval=0x%04x ds=%04x\n", ret_val & 0xffff, frame->ds );
|
printf( "retval=0x%04x ret=%04x:%04x ds=%04x\n",
|
||||||
|
ret_val & 0xffff, frame->cs, frame->ip, frame->ds );
|
||||||
break;
|
break;
|
||||||
case 2: /* regs */
|
case 2: /* regs */
|
||||||
printf( "retval=none ds=%04x\n", frame->ds );
|
printf( "retval=none ret=%04x:%04x ds=%04x\n",
|
||||||
|
frame->cs, frame->ip, frame->ds );
|
||||||
{
|
{
|
||||||
struct sigcontext_struct *context = (struct sigcontext_struct *)&args32;
|
struct sigcontext_struct *context = (struct sigcontext_struct *)&args32;
|
||||||
printf( " AX=%04x BX=%04x CX=%04x DX=%04x SI=%04x DI=%04x ES=%04x EFL=%08lx\n",
|
printf( " AX=%04x BX=%04x CX=%04x DX=%04x SI=%04x DI=%04x ES=%04x EFL=%08lx\n",
|
||||||
|
|
|
@ -290,6 +290,15 @@ typedef DEVNAMES * LPDEVNAMES;
|
||||||
#define FINDDLG 9
|
#define FINDDLG 9
|
||||||
#define REPLACEDLG 10
|
#define REPLACEDLG 10
|
||||||
|
|
||||||
|
BOOL ChooseColor(LPCHOOSECOLOR lpChCol);
|
||||||
|
DWORD CommDlgExtendedError(void);
|
||||||
|
BOOL FindText(LPFINDREPLACE lpFind);
|
||||||
|
short GetFileTitle(LPCSTR lpFile, LPSTR lpTitle, UINT cbBuf);
|
||||||
|
BOOL GetOpenFileName(LPOPENFILENAME lpofn);
|
||||||
|
BOOL GetSaveFileName(LPOPENFILENAME lpofn);
|
||||||
|
BOOL PrintDlg(LPPRINTDLG lpPrint);
|
||||||
|
BOOL ReplaceText(LPFINDREPLACE lpFind);
|
||||||
|
|
||||||
LRESULT FileOpenDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
|
LRESULT FileOpenDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
|
||||||
LRESULT FileSaveDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
|
LRESULT FileSaveDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
|
||||||
LRESULT ColorDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
|
LRESULT ColorDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
|
@ -16,7 +16,7 @@ typedef struct
|
||||||
int shmid;
|
int shmid;
|
||||||
} SHMDATA;
|
} SHMDATA;
|
||||||
|
|
||||||
extern HGLOBAL GLOBAL_CreateBlock( WORD flags, void *ptr, DWORD size,
|
extern HGLOBAL GLOBAL_CreateBlock( WORD flags, const void *ptr, DWORD size,
|
||||||
HGLOBAL hOwner, BOOL isCode,
|
HGLOBAL hOwner, BOOL isCode,
|
||||||
BOOL is32Bit, BOOL isReadOnly,
|
BOOL is32Bit, BOOL isReadOnly,
|
||||||
SHMDATA *shmdata);
|
SHMDATA *shmdata);
|
||||||
|
|
|
@ -56,16 +56,7 @@ typedef struct {
|
||||||
HANDLE hStdError;
|
HANDLE hStdError;
|
||||||
} STARTUPINFO, *LPSTARTUPINFO;
|
} STARTUPINFO, *LPSTARTUPINFO;
|
||||||
|
|
||||||
typedef struct {
|
/* SYSTEMTIME, and LPSYSTEMTIME moved to include/windows.h (JBP) */
|
||||||
WORD wYear;
|
|
||||||
WORD wMonth;
|
|
||||||
WORD wDayOfWeek;
|
|
||||||
WORD wDay;
|
|
||||||
WORD wHour;
|
|
||||||
WORD wMinute;
|
|
||||||
WORD wSecond;
|
|
||||||
WORD wMilliseconds;
|
|
||||||
} SYSTEMTIME, *LPSYSTEMTIME;
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
LONG Bias;
|
LONG Bias;
|
||||||
|
|
|
@ -6,18 +6,16 @@
|
||||||
|
|
||||||
#ifdef WINELIB
|
#ifdef WINELIB
|
||||||
|
|
||||||
#include "windows.h"
|
#include "wintypes.h"
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
|
||||||
void LIBRES_RegisterResources(struct resource** Res);
|
extern INT LIBRES_AccessResource( HINSTANCE hModule, HRSRC hRsrc );
|
||||||
|
extern HGLOBAL LIBRES_AllocResource( HINSTANCE hModule, HRSRC hRsrc, DWORD size );
|
||||||
INT LIBRES_AccessResource( HINSTANCE hModule, HRSRC hRsrc );
|
extern HRSRC LIBRES_FindResource( HINSTANCE hModule, LPCSTR name, LPCSTR type );
|
||||||
HGLOBAL LIBRES_AllocResource( HINSTANCE hModule, HRSRC hRsrc, DWORD size );
|
extern BOOL LIBRES_FreeResource( HGLOBAL handle );
|
||||||
HRSRC LIBRES_FindResource( HINSTANCE hModule, LPCSTR name, LPCSTR type );
|
extern HGLOBAL LIBRES_LoadResource( HINSTANCE hModule, HRSRC hRsrc );
|
||||||
BOOL LIBRES_FreeResource( HGLOBAL handle );
|
extern LPVOID LIBRES_LockResource( HGLOBAL handle );
|
||||||
HGLOBAL LIBRES_LoadResource( HINSTANCE hModule, HRSRC hRsrc );
|
extern DWORD LIBRES_SizeofResource( HINSTANCE hModule, HRSRC hRsrc );
|
||||||
LPVOID LIBRES_LockResource( HGLOBAL handle );
|
|
||||||
DWORD LIBRES_SizeofResource( HINSTANCE hModule, HRSRC hRsrc );
|
|
||||||
|
|
||||||
#endif /* WINELIB */
|
#endif /* WINELIB */
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ typedef struct tagQMSG
|
||||||
|
|
||||||
typedef struct tagMESSAGEQUEUE
|
typedef struct tagMESSAGEQUEUE
|
||||||
{
|
{
|
||||||
WORD next; /* 00 Next queue */
|
HANDLE next; /* 00 Next queue */
|
||||||
HTASK hTask; /* 02 hTask owning the queue */
|
HTASK hTask; /* 02 hTask owning the queue */
|
||||||
WORD msgSize; /* 04 Size of messages in the queue */
|
WORD msgSize; /* 04 Size of messages in the queue */
|
||||||
WORD msgCount; /* 06 Number of waiting messages */
|
WORD msgCount; /* 06 Number of waiting messages */
|
||||||
|
|
|
@ -113,7 +113,7 @@ extern BOOL MODULE_Init(void);
|
||||||
extern int MODULE_OpenFile( HMODULE hModule );
|
extern int MODULE_OpenFile( HMODULE hModule );
|
||||||
extern LPSTR MODULE_GetModuleName( HMODULE hModule );
|
extern LPSTR MODULE_GetModuleName( HMODULE hModule );
|
||||||
extern WORD MODULE_GetOrdinal( HMODULE hModule, char *name );
|
extern WORD MODULE_GetOrdinal( HMODULE hModule, char *name );
|
||||||
extern DWORD MODULE_GetEntryPoint( HMODULE hModule, WORD ordinal );
|
extern SEGPTR MODULE_GetEntryPoint( HMODULE hModule, WORD ordinal );
|
||||||
extern BOOL MODULE_SetEntryPoint( HMODULE hModule, WORD ordinal, WORD offset );
|
extern BOOL MODULE_SetEntryPoint( HMODULE hModule, WORD ordinal, WORD offset );
|
||||||
extern LPSTR MODULE_GetEntryPointName( HMODULE hModule, WORD ordinal );
|
extern LPSTR MODULE_GetEntryPointName( HMODULE hModule, WORD ordinal );
|
||||||
|
|
||||||
|
|
|
@ -9,22 +9,33 @@
|
||||||
|
|
||||||
#include "wintypes.h"
|
#include "wintypes.h"
|
||||||
|
|
||||||
extern int NE_AccessResource( HMODULE hModule, HRSRC hRsrc );
|
|
||||||
extern BOOL NE_FreeResource( HMODULE hModule, HGLOBAL handle );
|
|
||||||
extern HRSRC NE_FindResource( HMODULE hModule, SEGPTR typeId, SEGPTR resId );
|
|
||||||
extern DWORD NE_SizeofResource( HMODULE hModule, HRSRC hRsrc );
|
|
||||||
extern SEGPTR NE_LockResource( HMODULE hModule, HGLOBAL handle );
|
|
||||||
extern HGLOBAL NE_AllocResource( HMODULE hModule, HRSRC hRsrc, DWORD size );
|
|
||||||
extern HGLOBAL NE_LoadResource( HMODULE hModule, HRSRC hRsrc );
|
|
||||||
|
|
||||||
struct resource
|
struct resource
|
||||||
{
|
{
|
||||||
int id,type;
|
int id;
|
||||||
char *name;
|
int type;
|
||||||
unsigned char* bytes;
|
const char *name;
|
||||||
unsigned size;
|
const unsigned char* bytes;
|
||||||
|
unsigned size;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Built-in resources */
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
SYSRES_MENU_SYSMENU,
|
||||||
|
SYSRES_DIALOG_MSGBOX,
|
||||||
|
SYSRES_DIALOG_SHELL_ABOUT_MSGBOX,
|
||||||
|
SYSRES_DIALOG_OPEN_FILE,
|
||||||
|
SYSRES_DIALOG_SAVE_FILE,
|
||||||
|
SYSRES_DIALOG_PRINT,
|
||||||
|
SYSRES_DIALOG_PRINT_SETUP,
|
||||||
|
SYSRES_DIALOG_CHOOSE_FONT,
|
||||||
|
SYSRES_DIALOG_CHOOSE_COLOR,
|
||||||
|
SYSRES_DIALOG_FIND_TEXT,
|
||||||
|
SYSRES_DIALOG_REPLACE_TEXT
|
||||||
|
} SYSTEM_RESOURCE;
|
||||||
|
|
||||||
|
extern void LIBRES_RegisterResources(const struct resource* const * Res);
|
||||||
|
|
||||||
#if defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ >= 7)
|
#if defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ >= 7)
|
||||||
#define WINE_CONSTRUCTOR __attribute__((constructor))
|
#define WINE_CONSTRUCTOR __attribute__((constructor))
|
||||||
#define HAVE_WINE_CONSTRUCTOR
|
#define HAVE_WINE_CONSTRUCTOR
|
||||||
|
@ -32,4 +43,15 @@ struct resource
|
||||||
#define WINE_CONSTRUCTOR
|
#define WINE_CONSTRUCTOR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern int NE_AccessResource( HMODULE hModule, HRSRC hRsrc );
|
||||||
|
extern BOOL NE_FreeResource( HMODULE hModule, HGLOBAL handle );
|
||||||
|
extern HRSRC NE_FindResource( HMODULE hModule, SEGPTR typeId, SEGPTR resId );
|
||||||
|
extern DWORD NE_SizeofResource( HMODULE hModule, HRSRC hRsrc );
|
||||||
|
extern SEGPTR NE_LockResource( HMODULE hModule, HGLOBAL handle );
|
||||||
|
extern HGLOBAL NE_AllocResource( HMODULE hModule, HRSRC hRsrc, DWORD size );
|
||||||
|
extern HGLOBAL NE_LoadResource( HMODULE hModule, HRSRC hRsrc );
|
||||||
|
|
||||||
|
extern HANDLE SYSRES_LoadResource( SYSTEM_RESOURCE id );
|
||||||
|
extern void SYSRES_FreeResource( HANDLE handle );
|
||||||
|
|
||||||
#endif /* __WINE_RESOURCE_H */
|
#endif /* __WINE_RESOURCE_H */
|
||||||
|
|
|
@ -10,9 +10,10 @@
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
#include "ldt.h"
|
#include "ldt.h"
|
||||||
|
|
||||||
extern WORD SELECTOR_AllocBlock( void *base, DWORD size, enum seg_type type,
|
extern WORD SELECTOR_AllocBlock( const void *base, DWORD size,
|
||||||
BOOL is32bit, BOOL readonly );
|
enum seg_type type, BOOL is32bit,
|
||||||
extern WORD SELECTOR_ReallocBlock( WORD sel, void *base, DWORD size,
|
BOOL readonly );
|
||||||
|
extern WORD SELECTOR_ReallocBlock( WORD sel, const void *base, DWORD size,
|
||||||
enum seg_type type, BOOL is32bit,
|
enum seg_type type, BOOL is32bit,
|
||||||
BOOL readonly );
|
BOOL readonly );
|
||||||
|
|
||||||
|
|
|
@ -7,15 +7,15 @@ extern void SHELL_LoadRegistry();
|
||||||
extern void SHELL_SaveRegistry();
|
extern void SHELL_SaveRegistry();
|
||||||
extern BOOL SHELL_Init();
|
extern BOOL SHELL_Init();
|
||||||
|
|
||||||
#define ERROR_SUCCESS 0L
|
#define SHELL_ERROR_SUCCESS 0L
|
||||||
#define ERROR_BADDB 1L
|
#define SHELL_ERROR_BADDB 1L
|
||||||
#define ERROR_BADKEY 2L
|
#define SHELL_ERROR_BADKEY 2L
|
||||||
#define ERROR_CANTOPEN 3L
|
#define SHELL_ERROR_CANTOPEN 3L
|
||||||
#define ERROR_CANTREAD 4L
|
#define SHELL_ERROR_CANTREAD 4L
|
||||||
#define ERROR_CANTWRITE 5L
|
#define SHELL_ERROR_CANTWRITE 5L
|
||||||
#define ERROR_OUTOFMEMORY 6L
|
#define SHELL_ERROR_OUTOFMEMORY 6L
|
||||||
#define ERROR_INVALID_PARAMETER 7L
|
#define SHELL_ERROR_INVALID_PARAMETER 7L
|
||||||
#define ERROR_ACCESS_DENIED 8L
|
#define SHELL_ERROR_ACCESS_DENIED 8L
|
||||||
|
|
||||||
#define REG_SZ 1 /* string type */
|
#define REG_SZ 1 /* string type */
|
||||||
|
|
||||||
|
|
|
@ -1104,7 +1104,11 @@ typedef OFSTRUCT *LPOFSTRUCT;
|
||||||
#define ONE5STOPBITS 1
|
#define ONE5STOPBITS 1
|
||||||
#define TWOSTOPBITS 2
|
#define TWOSTOPBITS 2
|
||||||
#define IGNORE 0
|
#define IGNORE 0
|
||||||
|
#ifdef WINELIB32
|
||||||
|
#define INFINITE 0xFFFFFFFF
|
||||||
|
#else
|
||||||
#define INFINITE 0xFFFF
|
#define INFINITE 0xFFFF
|
||||||
|
#endif
|
||||||
|
|
||||||
#define CE_RXOVER 0x0001
|
#define CE_RXOVER 0x0001
|
||||||
#define CE_OVERRUN 0x0002
|
#define CE_OVERRUN 0x0002
|
||||||
|
@ -2273,7 +2277,6 @@ typedef COMPAREITEMSTRUCT FAR* LPCOMPAREITEMSTRUCT;
|
||||||
#define LMEM_ZEROINIT 0x0040
|
#define LMEM_ZEROINIT 0x0040
|
||||||
#define LMEM_MODIFY 0x0080
|
#define LMEM_MODIFY 0x0080
|
||||||
#define LMEM_DISCARDABLE 0x0F00
|
#define LMEM_DISCARDABLE 0x0F00
|
||||||
#define LMEM_WINE_ALIGN 0x1000
|
|
||||||
|
|
||||||
#define GMEM_FIXED 0x0000
|
#define GMEM_FIXED 0x0000
|
||||||
#define GMEM_MOVEABLE 0x0002
|
#define GMEM_MOVEABLE 0x0002
|
||||||
|
@ -2510,6 +2513,18 @@ typedef struct
|
||||||
#define DBF_APPLICATION 0x0008
|
#define DBF_APPLICATION 0x0008
|
||||||
#define DBF_DRIVER 0x0010
|
#define DBF_DRIVER 0x0010
|
||||||
|
|
||||||
|
/* Win32-specific structures */
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
WORD wYear;
|
||||||
|
WORD wMonth;
|
||||||
|
WORD wDayOfWeek;
|
||||||
|
WORD wDay;
|
||||||
|
WORD wHour;
|
||||||
|
WORD wMinute;
|
||||||
|
WORD wSecond;
|
||||||
|
WORD wMilliseconds;
|
||||||
|
} SYSTEMTIME, *LPSYSTEMTIME;
|
||||||
|
|
||||||
#ifndef WINELIB
|
#ifndef WINELIB
|
||||||
#pragma pack(4)
|
#pragma pack(4)
|
||||||
|
@ -2657,7 +2672,7 @@ BOOL EnumChildWindows(HWND,FARPROC,LONG);
|
||||||
WORD EnumClipboardFormats(WORD);
|
WORD EnumClipboardFormats(WORD);
|
||||||
int EnumFonts(HDC,LPSTR,FARPROC,LPSTR);
|
int EnumFonts(HDC,LPSTR,FARPROC,LPSTR);
|
||||||
BOOL EnumMetaFile(HDC,LOCALHANDLE,FARPROC,BYTE*);
|
BOOL EnumMetaFile(HDC,LOCALHANDLE,FARPROC,BYTE*);
|
||||||
int EnumObjects(HDC,int,FARPROC,LPSTR);
|
int EnumObjects(HDC,int,FARPROC,LPARAM);
|
||||||
int EnumProps(HWND,FARPROC);
|
int EnumProps(HWND,FARPROC);
|
||||||
BOOL EnumTaskWindows(HANDLE,FARPROC,LONG);
|
BOOL EnumTaskWindows(HANDLE,FARPROC,LONG);
|
||||||
BOOL EnumWindows(FARPROC,LONG);
|
BOOL EnumWindows(FARPROC,LONG);
|
||||||
|
@ -2762,10 +2777,11 @@ int GetKeyState(int);
|
||||||
void GetKeyboardState(BYTE*);
|
void GetKeyboardState(BYTE*);
|
||||||
int GetKeyboardType(int);
|
int GetKeyboardType(int);
|
||||||
HWND GetLastActivePopup(HWND);
|
HWND GetLastActivePopup(HWND);
|
||||||
|
VOID GetLocalTime(LPSYSTEMTIME); /* Win32 */
|
||||||
WORD GetMapMode(HDC);
|
WORD GetMapMode(HDC);
|
||||||
HMENU GetMenu(HWND);
|
HMENU GetMenu(HWND);
|
||||||
DWORD GetMenuCheckMarkDimensions(void);
|
DWORD GetMenuCheckMarkDimensions(void);
|
||||||
WORD GetMenuItemCount(HMENU);
|
INT GetMenuItemCount(HMENU);
|
||||||
UINT GetMenuItemID(HMENU,int);
|
UINT GetMenuItemID(HMENU,int);
|
||||||
UINT GetMenuState(HMENU,UINT,UINT);
|
UINT GetMenuState(HMENU,UINT,UINT);
|
||||||
int GetMenuString(HMENU,UINT,LPSTR,short,UINT);
|
int GetMenuString(HMENU,UINT,LPSTR,short,UINT);
|
||||||
|
@ -2815,6 +2831,7 @@ HMENU GetSystemMenu(HWND,BOOL);
|
||||||
int GetSystemMetrics(WORD);
|
int GetSystemMetrics(WORD);
|
||||||
WORD GetSystemPaletteEntries(HDC,WORD,WORD,LPPALETTEENTRY);
|
WORD GetSystemPaletteEntries(HDC,WORD,WORD,LPPALETTEENTRY);
|
||||||
WORD GetSystemPaletteUse(HDC);
|
WORD GetSystemPaletteUse(HDC);
|
||||||
|
VOID GetSystemTime(LPSYSTEMTIME); /* Win32 */
|
||||||
DWORD GetTabbedTextExtent(HDC,LPSTR,int,int,LPINT);
|
DWORD GetTabbedTextExtent(HDC,LPSTR,int,int,LPINT);
|
||||||
HINSTANCE GetTaskDS(void);
|
HINSTANCE GetTaskDS(void);
|
||||||
HGLOBAL GetTaskQueue(HTASK);
|
HGLOBAL GetTaskQueue(HTASK);
|
||||||
|
@ -3143,6 +3160,7 @@ void ShowOwnedPopups(HWND,BOOL);
|
||||||
void ShowScrollBar(HWND,WORD,BOOL);
|
void ShowScrollBar(HWND,WORD,BOOL);
|
||||||
BOOL ShowWindow(HWND,int);
|
BOOL ShowWindow(HWND,int);
|
||||||
DWORD SizeofResource(HINSTANCE,HRSRC);
|
DWORD SizeofResource(HINSTANCE,HRSRC);
|
||||||
|
VOID Sleep(DWORD); /* Win32 */
|
||||||
int StartSound(void);
|
int StartSound(void);
|
||||||
int StopSound(void);
|
int StopSound(void);
|
||||||
BOOL StretchBlt(HDC,short,short,short,short,HDC,short,short,short,short,DWORD);
|
BOOL StretchBlt(HDC,short,short,short,short,HDC,short,short,short,short,DWORD);
|
||||||
|
|
|
@ -28,7 +28,7 @@ typedef struct
|
||||||
|
|
||||||
extern void WINPOS_FindIconPos( HWND hwnd );
|
extern void WINPOS_FindIconPos( HWND hwnd );
|
||||||
extern BOOL WINPOS_SetActiveWindow( HWND hWnd, BOOL fMouse, BOOL fChangeFocus);
|
extern BOOL WINPOS_SetActiveWindow( HWND hWnd, BOOL fMouse, BOOL fChangeFocus);
|
||||||
extern HWND WINPOS_ChangeActiveWindow( HWND hwnd, BOOL mouseMsg );
|
extern BOOL WINPOS_ChangeActiveWindow( HWND hwnd, BOOL mouseMsg );
|
||||||
extern LONG WINPOS_SendNCCalcSize( HWND hwnd, BOOL calcValidRect,
|
extern LONG WINPOS_SendNCCalcSize( HWND hwnd, BOOL calcValidRect,
|
||||||
RECT *newWindowRect, RECT *oldWindowRect,
|
RECT *newWindowRect, RECT *oldWindowRect,
|
||||||
RECT *oldClientRect, WINDOWPOS *winpos,
|
RECT *oldClientRect, WINDOWPOS *winpos,
|
||||||
|
|
|
@ -34,6 +34,7 @@ typedef void* NPVOID;
|
||||||
typedef void* SEGPTR;
|
typedef void* SEGPTR;
|
||||||
#define UIFMT "%u"
|
#define UIFMT "%u"
|
||||||
#define NPFMT "%p"
|
#define NPFMT "%p"
|
||||||
|
#define SPFMT "%p"
|
||||||
#else
|
#else
|
||||||
typedef short INT;
|
typedef short INT;
|
||||||
typedef unsigned short UINT;
|
typedef unsigned short UINT;
|
||||||
|
@ -42,13 +43,15 @@ typedef WORD HANDLE;
|
||||||
typedef WORD NPVOID;
|
typedef WORD NPVOID;
|
||||||
typedef DWORD SEGPTR;
|
typedef DWORD SEGPTR;
|
||||||
#define UIFMT "%hu"
|
#define UIFMT "%hu"
|
||||||
#define NPFMT "%04X"
|
#define NPFMT "%04x"
|
||||||
|
#define SPFMT "%08lx"
|
||||||
#endif
|
#endif
|
||||||
typedef LONG LPARAM;
|
typedef LONG LPARAM;
|
||||||
typedef LONG LRESULT;
|
typedef LONG LRESULT;
|
||||||
typedef DWORD HHOOK;
|
typedef DWORD HHOOK;
|
||||||
typedef char *LPSTR;
|
typedef char *LPSTR;
|
||||||
typedef const char *LPCSTR;
|
typedef const char *LPCSTR;
|
||||||
|
typedef LPCSTR LPCTSTR;
|
||||||
typedef char *NPSTR;
|
typedef char *NPSTR;
|
||||||
typedef INT *LPINT;
|
typedef INT *LPINT;
|
||||||
typedef UINT *LPUINT;
|
typedef UINT *LPUINT;
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
TOPSRC = @top_srcdir@
|
||||||
|
MODULE = library
|
||||||
|
|
||||||
|
C_SRCS = \
|
||||||
|
atom.c \
|
||||||
|
arch.c \
|
||||||
|
heap.c \
|
||||||
|
libres.c \
|
||||||
|
miscstubs.c \
|
||||||
|
sup.c \
|
||||||
|
winmain.c
|
||||||
|
|
||||||
|
all: $(MODULE).o
|
||||||
|
|
||||||
|
@MAKE_RULES@
|
||||||
|
|
||||||
|
### Dependencies:
|
|
@ -79,11 +79,8 @@ HANDLE LocalAlloc (WORD flags, WORD bytes)
|
||||||
HANDLE hMem;
|
HANDLE hMem;
|
||||||
|
|
||||||
slot = HEAP_GetFreeSlot (&hMem);
|
slot = HEAP_GetFreeSlot (&hMem);
|
||||||
if (flags & LMEM_WINE_ALIGN)
|
if ((m = malloc (bytes)))
|
||||||
m = memalign (4, bytes);
|
{
|
||||||
else
|
|
||||||
m = malloc (bytes);
|
|
||||||
if (m){
|
|
||||||
*slot = m;
|
*slot = m;
|
||||||
if (flags & LMEM_ZEROINIT)
|
if (flags & LMEM_ZEROINIT)
|
||||||
bzero (m, bytes);
|
bzero (m, bytes);
|
||||||
|
@ -221,11 +218,8 @@ HANDLE HEAP_Alloc (WORD flags, DWORD bytes)
|
||||||
HeapData* m;
|
HeapData* m;
|
||||||
|
|
||||||
bytes+=sizeof(HeapData);
|
bytes+=sizeof(HeapData);
|
||||||
if (flags & LMEM_WINE_ALIGN)
|
if ((m = malloc (bytes)))
|
||||||
m = memalign (4, bytes);
|
{
|
||||||
else
|
|
||||||
m = malloc (bytes);
|
|
||||||
if (m){
|
|
||||||
if (flags & LMEM_ZEROINIT)
|
if (flags & LMEM_ZEROINIT)
|
||||||
bzero (m, bytes);
|
bzero (m, bytes);
|
||||||
}
|
}
|
|
@ -7,29 +7,26 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "libres.h"
|
#include "libres.h"
|
||||||
|
#include "windows.h"
|
||||||
|
#include "xmalloc.h"
|
||||||
|
|
||||||
typedef struct RLE
|
typedef struct RLE
|
||||||
{
|
{
|
||||||
struct resource** Resources; /* NULL-terminated array of pointers */
|
const struct resource* const * Resources; /* NULL-terminated array of pointers */
|
||||||
struct RLE* next;
|
struct RLE* next;
|
||||||
} ResListE;
|
} ResListE;
|
||||||
|
|
||||||
static ResListE* ResourceList=NULL;
|
static ResListE* ResourceList=NULL;
|
||||||
|
|
||||||
void LIBRES_RegisterResources(struct resource** Res)
|
void LIBRES_RegisterResources(const struct resource* const * Res)
|
||||||
{
|
{
|
||||||
ResListE** Curr;
|
ResListE** Curr;
|
||||||
ResListE* n;
|
ResListE* n;
|
||||||
for(Curr=&ResourceList; *Curr; Curr=&((*Curr)->next)) { }
|
for(Curr=&ResourceList; *Curr; Curr=&((*Curr)->next)) { }
|
||||||
n=xmalloc(sizeof(ResListE));
|
n=xmalloc(sizeof(ResListE));
|
||||||
if(n)
|
n->Resources=Res;
|
||||||
{
|
n->next=NULL;
|
||||||
n->Resources=Res;
|
*Curr=n;
|
||||||
n->next=NULL;
|
|
||||||
*Curr=n;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
fprintf(stderr,"LIBRES_RegisterResources(): Out of memory.\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
|
@ -39,7 +36,7 @@ HRSRC LIBRES_FindResource( HINSTANCE hModule, LPCSTR name, LPCSTR type )
|
||||||
{
|
{
|
||||||
int nameid=0,typeid;
|
int nameid=0,typeid;
|
||||||
ResListE* ResBlock;
|
ResListE* ResBlock;
|
||||||
struct resource** Res;
|
const struct resource* const * Res;
|
||||||
|
|
||||||
if(HIWORD(name))
|
if(HIWORD(name))
|
||||||
{
|
{
|
|
@ -109,13 +109,13 @@ HGLOBAL GLOBAL_Alloc( WORD flags, DWORD size, HGLOBAL hOwner,
|
||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
HGLOBAL GLOBAL_CreateBlock( WORD flags, void *ptr, DWORD size,
|
HGLOBAL GLOBAL_CreateBlock( WORD flags, const void *ptr, DWORD size,
|
||||||
HGLOBAL hOwner, BOOL isCode,
|
HGLOBAL hOwner, BOOL isCode,
|
||||||
BOOL is32Bit, BOOL isReadOnly,
|
BOOL is32Bit, BOOL isReadOnly,
|
||||||
SHMDATA *shmdata)
|
SHMDATA *shmdata)
|
||||||
{
|
{
|
||||||
/* fprintf(stderr,"JBP: GLOBAL_CreateBlock() faked.\n");*/
|
/* fprintf(stderr,"JBP: GLOBAL_CreateBlock() faked.\n");*/
|
||||||
return ptr;
|
return (HGLOBAL)ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL GLOBAL_FreeBlock( HGLOBAL handle )
|
BOOL GLOBAL_FreeBlock( HGLOBAL handle )
|
|
@ -0,0 +1,34 @@
|
||||||
|
TOPSRC = @top_srcdir@
|
||||||
|
MODULE = none
|
||||||
|
PROGRAMS = hello hello2 hello3 rolex
|
||||||
|
ALL_LIBS = $(WINELIB) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LDLIBS)
|
||||||
|
|
||||||
|
C_SRCS = \
|
||||||
|
hello.c \
|
||||||
|
hello2.c \
|
||||||
|
hello3.c \
|
||||||
|
hello3res.c \
|
||||||
|
rolex.c
|
||||||
|
|
||||||
|
all: check_winerc $(PROGRAMS)
|
||||||
|
|
||||||
|
@MAKE_RULES@
|
||||||
|
|
||||||
|
hello: hello.o $(WINELIB)
|
||||||
|
$(CC) -o hello hello.o $(LDOPTIONS) $(ALL_LIBS)
|
||||||
|
|
||||||
|
hello2: hello2.o $(WINELIB)
|
||||||
|
$(CC) -o hello2 hello2.o $(LDOPTIONS) $(ALL_LIBS)
|
||||||
|
|
||||||
|
hello3: hello3res.o hello3.o $(WINELIB)
|
||||||
|
$(CC) -o hello3 hello3.o hello3res.o $(LDOPTIONS) $(ALL_LIBS)
|
||||||
|
|
||||||
|
rolex: rolex.o $(WINELIB)
|
||||||
|
$(CC) -o rolex rolex.o $(LDOPTIONS) $(ALL_LIBS)
|
||||||
|
|
||||||
|
clean::
|
||||||
|
$(RM) hello hello2 hello3 hello3res.c hello3res.h rolex
|
||||||
|
|
||||||
|
hello3res.c hello3res.h: $(WINERC)
|
||||||
|
|
||||||
|
### Dependencies:
|
|
@ -0,0 +1,8 @@
|
||||||
|
Windows clock application for WINE (by Jim Peterson)
|
||||||
|
|
||||||
|
This is a translation of a Turbo Pascal OWL application I made once,
|
||||||
|
so it's a little flaky (tons of globals, functions that could have
|
||||||
|
been in-lined, etc.). The file rolex.exe is a Win32 application
|
||||||
|
compiled using this source code and Borland C++ 4.0.
|
||||||
|
|
||||||
|
To try it out, type 'make rolex' or 'wine ./rolex.exe' (which fails).
|
|
@ -33,12 +33,12 @@ LRESULT WndProc (HWND wnd, UINT msg, WPARAM w, LPARAM l)
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
switch(w){
|
switch(w){
|
||||||
case 100:
|
case 100:
|
||||||
CreateDialogIndirect(0,hello3_DIALOG_DIADEMO.bytes,wnd,(WNDPROC)DlgProc);
|
CreateDialogIndirect(0,hello3res_DIALOG_DIADEMO.bytes,wnd,(WNDPROC)DlgProc);
|
||||||
return 0;
|
return 0;
|
||||||
case 101:
|
case 101:
|
||||||
{
|
{
|
||||||
BITMAPINFO *bm=hello3_BITMAP_BITDEMO.bytes;
|
BITMAPINFO *bm=(BITMAPINFO*)hello3res_BITMAP_BITDEMO.bytes;
|
||||||
char *bits=bm;
|
char *bits=(char*)bm;
|
||||||
HDC hdc=GetDC(wnd);
|
HDC hdc=GetDC(wnd);
|
||||||
bits+=bm->bmiHeader.biSize;
|
bits+=bm->bmiHeader.biSize;
|
||||||
bits+=(1<<bm->bmiHeader.biBitCount)*sizeof(RGBQUAD);
|
bits+=(1<<bm->bmiHeader.biBitCount)*sizeof(RGBQUAD);
|
|
@ -0,0 +1,241 @@
|
||||||
|
#include <math.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include "windows.h"
|
||||||
|
|
||||||
|
char* AppName = "Rolex";
|
||||||
|
char* WindowName = "Rolex";
|
||||||
|
int WindowWidth = 100;
|
||||||
|
int WindowHeight = 121;
|
||||||
|
COLORREF FaceColor = RGB(192,192,192);
|
||||||
|
COLORREF HandColor = RGB(0,0,0);
|
||||||
|
COLORREF EtchColor = RGB(0,0,0);
|
||||||
|
|
||||||
|
float Pi=3.1415926;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
int StartX,StartY,EndX,EndY;
|
||||||
|
} HandData;
|
||||||
|
|
||||||
|
int MaxX,MaxY;
|
||||||
|
HandData OldSecond,OldHour,OldMinute;
|
||||||
|
|
||||||
|
HWND HWindow;
|
||||||
|
|
||||||
|
void DrawFace(HDC dc)
|
||||||
|
{
|
||||||
|
int MidX, MidY, t;
|
||||||
|
|
||||||
|
MidX=MaxX/2;
|
||||||
|
MidY=MaxY/2;
|
||||||
|
SelectObject(dc,CreateSolidBrush(FaceColor));
|
||||||
|
SelectObject(dc,CreatePen(PS_SOLID,1,EtchColor));
|
||||||
|
Ellipse(dc,0,0,MaxX,MaxY);
|
||||||
|
|
||||||
|
for(t=0; t<12; t++)
|
||||||
|
{
|
||||||
|
MoveToEx(dc,MidX+sin(t*Pi/6)*0.9*MidX,MidY-cos(t*Pi/6)*0.9*MidY,NULL);
|
||||||
|
LineTo(dc,MidX+sin(t*Pi/6)*0.8*MidX,MidY-cos(t*Pi/6)*0.8*MidY);
|
||||||
|
}
|
||||||
|
if(MaxX>64 && MaxY>64)
|
||||||
|
for(t=0; t<60; t++)
|
||||||
|
SetPixel(dc,MidX+sin(t*Pi/30)*0.9*MidX,MidY-cos(t*Pi/30)*0.9*MidY
|
||||||
|
,EtchColor);
|
||||||
|
DeleteObject(SelectObject(dc,GetStockObject(NULL_BRUSH)));
|
||||||
|
DeleteObject(SelectObject(dc,GetStockObject(NULL_PEN)));
|
||||||
|
memset(&OldSecond,0,sizeof(OldSecond));
|
||||||
|
memset(&OldMinute,0,sizeof(OldMinute));
|
||||||
|
memset(&OldHour,0,sizeof(OldHour));
|
||||||
|
}
|
||||||
|
|
||||||
|
void DrawHourHand(HDC dc)
|
||||||
|
{
|
||||||
|
MoveToEx(dc, OldHour.StartX, OldHour.StartY, NULL);
|
||||||
|
LineTo(dc, OldHour.EndX, OldHour.EndY);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DrawMinuteHand(HDC dc)
|
||||||
|
{
|
||||||
|
MoveToEx(dc, OldMinute.StartX, OldMinute.StartY, NULL);
|
||||||
|
LineTo(dc, OldMinute.EndX, OldMinute.EndY);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DrawSecondHand(HDC dc)
|
||||||
|
{
|
||||||
|
MoveToEx(dc, OldSecond.StartX, OldSecond.StartY, NULL);
|
||||||
|
LineTo(dc, OldSecond.EndX, OldSecond.EndY);
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL UpdateHourHand(HDC dc,int MidX,int MidY,int XExt,int YExt,WORD Pos)
|
||||||
|
{
|
||||||
|
int Sx, Sy, Ex, Ey;
|
||||||
|
BOOL rv;
|
||||||
|
|
||||||
|
rv = FALSE;
|
||||||
|
Sx = MidX; Sy = MidY;
|
||||||
|
Ex = MidX+sin(Pos*Pi/6000)*XExt;
|
||||||
|
Ey = MidY-cos(Pos*Pi/6000)*YExt;
|
||||||
|
rv = ( Sx!=OldHour.StartX || Ex!=OldHour.EndX ||
|
||||||
|
Sy!=OldHour.StartY || Ey!=OldHour.EndY );
|
||||||
|
if(rv)DrawHourHand(dc);
|
||||||
|
OldHour.StartX = Sx; OldHour.EndX = Ex;
|
||||||
|
OldHour.StartY = Sy; OldHour.EndY = Ey;
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL UpdateMinuteHand(HDC dc,int MidX,int MidY,int XExt,int YExt,WORD Pos)
|
||||||
|
{
|
||||||
|
int Sx, Sy, Ex, Ey;
|
||||||
|
BOOL rv;
|
||||||
|
|
||||||
|
rv = FALSE;
|
||||||
|
Sx = MidX; Sy = MidY;
|
||||||
|
Ex = MidX+sin(Pos*Pi/30000)*XExt;
|
||||||
|
Ey = MidY-cos(Pos*Pi/30000)*YExt;
|
||||||
|
rv = ( Sx!=OldMinute.StartX || Ex!=OldMinute.EndX ||
|
||||||
|
Sy!=OldMinute.StartY || Ey!=OldMinute.EndY );
|
||||||
|
if(rv)DrawMinuteHand(dc);
|
||||||
|
OldMinute.StartX = Sx; OldMinute.EndX = Ex;
|
||||||
|
OldMinute.StartY = Sy; OldMinute.EndY = Ey;
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL UpdateSecondHand(HDC dc,int MidX,int MidY,int XExt,int YExt,WORD Pos)
|
||||||
|
{
|
||||||
|
int Sx, Sy, Ex, Ey;
|
||||||
|
BOOL rv;
|
||||||
|
|
||||||
|
rv = FALSE;
|
||||||
|
Sx = MidX; Sy = MidY;
|
||||||
|
Ex = MidX+sin(Pos*Pi/3000)*XExt;
|
||||||
|
Ey = MidY-cos(Pos*Pi/3000)*YExt;
|
||||||
|
rv = ( Sx!=OldSecond.StartX || Ex!=OldSecond.EndX ||
|
||||||
|
Sy!=OldSecond.StartY || Ey!=OldSecond.EndY );
|
||||||
|
if(rv)DrawSecondHand(dc);
|
||||||
|
OldSecond.StartX = Sx; OldSecond.EndX = Ex;
|
||||||
|
OldSecond.StartY = Sy; OldSecond.EndY = Ey;
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Idle(HDC idc)
|
||||||
|
{
|
||||||
|
SYSTEMTIME st;
|
||||||
|
WORD H, M, S, F;
|
||||||
|
int MidX, MidY;
|
||||||
|
HDC dc;
|
||||||
|
BOOL Redraw;
|
||||||
|
|
||||||
|
if(idc)
|
||||||
|
dc=idc;
|
||||||
|
else
|
||||||
|
dc=GetDC(HWindow);
|
||||||
|
if(!dc)return;
|
||||||
|
|
||||||
|
GetLocalTime(&st);
|
||||||
|
H = st.wHour;
|
||||||
|
M = st.wMinute;
|
||||||
|
S = st.wSecond;
|
||||||
|
F = st.wMilliseconds / 10;
|
||||||
|
F = F + S*100;
|
||||||
|
M = M*1000+F/6;
|
||||||
|
H = H*1000+M/60;
|
||||||
|
MidX = MaxX/2;
|
||||||
|
MidY = MaxY/2;
|
||||||
|
SelectObject(dc,CreatePen(PS_SOLID,1,FaceColor));
|
||||||
|
Redraw = FALSE;
|
||||||
|
if(UpdateHourHand(dc,MidX,MidY,MidX*0.5,MidY*0.5,H)) Redraw = TRUE;
|
||||||
|
if(UpdateMinuteHand(dc,MidX,MidY,MidX*0.65,MidY*0.65,M)) Redraw = TRUE;
|
||||||
|
if(UpdateSecondHand(dc,MidX,MidY,MidX*0.79,MidY*0.79,F)) Redraw = TRUE;
|
||||||
|
DeleteObject(SelectObject(dc,CreatePen(PS_SOLID,1,HandColor)));
|
||||||
|
if(Redraw)
|
||||||
|
{
|
||||||
|
DrawSecondHand(dc);
|
||||||
|
DrawMinuteHand(dc);
|
||||||
|
DrawHourHand(dc);
|
||||||
|
}
|
||||||
|
DeleteObject(SelectObject(dc,GetStockObject(NULL_PEN)));
|
||||||
|
if(!idc) ReleaseDC(HWindow,dc);
|
||||||
|
}
|
||||||
|
|
||||||
|
LRESULT ProcessAppMsg(HWND wnd,UINT msg,WPARAM w,LPARAM l)
|
||||||
|
{
|
||||||
|
PAINTSTRUCT PaintInfo;
|
||||||
|
HDC dc;
|
||||||
|
|
||||||
|
switch(msg)
|
||||||
|
{
|
||||||
|
case WM_PAINT:
|
||||||
|
if(GetUpdateRect(wnd,NULL,FALSE))
|
||||||
|
{
|
||||||
|
dc=BeginPaint(wnd,&PaintInfo);
|
||||||
|
DrawFace(dc);
|
||||||
|
Idle(dc);
|
||||||
|
EndPaint(wnd,&PaintInfo);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WM_SIZE:
|
||||||
|
MaxX = LOWORD(l);
|
||||||
|
MaxY = HIWORD(l);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WM_DESTROY:
|
||||||
|
PostQuitMessage (0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return DefWindowProc (wnd, msg, w, l);
|
||||||
|
}
|
||||||
|
return 0l;
|
||||||
|
}
|
||||||
|
|
||||||
|
WPARAM MessageLoop()
|
||||||
|
{
|
||||||
|
MSG msg;
|
||||||
|
|
||||||
|
while(1)
|
||||||
|
{
|
||||||
|
Sleep(1); /* sleep 1 millisecond */
|
||||||
|
if(PeekMessage(&msg,0,0,0,PM_REMOVE))
|
||||||
|
{
|
||||||
|
if(msg.message == WM_QUIT) return msg.wParam;
|
||||||
|
TranslateMessage(&msg);
|
||||||
|
DispatchMessage(&msg);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Idle(NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int PASCAL WinMain (HANDLE inst, HANDLE prev, LPSTR cmdline, int show)
|
||||||
|
{
|
||||||
|
WNDCLASS class;
|
||||||
|
if(!prev)
|
||||||
|
{
|
||||||
|
class.style = CS_HREDRAW | CS_VREDRAW;
|
||||||
|
class.lpfnWndProc = ProcessAppMsg;
|
||||||
|
class.cbClsExtra = 0;
|
||||||
|
class.cbWndExtra = 0;
|
||||||
|
class.hInstance = inst;
|
||||||
|
class.hIcon = 0; /* Draw my own icon */
|
||||||
|
class.hCursor = LoadCursor (0, IDC_ARROW);
|
||||||
|
class.hbrBackground = (HBRUSH)(COLOR_BACKGROUND + 1);
|
||||||
|
class.lpszMenuName = 0;
|
||||||
|
class.lpszClassName = AppName;
|
||||||
|
}
|
||||||
|
if (!RegisterClass (&class)) return -1;
|
||||||
|
|
||||||
|
HWindow=CreateWindowEx(WS_EX_TOPMOST,AppName,WindowName,WS_OVERLAPPEDWINDOW,
|
||||||
|
CW_USEDEFAULT,CW_USEDEFAULT,WindowWidth,WindowHeight,
|
||||||
|
0,0,inst,0);
|
||||||
|
memset(&OldSecond,0,sizeof(OldSecond));
|
||||||
|
memset(&OldMinute,0,sizeof(OldMinute));
|
||||||
|
memset(&OldHour,0,sizeof(OldHour));
|
||||||
|
MaxX = WindowWidth;
|
||||||
|
MaxY = WindowHeight;
|
||||||
|
|
||||||
|
ShowWindow (HWindow, show);
|
||||||
|
UpdateWindow (HWindow);
|
||||||
|
|
||||||
|
return MessageLoop();
|
||||||
|
}
|
|
@ -271,7 +271,9 @@ int MODULE_OpenFile( HMODULE hModule )
|
||||||
close( cachedfd );
|
close( cachedfd );
|
||||||
hCachedModule = hModule;
|
hCachedModule = hModule;
|
||||||
name = ((LOADEDFILEINFO*)((char*)pModule + pModule->fileinfo))->filename;
|
name = ((LOADEDFILEINFO*)((char*)pModule + pModule->fileinfo))->filename;
|
||||||
cachedfd = open( DOS_GetUnixFileName( name ), O_RDONLY );
|
if ((cachedfd = open( DOS_GetUnixFileName( name ), O_RDONLY )) == -1)
|
||||||
|
fprintf( stderr, "MODULE_OpenFile: can't open file '%s' for module "NPFMT"\n",
|
||||||
|
name, hModule );
|
||||||
dprintf_module( stddeb, "MODULE_OpenFile: opened '%s' -> %d\n",
|
dprintf_module( stddeb, "MODULE_OpenFile: opened '%s' -> %d\n",
|
||||||
name, cachedfd );
|
name, cachedfd );
|
||||||
return cachedfd;
|
return cachedfd;
|
||||||
|
@ -457,7 +459,7 @@ HMODULE MODULE_LoadExeHeader( int fd, OFSTRUCT *ofs )
|
||||||
|
|
||||||
hModule = GlobalAlloc( GMEM_MOVEABLE | GMEM_ZEROINIT, size );
|
hModule = GlobalAlloc( GMEM_MOVEABLE | GMEM_ZEROINIT, size );
|
||||||
if (!hModule) return (HMODULE)11; /* invalid exe */
|
if (!hModule) return (HMODULE)11; /* invalid exe */
|
||||||
FarSetOwner( hModule, hModule );
|
FarSetOwner( hModule, (WORD)(DWORD)hModule );
|
||||||
pModule = (NE_MODULE *)GlobalLock( hModule );
|
pModule = (NE_MODULE *)GlobalLock( hModule );
|
||||||
memcpy( pModule, &ne_header, sizeof(NE_MODULE) );
|
memcpy( pModule, &ne_header, sizeof(NE_MODULE) );
|
||||||
pModule->count = 0;
|
pModule->count = 0;
|
||||||
|
@ -666,7 +668,7 @@ WORD MODULE_GetOrdinal( HMODULE hModule, char *name )
|
||||||
*
|
*
|
||||||
* Return the entry point for a given ordinal.
|
* Return the entry point for a given ordinal.
|
||||||
*/
|
*/
|
||||||
DWORD MODULE_GetEntryPoint( HMODULE hModule, WORD ordinal )
|
SEGPTR MODULE_GetEntryPoint( HMODULE hModule, WORD ordinal )
|
||||||
{
|
{
|
||||||
NE_MODULE *pModule;
|
NE_MODULE *pModule;
|
||||||
WORD curOrdinal = 1;
|
WORD curOrdinal = 1;
|
||||||
|
@ -706,8 +708,8 @@ DWORD MODULE_GetEntryPoint( HMODULE hModule, WORD ordinal )
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sel == 0xfe) sel = 0xffff; /* constant entry */
|
if (sel == 0xfe) sel = 0xffff; /* constant entry */
|
||||||
else sel = (WORD)NE_SEG_TABLE(pModule)[sel-1].selector;
|
else sel = (WORD)(DWORD)NE_SEG_TABLE(pModule)[sel-1].selector;
|
||||||
return MAKELONG( offset, sel );
|
return (SEGPTR)MAKELONG( offset, sel );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -884,7 +886,7 @@ static void MODULE_FreeModule( HMODULE hModule )
|
||||||
|
|
||||||
/* Free the referenced modules */
|
/* Free the referenced modules */
|
||||||
|
|
||||||
pModRef = NE_MODULE_TABLE( pModule );
|
pModRef = (HMODULE*)NE_MODULE_TABLE( pModule );
|
||||||
for (i = 0; i < pModule->modref_count; i++, pModRef++)
|
for (i = 0; i < pModule->modref_count; i++, pModRef++)
|
||||||
{
|
{
|
||||||
FreeModule( *pModRef );
|
FreeModule( *pModRef );
|
||||||
|
@ -1268,7 +1270,11 @@ HANDLE WinExec( LPSTR lpCmdLine, WORD nCmdShow )
|
||||||
|
|
||||||
/* Now load the executable file */
|
/* Now load the executable file */
|
||||||
|
|
||||||
|
#ifdef WINELIB32
|
||||||
|
params.hEnvironment = (HANDLE)GetDOSEnvironment();
|
||||||
|
#else
|
||||||
params.hEnvironment = (HANDLE)SELECTOROF( GetDOSEnvironment() );
|
params.hEnvironment = (HANDLE)SELECTOROF( GetDOSEnvironment() );
|
||||||
|
#endif
|
||||||
params.cmdLine = (SEGPTR)WIN16_GlobalLock( cmdLineHandle );
|
params.cmdLine = (SEGPTR)WIN16_GlobalLock( cmdLineHandle );
|
||||||
params.showCmd = (SEGPTR)WIN16_GlobalLock( cmdShowHandle );
|
params.showCmd = (SEGPTR)WIN16_GlobalLock( cmdShowHandle );
|
||||||
params.reserved = 0;
|
params.reserved = 0;
|
||||||
|
@ -1328,7 +1334,7 @@ FARPROC GetProcAddress( HANDLE hModule, SEGPTR name )
|
||||||
|
|
||||||
ret = MODULE_GetEntryPoint( hModule, ordinal );
|
ret = MODULE_GetEntryPoint( hModule, ordinal );
|
||||||
|
|
||||||
dprintf_module( stddeb, "GetProcAddress: returning %08lx\n", ret );
|
dprintf_module( stddeb, "GetProcAddress: returning "SPFMT"\n", ret );
|
||||||
return (FARPROC)ret;
|
return (FARPROC)ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ static DWORD NE_FindNameTableId( HMODULE hModule, SEGPTR typeId, SEGPTR resId )
|
||||||
pTypeInfo->type_id, pNameInfo->id );
|
pTypeInfo->type_id, pNameInfo->id );
|
||||||
handle = LoadResource( hModule,
|
handle = LoadResource( hModule,
|
||||||
(HANDLE)((int)pNameInfo - (int)pModule) );
|
(HANDLE)((int)pNameInfo - (int)pModule) );
|
||||||
for(p = (WORD*)LockResource(handle); *p; p = (WORD *)((char*)p+*p))
|
for(p = (WORD*)LockResource(handle); p && *p; p = (WORD *)((char*)p+*p))
|
||||||
{
|
{
|
||||||
dprintf_resource( stddeb," type=%04x '%s' id=%04x '%s'\n",
|
dprintf_resource( stddeb," type=%04x '%s' id=%04x '%s'\n",
|
||||||
p[1], (char *)(p+3), p[2],
|
p[1], (char *)(p+3), p[2],
|
||||||
|
|
|
@ -311,6 +311,7 @@ static BOOL TASK_FreeThunk( HTASK hTask, SEGPTR thunk )
|
||||||
* 32-bit entry point for a new task. This function is responsible for
|
* 32-bit entry point for a new task. This function is responsible for
|
||||||
* setting up the registers and jumping to the 16-bit entry point.
|
* setting up the registers and jumping to the 16-bit entry point.
|
||||||
*/
|
*/
|
||||||
|
#ifndef WINELIB
|
||||||
static void TASK_CallToStart(void)
|
static void TASK_CallToStart(void)
|
||||||
{
|
{
|
||||||
int cs_reg, ds_reg, ip_reg;
|
int cs_reg, ds_reg, ip_reg;
|
||||||
|
@ -357,6 +358,7 @@ static void TASK_CallToStart(void)
|
||||||
fprintf( stderr, "TASK_CallToStart: Main program returned!\n" );
|
fprintf( stderr, "TASK_CallToStart: Main program returned!\n" );
|
||||||
TASK_KillCurrentTask( 1 );
|
TASK_KillCurrentTask( 1 );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -747,7 +749,6 @@ void InitTask( struct sigcontext_struct context )
|
||||||
|
|
||||||
#ifndef WINELIB
|
#ifndef WINELIB
|
||||||
NE_InitializeDLLs( pTask->hModule );
|
NE_InitializeDLLs( pTask->hModule );
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Registers on return are:
|
/* Registers on return are:
|
||||||
* ax 1 if OK, 0 on error
|
* ax 1 if OK, 0 on error
|
||||||
|
@ -764,6 +765,7 @@ void InitTask( struct sigcontext_struct context )
|
||||||
ESI_reg(&context) = (DWORD)pTask->hPrevInstance;
|
ESI_reg(&context) = (DWORD)pTask->hPrevInstance;
|
||||||
EDI_reg(&context) = (DWORD)pTask->hInstance;
|
EDI_reg(&context) = (DWORD)pTask->hInstance;
|
||||||
ES_reg (&context) = (WORD)pTask->hPDB;
|
ES_reg (&context) = (WORD)pTask->hPDB;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Initialize the local heap */
|
/* Initialize the local heap */
|
||||||
if ( pModule->heap_size )
|
if ( pModule->heap_size )
|
||||||
|
@ -910,7 +912,7 @@ FARPROC MakeProcInstance( FARPROC func, HANDLE hInstance )
|
||||||
if (!thunkaddr) return (FARPROC)0;
|
if (!thunkaddr) return (FARPROC)0;
|
||||||
thunk = PTR_SEG_TO_LIN( thunkaddr );
|
thunk = PTR_SEG_TO_LIN( thunkaddr );
|
||||||
|
|
||||||
dprintf_task( stddeb, "MakeProcInstance(%08lx,"NPFMT"): got thunk %08lx\n",
|
dprintf_task( stddeb, "MakeProcInstance("SPFMT","NPFMT"): got thunk "SPFMT"\n",
|
||||||
(SEGPTR)func, hInstance, (SEGPTR)thunkaddr );
|
(SEGPTR)func, hInstance, (SEGPTR)thunkaddr );
|
||||||
|
|
||||||
*thunk++ = 0xb8; /* movw instance, %ax */
|
*thunk++ = 0xb8; /* movw instance, %ax */
|
||||||
|
@ -929,7 +931,7 @@ FARPROC MakeProcInstance( FARPROC func, HANDLE hInstance )
|
||||||
*/
|
*/
|
||||||
void FreeProcInstance( FARPROC func )
|
void FreeProcInstance( FARPROC func )
|
||||||
{
|
{
|
||||||
dprintf_task( stddeb, "FreeProcInstance(%08lx)\n", (SEGPTR)func );
|
dprintf_task( stddeb, "FreeProcInstance("SPFMT")\n", (SEGPTR)func );
|
||||||
TASK_FreeThunk( hCurrentTask, (SEGPTR)func );
|
TASK_FreeThunk( hCurrentTask, (SEGPTR)func );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ void debug_handles()
|
||||||
*
|
*
|
||||||
* Create a global heap block for a fixed range of linear memory.
|
* Create a global heap block for a fixed range of linear memory.
|
||||||
*/
|
*/
|
||||||
HGLOBAL GLOBAL_CreateBlock( WORD flags, void *ptr, DWORD size,
|
HGLOBAL GLOBAL_CreateBlock( WORD flags, const void *ptr, DWORD size,
|
||||||
HGLOBAL hOwner, BOOL isCode,
|
HGLOBAL hOwner, BOOL isCode,
|
||||||
BOOL is32Bit, BOOL isReadOnly,
|
BOOL is32Bit, BOOL isReadOnly,
|
||||||
SHMDATA *shmdata )
|
SHMDATA *shmdata )
|
||||||
|
|
|
@ -98,7 +98,7 @@ WORD FreeSelector( WORD sel )
|
||||||
*
|
*
|
||||||
* Set the LDT entries for an array of selectors.
|
* Set the LDT entries for an array of selectors.
|
||||||
*/
|
*/
|
||||||
static void SELECTOR_SetEntries( WORD sel, void *base, DWORD size,
|
static void SELECTOR_SetEntries( WORD sel, const void *base, DWORD size,
|
||||||
enum seg_type type, BOOL is32bit,
|
enum seg_type type, BOOL is32bit,
|
||||||
BOOL readonly )
|
BOOL readonly )
|
||||||
{
|
{
|
||||||
|
@ -131,7 +131,7 @@ static void SELECTOR_SetEntries( WORD sel, void *base, DWORD size,
|
||||||
*
|
*
|
||||||
* Allocate selectors for a block of linear memory.
|
* Allocate selectors for a block of linear memory.
|
||||||
*/
|
*/
|
||||||
WORD SELECTOR_AllocBlock( void *base, DWORD size, enum seg_type type,
|
WORD SELECTOR_AllocBlock( const void *base, DWORD size, enum seg_type type,
|
||||||
BOOL is32bit, BOOL readonly )
|
BOOL is32bit, BOOL readonly )
|
||||||
{
|
{
|
||||||
WORD sel, count;
|
WORD sel, count;
|
||||||
|
@ -149,7 +149,7 @@ WORD SELECTOR_AllocBlock( void *base, DWORD size, enum seg_type type,
|
||||||
*
|
*
|
||||||
* Change the size of a block of selectors.
|
* Change the size of a block of selectors.
|
||||||
*/
|
*/
|
||||||
WORD SELECTOR_ReallocBlock( WORD sel, void *base, DWORD size,
|
WORD SELECTOR_ReallocBlock( WORD sel, const void *base, DWORD size,
|
||||||
enum seg_type type, BOOL is32bit, BOOL readonly )
|
enum seg_type type, BOOL is32bit, BOOL readonly )
|
||||||
{
|
{
|
||||||
WORD i, oldcount, newcount;
|
WORD i, oldcount, newcount;
|
||||||
|
|
|
@ -31,13 +31,7 @@ C_SRCS = \
|
||||||
winsocket.c \
|
winsocket.c \
|
||||||
xmalloc.c
|
xmalloc.c
|
||||||
|
|
||||||
all: checkrc $(MODULE).o
|
all: $(MODULE).o
|
||||||
|
|
||||||
checkrc: dummy
|
|
||||||
cd $(TOPSRC)/rc; $(MAKE) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'DEFS=$(DEFS)' 'LANG=$(LANG)'
|
|
||||||
|
|
||||||
langclean::
|
|
||||||
$(RM) ole2nls.o
|
|
||||||
|
|
||||||
@MAKE_RULES@
|
@MAKE_RULES@
|
||||||
|
|
||||||
|
|
|
@ -9,12 +9,11 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "win.h"
|
#include "win.h"
|
||||||
#include "user.h"
|
#include "user.h"
|
||||||
#include "global.h"
|
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "commdlg.h"
|
#include "commdlg.h"
|
||||||
#include "dlgs.h"
|
#include "dlgs.h"
|
||||||
#include "selectors.h"
|
#include "selectors.h"
|
||||||
#include "../rc/sysres.h"
|
#include "resource.h"
|
||||||
#include "dos_fs.h"
|
#include "dos_fs.h"
|
||||||
#include "stackframe.h"
|
#include "stackframe.h"
|
||||||
|
|
||||||
|
@ -72,11 +71,7 @@ BOOL GetOpenFileName(LPOPENFILENAME lpofn)
|
||||||
}
|
}
|
||||||
hDlgTmpl = LoadResource( lpofn->hInstance, hResInfo );
|
hDlgTmpl = LoadResource( lpofn->hInstance, hResInfo );
|
||||||
}
|
}
|
||||||
else hDlgTmpl = GLOBAL_CreateBlock( GMEM_FIXED,
|
else hDlgTmpl = SYSRES_LoadResource( SYSRES_DIALOG_OPEN_FILE );
|
||||||
sysres_DIALOG_OPEN_FILE.bytes,
|
|
||||||
sysres_DIALOG_OPEN_FILE.size,
|
|
||||||
GetCurrentPDB(), FALSE, FALSE,
|
|
||||||
TRUE, NULL );
|
|
||||||
if (!hDlgTmpl)
|
if (!hDlgTmpl)
|
||||||
{
|
{
|
||||||
CommDlgLastError = CDERR_LOADRESFAILURE;
|
CommDlgLastError = CDERR_LOADRESFAILURE;
|
||||||
|
@ -91,7 +86,7 @@ BOOL GetOpenFileName(LPOPENFILENAME lpofn)
|
||||||
if (!(lpofn->Flags & OFN_ENABLETEMPLATEHANDLE))
|
if (!(lpofn->Flags & OFN_ENABLETEMPLATEHANDLE))
|
||||||
{
|
{
|
||||||
if (lpofn->Flags & OFN_ENABLETEMPLATE) FreeResource( hDlgTmpl );
|
if (lpofn->Flags & OFN_ENABLETEMPLATE) FreeResource( hDlgTmpl );
|
||||||
else GLOBAL_FreeBlock( hDlgTmpl );
|
else SYSRES_FreeResource( hDlgTmpl );
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("GetOpenFileName // return lpstrFile='%s' !\n",
|
printf("GetOpenFileName // return lpstrFile='%s' !\n",
|
||||||
|
@ -123,12 +118,7 @@ BOOL GetSaveFileName(LPOPENFILENAME lpofn)
|
||||||
}
|
}
|
||||||
hDlgTmpl = LoadResource( lpofn->hInstance, hResInfo );
|
hDlgTmpl = LoadResource( lpofn->hInstance, hResInfo );
|
||||||
}
|
}
|
||||||
else hDlgTmpl = GLOBAL_CreateBlock( GMEM_FIXED,
|
else hDlgTmpl = SYSRES_LoadResource( SYSRES_DIALOG_SAVE_FILE );
|
||||||
sysres_DIALOG_SAVE_FILE.bytes,
|
|
||||||
sysres_DIALOG_SAVE_FILE.size,
|
|
||||||
GetCurrentPDB(), FALSE, FALSE,
|
|
||||||
TRUE, NULL );
|
|
||||||
|
|
||||||
|
|
||||||
hInst = WIN_GetWindowInstance( lpofn->hwndOwner );
|
hInst = WIN_GetWindowInstance( lpofn->hwndOwner );
|
||||||
bRet = DialogBoxIndirectParam( hInst, hDlgTmpl, lpofn->hwndOwner,
|
bRet = DialogBoxIndirectParam( hInst, hDlgTmpl, lpofn->hwndOwner,
|
||||||
|
@ -137,7 +127,7 @@ BOOL GetSaveFileName(LPOPENFILENAME lpofn)
|
||||||
if (!(lpofn->Flags & OFN_ENABLETEMPLATEHANDLE))
|
if (!(lpofn->Flags & OFN_ENABLETEMPLATEHANDLE))
|
||||||
{
|
{
|
||||||
if (lpofn->Flags & OFN_ENABLETEMPLATE) FreeResource( hDlgTmpl );
|
if (lpofn->Flags & OFN_ENABLETEMPLATE) FreeResource( hDlgTmpl );
|
||||||
else GLOBAL_FreeBlock( hDlgTmpl );
|
else SYSRES_FreeResource( hDlgTmpl );
|
||||||
}
|
}
|
||||||
|
|
||||||
printf( "GetSaveFileName // return lpstrFile='%s' !\n",
|
printf( "GetSaveFileName // return lpstrFile='%s' !\n",
|
||||||
|
@ -153,7 +143,7 @@ static void FILEDLG_StripEditControl(HWND hwnd)
|
||||||
{
|
{
|
||||||
char temp[512], *cp;
|
char temp[512], *cp;
|
||||||
|
|
||||||
SendDlgItemMessage(hwnd, edt1, WM_GETTEXT, 511, MAKE_SEGPTR(temp));
|
SendDlgItemMessage(hwnd, edt1, WM_GETTEXT, 511, (LPARAM)MAKE_SEGPTR(temp));
|
||||||
cp = strrchr(temp, '\\');
|
cp = strrchr(temp, '\\');
|
||||||
if (cp != NULL) {
|
if (cp != NULL) {
|
||||||
strcpy(temp, cp+1);
|
strcpy(temp, cp+1);
|
||||||
|
@ -172,7 +162,7 @@ static BOOL FILEDLG_ScanDir(HWND hWnd, LPSTR newPath)
|
||||||
char str[512],str2[512];
|
char str[512],str2[512];
|
||||||
|
|
||||||
strncpy(str,newPath,511); str[511]=0;
|
strncpy(str,newPath,511); str[511]=0;
|
||||||
SendDlgItemMessage(hWnd, edt1, WM_GETTEXT, 511, MAKE_SEGPTR(str2));
|
SendDlgItemMessage(hWnd, edt1, WM_GETTEXT, 511, (LPARAM)MAKE_SEGPTR(str2));
|
||||||
strncat(str,str2,511-strlen(str)); str[511]=0;
|
strncat(str,str2,511-strlen(str)); str[511]=0;
|
||||||
if (!DlgDirList(hWnd, str, lst1, 0, 0x0000)) return FALSE;
|
if (!DlgDirList(hWnd, str, lst1, 0, 0x0000)) return FALSE;
|
||||||
DlgDirList(hWnd, "*.*", lst2, stc1, 0x8010);
|
DlgDirList(hWnd, "*.*", lst2, stc1, 0x8010);
|
||||||
|
@ -225,7 +215,7 @@ static LONG FILEDLG_WMDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
SelectObject(lpdis->hDC, hBrush);
|
SelectObject(lpdis->hDC, hBrush);
|
||||||
FillRect(lpdis->hDC, &lpdis->rcItem, hBrush);
|
FillRect(lpdis->hDC, &lpdis->rcItem, hBrush);
|
||||||
SendMessage(lpdis->hwndItem, LB_GETTEXT, lpdis->itemID,
|
SendMessage(lpdis->hwndItem, LB_GETTEXT, lpdis->itemID,
|
||||||
MAKE_SEGPTR(str));
|
(LPARAM)MAKE_SEGPTR(str));
|
||||||
TextOut(lpdis->hDC, lpdis->rcItem.left, lpdis->rcItem.top,
|
TextOut(lpdis->hDC, lpdis->rcItem.left, lpdis->rcItem.top,
|
||||||
str, strlen(str));
|
str, strlen(str));
|
||||||
if (lpdis->itemState != 0) {
|
if (lpdis->itemState != 0) {
|
||||||
|
@ -239,7 +229,7 @@ static LONG FILEDLG_WMDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
SelectObject(lpdis->hDC, hBrush);
|
SelectObject(lpdis->hDC, hBrush);
|
||||||
FillRect(lpdis->hDC, &lpdis->rcItem, hBrush);
|
FillRect(lpdis->hDC, &lpdis->rcItem, hBrush);
|
||||||
SendMessage(lpdis->hwndItem, LB_GETTEXT, lpdis->itemID,
|
SendMessage(lpdis->hwndItem, LB_GETTEXT, lpdis->itemID,
|
||||||
MAKE_SEGPTR(str));
|
(LPARAM)MAKE_SEGPTR(str));
|
||||||
|
|
||||||
hBitmap = hFolder;
|
hBitmap = hFolder;
|
||||||
GetObject(hBitmap, sizeof(BITMAP), (LPSTR)&bm);
|
GetObject(hBitmap, sizeof(BITMAP), (LPSTR)&bm);
|
||||||
|
@ -261,7 +251,7 @@ static LONG FILEDLG_WMDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
SelectObject(lpdis->hDC, hBrush);
|
SelectObject(lpdis->hDC, hBrush);
|
||||||
FillRect(lpdis->hDC, &lpdis->rcItem, hBrush);
|
FillRect(lpdis->hDC, &lpdis->rcItem, hBrush);
|
||||||
SendMessage(lpdis->hwndItem, CB_GETLBTEXT, lpdis->itemID,
|
SendMessage(lpdis->hwndItem, CB_GETLBTEXT, lpdis->itemID,
|
||||||
MAKE_SEGPTR(str));
|
(LPARAM)MAKE_SEGPTR(str));
|
||||||
switch(str[2]) {
|
switch(str[2]) {
|
||||||
case 'a': case 'b':
|
case 'a': case 'b':
|
||||||
hBitmap = hFloppy;
|
hBitmap = hFloppy;
|
||||||
|
@ -323,7 +313,7 @@ static LONG FILEDLG_WMInitDialog(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
n = strlen(pstr);
|
n = strlen(pstr);
|
||||||
strncpy(tmpstr, pstr, 511); tmpstr[511]=0;
|
strncpy(tmpstr, pstr, 511); tmpstr[511]=0;
|
||||||
printf("lpstrCustomFilter // add tmpstr='%s' ", tmpstr);
|
printf("lpstrCustomFilter // add tmpstr='%s' ", tmpstr);
|
||||||
SendDlgItemMessage(hWnd, cmb1, CB_ADDSTRING, 0, MAKE_SEGPTR(tmpstr));
|
SendDlgItemMessage(hWnd, cmb1, CB_ADDSTRING, 0, (LPARAM)MAKE_SEGPTR(tmpstr));
|
||||||
pstr += n + 1;
|
pstr += n + 1;
|
||||||
n = strlen(pstr);
|
n = strlen(pstr);
|
||||||
printf("associated to '%s'\n", pstr);
|
printf("associated to '%s'\n", pstr);
|
||||||
|
@ -337,7 +327,7 @@ static LONG FILEDLG_WMInitDialog(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
n = strlen(pstr);
|
n = strlen(pstr);
|
||||||
strncpy(tmpstr, pstr, 511); tmpstr[511]=0;
|
strncpy(tmpstr, pstr, 511); tmpstr[511]=0;
|
||||||
printf("lpstrFilter // add tmpstr='%s' ", tmpstr);
|
printf("lpstrFilter // add tmpstr='%s' ", tmpstr);
|
||||||
SendDlgItemMessage(hWnd, cmb1, CB_ADDSTRING, 0, MAKE_SEGPTR(tmpstr));
|
SendDlgItemMessage(hWnd, cmb1, CB_ADDSTRING, 0, (LPARAM)MAKE_SEGPTR(tmpstr));
|
||||||
pstr += n + 1;
|
pstr += n + 1;
|
||||||
n = strlen(pstr);
|
n = strlen(pstr);
|
||||||
printf("associated to '%s'\n", pstr);
|
printf("associated to '%s'\n", pstr);
|
||||||
|
@ -352,7 +342,7 @@ static LONG FILEDLG_WMInitDialog(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
tmpstr[511]=0;
|
tmpstr[511]=0;
|
||||||
printf("nFilterIndex = %ld // SetText of edt1 to '%s'\n",
|
printf("nFilterIndex = %ld // SetText of edt1 to '%s'\n",
|
||||||
lpofn->nFilterIndex, tmpstr);
|
lpofn->nFilterIndex, tmpstr);
|
||||||
SendDlgItemMessage(hWnd, edt1, WM_SETTEXT, 0, MAKE_SEGPTR(tmpstr));
|
SendDlgItemMessage(hWnd, edt1, WM_SETTEXT, 0, (LPARAM)MAKE_SEGPTR(tmpstr));
|
||||||
/* get drive list */
|
/* get drive list */
|
||||||
*tmpstr = 0;
|
*tmpstr = 0;
|
||||||
DlgDirListComboBox(hWnd, MAKE_SEGPTR(tmpstr), cmb2, 0, 0xC000);
|
DlgDirListComboBox(hWnd, MAKE_SEGPTR(tmpstr), cmb2, 0, 0xC000);
|
||||||
|
@ -399,8 +389,8 @@ static LRESULT FILEDLG_WMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
lRet = SendDlgItemMessage(hWnd, lst1, LB_GETCURSEL, 0, 0);
|
lRet = SendDlgItemMessage(hWnd, lst1, LB_GETCURSEL, 0, 0);
|
||||||
if (lRet == LB_ERR) return TRUE;
|
if (lRet == LB_ERR) return TRUE;
|
||||||
SendDlgItemMessage(hWnd, lst1, LB_GETTEXT, lRet,
|
SendDlgItemMessage(hWnd, lst1, LB_GETTEXT, lRet,
|
||||||
MAKE_SEGPTR(tmpstr));
|
(LPARAM)MAKE_SEGPTR(tmpstr));
|
||||||
SendDlgItemMessage(hWnd, edt1, WM_SETTEXT, 0, MAKE_SEGPTR(tmpstr));
|
SendDlgItemMessage(hWnd, edt1, WM_SETTEXT, 0, (LPARAM)MAKE_SEGPTR(tmpstr));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case lst2: /* directory list */
|
case lst2: /* directory list */
|
||||||
FILEDLG_StripEditControl(hWnd);
|
FILEDLG_StripEditControl(hWnd);
|
||||||
|
@ -409,7 +399,7 @@ static LRESULT FILEDLG_WMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
lRet = SendDlgItemMessage(hWnd, lst2, LB_GETCURSEL, 0, 0);
|
lRet = SendDlgItemMessage(hWnd, lst2, LB_GETCURSEL, 0, 0);
|
||||||
if (lRet == LB_ERR) return TRUE;
|
if (lRet == LB_ERR) return TRUE;
|
||||||
SendDlgItemMessage(hWnd, lst2, LB_GETTEXT, lRet,
|
SendDlgItemMessage(hWnd, lst2, LB_GETTEXT, lRet,
|
||||||
MAKE_SEGPTR(tmpstr));
|
(LPARAM)MAKE_SEGPTR(tmpstr));
|
||||||
if (tmpstr[0] == '[')
|
if (tmpstr[0] == '[')
|
||||||
{
|
{
|
||||||
tmpstr[strlen(tmpstr) - 1] = 0;
|
tmpstr[strlen(tmpstr) - 1] = 0;
|
||||||
|
@ -430,7 +420,7 @@ static LRESULT FILEDLG_WMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
FILEDLG_StripEditControl(hWnd);
|
FILEDLG_StripEditControl(hWnd);
|
||||||
lRet = SendDlgItemMessage(hWnd, cmb2, CB_GETCURSEL, 0, 0L);
|
lRet = SendDlgItemMessage(hWnd, cmb2, CB_GETCURSEL, 0, 0L);
|
||||||
if (lRet == LB_ERR) return 0;
|
if (lRet == LB_ERR) return 0;
|
||||||
SendDlgItemMessage(hWnd, cmb2, CB_GETLBTEXT, lRet, MAKE_SEGPTR(tmpstr));
|
SendDlgItemMessage(hWnd, cmb2, CB_GETLBTEXT, lRet, (LPARAM)MAKE_SEGPTR(tmpstr));
|
||||||
sprintf(tmpstr, "%c:", tmpstr[2]);
|
sprintf(tmpstr, "%c:", tmpstr[2]);
|
||||||
reset_scan:
|
reset_scan:
|
||||||
lRet = SendDlgItemMessage(hWnd, cmb1, CB_GETCURSEL, 0, 0);
|
lRet = SendDlgItemMessage(hWnd, cmb1, CB_GETCURSEL, 0, 0);
|
||||||
|
@ -440,7 +430,7 @@ static LRESULT FILEDLG_WMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
PTR_SEG_TO_LIN(lpofn->lpstrFilter),
|
PTR_SEG_TO_LIN(lpofn->lpstrFilter),
|
||||||
lRet);
|
lRet);
|
||||||
strncpy(tmpstr2, pstr, 511); tmpstr2[511]=0;
|
strncpy(tmpstr2, pstr, 511); tmpstr2[511]=0;
|
||||||
SendDlgItemMessage(hWnd, edt1, WM_SETTEXT, 0, MAKE_SEGPTR(tmpstr2));
|
SendDlgItemMessage(hWnd, edt1, WM_SETTEXT, 0, (LPARAM)MAKE_SEGPTR(tmpstr2));
|
||||||
FILEDLG_ScanDir(hWnd, tmpstr);
|
FILEDLG_ScanDir(hWnd, tmpstr);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case chx1:
|
case chx1:
|
||||||
|
@ -449,7 +439,7 @@ static LRESULT FILEDLG_WMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case IDOK:
|
case IDOK:
|
||||||
almost_ok:
|
almost_ok:
|
||||||
SendDlgItemMessage(hWnd, edt1, WM_GETTEXT, 511, MAKE_SEGPTR(tmpstr));
|
SendDlgItemMessage(hWnd, edt1, WM_GETTEXT, 511, (LPARAM)MAKE_SEGPTR(tmpstr));
|
||||||
pstr = strrchr(tmpstr, '\\');
|
pstr = strrchr(tmpstr, '\\');
|
||||||
if (pstr == NULL)
|
if (pstr == NULL)
|
||||||
pstr = strrchr(tmpstr, ':');
|
pstr = strrchr(tmpstr, ':');
|
||||||
|
@ -467,7 +457,7 @@ static LRESULT FILEDLG_WMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
*tmpstr=0;
|
*tmpstr=0;
|
||||||
}
|
}
|
||||||
printf("commdlg: %s, %s\n", tmpstr, tmpstr2);
|
printf("commdlg: %s, %s\n", tmpstr, tmpstr2);
|
||||||
SendDlgItemMessage(hWnd, edt1, WM_SETTEXT, 0, MAKE_SEGPTR(tmpstr2));
|
SendDlgItemMessage(hWnd, edt1, WM_SETTEXT, 0, (LPARAM)MAKE_SEGPTR(tmpstr2));
|
||||||
FILEDLG_ScanDir(hWnd, tmpstr);
|
FILEDLG_ScanDir(hWnd, tmpstr);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -485,7 +475,7 @@ static LRESULT FILEDLG_WMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
PTR_SEG_TO_LIN(lpofn->lpstrFilter),
|
PTR_SEG_TO_LIN(lpofn->lpstrFilter),
|
||||||
lRet), 511);
|
lRet), 511);
|
||||||
tmpstr2[511]=0;
|
tmpstr2[511]=0;
|
||||||
SendDlgItemMessage(hWnd, edt1, WM_SETTEXT, 0, MAKE_SEGPTR(tmpstr2));
|
SendDlgItemMessage(hWnd, edt1, WM_SETTEXT, 0, (LPARAM)MAKE_SEGPTR(tmpstr2));
|
||||||
/* if ScanDir succeeds, we have changed the directory */
|
/* if ScanDir succeeds, we have changed the directory */
|
||||||
if (FILEDLG_ScanDir(hWnd, tmpstr)) return TRUE;
|
if (FILEDLG_ScanDir(hWnd, tmpstr)) return TRUE;
|
||||||
/* if not, this must be a filename */
|
/* if not, this must be a filename */
|
||||||
|
@ -495,13 +485,13 @@ static LRESULT FILEDLG_WMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
/* strip off the pathname */
|
/* strip off the pathname */
|
||||||
*pstr = 0;
|
*pstr = 0;
|
||||||
strncpy(tmpstr2, pstr+1, 511); tmpstr2[511]=0;
|
strncpy(tmpstr2, pstr+1, 511); tmpstr2[511]=0;
|
||||||
SendDlgItemMessage(hWnd, edt1, WM_SETTEXT, 0, MAKE_SEGPTR(tmpstr2));
|
SendDlgItemMessage(hWnd, edt1, WM_SETTEXT, 0, (LPARAM)MAKE_SEGPTR(tmpstr2));
|
||||||
/* Should we MessageBox() if this fails? */
|
/* Should we MessageBox() if this fails? */
|
||||||
if (!FILEDLG_ScanDir(hWnd, tmpstr)) return TRUE;
|
if (!FILEDLG_ScanDir(hWnd, tmpstr)) return TRUE;
|
||||||
strcpy(tmpstr, tmpstr2);
|
strcpy(tmpstr, tmpstr2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
SendDlgItemMessage(hWnd, edt1, WM_SETTEXT, 0, MAKE_SEGPTR(tmpstr));
|
SendDlgItemMessage(hWnd, edt1, WM_SETTEXT, 0, (LPARAM)MAKE_SEGPTR(tmpstr));
|
||||||
ShowWindow(hWnd, SW_HIDE);
|
ShowWindow(hWnd, SW_HIDE);
|
||||||
{
|
{
|
||||||
int drive;
|
int drive;
|
||||||
|
@ -527,7 +517,7 @@ static LRESULT FILEDLG_WMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
lRet = SendDlgItemMessage(hWnd, lst1, LB_GETCURSEL, 0, 0);
|
lRet = SendDlgItemMessage(hWnd, lst1, LB_GETCURSEL, 0, 0);
|
||||||
SendDlgItemMessage(hWnd, lst1, LB_GETTEXT, lRet,
|
SendDlgItemMessage(hWnd, lst1, LB_GETTEXT, lRet,
|
||||||
MAKE_SEGPTR(tmpstr));
|
(LPARAM)MAKE_SEGPTR(tmpstr));
|
||||||
printf("strcpy'ing '%s'\n",tmpstr); fflush(stdout);
|
printf("strcpy'ing '%s'\n",tmpstr); fflush(stdout);
|
||||||
strcpy(PTR_SEG_TO_LIN(lpofn->lpstrFileTitle), tmpstr);
|
strcpy(PTR_SEG_TO_LIN(lpofn->lpstrFileTitle), tmpstr);
|
||||||
}
|
}
|
||||||
|
@ -621,14 +611,12 @@ BOOL ChooseColor(LPCHOOSECOLOR lpChCol)
|
||||||
HANDLE hInst, hDlgTmpl;
|
HANDLE hInst, hDlgTmpl;
|
||||||
BOOL bRet;
|
BOOL bRet;
|
||||||
|
|
||||||
hDlgTmpl = GLOBAL_CreateBlock(GMEM_FIXED, sysres_DIALOG_CHOOSE_COLOR.bytes,
|
hDlgTmpl = SYSRES_LoadResource( SYSRES_DIALOG_CHOOSE_COLOR );
|
||||||
sysres_DIALOG_CHOOSE_COLOR.size,
|
|
||||||
GetCurrentPDB(), FALSE, FALSE, TRUE, NULL );
|
|
||||||
hInst = WIN_GetWindowInstance( lpChCol->hwndOwner );
|
hInst = WIN_GetWindowInstance( lpChCol->hwndOwner );
|
||||||
bRet = DialogBoxIndirectParam( hInst, hDlgTmpl, lpChCol->hwndOwner,
|
bRet = DialogBoxIndirectParam( hInst, hDlgTmpl, lpChCol->hwndOwner,
|
||||||
GetWndProcEntry16("ColorDlgProc"),
|
GetWndProcEntry16("ColorDlgProc"),
|
||||||
(DWORD)lpChCol );
|
(DWORD)lpChCol );
|
||||||
GLOBAL_FreeBlock( hDlgTmpl );
|
SYSRES_FreeResource( hDlgTmpl );
|
||||||
return bRet;
|
return bRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -668,14 +656,12 @@ BOOL FindText(LPFINDREPLACE lpFind)
|
||||||
HANDLE hInst, hDlgTmpl;
|
HANDLE hInst, hDlgTmpl;
|
||||||
BOOL bRet;
|
BOOL bRet;
|
||||||
|
|
||||||
hDlgTmpl = GLOBAL_CreateBlock(GMEM_FIXED, sysres_DIALOG_FIND_TEXT.bytes,
|
hDlgTmpl = SYSRES_LoadResource( SYSRES_DIALOG_FIND_TEXT );
|
||||||
sysres_DIALOG_FIND_TEXT.size,
|
|
||||||
GetCurrentPDB(), FALSE, FALSE, TRUE, NULL );
|
|
||||||
hInst = WIN_GetWindowInstance( lpFind->hwndOwner );
|
hInst = WIN_GetWindowInstance( lpFind->hwndOwner );
|
||||||
bRet = DialogBoxIndirectParam( hInst, hDlgTmpl, lpFind->hwndOwner,
|
bRet = DialogBoxIndirectParam( hInst, hDlgTmpl, lpFind->hwndOwner,
|
||||||
GetWndProcEntry16("FindTextDlgProc"),
|
GetWndProcEntry16("FindTextDlgProc"),
|
||||||
(DWORD)lpFind );
|
(DWORD)lpFind );
|
||||||
GLOBAL_FreeBlock( hDlgTmpl );
|
SYSRES_FreeResource( hDlgTmpl );
|
||||||
return bRet;
|
return bRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -688,14 +674,12 @@ BOOL ReplaceText(LPFINDREPLACE lpFind)
|
||||||
HANDLE hInst, hDlgTmpl;
|
HANDLE hInst, hDlgTmpl;
|
||||||
BOOL bRet;
|
BOOL bRet;
|
||||||
|
|
||||||
hDlgTmpl = GLOBAL_CreateBlock(GMEM_FIXED, sysres_DIALOG_REPLACE_TEXT.bytes,
|
hDlgTmpl = SYSRES_LoadResource( SYSRES_DIALOG_REPLACE_TEXT );
|
||||||
sysres_DIALOG_REPLACE_TEXT.size,
|
|
||||||
GetCurrentPDB(), FALSE, FALSE, TRUE, NULL );
|
|
||||||
hInst = WIN_GetWindowInstance( lpFind->hwndOwner );
|
hInst = WIN_GetWindowInstance( lpFind->hwndOwner );
|
||||||
bRet = DialogBoxIndirectParam( hInst, hDlgTmpl, lpFind->hwndOwner,
|
bRet = DialogBoxIndirectParam( hInst, hDlgTmpl, lpFind->hwndOwner,
|
||||||
GetWndProcEntry16("ReplaceTextDlgProc"),
|
GetWndProcEntry16("ReplaceTextDlgProc"),
|
||||||
(DWORD)lpFind );
|
(DWORD)lpFind );
|
||||||
GLOBAL_FreeBlock( hDlgTmpl );
|
SYSRES_FreeResource( hDlgTmpl );
|
||||||
return bRet;
|
return bRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -769,16 +753,9 @@ BOOL PrintDlg(LPPRINTDLG lpPrint)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
if (lpPrint->Flags & PD_PRINTSETUP)
|
if (lpPrint->Flags & PD_PRINTSETUP)
|
||||||
hDlgTmpl = GLOBAL_CreateBlock( GMEM_FIXED,
|
hDlgTmpl = SYSRES_LoadResource( SYSRES_DIALOG_PRINT_SETUP );
|
||||||
sysres_DIALOG_PRINT_SETUP.bytes,
|
|
||||||
sysres_DIALOG_PRINT_SETUP.size,
|
|
||||||
GetCurrentPDB(), FALSE,
|
|
||||||
FALSE, TRUE, NULL );
|
|
||||||
else
|
else
|
||||||
hDlgTmpl = GLOBAL_CreateBlock( GMEM_FIXED, sysres_DIALOG_PRINT.bytes,
|
hDlgTmpl = SYSRES_LoadResource( SYSRES_DIALOG_PRINT );
|
||||||
sysres_DIALOG_PRINT.size,
|
|
||||||
GetCurrentPDB(), FALSE,
|
|
||||||
FALSE, TRUE, NULL );
|
|
||||||
|
|
||||||
hInst = WIN_GetWindowInstance( lpPrint->hwndOwner );
|
hInst = WIN_GetWindowInstance( lpPrint->hwndOwner );
|
||||||
bRet = DialogBoxIndirectParam( hInst, hDlgTmpl, lpPrint->hwndOwner,
|
bRet = DialogBoxIndirectParam( hInst, hDlgTmpl, lpPrint->hwndOwner,
|
||||||
|
@ -786,7 +763,7 @@ BOOL PrintDlg(LPPRINTDLG lpPrint)
|
||||||
GetWndProcEntry16("PrintSetupDlgProc") :
|
GetWndProcEntry16("PrintSetupDlgProc") :
|
||||||
GetWndProcEntry16("PrintDlgProc"),
|
GetWndProcEntry16("PrintDlgProc"),
|
||||||
(DWORD)lpPrint );
|
(DWORD)lpPrint );
|
||||||
GLOBAL_FreeBlock( hDlgTmpl );
|
SYSRES_FreeResource( hDlgTmpl );
|
||||||
return bRet;
|
return bRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -845,9 +822,9 @@ LRESULT PrintSetupDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* CommDlgExtendError (COMMDLG.26)
|
* CommDlgExtendedError (COMMDLG.26)
|
||||||
*/
|
*/
|
||||||
DWORD CommDlgExtendError(void)
|
DWORD CommDlgExtendedError(void)
|
||||||
{
|
{
|
||||||
return CommDlgLastError;
|
return CommDlgLastError;
|
||||||
}
|
}
|
||||||
|
@ -856,7 +833,7 @@ DWORD CommDlgExtendError(void)
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GetFileTitle (COMMDLG.27)
|
* GetFileTitle (COMMDLG.27)
|
||||||
*/
|
*/
|
||||||
int GetFileTitle(LPCSTR lpFile, LPSTR lpTitle, UINT cbBuf)
|
short GetFileTitle(LPCSTR lpFile, LPSTR lpTitle, UINT cbBuf)
|
||||||
{
|
{
|
||||||
int i, len;
|
int i, len;
|
||||||
printf("GetFileTitle(%p %p %d); \n", lpFile, lpTitle, cbBuf);
|
printf("GetFileTitle(%p %p %d); \n", lpFile, lpTitle, cbBuf);
|
||||||
|
@ -879,7 +856,7 @@ int GetFileTitle(LPCSTR lpFile, LPSTR lpTitle, UINT cbBuf)
|
||||||
printf("\n---> '%s' ", &lpFile[i]);
|
printf("\n---> '%s' ", &lpFile[i]);
|
||||||
|
|
||||||
len = strlen(lpFile+i)+1;
|
len = strlen(lpFile+i)+1;
|
||||||
if (cbBuf < len);
|
if (cbBuf < len)
|
||||||
return len;
|
return len;
|
||||||
|
|
||||||
strncpy(lpTitle, &lpFile[i], len);
|
strncpy(lpTitle, &lpFile[i], len);
|
||||||
|
|
|
@ -453,7 +453,7 @@ char *DOS_GetDosFileName(char *unixfilename)
|
||||||
} else {
|
} else {
|
||||||
/* Expand it if it's a relative name. */
|
/* Expand it if it's a relative name. */
|
||||||
getcwd(temp, 255);
|
getcwd(temp, 255);
|
||||||
if(strncmp(unixfilename, "./", 2) != 0) {
|
if(strncmp(unixfilename, "./", 2) == 0) {
|
||||||
strcat(temp, unixfilename + 1);
|
strcat(temp, unixfilename + 1);
|
||||||
} else {
|
} else {
|
||||||
strcat(temp, "/");
|
strcat(temp, "/");
|
||||||
|
@ -934,20 +934,20 @@ struct dosdirent *DOS_readdir(struct dosdirent *de)
|
||||||
strcpy(de->filename, d->d_name);
|
strcpy(de->filename, d->d_name);
|
||||||
if (d->d_reclen > 12)
|
if (d->d_reclen > 12)
|
||||||
de->filename[12] = '\0';
|
de->filename[12] = '\0';
|
||||||
|
|
||||||
ToDos(de->filename);
|
ToDos(de->filename);
|
||||||
} while ( !match(de->filename, de->filemask) );
|
|
||||||
|
|
||||||
strcpy(temp,de->unixpath);
|
strcpy(temp,de->unixpath);
|
||||||
strcat(temp,"/");
|
strcat(temp,"/");
|
||||||
strcat(temp,de->filename);
|
strcat(temp,d->d_name);
|
||||||
ToUnix(temp + strlen(de->unixpath));
|
stat (temp, &st);
|
||||||
|
de->attribute = 0x0;
|
||||||
|
if S_ISDIR(st.st_mode)
|
||||||
|
de->attribute |= FA_DIREC;
|
||||||
|
|
||||||
|
} while (!(de->attribute & FA_DIREC) &&
|
||||||
|
!match(de->filename, de->filemask) );
|
||||||
|
|
||||||
|
|
||||||
stat (temp, &st);
|
|
||||||
de->attribute = 0x0;
|
|
||||||
if S_ISDIR(st.st_mode)
|
|
||||||
de->attribute |= FA_DIREC;
|
|
||||||
|
|
||||||
de->filesize = st.st_size;
|
de->filesize = st.st_size;
|
||||||
de->filetime = st.st_mtime;
|
de->filetime = st.st_mtime;
|
||||||
|
|
||||||
|
|
|
@ -57,12 +57,13 @@ BOOL WinHelp(HWND hWnd, LPSTR lpHelpFile, WORD wCommand, DWORD dwData)
|
||||||
case 0:
|
case 0:
|
||||||
case HELP_HELPONHELP:
|
case HELP_HELPONHELP:
|
||||||
GetWindowsDirectory(str, sizeof(str));
|
GetWindowsDirectory(str, sizeof(str));
|
||||||
strcat(str, "\\winhelp.exe");
|
strcat(str, "\\winhelp.exe winhelp.hlp");
|
||||||
dprintf_exec(stddeb,"'%s'\n", str);
|
dprintf_exec(stddeb,"'%s'\n", str);
|
||||||
break;
|
break;
|
||||||
case HELP_INDEX:
|
case HELP_INDEX:
|
||||||
GetWindowsDirectory(str, sizeof(str));
|
GetWindowsDirectory(str, sizeof(str));
|
||||||
strcat(str, "\\winhelp.exe");
|
strcat(str, "\\winhelp.exe ");
|
||||||
|
strcat(str, lpHelpFile);
|
||||||
dprintf_exec(stddeb,"'%s'\n", str);
|
dprintf_exec(stddeb,"'%s'\n", str);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
#include "ole.h"
|
#include "ole.h"
|
||||||
|
#include "options.h"
|
||||||
#include "winnls.h"
|
#include "winnls.h"
|
||||||
#include "stddebug.h"
|
#include "stddebug.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
@ -20,20 +21,18 @@
|
||||||
DWORD WINAPI GetUserDefaultLCID()
|
DWORD WINAPI GetUserDefaultLCID()
|
||||||
{
|
{
|
||||||
/* Default sorting, neutral sublanguage */
|
/* Default sorting, neutral sublanguage */
|
||||||
#if #LANG(En)
|
switch(Options.language)
|
||||||
return 9;
|
{
|
||||||
#elif #LANG(De)
|
case LANG_En: return 0x09;
|
||||||
return 7;
|
case LANG_Es: return 0x07; /* Just a Guess :-) */
|
||||||
#elif #LANG(Es)
|
case LANG_De: return 0x07;
|
||||||
return 7; /* Just a Guess :-) */
|
case LANG_No: return 0x14;
|
||||||
#elif #LANG(Fr)
|
case LANG_Fr:
|
||||||
return 7; /* ditto :-) */
|
case LANG_Fi:
|
||||||
#elif #LANG(No)
|
case LANG_Da:
|
||||||
return 0x14;
|
default:
|
||||||
#else
|
return 0; /* Neutral language */
|
||||||
/* Neutral language */
|
}
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -192,7 +191,9 @@ UNSUPPORTED(LOCALE_INEGSEPBYSPACE)
|
||||||
|
|
||||||
/* Now, the language specific definitions. They don't have to be
|
/* Now, the language specific definitions. They don't have to be
|
||||||
complete */
|
complete */
|
||||||
#if #LANG(De)
|
switch(Options.language)
|
||||||
|
{
|
||||||
|
case LANG_De:
|
||||||
/* This definitions apply to Germany only. Users in Austria
|
/* This definitions apply to Germany only. Users in Austria
|
||||||
or Switzerland might want to modify them */
|
or Switzerland might want to modify them */
|
||||||
LOCVAL(LOCALE_ILANGUAGE,"9")
|
LOCVAL(LOCALE_ILANGUAGE,"9")
|
||||||
|
@ -315,9 +316,9 @@ LOCVAL(LOCALE_IPOSSEPBYSPACE)
|
||||||
LOCVAL(LOCALE_INEGSYMPRECEDES)
|
LOCVAL(LOCALE_INEGSYMPRECEDES)
|
||||||
LOCVAL(LOCALE_INEGSEPBYSPACE)
|
LOCVAL(LOCALE_INEGSEPBYSPACE)
|
||||||
*/
|
*/
|
||||||
#endif /* LANG(De) */
|
break; /* LANG(De) */
|
||||||
|
|
||||||
#if #LANG(Da)
|
case LANG_Da:
|
||||||
/* LOCVAL(LOCALE_ILANGUAGE,"9") */
|
/* LOCVAL(LOCALE_ILANGUAGE,"9") */
|
||||||
LOCVAL(LOCALE_SLANGUAGE,"Dansk")
|
LOCVAL(LOCALE_SLANGUAGE,"Dansk")
|
||||||
LOCVAL(LOCALE_SENGLANGUAGE,"Danish")
|
LOCVAL(LOCALE_SENGLANGUAGE,"Danish")
|
||||||
|
@ -417,11 +418,13 @@ LOCVAL(LOCALE_SABBREVMONTHNAME13,"")
|
||||||
/* LOCVAL(LOCALE_IPOSSEPBYSPACE) */
|
/* LOCVAL(LOCALE_IPOSSEPBYSPACE) */
|
||||||
/* LOCVAL(LOCALE_INEGSYMPRECEDES) */
|
/* LOCVAL(LOCALE_INEGSYMPRECEDES) */
|
||||||
/* LOCVAL(LOCALE_INEGSEPBYSPACE) */
|
/* LOCVAL(LOCALE_INEGSEPBYSPACE) */
|
||||||
#endif /* LANG(Da) */
|
break; /* LANG(Da) */
|
||||||
|
|
||||||
/*Insert other languages here*/
|
/*Insert other languages here*/
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
} /* switch */
|
||||||
|
|
||||||
if(!retLen)
|
if(!retLen)
|
||||||
{
|
{
|
||||||
|
|
|
@ -74,13 +74,13 @@ static char *GetIniFileName(char *name, char *dir)
|
||||||
if (strchr(name, '/'))
|
if (strchr(name, '/'))
|
||||||
return name;
|
return name;
|
||||||
|
|
||||||
if (strchr(name, '\\'))
|
if (strlen(dir)) {
|
||||||
return DOS_GetUnixFileName(name);
|
|
||||||
|
|
||||||
strcpy(temp, dir);
|
strcpy(temp, dir);
|
||||||
strcat(temp, "\\");
|
strcat(temp, "\\");
|
||||||
strcat(temp, name);
|
strcat(temp, name);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
strcpy(temp, name);
|
||||||
return DOS_GetUnixFileName(temp);
|
return DOS_GetUnixFileName(temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,23 +92,37 @@ static TSecHeader *load (char *filename, char **pfullname)
|
||||||
char *bufptr;
|
char *bufptr;
|
||||||
char *lastnonspc;
|
char *lastnonspc;
|
||||||
int bufsize;
|
int bufsize;
|
||||||
char *file;
|
char *file, *purefilename;
|
||||||
int c;
|
int c;
|
||||||
char path[MAX_PATH+1];
|
char path[MAX_PATH+1];
|
||||||
BOOL firstbrace;
|
BOOL firstbrace;
|
||||||
|
|
||||||
*pfullname = NULL;
|
*pfullname = NULL;
|
||||||
|
|
||||||
/* Try the Windows directory */
|
dprintf_profile(stddeb,"Trying to load file %s \n", filename);
|
||||||
|
|
||||||
GetWindowsDirectory(path, sizeof(path));
|
/* First try it as is */
|
||||||
file = GetIniFileName(filename, path);
|
file = GetIniFileName(filename, "");
|
||||||
|
|
||||||
dprintf_profile(stddeb,"Load %s\n", file);
|
|
||||||
f = fopen(file, "r");
|
f = fopen(file, "r");
|
||||||
|
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
/* Try the path of the current executable */
|
|
||||||
|
if ((purefilename = strrchr( filename, '\\' )))
|
||||||
|
purefilename++;
|
||||||
|
else if ((purefilename = strrchr( filename, '/' )))
|
||||||
|
purefilename++;
|
||||||
|
else
|
||||||
|
purefilename = filename;
|
||||||
|
ToUnix(purefilename);
|
||||||
|
|
||||||
|
/* Now try the Windows directory */
|
||||||
|
GetWindowsDirectory(path, sizeof(path));
|
||||||
|
file = GetIniFileName(purefilename, path);
|
||||||
|
dprintf_profile(stddeb,"Trying to load in windows directory file %s\n",
|
||||||
|
file);
|
||||||
|
f = fopen(file, "r");
|
||||||
|
|
||||||
|
if (f == NULL) { /* Try the path of the current executable */
|
||||||
|
|
||||||
if (GetCurrentTask())
|
if (GetCurrentTask())
|
||||||
{
|
{
|
||||||
|
@ -116,16 +130,37 @@ static TSecHeader *load (char *filename, char **pfullname)
|
||||||
GetModuleFileName( GetCurrentTask(), path, MAX_PATH );
|
GetModuleFileName( GetCurrentTask(), path, MAX_PATH );
|
||||||
if ((p = strrchr( path, '\\' )))
|
if ((p = strrchr( path, '\\' )))
|
||||||
{
|
{
|
||||||
p[1] = '\0';
|
p[0] = '\0'; /* Remove trailing slash */
|
||||||
file = GetIniFileName(filename, path);
|
file = GetIniFileName(purefilename, path);
|
||||||
|
dprintf_profile(stddeb,
|
||||||
|
"Trying to load in current directory%s\n",
|
||||||
|
file);
|
||||||
f = fopen(file, "r");
|
f = fopen(file, "r");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (f == NULL) { /* And now in $HOME/.wine */
|
||||||
|
|
||||||
|
strcpy(file,getenv("HOME"));
|
||||||
|
strcat(file, "/.wine/");
|
||||||
|
strcat(file, purefilename);
|
||||||
|
dprintf_profile(stddeb,"Trying to load in user-directory %s\n", file);
|
||||||
|
f = fopen(file, "r");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (f == NULL) {
|
||||||
|
/* FIXED: we ought to create it now (in which directory?) */
|
||||||
|
/* lets do it in ~/.wine */
|
||||||
|
strcpy(file,getenv("HOME"));
|
||||||
|
strcat(file, "/.wine/");
|
||||||
|
strcat(file, purefilename);
|
||||||
|
dprintf_profile(stddeb,"Creating %s\n", file);
|
||||||
|
f = fopen(file, "w+");
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
fprintf(stderr, "profile.c: load() can't find file %s\n", filename);
|
fprintf(stderr, "profile.c: load() can't find file %s\n", filename);
|
||||||
/* FIXME: we ought to create it now (in which directory?) */
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
*pfullname = strdup(file);
|
*pfullname = strdup(file);
|
||||||
|
@ -206,7 +241,7 @@ static TSecHeader *load (char *filename, char **pfullname)
|
||||||
skipspc = TRUE;
|
skipspc = TRUE;
|
||||||
do {
|
do {
|
||||||
c = fgetc(f);
|
c = fgetc(f);
|
||||||
if (c == EOF || c == '\n' || c == ';') break;
|
if (c == EOF || c == '\n') break;
|
||||||
if (!isspace(c) || !skipspc) {
|
if (!isspace(c) || !skipspc) {
|
||||||
skipspc = FALSE;
|
skipspc = FALSE;
|
||||||
bufsize++;
|
bufsize++;
|
||||||
|
|
67
misc/shell.c
67
misc/shell.c
|
@ -8,12 +8,11 @@
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
#include "shell.h"
|
#include "shell.h"
|
||||||
#include "global.h"
|
|
||||||
#include "neexe.h"
|
#include "neexe.h"
|
||||||
#include "selectors.h"
|
#include "selectors.h"
|
||||||
#include "alias.h"
|
#include "alias.h"
|
||||||
#include "relay32.h"
|
#include "relay32.h"
|
||||||
#include "../rc/sysres.h"
|
#include "resource.h"
|
||||||
#include "dlgs.h"
|
#include "dlgs.h"
|
||||||
#include "win.h"
|
#include "win.h"
|
||||||
#include "stddebug.h"
|
#include "stddebug.h"
|
||||||
|
@ -224,7 +223,7 @@ LONG RegOpenKey(HKEY hKey, LPCSTR lpSubKey, HKEY FAR *lphKey)
|
||||||
|
|
||||||
dprintf_reg(stddeb, "RegOpenKey(%08lX, %p='%s', %p)\n",
|
dprintf_reg(stddeb, "RegOpenKey(%08lX, %p='%s', %p)\n",
|
||||||
(DWORD)hKey, lpSubKey, lpSubKey, lphKey);
|
(DWORD)hKey, lpSubKey, lpSubKey, lphKey);
|
||||||
if (lphKey == NULL) return ERROR_INVALID_PARAMETER;
|
if (lphKey == NULL) return SHELL_ERROR_INVALID_PARAMETER;
|
||||||
switch((DWORD)hKey) {
|
switch((DWORD)hKey) {
|
||||||
case 0:
|
case 0:
|
||||||
lpKey = lphTopKey; break;
|
lpKey = lphTopKey; break;
|
||||||
|
@ -237,7 +236,7 @@ LONG RegOpenKey(HKEY hKey, LPCSTR lpSubKey, HKEY FAR *lphKey)
|
||||||
}
|
}
|
||||||
if (lpSubKey == NULL || !*lpSubKey) {
|
if (lpSubKey == NULL || !*lpSubKey) {
|
||||||
*lphKey = hKey;
|
*lphKey = hKey;
|
||||||
return ERROR_SUCCESS;
|
return SHELL_ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
while(*lpSubKey) {
|
while(*lpSubKey) {
|
||||||
ptr = strchr(lpSubKey,'\\');
|
ptr = strchr(lpSubKey,'\\');
|
||||||
|
@ -254,11 +253,11 @@ LONG RegOpenKey(HKEY hKey, LPCSTR lpSubKey, HKEY FAR *lphKey)
|
||||||
}
|
}
|
||||||
if (lpKey == NULL) {
|
if (lpKey == NULL) {
|
||||||
dprintf_reg(stddeb,"RegOpenKey: key %s not found!\n",str);
|
dprintf_reg(stddeb,"RegOpenKey: key %s not found!\n",str);
|
||||||
return ERROR_BADKEY;
|
return SHELL_ERROR_BADKEY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*lphKey = lpKey->hKey;
|
*lphKey = lpKey->hKey;
|
||||||
return ERROR_SUCCESS;
|
return SHELL_ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -275,7 +274,7 @@ LONG RegCreateKey(HKEY hKey, LPCSTR lpSubKey, HKEY FAR *lphKey)
|
||||||
char str[128];
|
char str[128];
|
||||||
|
|
||||||
dprintf_reg(stddeb, "RegCreateKey(%08lX, '%s', %p)\n", (DWORD)hKey, lpSubKey, lphKey);
|
dprintf_reg(stddeb, "RegCreateKey(%08lX, '%s', %p)\n", (DWORD)hKey, lpSubKey, lphKey);
|
||||||
if (lphKey == NULL) return ERROR_INVALID_PARAMETER;
|
if (lphKey == NULL) return SHELL_ERROR_INVALID_PARAMETER;
|
||||||
switch((DWORD)hKey) {
|
switch((DWORD)hKey) {
|
||||||
case 0:
|
case 0:
|
||||||
lpKey = lphTopKey; break;
|
lpKey = lphTopKey; break;
|
||||||
|
@ -288,7 +287,7 @@ LONG RegCreateKey(HKEY hKey, LPCSTR lpSubKey, HKEY FAR *lphKey)
|
||||||
}
|
}
|
||||||
if (lpSubKey == NULL || !*lpSubKey) {
|
if (lpSubKey == NULL || !*lpSubKey) {
|
||||||
*lphKey = hKey;
|
*lphKey = hKey;
|
||||||
return ERROR_SUCCESS;
|
return SHELL_ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
while (*lpSubKey) {
|
while (*lpSubKey) {
|
||||||
dprintf_reg(stddeb, "RegCreateKey: Looking for subkey %s\n", lpSubKey);
|
dprintf_reg(stddeb, "RegCreateKey: Looking for subkey %s\n", lpSubKey);
|
||||||
|
@ -309,13 +308,13 @@ LONG RegCreateKey(HKEY hKey, LPCSTR lpSubKey, HKEY FAR *lphKey)
|
||||||
lpNewKey = (LPKEYSTRUCT) GlobalLock(hNewKey);
|
lpNewKey = (LPKEYSTRUCT) GlobalLock(hNewKey);
|
||||||
if (lpNewKey == NULL) {
|
if (lpNewKey == NULL) {
|
||||||
printf("RegCreateKey // Can't alloc new key !\n");
|
printf("RegCreateKey // Can't alloc new key !\n");
|
||||||
return ERROR_OUTOFMEMORY;
|
return SHELL_ERROR_OUTOFMEMORY;
|
||||||
}
|
}
|
||||||
lpNewKey->hKey = hNewKey;
|
lpNewKey->hKey = hNewKey;
|
||||||
lpNewKey->lpSubKey = malloc(strlen(str) + 1);
|
lpNewKey->lpSubKey = malloc(strlen(str) + 1);
|
||||||
if (lpNewKey->lpSubKey == NULL) {
|
if (lpNewKey->lpSubKey == NULL) {
|
||||||
printf("RegCreateKey // Can't alloc key string !\n");
|
printf("RegCreateKey // Can't alloc key string !\n");
|
||||||
return ERROR_OUTOFMEMORY;
|
return SHELL_ERROR_OUTOFMEMORY;
|
||||||
}
|
}
|
||||||
strcpy(lpNewKey->lpSubKey, str);
|
strcpy(lpNewKey->lpSubKey, str);
|
||||||
lpNewKey->lpNextKey = lpPrevKey->lpSubLvl;
|
lpNewKey->lpNextKey = lpPrevKey->lpSubLvl;
|
||||||
|
@ -333,7 +332,7 @@ LONG RegCreateKey(HKEY hKey, LPCSTR lpSubKey, HKEY FAR *lphKey)
|
||||||
dprintf_reg(stddeb,"RegCreateKey // found '%s', key=%08lX\n", str, (DWORD)*lphKey);
|
dprintf_reg(stddeb,"RegCreateKey // found '%s', key=%08lX\n", str, (DWORD)*lphKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ERROR_SUCCESS;
|
return SHELL_ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -343,7 +342,7 @@ LONG RegCreateKey(HKEY hKey, LPCSTR lpSubKey, HKEY FAR *lphKey)
|
||||||
LONG RegCloseKey(HKEY hKey)
|
LONG RegCloseKey(HKEY hKey)
|
||||||
{
|
{
|
||||||
dprintf_reg(stdnimp, "EMPTY STUB !!! RegCloseKey(%08lX);\n", (DWORD)hKey);
|
dprintf_reg(stdnimp, "EMPTY STUB !!! RegCloseKey(%08lX);\n", (DWORD)hKey);
|
||||||
return ERROR_SUCCESS;
|
return SHELL_ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -354,7 +353,7 @@ LONG RegDeleteKey(HKEY hKey, LPCSTR lpSubKey)
|
||||||
{
|
{
|
||||||
dprintf_reg(stdnimp, "EMPTY STUB !!! RegDeleteKey(%08lX, '%s');\n",
|
dprintf_reg(stdnimp, "EMPTY STUB !!! RegDeleteKey(%08lX, '%s');\n",
|
||||||
(DWORD)hKey, lpSubKey);
|
(DWORD)hKey, lpSubKey);
|
||||||
return ERROR_SUCCESS;
|
return SHELL_ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -369,22 +368,22 @@ LONG RegSetValue(HKEY hKey, LPCSTR lpSubKey, DWORD dwType,
|
||||||
LONG dwRet;
|
LONG dwRet;
|
||||||
dprintf_reg(stddeb, "RegSetValue(%08lX, '%s', %08lX, '%s', %08lX);\n",
|
dprintf_reg(stddeb, "RegSetValue(%08lX, '%s', %08lX, '%s', %08lX);\n",
|
||||||
(DWORD)hKey, lpSubKey, dwType, lpVal, dwIgnored);
|
(DWORD)hKey, lpSubKey, dwType, lpVal, dwIgnored);
|
||||||
/*if (lpSubKey == NULL) return ERROR_INVALID_PARAMETER;*/
|
/*if (lpSubKey == NULL) return SHELL_ERROR_INVALID_PARAMETER;*/
|
||||||
if (lpVal == NULL) return ERROR_INVALID_PARAMETER;
|
if (lpVal == NULL) return SHELL_ERROR_INVALID_PARAMETER;
|
||||||
if ((dwRet = RegOpenKey(hKey, lpSubKey, &hRetKey)) != ERROR_SUCCESS) {
|
if ((dwRet = RegOpenKey(hKey, lpSubKey, &hRetKey)) != SHELL_ERROR_SUCCESS) {
|
||||||
dprintf_reg(stddeb, "RegSetValue // key not found ... so create it !\n");
|
dprintf_reg(stddeb, "RegSetValue // key not found ... so create it !\n");
|
||||||
if ((dwRet = RegCreateKey(hKey, lpSubKey, &hRetKey)) != ERROR_SUCCESS) {
|
if ((dwRet = RegCreateKey(hKey, lpSubKey, &hRetKey)) != SHELL_ERROR_SUCCESS) {
|
||||||
fprintf(stderr, "RegSetValue // key creation error %08lX !\n", dwRet);
|
fprintf(stderr, "RegSetValue // key creation error %08lX !\n", dwRet);
|
||||||
return dwRet;
|
return dwRet;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lpKey = (LPKEYSTRUCT)GlobalLock(hRetKey);
|
lpKey = (LPKEYSTRUCT)GlobalLock(hRetKey);
|
||||||
if (lpKey == NULL) return ERROR_BADKEY;
|
if (lpKey == NULL) return SHELL_ERROR_BADKEY;
|
||||||
if (lpKey->lpValue != NULL) free(lpKey->lpValue);
|
if (lpKey->lpValue != NULL) free(lpKey->lpValue);
|
||||||
lpKey->lpValue = xmalloc(strlen(lpVal) + 1);
|
lpKey->lpValue = xmalloc(strlen(lpVal) + 1);
|
||||||
strcpy(lpKey->lpValue, lpVal);
|
strcpy(lpKey->lpValue, lpVal);
|
||||||
dprintf_reg(stddeb,"RegSetValue // successful key='%s' val='%s' !\n", lpSubKey, lpKey->lpValue);
|
dprintf_reg(stddeb,"RegSetValue // successful key='%s' val='%s' !\n", lpSubKey, lpKey->lpValue);
|
||||||
return ERROR_SUCCESS;
|
return SHELL_ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -400,16 +399,16 @@ LONG RegQueryValue(HKEY hKey, LPCSTR lpSubKey, LPSTR lpVal, LONG FAR *lpcb)
|
||||||
dprintf_reg(stddeb, "RegQueryValue(%08lX, '%s', %p, %p);\n",
|
dprintf_reg(stddeb, "RegQueryValue(%08lX, '%s', %p, %p);\n",
|
||||||
(DWORD)hKey, lpSubKey, lpVal, lpcb);
|
(DWORD)hKey, lpSubKey, lpVal, lpcb);
|
||||||
/*if (lpSubKey == NULL) return ERROR_INVALID_PARAMETER;*/
|
/*if (lpSubKey == NULL) return ERROR_INVALID_PARAMETER;*/
|
||||||
if (lpVal == NULL) return ERROR_INVALID_PARAMETER;
|
if (lpVal == NULL) return SHELL_ERROR_INVALID_PARAMETER;
|
||||||
if (lpcb == NULL) return ERROR_INVALID_PARAMETER;
|
if (lpcb == NULL) return SHELL_ERROR_INVALID_PARAMETER;
|
||||||
if (!*lpcb) return ERROR_INVALID_PARAMETER;
|
if (!*lpcb) return SHELL_ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
if ((dwRet = RegOpenKey(hKey, lpSubKey, &hRetKey)) != ERROR_SUCCESS) {
|
if ((dwRet = RegOpenKey(hKey, lpSubKey, &hRetKey)) != SHELL_ERROR_SUCCESS) {
|
||||||
fprintf(stderr, "RegQueryValue // key not found !\n");
|
fprintf(stderr, "RegQueryValue // key not found !\n");
|
||||||
return dwRet;
|
return dwRet;
|
||||||
}
|
}
|
||||||
lpKey = (LPKEYSTRUCT)GlobalLock(hRetKey);
|
lpKey = (LPKEYSTRUCT)GlobalLock(hRetKey);
|
||||||
if (lpKey == NULL) return ERROR_BADKEY;
|
if (lpKey == NULL) return SHELL_ERROR_BADKEY;
|
||||||
if (lpKey->lpValue != NULL) {
|
if (lpKey->lpValue != NULL) {
|
||||||
if ((size = strlen(lpKey->lpValue)+1) > *lpcb){
|
if ((size = strlen(lpKey->lpValue)+1) > *lpcb){
|
||||||
strncpy(lpVal,lpKey->lpValue,*lpcb-1);
|
strncpy(lpVal,lpKey->lpValue,*lpcb-1);
|
||||||
|
@ -423,7 +422,7 @@ LONG RegQueryValue(HKEY hKey, LPCSTR lpSubKey, LPSTR lpVal, LONG FAR *lpcb)
|
||||||
*lpcb = (LONG)1;
|
*lpcb = (LONG)1;
|
||||||
}
|
}
|
||||||
dprintf_reg(stddeb,"RegQueryValue // return '%s' !\n", lpVal);
|
dprintf_reg(stddeb,"RegQueryValue // return '%s' !\n", lpVal);
|
||||||
return ERROR_SUCCESS;
|
return SHELL_ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -436,7 +435,7 @@ LONG RegEnumKey(HKEY hKey, DWORD dwSubKey, LPSTR lpBuf, DWORD dwSize)
|
||||||
LONG len;
|
LONG len;
|
||||||
|
|
||||||
dprintf_reg(stddeb, "RegEnumKey(%08lX, %ld)\n", (DWORD)hKey, dwSubKey);
|
dprintf_reg(stddeb, "RegEnumKey(%08lX, %ld)\n", (DWORD)hKey, dwSubKey);
|
||||||
if (lpBuf == NULL) return ERROR_INVALID_PARAMETER;
|
if (lpBuf == NULL) return SHELL_ERROR_INVALID_PARAMETER;
|
||||||
switch((DWORD)hKey) {
|
switch((DWORD)hKey) {
|
||||||
case 0:
|
case 0:
|
||||||
lpKey = lphTopKey; break;
|
lpKey = lphTopKey; break;
|
||||||
|
@ -454,13 +453,13 @@ LONG RegEnumKey(HKEY hKey, DWORD dwSubKey, LPSTR lpBuf, DWORD dwSize)
|
||||||
strncpy(lpBuf,lpKey->lpSubKey,len);
|
strncpy(lpBuf,lpKey->lpSubKey,len);
|
||||||
lpBuf[len] = 0;
|
lpBuf[len] = 0;
|
||||||
dprintf_reg(stddeb, "RegEnumKey: found %s\n",lpBuf);
|
dprintf_reg(stddeb, "RegEnumKey: found %s\n",lpBuf);
|
||||||
return ERROR_SUCCESS;
|
return SHELL_ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
dwSubKey--;
|
dwSubKey--;
|
||||||
lpKey = lpKey->lpNextKey;
|
lpKey = lpKey->lpNextKey;
|
||||||
}
|
}
|
||||||
dprintf_reg(stddeb, "RegEnumKey: key not found!\n");
|
dprintf_reg(stddeb, "RegEnumKey: key not found!\n");
|
||||||
return ERROR_INVALID_PARAMETER;
|
return SHELL_ERROR_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -584,7 +583,7 @@ HINSTANCE ShellExecute(HWND hWnd, LPCSTR lpOperation, LPCSTR lpFile, LPCSTR lpPa
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
len=200;
|
len=200;
|
||||||
if (RegQueryValue((HKEY)HKEY_CLASSES_ROOT,p,subclass,&len)==ERROR_SUCCESS) {
|
if (RegQueryValue((HKEY)HKEY_CLASSES_ROOT,p,subclass,&len)==SHELL_ERROR_SUCCESS) {
|
||||||
if (len>20)
|
if (len>20)
|
||||||
fprintf(stddeb,"ShellExecute:subclass with len %ld? (%s), please report.\n",len,subclass);
|
fprintf(stddeb,"ShellExecute:subclass with len %ld? (%s), please report.\n",len,subclass);
|
||||||
subclass[len]='\0';
|
subclass[len]='\0';
|
||||||
|
@ -593,7 +592,7 @@ HINSTANCE ShellExecute(HWND hWnd, LPCSTR lpOperation, LPCSTR lpFile, LPCSTR lpPa
|
||||||
strcat(subclass,"\\command");
|
strcat(subclass,"\\command");
|
||||||
dprintf_exec(stddeb,"ShellExecute:looking for %s.\n",subclass);
|
dprintf_exec(stddeb,"ShellExecute:looking for %s.\n",subclass);
|
||||||
len=400;
|
len=400;
|
||||||
if (RegQueryValue((HKEY)HKEY_CLASSES_ROOT,subclass,cmd,&len)==ERROR_SUCCESS) {
|
if (RegQueryValue((HKEY)HKEY_CLASSES_ROOT,subclass,cmd,&len)==SHELL_ERROR_SUCCESS) {
|
||||||
char *t;
|
char *t;
|
||||||
dprintf_exec(stddeb,"ShellExecute:...got %s\n",cmd);
|
dprintf_exec(stddeb,"ShellExecute:...got %s\n",cmd);
|
||||||
cmd[len]='\0';
|
cmd[len]='\0';
|
||||||
|
@ -701,17 +700,13 @@ INT ShellAbout(HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff, HICON hIcon)
|
||||||
initialized=1;
|
initialized=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
handle = GLOBAL_CreateBlock( GMEM_FIXED,
|
handle = SYSRES_LoadResource( SYSRES_DIALOG_SHELL_ABOUT_MSGBOX );
|
||||||
sysres_DIALOG_SHELL_ABOUT_MSGBOX.bytes,
|
|
||||||
sysres_DIALOG_SHELL_ABOUT_MSGBOX.size,
|
|
||||||
GetCurrentPDB(), FALSE, FALSE,
|
|
||||||
TRUE, NULL );
|
|
||||||
if (!handle) return FALSE;
|
if (!handle) return FALSE;
|
||||||
bRet = DialogBoxIndirectParam( WIN_GetWindowInstance( hWnd ),
|
bRet = DialogBoxIndirectParam( WIN_GetWindowInstance( hWnd ),
|
||||||
handle, hWnd,
|
handle, hWnd,
|
||||||
GetWndProcEntry16("AboutDlgProc"),
|
GetWndProcEntry16("AboutDlgProc"),
|
||||||
(LONG)hIcon );
|
(LONG)hIcon );
|
||||||
GLOBAL_FreeBlock( handle );
|
SYSRES_FreeResource( handle );
|
||||||
return bRet;
|
return bRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -158,5 +158,5 @@ DWORD USER32_CreateWindowExA(long flags,char* class,char *title,
|
||||||
return (DWORD) CreateWindowEx(flags,MAKE_SEGPTR(classbuf),
|
return (DWORD) CreateWindowEx(flags,MAKE_SEGPTR(classbuf),
|
||||||
MAKE_SEGPTR(titlebuf),style,x,y,width,height,
|
MAKE_SEGPTR(titlebuf),style,x,y,width,height,
|
||||||
(HWND)parent,(HMENU)menu,(HINSTANCE)instance,
|
(HWND)parent,(HMENU)menu,(HINSTANCE)instance,
|
||||||
param);
|
(LPVOID)param);
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,28 @@
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* Structure for real-mode callbacks */
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
DWORD edi;
|
||||||
|
DWORD esi;
|
||||||
|
DWORD ebp;
|
||||||
|
DWORD reserved;
|
||||||
|
DWORD ebx;
|
||||||
|
DWORD edx;
|
||||||
|
DWORD ecx;
|
||||||
|
DWORD eax;
|
||||||
|
WORD flags;
|
||||||
|
WORD es;
|
||||||
|
WORD ds;
|
||||||
|
WORD fs;
|
||||||
|
WORD gs;
|
||||||
|
WORD ip;
|
||||||
|
WORD cs;
|
||||||
|
WORD sp;
|
||||||
|
WORD ss;
|
||||||
|
} REALMODECALL;
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* INT_Int31Handler
|
* INT_Int31Handler
|
||||||
*
|
*
|
||||||
|
@ -132,13 +154,39 @@ void INT_Int31Handler( struct sigcontext_struct context )
|
||||||
* ES:DI points to real-mode call structure
|
* ES:DI points to real-mode call structure
|
||||||
* Currently we just print it out and return error.
|
* Currently we just print it out and return error.
|
||||||
*/
|
*/
|
||||||
ptr = (BYTE *)PTR_SEG_OFF_TO_LIN( ES_reg(&context), DI_reg(&context) );
|
{
|
||||||
fprintf(stdnimp,
|
REALMODECALL *p = (REALMODECALL *)PTR_SEG_OFF_TO_LIN( ES_reg(&context), DI_reg(&context) );
|
||||||
"RealModeInt %02x: AX=%04x BX=%04x CX=%04x DX=%04x SI=%04x DI=%04x ES=%04x DS=%04x\n",
|
fprintf(stdnimp,
|
||||||
BL_reg(&context),
|
"RealModeInt %02x: EAX=%08lx EBX=%08lx ECX=%08lx EDX=%08lx\n"
|
||||||
*(WORD*)(ptr+0x1c),*(WORD*)(ptr+0x10),*(WORD*)(ptr+0x18),*(WORD*)(ptr+0x14),
|
" ESI=%08lx EDI=%08lx ES=%04x DS=%04x\n",
|
||||||
*(WORD*)(ptr+0x04),*(WORD*)(ptr+0x00),*(WORD*)(ptr+0x22),*(WORD*)(ptr+0x24));
|
BL_reg(&context), p->eax, p->ebx, p->ecx, p->edx,
|
||||||
SET_CFLAG(&context);
|
p->esi, p->edi, p->es, p->ds );
|
||||||
|
SET_CFLAG(&context);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 0x0301: /* Call real mode procedure with far return */
|
||||||
|
{
|
||||||
|
REALMODECALL *p = (REALMODECALL *)PTR_SEG_OFF_TO_LIN( ES_reg(&context), DI_reg(&context) );
|
||||||
|
fprintf(stdnimp,
|
||||||
|
"RealModeCall: EAX=%08lx EBX=%08lx ECX=%08lx EDX=%08lx\n"
|
||||||
|
" ESI=%08lx EDI=%08lx ES=%04x DS=%04x CS:IP=%04x:%04x\n",
|
||||||
|
p->eax, p->ebx, p->ecx, p->edx,
|
||||||
|
p->esi, p->edi, p->es, p->ds, p->cs, p->ip );
|
||||||
|
SET_CFLAG(&context);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 0x0302: /* Call real mode procedure with interrupt return */
|
||||||
|
{
|
||||||
|
REALMODECALL *p = (REALMODECALL *)PTR_SEG_OFF_TO_LIN( ES_reg(&context), DI_reg(&context) );
|
||||||
|
fprintf(stdnimp,
|
||||||
|
"RealModeCallIret: EAX=%08lx EBX=%08lx ECX=%08lx EDX=%08lx\n"
|
||||||
|
" ESI=%08lx EDI=%08lx ES=%04x DS=%04x CS:IP=%04x:%04x\n",
|
||||||
|
p->eax, p->ebx, p->ecx, p->edx,
|
||||||
|
p->esi, p->edi, p->es, p->ds, p->cs, p->ip );
|
||||||
|
SET_CFLAG(&context);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x0400: /* Get DPMI version */
|
case 0x0400: /* Get DPMI version */
|
||||||
|
|
|
@ -181,9 +181,11 @@ static BYTE *INSTR_GetOperandAddr( struct sigcontext_struct *context,
|
||||||
base += (signed short)off;
|
base += (signed short)off;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
base &= 0xffff;
|
||||||
}
|
}
|
||||||
if (segprefix != -1) seg = segprefix;
|
if (segprefix != -1) seg = segprefix;
|
||||||
|
|
||||||
|
/* FIXME: should check limit of the segment here */
|
||||||
return (BYTE *)PTR_SEG_OFF_TO_LIN( seg, (base + (index << ss)) );
|
return (BYTE *)PTR_SEG_OFF_TO_LIN( seg, (base + (index << ss)) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
105
miscemu/int21.c
105
miscemu/int21.c
|
@ -444,7 +444,7 @@ static void GetSystemDate(struct sigcontext_struct *context)
|
||||||
AX_reg(context) = now->tm_wday;
|
AX_reg(context) = now->tm_wday;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void GetSystemTime(struct sigcontext_struct *context)
|
static void INT21_GetSystemTime(struct sigcontext_struct *context)
|
||||||
{
|
{
|
||||||
struct tm *now;
|
struct tm *now;
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
|
@ -603,6 +603,92 @@ static void CloseFile(struct sigcontext_struct *context)
|
||||||
RESET_CFLAG(context);
|
RESET_CFLAG(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ExtendedOpenCreateFile(struct sigcontext_struct *context)
|
||||||
|
{
|
||||||
|
dprintf_int(stddeb, "int21: extended open/create: file= %s \n",
|
||||||
|
DOS_GetUnixFileName(PTR_SEG_OFF_TO_LIN(DS_reg(context),SI_reg(context))));
|
||||||
|
/* Shuffle arguments to call OpenExistingFile */
|
||||||
|
AL_reg(context) = BL_reg(context);
|
||||||
|
DX_reg(context) = SI_reg(context);
|
||||||
|
/* BX,CX and DX should be preserved */
|
||||||
|
OpenExistingFile(context);
|
||||||
|
if ((EFL_reg(context) & 0x0001)==0)
|
||||||
|
{ /* It exists */
|
||||||
|
dprintf_int(stddeb, "int21: extended open/create %s exists \n",
|
||||||
|
DOS_GetUnixFileName(PTR_SEG_OFF_TO_LIN(DS_reg(context),SI_reg(context))));
|
||||||
|
/* Now decide what do do */
|
||||||
|
if ((DL_reg(context) & 0x0007)== 0)
|
||||||
|
{
|
||||||
|
BX_reg(context) = AX_reg(context);
|
||||||
|
CloseFile(context);
|
||||||
|
AX_reg(context) = 0x0050;/*File exists*/
|
||||||
|
CX_reg(context) = 0;
|
||||||
|
SET_CFLAG(context);
|
||||||
|
dprintf_int(stddeb, "int21: extended open/create: failed because file exixts \n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if ((DL_reg(context) & 0x0007)== 2) {
|
||||||
|
/* Truncate it, but first check if opend for write */
|
||||||
|
if ((BL_reg(context) & 0x0007)== 0) {
|
||||||
|
BX_reg(context) = AX_reg(context);
|
||||||
|
CloseFile(context);
|
||||||
|
dprintf_int(stddeb, "int21: extended open/create: failed, trunc on ro file");
|
||||||
|
AX_reg(context) = 0x000C;/*Access code invalid*/
|
||||||
|
CX_reg(context) = 0;
|
||||||
|
SET_CFLAG(context);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
/* Shuffle arguments to call CloseFile */
|
||||||
|
dprintf_int(stddeb, "int21: extended open/create: Closing before truncate\n");
|
||||||
|
BX_reg(context) = AX_reg(context);
|
||||||
|
/* BX and DX should be preserved */
|
||||||
|
CloseFile(context);
|
||||||
|
if (EFL_reg(context) & 0x0001) {
|
||||||
|
dprintf_int(stddeb, "int21: extended open/create: close before trunc failed");
|
||||||
|
AX_reg(context) = 0x0019;/*Seek Error*/
|
||||||
|
CX_reg(context) = 0;
|
||||||
|
SET_CFLAG(context);
|
||||||
|
}
|
||||||
|
/* Shuffle arguments to call CreateFile */
|
||||||
|
dprintf_int(stddeb, "int21: extended open/create: Truncating\n");
|
||||||
|
AL_reg(context) = BL_reg(context);
|
||||||
|
/* CX is still the same */
|
||||||
|
DX_reg(context) = SI_reg(context);
|
||||||
|
CreateFile(context);
|
||||||
|
if (EFL_reg(context) & 0x0001) { /*no file open, flags set */
|
||||||
|
dprintf_int(stddeb, "int21: extended open/create: truncfailed");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
CX_reg(context) = 3;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
CX_reg(context) = 1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else /* file does not exist */
|
||||||
|
{
|
||||||
|
dprintf_int(stddeb, "int21: extended open/create %s dosen't exists \n",
|
||||||
|
DOS_GetUnixFileName(PTR_SEG_OFF_TO_LIN(DS_reg(context),SI_reg(context))));
|
||||||
|
if ((DL_reg(context) & 0x00F0)== 0) {
|
||||||
|
CX_reg(context) = 0;
|
||||||
|
SET_CFLAG(context);
|
||||||
|
dprintf_int(stddeb, "int21: extended open/create: failed, file dosen't exist\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
/* Shuffle arguments to call CreateFile */
|
||||||
|
dprintf_int(stddeb, "int21: extended open/create: Creating\n");
|
||||||
|
AL_reg(context) = BL_reg(context);
|
||||||
|
/* CX should still be the same */
|
||||||
|
DX_reg(context) = SI_reg(context);
|
||||||
|
CreateFile(context);
|
||||||
|
if (EFL_reg(context) & 0x0001) { /*no file open, flags set */
|
||||||
|
dprintf_int(stddeb, "int21: extended open/create: create failed\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
CX_reg(context) = 2;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
static void RenameFile(struct sigcontext_struct *context)
|
static void RenameFile(struct sigcontext_struct *context)
|
||||||
{
|
{
|
||||||
char *newname, *oldname;
|
char *newname, *oldname;
|
||||||
|
@ -1312,7 +1398,7 @@ void DOS3Call( struct sigcontext_struct context )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x2c: /* GET SYSTEM TIME */
|
case 0x2c: /* GET SYSTEM TIME */
|
||||||
GetSystemTime(&context);
|
INT21_GetSystemTime(&context);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x2d: /* SET SYSTEM TIME */
|
case 0x2d: /* SET SYSTEM TIME */
|
||||||
|
@ -1738,6 +1824,21 @@ void DOS3Call( struct sigcontext_struct context )
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 0x6C: /* Extended Open/Create*/
|
||||||
|
ExtendedOpenCreateFile(&context);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 0x70: /* MS-DOS 7 (Windows95) - ??? (country-specific?)*/
|
||||||
|
case 0x71: /* MS-DOS 7 (Chicago) - LONG FILENAME FUNCTIONS */
|
||||||
|
case 0x72: /* MS-DOS 7 (Windows95) - ??? */
|
||||||
|
case 0x73: /* MS-DOS 7 (Windows95) - DRIVE LOCKING ??? */
|
||||||
|
dprintf_int(stddeb,"int21: windows95 function AX %04x\n",
|
||||||
|
AX_reg(&context));
|
||||||
|
dprintf_int(stddeb, " returning unimplemented\n");
|
||||||
|
SET_CFLAG(&context);
|
||||||
|
AL_reg(&context) = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
case 0xdc: /* CONNECTION SERVICES - GET CONNECTION NUMBER */
|
case 0xdc: /* CONNECTION SERVICES - GET CONNECTION NUMBER */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -227,7 +227,7 @@ HBITMAP LoadBitmap( HANDLE instance, SEGPTR name )
|
||||||
{
|
{
|
||||||
char *str = (char *)PTR_SEG_TO_LIN( name );
|
char *str = (char *)PTR_SEG_TO_LIN( name );
|
||||||
dprintf_bitmap( stddeb, "LoadBitmap("NPFMT",'%s')\n", instance, str );
|
dprintf_bitmap( stddeb, "LoadBitmap("NPFMT",'%s')\n", instance, str );
|
||||||
if (str[0] == '#') name = (SEGPTR)(WORD)atoi( str + 1 );
|
if (str[0] == '#') name = (SEGPTR)(DWORD)(WORD)atoi( str + 1 );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
dprintf_bitmap( stddeb, "LoadBitmap("NPFMT",%04x)\n",
|
dprintf_bitmap( stddeb, "LoadBitmap("NPFMT",%04x)\n",
|
||||||
|
|
|
@ -368,7 +368,7 @@ static HANDLE CURSORICON_Load( HANDLE hInstance, SEGPTR name, int width,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* Make it owned by the module */
|
/* Make it owned by the module */
|
||||||
FarSetOwner( handle, GetExePtr( hInstance ) );
|
FarSetOwner( handle, (WORD)(DWORD)GetExePtr( hInstance ) );
|
||||||
info = (CURSORICONINFO *)GlobalLock( handle );
|
info = (CURSORICONINFO *)GlobalLock( handle );
|
||||||
info->ptHotSpot.x = hotspot.x;
|
info->ptHotSpot.x = hotspot.x;
|
||||||
info->ptHotSpot.y = hotspot.y;
|
info->ptHotSpot.y = hotspot.y;
|
||||||
|
@ -404,7 +404,7 @@ static HANDLE CURSORICON_Copy( HANDLE hInstance, HANDLE handle )
|
||||||
if (!(hInstance = GetExePtr( hInstance ))) return 0;
|
if (!(hInstance = GetExePtr( hInstance ))) return 0;
|
||||||
size = GlobalSize( handle );
|
size = GlobalSize( handle );
|
||||||
hNew = GlobalAlloc( GMEM_MOVEABLE, size );
|
hNew = GlobalAlloc( GMEM_MOVEABLE, size );
|
||||||
FarSetOwner( hNew, hInstance );
|
FarSetOwner( hNew, (WORD)(DWORD)hInstance );
|
||||||
ptrNew = (char *)GlobalLock( hNew );
|
ptrNew = (char *)GlobalLock( hNew );
|
||||||
memcpy( ptrNew, ptrOld, size );
|
memcpy( ptrNew, ptrOld, size );
|
||||||
GlobalUnlock( handle );
|
GlobalUnlock( handle );
|
||||||
|
|
|
@ -106,8 +106,8 @@ void DC_FillDevCaps( DeviceCaps * caps )
|
||||||
caps->vertRes = screenHeight;
|
caps->vertRes = screenHeight;
|
||||||
caps->bitsPixel = screenDepth;
|
caps->bitsPixel = screenDepth;
|
||||||
caps->planes = 1;
|
caps->planes = 1;
|
||||||
caps->numBrushes = 0;
|
caps->numBrushes = 16+6; /* 16 solid + 6 hatched brushes */
|
||||||
caps->numPens = 0;
|
caps->numPens = 16; /* 16 solid pens */
|
||||||
caps->numMarkers = 0;
|
caps->numMarkers = 0;
|
||||||
caps->numFonts = 0;
|
caps->numFonts = 0;
|
||||||
caps->numColors = 1 << caps->bitsPixel;
|
caps->numColors = 1 << caps->bitsPixel;
|
||||||
|
|
|
@ -192,32 +192,6 @@ BOOL GDI_Init(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* GDI_AppendToPenBrushList
|
|
||||||
*/
|
|
||||||
BOOL GDI_AppendToPenBrushList(HANDLE hNewObj)
|
|
||||||
{
|
|
||||||
HANDLE *lphObj;
|
|
||||||
int i = 1;
|
|
||||||
if (hNewObj == 0) return FALSE;
|
|
||||||
if (lpPenBrushList == NULL) {
|
|
||||||
lpPenBrushList = xmalloc(MAX_OBJ * sizeof(HANDLE));
|
|
||||||
lpPenBrushList[0] = 0;
|
|
||||||
dprintf_gdi(stddeb,"GDI_AppendToPenBrushList() lpPenBrushList allocated !\n");
|
|
||||||
}
|
|
||||||
for (lphObj = lpPenBrushList; i < MAX_OBJ; i++) {
|
|
||||||
if (*lphObj == 0) {
|
|
||||||
*lphObj = hNewObj;
|
|
||||||
*(lphObj + 1) = 0;
|
|
||||||
dprintf_gdi(stddeb,"GDI_AppendToPenBrushList("NPFMT") appended (count=%d)\n", hNewObj, i);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
lphObj++;
|
|
||||||
}
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GDI_AllocObject
|
* GDI_AllocObject
|
||||||
*/
|
*/
|
||||||
|
@ -231,9 +205,6 @@ HANDLE GDI_AllocObject( WORD size, WORD magic )
|
||||||
obj->hNext = 0;
|
obj->hNext = 0;
|
||||||
obj->wMagic = magic;
|
obj->wMagic = magic;
|
||||||
obj->dwCount = ++count;
|
obj->dwCount = ++count;
|
||||||
if (magic == PEN_MAGIC || magic == BRUSH_MAGIC) {
|
|
||||||
GDI_AppendToPenBrushList(handle);
|
|
||||||
}
|
|
||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -406,8 +377,71 @@ BOOL UnrealizeObject( HANDLE handle )
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* EnumObjects (GDI.71)
|
* EnumObjects (GDI.71)
|
||||||
*/
|
*/
|
||||||
int EnumObjects(HDC hDC, int nObjType, FARPROC lpEnumFunc, LPSTR lpData)
|
int EnumObjects( HDC hdc, int nObjType, FARPROC lpEnumFunc, LPARAM lParam )
|
||||||
{
|
{
|
||||||
|
/* Solid colors to enumerate */
|
||||||
|
static const COLORREF solid_colors[] =
|
||||||
|
{ RGB(0x00,0x00,0x00), RGB(0xff,0xff,0xff),
|
||||||
|
RGB(0xff,0x00,0x00), RGB(0x00,0xff,0x00),
|
||||||
|
RGB(0x00,0x00,0xff), RGB(0xff,0xff,0x00),
|
||||||
|
RGB(0xff,0x00,0xff), RGB(0x00,0xff,0xff),
|
||||||
|
RGB(0x80,0x00,0x00), RGB(0x00,0x80,0x00),
|
||||||
|
RGB(0x80,0x80,0x00), RGB(0x00,0x00,0x80),
|
||||||
|
RGB(0x80,0x00,0x80), RGB(0x00,0x80,0x80),
|
||||||
|
RGB(0x80,0x80,0x80), RGB(0xc0,0xc0,0xc0)
|
||||||
|
};
|
||||||
|
|
||||||
|
int i, retval = 0;
|
||||||
|
|
||||||
|
dprintf_gdi( stddeb, "EnumObjects: "NPFMT" %d %08lx %08lx\n",
|
||||||
|
hdc, nObjType, (DWORD)lpEnumFunc, lParam );
|
||||||
|
switch(nObjType)
|
||||||
|
{
|
||||||
|
case OBJ_PEN:
|
||||||
|
/* Enumerate solid pens */
|
||||||
|
for (i = 0; i < sizeof(solid_colors)/sizeof(solid_colors[0]); i++)
|
||||||
|
{
|
||||||
|
LOGPEN pen = { PS_SOLID, { 1, 0 }, solid_colors[i] };
|
||||||
|
retval = CallEnumObjectsProc( lpEnumFunc, MAKE_SEGPTR(&pen),
|
||||||
|
lParam );
|
||||||
|
dprintf_gdi( stddeb, "EnumObject: solid pen %08lx, ret=%d\n",
|
||||||
|
solid_colors[i], retval);
|
||||||
|
if (!retval) break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case OBJ_BRUSH:
|
||||||
|
/* Enumerate solid brushes */
|
||||||
|
for (i = 0; i < sizeof(solid_colors)/sizeof(solid_colors[0]); i++)
|
||||||
|
{
|
||||||
|
LOGBRUSH brush = { BS_SOLID, solid_colors[i], 0 };
|
||||||
|
retval = CallEnumObjectsProc( lpEnumFunc, MAKE_SEGPTR(&brush),
|
||||||
|
lParam );
|
||||||
|
dprintf_gdi( stddeb, "EnumObject: solid brush %08lx, ret=%d\n",
|
||||||
|
solid_colors[i], retval);
|
||||||
|
if (!retval) break;
|
||||||
|
}
|
||||||
|
if (!retval) break;
|
||||||
|
|
||||||
|
/* Now enumerate hatched brushes */
|
||||||
|
for (i = HS_HORIZONTAL; i <= HS_DIAGCROSS; i++)
|
||||||
|
{
|
||||||
|
LOGBRUSH brush = { BS_HATCHED, RGB(0,0,0), i };
|
||||||
|
retval = CallEnumObjectsProc( lpEnumFunc, MAKE_SEGPTR(&brush),
|
||||||
|
lParam );
|
||||||
|
dprintf_gdi( stddeb, "EnumObject: hatched brush %d, ret=%d\n",
|
||||||
|
i, retval);
|
||||||
|
if (!retval) break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
fprintf( stderr, "EnumObjects: invalid type %d\n", nObjType );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return retval;
|
||||||
|
#if 0
|
||||||
|
|
||||||
/* HANDLE handle;
|
/* HANDLE handle;
|
||||||
DC *dc;*/
|
DC *dc;*/
|
||||||
HANDLE *lphObj;
|
HANDLE *lphObj;
|
||||||
|
@ -508,8 +542,10 @@ int EnumObjects(HDC hDC, int nObjType, FARPROC lpEnumFunc, LPSTR lpData)
|
||||||
GDI_HEAP_FREE(hLog);
|
GDI_HEAP_FREE(hLog);
|
||||||
dprintf_gdi(stddeb,"EnumObjects // End of enumeration !\n");
|
dprintf_gdi(stddeb,"EnumObjects // End of enumeration !\n");
|
||||||
return nRet;
|
return nRet;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* IsGDIObject(GDI.462)
|
* IsGDIObject(GDI.462)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -910,7 +910,7 @@ BOOL MF_CreatePatternBrush(DC *dc, HBRUSH hBrush, LOGBRUSH *logbrush)
|
||||||
infohdr->biPlanes = bmp->bitmap.bmPlanes;
|
infohdr->biPlanes = bmp->bitmap.bmPlanes;
|
||||||
infohdr->biBitCount = bmp->bitmap.bmBitsPixel;
|
infohdr->biBitCount = bmp->bitmap.bmBitsPixel;
|
||||||
memcpy(mr->rdParam + (sizeof(BITMAPINFOHEADER) / 2) + 4,
|
memcpy(mr->rdParam + (sizeof(BITMAPINFOHEADER) / 2) + 4,
|
||||||
bmp->bitmap.bmBits,
|
PTR_SEG_TO_LIN(bmp->bitmap.bmBits),
|
||||||
bmp->bitmap.bmHeight * bmp->bitmap.bmWidthBytes);
|
bmp->bitmap.bmHeight * bmp->bitmap.bmWidthBytes);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -1,40 +1,24 @@
|
||||||
TOPSRC = @top_srcdir@
|
TOPSRC = @top_srcdir@
|
||||||
|
|
||||||
MODULE = rc
|
PROGRAM = winerc
|
||||||
|
MODULE = none
|
||||||
|
|
||||||
C_SRCS = sysres.c
|
C_SRCS = y.tab.c lex.yy.c winerc.c
|
||||||
|
|
||||||
LANGUAGES = En Es De No Fr Fi Da
|
all: $(PROGRAM)
|
||||||
|
|
||||||
all: $(MODULE).o
|
|
||||||
|
|
||||||
@MAKE_RULES@
|
@MAKE_RULES@
|
||||||
|
|
||||||
|
$(PROGRAM): $(OBJS)
|
||||||
|
$(CC) $(CFLAGS) -o winerc $(OBJS) $(LEXLIB)
|
||||||
|
|
||||||
y.tab.c y.tab.h: parser.y
|
y.tab.c y.tab.h: parser.y
|
||||||
$(YACC) -d -t parser.y
|
$(YACC) -d -t parser.y
|
||||||
|
|
||||||
lex.yy.c: parser.l
|
lex.yy.c: parser.l
|
||||||
$(LEX) -8 -I parser.l
|
$(LEX) -8 -I parser.l
|
||||||
|
|
||||||
winerc: lex.yy.o winerc.o y.tab.o
|
|
||||||
$(CC) $(ALLCFLAGS) lex.yy.o winerc.o y.tab.o -o winerc $(LEXLIB)
|
|
||||||
|
|
||||||
sysres.rct: sysres.rc $(LANGUAGES:%=sysres_%.rc)
|
|
||||||
echo "#include \"windows.h\"" >sysres.rct
|
|
||||||
echo WINDOWS_H_ENDS_HERE >>sysres.rct
|
|
||||||
cat sysres.rc >>sysres.rct
|
|
||||||
|
|
||||||
sysres.c sysres.h: sysres.rct winerc
|
|
||||||
$(CC) $(ALLCFLAGS) -E -x c -P sysres.rct | sed -e '1,/^WINDOWS_H_ENDS_HERE/d' | ./winerc -o sysres -v -p sysres
|
|
||||||
|
|
||||||
clean::
|
clean::
|
||||||
$(RM) lex.yy.c sysres.rct winerc y.tab.c y.tab.h sysres.c sysres.h
|
$(RM) y.tab.c y.tab.h lex.yy.c $(PROGRAM)
|
||||||
|
|
||||||
langclean::
|
|
||||||
$(RM) sysres.c sysres.h sysres.o
|
|
||||||
|
|
||||||
y.tab.o: y.tab.c y.tab.h parser.h
|
|
||||||
lex.yy.o: lex.yy.c y.tab.h parser.h
|
|
||||||
winerc.o: $(TOPSRC)/include/windows.h $(TOPSRC)/include/neexe.h parser.h y.tab.h
|
|
||||||
|
|
||||||
### Dependencies:
|
### Dependencies:
|
||||||
|
|
17
rc/sysres.rc
17
rc/sysres.rc
|
@ -1,17 +0,0 @@
|
||||||
#if #LANG(En)
|
|
||||||
#include "sysres_En.rc"
|
|
||||||
#elif #LANG(De)
|
|
||||||
#include "sysres_De.rc"
|
|
||||||
#elif #LANG(No)
|
|
||||||
#include "sysres_No.rc"
|
|
||||||
#elif #LANG(Es)
|
|
||||||
#include "sysres_Es.rc"
|
|
||||||
#elif #LANG(Fr)
|
|
||||||
#include "sysres_Fr.rc"
|
|
||||||
#elif #LANG(Fi)
|
|
||||||
#include "sysres_Fi.rc"
|
|
||||||
#elif #LANG(Da)
|
|
||||||
#include "sysres_Da.rc"
|
|
||||||
#else
|
|
||||||
#error LANG not set to an implemented language.
|
|
||||||
#endif
|
|
34
rc/winerc.c
34
rc/winerc.c
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
char usage[]="winerc -bdvc -p prefix -o outfile < infile \n"
|
char usage[]="winerc -bdvc -p prefix -o outfile < infile \n"
|
||||||
" -b Create a C array from a binary .res file\n"
|
" -b Create a C array from a binary .res file\n"
|
||||||
|
" -c Add 'const' prefix to C constants\n"
|
||||||
" -d Output debugging information\n"
|
" -d Output debugging information\n"
|
||||||
" -p prefix Give a prefix for the generated names\n"
|
" -p prefix Give a prefix for the generated names\n"
|
||||||
" -v Show each resource as it is processed\n"
|
" -v Show each resource as it is processed\n"
|
||||||
|
@ -54,7 +55,7 @@ int main(int argc,char *argv[])
|
||||||
extern char* optarg;
|
extern char* optarg;
|
||||||
int optc,lose,ret,binary;
|
int optc,lose,ret,binary;
|
||||||
lose=binary=0;
|
lose=binary=0;
|
||||||
while((optc=getopt(argc,argv,"bdp:vo:"))!=EOF)
|
while((optc=getopt(argc,argv,"bcdp:vo:"))!=EOF)
|
||||||
switch(optc)
|
switch(optc)
|
||||||
{
|
{
|
||||||
/* bison will print state transitions on stderr */
|
/* bison will print state transitions on stderr */
|
||||||
|
@ -546,8 +547,8 @@ void create_output(gen_res* top)
|
||||||
for (it=top;it;it=it->next)
|
for (it=top;it;it=it->next)
|
||||||
fprintf( header,"extern %sstruct resource %s;\n",
|
fprintf( header,"extern %sstruct resource %s;\n",
|
||||||
ISCONSTANT, get_resource_name(it) );
|
ISCONSTANT, get_resource_name(it) );
|
||||||
fprintf( header,"\nextern %sstruct resource * %sTable[];\n",
|
fprintf( header,"\nextern %sstruct resource * %s%s_Table[];\n",
|
||||||
ISCONSTANT, prefix );
|
ISCONSTANT, ISCONSTANT, prefix );
|
||||||
|
|
||||||
/* Print the resources bytes */
|
/* Print the resources bytes */
|
||||||
|
|
||||||
|
@ -562,10 +563,10 @@ void create_output(gen_res* top)
|
||||||
ISCONSTANT, get_resource_name(it) );
|
ISCONSTANT, get_resource_name(it) );
|
||||||
for (i=0;i<it->size-1;i++)
|
for (i=0;i<it->size-1;i++)
|
||||||
{
|
{
|
||||||
fprintf(code,"%#4x,",it->res[i]);
|
fprintf(code,"0x%02x, ",it->res[i]);
|
||||||
if ((i&7)==7)fputc('\n',code);
|
if ((i&7)==7)fputc('\n',code);
|
||||||
}
|
}
|
||||||
fprintf(code,"%#4x};\n\n",it->res[i]);
|
fprintf(code,"0x%02x };\n\n",it->res[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Print the resources */
|
/* Print the resources */
|
||||||
|
@ -574,15 +575,15 @@ void create_output(gen_res* top)
|
||||||
int type;
|
int type;
|
||||||
switch(it->type)
|
switch(it->type)
|
||||||
{
|
{
|
||||||
case acc:type=RT_ACCELERATOR;break;
|
case acc:type=(int)RT_ACCELERATOR;break;
|
||||||
case bmp:type=RT_BITMAP;break;
|
case bmp:type=(int)RT_BITMAP;break;
|
||||||
case cur:type=RT_CURSOR;break;
|
case cur:type=(int)RT_CURSOR;break;
|
||||||
case dlg:type=RT_DIALOG;break;
|
case dlg:type=(int)RT_DIALOG;break;
|
||||||
case fnt:type=RT_FONT;break;
|
case fnt:type=(int)RT_FONT;break;
|
||||||
case ico:type=RT_ICON;break;
|
case ico:type=(int)RT_ICON;break;
|
||||||
case men:type=RT_MENU;break;
|
case men:type=(int)RT_MENU;break;
|
||||||
case rdt:type=RT_RCDATA;break;
|
case rdt:type=(int)RT_RCDATA;break;
|
||||||
case str:type=RT_STRING;break;
|
case str:type=(int)RT_STRING;break;
|
||||||
default:fprintf(stderr,"Unknown restype\n");type=-1;break;
|
default:fprintf(stderr,"Unknown restype\n");type=-1;break;
|
||||||
}
|
}
|
||||||
if(it->n_type)
|
if(it->n_type)
|
||||||
|
@ -597,7 +598,8 @@ void create_output(gen_res* top)
|
||||||
|
|
||||||
/* Print the resource table (NULL terminated) */
|
/* Print the resource table (NULL terminated) */
|
||||||
|
|
||||||
fprintf(code,"\n%sstruct resource * %sTable[] = {\n", ISCONSTANT, prefix);
|
fprintf(code,"\n%sstruct resource * %s%s_Table[] = {\n",
|
||||||
|
ISCONSTANT, ISCONSTANT, prefix);
|
||||||
for (it=top;it;it=it->next)
|
for (it=top;it;it=it->next)
|
||||||
fprintf( code, " &%s,\n", get_resource_name(it) );
|
fprintf( code, " &%s,\n", get_resource_name(it) );
|
||||||
fprintf( code, " 0\n};\n" );
|
fprintf( code, " 0\n};\n" );
|
||||||
|
@ -608,7 +610,7 @@ void create_output(gen_res* top)
|
||||||
"static void DoIt() WINE_CONSTRUCTOR;\n"
|
"static void DoIt() WINE_CONSTRUCTOR;\n"
|
||||||
"static void DoIt()\n"
|
"static void DoIt()\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
"\tLIBRES_RegisterResources(%sTable);\n"
|
"\tLIBRES_RegisterResources(%s_Table);\n"
|
||||||
"}\n\n"
|
"}\n\n"
|
||||||
"#ifndef HAVE_WINE_CONSTRUCTOR\n"
|
"#ifndef HAVE_WINE_CONSTRUCTOR\n"
|
||||||
"void LIBWINE_Register_%s(){\n"
|
"void LIBWINE_Register_%s(){\n"
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
TOPSRC = @top_srcdir@
|
||||||
|
|
||||||
|
MODULE = resources
|
||||||
|
|
||||||
|
LANGUAGES = En Es De No Fr Fi Da
|
||||||
|
|
||||||
|
SYSRES_SRCS = $(LANGUAGES:%=sysres_%.c)
|
||||||
|
|
||||||
|
C_SRCS = $(SYSRES_SRCS) sysres.c
|
||||||
|
|
||||||
|
all: check_winerc $(MODULE).o
|
||||||
|
|
||||||
|
@MAKE_RULES@
|
||||||
|
|
||||||
|
$(SYSRES_SRCS): $(WINERC)
|
||||||
|
|
||||||
|
clean::
|
||||||
|
$(RM) $(SYSRES_SRCS) $(SYSRES_SRCS:.c=.h)
|
||||||
|
|
||||||
|
### Dependencies:
|
|
@ -0,0 +1,56 @@
|
||||||
|
/*
|
||||||
|
* System resources loading
|
||||||
|
*
|
||||||
|
* Copyright 1995 Alexandre Julliard
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "windows.h"
|
||||||
|
#include "global.h"
|
||||||
|
#include "options.h"
|
||||||
|
#include "resource.h"
|
||||||
|
|
||||||
|
#include "sysres_En.h"
|
||||||
|
#include "sysres_Es.h"
|
||||||
|
#include "sysres_De.h"
|
||||||
|
#include "sysres_No.h"
|
||||||
|
#include "sysres_Fr.h"
|
||||||
|
#include "sysres_Fi.h"
|
||||||
|
#include "sysres_Da.h"
|
||||||
|
|
||||||
|
|
||||||
|
static const struct resource * const * SYSRES_Resources[] =
|
||||||
|
{
|
||||||
|
sysres_En_Table, /* LANG_En */
|
||||||
|
sysres_Es_Table, /* LANG_Es */
|
||||||
|
sysres_De_Table, /* LANG_De */
|
||||||
|
sysres_No_Table, /* LANG_No */
|
||||||
|
sysres_Fr_Table, /* LANG_Fr */
|
||||||
|
sysres_Fi_Table, /* LANG_Fi */
|
||||||
|
sysres_Da_Table /* LANG_Da */
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* SYSRES_LoadResource
|
||||||
|
*
|
||||||
|
* Create a global memory block for a system resource.
|
||||||
|
*/
|
||||||
|
HANDLE SYSRES_LoadResource( SYSTEM_RESOURCE id )
|
||||||
|
{
|
||||||
|
const struct resource *resPtr;
|
||||||
|
|
||||||
|
resPtr = SYSRES_Resources[Options.language][id];
|
||||||
|
return GLOBAL_CreateBlock( GMEM_FIXED, resPtr->bytes, resPtr->size,
|
||||||
|
GetCurrentPDB(), FALSE, FALSE, TRUE, NULL );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* SYSRES_FreeResource
|
||||||
|
*
|
||||||
|
* Free a global memory block for a system resource.
|
||||||
|
*/
|
||||||
|
void SYSRES_FreeResource( HANDLE handle )
|
||||||
|
{
|
||||||
|
GLOBAL_FreeBlock( handle );
|
||||||
|
}
|
|
@ -1,40 +0,0 @@
|
||||||
TOPSRC = @top_srcdir@
|
|
||||||
X_LIBS = @X_LIBS@
|
|
||||||
XLIB = @X_PRE_LIBS@ -lXext -lX11 @X_EXTRA_LIBS@
|
|
||||||
MODULE = toolkit
|
|
||||||
|
|
||||||
C_SRCS = \
|
|
||||||
atom.c \
|
|
||||||
arch.c \
|
|
||||||
heap.c \
|
|
||||||
libres.c \
|
|
||||||
miscstubs.c \
|
|
||||||
sup.c \
|
|
||||||
winmain.c
|
|
||||||
|
|
||||||
all: $(MODULE).o
|
|
||||||
|
|
||||||
hello: hello.o ../winelib.a
|
|
||||||
gcc -g -o hello hello.o ../winelib.a -lm $(X_LIBS) -lXpm $(XLIB)
|
|
||||||
|
|
||||||
hello2: hello2.o ../winelib.a
|
|
||||||
gcc -g -o hello2 hello2.o ../winelib.a -lm $(X_LIBS) -lXpm $(XLIB)
|
|
||||||
|
|
||||||
hello3: hello3res.o hello3.o
|
|
||||||
gcc -g -o hello3 hello3.o hello3res.o ../winelib.a -lm $(X_LIBS) -lXpm $(XLIB)
|
|
||||||
|
|
||||||
hello3.o: hello3res.o
|
|
||||||
|
|
||||||
hello3res.o: hello3res.rc
|
|
||||||
echo "#include \"windows.h\"" >hello3res.rct
|
|
||||||
echo WINDOWS_H_ENDS_HERE >>hello3res.rct
|
|
||||||
cat hello3res.rc >>hello3res.rct
|
|
||||||
$(CC) $(ALLCFLAGS) -E -x c -P hello3res.rct | sed -e '1,/^WINDOWS_H_ENDS_HERE/d' | ../rc/winerc -o hello3res -v -p hello3
|
|
||||||
gcc -c $(ALLCFLAGS) hello3res.c
|
|
||||||
|
|
||||||
@MAKE_RULES@
|
|
||||||
|
|
||||||
clean::
|
|
||||||
$(RM) hello hello2 hello3
|
|
||||||
|
|
||||||
### Dependencies:
|
|
|
@ -808,7 +808,7 @@ static void BuildSpec32Files( char *specname )
|
||||||
if(fdp->arg_types[argno]!='.') putchar( 'a'+argno );
|
if(fdp->arg_types[argno]!='.') putchar( 'a'+argno );
|
||||||
if (argno!=argc-1) putchar( ',' );
|
if (argno!=argc-1) putchar( ',' );
|
||||||
}
|
}
|
||||||
printf( ") __attribute((stdcall));" );
|
printf( ") __attribute((stdcall));\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
printf( "void %s_%d(", UpperDLLName, i);
|
printf( "void %s_%d(", UpperDLLName, i);
|
||||||
|
@ -1071,15 +1071,15 @@ static void BuildCall32LargeStack(void)
|
||||||
|
|
||||||
printf( "\tmovl " PREFIX "IF1632_Original32_esp, %%eax\n" );
|
printf( "\tmovl " PREFIX "IF1632_Original32_esp, %%eax\n" );
|
||||||
printf( "\torl %%eax,%%eax\n" );
|
printf( "\torl %%eax,%%eax\n" );
|
||||||
printf( "\tje 0f\n" );
|
printf( "\tje no_orig_esp\n" );
|
||||||
printf( "\tmovl %%eax,%%esp\n" );
|
printf( "\tmovl %%eax,%%esp\n" );
|
||||||
printf( "0:\n" );
|
printf( "no_orig_esp:\n" );
|
||||||
|
|
||||||
/* Transfer the arguments */
|
/* Transfer the arguments */
|
||||||
|
|
||||||
printf( "\tmovl 12(%%ebp),%%ecx\n" );
|
printf( "\tmovl 12(%%ebp),%%ecx\n" );
|
||||||
printf( "\torl %%ecx,%%ecx\n" );
|
printf( "\torl %%ecx,%%ecx\n" );
|
||||||
printf( "\tje 1f\n" );
|
printf( "\tje no_args\n" );
|
||||||
printf( "\tleal 16(%%ebp),%%esi\n" );
|
printf( "\tleal 16(%%ebp),%%esi\n" );
|
||||||
printf( "\tshll $2,%%ecx\n" );
|
printf( "\tshll $2,%%ecx\n" );
|
||||||
printf( "\tsubl %%ecx,%%esp\n" );
|
printf( "\tsubl %%ecx,%%esp\n" );
|
||||||
|
@ -1087,7 +1087,7 @@ static void BuildCall32LargeStack(void)
|
||||||
printf( "\tshrl $2,%%ecx\n" );
|
printf( "\tshrl $2,%%ecx\n" );
|
||||||
printf( "\tcld\n" );
|
printf( "\tcld\n" );
|
||||||
printf( "\trep; movsl\n" );
|
printf( "\trep; movsl\n" );
|
||||||
printf( "1:\n" );
|
printf( "no_args:\n" );
|
||||||
|
|
||||||
/* Call the function */
|
/* Call the function */
|
||||||
|
|
||||||
|
@ -1321,6 +1321,9 @@ static void BuildCall32Func( char *profile )
|
||||||
|
|
||||||
printf( "\tpushw " PREFIX "IF1632_Saved16_sp\n" );
|
printf( "\tpushw " PREFIX "IF1632_Saved16_sp\n" );
|
||||||
printf( "\tpushw " PREFIX "IF1632_Saved16_ss\n" );
|
printf( "\tpushw " PREFIX "IF1632_Saved16_ss\n" );
|
||||||
|
#ifdef __svr4__
|
||||||
|
printf("\tdata16\n");
|
||||||
|
#endif
|
||||||
printf( "\tmovw %%ss," PREFIX "IF1632_Saved16_ss\n" );
|
printf( "\tmovw %%ss," PREFIX "IF1632_Saved16_ss\n" );
|
||||||
printf( "\tmovw %%sp," PREFIX "IF1632_Saved16_sp\n" );
|
printf( "\tmovw %%sp," PREFIX "IF1632_Saved16_sp\n" );
|
||||||
|
|
||||||
|
@ -1380,9 +1383,18 @@ static void BuildCall32Func( char *profile )
|
||||||
|
|
||||||
/* Restore the 16-bit stack */
|
/* Restore the 16-bit stack */
|
||||||
|
|
||||||
|
#ifdef __svr4__
|
||||||
|
printf( "\tdata16\n");
|
||||||
|
#endif
|
||||||
printf( "\tmovw " PREFIX "IF1632_Saved16_ss,%%ss\n" );
|
printf( "\tmovw " PREFIX "IF1632_Saved16_ss,%%ss\n" );
|
||||||
printf( "\tmovw " PREFIX "IF1632_Saved16_sp,%%sp\n" );
|
printf( "\tmovw " PREFIX "IF1632_Saved16_sp,%%sp\n" );
|
||||||
|
#ifdef __svr4__
|
||||||
|
printf( "\tdata16\n");
|
||||||
|
#endif
|
||||||
printf( "\tpopw " PREFIX "IF1632_Saved16_ss\n" );
|
printf( "\tpopw " PREFIX "IF1632_Saved16_ss\n" );
|
||||||
|
#ifdef __svr4__
|
||||||
|
printf( "\tdata16\n");
|
||||||
|
#endif
|
||||||
printf( "\tpopw " PREFIX "IF1632_Saved16_sp\n" );
|
printf( "\tpopw " PREFIX "IF1632_Saved16_sp\n" );
|
||||||
|
|
||||||
if (reg_func)
|
if (reg_func)
|
||||||
|
@ -1547,6 +1559,9 @@ static void BuildCall16Func( char *profile )
|
||||||
|
|
||||||
/* Switch to the 16-bit stack */
|
/* Switch to the 16-bit stack */
|
||||||
|
|
||||||
|
#ifdef __svr4__
|
||||||
|
printf("\tdata16\n");
|
||||||
|
#endif
|
||||||
printf( "\tmovw " PREFIX "IF1632_Saved16_ss,%%ss\n" );
|
printf( "\tmovw " PREFIX "IF1632_Saved16_ss,%%ss\n" );
|
||||||
printf( "\tmovw " PREFIX "IF1632_Saved16_sp,%%sp\n" );
|
printf( "\tmovw " PREFIX "IF1632_Saved16_sp,%%sp\n" );
|
||||||
|
|
||||||
|
@ -1608,6 +1623,9 @@ static void BuildCall16Func( char *profile )
|
||||||
{
|
{
|
||||||
/* Set ax equal to ds for window procedures */
|
/* Set ax equal to ds for window procedures */
|
||||||
printf( "\tmovw 16(%%ebx),%%ax\n" );
|
printf( "\tmovw 16(%%ebx),%%ax\n" );
|
||||||
|
#ifdef __svr4__
|
||||||
|
printf( "\tdata16\n");
|
||||||
|
#endif
|
||||||
printf( "\tmovw %%ax,%%ds\n" );
|
printf( "\tmovw %%ax,%%ds\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1639,8 +1657,17 @@ static void BuildRet16Func()
|
||||||
/* Restore 32-bit segment registers */
|
/* Restore 32-bit segment registers */
|
||||||
|
|
||||||
printf( "\tmovw $0x%04x,%%bx\n", WINE_DATA_SELECTOR );
|
printf( "\tmovw $0x%04x,%%bx\n", WINE_DATA_SELECTOR );
|
||||||
|
#ifdef __svr4__
|
||||||
|
printf( "\tdata16\n");
|
||||||
|
#endif
|
||||||
printf( "\tmovw %%bx,%%ds\n" );
|
printf( "\tmovw %%bx,%%ds\n" );
|
||||||
|
#ifdef __svr4__
|
||||||
|
printf( "\tdata16\n");
|
||||||
|
#endif
|
||||||
printf( "\tmovw %%bx,%%es\n" );
|
printf( "\tmovw %%bx,%%es\n" );
|
||||||
|
#ifdef __svr4__
|
||||||
|
printf( "\tdata16\n");
|
||||||
|
#endif
|
||||||
printf( "\tmovw %%bx,%%ss\n" );
|
printf( "\tmovw %%bx,%%ss\n" );
|
||||||
|
|
||||||
/* Restore the 32-bit stack */
|
/* Restore the 32-bit stack */
|
||||||
|
|
|
@ -0,0 +1,238 @@
|
||||||
|
#! /bin/sh
|
||||||
|
#
|
||||||
|
# install - install a program, script, or datafile
|
||||||
|
# This comes from X11R5.
|
||||||
|
#
|
||||||
|
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||||
|
# `make' implicit rules from creating a file called install from it
|
||||||
|
# when there is no Makefile.
|
||||||
|
#
|
||||||
|
# This script is compatible with the BSD install script, but was written
|
||||||
|
# from scratch.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
# set DOITPROG to echo to test this script
|
||||||
|
|
||||||
|
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||||
|
doit="${DOITPROG-}"
|
||||||
|
|
||||||
|
|
||||||
|
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||||
|
|
||||||
|
mvprog="${MVPROG-mv}"
|
||||||
|
cpprog="${CPPROG-cp}"
|
||||||
|
chmodprog="${CHMODPROG-chmod}"
|
||||||
|
chownprog="${CHOWNPROG-chown}"
|
||||||
|
chgrpprog="${CHGRPPROG-chgrp}"
|
||||||
|
stripprog="${STRIPPROG-strip}"
|
||||||
|
rmprog="${RMPROG-rm}"
|
||||||
|
mkdirprog="${MKDIRPROG-mkdir}"
|
||||||
|
|
||||||
|
tranformbasename=""
|
||||||
|
transform_arg=""
|
||||||
|
instcmd="$mvprog"
|
||||||
|
chmodcmd="$chmodprog 0755"
|
||||||
|
chowncmd=""
|
||||||
|
chgrpcmd=""
|
||||||
|
stripcmd=""
|
||||||
|
rmcmd="$rmprog -f"
|
||||||
|
mvcmd="$mvprog"
|
||||||
|
src=""
|
||||||
|
dst=""
|
||||||
|
dir_arg=""
|
||||||
|
|
||||||
|
while [ x"$1" != x ]; do
|
||||||
|
case $1 in
|
||||||
|
-c) instcmd="$cpprog"
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-d) dir_arg=true
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-m) chmodcmd="$chmodprog $2"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-o) chowncmd="$chownprog $2"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-g) chgrpcmd="$chgrpprog $2"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-s) stripcmd="$stripprog"
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
*) if [ x"$src" = x ]
|
||||||
|
then
|
||||||
|
src=$1
|
||||||
|
else
|
||||||
|
# this colon is to work around a 386BSD /bin/sh bug
|
||||||
|
:
|
||||||
|
dst=$1
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ x"$src" = x ]
|
||||||
|
then
|
||||||
|
echo "install: no input file specified"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
true
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ x"$dir_arg" != x ]; then
|
||||||
|
dst=$src
|
||||||
|
src=""
|
||||||
|
|
||||||
|
if [ -d $dst ]; then
|
||||||
|
instcmd=:
|
||||||
|
else
|
||||||
|
instcmd=mkdir
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
|
||||||
|
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||||
|
# might cause directories to be created, which would be especially bad
|
||||||
|
# if $src (and thus $dsttmp) contains '*'.
|
||||||
|
|
||||||
|
if [ -f $src -o -d $src ]
|
||||||
|
then
|
||||||
|
true
|
||||||
|
else
|
||||||
|
echo "install: $src does not exist"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ x"$dst" = x ]
|
||||||
|
then
|
||||||
|
echo "install: no destination specified"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If destination is a directory, append the input filename; if your system
|
||||||
|
# does not like double slashes in filenames, you may need to add some logic
|
||||||
|
|
||||||
|
if [ -d $dst ]
|
||||||
|
then
|
||||||
|
dst="$dst"/`basename $src`
|
||||||
|
else
|
||||||
|
true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
## this sed command emulates the dirname command
|
||||||
|
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||||
|
|
||||||
|
# Make sure that the destination directory exists.
|
||||||
|
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||||
|
|
||||||
|
# Skip lots of stat calls in the usual case.
|
||||||
|
if [ ! -d "$dstdir" ]; then
|
||||||
|
defaultIFS='
|
||||||
|
'
|
||||||
|
IFS="${IFS-${defaultIFS}}"
|
||||||
|
|
||||||
|
oIFS="${IFS}"
|
||||||
|
# Some sh's can't handle IFS=/ for some reason.
|
||||||
|
IFS='%'
|
||||||
|
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||||
|
IFS="${oIFS}"
|
||||||
|
|
||||||
|
pathcomp=''
|
||||||
|
|
||||||
|
while [ $# -ne 0 ] ; do
|
||||||
|
pathcomp="${pathcomp}${1}"
|
||||||
|
shift
|
||||||
|
|
||||||
|
if [ ! -d "${pathcomp}" ] ;
|
||||||
|
then
|
||||||
|
$mkdirprog "${pathcomp}"
|
||||||
|
else
|
||||||
|
true
|
||||||
|
fi
|
||||||
|
|
||||||
|
pathcomp="${pathcomp}/"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ x"$dir_arg" != x ]
|
||||||
|
then
|
||||||
|
$doit $instcmd $dst &&
|
||||||
|
|
||||||
|
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
||||||
|
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
||||||
|
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
||||||
|
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
||||||
|
else
|
||||||
|
|
||||||
|
# If we're going to rename the final executable, determine the name now.
|
||||||
|
|
||||||
|
if [ x"$transformarg" = x ]
|
||||||
|
then
|
||||||
|
dstfile=`basename $dst`
|
||||||
|
else
|
||||||
|
dstfile=`basename $dst $transformbasename |
|
||||||
|
sed $transformarg`$transformbasename
|
||||||
|
fi
|
||||||
|
|
||||||
|
# don't allow the sed command to completely eliminate the filename
|
||||||
|
|
||||||
|
if [ x"$dstfile" = x ]
|
||||||
|
then
|
||||||
|
dstfile=`basename $dst`
|
||||||
|
else
|
||||||
|
true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Make a temp file name in the proper directory.
|
||||||
|
|
||||||
|
dsttmp=$dstdir/#inst.$$#
|
||||||
|
|
||||||
|
# Move or copy the file name to the temp name
|
||||||
|
|
||||||
|
$doit $instcmd $src $dsttmp &&
|
||||||
|
|
||||||
|
trap "rm -f ${dsttmp}" 0 &&
|
||||||
|
|
||||||
|
# and set any options; do chmod last to preserve setuid bits
|
||||||
|
|
||||||
|
# If any of these fail, we abort the whole thing. If we want to
|
||||||
|
# ignore errors from any of these, just make sure not to ignore
|
||||||
|
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||||
|
|
||||||
|
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
||||||
|
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
||||||
|
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
||||||
|
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
||||||
|
|
||||||
|
# Now rename the file to the real destination.
|
||||||
|
|
||||||
|
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||||
|
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||||
|
|
||||||
|
fi &&
|
||||||
|
|
||||||
|
|
||||||
|
exit 0
|
|
@ -35,6 +35,7 @@ BOOL WINAPI GetUserNameA(LPSTR lpszName, LPDWORD lpSize)
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* RegCreateKeyEx (ADVAPI32.130)
|
* RegCreateKeyEx (ADVAPI32.130)
|
||||||
*/
|
*/
|
||||||
|
LONG RegCreateKey(HKEY,LPCTSTR,LPHKEY);
|
||||||
WINAPI LONG RegCreateKeyEx(HKEY key,
|
WINAPI LONG RegCreateKeyEx(HKEY key,
|
||||||
const char *subkey,
|
const char *subkey,
|
||||||
long dontuse,
|
long dontuse,
|
||||||
|
|
|
@ -25,9 +25,13 @@ LPSTR GetCommandLineA(void)
|
||||||
char *cp;
|
char *cp;
|
||||||
PDB *pdb = (PDB *)GlobalLock( GetCurrentPDB() );
|
PDB *pdb = (PDB *)GlobalLock( GetCurrentPDB() );
|
||||||
|
|
||||||
|
#ifndef WINELIB
|
||||||
strcpy(buffer, wine_files->name);
|
strcpy(buffer, wine_files->name);
|
||||||
cp = buffer+strlen(buffer);
|
cp = buffer+strlen(buffer);
|
||||||
*cp++ = ' ';
|
*cp++ = ' ';
|
||||||
|
#else
|
||||||
|
cp = buffer;
|
||||||
|
#endif;
|
||||||
memcpy( cp, &pdb->cmdLine[1], pdb->cmdLine[0] );
|
memcpy( cp, &pdb->cmdLine[1], pdb->cmdLine[0] );
|
||||||
dprintf_win32(stddeb,"CommandLine = %s\n", buffer );
|
dprintf_win32(stddeb,"CommandLine = %s\n", buffer );
|
||||||
return buffer;
|
return buffer;
|
||||||
|
|
|
@ -30,6 +30,9 @@ extern FILE_OBJECT *hstderr;
|
||||||
static void UnixTimeToFileTime(time_t unix_time, FILETIME *filetime);
|
static void UnixTimeToFileTime(time_t unix_time, FILETIME *filetime);
|
||||||
static int TranslateCreationFlags(DWORD create_flags);
|
static int TranslateCreationFlags(DWORD create_flags);
|
||||||
static int TranslateAccessFlags(DWORD access_flags);
|
static int TranslateAccessFlags(DWORD access_flags);
|
||||||
|
#ifndef MAP_ANON
|
||||||
|
#define MAP_ANON 0
|
||||||
|
#endif
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* OpenFileMappingA (KERNEL32.397)
|
* OpenFileMappingA (KERNEL32.397)
|
||||||
|
@ -43,6 +46,7 @@ WINAPI HANDLE32 OpenFileMapping(DWORD access, BOOL inherit,const char *fname)
|
||||||
* CreateFileMappingA (KERNEL32.46)
|
* CreateFileMappingA (KERNEL32.46)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
int TranslateProtectionFlags(DWORD);
|
||||||
WINAPI HANDLE32 CreateFileMapping(HANDLE32 h,SECURITY_ATTRIBUTES *ats,
|
WINAPI HANDLE32 CreateFileMapping(HANDLE32 h,SECURITY_ATTRIBUTES *ats,
|
||||||
DWORD pot, DWORD sh, DWORD hlow, const char * lpName )
|
DWORD pot, DWORD sh, DWORD hlow, const char * lpName )
|
||||||
{
|
{
|
||||||
|
@ -97,7 +101,7 @@ WINAPI void *MapViewOfFileEx(HANDLE32 handle, DWORD access, DWORD offhi,
|
||||||
DWORD offlo, DWORD size, DWORD st)
|
DWORD offlo, DWORD size, DWORD st)
|
||||||
{
|
{
|
||||||
if (!size) size = ((FILEMAP_OBJECT *)handle)->size;
|
if (!size) size = ((FILEMAP_OBJECT *)handle)->size;
|
||||||
return mmap (st, size, ((FILEMAP_OBJECT *)handle)->prot,
|
return mmap ((caddr_t)st, size, ((FILEMAP_OBJECT *)handle)->prot,
|
||||||
MAP_ANON|MAP_PRIVATE,
|
MAP_ANON|MAP_PRIVATE,
|
||||||
((FILEMAP_OBJECT *)handle)->file_obj->fd,
|
((FILEMAP_OBJECT *)handle)->file_obj->fd,
|
||||||
offlo);
|
offlo);
|
||||||
|
@ -138,7 +142,7 @@ DWORD WINAPI GetFileInformationByHandle(FILE_OBJECT *hFile,
|
||||||
lpfi->dwFileAttributes |= FILE_ATTRIBUTE_NORMAL;
|
lpfi->dwFileAttributes |= FILE_ATTRIBUTE_NORMAL;
|
||||||
if(file_stat.st_mode & S_IFDIR)
|
if(file_stat.st_mode & S_IFDIR)
|
||||||
lpfi->dwFileAttributes |= FILE_ATTRIBUTE_DIRECTORY;
|
lpfi->dwFileAttributes |= FILE_ATTRIBUTE_DIRECTORY;
|
||||||
if(file_stat.st_mode & S_IWRITE == 0)
|
if((file_stat.st_mode & S_IWRITE) == 0)
|
||||||
lpfi->dwFileAttributes |= FILE_ATTRIBUTE_READONLY;
|
lpfi->dwFileAttributes |= FILE_ATTRIBUTE_READONLY;
|
||||||
|
|
||||||
/* Translate the file times. Use the last modification time
|
/* Translate the file times. Use the last modification time
|
||||||
|
|
|
@ -20,6 +20,9 @@
|
||||||
#ifndef PROT_NONE /* FreeBSD doesn't define PROT_NONE */
|
#ifndef PROT_NONE /* FreeBSD doesn't define PROT_NONE */
|
||||||
#define PROT_NONE 0
|
#define PROT_NONE 0
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef MAP_ANON
|
||||||
|
#define MAP_ANON 0
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
caddr_t ptr;
|
caddr_t ptr;
|
||||||
|
@ -33,6 +36,7 @@ int mem_used = 0;
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* VirtualAlloc (KERNEL32.548)
|
* VirtualAlloc (KERNEL32.548)
|
||||||
*/
|
*/
|
||||||
|
int TranslateProtectionFlags(DWORD);
|
||||||
LPVOID VirtualAlloc(LPVOID lpvAddress, DWORD cbSize,
|
LPVOID VirtualAlloc(LPVOID lpvAddress, DWORD cbSize,
|
||||||
DWORD fdwAllocationType, DWORD fdwProtect)
|
DWORD fdwAllocationType, DWORD fdwProtect)
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,6 +14,6 @@
|
||||||
|
|
||||||
int ValidateKernelObject(KERNEL_OBJECT *ptr)
|
int ValidateKernelObject(KERNEL_OBJECT *ptr)
|
||||||
{
|
{
|
||||||
return (!ptr || (short int)ptr==-1);
|
return (!ptr || (short int)(int)ptr==-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
32
win32/time.c
32
win32/time.c
|
@ -37,6 +37,29 @@ VOID GetLocalTime(LPSYSTEMTIME systime)
|
||||||
systime->wMilliseconds = (tv.tv_usec / 1000) % 1000;
|
systime->wMilliseconds = (tv.tv_usec / 1000) % 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* GetSystemTime (KERNEL32.285)
|
||||||
|
*/
|
||||||
|
VOID GetSystemTime(LPSYSTEMTIME systime)
|
||||||
|
{
|
||||||
|
time_t local_time;
|
||||||
|
struct tm *local_tm;
|
||||||
|
struct timeval tv;
|
||||||
|
|
||||||
|
time(&local_time);
|
||||||
|
local_tm = gmtime(&local_time);
|
||||||
|
gettimeofday(&tv, NULL);
|
||||||
|
|
||||||
|
systime->wYear = local_tm->tm_year + 1900;
|
||||||
|
systime->wMonth = local_tm->tm_mon + 1;
|
||||||
|
systime->wDayOfWeek = local_tm->tm_wday;
|
||||||
|
systime->wDay = local_tm->tm_mday;
|
||||||
|
systime->wHour = local_tm->tm_hour;
|
||||||
|
systime->wMinute = local_tm->tm_min;
|
||||||
|
systime->wSecond = local_tm->tm_sec;
|
||||||
|
systime->wMilliseconds = (tv.tv_usec / 1000) % 1000;
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GetTimeZoneInformation (KERNEL32.302)
|
* GetTimeZoneInformation (KERNEL32.302)
|
||||||
*/
|
*/
|
||||||
|
@ -55,3 +78,12 @@ DWORD GetTimeZoneInformation(LPTIME_ZONE_INFORMATION tzinfo)
|
||||||
return TIME_ZONE_ID_UNKNOWN;
|
return TIME_ZONE_ID_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* Sleep (KERNEL32.523)
|
||||||
|
*/
|
||||||
|
VOID Sleep(DWORD cMilliseconds)
|
||||||
|
{
|
||||||
|
if(cMilliseconds == INFINITE)
|
||||||
|
while(1) { /* Spin forever */ }
|
||||||
|
usleep(cMilliseconds*1000);
|
||||||
|
}
|
||||||
|
|
|
@ -328,7 +328,7 @@ LRESULT DefWindowProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
|
||||||
len = 1;
|
len = 1;
|
||||||
while(len < 64)
|
while(len < 64)
|
||||||
if( (hI = LoadIcon(wndPtr->hInstance,MAKEINTRESOURCE(len))) )
|
if( (hI = LoadIcon(wndPtr->hInstance,MAKEINTRESOURCE(len))) )
|
||||||
return hI;
|
return (LRESULT)hI;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -218,7 +218,7 @@ HWND CreateDialogParam( HINSTANCE hInst, SEGPTR dlgTemplate,
|
||||||
HGLOBAL hmem;
|
HGLOBAL hmem;
|
||||||
SEGPTR data;
|
SEGPTR data;
|
||||||
|
|
||||||
dprintf_dialog(stddeb, "CreateDialogParam: "NPFMT",%08lx,"NPFMT",%08lx,%ld\n",
|
dprintf_dialog(stddeb, "CreateDialogParam: "NPFMT","SPFMT","NPFMT",%08lx,%ld\n",
|
||||||
hInst, dlgTemplate, owner, (DWORD)dlgProc, param );
|
hInst, dlgTemplate, owner, (DWORD)dlgProc, param );
|
||||||
|
|
||||||
if (!(hRsrc = FindResource( hInst, dlgTemplate, RT_DIALOG ))) return 0;
|
if (!(hRsrc = FindResource( hInst, dlgTemplate, RT_DIALOG ))) return 0;
|
||||||
|
@ -523,7 +523,7 @@ int DialogBoxParam( HINSTANCE hInst, SEGPTR dlgTemplate,
|
||||||
{
|
{
|
||||||
HWND hwnd;
|
HWND hwnd;
|
||||||
|
|
||||||
dprintf_dialog(stddeb, "DialogBoxParam: "NPFMT",%08lx,"NPFMT",%08lx,%ld\n",
|
dprintf_dialog(stddeb, "DialogBoxParam: "NPFMT","SPFMT","NPFMT",%08lx,%ld\n",
|
||||||
hInst, dlgTemplate, owner, (DWORD)dlgProc, param );
|
hInst, dlgTemplate, owner, (DWORD)dlgProc, param );
|
||||||
hwnd = CreateDialogParam( hInst, dlgTemplate, owner, dlgProc, param );
|
hwnd = CreateDialogParam( hInst, dlgTemplate, owner, dlgProc, param );
|
||||||
if (hwnd) return DIALOG_DoDialogBox( hwnd, owner );
|
if (hwnd) return DIALOG_DoDialogBox( hwnd, owner );
|
||||||
|
@ -751,7 +751,7 @@ void SetDlgItemInt( HWND hwnd, WORD id, WORD value, BOOL fSigned )
|
||||||
|
|
||||||
if (fSigned) sprintf( str, "%d", (int)value );
|
if (fSigned) sprintf( str, "%d", (int)value );
|
||||||
else sprintf( str, "%u", value );
|
else sprintf( str, "%u", value );
|
||||||
SendDlgItemMessage( hwnd, id, WM_SETTEXT, 0, MAKE_SEGPTR(str) );
|
SendDlgItemMessage( hwnd, id, WM_SETTEXT, 0, (LPARAM)MAKE_SEGPTR(str) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -764,7 +764,7 @@ WORD GetDlgItemInt( HWND hwnd, WORD id, BOOL * translated, BOOL fSigned )
|
||||||
long result = 0;
|
long result = 0;
|
||||||
|
|
||||||
if (translated) *translated = FALSE;
|
if (translated) *translated = FALSE;
|
||||||
if (SendDlgItemMessage( hwnd, id, WM_GETTEXT, 30, MAKE_SEGPTR(str) ))
|
if (SendDlgItemMessage( hwnd, id, WM_GETTEXT, 30, (LPARAM)MAKE_SEGPTR(str) ))
|
||||||
{
|
{
|
||||||
char * endptr;
|
char * endptr;
|
||||||
result = strtol( str, &endptr, 10 );
|
result = strtol( str, &endptr, 10 );
|
||||||
|
|
|
@ -534,7 +534,7 @@ static void EVENT_ConfigureNotify( HWND hwnd, XConfigureEvent *event )
|
||||||
winpos.flags |= SWP_NOSIZE;
|
winpos.flags |= SWP_NOSIZE;
|
||||||
|
|
||||||
/* Send WM_WINDOWPOSCHANGING */
|
/* Send WM_WINDOWPOSCHANGING */
|
||||||
SendMessage(hwnd, WM_WINDOWPOSCHANGING, 0, MAKE_SEGPTR(&winpos));
|
SendMessage(hwnd, WM_WINDOWPOSCHANGING, 0, (LPARAM)MAKE_SEGPTR(&winpos));
|
||||||
|
|
||||||
/* Calculate new position and size */
|
/* Calculate new position and size */
|
||||||
newWindowRect.left = event->x;
|
newWindowRect.left = event->x;
|
||||||
|
@ -549,7 +549,7 @@ static void EVENT_ConfigureNotify( HWND hwnd, XConfigureEvent *event )
|
||||||
/* Set new size and position */
|
/* Set new size and position */
|
||||||
wndPtr->rectWindow = newWindowRect;
|
wndPtr->rectWindow = newWindowRect;
|
||||||
wndPtr->rectClient = newClientRect;
|
wndPtr->rectClient = newClientRect;
|
||||||
SendMessage(hwnd, WM_WINDOWPOSCHANGED, 0, MAKE_SEGPTR(&winpos));
|
SendMessage(hwnd, WM_WINDOWPOSCHANGED, 0, (LPARAM)MAKE_SEGPTR(&winpos));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include "winpos.h"
|
#include "winpos.h"
|
||||||
#include "hook.h"
|
#include "hook.h"
|
||||||
#include "color.h"
|
#include "color.h"
|
||||||
|
#include "options.h"
|
||||||
|
|
||||||
static HWND hwndFocus = 0;
|
static HWND hwndFocus = 0;
|
||||||
|
|
||||||
|
@ -25,8 +25,9 @@ static void FOCUS_SetXFocus( HWND hwnd )
|
||||||
XWindowAttributes win_attr;
|
XWindowAttributes win_attr;
|
||||||
Window win;
|
Window win;
|
||||||
|
|
||||||
/* Only mess with the X focus if there's no desktop window */
|
/* Only mess with the X focus if there's */
|
||||||
if (rootWindow != DefaultRootWindow(display)) return;
|
/* no desktop window and no window manager. */
|
||||||
|
if ((rootWindow != DefaultRootWindow(display)) || Options.managed) return;
|
||||||
|
|
||||||
if (!hwnd) /* If setting the focus to 0, uninstall the colormap */
|
if (!hwnd) /* If setting the focus to 0, uninstall the colormap */
|
||||||
{
|
{
|
||||||
|
@ -53,11 +54,11 @@ void FOCUS_SwitchFocus(HWND hFocusFrom, HWND hFocusTo)
|
||||||
{
|
{
|
||||||
hwndFocus = hFocusTo;
|
hwndFocus = hFocusTo;
|
||||||
|
|
||||||
if (hFocusFrom) SendMessage( hFocusFrom, WM_KILLFOCUS, hFocusTo, 0L);
|
if (hFocusFrom) SendMessage( hFocusFrom, WM_KILLFOCUS, (WPARAM)hFocusTo, 0L);
|
||||||
if( !hFocusTo || hFocusTo != hwndFocus )
|
if( !hFocusTo || hFocusTo != hwndFocus )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
SendMessage( hFocusTo, WM_SETFOCUS, hFocusFrom, 0L);
|
SendMessage( hFocusTo, WM_SETFOCUS, (WPARAM)hFocusFrom, 0L);
|
||||||
FOCUS_SetXFocus( hFocusTo );
|
FOCUS_SetXFocus( hFocusTo );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +89,7 @@ HWND SetFocus(HWND hwnd)
|
||||||
if( hwnd == hwndFocus ) return hwnd;
|
if( hwnd == hwndFocus ) return hwnd;
|
||||||
|
|
||||||
/* call hooks */
|
/* call hooks */
|
||||||
if( HOOK_CallHooks( WH_CBT, HCBT_SETFOCUS, hwnd, hwndFocus) )
|
if( HOOK_CallHooks( WH_CBT, HCBT_SETFOCUS, (WPARAM)hwnd, (LPARAM)hwndFocus) )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* activate hwndTop if needed. */
|
/* activate hwndTop if needed. */
|
||||||
|
@ -99,7 +100,7 @@ HWND SetFocus(HWND hwnd)
|
||||||
if (!IsWindow( hwnd )) return 0; /* Abort if window destroyed */
|
if (!IsWindow( hwnd )) return 0; /* Abort if window destroyed */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( HOOK_CallHooks( WH_CBT, HCBT_SETFOCUS, 0, hwndFocus ) )
|
else if( HOOK_CallHooks( WH_CBT, HCBT_SETFOCUS, 0, (LPARAM)hwndFocus ) )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Change focus and send messages */
|
/* Change focus and send messages */
|
||||||
|
|
|
@ -226,7 +226,7 @@ FARPROC SetWindowsHook( short id, HOOKPROC proc )
|
||||||
HTASK hTask = (id == WH_MSGFILTER) ? GetCurrentTask() : 0;
|
HTASK hTask = (id == WH_MSGFILTER) ? GetCurrentTask() : 0;
|
||||||
|
|
||||||
HANDLE handle = HOOK_SetHook( id, proc, hInst, hTask );
|
HANDLE handle = HOOK_SetHook( id, proc, hInst, hTask );
|
||||||
if (!handle) return -1;
|
if (!handle) return (FARPROC)-1;
|
||||||
if (!((HOOKDATA *)USER_HEAP_LIN_ADDR( handle ))->next) return 0;
|
if (!((HOOKDATA *)USER_HEAP_LIN_ADDR( handle ))->next) return 0;
|
||||||
/* Not sure if the return value is correct; should not matter much
|
/* Not sure if the return value is correct; should not matter much
|
||||||
* since it's never used (see DefHookProc). -- AJ */
|
* since it's never used (see DefHookProc). -- AJ */
|
||||||
|
@ -319,7 +319,11 @@ BOOL UnhookWindowsHookEx( HHOOK hhook )
|
||||||
DWORD CallNextHookEx( HHOOK hhook, short code, WPARAM wParam, LPARAM lParam )
|
DWORD CallNextHookEx( HHOOK hhook, short code, WPARAM wParam, LPARAM lParam )
|
||||||
{
|
{
|
||||||
HANDLE next;
|
HANDLE next;
|
||||||
|
#ifdef WINELIB32
|
||||||
|
if (!(next = HOOK_GetNextHook( (HANDLE)hhook ))) return 0;
|
||||||
|
#else
|
||||||
if (HIWORD(hhook) != HOOK_MAGIC) return 0; /* Not a new format hook */
|
if (HIWORD(hhook) != HOOK_MAGIC) return 0; /* Not a new format hook */
|
||||||
if (!(next = HOOK_GetNextHook( LOWORD(hhook) ))) return 0;
|
if (!(next = HOOK_GetNextHook( LOWORD(hhook) ))) return 0;
|
||||||
|
#endif
|
||||||
return HOOK_CallHook( next, code, wParam, lParam );
|
return HOOK_CallHook( next, code, wParam, lParam );
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,6 +58,7 @@ static HWND MDI_GetChildByID(WND* mdiClient,int id)
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* MDI_MenuAppendItem
|
* MDI_MenuAppendItem
|
||||||
*/
|
*/
|
||||||
|
#ifdef SUPERFLUOUS_FUNCTIONS
|
||||||
static BOOL MDI_MenuAppendItem(WND *clientWnd, HWND hWndChild)
|
static BOOL MDI_MenuAppendItem(WND *clientWnd, HWND hWndChild)
|
||||||
{
|
{
|
||||||
char buffer[128];
|
char buffer[128];
|
||||||
|
@ -74,6 +75,7 @@ static BOOL MDI_MenuAppendItem(WND *clientWnd, HWND hWndChild)
|
||||||
return AppendMenu(clientInfo->hWindowMenu,MF_STRING,
|
return AppendMenu(clientInfo->hWindowMenu,MF_STRING,
|
||||||
wndPtr->wIDmenu,(LPSTR)buffer);
|
wndPtr->wIDmenu,(LPSTR)buffer);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* MDI_MenuModifyItem
|
* MDI_MenuModifyItem
|
||||||
|
@ -245,7 +247,8 @@ HWND MDICreateChild(WND *w, MDICLIENTINFO *ci, HWND parent, LPARAM lParam )
|
||||||
WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SYSMENU |
|
WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SYSMENU |
|
||||||
WS_THICKFRAME | WS_VISIBLE | cs->style,
|
WS_THICKFRAME | WS_VISIBLE | cs->style,
|
||||||
cs->x, cs->y, cs->cx, cs->cy, parent,
|
cs->x, cs->y, cs->cx, cs->cy, parent,
|
||||||
(HMENU) wIDmenu, w->hInstance, (SEGPTR)lParam);
|
(HMENU)(DWORD)(WORD)wIDmenu, w->hInstance,
|
||||||
|
(SEGPTR)lParam);
|
||||||
|
|
||||||
if (hwnd)
|
if (hwnd)
|
||||||
{
|
{
|
||||||
|
@ -376,7 +379,7 @@ HWND MDIDestroyChild(WND *w_parent, MDICLIENTINFO *ci, HWND parent,
|
||||||
ci->nActiveChildren--;
|
ci->nActiveChildren--;
|
||||||
|
|
||||||
if( ci->flagChildMaximized == child )
|
if( ci->flagChildMaximized == child )
|
||||||
ci->flagChildMaximized = 1;
|
ci->flagChildMaximized = (HWND)1;
|
||||||
|
|
||||||
if (flagDestroy)
|
if (flagDestroy)
|
||||||
{
|
{
|
||||||
|
@ -477,8 +480,13 @@ LONG MDI_ChildActivate(WND *clientPtr, HWND hWndChild)
|
||||||
if( wndPrev )
|
if( wndPrev )
|
||||||
{
|
{
|
||||||
SendMessage( prevActiveWnd, WM_NCACTIVATE, FALSE, 0L );
|
SendMessage( prevActiveWnd, WM_NCACTIVATE, FALSE, 0L );
|
||||||
|
#ifdef WINELIB32
|
||||||
|
SendMessage( prevActiveWnd, WM_MDIACTIVATE, (WPARAM)prevActiveWnd,
|
||||||
|
(LPARAM)hWndChild);
|
||||||
|
#else
|
||||||
SendMessage( prevActiveWnd, WM_MDIACTIVATE, FALSE,
|
SendMessage( prevActiveWnd, WM_MDIACTIVATE, FALSE,
|
||||||
MAKELONG(hWndChild,prevActiveWnd));
|
MAKELONG(hWndChild,prevActiveWnd));
|
||||||
|
#endif
|
||||||
/* uncheck menu item */
|
/* uncheck menu item */
|
||||||
if( clientInfo->hWindowMenu )
|
if( clientInfo->hWindowMenu )
|
||||||
CheckMenuItem( clientInfo->hWindowMenu,
|
CheckMenuItem( clientInfo->hWindowMenu,
|
||||||
|
@ -517,13 +525,18 @@ LONG MDI_ChildActivate(WND *clientPtr, HWND hWndChild)
|
||||||
SendMessage( hWndChild, WM_NCACTIVATE, TRUE, 0L);
|
SendMessage( hWndChild, WM_NCACTIVATE, TRUE, 0L);
|
||||||
if( GetFocus() == GetParent(hWndChild) )
|
if( GetFocus() == GetParent(hWndChild) )
|
||||||
SendMessage( GetParent(hWndChild), WM_SETFOCUS,
|
SendMessage( GetParent(hWndChild), WM_SETFOCUS,
|
||||||
GetParent(hWndChild), 0L );
|
(WPARAM)GetParent(hWndChild), 0L );
|
||||||
else
|
else
|
||||||
SetFocus( GetParent(hWndChild) );
|
SetFocus( GetParent(hWndChild) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WINELIB32
|
||||||
|
SendMessage( hWndChild, WM_MDIACTIVATE, (WPARAM)hWndChild,
|
||||||
|
(LPARAM)prevActiveWnd );
|
||||||
|
#else
|
||||||
SendMessage( hWndChild, WM_MDIACTIVATE, TRUE,
|
SendMessage( hWndChild, WM_MDIACTIVATE, TRUE,
|
||||||
MAKELONG(prevActiveWnd,hWndChild) );
|
MAKELONG(prevActiveWnd,hWndChild) );
|
||||||
|
#endif
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -678,6 +691,10 @@ LONG MDITile(HWND parent, MDICLIENTINFO *ci)
|
||||||
|
|
||||||
if( !listTop ) return 0;
|
if( !listTop ) return 0;
|
||||||
|
|
||||||
|
/* just free memory and return if zero windows to tile */
|
||||||
|
if ( iToPosition == 0 )
|
||||||
|
goto MDITile_free;
|
||||||
|
|
||||||
GetClientRect(parent, &rect);
|
GetClientRect(parent, &rect);
|
||||||
|
|
||||||
rows = (int) sqrt((double) iToPosition);
|
rows = (int) sqrt((double) iToPosition);
|
||||||
|
@ -725,7 +742,8 @@ LONG MDITile(HWND parent, MDICLIENTINFO *ci)
|
||||||
|
|
||||||
x += xsize;
|
x += xsize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MDITile_free:
|
||||||
/* free the rest if any */
|
/* free the rest if any */
|
||||||
while( listTop ) {
|
while( listTop ) {
|
||||||
listPrev = listTop->prev;
|
listPrev = listTop->prev;
|
||||||
|
@ -791,7 +809,7 @@ LONG MDIPaintMaximized(HWND hwndFrame, HWND hwndClient, WORD message,
|
||||||
|
|
||||||
dprintf_mdi(stddeb, "MDIPaintMaximized: frame "NPFMT", client "NPFMT
|
dprintf_mdi(stddeb, "MDIPaintMaximized: frame "NPFMT", client "NPFMT
|
||||||
", max flag %d, menu %04x\n", hwndFrame, hwndClient,
|
", max flag %d, menu %04x\n", hwndFrame, hwndClient,
|
||||||
ci->flagChildMaximized, wndPtr ? wndPtr->wIDmenu : 0);
|
(int)ci->flagChildMaximized, wndPtr ? wndPtr->wIDmenu : 0);
|
||||||
|
|
||||||
if (ci->flagChildMaximized && wndPtr && wndPtr->wIDmenu != 0)
|
if (ci->flagChildMaximized && wndPtr && wndPtr->wIDmenu != 0)
|
||||||
{
|
{
|
||||||
|
@ -881,7 +899,7 @@ LRESULT MDIClientWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case WM_MDIACTIVATE:
|
case WM_MDIACTIVATE:
|
||||||
SetWindowPos(wParam,0,0,0,0,0, SWP_NOSIZE | SWP_NOMOVE );
|
SetWindowPos((HWND)wParam,0,0,0,0,0, SWP_NOSIZE | SWP_NOMOVE );
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case WM_MDICASCADE:
|
case WM_MDICASCADE:
|
||||||
|
@ -891,7 +909,7 @@ LRESULT MDIClientWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
return (LONG)MDICreateChild(w, ci, hwnd, lParam );
|
return (LONG)MDICreateChild(w, ci, hwnd, lParam );
|
||||||
|
|
||||||
case WM_MDIDESTROY:
|
case WM_MDIDESTROY:
|
||||||
return MDIDestroyChild(w, ci, hwnd, wParam, TRUE);
|
return (LONG)MDIDestroyChild(w, ci, hwnd, (HWND)wParam, TRUE);
|
||||||
|
|
||||||
case WM_MDIGETACTIVE:
|
case WM_MDIGETACTIVE:
|
||||||
return ((LONG) ci->hwndActiveChild |
|
return ((LONG) ci->hwndActiveChild |
|
||||||
|
@ -905,7 +923,7 @@ LRESULT MDIClientWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case WM_MDIMAXIMIZE:
|
case WM_MDIMAXIMIZE:
|
||||||
return MDIMaximizeChild(hwnd, wParam, ci);
|
return MDIMaximizeChild(hwnd, (HWND)wParam, ci);
|
||||||
|
|
||||||
case WM_MDINEXT:
|
case WM_MDINEXT:
|
||||||
MDI_SwitchActiveChild(hwnd, (HWND)wParam, lParam);
|
MDI_SwitchActiveChild(hwnd, (HWND)wParam, lParam);
|
||||||
|
@ -915,7 +933,11 @@ LRESULT MDIClientWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
return MDIRestoreChild(hwnd, ci);
|
return MDIRestoreChild(hwnd, ci);
|
||||||
|
|
||||||
case WM_MDISETMENU:
|
case WM_MDISETMENU:
|
||||||
return MDISetMenu(hwnd, wParam, LOWORD(lParam), HIWORD(lParam));
|
#ifdef WINELIB32
|
||||||
|
return (LRESULT)MDISetMenu(hwnd, FALSE, (HMENU)wParam, (HMENU)lParam);
|
||||||
|
#else
|
||||||
|
return (LRESULT)MDISetMenu(hwnd, wParam, LOWORD(lParam), HIWORD(lParam));
|
||||||
|
#endif
|
||||||
|
|
||||||
case WM_MDITILE:
|
case WM_MDITILE:
|
||||||
ci->sbStop = TRUE;
|
ci->sbStop = TRUE;
|
||||||
|
@ -989,7 +1011,11 @@ LRESULT DefFrameProc(HWND hwnd, HWND hwndMDIClient, UINT message,
|
||||||
childHwnd = MDI_GetChildByID( WIN_FindWndPtr(hwndMDIClient),
|
childHwnd = MDI_GetChildByID( WIN_FindWndPtr(hwndMDIClient),
|
||||||
wParam );
|
wParam );
|
||||||
if( childHwnd )
|
if( childHwnd )
|
||||||
|
#ifdef WINELIB32 /* FIXME: need to find out the equivalent Win32 message */
|
||||||
|
SendMessage(hwndMDIClient, WM_MDIACTIVATE, 0 , 0);
|
||||||
|
#else
|
||||||
SendMessage(hwndMDIClient, WM_MDIACTIVATE, childHwnd , 0L);
|
SendMessage(hwndMDIClient, WM_MDIACTIVATE, childHwnd , 0L);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_NCLBUTTONDOWN:
|
case WM_NCLBUTTONDOWN:
|
||||||
|
@ -1048,7 +1074,7 @@ LONG DefMDIChildProc(HWND hwnd, WORD message, WORD wParam, LONG lParam)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case WM_CLOSE:
|
case WM_CLOSE:
|
||||||
SendMessage(GetParent(hwnd),WM_MDIDESTROY,hwnd,0L);
|
SendMessage(GetParent(hwnd),WM_MDIDESTROY,(WPARAM)hwnd,0L);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case WM_SIZE:
|
case WM_SIZE:
|
||||||
|
@ -1158,11 +1184,11 @@ void CalcChildScroll( HWND hwnd, WORD scroll )
|
||||||
void ScrollChildren(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
void ScrollChildren(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
WND *wndPtr = WIN_FindWndPtr(hWnd);
|
WND *wndPtr = WIN_FindWndPtr(hWnd);
|
||||||
short newPos;
|
short newPos=-1;
|
||||||
short curPos;
|
short curPos;
|
||||||
short length;
|
short length;
|
||||||
short minPos;
|
INT minPos;
|
||||||
short maxPos;
|
INT maxPos;
|
||||||
short shift;
|
short shift;
|
||||||
|
|
||||||
if( !wndPtr ) return;
|
if( !wndPtr ) return;
|
||||||
|
|
|
@ -1152,7 +1152,7 @@ LRESULT SendMessage( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
|
||||||
|
|
||||||
EnterSpyMessage(SPY_SENDMESSAGE, hwnd, msg, wParam, lParam);
|
EnterSpyMessage(SPY_SENDMESSAGE, hwnd, msg, wParam, lParam);
|
||||||
|
|
||||||
HOOK_CallHooks( WH_CALLWNDPROC, HC_ACTION, 1, MAKE_SEGPTR(&msgstruct) );
|
HOOK_CallHooks( WH_CALLWNDPROC, HC_ACTION, 1, (LPARAM)MAKE_SEGPTR(&msgstruct) );
|
||||||
if (!(wndPtr = WIN_FindWndPtr( hwnd )))
|
if (!(wndPtr = WIN_FindWndPtr( hwnd )))
|
||||||
{
|
{
|
||||||
ExitSpyMessage(SPY_RESULT_INVALIDHWND,hwnd,msg,0);
|
ExitSpyMessage(SPY_RESULT_INVALIDHWND,hwnd,msg,0);
|
||||||
|
@ -1225,8 +1225,10 @@ LONG DispatchMessage( LPMSG msg )
|
||||||
{
|
{
|
||||||
if (msg->lParam)
|
if (msg->lParam)
|
||||||
{
|
{
|
||||||
|
#ifndef WINELIB32
|
||||||
HINSTANCE ds = msg->hwnd ? WIN_GetWindowInstance( msg->hwnd )
|
HINSTANCE ds = msg->hwnd ? WIN_GetWindowInstance( msg->hwnd )
|
||||||
: (HINSTANCE)CURRENT_DS;
|
: (HINSTANCE)CURRENT_DS;
|
||||||
|
#endif
|
||||||
/* HOOK_CallHooks( WH_CALLWNDPROC, HC_ACTION, 0, FIXME ); */
|
/* HOOK_CallHooks( WH_CALLWNDPROC, HC_ACTION, 0, FIXME ); */
|
||||||
return CallWndProc( (WNDPROC)msg->lParam, ds, msg->hwnd,
|
return CallWndProc( (WNDPROC)msg->lParam, ds, msg->hwnd,
|
||||||
msg->message, msg->wParam, GetTickCount() );
|
msg->message, msg->wParam, GetTickCount() );
|
||||||
|
@ -1293,7 +1295,7 @@ LONG GetMessageExtraInfo(void)
|
||||||
*/
|
*/
|
||||||
WORD RegisterWindowMessage( SEGPTR str )
|
WORD RegisterWindowMessage( SEGPTR str )
|
||||||
{
|
{
|
||||||
dprintf_msg(stddeb, "RegisterWindowMessage: '%08lx'\n", str );
|
dprintf_msg(stddeb, "RegisterWindowMessage: '"SPFMT"'\n", str );
|
||||||
return GlobalAddAtom( str );
|
return GlobalAddAtom( str );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,12 +7,11 @@
|
||||||
|
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
#include "dlgs.h"
|
#include "dlgs.h"
|
||||||
#include "global.h"
|
|
||||||
#include "selectors.h"
|
#include "selectors.h"
|
||||||
#include "alias.h"
|
#include "alias.h"
|
||||||
#include "relay32.h"
|
#include "relay32.h"
|
||||||
#include "win.h"
|
#include "win.h"
|
||||||
#include "../rc/sysres.h"
|
#include "resource.h"
|
||||||
#include "task.h"
|
#include "task.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -201,15 +200,13 @@ int MessageBox(HWND hWnd, LPSTR text, LPSTR title, WORD type)
|
||||||
initialized=1;
|
initialized=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
handle = GLOBAL_CreateBlock( GMEM_FIXED, sysres_DIALOG_MSGBOX.bytes,
|
handle = SYSRES_LoadResource( SYSRES_DIALOG_MSGBOX );
|
||||||
sysres_DIALOG_MSGBOX.size, GetCurrentPDB(),
|
|
||||||
FALSE, FALSE, TRUE, NULL );
|
|
||||||
if (!handle) return 0;
|
if (!handle) return 0;
|
||||||
ret = DialogBoxIndirectParam( WIN_GetWindowInstance(hWnd),
|
ret = DialogBoxIndirectParam( WIN_GetWindowInstance(hWnd),
|
||||||
handle, hWnd,
|
handle, hWnd,
|
||||||
GetWndProcEntry16("SystemMessageBoxProc"),
|
GetWndProcEntry16("SystemMessageBoxProc"),
|
||||||
(LONG)&mbox );
|
(LONG)&mbox );
|
||||||
GLOBAL_FreeBlock( handle );
|
SYSRES_FreeResource( handle );
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -174,16 +174,16 @@ void NC_GetMinMaxInfo( HWND hwnd, POINT *maxSize, POINT *maxPos,
|
||||||
MinMax.ptMaxPosition.y = -yinc;
|
MinMax.ptMaxPosition.y = -yinc;
|
||||||
}
|
}
|
||||||
|
|
||||||
SendMessage( hwnd, WM_GETMINMAXINFO, 0, MAKE_SEGPTR(&MinMax) );
|
SendMessage( hwnd, WM_GETMINMAXINFO, 0, (LPARAM)MAKE_SEGPTR(&MinMax) );
|
||||||
|
|
||||||
/* Some sanity checks */
|
/* Some sanity checks */
|
||||||
|
|
||||||
dprintf_nonclient(stddeb,
|
dprintf_nonclient(stddeb,
|
||||||
"NC_GetMinMaxInfo: %d %d / %d %d / %d %d / %d %d\n",
|
"NC_GetMinMaxInfo: %d %d / %d %d / %d %d / %d %d\n",
|
||||||
MinMax.ptMaxSize.x,MinMax.ptMaxSize.y,
|
(int)MinMax.ptMaxSize.x,(int)MinMax.ptMaxSize.y,
|
||||||
MinMax.ptMaxPosition.x,MinMax.ptMaxPosition.y,
|
(int)MinMax.ptMaxPosition.x,(int)MinMax.ptMaxPosition.y,
|
||||||
MinMax.ptMaxTrackSize.x,MinMax.ptMaxTrackSize.y,
|
(int)MinMax.ptMaxTrackSize.x,(int)MinMax.ptMaxTrackSize.y,
|
||||||
MinMax.ptMinTrackSize.x,MinMax.ptMinTrackSize.y);
|
(int)MinMax.ptMinTrackSize.x,(int)MinMax.ptMinTrackSize.y);
|
||||||
MinMax.ptMaxTrackSize.x = MAX( MinMax.ptMaxTrackSize.x,
|
MinMax.ptMaxTrackSize.x = MAX( MinMax.ptMaxTrackSize.x,
|
||||||
MinMax.ptMinTrackSize.x );
|
MinMax.ptMinTrackSize.x );
|
||||||
MinMax.ptMaxTrackSize.y = MAX( MinMax.ptMaxTrackSize.y,
|
MinMax.ptMaxTrackSize.y = MAX( MinMax.ptMaxTrackSize.y,
|
||||||
|
@ -892,7 +892,7 @@ static LONG NC_StartSizeMove( HWND hwnd, WPARAM wParam, POINT *capturePoint )
|
||||||
}
|
}
|
||||||
*capturePoint = pt;
|
*capturePoint = pt;
|
||||||
SetCursorPos( capturePoint->x, capturePoint->y );
|
SetCursorPos( capturePoint->x, capturePoint->y );
|
||||||
NC_HandleSetCursor( hwnd, hwnd, MAKELONG( hittest, WM_MOUSEMOVE ));
|
NC_HandleSetCursor( hwnd, (WPARAM)hwnd, MAKELONG( hittest, WM_MOUSEMOVE ));
|
||||||
return hittest;
|
return hittest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ BOOL SetProp( HWND hwnd, SEGPTR str, HANDLE hData )
|
||||||
PROPERTY *prop;
|
PROPERTY *prop;
|
||||||
WND *wndPtr;
|
WND *wndPtr;
|
||||||
|
|
||||||
dprintf_prop( stddeb, "SetProp: "NPFMT" %08lx "NPFMT"\n", hwnd, str, hData );
|
dprintf_prop( stddeb, "SetProp: "NPFMT" "SPFMT" "NPFMT"\n", hwnd, str, hData );
|
||||||
if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return FALSE;
|
if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return FALSE;
|
||||||
hProp = USER_HEAP_ALLOC( sizeof(PROPERTY) +
|
hProp = USER_HEAP_ALLOC( sizeof(PROPERTY) +
|
||||||
(HIWORD(str) ? strlen(PTR_SEG_TO_LIN(str)) : 0 ));
|
(HIWORD(str) ? strlen(PTR_SEG_TO_LIN(str)) : 0 ));
|
||||||
|
@ -62,7 +62,7 @@ HANDLE GetProp( HWND hwnd, SEGPTR str )
|
||||||
HANDLE hProp;
|
HANDLE hProp;
|
||||||
WND *wndPtr;
|
WND *wndPtr;
|
||||||
|
|
||||||
dprintf_prop( stddeb, "GetProp: "NPFMT" %08lx\n", hwnd, str );
|
dprintf_prop( stddeb, "GetProp: "NPFMT" "SPFMT"\n", hwnd, str );
|
||||||
if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return 0;
|
if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return 0;
|
||||||
hProp = wndPtr->hProp;
|
hProp = wndPtr->hProp;
|
||||||
while (hProp)
|
while (hProp)
|
||||||
|
@ -88,7 +88,7 @@ HANDLE RemoveProp( HWND hwnd, SEGPTR str )
|
||||||
HANDLE *hProp;
|
HANDLE *hProp;
|
||||||
WND *wndPtr;
|
WND *wndPtr;
|
||||||
|
|
||||||
dprintf_prop( stddeb, "RemoveProp: "NPFMT" %08lx\n", hwnd, str );
|
dprintf_prop( stddeb, "RemoveProp: "NPFMT" "SPFMT"\n", hwnd, str );
|
||||||
if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return 0;
|
if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return 0;
|
||||||
hProp = &wndPtr->hProp;
|
hProp = &wndPtr->hProp;
|
||||||
while (*hProp)
|
while (*hProp)
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
extern DCE_GetVisRgn(HWND, WORD);
|
extern HRGN DCE_GetVisRgn(HWND, WORD);
|
||||||
|
|
||||||
static int RgnType;
|
static int RgnType;
|
||||||
|
|
||||||
|
@ -127,10 +127,10 @@ void ScrollWindow(HWND hwnd, short dx, short dy, LPRECT rect, LPRECT clipRect)
|
||||||
RECT rc, cliprc;
|
RECT rc, cliprc;
|
||||||
|
|
||||||
dprintf_scroll(stddeb,"ScrollWindow: dx=%d, dy=%d, lpRect =%08lx clipRect=%i,%i,%i,%i\n",
|
dprintf_scroll(stddeb,"ScrollWindow: dx=%d, dy=%d, lpRect =%08lx clipRect=%i,%i,%i,%i\n",
|
||||||
dx, dy, (LONG)rect, (clipRect)?clipRect->left:0,
|
dx, dy, (LONG)rect, (int)((clipRect)?clipRect->left:0),
|
||||||
(clipRect)?clipRect->top:0,
|
(int)((clipRect)?clipRect->top:0),
|
||||||
(clipRect)?clipRect->right:0,
|
(int)((clipRect)?clipRect->right:0),
|
||||||
(clipRect)?clipRect->bottom:0);
|
(int)((clipRect)?clipRect->bottom:0));
|
||||||
|
|
||||||
/* if rect is NULL children have to be moved */
|
/* if rect is NULL children have to be moved */
|
||||||
if ( !rect )
|
if ( !rect )
|
||||||
|
@ -146,8 +146,9 @@ void ScrollWindow(HWND hwnd, short dx, short dy, LPRECT rect, LPRECT clipRect)
|
||||||
{
|
{
|
||||||
GetClientRect(hwnd,&rc);
|
GetClientRect(hwnd,&rc);
|
||||||
dprintf_scroll(stddeb,"\trect=%i %i %i %i client=%i %i %i %i\n",
|
dprintf_scroll(stddeb,"\trect=%i %i %i %i client=%i %i %i %i\n",
|
||||||
rect->left,rect->top,rect->right,rect->bottom,rc.left,rc.top,
|
(int)rect->left,(int)rect->top,(int)rect->right,
|
||||||
rc.right,rc.bottom);
|
(int)rect->bottom,(int)rc.left,(int)rc.top,
|
||||||
|
(int)rc.right,(int)rc.bottom);
|
||||||
|
|
||||||
CopyRect(&rc, rect);
|
CopyRect(&rc, rect);
|
||||||
hdc = GetDC(hwnd);
|
hdc = GetDC(hwnd);
|
||||||
|
@ -206,10 +207,10 @@ BOOL ScrollDC(HDC hdc, short dx, short dy, LPRECT rc, LPRECT cliprc,
|
||||||
DC *dc = (DC *)GDI_GetObjPtr(hdc, DC_MAGIC);
|
DC *dc = (DC *)GDI_GetObjPtr(hdc, DC_MAGIC);
|
||||||
|
|
||||||
dprintf_scroll(stddeb,"ScrollDC: dx=%d dy=%d, hrgnUpdate="NPFMT" rc=%i %i %i %i\n",
|
dprintf_scroll(stddeb,"ScrollDC: dx=%d dy=%d, hrgnUpdate="NPFMT" rc=%i %i %i %i\n",
|
||||||
dx,dy,hrgnUpdate,(rc)?rc->left:0,
|
dx,dy,hrgnUpdate,(int)((rc)?rc->left:0),
|
||||||
(rc)?rc->top:0,
|
(int)((rc)?rc->top:0),
|
||||||
(rc)?rc->right:0,
|
(int)((rc)?rc->right:0),
|
||||||
(rc)?rc->bottom:0);
|
(int)((rc)?rc->bottom:0));
|
||||||
|
|
||||||
if (rc == NULL)
|
if (rc == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -288,7 +289,7 @@ int ScrollWindowEx(HWND hwnd, short dx, short dy, LPRECT rect, LPRECT clipRect,
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
RECT rc, cliprc;
|
RECT rc, cliprc;
|
||||||
|
|
||||||
dprintf_scroll(stddeb,"ScrollWindowEx: dx=%d, dy=%d, wFlags="NPFMT"\n",dx, dy, flags);
|
dprintf_scroll(stddeb,"ScrollWindowEx: dx=%d, dy=%d, wFlags=%04x\n",dx, dy, flags);
|
||||||
|
|
||||||
hdc = GetDC(hwnd);
|
hdc = GetDC(hwnd);
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue