Commit b7258bef authored by Alexandre Julliard's avatar Alexandre Julliard

Release 950901

Thu Aug 31 17:19:57 1995 Alexandre Julliard <julliard@sunsite.unc.edu> * [Configure] Added compile-time option for IPC. * [configure.in] Added command-line options for language, IPC and malloc debugging. * [controls/menu.c] WM_MENUSELECT was sometimes sent to the wrong window. * [debugger/break.c] For the 'next' command, only step over instruction that require it. This allows 'next' to do the right thing with jmp and ret instructions. * [ipc/*.c] [memory/atom.c] [memory/global.c] IPC can now be configured out at compile-time. * [loader/task.c] Bug fix in TASK_Reschedule() that could cause a task to be deleted twice. * [miscemu/dosmem.c] (New file) Partial emulation of the BIOS data segment. * [miscemu/instr.c] Trap attempts to access selector 0x40 and remap the access to segment __0040H. * [tools/build.c] Fixed bug in CallTo32_LargeStack() that caused problems when compiling Wine with the -fomit-frame-pointer option. * [windows/message.c] Fixed bug in hardware event handling that could cause some events to get ignored. Sat Aug 26 13:12:59 IST 1995 Michael Veksler <mveksler@vnet.ibm.com> * [ipc/README] [ipc/dde.tex] LaTeX documentation for the ipc and DDE stuff. Wed Aug 23 22:01:23 GMT 1995 Michael Veksler <mveksler@vnet.ibm.com> * [ipc/Imakefile] [ipc/wine_test_stub.c] Fixed IPC testing. Now it can be compiled with "make tests" Wed Aug 23 21:04:14 1995 Fons Botman <botman@wab-tis.rabobank.nl> * [if1632/kernel.spec] [include/windows.h] [misc/main.c] Added GetWinDebugInfo/SetWinDebugInfo stub for player.exe Sun Aug 20 13:49:42 1995 Marcus Meissner <msmeissn@faui01.informatik.uni-erlangen.de> * [miscemu/int21.c] Misc fix to int21,ah=40 (write) to match _lwrite(). AX=0x440A (check if handle is remote) added. * [multimedia/mmsystem.c] Moved mciSendString to mcistring.c. * [multimedia/mcistring.c] New file, string interface for MCI (not complete, not thoroughly tested). * [multimedia/audio.c] IOCTL prints errors; one paranoid check disabled. * [misc/file.c] Misc operator precedence fixes. * [if1632/gdi.spec] [objects/bitblt.c] Stub for FastWindowFrame (parameters not correct). Sat Aug 19 01:31:23 1995 Graham Menhennitt <gfm@werple.mira.net.au> * [loader/ne_image.c] Preliminary support for iterated segments. Sat Aug 19 00:43:04 1995 Andrew Taylor (andrew@riscan.com) * [windows/mapping.c] In function MAPPING_FixIsotropic(), VportExt[XY] is multiplied by the absolute value of (ydim / xdim) or (xdim / ydim). Thu Aug 15 23:00:16 Gregory Trubetskoy <grisha@mira.com> * [objects/oembitmap.c] Added some includes for Windows 95. * [include/sysmetrics.h] Added some sysmetrics for Windows 95. * [include/bitmaps/*95] New files: obm_close_95, obm_closed_95, obm_reduce_95, obm_reduced_95 obm_zoom_95, obm_zoomd_95 - these are some pixmaps for Windows 95. Thu Aug 10 12:00:00 1995 Jan Willamowius (jan@janhh.shnet.org) * [misc/shell.c] [rc/sysres*.rc] The caption of the ShellAbout dialog box is language specific and should be defined in the resources.
parent 808cb043
This is release 950817 of Wine the MS Windows emulator. This is still a
This is release 950901 of Wine the MS Windows emulator. This is still a
developer's only release. There are many bugs and many unimplemented API
features. Most applications still do not work.
Patches should be submitted to "wine-new@amscons.com". Please don't forget
to include a ChangeLog entry. I'll make a new release every other Sunday.
to include a ChangeLog entry. I'll make a new release every other week.
WHAT'S NEW with Wine-950817: (see ChangeLog for details)
- Built-in debugger improvements.
- Multimedia fixes.
- IPC can be disabled at run-time.
WHAT'S NEW with Wine-950901: (see ChangeLog for details)
- Accesses to BIOS segment 0x40 are trapped and emulated.
- Multimedia improvements.
- IPC can now be disabled at compile-time.
- Documentation for the IPC code.
- Lots of bug fixes.
See the README file in the distribution for installation instructions.
......@@ -17,11 +18,11 @@ Because of lags created by using mirror, this message may reach you before
the release is available at the ftp sites. The sources will be available
from the following locations:
sunsite.unc.edu:/pub/Linux/ALPHA/wine/Wine-950817.tar.gz
tsx-11.mit.edu:/pub/linux/ALPHA/Wine/development/Wine-950817.tar.gz
ftp.infomagic.com:/pub/mirrors/linux/wine/development/Wine-950817.tar.gz
ftp.funet.fi:/pub/OS/Linux/ALPHA/Wine/Wine-950817.tar.gz
aris.com:/pub/linux/ALPHA/Wine/development/Wine-950817.tar.gz
sunsite.unc.edu:/pub/Linux/ALPHA/wine/Wine-950901.tar.gz
tsx-11.mit.edu:/pub/linux/ALPHA/Wine/development/Wine-950901.tar.gz
ftp.infomagic.com:/pub/mirrors/linux/wine/development/Wine-950901.tar.gz
ftp.funet.fi:/pub/OS/Linux/ALPHA/Wine/Wine-950901.tar.gz
aris.com:/pub/linux/ALPHA/Wine/development/Wine-950901.tar.gz
It should also be available from any site that mirrors tsx-11 or sunsite.
......
Thu Aug 31 17:19:57 1995 Alexandre Julliard <julliard@sunsite.unc.edu>
* [Configure]
Added compile-time option for IPC.
* [configure.in]
Added command-line options for language, IPC and malloc
debugging.
* [controls/menu.c]
WM_MENUSELECT was sometimes sent to the wrong window.
* [debugger/break.c]
For the 'next' command, only step over instruction that require
it. This allows 'next' to do the right thing with jmp and ret
instructions.
* [ipc/*.c] [memory/atom.c] [memory/global.c]
IPC can now be configured out at compile-time.
* [loader/task.c]
Bug fix in TASK_Reschedule() that could cause a task to be deleted
twice.
* [miscemu/dosmem.c] (New file)
Partial emulation of the BIOS data segment.
* [miscemu/instr.c]
Trap attempts to access selector 0x40 and remap the access to
segment __0040H.
* [tools/build.c]
Fixed bug in CallTo32_LargeStack() that caused problems when
compiling Wine with the -fomit-frame-pointer option.
* [windows/message.c]
Fixed bug in hardware event handling that could cause some events
to get ignored.
Sat Aug 26 13:12:59 IST 1995 Michael Veksler <mveksler@vnet.ibm.com>
* [ipc/README] [ipc/dde.tex]
LaTeX documentation for the ipc and DDE stuff.
Wed Aug 23 22:01:23 GMT 1995 Michael Veksler <mveksler@vnet.ibm.com>
* [ipc/Imakefile] [ipc/wine_test_stub.c]
Fixed IPC testing. Now it can be compiled with "make tests"
Wed Aug 23 21:04:14 1995 Fons Botman <botman@wab-tis.rabobank.nl>
* [if1632/kernel.spec] [include/windows.h] [misc/main.c]
Added GetWinDebugInfo/SetWinDebugInfo stub for player.exe
Sun Aug 20 13:49:42 1995 Marcus Meissner <msmeissn@faui01.informatik.uni-erlangen.de>
* [miscemu/int21.c]
Misc fix to int21,ah=40 (write) to match _lwrite().
AX=0x440A (check if handle is remote) added.
* [multimedia/mmsystem.c]
Moved mciSendString to mcistring.c.
* [multimedia/mcistring.c]
New file, string interface for MCI (not complete, not thoroughly
tested).
* [multimedia/audio.c]
IOCTL prints errors; one paranoid check disabled.
* [misc/file.c]
Misc operator precedence fixes.
* [if1632/gdi.spec] [objects/bitblt.c]
Stub for FastWindowFrame (parameters not correct).
Sat Aug 19 01:31:23 1995 Graham Menhennitt <gfm@werple.mira.net.au>
* [loader/ne_image.c]
Preliminary support for iterated segments.
Sat Aug 19 00:43:04 1995 Andrew Taylor (andrew@riscan.com)
* [windows/mapping.c]
In function MAPPING_FixIsotropic(), VportExt[XY] is multiplied by
the absolute value of (ydim / xdim) or (xdim / ydim).
Thu Aug 15 23:00:16 Gregory Trubetskoy <grisha@mira.com>
* [objects/oembitmap.c]
Added some includes for Windows 95.
* [include/sysmetrics.h]
Added some sysmetrics for Windows 95.
* [include/bitmaps/*95]
New files: obm_close_95, obm_closed_95, obm_reduce_95, obm_reduced_95
obm_zoom_95, obm_zoomd_95 - these are some pixmaps for Windows 95.
Thu Aug 10 12:00:00 1995 Jan Willamowius (jan@janhh.shnet.org)
* [misc/shell.c] [rc/sysres*.rc]
The caption of the ShellAbout dialog box is language specific and
should be defined in the resources.
----------------------------------------------------------------------
Thu Aug 17 19:30:14 1995 Alexandre Julliard <julliard@sunsite.unc.edu>
......
......@@ -49,6 +49,12 @@ do
done
ALLDEFINES="$ALLDEFINES -ALANG\($LANGUAGE\)"
prompt "Inter-process communication" CONFIG_IPC N
if [ CONFIG_IPC = 'Y' -o $CONFIG_IPC = 'y' ]
then
ALLDEFINES="$ALLDEFINES -DCONFIG_IPC"
fi
prompt "Malloc debugging" MALLOC_DEBUGGING N
if [ MALLOC_DEBUGGING = 'Y' -o $MALLOC_DEBUGGING = 'y' ]
then
......
......@@ -3,7 +3,6 @@
#if defined(i386FreeBsd) || defined(FreeBSDArchitecture)
MAKE = gmake
CC = gcc -D__FreeBSD__
#endif
DEFINES = AutoDefines -DUSE_READLINE
......
......@@ -12,6 +12,7 @@
CC = @CC@
CFLAGS = @CFLAGS@
DEFS = @DEFS@
XINCL = @x_includes@
TOPSRC = @top_srcdir@
DIVINCL = -I$(TOPSRC)/include
......@@ -22,7 +23,7 @@ LDLIBS = -lm
LD = @LD@
LANG = @LANG@
LDCOMBINEFLAGS = @LDCOMBINEFLAGS@
@SET_MAKE@
COMMONSUBDIRS = controls rc ipc loader misc multimedia objects windows
......@@ -53,7 +54,7 @@ wine: $(SUBDIRS) dummy
$(CC) -o wine $(OBJS) $(LDOPTIONS) $(XDIR) $(XPM_LIB) $(XLIB) $(LDLIBS)
$(SUBDIRS): dummy
@cd $@; $(MAKE) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'LD=$(LD)' 'LDCOMBINEFLAGS=$(LDCOMBINEFLAGS)' 'LANG=$(LANG)'
@cd $@; $(MAKE) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'DEFS=$(DEFS)' 'LD=$(LD)' 'LDCOMBINEFLAGS=$(LDCOMBINEFLAGS)' 'LANG=$(LANG)'
depend:
for i in $(SUBDIRS); do (cd $$i; $(MAKE) depend); done
......@@ -63,14 +64,14 @@ etags:
clean:
for i in $(SUBDIRS); do (cd $$i; $(MAKE) clean); done
rm -f *.o \#*\# *~ wine wine.sym TAGS
rm -f *.o \#*\# *~ *.bak wine wine.sym TAGS
distclean:
for i in $(SUBDIRS); do (cd $$i; $(MAKE) distclean); done
echo "/* autoconf.h generated automatically. Run Configure */" >autoconf.h
echo "#error You must run Configure before you can build the makefiles." >>autoconf.h
rm -f *.o \#*\# *~ wine wine.sym
rm -f stamp-config config.* include/config.h Makefile
rm -f *.o \#*\# *~ *.bak wine wine.sym TAGS
rm -f config.* include/config.h Makefile
countryclean:
for i in $(SUBDIRS); do (cd $$i; $(MAKE) countryclean); done
......
......@@ -12,16 +12,19 @@ realises the problem later on. 'make' again and watch the output. Be
sure to analyze the problem before you report it to the newsgroup.
2. What are these questions in Configure?
Emulator/Library: You need an emulator when you want to run MS-Win
binaries. You need a library when you want to compile the source code
of a Windows program.
Language: Wine can present the system menu in multiple languages. Select
one of English, German, or Norwegian here.
Malloc debugging: When enabled, the mtrace and mcheck GNU libc functions
are called. You might want to set the MALLOC_TRACE environment variable
to a trace file name. If your system supports another way of malloc
debugging, feel free to add it.
Config file: Sets the Wine environment. See README for details.
- Emulator/Library: You need an emulator when you want to run MS-Win
binaries. You need a library when you want to compile the source code
of a Windows program.
- Language: Wine can present the system menu in multiple languages. Select
one of English, German, or Norwegian here.
- Inter-process communication: Allows setting up a DDE conversation
between different instances of Wine. Only really useful when
building Wine as a library.
- Malloc debugging: When enabled, the mtrace and mcheck GNU libc functions
are called. You might want to set the MALLOC_TRACE environment variable
to a trace file name. If your system supports another way of malloc
debugging, feel free to add it.
- Config file: Sets the Wine environment. See README for details.
3. BAR.EXE used to work, but does not work anymore
Look at the ChangeLog to see what files have been changed. Try to undo
......
......@@ -3,12 +3,23 @@ dnl Author: Michael Patra <micky@marie.physik.tu-berlin.de>
dnl <patra@itp1.physik.tu-berlin.de>
AC_REVISION([configure.in 1.00])
AC_INIT(controls/edit.c)
AC_CONFIG_HEADER(include/config.h)
# 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 "$LDFLAGS" && LDFLAGS=-g AC_SUBST(LDFLAGS)
AC_ARG_WITH(language,
[ --with-language=LANG change the default language (LANG=En/De/No)],
[LANG="-ALANG\($withval\)"],
[LANG="-ALANG\(En\)"],)
AC_SUBST(LANG)
AC_ARG_WITH(ipc,
[ --with-ipc use inter-process communication for DDE],
[AC_DEFINE(CONFIG_IPC)])
AC_ARG_WITH(malloc-debug,
[ --with-malloc-debug enable malloc() debugging],
[AC_DEFINE(MALLOC_DEBUGGING)])
AC_PROG_MAKE_SET
AC_PROG_CC
AC_PATH_X
......@@ -41,70 +52,6 @@ TOP_SRCDIR="."
else
TOP_SRCDIR="${top_srcdir}"
fi
AC_MSG_CHECKING(for language in autoconf.h)
if test -f ${TOP_SRCDIR}/autoconf.h; then
LANG=`tr ' ' '\n' < ${TOP_SRCDIR}/autoconf.h | grep '\-ALANG' | head -1`
if test -n "${LANG}"; then
AC_MSG_RESULT(`echo "${LANG}" | cut -b9-10`)
fi
fi
if test -z "${LANG}"; then
AC_MSG_RESULT(no)
fi
AC_SUBST(LANG)
if test -z "${LANG}"; then
AC_MSG_CHECKING(for language through domainname)
DNAME=`domainname`
if test `echo "${DNAME}" | grep -c "\.no"` -ne 0; then
LANG="-ALANG\(No\)"
AC_MSG_RESULT(No)
fi
if test `echo "${DNAME}" | grep -c "\.de"` -ne 0; then
LANG="-ALANG\(De\)"
AC_MSG_RESULT(De)
fi
if test `echo "${DNAME}" | grep -c "\.uk"` -ne 0; then
LANG="-ALANG\(En\)"
AC_MSG_RESULT(En)
fi
if test `echo "${DNAME}" | grep -c "\.com"` -ne 0; then
LANG="-ALANG\(En\)"
AC_MSG_RESULT(En)
fi
if test `echo "${DNAME}" | grep -c "\.edu"` -ne 0; then
LANG="-ALANG\(En\)"
AC_MSG_RESULT(En)
fi
if test `echo "${DNAME}" | grep -c "\.gov"` -ne 0; then
LANG="-ALANG\(En\)"
AC_MSG_RESULT(En)
fi
if test -z "${LANG}"; then
AC_MSG_RESULT(no)
fi
fi
if test -z "${LANG}"; then
AC_MSG_CHECKING(for linux)
AC_EGREP_CPP(yes,
[#ifdef linux
yes
#endif
], AC_MSG_RESULT(yes)
AC_MSG_CHECKING(for language by examining keymap)
if test `dumpkeys | grep "keycode *26" | tr ' ' '\n' | grep -c udiaeresis` -ne 0; then
AC_MSG_RESULT(De)
LANG='-ALANG\(De\)'
else
AC_MSG_RESULT(no)
LANG='-ALANG\(En\)'
fi
,
AC_MSG_RESULT(no)
LANG='-ALANG\(En\)'
)
fi
AC_MSG_CHECKING(for wine.ini in autoconf.h)
if test -f ${TOP_SRCDIR}/autoconf.h; then
......@@ -129,11 +76,7 @@ fi
fi
AC_SUBST(WINE_INI_GLOBAL)
test -z "$LDFLAGS" && LDFLAGS=-g AC_SUBST(LDFLAGS)
AC_OUTPUT(controls/Makefile ipc/Makefile loader/Makefile memory/Makefile misc/Makefile miscemu/Makefile multimedia/Makefile objects/Makefile windows/Makefile rc/Makefile debugger/Makefile debugger/readline/Makefile tools/Makefile if1632/Makefile Makefile autoconf.h, [touch stamp-config])
AC_OUTPUT(controls/Makefile ipc/Makefile loader/Makefile memory/Makefile misc/Makefile miscemu/Makefile multimedia/Makefile objects/Makefile windows/Makefile rc/Makefile debugger/Makefile debugger/readline/Makefile tools/Makefile if1632/Makefile Makefile autoconf.h)
echo
echo "Configure finished. Do 'make depend; make' to compile Wine."
......
......@@ -27,7 +27,7 @@ depend:
mv tmp_make Makefile
clean:
rm -f *.o \#*\# *~ tmp_make
rm -f *.o \#*\# *~ *.bak tmp_make
distclean: clean
rm -f Makefile
......
......@@ -261,7 +261,6 @@ static void PB_Paint( HWND hButton, HDC hDC, WORD action )
HBRUSH hOldBrush;
char *text;
DWORD dwTextSize;
int delta;
TEXTMETRIC tm;
WND *wndPtr = WIN_FindWndPtr( hButton );
BUTTONINFO *infoPtr = (BUTTONINFO *)wndPtr->wExtra;
......
......@@ -41,11 +41,12 @@ depend:
clean:
(cd readline; $(MAKE) clean)
rm -f *.o \#*\# *~ dbg.tab.c dbg.tab.h lex.yy.c y.tab.c y.tab.h tmp_make
rm -f *.o \#*\# *~ *.bak tmp_make
rm -f dbg.tab.c dbg.tab.h lex.yy.c y.tab.c y.tab.h
distclean:
(cd readline; $(MAKE) distclean)
rm -f *.o \#*\# *~ dbg.tab.c dbg.tab.h lex.yy.c y.tab.c y.tab.h tmp_make Makefile
rm -f *.o \#*\# *~ *.bak dbg.tab.c dbg.tab.h lex.yy.c y.tab.c y.tab.h tmp_make Makefile
countryclean:
......
......@@ -66,6 +66,71 @@ static void DEBUG_SetOpcode( const DBG_ADDR *addr, BYTE op )
/***********************************************************************
* DEBUG_IsStepOverInstr
*
* Determine if the instruction at CS:EIP is an instruction that
* we need to step over (like a call or a repetitive string move).
*/
static BOOL DEBUG_IsStepOverInstr( struct sigcontext_struct *context )
{
BYTE *instr = (BYTE *)PTR_SEG_OFF_TO_LIN(CS_reg(context),EIP_reg(context));
for (;;)
{
switch(*instr)
{
/* Skip all prefixes */
case 0x2e: /* cs: */
case 0x36: /* ss: */
case 0x3e: /* ds: */
case 0x26: /* es: */
case 0x64: /* fs: */
case 0x65: /* gs: */
case 0x66: /* opcode size prefix */
case 0x67: /* addr size prefix */
case 0xf0: /* lock */
case 0xf2: /* repne */
case 0xf3: /* repe */
instr++;
continue;
/* Handle call instructions */
case 0xe8: /* call <offset> */
case 0x9a: /* lcall <seg>:<off> */
return TRUE;
case 0xff: /* call <regmodrm> */
return (((instr[1] & 0x38) == 0x10) ||
((instr[1] & 0x38) == 0x18));
/* Handle string instructions */
case 0x6c: /* insb */
case 0x6d: /* insw */
case 0x6e: /* outsb */
case 0x6f: /* outsw */
case 0xa4: /* movsb */
case 0xa5: /* movsw */
case 0xa6: /* cmpsb */
case 0xa7: /* cmpsw */
case 0xaa: /* stosb */
case 0xab: /* stosw */
case 0xac: /* lodsb */
case 0xad: /* lodsw */
case 0xae: /* scasb */
case 0xaf: /* scasw */
return TRUE;
default:
return FALSE;
}
}
}
/***********************************************************************
* DEBUG_SetBreakpoints
*
* Set or remove all the breakpoints.
......@@ -257,14 +322,18 @@ void DEBUG_RestartExecution( struct sigcontext_struct *context,
break;
case EXEC_STEP_OVER: /* Stepping over a call */
EFL_reg(DEBUG_context) &= ~STEP_FLAG;
addr.off += instr_len;
breakpoints[0].addr = addr;
breakpoints[0].enabled = TRUE;
breakpoints[0].in_use = TRUE;
breakpoints[0].opcode = *(BYTE *)DBG_ADDR_TO_LIN( &addr );
DEBUG_SetBreakpoints( TRUE );
break;
if (DEBUG_IsStepOverInstr(DEBUG_context))
{
EFL_reg(DEBUG_context) &= ~STEP_FLAG;
addr.off += instr_len;
breakpoints[0].addr = addr;
breakpoints[0].enabled = TRUE;
breakpoints[0].in_use = TRUE;
breakpoints[0].opcode = *(BYTE *)DBG_ADDR_TO_LIN( &addr );
DEBUG_SetBreakpoints( TRUE );
break;
}
/* else fall through to single-stepping */
case EXEC_STEP_INSTR: /* Single-stepping an instruction */
EFL_reg(DEBUG_context) |= STEP_FLAG;
......
......@@ -115,7 +115,7 @@ void DEBUG_ExamineMemory( const DBG_ADDR *address, int count, char format )
{
fprintf(stderr," %04x", *wdump++);
addr.off += 2;
if ((i % 10) == 7) {
if ((i % 8) == 7) {
fprintf(stderr,"\n");
DEBUG_PrintAddress( &addr, dbg_mode );
fprintf(stderr,": ");
......@@ -133,7 +133,7 @@ void DEBUG_ExamineMemory( const DBG_ADDR *address, int count, char format )
} else
fprintf(stderr," %c", *pnt++);
addr.off++;
if ((i % 32) == 7) {
if ((i % 32) == 31) {
fprintf(stderr,"\n");
DEBUG_PrintAddress( &addr, dbg_mode );
fprintf(stderr,": ");
......@@ -147,7 +147,7 @@ void DEBUG_ExamineMemory( const DBG_ADDR *address, int count, char format )
{
fprintf(stderr," %02x", (*pnt++) & 0xff);
addr.off++;
if ((i % 32) == 7) {
if ((i % 16) == 15) {
fprintf(stderr,"\n");
DEBUG_PrintAddress( &addr, dbg_mode );
fprintf(stderr,": ");
......
CC = @CC@
CFLAGS = @CFLAGS@
DEFS = @DEFS@
XINCL = @x_includes@
TOPSRC = @top_srcdir@
DIVINCL = -I$(TOPSRC)/include
LD = @LD@
LDCOMBINEFLAGS = @LDCOMBINEFLAGS@
DIVDEFS = @DEFS@ -DHIDE -DANSI_ARROWS
DIVDEFS = $(DEFS) -DHIDE -DANSI_ARROWS
MODULE = readline
......@@ -28,7 +29,7 @@ depend:
mv tmp_make Makefile
clean:
rm -f *.o \#*\# *~ tmp_make
rm -f *.o \#*\# *~ *.bak tmp_make
distclean: clean
rm -f Makefile
......
......@@ -4,10 +4,6 @@
*/
#include "editline.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#if defined(HAVE_TCGETATTR)
#include <termios.h>
......
......@@ -24,7 +24,8 @@ DLLS32 = gdi32.spec kernel32.spec shell32.spec user32.spec winprocs32.spec
OBJS = $(SRCS:.c=.o) $(DLLS16:.spec=.o) $(DLLS32:.spec=.o) call16.o call32.o
SFILES = $(DLLS16:.spec=.S)
SPEC16_FILES = $(DLLS16:.spec=.S)
SPEC32_FILES = $(DLLS32:.spec=.c)
.SUFFIXES: .spec
......@@ -42,16 +43,16 @@ SFILES = $(DLLS16:.spec=.S)
all: checkbuild $(MODULE).o
$(SFILES): $(TOPSRC)/tools/build
$(SPEC16_FILES) $(SPEC32_FILES): $(TOPSRC)/tools/build
checkbuild:
cd $(TOPSRC)/tools; $(MAKE) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'LD=$(LD)' 'LDCOMBINEFLAGS=$(LDCOMBINEFLAGS)' build
call16.S: $(TOPSRC)/include/callback.h
$(TOPSRC)/tools/build -call16 `cat $(TOPSRC)/include/callback.h | grep "extern.*CallTo16_" | sed 's/.*CallTo16_\(.*\)(.*/\1/' | sort | uniq` > call16.S
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
call32.S: $(SFILES)
$(BUILD) -call32 `cat $(SFILES) | grep CallTo32_ | sed 's/.*CallTo32_\(.*\)/\1/' | sort | uniq` > call32.S
call32.S: $(SPEC16_FILES)
$(BUILD) -call32 `cat $(SPEC16_FILES) | grep CallTo32_ | sed 's/.*CallTo32_\(.*\)/\1/' | sort | uniq` > call32.S
$(MODULE).o: $(OBJS)
$(LD) $(LDCOMBINEFLAGS) $(OBJS) -o $(MODULE).o
......@@ -62,7 +63,7 @@ depend:
mv tmp_make Makefile
clean:
rm -f *.o \#*\# *~ tmp_make
rm -f *.o \#*\# *~ *.bak tmp_make
rm -f $(DLLS16:.spec=.S) $(DLLS32:.spec=.c) call32.S call16.S
distclean: clean
......
......@@ -245,7 +245,7 @@ id 3
380 stub ENDPAGE
381 stub SETABORTPROC
382 stub ABORTDOC
400 stub FASTWINDOWFRAME
400 pascal16 FastWindowFrame(word long word word long) FastWindowFrame
401 stub GDIMOVEBITMAP
403 stub GDIINIT2
405 stub FINALGDIINIT
......
......@@ -232,7 +232,7 @@ id 1
#351 BUNNY_351
353 pascal lstrcpyn(segptr segptr word) lstrcpyn
354 stub GetAppCompatFlags
355 stub GetWinDebugInfo
356 stub SetWinDebugInfo
355 pascal16 GetWinDebugInfo(ptr word) GetWinDebugInfo
356 pascal16 SetWinDebugInfo(ptr) SetWinDebugInfo
403 pascal16 FarSetOwner(word word) FarSetOwner
404 pascal16 FarGetOwner(word) FarGetOwner
add $8,%esp
popw %es
add $2,%esp
popw %ds
add $2,%esp
popl %edi
popl %esi
popl %ebp
add $4,%esp
popl %ebx
popl %edx
popl %ecx
popl %eax
add $16,%esp
popl %gs:return_value
add $20,%esp
pushl %gs:return_value
popfl
......@@ -25,10 +25,4 @@ typedef struct
HANDLE entries[1];
} ATOMTABLE;
ATOM LocalAddAtom( SEGPTR str );
ATOM LocalDeleteAtom( ATOM atom );
ATOM LocalFindAtom( SEGPTR str );
WORD LocalGetAtomName( ATOM atom, LPSTR buffer, short count );
#endif /* ATOM_H */
/* XPM */
static char * obm_close_95[] = {
"16 14 6 1",
" s button_highlight c white",
"+ s button_edge c grey85",
"X s button_face c grey75",
"o s button_shadow c grey50",
". s button_text c black",
"O s window_frame c black",
" O",
" +++++++++++++oO",
" +XXXXXXXXXXXXoO",
" +XX..XXXX..XXoO",
" +XXX..XX..XXXoO",
" +XXXX....XXXXoO",
" +XXXXX..XXXXXoO",
" +XXXX....XXXXoO",
" +XXX..XX..XXXoO",
" +XX..XXXX..XXoO",
" +XXXXXXXXXXXXoO",
" +XXXXXXXXXXXXoO",
" ooooooooooooooO",
"OOOOOOOOOOOOOOOO"};
/* XPM */
static char * obm_closed_95[] = {
"16 14 6 1",
" s button_highlight c white",
"+ s button_edge c grey85",
"X s button_face c grey75",
"o s button_shadow c grey50",
". s button_text c black",
"O s window_frame c black",
"OOOOOOOOOOOOOOO ",
"Oooooooooooooo+ ",
"OoXXXXXXXXXXXX+ ",
"OoXXXXXXXXXXXX+ ",
"OoXXX..XXXX..X+ ",
"OoXXXX..XX..XX+ ",
"OoXXXXX....XXX+ ",
"OoXXXXXX..XXXX+ ",
"OoXXXXX....XXX+ ",
"OoXXXX..XX..XX+ ",
"OoXXX..XXXX..X+ ",
"OoXXXXXXXXXXXX+ ",
"O++++++++++++++ ",
" "};
/* XPM */
static char * obm_reduce_95[] = {
"16 14 6 1",
" s button_highlight c white",
"+ s button_edge c grey85",
"X s button_face c grey75",
"o s button_shadow c grey50",
". s button_text c black",
"O s window_frame c black",
" O",
" +++++++++++++oO",
" +XXXXXXXXXXXXoO",
" +XXXXXXXXXXXXoO",
" +XXXXXXXXXXXXoO",
" +XXXXXXXXXXXXoO",
" +XXXXXXXXXXXXoO",
" +XXXXXXXXXXXXoO",
" +XXXXXXXXXXXXoO",
" +XX......XXXXoO",
" +XX......XXXXoO",
" +XXXXXXXXXXXXoO",
" ooooooooooooooO",
"OOOOOOOOOOOOOOOO"};
/* XPM */
static char * obm_reduced_95[] = {
"16 14 6 1",
"O s button_highlight c white",
"o s button_edge c grey85",
"X s button_face c grey75",
"+ s button_shadow c grey50",
". s button_text c black",
" s window_frame c black",
" ",
" +++++++++++++oO",
" +XXXXXXXXXXXXoO",
" +XXXXXXXXXXXXoO",
" +XXXXXXXXXXXXoO",
" +XXXXXXXXXXXXoO",
" +XXXXXXXXXXXXoO",
" +XXXXXXXXXXXXoO",
" +XXXXXXXXXXXXoO",
" +XXXXXXXXXXXXoO",
" +XXX......XXXoO",
" +XXX......XXXoO",
" ooooooooooooooO",
"OOOOOOOOOOOOOOOO"};
/* XPM */
static char * obm_zoom_95[] = {
"16 14 6 1",
" s button_highlight c white",
"+ s button_edge c grey85",
"X s button_face c grey75",
"o s button_shadow c grey50",
". s button_text c black",
"O s window_frame c black",
" O",
" +++++++++++++oO",
" +X.........XXoO",
" +X.........XXoO",
" +X.XXXXXXX.XXoO",
" +X.XXXXXXX.XXoO",
" +X.XXXXXXX.XXoO",
" +X.XXXXXXX.XXoO",
" +X.XXXXXXX.XXoO",
" +X.XXXXXXX.XXoO",
" +X.........XXoO",
" +XXXXXXXXXXXXoO",
" ooooooooooooooO",
"OOOOOOOOOOOOOOOO"};
/* XPM */
static char * obm_zoomd_95[] = {
"16 14 6 1",
"O s button_highlight c white",
"o s button_edge c grey85",
"X s button_face c grey75",
"+ s button_shadow c grey50",
". s button_text c black",
" s window_frame c black",
" ",
" +++++++++++++oO",
" +XXXXXXXXXXXXoO",
" +XX.........XoO",
" +XX.........XoO",
" +XX.XXXXXXX.XoO",
" +XX.XXXXXXX.XoO",
" +XX.XXXXXXX.XoO",
" +XX.XXXXXXX.XoO",
" +XX.XXXXXXX.XoO",
" +XX.XXXXXXX.XoO",
" +XX.........XoO",
" ooooooooooooooO",
"OOOOOOOOOOOOOOOO"};
......@@ -9,15 +9,20 @@
*/
#ifndef __WINE_DDE_ATOM_H
#define __WINE_DDE_ATOM_H
#ifdef CONFIG_IPC
#include "windows.h"
#define DDE_ATOMS 157 /* a prime number for hashing */
void ATOM_GlobalInit(void);
/*
ATOM GlobalAddAtom( LPCSTR str );
ATOM GlobalDeleteAtom( ATOM atom );
ATOM GlobalFindAtom( LPCSTR str );
WORD GlobalGetAtomName( ATOM atom, LPSTR buffer, short count )
*/
ATOM DDE_GlobalAddAtom( SEGPTR str );
ATOM DDE_GlobalDeleteAtom( ATOM atom );
ATOM DDE_GlobalFindAtom( SEGPTR str );
WORD DDE_GlobalGetAtomName( ATOM atom, LPSTR buffer, short count )
#endif /* CONFIG_IPC */
#endif __WINE_DDE_ATOM_H
......@@ -9,6 +9,9 @@
*/
#ifndef __WINE_DDE_MEM_H
#define __WINE_DDE_MEM_H
#ifdef CONFIG_IPC
#include "wintypes.h"
#include "global.h"
#include "shm_block.h"
......@@ -31,4 +34,6 @@ HANDLE DDE_GlobalSize(WORD);
HANDLE DDE_GlobalHandle(WORD);
HANDLE DDE_GlobalFlags(WORD);
#endif /* CONFIG_IPC */
#endif /* __WINE_DDE_MEM_H */
......@@ -9,6 +9,9 @@
*/
#ifndef __WINE_DDE_PROC_H
#define __WINE_DDE_PROC_H
#ifdef CONFIG_IPC
#include <setjmp.h>
#include "wintypes.h"
#include "windows.h"
......@@ -54,4 +57,7 @@ BOOL DDE_SendMessage( MSG *msg);
int DDE_GetRemoteMessage();
void DDE_DestroyWindow(HWND hwnd); /* delete DDE info regarding hwnd */
void DDE_TestDDE(HWND hwnd); /* do we have dde handling in the window ?*/
#endif /* CONFIG_IPC */
#endif /* __WINE_DDE_PROC_H */
/*
* Misc. emulation definitions
*
* Copyright 1995 Alexandre Julliard
*/
#ifndef __WINE_MISCEMU_H
#define __WINE_MISCEMU_H
#include "wintypes.h"
#include "registers.h"
extern BOOL INSTR_EmulateInstruction( struct sigcontext_struct *context );
extern DWORD inport( int port, int count );
extern void outport( int port, int count, DWORD value );
/* miscemu/dosmem.c */
extern BOOL DOSMEM_Init(void);
extern void DOSMEM_FillBiosSegment(void);
extern HANDLE DOSMEM_BiosSeg;
/* miscemu/instr.c */
extern BOOL INSTR_EmulateInstruction( struct sigcontext_struct *context );
/* miscemu/interrupts.c */
extern BOOL INT_Init(void);
extern SEGPTR INT_GetHandler( BYTE intnum );
extern void INT_SetHandler( BYTE intnum, SEGPTR handler );
/* miscemu/int1a.c */
extern DWORD INT1A_GetTicksSinceMidnight(void);
/* miscemu/int21.c */
extern void INT21_Init(void);
/* miscemu/ioports.c */
extern DWORD inport( int port, int count );
extern void outport( int port, int count, DWORD value );
#define INT_BARF(context,num) \
fprintf( stderr, "int%x: unknown/not implemented parameters:\n" \
......
......@@ -9,6 +9,9 @@
*/
#ifndef __WINE_SHM_BLOCK_H
#define __WINE_SHM_BLOCK_H
#ifdef CONFIG_IPC
#include <sys/shm.h>
#include "wintypes.h"
#define SEGSIZE 0x10000 /* 64 */
......@@ -83,4 +86,5 @@ struct shm_block *shm_attach_block(int shm_id, int proc_idx,
/* delete chain of shm blocks (pointing to each other */
void shm_delete_chain(int *shmid);
#endif /* __WINE_SHM_BLOCK_H */
#endif /* CONFIG_IPC */
#endif /* __WINE_SHM_BLOCK_H */
......@@ -10,6 +10,8 @@
#ifndef __WINE_SHM_FRAGMENT_H
#define __WINE_SHM_FRAGMENT_H
#ifdef CONFIG_IPC
#include "shm_block.h"
#define NIL ((int) 0)
......@@ -44,4 +46,6 @@ void shm_FragPtrFree(struct shm_block *block, void *ptr);
/* This is used for debugging only */
void shm_print_free_list(struct shm_block *block);
#endif /* CONFIG_IPC */
#endif /* __WINE_SHM_FRAGMENT_H */
......@@ -9,6 +9,9 @@
*/
#ifndef __WINE_SHM_MAIN_BLK_H
#define __WINE_SHM_MAIN_BLK_H
#ifdef CONFIG_IPC
#include <sys/shm.h>
#include "shm_block.h"
#include "shm_semaph.h"
......@@ -52,4 +55,6 @@ void DDE_mem_init();
int DDE_no_of_attached();
#define DDE_IPC_init() ( (main_block==NULL) ? (DDE_mem_init()) : 0 )
#endif /* CONFIG_IPC */
#endif /* __WINE_SHM_MAIN_BLK_H */
......@@ -12,6 +12,8 @@
#define __WINE_SHM_SEMAPH_H
/* IMPORTANT: If possible, restrict usage of these functions. */
#ifdef CONFIG_IPC
typedef int shm_sem;
void shm_read_wait(shm_sem semid);
......@@ -21,4 +23,6 @@ void shm_read_signal(shm_sem semid);
void shm_sem_init(shm_sem *semptr);
void shm_sem_done(shm_sem *semptr);
#endif /* CONFIG_IPC */
#endif /* __WINE_SHM_SEMAPH_H */
......@@ -11,30 +11,56 @@
/* Constant system metrics */
#ifdef WIN_95_LOOK
#define SYSMETRICS_CXVSCROLL 14
#define SYSMETRICS_CYHSCROLL 14
#else
#define SYSMETRICS_CXVSCROLL 16
#define SYSMETRICS_CYHSCROLL 16
#endif
#define SYSMETRICS_CYCAPTION 20
#define SYSMETRICS_CXBORDER 1
#define SYSMETRICS_CYBORDER 1
#ifdef WIN_95_LOOK
#define SYSMETRICS_CXDLGFRAME 2
#define SYSMETRICS_CYDLGFRAME 2
#define SYSMETRICS_CYVTHUMB 13
#define SYSMETRICS_CXHTHUMB 13
#else
#define SYSMETRICS_CXDLGFRAME 4
#define SYSMETRICS_CYDLGFRAME 4
#define SYSMETRICS_CYVTHUMB 16
#define SYSMETRICS_CXHTHUMB 16
#endif
#define SYSMETRICS_CXICON 32
#define SYSMETRICS_CYICON 32
#define SYSMETRICS_CXCURSOR 32
#define SYSMETRICS_CYCURSOR 32
#define SYSMETRICS_CYMENU 18
#ifdef WIN_95_LOOK
#define SYSMETRICS_CYVSCROLL 14
#define SYSMETRICS_CXHSCROLL 14
#define SYSMETRICS_CXMIN 112
#define SYSMETRICS_CYMIN 27
#else
#define SYSMETRICS_CYVSCROLL 16
#define SYSMETRICS_CXHSCROLL 16
#define SYSMETRICS_CXMIN 100
#define SYSMETRICS_CYMIN 28
#endif
#define SYSMETRICS_CXSIZE 18
#define SYSMETRICS_CYSIZE 18
#ifdef WIN_95_LOOK
#define SYSMETRICS_CXMINTRACK 112
#define SYSMETRICS_CYMINTRACK 27
#define SYSMETRICS_CXICONSPACING 75
#define SYSMETRICS_CYICONSPACING 75
#else
#define SYSMETRICS_CXMINTRACK 100
#define SYSMETRICS_CYMINTRACK 28
#define SYSMETRICS_CXICONSPACING 20
#define SYSMETRICS_CYICONSPACING 20
#endif
/* Some non-constant system metrics */
#define SYSMETRICS_CXSCREEN sysMetrics[SM_CXSCREEN]
......
......@@ -2318,6 +2318,56 @@ typedef METAFILEPICT *LPMETAFILEPICT;
#define META_CREATEBITMAP 0x06FE
#define META_CREATEREGION 0x06FF
/* Debugging support (DEBUG SYSTEM ONLY) */
typedef struct tagWINDEBUGINFO
{
UINT flags;
DWORD dwOptions;
DWORD dwFilter;
char achAllocModule[8];
DWORD dwAllocBreak;
DWORD dwAllocCount;
} WINDEBUGINFO;
typedef WINDEBUGINFO FAR* LPWINDEBUGINFO;
/* WINDEBUGINFO flags values */
#define WDI_OPTIONS 0x0001
#define WDI_FILTER 0x0002
#define WDI_ALLOCBREAK 0x0004
/* dwOptions values */
#define DBO_CHECKHEAP 0x0001
#define DBO_BUFFERFILL 0x0004
#define DBO_DISABLEGPTRAPPING 0x0010
#define DBO_CHECKFREE 0x0020
#define DBO_SILENT 0x8000
#define DBO_TRACEBREAK 0x2000
#define DBO_WARNINGBREAK 0x1000
#define DBO_NOERRORBREAK 0x0800
#define DBO_NOFATALBREAK 0x0400
#define DBO_INT3BREAK 0x0100
/* DebugOutput flags values */
#define DBF_TRACE 0x0000
#define DBF_WARNING 0x4000
#define DBF_ERROR 0x8000
#define DBF_FATAL 0xc000
/* dwFilter values */
#define DBF_KERNEL 0x1000
#define DBF_KRN_MEMMAN 0x0001
#define DBF_KRN_LOADMODULE 0x0002
#define DBF_KRN_SEGMENTLOAD 0x0004
#define DBF_USER 0x0800
#define DBF_GDI 0x0400
#define DBF_MMSYSTEM 0x0040
#define DBF_PENWIN 0x0020
#define DBF_APPLICATION 0x0008
#define DBF_DRIVER 0x0010
#ifndef WINELIB
#pragma pack(4)
#endif
......@@ -2439,6 +2489,7 @@ Fa(BOOL,RemoveFontResource,LPSTR,a)
Fa(BOOL,SetDeskWallPaper,LPSTR,a)
Fa(BOOL,SetErrorMode,WORD,a)
Fa(BOOL,SetMessageQueue,int,a)
Fa(BOOL,SetWinDebugInfo,LPWINDEBUGINFO,a)
Fa(BOOL,SwapMouseButton,BOOL,a)
Fa(BOOL,TranslateMessage,LPMSG,a)
Fa(BOOL,UnhookWindowsHookEx,HHOOK,a)
......@@ -2623,6 +2674,7 @@ Fb(BOOL,GetCurrentPositionEx,HDC,a,LPPOINT,b)
Fb(BOOL,GetTextMetrics,HDC,a,LPTEXTMETRIC,b)
Fb(BOOL,GetViewportExtEx,HDC,a,LPPOINT,b)
Fb(BOOL,GetViewportOrgEx,HDC,a,LPPOINT,b)
Fb(BOOL,GetWinDebugInfo,LPWINDEBUGINFO,a,UINT,b)
Fb(BOOL,GetWindowExtEx,HDC,a,LPPOINT,b)
Fb(BOOL,GetWindowOrgEx,HDC,a,LPPOINT,b)
Fb(BOOL,GetWindowPlacement,HWND,a,LPWINDOWPLACEMENT,b)
......
......@@ -174,7 +174,7 @@ struct sockproto {
* compatibility purposes.
*/
#define h_errno WSAGetLastError()
/* #define h_errno WSAGetLastError() */
/* Authoritative Answer: Host not found */
#define WSAHOST_NOT_FOUND (WSABASEERR+1001)
......
......@@ -2,32 +2,36 @@
MODULE = ipc
TEST_SRCS = \
shm_fragment_test.c \
bit_array_test.c\
dde_proc_test.c \
dde_atom_test.c \
shm_semaph_test.c \
wine_test_stub.c \
hash_test.c \
dde_mem_test.c
SRCS = bit_array.c \
dde_proc.c \
shm_main_blk.c \
dde_atom.c \
shm_semaph.c \
dde_mem.c \
dde_proc.c \
generic_hash.c \
shm_block.c \
shm_fragment.c \
shm_main_blk.c \
shm_semaph.c
shm_fragment.c
OBJS = $(SRCS:.c=.o)
TEST_OBJS = $(TEST_SRCS:.c=.o)
SHM_OBJ=shm_block.o shm_semaph.o shm_main_blk.o dde_proc.o \
dde_mem.o bit_array.o shm_fragment.o wine_test_stub.o
WineRelocatableTarget($(MODULE),,$(OBJS))
DependTarget()
tests:: dde_mem_test dde_proc_test dde_atom_test shm_fragment_test \
shm_semaph_test
NormalProgramTarget(bit_array_test, bit_array.o bit_array_test.o,,,)
NormalProgramTarget(shm_semaph_test, shm_semaph_test.o shm_semaph.o,,,)
NormalProgramTarget(shm_fragment_test, shm_fragment_test.o shm_fragment.o,,,)
NormalProgramTarget(dde_atom_test, dde_atom_test.o dde_atom.o $(SHM_OBJ),,,)
NormalProgramTarget(dde_mem_test, dde_mem_test.o $(SHM_OBJ),,,)
NormalProgramTarget(dde_proc_test, dde_proc_test.o $(SHM_OBJ) ,,,)
includes::
install::
......@@ -35,7 +35,7 @@ depend:
mv tmp_make Makefile
clean:
rm -f *.o \#*\# *~ tmp_make
rm -f *.o \#*\# *~ *.bak tmp_make
distclean: clean
rm -f Makefile
......
This is a pre-alpha code, it does not work for 100%,
but it does not break anything (I hope).
Proper documentation (LaTeX) will be ready for the next release.
Technion- Israel Institute of Technology
Electrical Engineering software lab.
You can use "ipcl" perl script to remove junk IPC stuff.
You can use "ipcs" system program to find junk IPC stuff.
Michael
Author : Michael Veksler 11678223
Tutor: Avner Lottem
DDE support for Wine
====================
Wine emulator is able to run MS-Windows 3.1 applications under Linux
(Linux is a UNIX clone) . Wine is also a toolkit allowing MS-Windows
applications to compile under Linux. Wine is a world-wide Internet
project with more than 20 developers. Wine is still under development
so many vital MS-Windows features are still missing.
DDE is Dynamic Data Exchange used for communication between MS-Windows
applications. This project adds DDE capabilities into Wine. The new
improved Wine will be able to send messages and share memory between
two different Wine processes.
This project uses System-V IPC mechanisms to implement DDE.
Besides sharing memory handles and sending DDE messages, Wine processes
are synchronize to emulates MS-Windows non-preemptive task switching.
(MS-Windows switches tasks only on given instructions). This is done
without hurting the performance or stability of a single Wine process.
The project adds DDE to Wine emulator and to the toolkit. This allows
old MS-Windows applications to be compiled for UNIX, and have DDE
working among them.
......@@ -14,13 +14,15 @@
***************************************************************************
*/
#ifdef CONFIG_IPC
/*
** uncoment the following line to disable assertions,
** this may boost performance by up to 50%
*/
/* #define NDEBUG */
#ifndef NO_ASM
#if defined(linux) && !defined(NO_ASM)
#define HAS_BITOPS
#endif
......@@ -275,3 +277,5 @@ int AllocateBit(bit_array *bits)
return bit_nr;
}
#endif /* CONFIG_IPC */
This diff is collapsed. Click to expand it.
......@@ -6,6 +6,7 @@
* File: dde_atom.c
* Purpose : atom functionality for DDE
*/
#ifdef CONFIG_IPC
#include <ctype.h>
#include <string.h>
......@@ -106,11 +107,11 @@ void ATOM_GlobalInit(void)
}
/***********************************************************************
* GlobalAddAtom (USER.268)
* DDE_GlobalAddAtom
*/
/* important! don't forget to unlock semaphores before return */
ATOM GlobalAddAtom( SEGPTR name )
ATOM DDE_GlobalAddAtom( SEGPTR name )
{
int atom_idx;
int atom_ofs;
......@@ -164,10 +165,10 @@ ATOM GlobalAddAtom( SEGPTR name )
}
/***********************************************************************
* GlobalDeleteAtom (USER.269)
* DDE_GlobalDeleteAtom
*/
ATOM GlobalDeleteAtom( ATOM atom )
ATOM DDE_GlobalDeleteAtom( ATOM atom )
{
int atom_idx;
int atom_ofs;
......@@ -203,9 +204,9 @@ ATOM GlobalDeleteAtom( ATOM atom )
}
/***********************************************************************
* GlobalFindAtom (USER.270)
* DDE_GlobalFindAtom
*/
ATOM GlobalFindAtom( SEGPTR name )
ATOM DDE_GlobalFindAtom( SEGPTR name )
{
int atom_idx;
int atom_ofs;
......@@ -242,9 +243,9 @@ ATOM GlobalFindAtom( SEGPTR name )
}
/***********************************************************************
* GlobalGetAtomName (USER.271)
* DDE_GlobalGetAtomName
*/
WORD GlobalGetAtomName( ATOM atom, LPSTR buffer, short count )
WORD DDE_GlobalGetAtomName( ATOM atom, LPSTR buffer, short count )
{
int atom_idx, atom_ofs;
int size;
......@@ -283,3 +284,4 @@ WORD GlobalGetAtomName( ATOM atom, LPSTR buffer, short count )
return size;
}
#endif /* CONFIG_IPC */
......@@ -7,6 +7,8 @@
* Purpose : shared DDE memory functionality for DDE
***************************************************************************
*/
#ifdef CONFIG_IPC
#include <stdio.h>
#include <stddebug.h>
#include <debug.h>
......@@ -280,3 +282,5 @@ void DDE_mem_init()
nr_of_bits= BITS_PER_BYTE * sizeof(main_block->free_handles);
AssembleArray( &free_handles, main_block->free_handles, nr_of_bits);
}
#endif /* CONFIG_IPC */
......@@ -7,6 +7,12 @@
* Purpose : DDE signals and processes functionality for DDE
***************************************************************************
*/
#ifdef CONFIG_IPC
#if defined(__FreeBSD__) || defined(__NetBSD__)
#define msgbuf mymsg
#endif
#include <sys/time.h>
#include <unistd.h>
#include <stdlib.h>
......@@ -716,3 +722,4 @@ void DDE_DestroyWindow(HWND hwnd)
}
}
#endif /* CONFIG_IPC */
......@@ -5,6 +5,8 @@
* Purpose : dynamically growing hash, may use shared or local memory.
***************************************************************************
*/
#ifdef CONFIG_IPC
#include <sys/types.h>
#include <stdlib.h>
#include <assert.h>
......@@ -677,3 +679,5 @@ HASH_ITEM *access_local_hash(HASH_PTR ptr)
{
return ptr.ptr;
}
#endif /* CONFIG_IPC */
......@@ -7,6 +7,7 @@
* Purpose: Treat a shared memory block.
***************************************************************************
*/
#ifdef CONFIG_IPC
#define inline __inline__
#include <sys/types.h>
......@@ -76,7 +77,7 @@ struct shm_block *shm_attach_block(int shm_id, int proc_idx,
shmctl(shm_id, IPC_STAT, &ds );
block=(struct shm_block*)shmat(shm_id, NULL, 0);
if (block==NULL) return NULL;
if (block==NULL || block == (struct shm_block*) -1) return NULL;
this=(struct local_shm_map *)malloc(sizeof(*this));
this->next= shm_map;
......@@ -190,3 +191,5 @@ void shm_delete_chain(int *shmid)
*shmid=-1;
shmdt((char *)block);
}
#endif /* CONFIG_IPC */
......@@ -7,6 +7,8 @@
* Purpose: Data fragments and free list items. Allocate and free blocks.
***************************************************************************
*/
#ifdef CONFIG_IPC
#include <stdio.h> /* for debugging only */
#include <stddebug.h>
#include <debug.h> /* for "stddeb" */
......@@ -176,3 +178,5 @@ void shm_print_free_list(struct shm_block *block)
fprintf(stddeb," [total free=%04x]\n",block->free);
fflush(stddeb);
}
#endif /* CONFIG_IPC */
......@@ -7,6 +7,8 @@
* Purpose: Main Wine's shared memory block
***************************************************************************
*/
#ifdef CONFIG_IPC
#define inline __inline__
#include <sys/types.h>
#include <sys/sem.h>
......@@ -265,3 +267,5 @@ static void shm_main_refresh()
for (proc_idx= 0 ; proc_idx < DDE_PROCS ; proc_idx++)
dde_proc_refresh( &main_block->proc[proc_idx] );
}
#endif /* CONFIG_IPC */
......@@ -7,6 +7,8 @@
* Purpose: Handle semaphores for shared memory operations.
***************************************************************************
*/
#ifdef CONFIG_IPC
#define inline __inline__
#include <assert.h>
#include <unistd.h>
......@@ -134,3 +136,5 @@ void shm_sem_done(shm_sem *semptr)
*semptr= -1;
}
#endif /* CONFIG_IPC */
......@@ -23,7 +23,7 @@ int LDT_GetEntry( int entry, ldt_entry *content )
return 0;
}
int LDT_SetEntry( int entry, ldt_entry *content )
int LDT_SetEntry( int entry, ldt_entry const *content )
{
return 0;
}
......
......@@ -28,7 +28,7 @@ depend:
mv tmp_make Makefile
clean:
rm -f *.o \#*\# *~ tmp_make
rm -f *.o \#*\# *~ *.bak tmp_make
distclean: clean
rm -f Makefile
......
......@@ -66,6 +66,9 @@ int MAIN_Init(void)
/* Initialize interrupt vectors */
if (!INT_Init()) return 0;
/* Initialize DOS memory */
if (!DOSMEM_Init()) return 0;
/* Initialize signal handling */
init_wine_signals();
......
......@@ -39,7 +39,6 @@ BOOL MODULE_Init(void)
NE_MODULE *pModule;
SEGTABLEENTRY *pSegTable;
struct dll_table_s *table;
char *dosmem;
int i;
/* Create the built-in modules */
......@@ -82,47 +81,10 @@ BOOL MODULE_Init(void)
hFirstModule = hModule;
}
/* Initialize some KERNEL exported values */
if (!(hModule = GetModuleHandle( "KERNEL" ))) return TRUE;
/* KERNEL.178: __WINFLAGS */
MODULE_SetEntryPoint( hModule, 178, GetWinFlags() );
/* Allocate 7 64k segments for 0000, A000, B000, C000, D000, E000, F000. */
dosmem = malloc( 0x70000 );
MODULE_SetEntryPoint( hModule, 183, /* KERNEL.183: __0000H */
GLOBAL_CreateBlock( GMEM_FIXED, dosmem,
0x10000, hModule, FALSE, FALSE, FALSE, NULL ));
MODULE_SetEntryPoint( hModule, 193, /* KERNEL.193: __0040H */
GLOBAL_CreateBlock( GMEM_FIXED, dosmem + 0x400,
0x100, hModule, FALSE, FALSE, FALSE, NULL ));
MODULE_SetEntryPoint( hModule, 174, /* KERNEL.174: __A000H */
GLOBAL_CreateBlock( GMEM_FIXED, dosmem + 0x10000,
0x10000, hModule, FALSE, FALSE, FALSE, NULL ));
MODULE_SetEntryPoint( hModule, 181, /* KERNEL.181: __B000H */
GLOBAL_CreateBlock( GMEM_FIXED, dosmem + 0x20000,
0x10000, hModule, FALSE, FALSE, FALSE, NULL ));
MODULE_SetEntryPoint( hModule, 182, /* KERNEL.182: __B800H */
GLOBAL_CreateBlock( GMEM_FIXED, dosmem + 0x28000,
0x10000, hModule, FALSE, FALSE, FALSE, NULL ));
MODULE_SetEntryPoint( hModule, 195, /* KERNEL.195: __C000H */
GLOBAL_CreateBlock( GMEM_FIXED, dosmem + 0x30000,
0x10000, hModule, FALSE, FALSE, FALSE, NULL ));
MODULE_SetEntryPoint( hModule, 179, /* KERNEL.179: __D000H */
GLOBAL_CreateBlock( GMEM_FIXED, dosmem + 0x40000,
0x10000, hModule, FALSE, FALSE, FALSE, NULL ));
MODULE_SetEntryPoint( hModule, 190, /* KERNEL.190: __E000H */
GLOBAL_CreateBlock( GMEM_FIXED, dosmem + 0x50000,
0x10000, hModule, FALSE, FALSE, FALSE, NULL ));
MODULE_SetEntryPoint( hModule, 173, /* KERNEL.173: __ROMBIOS */
GLOBAL_CreateBlock( GMEM_FIXED, dosmem + 0x60000,
0x10000, hModule, FALSE, FALSE, FALSE, NULL ));
MODULE_SetEntryPoint( hModule, 194, /* KERNEL.194: __F000H */
GLOBAL_CreateBlock( GMEM_FIXED, dosmem + 0x60000,
0x10000, hModule, FALSE, FALSE, FALSE, NULL ));
/* Initialize KERNEL.178 (__WINFLAGS) with the correct flags value */
MODULE_SetEntryPoint( GetModuleHandle( "KERNEL" ), 178, GetWinFlags() );
return TRUE;
}
......
......@@ -39,6 +39,8 @@ BOOL NE_LoadSegment( HMODULE hModule, WORD segnum )
int fd;
struct relocation_entry_s *rep, *reloc_entries;
BYTE *func_name;
int size;
char* mem;
char buffer[100];
int ordinal, additive;
......@@ -51,23 +53,37 @@ BOOL NE_LoadSegment( HMODULE hModule, WORD segnum )
if (!pSeg->filepos) return TRUE; /* No file image, just return */
if (pSeg->flags & NE_SEGFLAGS_ITERATED)
{
fprintf(stderr, "Sorry, iterated segments are not supported\n"
"Please report that %*.*s, segment %d is such a segment\n",
*((BYTE*)pModule + pModule->name_table),
*((BYTE*)pModule + pModule->name_table),
(char *)pModule + pModule->name_table + 1,
segnum
);
exit(1);
}
fd = MODULE_OpenFile( hModule );
dprintf_module( stddeb, "Loading segment %d, selector=%04x\n",
segnum, pSeg->selector );
lseek( fd, pSeg->filepos << pModule->alignment, SEEK_SET );
read( fd, GlobalLock( pSeg->selector ), pSeg->size ? pSeg->size : 0x10000);
size = pSeg->size ? pSeg->size : 0x10000;
mem = GlobalLock(pSeg->selector);
if (!(pSeg->flags & NE_SEGFLAGS_ITERATED))
read(fd, mem, size);
else {
/*
The following bit of code for "iterated segments" was written without
any documentation on the format of these segments. It seems to work,
but may be missing something. If you have any doco please either send
it to me or fix the code yourself. gfm@werple.mira.net.au
*/
char* buff = malloc(size);
char* curr = buff;
read(fd, buff, size);
while(curr < buff + size) {
unsigned int rept = *((short*) curr)++;
unsigned int len = *((short*) curr)++;
for(; rept > 0; rept--) {
char* bytes = curr;
unsigned int byte;
for(byte = 0; byte < len; byte++)
*mem++ = *bytes++;
}
curr += len;
}
free(buff);
}
if (!(pSeg->flags & NE_SEGFLAGS_RELOC_DATA))
return TRUE; /* No relocation data, we are done */
......
......@@ -80,19 +80,21 @@ void init_wine_signals(void)
it aligned */
segv_act.sa_restorer =
(void (*)()) (((unsigned int)(cstack) + sizeof(cstack) - 4) & ~3);
usr2_act.sa_restorer= segv_act.sa_restorer;
usr2_act.sa_handler = (__sighandler_t) stop_wait;
/* Point to the top of the stack, minus 4 just in case, and make
it aligned */
wine_sigaction(SIGSEGV, &segv_act, NULL);
wine_sigaction(SIGILL, &segv_act, NULL);
wine_sigaction(SIGFPE, &segv_act, NULL);
wine_sigaction(SIGUSR2, &usr2_act, NULL);
#ifdef SIGBUS
wine_sigaction(SIGBUS, &segv_act, NULL);
#endif
wine_sigaction(SIGTRAP, &segv_act, NULL); /* For breakpoints */
#endif
#ifdef CONFIG_IPC
usr2_act.sa_restorer= segv_act.sa_restorer;
usr2_act.sa_handler = (__sighandler_t) stop_wait;
wine_sigaction(SIGUSR2, &usr2_act, NULL);
#endif /* CONFIG_IPC */
#endif /* linux */
#if defined(__NetBSD__) || defined(__FreeBSD__)
sigset_t sig_mask;
struct sigaltstack ss;
......@@ -134,6 +136,7 @@ void init_wine_signals(void)
perror("sigaction: SIGTRAP");
exit(1);
}
#ifdef CONFIG_IPC
usr2_act.sa_handler = (void (*)) stop_wait; /* For breakpoints */
usr2_act.sa_flags = SA_ONSTACK;
usr2_act.sa_mask = sig_mask;
......@@ -141,7 +144,8 @@ void init_wine_signals(void)
perror("sigaction: SIGUSR2");
exit(1);
}
#endif
#endif /* CONFIG_IPC */
#endif /* __FreeBSD__ || __NetBSD__ */
}
#endif /* ifndef WINELIB */
......@@ -528,7 +528,7 @@ HTASK TASK_CreateTask( HMODULE hModule, HANDLE hInstance, HANDLE hPrevInstance,
/***********************************************************************
* TASK_DeleteTask
*/
void TASK_DeleteTask( HTASK hTask )
static void TASK_DeleteTask( HTASK hTask )
{
TDB *pTask;
......@@ -600,11 +600,16 @@ void TASK_Reschedule(void)
TDB *pOldTask = NULL, *pNewTask;
HTASK hTask = 0;
#ifdef CONFIG_IPC
dde_reschedule();
#endif
/* First check if there's a task to kill */
if (hTaskToKill && (hTaskToKill != hCurrentTask))
{
TASK_DeleteTask( hTaskToKill );
hTaskToKill = 0;
}
/* If current task is locked, simply return */
......
......@@ -32,7 +32,7 @@ depend:
mv tmp_make Makefile
clean:
rm -f *.o \#*\# *~ tmp_make
rm -f *.o \#*\# *~ *.bak tmp_make
distclean: clean
rm -f Makefile
......
......@@ -22,6 +22,11 @@
#include "stackframe.h"
#include "user.h"
#ifdef CONFIG_IPC
#include "dde_atom.h"
#include "options.h"
#endif
#define DEFAULT_ATOMTABLE_SIZE 37
#define MIN_STR_ATOM 0xc000
......@@ -321,36 +326,48 @@ WORD GetAtomName( ATOM atom, LPSTR buffer, short count )
/***********************************************************************
* LocalAddAtom (USER.268)
* GlobalAddAtom (USER.268)
*/
ATOM LocalAddAtom( SEGPTR str )
ATOM GlobalAddAtom( SEGPTR str )
{
#ifdef CONFIG_IPC
if (Options.ipc) return DDE_GlobalAddAtom( str );
#endif
return ATOM_AddAtom( USER_HeapSel, str );
}
/***********************************************************************
* LocalDeleteAtom (USER.269)
* GlobalDeleteAtom (USER.269)
*/
ATOM LocalDeleteAtom( ATOM atom )
ATOM GlobalDeleteAtom( ATOM atom )
{
#ifdef CONFIG_IPC
if (Options.ipc) return DDE_GlobalDeleteAtom( atom );
#endif
return ATOM_DeleteAtom( USER_HeapSel, atom );
}
/***********************************************************************
* LocalFindAtom (USER.270)
* GlobalFindAtom (USER.270)
*/
ATOM LocalFindAtom( SEGPTR str )
ATOM GlobalFindAtom( SEGPTR str )
{
#ifdef CONFIG_IPC
if (Options.ipc) return DDE_GlobalFindAtom( str );
#endif
return ATOM_FindAtom( USER_HeapSel, str );
}
/***********************************************************************
* LocalGetAtomName (USER.271)
* GlobalGetAtomName (USER.271)
*/
WORD LocalGetAtomName( ATOM atom, LPSTR buffer, short count )
WORD GlobalGetAtomName( ATOM atom, LPSTR buffer, short count )
{
#ifdef CONFIG_IPC
if (Options.ipc) return DDE_GlobalGetAtomName( atom, buffer, count );
#endif
return ATOM_GetAtomName( USER_HeapSel, atom, buffer, count );
}
......@@ -81,21 +81,6 @@ void debug_handles()
if (printed)
printf("\n");
}
/***********************************************************************
* GLOBAL_FindArena
*
* Find the arena for a given handle
* (when handle is not serial - e.g. DDE)
*/
static GLOBALARENA *GLOBAL_FindArena( HGLOBAL handle)
{
int i;
for (i = globalArenaSize-1 ; i>=0 ; i--) {
if (pGlobalArena[i].size!=0 && pGlobalArena[i].handle == handle)
return ( &pGlobalArena[i] );
}
return NULL;
}
/***********************************************************************
......@@ -196,9 +181,11 @@ HGLOBAL GLOBAL_Alloc( WORD flags, DWORD size, HGLOBAL hOwner,
/* Allocate the linear memory */
#ifdef CONFIG_IPC
if ((flags & GMEM_DDESHARE) && Options.ipc)
ptr= DDE_malloc(flags, size, &shmdata);
ptr = DDE_malloc(flags, size, &shmdata);
else
#endif /* CONFIG_IPC */
ptr = malloc( size );
if (!ptr) return 0;
......@@ -216,6 +203,25 @@ HGLOBAL GLOBAL_Alloc( WORD flags, DWORD size, HGLOBAL hOwner,
return handle;
}
#ifdef CONFIG_IPC
/***********************************************************************
* GLOBAL_FindArena
*
* Find the arena for a given handle
* (when handle is not serial - e.g. DDE)
*/
static GLOBALARENA *GLOBAL_FindArena( HGLOBAL handle)
{
int i;
for (i = globalArenaSize-1 ; i>=0 ; i--) {
if (pGlobalArena[i].size!=0 && pGlobalArena[i].handle == handle)
return ( &pGlobalArena[i] );
}
return NULL;
}
/***********************************************************************
* DDE_GlobalHandleToSel
*/
......@@ -238,6 +244,7 @@ WORD DDE_GlobalHandleToSel( HGLOBAL handle )
return SELECTOROF( segptr );
}
#endif /* CONFIG_IPC */
/***********************************************************************
......@@ -268,11 +275,13 @@ HGLOBAL GlobalReAlloc( HGLOBAL handle, DWORD size, WORD flags )
handle, size, flags );
if (!handle) return 0;
#ifdef CONFIG_IPC
if (Options.ipc && (flags & GMEM_DDESHARE || is_dde_handle(handle))) {
fprintf(stdnimp,
"GlobalReAlloc: shared memory reallocating unimplemented\n");
return 0;
}
#endif /* CONFIG_IPC */
pArena = GET_ARENA_PTR( handle );
......@@ -366,7 +375,9 @@ HGLOBAL GlobalFree( HGLOBAL handle )
dprintf_global( stddeb, "GlobalFree: %04x\n", handle );
if (!GLOBAL_FreeBlock( handle )) return handle; /* failed */
#ifdef CONFIG_IPC
if (is_dde_handle(handle)) return DDE_GlobalFree(handle);
#endif /* CONFIG_IPC */
if (ptr) free( ptr );
return 0;
}
......@@ -382,9 +393,13 @@ SEGPTR WIN16_GlobalLock( HGLOBAL handle )
dprintf_global( stddeb, "WIN16_GlobalLock(%04x) -> %08lx\n",
handle, MAKELONG( 0, GlobalHandleToSel(handle)) );
if (!handle) return 0;
if ( !is_dde_handle(handle) && !GET_ARENA_PTR(handle)->base)
return (SEGPTR)0;
#ifdef CONFIG_IPC
if (is_dde_handle(handle))
return (SEGPTR)MAKELONG( 0, DDE_GlobalHandleToSel(handle) );
#endif /* CONFIG_IPC */
if (!GET_ARENA_PTR(handle)->base) return (SEGPTR)0;
return (SEGPTR)MAKELONG( 0, GlobalHandleToSel(handle) );
}
......@@ -397,9 +412,9 @@ SEGPTR WIN16_GlobalLock( HGLOBAL handle )
LPSTR GlobalLock( HGLOBAL handle )
{
if (!handle) return 0;
if (is_dde_handle(handle)) {
return DDE_AttachHandle(handle, NULL);
}
#ifdef CONFIG_IPC
if (is_dde_handle(handle)) return DDE_AttachHandle(handle, NULL);
#endif
return (LPSTR)GET_ARENA_PTR(handle)->base;
}
......@@ -644,9 +659,9 @@ WORD GlobalHandleToSel( HGLOBAL handle )
{
dprintf_toolhelp( stddeb, "GlobalHandleToSel: %04x\n", handle );
if (!handle) return 0;
if (is_dde_handle(handle))
return DDE_GlobalHandleToSel(handle);
#ifdef CONFIG_IPC
if (is_dde_handle(handle)) return DDE_GlobalHandleToSel(handle);
#endif
if (!(handle & 7))
{
fprintf( stderr, "Program attempted invalid selector conversion\n" );
......
......@@ -36,7 +36,7 @@ depend:
mv tmp_make Makefile
clean:
rm -f *.o \#*\# *~ tmp_make
rm -f *.o \#*\# *~ *.bak tmp_make
distclean: clean
rm -f Makefile
......
......@@ -143,6 +143,7 @@ HANDLE GetClipboardData(WORD wFormat)
{
LPCLIPFORMAT lpFormat = ClipFormats;
dprintf_clipboard(stddeb,"GetClipboardData(%04X) !\n", wFormat);
if (!hWndClipboardOwner) return 0;
if(wFormat == CF_TEXT && !wineOwnsSelection)
{ wait_for_selection=True;
dprintf_clipboard(stddeb,"Requesting selection\n");
......
......@@ -75,7 +75,7 @@ INT _lread (INT hFile, LPSTR lpBuffer, WORD wBytes)
dprintf_file(stddeb, "_lread: handle %d, buffer = %p, length = %d\n",
hFile, lpBuffer, wBytes);
result = wBytes == 0 ? 0 : read (hFile, lpBuffer, wBytes);
result = (wBytes == 0) ? 0 : read (hFile, lpBuffer, wBytes);
if (result == -1)
return HFILE_ERROR;
......@@ -454,12 +454,12 @@ WORD SetErrorMode(WORD x)
***************************************************************************/
LONG _hread(INT hf, LPSTR hpvBuffer, LONG cbBuffer)
{
return cbBuffer == 0 ? 0 : read(hf, hpvBuffer, cbBuffer);
return (cbBuffer == 0) ? 0 : read(hf, hpvBuffer, cbBuffer);
}
/***************************************************************************
_hwrite
***************************************************************************/
LONG _hwrite(INT hf, LPCSTR hpvBuffer, LONG cbBuffer)
{
return cbBuffer == 0 ? 0 : write(hf, hpvBuffer, cbBuffer);
return (cbBuffer == 0) ? 0 : write(hf, hpvBuffer, cbBuffer);
}
......@@ -846,3 +846,27 @@ void FileCDR(FARPROC x)
{
printf("FileCDR(%8x)\n", (int) x);
}
/***********************************************************************
* GetWinDebugInfo (KERNEL.355)
*/
BOOL GetWinDebugInfo(WINDEBUGINFO FAR* lpwdi, UINT flags)
{
printf("GetWinDebugInfo(%8lx,%d) stub returning 0\n", (unsigned long)lpwdi, flags);
/* 0 means not in debugging mode/version */
/* Can this type of debugging be used in wine ? */
/* Constants: WDI_OPTIONS WDI_FILTER WDI_ALLOCBREAK */
return 0;
}
/***********************************************************************
* GetWinDebugInfo (KERNEL.355)
*/
BOOL SetWinDebugInfo(WINDEBUGINFO FAR* lpwdi)
{
printf("SetWinDebugInfo(%8lx) stub returning 0\n", (unsigned long)lpwdi);
/* 0 means not in debugging mode/version */
/* Can this type of debugging be used in wine ? */
/* Constants: WDI_OPTIONS WDI_FILTER WDI_ALLOCBREAK */
return 0;
}
......@@ -382,6 +382,8 @@ WORD GetProfileInt (LPSTR AppName, LPSTR KeyName, int Default)
BOOL WritePrivateProfileString (LPSTR AppName, LPSTR KeyName, LPSTR String,
LPSTR FileName)
{
if (!AppName || !KeyName || !String) /* Flush file to disk */
return TRUE;
return GetSetProfile (1, AppName, KeyName, String, "", 0, FileName);
}
......
......@@ -450,10 +450,14 @@ static char AppName[512], AppMisc[512];
*/
INT AboutDlgProc(HWND hWnd, WORD msg, WORD wParam, LONG lParam)
{
char Template[512], AppTitle[512];
switch(msg) {
case WM_INITDIALOG:
SendDlgItemMessage(hWnd,stc1,STM_SETICON,LOWORD(lParam),0);
SetWindowText(hWnd, AppName);
GetWindowText(hWnd, Template, 511);
sprintf(AppTitle, Template, AppName);
SetWindowText(hWnd, AppTitle);
SetWindowText(GetDlgItem(hWnd,100), AppMisc);
return 1;
......@@ -474,7 +478,7 @@ INT AboutDlgProc(HWND hWnd, WORD msg, WORD wParam, LONG lParam)
INT ShellAbout(HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff, HICON hIcon)
{
if (szApp) {
sprintf(AppName, "About %s", szApp);
strcpy(AppName, szApp);
} else {
*AppName = 0;
}
......
......@@ -3,6 +3,7 @@
MODULE = miscemu
SRCS = \
dosmem.c \
dpmi.c \
emulate.c \
instr.c \
......
......@@ -9,9 +9,22 @@ LDCOMBINEFLAGS = @LDCOMBINEFLAGS@
MODULE = miscemu
SRCS = dpmi.c emulate.c instr.c int10.c int13.c \
int1a.c int21.c int25.c int26.c int2a.c int2f.c int5c.c interrupts.c \
ioports.c
SRCS = \
dosmem.c \
dpmi.c \
emulate.c \
instr.c \
int10.c \
int13.c \
int1a.c \
int21.c \
int25.c \
int26.c \
int2a.c \
int2f.c \
int5c.c \
interrupts.c \
ioports.c
OBJS = $(SRCS:.c=.o)
......@@ -29,7 +42,7 @@ depend:
mv tmp_make Makefile
clean:
rm -f *.o \#*\# *~ tmp_make
rm -f *.o \#*\# *~ *.bak tmp_make
distclean: clean
rm -f Makefile
......
/*
* DOS memory emulation
*
* Copyright 1995 Alexandre Julliard
*/
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include "windows.h"
#include "global.h"
#include "ldt.h"
#include "miscemu.h"
#include "module.h"
HANDLE DOSMEM_BiosSeg; /* BIOS data segment at 0x40:0 */
#pragma pack(1)
typedef struct
{
WORD Com1Addr; /* 00: COM1 I/O address */
WORD Com2Addr; /* 02: COM2 I/O address */
WORD Com3Addr; /* 04: COM3 I/O address */
WORD Com4Addr; /* 06: COM4 I/O address */
WORD Lpt1Addr; /* 08: LPT1 I/O address */
WORD Lpt2Addr; /* 0a: LPT2 I/O address */
WORD Lpt3Addr; /* 0c: LPT3 I/O address */
WORD Lpt4Addr; /* 0e: LPT4 I/O address */
WORD InstalledHardware; /* 10: Installed hardware flags */
BYTE POSTstatus; /* 12: Power-On Self Test status */
WORD MemSize WINE_PACKED; /* 13: Base memory size in Kb */
WORD unused1 WINE_PACKED; /* 15: Manufacturing test scratch pad */
BYTE KbdFlags1; /* 17: Keyboard flags 1 */
BYTE KbdFlags2; /* 18: Keyboard flags 2 */
BYTE unused2; /* 19: Keyboard driver workspace */
WORD NextKbdCharPtr; /* 1a: Next character in kbd buffer */
WORD FirstKbdCharPtr; /* 1c: First character in kbd buffer */
WORD KbdBuffer[16]; /* 1e: Keyboard buffer */
BYTE DisketteStatus1; /* 3e: Diskette recalibrate status */
BYTE DisketteStatus2; /* 3f: Diskette motor status */
BYTE DisketteStatus3; /* 40: Diskette motor timeout */
BYTE DisketteStatus4; /* 41: Diskette last operation status */
BYTE DiskStatus[7]; /* 42: Disk status/command bytes */
BYTE VideoMode; /* 49: Video mode */
WORD VideoColumns; /* 4a: Number of columns */
WORD VideoPageSize; /* 4c: Video page size in bytes */
WORD VideoPageStartAddr; /* 4e: Video page start address */
BYTE VideoCursorPos[16]; /* 50: Cursor position for 8 pages */
WORD VideoCursorType; /* 60: Video cursor type */
BYTE VideoCurPage; /* 62: Video current page */
WORD VideoCtrlAddr WINE_PACKED; /* 63: Video controller address */
BYTE VideoReg1; /* 65: Video mode select register */
BYTE VideoReg2; /* 66: Video CGA palette register */
DWORD ResetEntry WINE_PACKED; /* 67: Warm reset entry point */
BYTE LastIRQ; /* 6b: Last unexpected interrupt */
DWORD Ticks; /* 6c: Ticks since midnight */
BYTE TicksOverflow; /* 70: Timer overflow if past midnight */
BYTE CtrlBreakFlag; /* 71: Ctrl-Break flag */
WORD ResetFlag; /* 72: POST Reset flag */
BYTE DiskOpStatus; /* 74: Last hard-disk operation status */
BYTE NbHardDisks; /* 75: Number of hard disks */
BYTE DiskCtrlByte; /* 76: Disk control byte */
BYTE DiskIOPort; /* 77: Disk I/O port offset */
BYTE LptTimeout[4]; /* 78: Timeouts for parallel ports */
BYTE ComTimeout[4]; /* 7c: Timeouts for serial ports */
WORD KbdBufferStart; /* 80: Keyboard buffer start */
WORD KbdBufferEnd; /* 82: Keyboard buffer end */
} BIOSDATA;
#pragma pack(4)
static BIOSDATA *pBiosData = NULL;
/***********************************************************************
* DOSMEM_Init
*
* Create the dos memory segments, and store them into the KERNEL
* exported values. MODULE_Init() must already have been called.
*/
BOOL DOSMEM_Init(void)
{
HMODULE hModule = GetModuleHandle( "KERNEL" );
char *dosmem;
/* Allocate 7 64k segments for 0000, A000, B000, C000, D000, E000, F000. */
dosmem = malloc( 0x70000 );
MODULE_SetEntryPoint( hModule, 183, /* KERNEL.183: __0000H */
GLOBAL_CreateBlock( GMEM_FIXED, dosmem,
0x10000, hModule, FALSE, FALSE, FALSE, NULL ));
DOSMEM_BiosSeg = GLOBAL_CreateBlock( GMEM_FIXED, dosmem + 0x400, 0x100,
hModule, FALSE, FALSE, FALSE, NULL );
MODULE_SetEntryPoint( hModule, 193, /* KERNEL.193: __0040H */
DOSMEM_BiosSeg );
MODULE_SetEntryPoint( hModule, 174, /* KERNEL.174: __A000H */
GLOBAL_CreateBlock( GMEM_FIXED, dosmem + 0x10000,
0x10000, hModule, FALSE, FALSE, FALSE, NULL ));
MODULE_SetEntryPoint( hModule, 181, /* KERNEL.181: __B000H */
GLOBAL_CreateBlock( GMEM_FIXED, dosmem + 0x20000,
0x10000, hModule, FALSE, FALSE, FALSE, NULL ));
MODULE_SetEntryPoint( hModule, 182, /* KERNEL.182: __B800H */
GLOBAL_CreateBlock( GMEM_FIXED, dosmem + 0x28000,
0x10000, hModule, FALSE, FALSE, FALSE, NULL ));
MODULE_SetEntryPoint( hModule, 195, /* KERNEL.195: __C000H */
GLOBAL_CreateBlock( GMEM_FIXED, dosmem + 0x30000,
0x10000, hModule, FALSE, FALSE, FALSE, NULL ));
MODULE_SetEntryPoint( hModule, 179, /* KERNEL.179: __D000H */
GLOBAL_CreateBlock( GMEM_FIXED, dosmem + 0x40000,
0x10000, hModule, FALSE, FALSE, FALSE, NULL ));
MODULE_SetEntryPoint( hModule, 190, /* KERNEL.190: __E000H */
GLOBAL_CreateBlock( GMEM_FIXED, dosmem + 0x50000,
0x10000, hModule, FALSE, FALSE, FALSE, NULL ));
MODULE_SetEntryPoint( hModule, 173, /* KERNEL.173: __ROMBIOS */
GLOBAL_CreateBlock( GMEM_FIXED, dosmem + 0x60000,
0x10000, hModule, FALSE, FALSE, FALSE, NULL ));
MODULE_SetEntryPoint( hModule, 194, /* KERNEL.194: __F000H */
GLOBAL_CreateBlock( GMEM_FIXED, dosmem + 0x60000,
0x10000, hModule, FALSE, FALSE, FALSE, NULL ));
DOSMEM_FillBiosSegment();
return TRUE;
}
/***********************************************************************
* DOSMEM_Alarm
*
* Increment the BIOS tick counter.
*/
static void DOSMEM_Alarm(void)
{
pBiosData->Ticks = INT1A_GetTicksSinceMidnight();
printf( "Ticks = %d\n", pBiosData->Ticks );
/*
signal( SIGALRM, DOSMEM_Alarm );
alarm( 1 );
*/
}
/***********************************************************************
* DOSMEM_FillBiosSegment
*
* Fill the BIOS data segment with dummy values.
*/
void DOSMEM_FillBiosSegment(void)
{
pBiosData = (BIOSDATA *)GlobalLock( DOSMEM_BiosSeg );
/* Clear all unused values */
memset( pBiosData, 0, sizeof(*pBiosData) );
/* FIXME: should check the number of configured drives and ports */
pBiosData->Com1Addr = 0x3e8;
pBiosData->Com2Addr = 0x2e8;
pBiosData->Lpt1Addr = 0x378;
pBiosData->Lpt2Addr = 0x278;
pBiosData->InstalledHardware = 0x8443;
pBiosData->MemSize = 640;
pBiosData->NextKbdCharPtr = 0x1e;
pBiosData->FirstKbdCharPtr = 0x1e;
pBiosData->VideoMode = 0;
pBiosData->VideoColumns = 80;
pBiosData->VideoPageSize = 80 * 25 * 2;
pBiosData->VideoPageStartAddr = 0xb800;
pBiosData->VideoCtrlAddr = 0x3d4;
pBiosData->Ticks = INT1A_GetTicksSinceMidnight();
pBiosData->NbHardDisks = 2;
pBiosData->KbdBufferStart = 0x1e;
pBiosData->KbdBufferEnd = 0x3e;
/*
signal( SIGALRM, DOSMEM_Alarm );
alarm( 1 );
*/
}
......@@ -72,11 +72,12 @@ void WIN87_fpmath( struct sigcontext_struct context )
/* IN: AX&0x0C00 rounding protocol */
/* OUT: DX:AX variable popped */
{
DWORD dw,junk;
DWORD dw;
/* I don't know much about asm() programming. This could be
* wrong.
*/
__asm__("fistp %1\nwait":"=m" (junk):"m" (dw):"memory");
/* FIXME: could someone who really understands asm() fix this please? --AJ */
/* __asm__("fistp %0;wait" : "=m" (dw) : : "memory"); */
dprintf_int(stddeb,"emulate.c:On top of stack was %ld\n",dw);
AX_reg(&context) = LOWORD(dw);
DX_reg(&context) = HIWORD(dw);
......
......@@ -15,6 +15,27 @@
/**********************************************************************
* INT1A_GetTicksSinceMidnight
*
* Return number of clock ticks since midnight.
*/
DWORD INT1A_GetTicksSinceMidnight(void)
{
struct tm *bdtime;
struct timeval tvs;
/* This should give us the (approximately) correct
* 18.206 clock ticks per second since midnight.
*/
gettimeofday( &tvs, NULL );
bdtime = localtime( &tvs.tv_sec );
return (((bdtime->tm_hour * 3600 + bdtime->tm_min * 60 +
bdtime->tm_sec) * 18206) / 1000) +
(tvs.tv_usec / 54927);
}
/**********************************************************************
* INT_Int1aHandler
*
* Handler for int 1ah (date and time).
......@@ -24,25 +45,16 @@ void INT_Int1aHandler( struct sigcontext_struct context )
time_t ltime;
DWORD ticks;
struct tm *bdtime;
struct timeval tvs;
switch(AH_reg(&context))
{
case 0:
/* This should give us the (approximately) correct
* 18.206 clock ticks per second since midnight
* expected from this interrupt
*/
gettimeofday(&tvs, NULL);
bdtime = localtime(&tvs.tv_sec);
ticks = (((bdtime->tm_hour * 3600 + bdtime->tm_min * 60 +
bdtime->tm_sec) * 18206) / 1000) +
(tvs.tv_usec / 54927);
CX_reg(&context) = HIWORD(ticks);
DX_reg(&context) = LOWORD(ticks);
AX_reg(&context) = 0; /* No midnight rollover */
dprintf_int(stddeb,"int1a_00 // ticks=%ld\n", ticks);
break;
ticks = INT1A_GetTicksSinceMidnight();
CX_reg(&context) = HIWORD(ticks);
DX_reg(&context) = LOWORD(ticks);
AX_reg(&context) = 0; /* No midnight rollover */
dprintf_int(stddeb,"int1a_00 // ticks=%ld\n", ticks);
break;
case 2:
ltime = time(NULL);
......
......@@ -341,14 +341,9 @@ static void WriteFile(struct sigcontext_struct *context)
AX_reg(context) = CX_reg(context);
RESET_CFLAG(context);
} else {
size = write(BX_reg(context), ptr , CX_reg(context));
if (size == 0) {
Error (WriteFault, EC_Unknown, EL_Unknown);
AX_reg(context) = ExtendedError;
return;
}
if (size == -1) {
/* well, this function already handles everything we need */
size = _lwrite(BX_reg(context),ptr,CX_reg(context));
if (size == -1) { /* HFILE_ERROR == -1 */
errno_to_doserr();
AX_reg(context) = ExtendedError;
SET_CFLAG(context);
......@@ -417,8 +412,12 @@ static void ioctlGetDeviceInfo(struct sigcontext_struct *context)
return;
}
/* This isn't the right answer, but should be close enough. */
DX_reg(context) = 0x0943;
/* bits 0-5 are current drive
* bit 6 - file has NOT been written..FIXME: correct?
* bit 8 - generate int24 if no diskspace on write/ read past end of file
* bit 11 - media not removable
*/
}
}
RESET_CFLAG(context);
......@@ -1526,7 +1525,13 @@ void DOS3Call( struct sigcontext_struct context )
RESET_CFLAG(&context);
}
break;
case 0x0a: /* check if handle (BX) is remote */
/* returns DX, bit 15 set if remote, bit 14 set if date/time
* not set on close
*/
DX_reg(&context) = 0;
RESET_CFLAG(&context);
break;
case 0x0b: /* SET SHARING RETRY COUNT */
if (!CX_reg(&context))
{
......
......@@ -7,6 +7,7 @@ SRCS = \
joystick.c \
mcianim.c \
mcicda.c \
mcistring.c \
midi.c \
mmaux.c \
mmsystem.c \
......
......@@ -9,9 +9,16 @@ LDCOMBINEFLAGS = @LDCOMBINEFLAGS@
MODULE = multimedia
SRCS = audio.c joystick.c mcianim.c mcicda.c midi.c mmaux.c \
mmsystem.c time.c
SRCS = \
audio.c \
joystick.c \
mcianim.c \
mcicda.c \
mcistring.c \
midi.c \
mmaux.c \
mmsystem.c \
time.c
OBJS = $(SRCS:.c=.o)
......@@ -29,7 +36,7 @@ depend:
mv tmp_make Makefile
clean:
rm -f *.o \#*\# *~ tmp_make
rm -f *.o \#*\# *~ *.bak tmp_make
distclean: clean
rm -f Makefile
......
......@@ -35,7 +35,7 @@
#define SOUND_DEV "/dev/dsp"
#ifdef SOUND_VERSION
#define IOCTL(a,b,c) ioctl(a,b,&c)
#define IOCTL(a,b,c) ((-1==ioctl(a,b,&c))&&(perror("ioctl:"#b":"#c),0))
#else
#define IOCTL(a,b,c) (c = ioctl(a,b,c) )
#endif
......@@ -863,10 +863,11 @@ static DWORD wodClose(WORD wDevID)
close(WOutDev[wDevID].unixdev);
WOutDev[wDevID].unixdev = 0;
WOutDev[wDevID].bufsize = 0;
WOutDev[wDevID].lpQueueHdr = NULL;
if (WAVE_NotifyClient(wDevID, WOM_CLOSE, 0L, 0L) != MMSYSERR_NOERROR) {
dprintf_mciwave(stddeb,"Linux 'wodClose' // can't notify client !\n");
return MMSYSERR_INVALPARAM;
}
}
return MMSYSERR_NOERROR;
}
......@@ -920,10 +921,13 @@ static DWORD wodPrepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
dprintf_mciwave(stddeb,"Linux 'wodPrepare' // can't prepare !\n");
return MMSYSERR_NOTENABLED;
}
/* the COOL waveeditor feels much better without this check...
* someone please have a look at available documentation
if (WOutDev[wDevID].lpQueueHdr != NULL) {
dprintf_mciwave(stddeb,"Linux 'wodPrepare' // already prepare !\n");
return MMSYSERR_NOTENABLED;
}
}
*/
WOutDev[wDevID].dwTotalPlayed = 0;
WOutDev[wDevID].lpQueueHdr = lpWaveHdr;
if (lpWaveHdr->dwFlags & WHDR_INQUEUE) return WAVERR_STILLPLAYING;
......
......@@ -29,7 +29,7 @@ depend:
mv tmp_make Makefile
clean:
rm -f *.o \#*\# *~ tmp_make
rm -f *.o \#*\# *~ *.bak tmp_make
distclean: clean
rm -f Makefile
......
......@@ -1302,3 +1302,11 @@ BOOL StretchBlt( HDC hdcDst, short xDst, short yDst,
dcDst, xDst, yDst, widthDst, heightDst,
dcSrc, xSrc, ySrc, widthSrc, heightSrc, rop );
}
/***********************************************************************
* FastWindowFrame (GDI.400)
*/
WORD
FastWindowFrame(WORD x1,DWORD x2,WORD x3,WORD x4,DWORD x5) {
dprintf_gdi(stdnimp,"FastWindowFrame (%04x, %08lx, %04x, %04x, %08lx) // unimplemented!\n",x1,x2,x3,x4,x5);
return 0xFFFF; /* failed? */
}
......@@ -78,7 +78,7 @@ BOOL FONT_Init( void )
FontNames[0].x11 = strdup( temp );
} else {
FontNames[0].window = NULL; FontNames[0].x11 = "bitstream-courier";
FontNames[0].window = NULL; FontNames[0].x11 = "*-helvetica";
FontNames[1].window = "ms sans serif"; FontNames[1].x11 = "*-helvetica";
FontNames[2].window = "ms serif"; FontNames[2].x11 = "*-times";
FontNames[3].window = "fixedsys"; FontNames[3].x11 = "*-fixed";
......@@ -313,7 +313,8 @@ HFONT CreateFont( int height, int width, int esc, int orient, int weight,
{
LOGFONT logfont = { height, width, esc, orient, weight, italic, underline,
strikeout, charset, outpres, clippres, quality, pitch, };
strncpy( logfont.lfFaceName, name, LF_FACESIZE );
if (name) strncpy( logfont.lfFaceName, name, LF_FACESIZE );
else logfont.lfFaceName[0] = '\0';
return CreateFontIndirect( &logfont );
}
......
......@@ -35,16 +35,11 @@
#include "bitmaps/obm_dnarrowd"
#include "bitmaps/obm_uparrowd"
#include "bitmaps/obm_restored"
#include "bitmaps/obm_zoomd"
#include "bitmaps/obm_reduced"
#include "bitmaps/obm_restore"
#include "bitmaps/obm_zoom"
#include "bitmaps/obm_reduce"
#include "bitmaps/obm_lfarrow"
#include "bitmaps/obm_rgarrow"
#include "bitmaps/obm_dnarrow"
#include "bitmaps/obm_uparrow"
#include "bitmaps/obm_close"
#include "bitmaps/obm_old_restore"
#include "bitmaps/obm_old_zoom"
#include "bitmaps/obm_old_reduce"
......@@ -59,6 +54,21 @@
#include "bitmaps/obm_size"
#include "bitmaps/obm_old_close"
#ifndef WIN_95_LOOK
#include "bitmaps/obm_zoomd"
#include "bitmaps/obm_reduced"
#include "bitmaps/obm_zoom"
#include "bitmaps/obm_reduce"
#include "bitmaps/obm_close"
#else
#include "bitmaps/obm_zoomd_95"
#include "bitmaps/obm_reduced_95"
#include "bitmaps/obm_zoom_95"
#include "bitmaps/obm_reduce_95"
#include "bitmaps/obm_close_95"
#include "bitmaps/obm_closed_95"
#endif /* WIN_95_LOOK */
#define OBM_FIRST OBM_CDROM /* First OEM bitmap */
#define OBM_LAST OBM_OLD_CLOSE /* Last OEM bitmap */
......@@ -86,13 +96,22 @@ static const struct
{ obm_zoomd, TRUE }, /* OBM_ZOOMD */
{ obm_reduced, TRUE }, /* OBM_REDUCED */
{ obm_restore, TRUE }, /* OBM_RESTORE */
#ifdef WIN_95_LOOK
{ obm_zoom_95, TRUE }, /* OBM_ZOOM */
{ obm_reduce_95, TRUE }, /* OBM_REDUCE */
#else
{ obm_zoom, TRUE }, /* OBM_ZOOM */
{ obm_reduce, TRUE }, /* OBM_REDUCE */
#endif
{ obm_lfarrow, TRUE }, /* OBM_LFARROW */
{ obm_rgarrow, TRUE }, /* OBM_RGARROW */
{ obm_dnarrow, TRUE }, /* OBM_DNARROW */
{ obm_uparrow, TRUE }, /* OBM_UPARROW */
#ifdef WIN_95_LOOK
{ obm_close_95, TRUE }, /* OBM_CLOSE */
#else
{ obm_close, TRUE }, /* OBM_CLOSE */
#endif
{ obm_old_restore, FALSE }, /* OBM_OLD_RESTORE */
{ obm_old_zoom, FALSE }, /* OBM_OLD_ZOOM */
{ obm_old_reduce, FALSE }, /* OBM_OLD_REDUCE */
......@@ -163,6 +182,7 @@ static const struct
{ "button_face", PALETTEINDEX(COLOR_BTNFACE) },
{ "button_shadow", PALETTEINDEX(COLOR_BTNSHADOW) },
{ "button_highlight", PALETTEINDEX(COLOR_BTNHIGHLIGHT) },
{ "button_edge", PALETTEINDEX(COLOR_BTNHIGHLIGHT) },
{ "button_text", PALETTEINDEX(COLOR_BTNTEXT) },
{ "window_frame", PALETTEINDEX(COLOR_WINDOWFRAME) }
};
......
----------------------------------------------------------------------
Sun Sep 25 12:00:00 PDT 1994 <martin@osiris.cs.csufresno.edu>
* [rc/rc.y] [rc/rc.h] [rc/rc.l] [rc/winerc.c]
Files created
......@@ -34,8 +34,8 @@ rc.o: sysres.o
$(COMPILE) -c -o $*.o $<
clean:
rm -f *.o \#*\# *~ lex.yy.c sysres.tmp sysres.rct winerc y.tab.c \
y.tab.h sysres.c sysres.h tmp_make
rm -f *.o \#*\# *~ *.bak tmp_make
rm -f lex.yy.c sysres.tmp sysres.rct winerc y.tab.c y.tab.h sysres.c sysres.h
distclean: clean
rm -f Makefile
......
/*
*
* Copyright Martin von Loewis, 1994
*
*/
/* resource types */
enum rt {acc,bmp,cur,dlg,fnt,ico,men,rdt,str};
/* generic resource
Bytes can be inserted at arbitrary positions, the data field (res)
grows as required. As the dialog header contains the number of
controls, this number is generated in num_entries. If n_type if 0,
the resource name is i_name, and s_name otherwise. Top level
resources are linked via next. All gen_res objects are linked via
g_prev, g_next for debugging purposes. space is the length of res,
size is the used part of res.
As most bison rules are right recursive, new items are usually
inserted at the beginning
*/
typedef struct gen_res{
int size,space;
int num_entries;
enum rt type;
union{
int i_name;
char* s_name;
}n;
int n_type; /*0 - integer, 1 = string*/
struct gen_res *next;
struct gen_res *g_prev,*g_next;
unsigned char res[0];
} gen_res;
/* control/dialog style. or collects styles, and collects NOT styles */
typedef struct rc_style{
int and, or;
}rc_style;
/* create a new resource */
gen_res *new_res(void);
/* double the space of the resource */
gen_res* grow(gen_res*);
/* insert byte array at the beginning, increase count */
gen_res* insert_at_beginning(gen_res*,char*,int);
/* insert byte array at offset */
gen_res* insert_bytes(gen_res*,char*,int,int);
/* delete bytes at offset */
gen_res* delete_bytes(gen_res*,int,int);
/* create a new style */
rc_style* new_style(void);
/* convert \t to tab etc. */
char* parse_c_string(char*);
/* get the resources type, convert dlg to "DIALOG" and so on */
char* get_typename(gen_res*);
gen_res* add_accelerator(int,int,int,gen_res*);
gen_res* add_string_accelerator(char*,int,int,gen_res*);
gen_res* add_ascii_accelerator(int,int,int,gen_res*);
gen_res* add_vk_accelerator(int,int,int,gen_res*);
gen_res* new_dialog(void);
gen_res* dialog_style(rc_style*,gen_res*);
int dialog_get_menu(gen_res*);
int dialog_get_class(gen_res*);
int dialog_get_caption(gen_res*);
int dialog_get_fontsize(gen_res*);
gen_res* dialog_caption(char*,gen_res*);
gen_res* dialog_font(short,char*,gen_res*);
gen_res* dialog_class(char*,gen_res*);
gen_res* dialog_menu(char*,gen_res*);
gen_res* create_control_desc(int,int,int,int,int,rc_style*);
gen_res* label_control_desc(char*,gen_res*);
gen_res* create_generic_control(char*,int,char*,rc_style*,int,int,int,int);
gen_res* add_control(int,int,gen_res*,gen_res*);
gen_res* add_icon(char*,int,int,int,gen_res*,gen_res*);
gen_res* add_generic_control(gen_res*,gen_res*);
gen_res* make_dialog(gen_res*,int,int,int,int,gen_res*);
gen_res *hex_to_raw(char*,gen_res*);
gen_res *make_bitmap(gen_res*);
gen_res *make_icon(gen_res*);
gen_res *make_cursor(gen_res*);
gen_res *load_file(char*);
gen_res *add_menuitem(char*,int,int,gen_res*);
gen_res *add_popup(char*,short,gen_res*,gen_res*);
gen_res *make_menu(gen_res*);
gen_res *add_resource(gen_res*,gen_res*);
void create_output(gen_res*);
void set_out_file(char*);
#define CT_BUTTON 0x80
#define CT_EDIT 0x81
#define CT_STATIC 0x82
#define CT_LISTBOX 0x83
#define CT_SCROLLBAR 0x84
#define CT_COMBOBOX 0x85
extern int verbose;
#ifdef __sun__
#define strtoul strtol
#endif
%{
/*
*
* Copyright Martin von Loewis, 1994
*
*/
static char Copyright[] = "Copyright Martin von Loewis, 1994";
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "rc.h"
#include "rc.tab.h"
%}
%%
ACCELERATORS return ACCELERATORS;
ALT return ALT;
ASCII return ASCII;
BEGIN return tBEGIN;
BITMAP return tBITMAP;
CAPTION return CAPTION;
CHECKBOX return CHECKBOX;
CHECKED return CHECKED;
CLASS return CLASS;
COMBOBOX return COMBOBOX;
CONTROL return CONTROL;
CTEXT return CTEXT;
CURSOR return CURSOR;
DEFPUSHBUTTON return DEFPUSHBUTTON;
DIALOG return DIALOG;
DISCARDABLE return DISCARDABLE;
EDITTEXT return EDITTEXT;
END return tEND;
FIXED return FIXED;
FONT return FONT;
GRAYED return GRAYED;
GROUPBOX return GROUPBOX;
HELP return HELP;
ICON return ICON;
INACTIVE return INACTIVE;
LISTBOX return LISTBOX;
LTEXT return LTEXT;
MENU return MENU;
MENUBARBREAK return MENUBARBREAK;
MENUBREAK return MENUBREAK;
MENUITEM return MENUITEM;
MOVEABLE return MOVEABLE;
LOADONCALL return LOADONCALL;
NOINVERT return NOINVERT;
NOT return NOT;
NUMBER return NUMBER;
POPUP return POPUP;
PRELOAD return PRELOAD;
PUSHBUTTON return PUSHBUTTON;
PURE return PURE;
RADIOBUTTON return RADIOBUTTON;
RCDATA return RCDATA;
RTEXT return RTEXT;
SCROLLBAR return SCROLLBAR;
SHIFT return SHIFT;
SEPARATOR return SEPARATOR;
STRING return STRING;
STRINGTABLE return STRINGTABLE;
STYLE return STYLE;
VERSIONINFO return VERSIONINFO;
VIRTKEY return VIRTKEY;
\{ return tBEGIN;
\} return tEND;
[+-]?[0-9]+ yylval.num=atoi(yytext);return NUMBER;
0x[0-9A-Fa-f]+L? yylval.num=strtoul(yytext,0,16);return NUMBER;
[A-Za-z][A-Za-z_0-9]* yylval.str=strdup(yytext);return IDENT;
\"[^"]*\" yylval.str=parse_c_string(yytext);return STRING;
\'[^']*\' yylval.str=strdup(yytext+1);return SINGLE_QUOTED;
[ \t\n\r] ;
. return yytext[0];
%{
/*
*
* Copyright Martin von Loewis, 1994
*/
static char Copyright[] = "Copyright Martin von Loewis, 1994";
#include <stdio.h>
#include "rc.h"
#include "windows.h"
%}
%union{
gen_res *res;
char *str;
int num;
struct rc_style *style;
}
%token <num> NUMBER
%token <str> STRING SINGLE_QUOTED IDENT
%token ACCELERATORS ALT ASCII tBEGIN tBITMAP CAPTION CHECKBOX CHECKED
%token CLASS COMBOBOX CONTROL CTEXT CURSOR DEFPUSHBUTTON DIALOG
%token DISCARDABLE EDITTEXT tEND FIXED FONT GRAYED GROUPBOX HELP ICON
%token IDENT INACTIVE LISTBOX LTEXT MENU MENUBARBREAK MENUBREAK MENUITEM
%token MOVEABLE LOADONCALL NOINVERT NOT NOT_SUPPORTED POPUP PRELOAD
%token PURE PUSHBUTTON RADIOBUTTON RCDATA RTEXT SCROLLBAR SHIFT SEPARATOR
%token SINGLE_QUOTED STRING STRINGTABLE STYLE VERSIONINFO VIRTKEY
%type <res> resource_file resource resources resource_definition accelerators
%type <res> events bitmap cursor dialog dlg_attributes controls
%type <res> generic_control labeled_control control_desc font icon
%type <res> iconinfo menu menu_body item_definitions rcdata raw_data raw_elements
%type <res> stringtable strings versioninfo
%type <num> acc_options item_options
%type <style> style optional_style
%%
resource_file: resources {create_output($1);}
/*resources are put into a linked list*/
resources: {$$=0;}
|resource resources {$$=add_resource($1,$2);}
;
/* get the name for a single resource*/
resource: NUMBER resource_definition
{$$=$2;$$->n.i_name=$1;$$->n_type=0;
if(verbose)fprintf(stderr,"Got %s %d\n",get_typename($2),$1);
}
| IDENT resource_definition
{$$=$2;$$->n.s_name=$1;$$->n_type=1;
if(verbose)fprintf(stderr,"Got %s %s\n",get_typename($2),$1);
}
/* get the value for a single resource*/
resource_definition: accelerators {$$=$1;}
| bitmap {$$=$1;}
| cursor {$$=$1;}
| dialog {$$=$1;}
| font {$$=$1;}
| icon {$$=$1;}
| menu {$$=$1;}
| rcdata {$$=$1;}
| stringtable {$$=$1;}
| versioninfo {$$=$1;}
/* have to use tBEGIN because BEGIN is predefined */
accelerators: ACCELERATORS tBEGIN events tEND {$$=$3;$$->type=acc;}
/* the events are collected in a gen_res, as the accelerator resource is just
an array of events */
events: {$$=new_res();}
| STRING ',' NUMBER acc_options events
{$$=add_string_accelerator($1,$3,$4,$5);}
| NUMBER ',' NUMBER ',' ASCII acc_options events
{$$=add_ascii_accelerator($1,$3,$6,$7);}
| NUMBER ',' NUMBER ',' VIRTKEY acc_options events
{$$=add_vk_accelerator($1,$3,$6,$7);}
acc_options: {$$=0;}
| ',' NOINVERT acc_options {$$=$3|2;}
| ',' ALT acc_options {$$=$3|16;}
| ',' SHIFT acc_options {$$=$3|4;}
| ',' CONTROL acc_options {$$=$3|8;}
bitmap: tBITMAP load_and_memoption STRING {$$=make_bitmap(load_file($3));}
| tBITMAP load_and_memoption raw_data {$$=make_bitmap($3);}
/* load and memory options are ignored */
load_and_memoption: | lamo load_and_memoption
lamo: PRELOAD | LOADONCALL | FIXED | MOVEABLE | DISCARDABLE | PURE
cursor: CURSOR load_and_memoption STRING {$$=make_cursor(load_file($3));}
|CURSOR load_and_memoption raw_data {$$=make_cursor($3);}
dialog: DIALOG load_and_memoption NUMBER ',' NUMBER ',' NUMBER ',' NUMBER
dlg_attributes
tBEGIN controls tEND
{$$=make_dialog($10,$3,$5,$7,$9,$12);}
dlg_attributes: {$$=new_dialog();}
| STYLE style dlg_attributes
{$$=dialog_style($2,$3);}
| CAPTION STRING dlg_attributes
{$$=dialog_caption($2,$3);}
| FONT NUMBER ',' STRING dlg_attributes
{$$=dialog_font($2,$4,$5);}
| CLASS STRING dlg_attributes
{$$=dialog_class($2,$3);}
| MENU STRING dlg_attributes
{$$=dialog_menu($2,$3);}
/* the controls are collected into a gen_res, and finally the dialog header
is put at the beginning */
controls: {$$=new_res();}
| CHECKBOX labeled_control controls
{$$=add_control(CT_BUTTON, BS_CHECKBOX, $2, $3);}
| COMBOBOX control_desc controls
{$$=add_control(CT_COMBOBOX, 0, $2, $3);}
| CONTROL generic_control controls
{$$=add_generic_control($2, $3);}
| CTEXT labeled_control controls
{$$=add_control(CT_STATIC, SS_CENTER, $2, $3);}
| DEFPUSHBUTTON labeled_control controls
{$$=add_control(CT_BUTTON, BS_DEFPUSHBUTTON, $2, $3);}
| EDITTEXT control_desc controls
{$$=add_control(CT_EDIT, 0, $2, $3);}
| GROUPBOX labeled_control controls
{$$=add_control(CT_BUTTON, BS_GROUPBOX, $2, $3);}
/*special treatment for icons, as the extent is optional*/
| ICON STRING ',' NUMBER ',' NUMBER ',' NUMBER iconinfo controls
{$$=add_icon($2, $4, $6, $8, $9, $10);}
| LISTBOX control_desc controls
{$$=add_control(CT_LISTBOX, 0, $2, $3);}
| LTEXT labeled_control controls
{$$=add_control(CT_STATIC, SS_LEFT, $2, $3);}
| PUSHBUTTON labeled_control controls
{$$=add_control(CT_BUTTON, BS_PUSHBUTTON, $2, $3);}
| RADIOBUTTON labeled_control controls
{$$=add_control(CT_BUTTON, BS_RADIOBUTTON, $2, $3);}
| RTEXT labeled_control controls
{$$=add_control(CT_STATIC, SS_RIGHT, $2, $3);}
| SCROLLBAR control_desc controls
{$$=add_control(CT_SCROLLBAR, 0, $2, $3);}
labeled_control: STRING ',' control_desc {$$=label_control_desc($1,$3);}
control_desc: NUMBER ',' NUMBER ',' NUMBER ',' NUMBER ',' NUMBER optional_style
{$$=create_control_desc($1,$3,$5,$7,$9,$10);}
optional_style: {$$=0;}|
',' style {$$=$2;}
iconinfo: /*set extent and style to 0 if they are not provided */
{$$=create_control_desc(0,0,0,0,0,0);}
/* x and y are overwritten later */
| ',' NUMBER ',' NUMBER optional_style
{$$=create_control_desc(0,0,0,$2,$4,$5);}
generic_control: STRING ',' NUMBER ',' STRING ',' style ',' NUMBER
',' NUMBER ',' NUMBER ',' NUMBER
{$$=create_generic_control($1,$3,$5,$7,$9,$11,$13,$15);}
font: FONT load_and_memoption STRING {$$=make_font(load_file($3));}
icon: ICON load_and_memoption STRING {$$=make_icon(load_file($3));}
| ICON load_and_memoption raw_data {$$=make_icon($3);}
menu: MENU load_and_memoption menu_body {$$=make_menu($3);}
/* menu items are collected in a gen_res and prefixed with the menu header*/
menu_body: tBEGIN item_definitions tEND {$$=$2;}
item_definitions: {$$=new_res();}
| MENUITEM STRING ',' NUMBER item_options item_definitions
{$$=add_menuitem($2,$4,$5,$6);}
| MENUITEM SEPARATOR item_definitions
{$$=add_menuitem("",0,0,$3);}
| POPUP STRING item_options menu_body item_definitions
{$$=add_popup($2,$3,$4,$5);}
item_options: {$$=0;}
| ',' CHECKED item_options {$$=$3|MF_CHECKED;}
| ',' GRAYED item_options {$$=$3|MF_GRAYED;}
| ',' HELP item_options {$$=$3|MF_HELP;}
| ',' INACTIVE item_options {$$=$3|MF_DISABLED;}
| ',' MENUBARBREAK item_options {$$=$3|MF_MENUBARBREAK;}
| ',' MENUBREAK item_options {$$=$3|MF_MENUBREAK;}
rcdata: RCDATA load_and_memoption raw_data {$$=make_raw($3);}
raw_data: tBEGIN raw_elements tEND {$$=$2;}
raw_elements: SINGLE_QUOTED {$$=hex_to_raw($1,new_res());}
| NUMBER {$$=int_to_raw($1,new_res());}
| SINGLE_QUOTED raw_elements {$$=hex_to_raw($1,$2);}
| NUMBER ',' raw_elements {$$=int_to_raw($1,$3);}
stringtable: STRINGTABLE load_and_memoption tBEGIN strings tEND
{$$=$4;}
strings: {$$=0;}|
NUMBER STRING strings {$$=0;}
versioninfo: VERSIONINFO NOT_SUPPORTED {$$=0;}
/* NOT x | NOT y | a | b means (a|b)& ~x & ~y
NOT is used to disable default styles */
style: NUMBER {$$=new_style();$$->or=$1;}
| NOT NUMBER {$$=new_style();$$->and=~($2);}
| '(' style ')' {$$=$2;}
| style '|' style {$$=$1;$$->or|=$3->or;$$->and&=$3->and;}
%%
int yyerror(char *s)
{
puts(s);
}
......@@ -31,7 +31,7 @@ END
SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 50, 44, 213, 179
STYLE DS_LOCALEDIT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "About X"
CAPTION "About %s"
FONT 10, "System"
{
DEFPUSHBUTTON "OK", 1, 86, 160, 40, 14
......
......@@ -29,7 +29,7 @@ END
SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 50, 44, 213, 179
STYLE DS_LOCALEDIT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION ""
CAPTION "Info ber %s"
FONT 10, "System"
{
DEFPUSHBUTTON "OK", 1, 86, 160, 40, 14
......
......@@ -29,7 +29,7 @@ END
SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 50, 44, 213, 179
STYLE DS_LOCALEDIT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Om X"
CAPTION "Om %s"
FONT 10, "System"
{
DEFPUSHBUTTON "OK", 1, 86, 160, 40, 14
......
......@@ -19,7 +19,7 @@ depend:
mv tmp_make Makefile
clean:
rm -f *.o \#*\# *~ build tmp_make
rm -f *.o \#*\# *~ *.bak build tmp_make
distclean: clean
rm Makefile
......
......@@ -974,21 +974,19 @@ static void BuildCall32LargeStack(void)
printf( "\tpushl %%ebp\n" );
printf( "\tmovl %%esp,%%ebp\n" );
/* Retrieve the original 32-bit stack pointer */
printf( "\tmovl " PREFIX "IF1632_Original32_esp, %%eax\n" );
printf( "\torl %%eax,%%eax\n" );
printf( "\tje 0f\n" );
/* Save registers */
printf( "\tpushl %%ecx\n" );
printf( "\tpushl %%esi\n" );
printf( "\tpushl %%edi\n" );
/* Switch to the new stack */
/* Retrieve the original 32-bit stack pointer and switch to it if any */
printf( "\tmovl " PREFIX "IF1632_Original32_esp, %%eax\n" );
printf( "\torl %%eax,%%eax\n" );
printf( "\tje 0f\n" );
printf( "\tmovl %%eax,%%esp\n" );
printf( "0:\n" );
/* Transfer the arguments */
......@@ -1016,29 +1014,8 @@ static void BuildCall32LargeStack(void)
printf( "\tpopl %%edi\n" );
printf( "\tpopl %%esi\n" );
printf( "\tpopl %%ecx\n" );
printf( "\tpopl %%ebp\n" );
printf( "\tret\n" );
/* We get here if IF1632_Original32_esp is 0, i.e. we have not */
/* switched to another 32-bit stack yet. */
printf( "0:\n" );
/* Move the return address up the stack */
printf( "\tmovl 4(%%ebp),%%eax\n" );
printf( "\tmovl %%eax,12(%%ebp)\n" );
/* Restore ebp and remove old return address */
printf( "\tpopl %%ebp\n" );
printf( "\taddl $4,%%esp\n" );
/* Now jump to the routine, leaving the original return address and */
/* the arguments on the stack. */
printf( "\tret\n" );
}
......
......@@ -32,7 +32,7 @@ depend:
mv tmp_make Makefile
clean:
rm -f *.o \#*\# *~ tmp_make
rm -f *.o \#*\# *~ *.bak tmp_make
distclean: clean
rm Makefile
......
......@@ -34,7 +34,7 @@ HCLASS CLASS_FindClassByName( SEGPTR name, WORD hinstance, CLASS **ptr )
HCLASS class;
CLASS * classPtr;
if (!(atom = LocalFindAtom( name ))) return 0;
if (!(atom = GlobalFindAtom( name ))) return 0;
/* First search task-specific classes */
......@@ -128,7 +128,7 @@ ATOM RegisterClass( LPWNDCLASS class )
newClass->wc.cbWndExtra = (class->cbWndExtra < 0) ? 0 : class->cbWndExtra;
newClass->wc.cbClsExtra = classExtra;
newClass->atomName = LocalAddAtom( class->lpszClassName );
newClass->atomName = GlobalAddAtom( class->lpszClassName );
newClass->wc.lpszClassName = 0;
if (newClass->wc.style & CS_CLASSDC)
......@@ -189,8 +189,7 @@ BOOL UnregisterClass( SEGPTR className, HANDLE hinstance )
/* Delete the class */
if (classPtr->hdce) DCE_FreeDCE( classPtr->hdce );
if (classPtr->wc.hbrBackground) DeleteObject( classPtr->wc.hbrBackground );
/*if (classPtr->wc.style & CS_GLOBALCLASS)*/ LocalDeleteAtom( classPtr->atomName );
/*else DeleteAtom( classPtr->atomName );*/
GlobalDeleteAtom( classPtr->atomName );
if (HIWORD(classPtr->wc.lpszMenuName))
USER_HEAP_FREE( LOWORD(classPtr->wc.lpszMenuName) );
USER_HEAP_FREE( class );
......@@ -270,7 +269,7 @@ int GetClassName(HWND hwnd, LPSTR lpClassName, short maxCount)
if (!(wndPtr = WIN_FindWndPtr(hwnd))) return 0;
if (!(classPtr = CLASS_FindClassPtr(wndPtr->hClass))) return 0;
return LocalGetAtomName(classPtr->atomName, lpClassName, maxCount);
return GlobalGetAtomName(classPtr->atomName, lpClassName, maxCount);
}
......@@ -315,7 +314,7 @@ BOOL ClassNext( CLASSENTRY *pClassEntry )
pClassEntry->hInst = classPtr->wc.hInstance;
pClassEntry->wNext = classPtr->hNext;
LocalGetAtomName( classPtr->atomName, pClassEntry->szClassName,
GlobalGetAtomName( classPtr->atomName, pClassEntry->szClassName,
sizeof(pClassEntry->szClassName) );
return TRUE;
}
......@@ -4,6 +4,7 @@
* Copyright 1993 Alexandre Julliard
*/
#include <math.h>
#include "gdi.h"
#include "metafile.h"
#include "stddebug.h"
......@@ -24,12 +25,12 @@ void MAPPING_FixIsotropic( DC * dc )
(dc->w.devCaps->vertRes * dc->w.WndExtY);
if (xdim > ydim)
{
dc->w.VportExtX = dc->w.VportExtX * ydim / xdim;
dc->w.VportExtX = dc->w.VportExtX * fabs( ydim / xdim );
if (!dc->w.VportExtX) dc->w.VportExtX = 1;
}
else
{
dc->w.VportExtY = dc->w.VportExtY * xdim / ydim;
dc->w.VportExtY = dc->w.VportExtY * fabs( xdim / ydim );
if (!dc->w.VportExtY) dc->w.VportExtY = 1;
}
}
......
......@@ -28,15 +28,6 @@
#define MAX_QUEUE_SIZE 120 /* Max. size of a message queue */
/* used for passing message information when sending message */
typedef struct {
LONG lParam;
WORD wParam;
WORD wMsg;
WORD hWnd;
} msgstruct;
extern BOOL TIMER_CheckTimer( LONG *next, MSG *msg,
HWND hwnd, BOOL remove ); /* timer.c */
......@@ -146,8 +137,8 @@ static int MSG_FindMsg(MESSAGEQUEUE * msgQueue, HWND hwnd, int first, int last)
{
int i, pos = msgQueue->nextMessage;
dprintf_msg(stddeb,"MSG_FindMsg: hwnd=0x%04x, proc=%d\n",
hwnd, curr_proc_idx);
dprintf_msg(stddeb,"MSG_FindMsg: hwnd=0x%04x\n\n", hwnd );
if (!msgQueue->msgCount) return -1;
if (!hwnd && !first && !last) return pos;
......@@ -436,6 +427,7 @@ static BOOL MSG_PeekHardwareMsg( MSG *msg, HWND hwnd, WORD first, WORD last,
for (i = 0; i < sysMsgQueue->msgCount; i++, pos++)
{
if (pos >= sysMsgQueue->queueSize) pos = 0;
*msg = sysMsgQueue->messages[pos].msg;
/* Translate message */
......@@ -455,7 +447,8 @@ static BOOL MSG_PeekHardwareMsg( MSG *msg, HWND hwnd, WORD first, WORD last,
if (hwnd && (msg->hwnd != hwnd)) continue;
if ((first || last) &&
((msg->message < first) || (msg->message > last))) continue;
if (GetWindowTask(msg->hwnd) != GetCurrentTask())
if ((msg->hwnd != GetDesktopWindow()) &&
(GetWindowTask(msg->hwnd) != GetCurrentTask()))
continue; /* Not for this task */
if (remove) MSG_RemoveMsg( sysMsgQueue, pos );
return TRUE;
......@@ -734,12 +727,16 @@ BOOL MSG_WaitXEvent( LONG maxWait )
XEvent event;
int fd = ConnectionNumber(display);
if (!XPending(display))
if (!XPending(display) && (maxWait != -1))
{
FD_ZERO( &read_set );
FD_SET( fd, &read_set );
timeout.tv_usec = (maxWait % 1000) * 1000;
timeout.tv_sec = maxWait / 1000;
#ifdef CONFIG_IPC
sigsetjmp(env_wait_x, 1);
stop_wait_op= CONT;
if (DDE_GetRemoteMessage()) {
......@@ -747,10 +744,6 @@ BOOL MSG_WaitXEvent( LONG maxWait )
;
return TRUE;
}
timeout.tv_usec = (maxWait % 1000) * 1000;
timeout.tv_sec = maxWait / 1000;
stop_wait_op= STOP_WAIT_X;
/* The code up to the next "stop_wait_op= CONT" must be reentrant */
if (select( fd+1, &read_set, NULL, NULL, &timeout ) != 1 &&
......@@ -760,17 +753,25 @@ BOOL MSG_WaitXEvent( LONG maxWait )
} else {
stop_wait_op= CONT;
}
#else /* CONFIG_IPC */
if (select( fd+1, &read_set, NULL, NULL, &timeout ) != 1)
return FALSE; /* Timeout or error */
#endif /* CONFIG_IPC */
}
/* Process the event (and possibly others that occurred in the meantime) */
do
{
if (DDE_GetRemoteMessage()) {
while(DDE_GetRemoteMessage())
;
#ifdef CONFIG_IPC
if (DDE_GetRemoteMessage())
{
while(DDE_GetRemoteMessage()) ;
return TRUE;
}
#endif /* CONFIG_IPC */
XNextEvent( display, &event );
EVENT_ProcessEvent( &event );
}
......@@ -789,8 +790,10 @@ static BOOL MSG_PeekMessage( LPMSG msg, HWND hwnd, WORD first, WORD last,
MESSAGEQUEUE *msgQueue;
LONG nextExp; /* Next timer expiration time */
#ifdef CONFIG_IPC
DDE_TestDDE(hwnd); /* do we have dde handling in the window ?*/
DDE_GetRemoteMessage();
#endif /* CONFIG_IPC */
if (first || last)
{
......@@ -974,8 +977,10 @@ BOOL PostMessage( HWND hwnd, WORD message, WORD wParam, LONG lParam )
msg.pt.x = 0;
msg.pt.y = 0;
#ifdef CONFIG_IPC
if (DDE_PostMessage(&msg))
return TRUE;
#endif /* CONFIG_IPC */
if (hwnd == HWND_BROADCAST) {
dprintf_msg(stddeb,"PostMessage // HWND_BROADCAST !\n");
......@@ -1026,7 +1031,6 @@ LONG SendMessage( HWND hwnd, WORD msg, WORD wParam, LONG lParam )
{
WND * wndPtr;
LONG ret;
MSG DDE_msg;
struct
{
LONG lParam;
......@@ -1035,11 +1039,10 @@ LONG SendMessage( HWND hwnd, WORD msg, WORD wParam, LONG lParam )
WORD hWnd;
} msgstruct = { lParam, wParam, msg, hwnd };
DDE_msg.hwnd = hwnd;
DDE_msg.message = msg;
DDE_msg.wParam = wParam;
DDE_msg.lParam = lParam;
#ifdef CONFIG_IPC
MSG DDE_msg = { hwnd, msg, wParam, lParam };
if (DDE_SendMessage(&DDE_msg)) return TRUE;
#endif /* CONFIG_IPC */
if (hwnd == HWND_BROADCAST)
{
......@@ -1080,7 +1083,9 @@ void WaitMessage( void )
MESSAGEQUEUE *queue;
LONG nextExp = -1; /* Next timer expiration time */
#ifdef CONFIG_IPC
DDE_GetRemoteMessage();
#endif /* CONFIG_IPC */
if (!(queue = (MESSAGEQUEUE *)GlobalLock( GetTaskQueue(0) ))) return;
if ((queue->wPostQMsg) ||
......@@ -1197,7 +1202,7 @@ LONG GetMessageExtraInfo(void)
WORD RegisterWindowMessage( SEGPTR str )
{
dprintf_msg(stddeb, "RegisterWindowMessage: '%08lx'\n", str );
return LocalAddAtom( str );
return GlobalAddAtom( str );
}
......
......@@ -189,8 +189,10 @@ static void WIN_DestroyWindow( HWND hwnd )
WND *wndPtr = WIN_FindWndPtr( hwnd );
CLASS *classPtr = CLASS_FindClassPtr( wndPtr->hClass );
#ifdef CONFIG_IPC
if (main_block)
DDE_DestroyWindow(hwnd);
#endif /* CONFIG_IPC */
if (!wndPtr || !classPtr) return;
WIN_UnlinkWindow( hwnd ); /* Remove the window from the linked list */
......
......@@ -14,7 +14,7 @@ Path=c:\windows;c:\windows\system;e:\;e:\test;f:\
SymbolTableFile=./wine.sym
[fonts]
system=bitstream-courier
system=*-helvetica
mssansserif=*-helvetica
msserif=*-times
fixedsys=*-fixed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment