Skip to content
Snippets Groups Projects
Commit d2e1c1a4 authored by Alexandre Julliard's avatar Alexandre Julliard
Browse files

Release 960309

Fri Mar  8 19:07:18 1996  Alexandre Julliard  <julliard@lrc.epfl.ch>

	* [configure.in]
	Quote '[' and ']' in the test program for the strength-reduce
	bug. This should work much better...

	* [files/file.c]
	Augmented DOS_FILE structure. Most internal functions now return a
	DOS_FILE* instead of a Unix handle.
	Added a local file array to replace the PDB list upon startup, to
	allow using file I/O functions before the first task is created.
	Added FILE_SetDateTime() and FILE_Sync() functions.
	
	* [loader/module.c]
	Use the DOS file I/O functions in MODULE_LoadExeHeader().

	* [objects/bitblt.c]
	Use visible region instead of GC clip region to clip source
	area. This fixes the card drawing bug in freecell.

	* [objects/region.c]
	Fixed CombineRgn() to allow src and dest regions to be the same.

Fri Mar  8 16:32:23 1996  Frans van Dorsselaer <dorssel@rulhm1.leidenuniv.nl>

	* [controls/EDIT.TODO]
	Updated so it reflects the current status.

	* [controls/edit.c]
	Implemented internal EDIT_WordBreakProc().
	Implemented ES_READONLY.
	Implemented WM_LBUTTONDBLCLK to select whole words.
	Fixed a lot of types in the function definitions.

Wed Mar  6 19:55:00 1996  Alex Korobka <alex@phm30.pharm.sunysb.edu>

	* [debugger/info.c]
	Added "walk window" command to walk window list. 

	* [windows/mdi.c]
	Added proper(?) WM_MDISETMENU message handling.

Wed Mar  6 09:27:12 1996  Martin von Loewis <loewis@informatik.hu-berlin.de>

	* [if1632/callback.c][if1632/relay32.c]
	RELAY32_CallWindowProcConvStruct: new function.

	* [win32/struct32.c][win32/Makefile.in][win32/param.c][win32/user32.c]
	struct32.c: new file. Moved all structure conversions into that file
	PARAM32_POINT32to16,MSG16to32,USER32_RECT32to16: 
	renamed to STRUCT32_POINT32to16, ...
	WIN32_POINT,WIN32_MSG,WIN32_RECT,WIN32_PAINTSTRUCT: renamed to
	POINT32, ...
	New conversion functions for NCCALCSIZE_PARAMS, WINDOWPOS,
 	CREATESTRUCT.

	* [include/windows.h][misc/exec.c]
	WINHELP, MULTIKEYHELP, HELPWININFO: new structures
	WinHelp: Reimplemented. Thanks to Peter Balch
 	(100710.2566@compuserve.com) for his valuable research.

	* [win32/winprocs.c]
	WIN32_CallWindowProcTo16: new function, call in
 	USER32_DefWindowProcA,...

Mon Mar  4 23:22:40 1996  Jim Peterson <jspeter@birch.ee.vt.edu>

	* [include/wintypes.h]
	Added "#define __export".

	* [objects/bitblt.c]
	Put in a few hacks to make bitblt-ing work when upside-down and/or
	mirrored.  BITBLT_StretchImage should really be checked over
	thoroughly.

	* [programs/progman/main.c]
	Added "#include <resource.h>" for definition of HAVE_WINE_CONSTRUCTOR.

	* [rc/parser.h] [rc/parser.l] [rc/parser.y] [rc/winerc.c]
	Eliminated shift/reduce conflict in style definition.
	Added crude error message support: "stdin:%d: parse error before '%s'".
	Implemented string table support to the best of my ability (it works
	with LoadString() calls).

	* [windows/nonclient.c]
	Fixed bug in NC_DoSizeMove() that made system menu pop up when title
	bar of non-iconized window was clicked (checked for iconization).

Mon Mar 04 20:55:19 1996  Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>

	* [if1632/lzexpand.spec] [if1632/relay.c]
	  [include/lzexpand.h][misc/lzexpand.c]
	LZEXPAND.DLL added.

Sun Mar 03 18:10:22 1996  Albrecht Kleine  <kleine@ak.sax.de>

	* [windows/win.c]
	Prevent usage of invalid HWNDs in WIN_EnumChildWin(),
	this prevents too early termination of EnumChildWindows().
parent 02ed4c23
No related branches found
Tags wine-960309
No related merge requests found
This is release 960302 of Wine the MS Windows emulator. This is still a
This is release 960309 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 "julliard@lrc.epfl.ch". Please don't
forget to include a ChangeLog entry.
WHAT'S NEW with Wine-960302: (see ChangeLog for details)
- Program manager clone using Winelib.
- Support for Esperanto language.
- Some scrollbar fixes.
- Edit control improvements.
WHAT'S NEW with Wine-960309: (see ChangeLog for details)
- More edit control improvements.
- Help begins to work.
- Internal LZEXPAND.DLL.
- Lots of bug fixes.
See the README file in the distribution for installation instructions.
......@@ -18,10 +17,10 @@ Because of lags created by using mirror, this message may reach you before
the release is available at the ftp sites. The sources will be available
from the following locations:
sunsite.unc.edu:/pub/Linux/ALPHA/wine/development/Wine-960302.tar.gz
tsx-11.mit.edu:/pub/linux/ALPHA/Wine/development/Wine-960302.tar.gz
ftp.infomagic.com:/pub/mirrors/linux/wine/development/Wine-960302.tar.gz
aris.com:/pub/linux/ALPHA/Wine/development/Wine-960302.tar.gz
sunsite.unc.edu:/pub/Linux/ALPHA/wine/development/Wine-960309.tar.gz
tsx-11.mit.edu:/pub/linux/ALPHA/Wine/development/Wine-960309.tar.gz
ftp.infomagic.com:/pub/mirrors/linux/wine/development/Wine-960309.tar.gz
aris.com:/pub/linux/ALPHA/Wine/development/Wine-960309.tar.gz
It should also be available from any site that mirrors tsx-11 or sunsite.
......
----------------------------------------------------------------------
Fri Mar 8 19:07:18 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure.in]
Quote '[' and ']' in the test program for the strength-reduce
bug. This should work much better...
* [files/file.c]
Augmented DOS_FILE structure. Most internal functions now return a
DOS_FILE* instead of a Unix handle.
Added a local file array to replace the PDB list upon startup, to
allow using file I/O functions before the first task is created.
Added FILE_SetDateTime() and FILE_Sync() functions.
* [loader/module.c]
Use the DOS file I/O functions in MODULE_LoadExeHeader().
* [objects/bitblt.c]
Use visible region instead of GC clip region to clip source
area. This fixes the card drawing bug in freecell.
* [objects/region.c]
Fixed CombineRgn() to allow src and dest regions to be the same.
Fri Mar 8 16:32:23 1996 Frans van Dorsselaer <dorssel@rulhm1.leidenuniv.nl>
* [controls/EDIT.TODO]
Updated so it reflects the current status.
* [controls/edit.c]
Implemented internal EDIT_WordBreakProc().
Implemented ES_READONLY.
Implemented WM_LBUTTONDBLCLK to select whole words.
Fixed a lot of types in the function definitions.
Wed Mar 6 19:55:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu>
* [debugger/info.c]
Added "walk window" command to walk window list.
* [windows/mdi.c]
Added proper(?) WM_MDISETMENU message handling.
Wed Mar 6 09:27:12 1996 Martin von Loewis <loewis@informatik.hu-berlin.de>
* [if1632/callback.c][if1632/relay32.c]
RELAY32_CallWindowProcConvStruct: new function.
* [win32/struct32.c][win32/Makefile.in][win32/param.c][win32/user32.c]
struct32.c: new file. Moved all structure conversions into that file
PARAM32_POINT32to16,MSG16to32,USER32_RECT32to16:
renamed to STRUCT32_POINT32to16, ...
WIN32_POINT,WIN32_MSG,WIN32_RECT,WIN32_PAINTSTRUCT: renamed to
POINT32, ...
New conversion functions for NCCALCSIZE_PARAMS, WINDOWPOS,
CREATESTRUCT.
* [include/windows.h][misc/exec.c]
WINHELP, MULTIKEYHELP, HELPWININFO: new structures
WinHelp: Reimplemented. Thanks to Peter Balch
(100710.2566@compuserve.com) for his valuable research.
* [win32/winprocs.c]
WIN32_CallWindowProcTo16: new function, call in
USER32_DefWindowProcA,...
Mon Mar 4 23:22:40 1996 Jim Peterson <jspeter@birch.ee.vt.edu>
* [include/wintypes.h]
Added "#define __export".
* [programs/progman/main.c]
Added "#include <resource.h>" for definition of HAVE_WINE_CONSTRUCTOR.
* [rc/parser.h] [rc/parser.l] [rc/parser.y] [rc/winerc.c]
Eliminated shift/reduce conflict in style definition.
Added crude error message support: "stdin:%d: parse error before '%s'".
Implemented string table support to the best of my ability (it works
with LoadString() calls).
* [windows/nonclient.c]
Fixed bug in NC_DoSizeMove() that made system menu pop up when title
bar of non-iconized window was clicked (checked for iconization).
Mon Mar 04 20:55:19 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [if1632/lzexpand.spec] [if1632/relay.c]
[include/lzexpand.h][misc/lzexpand.c]
LZEXPAND.DLL added.
Sun Mar 03 18:10:22 1996 Albrecht Kleine <kleine@ak.sax.de>
* [windows/win.c]
Prevent usage of invalid HWNDs in WIN_EnumChildWin(),
this prevents too early termination of EnumChildWindows().
----------------------------------------------------------------------
Sat Mar 2 18:19:06 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
......
......@@ -5,28 +5,7 @@ If you want to contribute code to Wine, read the DEVELOPER-HINTS. The
primary source of information to developers is the ChangeLog (next to
the source, of course).
1. make: No rule to make target foo/foo.o. Stop.
This frequently happens when a prior attempt to make foo.o failed.
In the current setup, make does not terminate then, but continues and
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.
- 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
1. BAR.EXE used to work, but does not work anymore
Look at the ChangeLog to see what files have been changed. Try to undo
the particular patch and go partially back to the previous version. If
you have any suspicions, report them to the author or to the newsgroup.
......
......@@ -1473,11 +1473,11 @@ cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
int main(void) {
static int Array3;
static int Array[3];
unsigned int B = 3;
int i;
for(i=0; i<B; i++) Arrayi = i - 3;
exit( Array1 != -2 );
for(i=0; i<B; i++) Array[i] = i - 3;
exit( Array[1] != -2 );
}
EOF
eval $ac_link
......
......@@ -52,11 +52,11 @@ then
AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
AC_TRY_RUN([
int main(void) {
static int Array[3];
static int Array[[3]];
unsigned int B = 3;
int i;
for(i=0; i<B; i++) Array[i] = i - 3;
exit( Array[1] != -2 );
for(i=0; i<B; i++) Array[[i]] = i - 3;
exit( Array[[1]] != -2 );
}],
ac_cv_c_gcc_strength_bug="no",
ac_cv_c_gcc_strength_bug="yes",
......
......@@ -8,12 +8,8 @@
- ES_LOWERCASE and ES_UPPERCASE.
- ES_PASSWORD and EM_PASSWORDCHAR.
- ES_OEMCONVERT. Probably won't do anything very much.
- ES_READONLY.
- ES_WANTRETURN and Ctrl-Enter to move to next line when this
functionality is enabled.
......@@ -21,3 +17,17 @@
entered text as well as deleted text. You can also undo an undo.
- Add word wrap - this is a very big change!
I'm doing a rewrite on edit.c. Please e-mail me if you want
to work on edit.c as well, so we can synchronize.
Bugs in the current version, known to me:
- An empty document still contains "\r\n"
- UNDO is unstable (incomplete, and it can cause a segfault)
- WM_LBUTTONDBLCLK lets you select whole words, but doesn't set
the caret at the end of the selection
- Scrolling (left-right) works, but the scrollbar doesn't
Frans van Dorsselaer
dorssel@rulhm1.LeidenUniv.nl
......@@ -3,7 +3,14 @@
*
* Copyright David W. Metcalfe, 1994
* Copyright William Magro, 1995, 1996
* Copyright Frans van Dorsselaer, 1996
*
* Note: I'm doing a rewrite in order to implement word wrap
* Please e-mail me if you want to word on edit.c as well, so
* we can synchronize.
*
* Frans van Dorsselaer
* dorssel@rulhm1.LeidenUniv.nl
*/
#include <stdio.h>
......@@ -72,7 +79,6 @@ typedef struct
int ClientHeight; /* ditto */
char PasswordChar; /* The password character */
EDITWORDBREAKPROC WordBreakProc;
BOOL WeOwnCaret; /* Do we own the caret ? */
int CaretPrepareCount; /* Did we already prepare the caret ? */
BOOL CaretHidden; /* Did we hide the caret during painting ? */
int oldWndCol; /* WndCol before we started painting */
......@@ -96,6 +102,7 @@ typedef struct
#define IsMultiLine(hwnd) (GetWindowLong(hwnd,GWL_STYLE) & ES_MULTILINE)
#define IsVScrollBar(hwnd) (GetWindowLong(hwnd,GWL_STYLE) & WS_VSCROLL)
#define IsHScrollBar(hwnd) (GetWindowLong(hwnd,GWL_STYLE) & WS_HSCROLL)
#define IsReadOnly(hwnd) (GetWindowLong(hwnd,GWL_STYLE) & ES_READONLY)
/* internal variables */
static BOOL TextMarking; /* TRUE if text marking in progress */
......@@ -117,7 +124,7 @@ static HLOCAL EDIT_HeapAlloc(HWND hwnd, int bytes, WORD flags)
ret = LOCAL_Alloc( WIN_GetWindowInstance(hwnd), flags, bytes );
if (!ret)
printf("EDIT_HeapAlloc: Out of heap-memory\n");
fprintf(stderr, "EDIT_HeapAlloc: Out of heap-memory\n");
return ret;
}
......@@ -235,7 +242,7 @@ static void EDIT_CaretHide(HWND hwnd)
EDITSTATE *es = EDIT_GetEditState(hwnd);
if (!es) return;
if (!es->WeOwnCaret) return;
if (!es->HaveFocus) return;
if (!es->CaretPrepareCount) return;
if (!es->CaretHidden)
......@@ -260,7 +267,7 @@ static void EDIT_CaretUpdate(HWND hwnd)
es->CaretPrepareCount--;
if (es->CaretPrepareCount) return;
if (!es->WeOwnCaret) return;
if (!es->HaveFocus) return;
if ((es->WndCol != es->oldWndCol) || (es->WndRow != es->oldWndRow))
SetCaretPos(es->WndCol, es->WndRow * es->txtht);
......@@ -276,15 +283,53 @@ static void EDIT_CaretUpdate(HWND hwnd)
* EDIT_WordBreakProc
*
* Find the beginning of words.
*/
static int CALLBACK EDIT_WordBreakProc(char * pch, int ichCurrent,
int cch, int code)
{
dprintf_edit(stddeb, "EDIT_WordBreakProc: pch=%p, ichCurrent=%d"
", cch=%d, code=%d\n", pch, ichCurrent, cch, code);
dprintf_edit(stddeb, "string=%s\n", pch);
return 0;
* Note: unlike the specs for a WordBreakProc, this function only
* allows to be called without linebreaks between s[0] upto
* s[count - 1]. Remember it is only called
* internally, so we can decide this for ourselves.
*/
static int EDIT_WordBreakProc(char *s, int index, int count, int action)
{
int ret = 0;
dprintf_edit(stddeb, "EDIT_WordBreakProc: s=%p, index=%d"
", count=%d, action=%d\n", s, index, count, action);
switch (action) {
case WB_LEFT:
if (!count) break;
if (index) index--;
if (s[index] == ' ') {
while (index && (s[index] == ' ')) index--;
if (index) {
while (index && (s[index] != ' ')) index--;
if (s[index] == ' ') index++;
}
} else {
while (index && (s[index] != ' ')) index--;
if (s[index] == ' ') index++;
}
ret = index;
break;
case WB_RIGHT:
if (!count) break;
if (index) index--;
if (s[index] == ' ')
while ((index < count) && (s[index] == ' ')) index++;
else {
while (s[index] && (s[index] != ' ') && (index < count)) index++;
while ((s[index] == ' ') && (index < count)) index++;
}
ret = index;
break;
case WB_ISDELIMITER:
ret = (s[index] == ' ');
break;
default:
fprintf(stderr, "EDIT_WordBreakProc: unknown action code !\n");
break;
}
return ret;
}
/*********************************************************************
......@@ -1912,7 +1957,7 @@ static void EDIT_KeyTyped(HWND hwnd, short ch)
/*********************************************************************
* EM_UNDO message function
*/
static LONG EDIT_UndoMsg(HWND hwnd)
static LRESULT EDIT_UndoMsg(HWND hwnd)
{
char *text;
EDITSTATE *es = EDIT_GetEditState(hwnd);
......@@ -1976,7 +2021,7 @@ static void EDIT_SetHandleMsg(HWND hwnd, WPARAM wParam)
/*********************************************************************
* EM_SETTABSTOPS message function
*/
static LONG EDIT_SetTabStopsMsg(HWND hwnd, WORD wParam, LONG lParam)
static LRESULT EDIT_SetTabStopsMsg(HWND hwnd, WPARAM wParam, LPARAM lParam)
{
EDITSTATE *es = EDIT_GetEditState(hwnd);
......@@ -2000,7 +2045,7 @@ static LONG EDIT_SetTabStopsMsg(HWND hwnd, WORD wParam, LONG lParam)
/*********************************************************************
* EM_GETLINE message function
*/
static LONG EDIT_GetLineMsg(HWND hwnd, WORD wParam, LONG lParam)
static LRESULT EDIT_GetLineMsg(HWND hwnd, WPARAM wParam, LPARAM lParam)
{
char *cp;
int len = 0;
......@@ -2032,13 +2077,13 @@ static LONG EDIT_GetLineMsg(HWND hwnd, WORD wParam, LONG lParam)
dprintf_edit( stddeb, "EDIT_GetLineMsg: %d %d, len %d\n", (int)(WORD)(*buffer), (int)(WORD)(*(char *)buffer), len);
lstrcpyn(buffer, cp, len);
return (LONG)len;
return (LRESULT)len;
}
/*********************************************************************
* EM_GETSEL message function
*/
static LONG EDIT_GetSelMsg(HWND hwnd)
static LRESULT EDIT_GetSelMsg(HWND hwnd)
{
int so, eo;
EDITSTATE *es = EDIT_GetEditState(hwnd);
......@@ -2046,13 +2091,13 @@ static LONG EDIT_GetSelMsg(HWND hwnd)
so = es->textptrs[es->SelBegLine] + es->SelBegCol;
eo = es->textptrs[es->SelEndLine] + es->SelEndCol;
return MAKELONG(so, eo);
return (LRESULT)MAKELONG(so, eo);
}
/*********************************************************************
* EM_REPLACESEL message function
*/
static void EDIT_ReplaceSel(HWND hwnd, LONG lParam)
static void EDIT_ReplaceSel(HWND hwnd, LPARAM lParam)
{
EDIT_DeleteSel(hwnd);
EDIT_InsertText(hwnd, (char *)PTR_SEG_TO_LIN(lParam),
......@@ -2064,24 +2109,24 @@ static void EDIT_ReplaceSel(HWND hwnd, LONG lParam)
/*********************************************************************
* EM_LINEFROMCHAR message function
*/
static LONG EDIT_LineFromCharMsg(HWND hwnd, WORD wParam)
static LRESULT EDIT_LineFromCharMsg(HWND hwnd, WPARAM wParam)
{
int row, col;
EDITSTATE *es = EDIT_GetEditState(hwnd);
if (wParam == (WORD)-1)
return (LONG)(es->SelBegLine);
return (LRESULT)(es->SelBegLine);
else
EDIT_GetLineCol(hwnd, wParam, &row, &col);
return (LONG)row;
return (LRESULT)row;
}
/*********************************************************************
* EM_LINEINDEX message function
*/
static LONG EDIT_LineIndexMsg(HWND hwnd, WORD wParam)
static LRESULT EDIT_LineIndexMsg(HWND hwnd, WPARAM wParam)
{
EDITSTATE *es = EDIT_GetEditState(hwnd);
......@@ -2093,7 +2138,7 @@ static LONG EDIT_LineIndexMsg(HWND hwnd, WORD wParam)
/*********************************************************************
* EM_LINELENGTH message function
*/
static LONG EDIT_LineLengthMsg(HWND hwnd, WORD wParam)
static LRESULT EDIT_LineLengthMsg(HWND hwnd, WPARAM wParam)
{
int row, col, len;
int sbl, sbc, sel, sec;
......@@ -2142,7 +2187,7 @@ static LONG EDIT_LineLengthMsg(HWND hwnd, WORD wParam)
/*********************************************************************
* EM_SETSEL message function
*/
static void EDIT_SetSelMsg(HWND hwnd, WORD wParam, LONG lParam)
static void EDIT_SetSelMsg(HWND hwnd, WPARAM wParam, LPARAM lParam)
{
INT so, eo;
EDITSTATE *es = EDIT_GetEditState(hwnd);
......@@ -2259,7 +2304,7 @@ static void EDIT_WM_SetFont(HWND hwnd, WPARAM wParam, LPARAM lParam)
if (lParam) UpdateWindow(hwnd);
EDIT_RecalcSize(hwnd,es);
if (es->WeOwnCaret)
if (es->HaveFocus)
{
EDIT_CaretHide(hwnd);
DestroyCaret();
......@@ -2336,7 +2381,7 @@ static BOOL LOCAL_HeapExists(HANDLE ds)
/*********************************************************************
* WM_NCCREATE
*/
static long EDIT_WM_NCCreate(HWND hwnd, LONG lParam)
static long EDIT_WM_NCCreate(HWND hwnd, LPARAM lParam)
{
CREATESTRUCT *createStruct = (CREATESTRUCT *)PTR_SEG_TO_LIN(lParam);
WND *wndPtr = WIN_FindWndPtr(hwnd);
......@@ -2361,7 +2406,7 @@ static long EDIT_WM_NCCreate(HWND hwnd, LONG lParam)
/* Caret stuff */
es->CaretPrepareCount = 1;
es->CaretHidden = FALSE;
es->WeOwnCaret = FALSE;
es->HaveFocus = FALSE;
/*
* Hack - If there is no local heap then hwnd should be a globalHeap block
* and the local heap needs to be initilised to the same size(minus something)
......@@ -2458,7 +2503,7 @@ static long EDIT_WM_NCCreate(HWND hwnd, LONG lParam)
/*********************************************************************
* WM_CREATE
*/
static long EDIT_WM_Create(HWND hwnd, LONG lParam)
static LRESULT EDIT_WM_Create(HWND hwnd, LPARAM lParam)
{
HDC hdc;
EDITSTATE *es = EDIT_GetEditState(hwnd);
......@@ -2507,7 +2552,7 @@ static long EDIT_WM_Create(HWND hwnd, LONG lParam)
/*********************************************************************
* WM_VSCROLL
*/
static void EDIT_WM_VScroll(HWND hwnd, WORD wParam, LONG lParam)
static void EDIT_WM_VScroll(HWND hwnd, WPARAM wParam, LPARAM lParam)
{
/*
* EDITSTATE *es = EDIT_GetEditState(hwnd);
......@@ -2532,7 +2577,7 @@ static void EDIT_WM_VScroll(HWND hwnd, WORD wParam, LONG lParam)
/*********************************************************************
* WM_HSCROLL
*/
static void EDIT_WM_HScroll(HWND hwnd, WORD wParam, LONG lParam)
static void EDIT_WM_HScroll(HWND hwnd, WPARAM wParam, LPARAM lParam)
{
/*
* EDITSTATE *es = EDIT_GetEditState(hwnd);
......@@ -2548,7 +2593,7 @@ static void EDIT_WM_HScroll(HWND hwnd, WORD wParam, LONG lParam)
/*********************************************************************
* WM_SIZE
*/
static void EDIT_WM_Size(HWND hwnd, WORD wParam, LONG lParam)
static void EDIT_WM_Size(HWND hwnd, WPARAM wParam, LPARAM lParam)
{
EDITSTATE *es = EDIT_GetEditState(hwnd);
......@@ -2562,7 +2607,7 @@ static void EDIT_WM_Size(HWND hwnd, WORD wParam, LONG lParam)
/*********************************************************************
* WM_LBUTTONDOWN
*/
static void EDIT_WM_LButtonDown(HWND hwnd, WORD wParam, LONG lParam)
static void EDIT_WM_LButtonDown(HWND hwnd, WPARAM wParam, LPARAM lParam)
{
char *cp;
int len;
......@@ -2605,7 +2650,7 @@ static void EDIT_WM_LButtonDown(HWND hwnd, WORD wParam, LONG lParam)
/*********************************************************************
* WM_MOUSEMOVE
*/
static void EDIT_WM_MouseMove(HWND hwnd, WORD wParam, LONG lParam)
static void EDIT_WM_MouseMove(HWND hwnd, WPARAM wParam, LPARAM lParam)
{
/*
* EDITSTATE *es = EDIT_GetEditState(hwnd);
......@@ -2625,7 +2670,7 @@ static void EDIT_WM_MouseMove(HWND hwnd, WORD wParam, LONG lParam)
/*********************************************************************
* WM_CHAR
*/
static void EDIT_WM_Char(HWND hwnd, WORD wParam)
static void EDIT_WM_Char(HWND hwnd, WPARAM wParam)
{
dprintf_edit(stddeb,"EDIT_WM_Char: wParam=%c\n", (char)wParam);
......@@ -2635,17 +2680,25 @@ static void EDIT_WM_Char(HWND hwnd, WORD wParam)
case '\n':
if (!IsMultiLine(hwnd))
break;
if (IsReadOnly(hwnd))
{
EDIT_Home(hwnd);
EDIT_Downward(hwnd);
break;
}
wParam = '\n';
EDIT_KeyTyped(hwnd, wParam);
break;
case VK_TAB:
if (IsReadOnly(hwnd)) break;
if (!IsMultiLine(hwnd))
break;
EDIT_KeyTyped(hwnd, wParam);
break;
default:
if (IsReadOnly(hwnd)) break;
if (wParam >= 20 && wParam <= 254 && wParam != 127 )
EDIT_KeyTyped(hwnd, wParam);
break;
......@@ -2655,7 +2708,7 @@ static void EDIT_WM_Char(HWND hwnd, WORD wParam)
/*********************************************************************
* WM_KEYDOWN
*/
static void EDIT_WM_KeyDown(HWND hwnd, WORD wParam)
static void EDIT_WM_KeyDown(HWND hwnd, WPARAM wParam)
{
EDITSTATE *es = EDIT_GetEditState(hwnd);
BOOL motionKey = FALSE;
......@@ -2717,6 +2770,7 @@ static void EDIT_WM_KeyDown(HWND hwnd, WORD wParam)
break;
case VK_BACK:
if (IsReadOnly(hwnd)) break;
if (SelMarked(es))
EDIT_DeleteSel(hwnd);
else
......@@ -2729,6 +2783,7 @@ static void EDIT_WM_KeyDown(HWND hwnd, WORD wParam)
break;
case VK_DELETE:
if (IsReadOnly(hwnd)) break;
if (SelMarked(es))
EDIT_DeleteSel(hwnd);
else
......@@ -2758,7 +2813,7 @@ static void EDIT_WM_KeyDown(HWND hwnd, WORD wParam)
/*********************************************************************
* WM_SETTEXT
*/
static LONG EDIT_WM_SetText(HWND hwnd, LONG lParam)
static LRESULT EDIT_WM_SetText(HWND hwnd, LPARAM lParam)
{
int len;
char *text,*settext;
......@@ -2789,12 +2844,35 @@ static LONG EDIT_WM_SetText(HWND hwnd, LONG lParam)
return EN_ERRSPACE;
}
/*********************************************************************
* WM_LBUTTONDBLCLK
*/
static void EDIT_WM_LButtonDblClk(HWND hwnd)
{
EDITSTATE *es = EDIT_GetEditState(hwnd);
dprintf_edit(stddeb, "WM_LBUTTONDBLCLK: hwnd=%d\n", hwnd);
if (SelMarked(es)) EDIT_ClearSel(hwnd);
es->SelBegLine = es->SelEndLine = es->CurrLine;
es->SelBegCol = EDIT_CallWordBreakProc(hwnd,
EDIT_TextLine(hwnd, es->CurrLine),
es->CurrCol,
EDIT_LineLength(hwnd, es->CurrLine),
WB_LEFT);
es->SelEndCol = EDIT_CallWordBreakProc(hwnd,
EDIT_TextLine(hwnd, es->CurrLine),
es->CurrCol,
EDIT_LineLength(hwnd, es->CurrLine),
WB_RIGHT);
EDIT_WriteTextLine(hwnd, NULL, es->CurrLine);
}
/*********************************************************************
* EditWndProc()
*/
LRESULT EditWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
LONG lResult = 0;
LRESULT lResult = 0;
char *textPtr;
int len;
EDITSTATE *es = EDIT_GetEditState(hwnd);
......@@ -2803,7 +2881,7 @@ LRESULT EditWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
switch (uMsg) {
case EM_CANUNDO:
lResult = (LONG)es->hDeletedText;
lResult = (LRESULT)es->hDeletedText;
break;
case EM_EMPTYUNDOBUFFER:
......@@ -2823,21 +2901,17 @@ LRESULT EditWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
break;
case EM_GETHANDLE:
lResult = (LONG)es->hText;
lResult = (LRESULT)es->hText;
break;
case EM_GETLINE:
if (IsMultiLine(hwnd))
lResult = EDIT_GetLineMsg(hwnd, wParam, lParam);
else
lResult = 0L;
break;
case EM_GETLINECOUNT:
if (IsMultiLine(hwnd))
lResult = es->wlines;
else
lResult = 0L;
break;
case EM_GETMODIFY:
......@@ -2858,7 +2932,7 @@ LRESULT EditWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case EM_GETWORDBREAKPROC:
dprintf_edit(stddeb, "EM_GETWORDBREAKPROC\n");
lResult = (LONG)es->WordBreakProc;
lResult = (LRESULT)es->WordBreakProc;
break;
case EM_LIMITTEXT:
......@@ -2877,8 +2951,6 @@ LRESULT EditWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case EM_LINEINDEX:
if (IsMultiLine(hwnd))
lResult = EDIT_LineIndexMsg(hwnd, wParam);
else
lResult = 0L;
break;
case EM_LINELENGTH:
......@@ -2907,7 +2979,10 @@ LRESULT EditWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
break;
case EM_SETREADONLY:
fprintf(stdnimp,"edit: cannot process EM_SETREADONLY message\n");
dprintf_edit(stddeb, "EM_SETREADONLY, wParam=%d\n", wParam);
SetWindowLong(hwnd, GWL_STYLE,
(BOOL)wParam ? (GetWindowLong(hwnd, GWL_STYLE) | ES_READONLY)
: (GetWindowLong(hwnd, GWL_STYLE) & ~(DWORD)ES_READONLY));
break;
case EM_SETRECT:
......@@ -2973,16 +3048,14 @@ LRESULT EditWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
if ((int)wParam > len)
{
strcpy((char *)PTR_SEG_TO_LIN(lParam), textPtr);
lResult = (DWORD)len ;
lResult = (LRESULT)len ;
}
else
lResult = 0L;
EDIT_HeapUnlock(hwnd, es->hText);
break;
case WM_GETTEXTLENGTH:
textPtr = EDIT_HeapLock(hwnd, es->hText);
lResult = (DWORD)strlen(textPtr);
lResult = (LRESULT)strlen(textPtr);
EDIT_HeapUnlock(hwnd, es->hText);
break;
......@@ -2998,7 +3071,6 @@ LRESULT EditWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
dprintf_edit(stddeb, "WM_KILLFOCUS\n");
es->HaveFocus = FALSE;
DestroyCaret();
es->WeOwnCaret = FALSE;
if (SelMarked(es))
if(GetWindowLong(hwnd,GWL_STYLE) & ES_NOHIDESEL)
EDIT_UpdateSel(hwnd);
......@@ -3026,7 +3098,6 @@ LRESULT EditWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
break;
case WM_MOVE:
lResult = 0;
break;
case WM_NCCREATE:
......@@ -3046,7 +3117,6 @@ LRESULT EditWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
es->HaveFocus = TRUE;
if (SelMarked(es)) EDIT_UpdateSel(hwnd);
CreateCaret(hwnd, 0, 2, es->txtht);
es->WeOwnCaret = TRUE;
SetCaretPos(es->WndCol, es->WndRow * es->txtht);
es->CaretHidden = TRUE;
NOTIFY_PARENT(hwnd, EN_SETFOCUS);
......@@ -3059,7 +3129,6 @@ LRESULT EditWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_SETREDRAW:
dprintf_edit(stddeb, "WM_SETREDRAW: hwnd=%d, wParam=%x\n",
hwnd, wParam);
lResult = 0;
break;
#endif
case WM_SETTEXT:
......@@ -3069,7 +3138,6 @@ LRESULT EditWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_SIZE:
EDIT_WM_Size(hwnd, wParam, lParam);
lResult = 0;
break;
case WM_VSCROLL:
......@@ -3077,9 +3145,7 @@ LRESULT EditWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
break;
case WM_LBUTTONDBLCLK:
dprintf_edit(stddeb, "WM_LBUTTONDBLCLK: hwnd=%d, wParam=%x\n",
hwnd, wParam);
lResult = 0;
EDIT_WM_LButtonDblClk(hwnd);
break;
default:
......
......@@ -435,7 +435,7 @@ static void SCROLL_DrawInterior( HWND hwnd, HDC hdc, int nBar, RECT *rect,
InflateRect( &r, -1, -1 );
GRAPH_DrawReliefRect( hdc, &r, 1, 2, FALSE );
if ((hwndTracking == hwnd) && (nBarTracking == nBar))
SCROLL_DrawMovingThumb( hdc, &rect, vertical, arrowSize, uTrackingPos);
SCROLL_DrawMovingThumb( hdc, rect, vertical, arrowSize, uTrackingPos);
}
......
......@@ -34,7 +34,8 @@ int yyerror(char *);
}
%token CONT STEP LIST NEXT QUIT HELP BACKTRACE INFO STACK SEGMENTS REGS
%token ENABLE DISABLE BREAK DELETE SET MODE PRINT EXAM DEFINE ABORT
%token ENABLE DISABLE BREAK DELETE SET MODE PRINT EXAM DEFINE ABORT WALK
%token WND QUEUE
%token NO_SYMBOL EOL
%token SYMBOLFILE
......@@ -93,6 +94,8 @@ int yyerror(char *);
}
| DELETE BREAK NUM EOL { DEBUG_DelBreakpoint( $3 ); }
| BACKTRACE EOL { DEBUG_BackTrace(); }
| WALK WND EOL { DEBUG_InitWalk(); DEBUG_WndWalk( NULL ); }
| WALK WND NUM EOL { DEBUG_InitWalk(); DEBUG_WndWalk( $3 ); }
| infocmd
| x_command
| print_command
......@@ -180,6 +183,8 @@ x_command:
| INFO BREAK EOL { DEBUG_InfoBreakpoints(); }
| INFO SEGMENTS EOL { LDT_Print( 0, -1 ); }
| INFO SEGMENTS expr EOL { LDT_Print( SELECTOR_TO_ENTRY($3), 1 ); }
| INFO WND expr EOL { DEBUG_WndDump( $3 ); }
| INFO QUEUE expr EOL { DEBUG_QueueDump( $3 ); }
%%
......
......@@ -90,6 +90,9 @@ enable|enabl|enab|ena { return ENABLE;}
disable|disabl|disab|disa|dis { return DISABLE; }
delete|delet|dele|del { return DELETE; }
quit|qui|qu|q { return QUIT; }
walk|w { return WALK; }
queue|queu|que { return QUEUE; }
window|windo|wind|win|wnd { return WND; }
x { return EXAM; }
help|hel|he|"?" { return HELP; }
......
......@@ -7,8 +7,190 @@
#include <stdio.h>
#include <stdlib.h>
#include "global.h"
#include "user.h"
#include "class.h"
#include "win.h"
#include "message.h"
#include "spy.h"
#include "debugger.h"
int iWndIndent = 0;
extern char lpstrSpyMessageIndent[]; /* from misc/spy.c */
/***********************************************************************
* DEBUG_InitWalk
*/
void DEBUG_InitWalk(void)
{
fprintf(stderr,"%-24.24s %-6.6s %-17.17s %-8.8s %s\n",
"HWND / WNDPTR","hQueue","Class Name", "Style", "WndProc");
lpstrSpyMessageIndent[0]='\0';
}
/***********************************************************************
* DEBUG_WndWalk
*
*/
void DEBUG_WndWalk(HWND hStart)
{
WND* wndPtr;
CLASS* classPtr;
char className[0x10];
int i;
if( !hStart )
hStart = GetDesktopHwnd();
wndPtr = WIN_FindWndPtr(hStart);
if( !wndPtr )
{ fprintf(stderr, "Invalid window handle: %04x\n", hStart);
return; }
i = strlen(lpstrSpyMessageIndent);
/* 0x10 bytes are always reserved at the end of lpstrSpyMessageIndent */
sprintf(lpstrSpyMessageIndent + i,"%04x %08x",hStart, (unsigned) wndPtr);
classPtr = CLASS_FindClassPtr(wndPtr->hClass);
if(classPtr)
GlobalGetAtomName(classPtr->atomName ,className, 0x10);
else
strcpy(className,"<BAD>");
fprintf(stderr,"%-24.24s %-6.4x %-17.17s %08x %04x:%04x\n",
lpstrSpyMessageIndent,
wndPtr->hmemTaskQ,
className,
(unsigned) wndPtr->dwStyle,
HIWORD(wndPtr->lpfnWndProc),
LOWORD(wndPtr->lpfnWndProc));
lpstrSpyMessageIndent[i] = '\0';
if( wndPtr->hwndChild )
{
/* walk children */
hStart = wndPtr->hwndChild;
wndPtr = WIN_FindWndPtr(hStart);
iWndIndent ++;
if( iWndIndent < SPY_MAX_INDENTLEVEL - 0x10 )
{
lpstrSpyMessageIndent[iWndIndent - 1] = ' ';
lpstrSpyMessageIndent[iWndIndent] = '\0';
}
while( wndPtr )
{
DEBUG_WndWalk(hStart);
hStart = wndPtr->hwndNext;
wndPtr = WIN_FindWndPtr(hStart);
}
if( hStart )
fprintf(stderr, "%s%s"NPFMT"\n", lpstrSpyMessageIndent,
"<BAD>", hStart);
if( iWndIndent )
{
iWndIndent--;
if( iWndIndent < SPY_MAX_INDENTLEVEL - 0x10 )
lpstrSpyMessageIndent[iWndIndent] = '\0';
}
}
}
/***********************************************************************
* DEBUG_WndDump
*
*/
void DEBUG_WndDump(HWND hWnd)
{
WND* wnd;
char* lpWndText = NULL;
wnd = WIN_FindWndPtr(hWnd);
if( !wnd )
{ fprintf(stderr, "Invalid window handle: %04x\n", hWnd);
return; }
if( wnd->hText )
lpWndText = (LPSTR) USER_HEAP_LIN_ADDR( wnd->hText );
fprintf( stderr, "next: %12.4x\n"
"child: %10.4x\n"
"parent: %10.4x\n"
"owner: %10.4x\n"
"hClass: %10.4x\n"
"hInst: %10.4x\n"
"clientRect: %i,%i - %i,%i\n"
"windowRect: %i,%i - %i,%i\n"
"hRgnUpdate: %6.4x\n"
"hLastPopup: %6.4x\n"
"Style: %10.8x\n"
"StyleEx: %9.8x\n"
"hDCE: %10.4x\n"
"hVscroll: %8.4x\n"
"hHscroll: %8.4x\n"
"menuID: %10.4x\n"
"hText: %10.4x (\"%s\")\n"
"flags: %10.4x\n",
wnd->hwndNext, wnd->hwndChild,wnd->hwndParent,
wnd->hwndOwner,wnd->hClass,wnd->hInstance,
wnd->rectClient.left, wnd->rectClient.top,
wnd->rectClient.right, wnd->rectClient.bottom,
wnd->rectWindow.left, wnd->rectWindow.top,
wnd->rectWindow.right, wnd->rectWindow.bottom,
wnd->hrgnUpdate, wnd->hwndLastActive,
(unsigned) wnd->dwStyle, (unsigned) wnd->dwExStyle,
wnd->hdce, wnd->hVScroll, wnd->hHScroll,
wnd->wIDmenu, wnd->hText, (lpWndText)?lpWndText:"NULL",
wnd->flags);
}
/***********************************************************************
* DEBUG_QueueDump
*
*/
void DEBUG_QueueDump(HQUEUE hQ)
{
MESSAGEQUEUE* pq;
if( !hQ || IsBadReadPtr((SEGPTR)MAKELONG( 0, GlobalHandleToSel(hQ)),
sizeof(MESSAGEQUEUE)) )
{
fprintf(stderr, "Invalid queue handle: "NPFMT"\n", hQ);
return;
}
pq = (MESSAGEQUEUE*) GlobalLock( hQ );
fprintf(stderr,"next: %12.4x Intertask SendMessage:\n"
"hTask: %11.4x ----------------------\n"
"msgSize: %9.4x hWnd: %10.4x\n"
"msgCount: %8.4x msg: %11.4x\n"
"msgNext: %9.4x wParam: %8.4x\n"
"msgFree: %9.4x lParam: %8.8x\n"
"qSize: %11.4x lRet: %10.8x\n"
"wWinVer: %9.4x ISMH: %10.4x\n"
"paints: %10.4x hSendTask: %5.4x\n"
"timers: %10.4x hPrevSend: %5.4x\n"
"wakeBits: %8.4x\n"
"wakeMask: %8.4x\n"
"hCurHook: %8.4x\n",
pq->next, pq->hTask, pq->msgSize, pq->hWnd,
pq->msgCount, pq->msg, pq->nextMessage, pq->wParam,
pq->nextFreeMessage, (unsigned)pq->lParam, pq->queueSize,
(unsigned)pq->SendMessageReturn, pq->wWinVersion, pq->InSendMessageHandle,
pq->wPaintCount, pq->hSendingTask, pq->wTimerCount,
pq->hPrevSendingTask, pq->status, pq->wakeMask, pq->hCurHook);
}
/***********************************************************************
* DEBUG_Print
......@@ -108,8 +290,10 @@ void DEBUG_Help(void)
" step next",
" mode [16,32] print <expr>",
" set <reg> = <expr> set *<addr> = <expr>",
" walk [wnd] <expr> dump [wnd, queue] <expr>",
" info [reg,stack,break,segments] bt",
" symbolfile <filename> define <identifier> <addr>",
" list <addr> ",
"",
"The 'x' command accepts repeat counts and formats (including 'i') in the",
"same way that gdb does.",
......@@ -143,7 +327,7 @@ void DEBUG_List( DBG_ADDR *addr, int count )
{
DEBUG_PrintAddress( addr, dbg_mode );
fprintf( stderr, ": " );
if (!DBG_CHECK_READ_PTR( addr, 1 )) break;
if (!DBG_CHECK_READ_PTR( addr, 1 )) return;
DEBUG_Disasm( addr );
fprintf (stderr, "\n");
}
......
......@@ -259,9 +259,9 @@ static int DOSFS_Match( const char *mask, const char *name )
*
* Convert a Unix time in the DOS date/time format.
*/
void DOSFS_ToDosDateTime( time_t *unixtime, WORD *pDate, WORD *pTime )
void DOSFS_ToDosDateTime( time_t unixtime, WORD *pDate, WORD *pTime )
{
struct tm *tm = localtime( unixtime );
struct tm *tm = localtime( &unixtime );
if (pTime)
*pTime = (tm->tm_hour << 11) + (tm->tm_min << 5) + (tm->tm_sec / 2);
if (pDate)
......@@ -652,12 +652,11 @@ int DOSFS_FindNext( const char *path, const char *mask, int drive,
if ((attr & ~(FA_UNUSED | FA_ARCHIVE | FA_RDONLY)) == FA_LABEL)
{
time_t now = time(NULL);
if (skip) return 0;
strcpy( entry->name, DRIVE_GetLabel( drive ) );
entry->attr = FA_LABEL;
entry->size = 0;
DOSFS_ToDosDateTime( &now, &entry->date, &entry->time );
DOSFS_ToDosDateTime( time(NULL), &entry->date, &entry->time );
return 1;
}
......
This diff is collapsed.
......@@ -2,11 +2,33 @@ TOPSRC = @top_srcdir@
MODULE = if1632
DLLS16 = commdlg.spec compobj.spec ddeml.spec gdi.spec kernel.spec \
keyboard.spec mmsystem.spec mouse.spec ole2.spec ole2conv.spec \
ole2disp.spec ole2nls.spec ole2prox.spec olecli.spec olesvr.spec \
shell.spec sound.spec storage.spec stress.spec system.spec \
toolhelp.spec user.spec win87em.spec winprocs.spec winsock.spec
DLLS16 = \
commdlg.spec \
compobj.spec \
ddeml.spec \
gdi.spec \
kernel.spec \
keyboard.spec \
lzexpand.spec \
mmsystem.spec \
mouse.spec \
ole2.spec \
ole2conv.spec \
ole2disp.spec \
ole2nls.spec \
ole2prox.spec \
olecli.spec \
olesvr.spec \
shell.spec \
sound.spec \
storage.spec \
stress.spec \
system.spec \
toolhelp.spec \
user.spec \
win87em.spec \
winprocs.spec \
winsock.spec
DLLS32 = advapi32.spec comctl32.spec comdlg32.spec gdi32.spec kernel32.spec \
ole32.spec shell32.spec user32.spec winprocs32.spec winspool.spec
......
......@@ -38,7 +38,7 @@ LONG CallWindowProc( WNDPROC func, HWND hwnd, WORD message,
if(!a->win32)
fprintf(stderr,"Where is the Win32 callback?\n");
if (UsesLParamPtr(message))
return RELAY32_CallWindowProc(a->win32,hwnd,message,wParam,lParam ? PTR_SEG_TO_LIN(lParam): 0);
return RELAY32_CallWindowProcConvStruct(a->win32,hwnd,message,wParam,lParam);
else
return RELAY32_CallWindowProc(a->win32,hwnd,message,wParam,lParam);
}
......
name lzexpand
id 26
1 pascal LZCopy(word word) LZCopy
2 pascal16 LZOpenFile(ptr ptr word) LZOpenFile
3 pascal16 LZInit(word) LZInit
4 pascal LZSeek(word long word) LZSeek
5 pascal16 LZRead(word segptr word) LZRead
6 pascal16 LZClose(word) LZClose
7 pascal16 LZStart() LZStart
8 pascal CopyLZFile(word word) CopyLZFile
9 pascal16 LZDone() LZDone
10 pascal16 GetExpandedName(ptr ptr) GetExpandedName
#11 WEP
#12 ___EXPORTEDSTUB
......@@ -52,7 +52,8 @@ struct dll_table_s dll_builtin_table[N_BUILTINS] =
DLL_ENTRY_NOTUSED(COMPOBJ),
DLL_ENTRY_NOTUSED(STORAGE),
DLL_ENTRY(WINPROCS),
DLL_ENTRY_NOTUSED(DDEML)
DLL_ENTRY_NOTUSED(DDEML),
DLL_ENTRY(LZEXPAND)
};
/* don't forget to increase N_BUILTINS in dlls.h if you add a dll */
......
......@@ -17,7 +17,10 @@
#include "pe_image.h"
#include "peexe.h"
#include "relay32.h"
#include "struct32.h"
#include "stackframe.h"
#include "xmalloc.h"
#include "ldt.h"
#include "stddebug.h"
#include "debug.h"
......@@ -124,7 +127,7 @@ LONG RELAY32_CallWindowProc( WNDPROC func, int hwnd, int message,
int wParam, int lParam )
{
int ret;
__asm__ (
__asm__ (
"push %1;"
"push %2;"
"push %3;"
......@@ -136,6 +139,68 @@ __asm__ (
return ret;
}
LONG RELAY32_CallWindowProcConvStruct( WNDPROC func, int hwnd, int message,
int wParam, LPARAM lParam16)
{
WINDOWPOS32 wp;
union {
MINMAXINFO32 mmi;
NCCALCSIZE_PARAMS32 nccs;
CREATESTRUCT32 cs;
} st;
CREATESTRUCT *lpcs;
LONG result;
void *lParam;
if(!lParam16)
return RELAY32_CallWindowProc(func,hwnd,message,wParam,(int)lParam16);
lParam = PTR_SEG_TO_LIN(lParam16);
switch(message) {
case WM_GETMINMAXINFO:
STRUCT32_MINMAXINFO16to32(lParam,&st.mmi);
result=RELAY32_CallWindowProc(func,hwnd,message,wParam,(int)&st.mmi);
STRUCT32_MINMAXINFO32to16(&st.mmi,lParam);
return result;
case WM_WINDOWPOSCHANGING:
case WM_WINDOWPOSCHANGED:
STRUCT32_WINDOWPOS16to32(lParam,&wp);
result=RELAY32_CallWindowProc(func,hwnd,message,wParam,(int)&wp);
STRUCT32_WINDOWPOS32to16(&wp,lParam);
return result;
case WM_NCCALCSIZE:
STRUCT32_NCCALCSIZE16to32Flat(lParam,&st.nccs);
if(((NCCALCSIZE_PARAMS*)lParam)->lppos) {
STRUCT32_WINDOWPOS16to32(((NCCALCSIZE_PARAMS*)lParam)->lppos,&wp);
st.nccs.lppos=&wp;
} else
st.nccs.lppos= 0;
result=RELAY32_CallWindowProc(func,hwnd,message,wParam,(int)&st.nccs);
STRUCT32_NCCALCSIZE32to16Flat(&st.nccs,lParam);
if(((NCCALCSIZE_PARAMS*)lParam)->lppos)
STRUCT32_WINDOWPOS32to16(&wp,((NCCALCSIZE_PARAMS*)lParam)->lppos);
return result;
case WM_NCCREATE:
lpcs = (CREATESTRUCT*)lParam;
STRUCT32_CREATESTRUCT16to32(lParam,&st.cs);
st.cs.lpszName = HIWORD(lpcs->lpszName) ?
PTR_SEG_TO_LIN(lpcs->lpszName) : (char*)lpcs->lpszName;
st.cs.lpszClass = HIWORD(lpcs->lpszClass) ?
PTR_SEG_TO_LIN(lpcs->lpszClass) : (char*)lpcs->lpszClass;
result=RELAY32_CallWindowProc(func,hwnd,message,wParam,(int)&st.cs);
STRUCT32_CREATESTRUCT32to16(&st.cs,lParam);
lpcs->lpszName = HIWORD(st.cs.lpszName) ?
MAKE_SEGPTR(st.cs.lpszName) : (SEGPTR)st.cs.lpszName;
lpcs->lpszClass = HIWORD(st.cs.lpszClass) ?
MAKE_SEGPTR(st.cs.lpszClass) : (SEGPTR)st.cs.lpszClass;
return result;
case WM_GETTEXT:
case WM_SETTEXT:
return RELAY32_CallWindowProc(func,hwnd,message,wParam,(int)lParam);
default:
fprintf(stderr,"No conversion function for message %d\n",message);
}
return RELAY32_CallWindowProc(func,hwnd,message,wParam,(int)lParam);
}
void RELAY32_MakeFakeModule(WIN32_builtin*dll)
{
NE_MODULE *pModule;
......
......@@ -89,6 +89,10 @@ extern void DEBUG_Print( const DBG_ADDR *addr, int count, char format );
extern void DEBUG_PrintAddress( const DBG_ADDR *addr, int addrlen );
extern void DEBUG_Help(void);
extern void DEBUG_List( DBG_ADDR *addr, int count );
extern void DEBUG_InitWalk(void);
extern void DEBUG_WndWalk( HWND );
extern void DEBUG_WndDump( HWND );
extern void DEBUG_QueueDump( HQUEUE );
/* debugger/memory.c */
extern BOOL DEBUG_IsBadReadPtr( const DBG_ADDR *address, int size );
......
......@@ -54,8 +54,9 @@ DECLARE_DLL(COMPOBJ)
DECLARE_DLL(STORAGE)
DECLARE_DLL(WINPROCS)
DECLARE_DLL(DDEML)
DECLARE_DLL(LZEXPAND)
#define N_BUILTINS 25
#define N_BUILTINS 26
extern struct dll_table_s dll_builtin_table[];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment